WorkList View Display Expression

Hi,

i was wanting to add the referring vet associated with a patient to the work list view display expression but can't work out if it is possible and if so what is the correct expression to use. I looked in the context sensitive help but not listed as an option here.

Can someone help?

thanks,

Adrian

Comment viewing options

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

Re: WorkList View Display Expression

Adrian - you need one of the party:getPatientReferral... functions - see http://www.openvpms.org/documentation/csh/1.7/reference/jxpath#party

You may also want to make use of the substring function (see http://www.openvpms.org/documentation/csh/1.7/reference/xpath ) to limit the length of the output (so that the column widths are controlled.  Below is an example of its use:

concat(substring(concat(openvpms:get(.,'clinician.name'),':',openvpms:get(.,'patient.name'),' ',openvpms:get(.,'customer.objectReference.lastName'),' =',substring(openvpms:get(.,'act.status'),1,2)),1,60),'\n', substring(concat('[',openvpms:lookup(openvpms:get(.,'patient.objectReference'),'breed'),'] ',openvpms:get(.,'scheduleType.name'),':',openvpms:get(.,'act.reasonName')),1,60),'\n',openvpms:get(.,'act.description'))

Here you can see that it is being used to limit the width to 60 characters.

I do not have the ability to experiment at the moment, but I suspect that party:getPatientReferralVet(.) and party:getPatientReferralVetPractice(.) will get you what you want - but you may have to call up the patient, ie use party:getPatientReferralVet(openvpms:get(., "patient.entity")) and similarly for the practice.

Regards, Tim G

 

Re: WorkList View Display Expression

Hi,

Sorry, coming back to this. I never got this to work but I would love to be able to do it now. Tried all of those functions and the test came back with an expression error.

Can I please have some more assistance. I would also love to get signalment (Age, Sex, Breed) in the format 

"2Y MN Birman" as well if possible...

Thanks,

 

Adrian

Re: WorkList View Display Expression

Tim A - I have been playing with this.  I have worklist view expressions that use openvpms:get - eg
concat('name=',openvpms:get(.,'customer.objectReference.lastName'),' xx')

These work.  But an equivalent using the party functions do not - ie
concat('name=',party:getPartyFullName(.),' xx')   gives Expression error

 

Are party: functions not allowed in worklist view expressions?

Regards, Tim G

Re: WorkList View Display Expression

The expression test facility is fairly basic; the various .objectReference properties aren't populated as these weren't intended to be used by end-users. They can be responsible for performance issues.

The following expression includes the patient age, sex and breed, and the referring practice, if there is one:

concat(openvpms:get(.,'customer.name'),
 '\n',
 openvpms:get(., 'patient.name'),
 ' ',
 party:getPatientAge(openvpms:get(., 'patient.objectReference')),
 ' ',
 openvpms:lookup(openvpms:get(., 'patient.objectReference'), 'sex'),
 ' ',
 openvpms:lookup(openvpms:get(., 'patient.objectReference'), 'breed'),
 ' - Waiting ', openvpms:get(., 'waiting'),
 expr:concatIf(
     '\n', 'Ref: ',openvpms:get(party:getPatientReferralVetPractice(openvpms:get(., 'patient.objectReference')), 'name')))

 

Re: WorkList View Display Expression

Bingo! Works wonderfully! Thanks a heap! Much appreciated. Have a lovely holidays to you both!

Syndicate content