author.entity.name for jrxml documents

Hi,

I'm wondering if I can use a field in a Jrxml document that gives the author (the person currently logged into OpenVPMS).

I thought I might use this in a document for Update letters as sometimes they are sent from nurses or other staff that aren't clinicians. This would be the sign off at the bottom of the document.

I'd also like to use it in a macro for the subject line of the email.

We currently use:

concat('Update Letter for Dr ',openvpms:get(party:getPatientReferralVet($patient),'firstName'),' ',openvpms:get(party:getPatientReferralVet($patient),'lastName'),' re ',$patient.name,' ',$customer.lastName,' from Advanced Vetcare')

But would like to use something like:

concat('Update Letter for Dr ',openvpms:get(party:getPatientReferralVet($patient),'firstName'),' ',openvpms:get(party:getPatientReferralVet($patient),'lastName'),' re ',$patient.name,' ',$customer.lastName,' from author.entity.name at Advanced Vetcare')

Thanks,

Greta

Comment viewing options

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

Re: author.entity.name for jrxml documents

In templates you can get the logged in user name with:

  • the field: OpenVPMS.user.name
  • the expression: [$OpenVPMS.user.name]

In macros, use the expression: $user.name

So in your macro, you want:

concat('Update Letter for Dr ',openvpms:get(party:getPatientReferralVet($patient),'firstName'),' ',openvpms:get(party:getPatientReferralVet($patient),'lastName'),' re ',$patient.name,' ',$customer.lastName,' from ', $user.name, ' at Advanced Vetcare')
Syndicate content