Email Subject

Hi,

It might be part of the new upgrade, but I am wondering if there is a way to have an automatic subject line in our OpenVPMS emails?

Ideally when emailing patient documents, the subject line would have something along the lines of:

Referral letter for [openvpms:get(party:getPatientReferralVet(.),'firstName')]
[openvpms:get(party:getPatientReferralVet(.),'lastName')] regarding

patient.entity.name [openvpms:get(party:getPatientOwner(.),'lastName')] from

clinician.entity.name

 

Thanks.

Comment viewing options

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

Re: Email Subject

Greta - I don't think that you want something built into the code - it is too limiting [what would happen if you wanted to email about something else].

The way to do it is to use a macro.  The expression you want is:

 concat('Reference Letter for Dr ',openvpms:get(party:getPatientReferralVet($patient),'firstName'),' ',openvpms:get(party:getPatientReferralVet($patient),'lastName'),' re ',$patient.name,' ',$customer.lastName,' from ',$user.description) 

If you don't mind, I will rip off this idea for our system - I called the macro '@refs' (ie REFerence Subject).

It generates:

Some comments:

  1. I use the current user (rather than the clinician as you suggested)
  2. I used $user.description because we use 'short names' (ie JS) so we can quickly select the clinician and put the full name in the description field.  If you want to switch to the name, change it to $user.name.
  3. If have not put in any sexy code to warn that you don't have a current patient - the macro just will not expand.

Regards, Tim G

Re: Email Subject

To extrapolate the new update 1.7 (currently in beta ie not for production)

https://openvpms.atlassian.net/browse/OVPMS-1296

adds the above features which simplify Tims macro above.

It isnt automatic but you can macro it...making entry fast.

 

I would add that Tim is discussing 1.7 macroing is not available in subject lines in 1.6.2 or below

Syndicate content