Adding Patient Alerts to Cage Card

Greetings...

I've been asked to add any patient alerts (Aggression, Allergy, etc) to the cage card template (Patient Form, .odt) that gets printed out at check-in.  I thought for this one I would NOT resort to asking for help but would just figure out how to get to it myself.  DEFEATED... and feeling none too proud about it.

Wondering if anyone could suggest a User Field value that would access this information.

Thanks,

Sam
Kamloops, Canada

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Adding Patient Alerts to Cage Card

It's not supported currently. In 2.1.2, you will be able to use:

  patient:alerts(somepatient)

which will give you all of the active alerts for a patient. This is largely intended for use in JasperReports.

To get the alert names for use in a document, you could then use:

  list:names(list:set(patient:alerts(patient:get()), 'alertType.entity'))

Re: Adding Patient Alerts to Cage Card

Hi Tim,

Thanks for adding that!  I thought that it would probably turn out to be some sort of list function as there could be more than one alert but that's as far as I could get.

A new reason to look forward to 2.1.2.

Thanks again,

Sam

Re: Adding Patient Alerts to Cage Card

Hi Tim,

I've deployed the latest 2.1.2-SNAPSHOT on my test server and started a rewrite of our .odt cage card.  The .odt looks correct with your list:names... etc field value as above but the print fails.  The error message printed is that "No node named list:names... etc found in archetype act.patientDocumentForm.  While the release notes for 2.1.2 didn't mention an archetype reload was required, I did so anyway with no effect.

The printout does truncate the field value (see attached jpg) so I'm not sure if this is actually an archetype issue or an odt issue.  

Haven't tried to rewrite the cage card to be a .jrxml template yet.

Thanks,

Sam

AttachmentSize
Jabu.jpg 40.58 KB

Re: Adding Patient Alerts to Cage Card

That's the xpath expression. It will work in macro expressions for example.

In a document, you need to wrap it in [] to distinguish it from fields.

 

Re: Adding Patient Alerts to Cage Card

Oops... that did it.

Thanks.

Syndicate content