Location Phone Number

Hi,

Wondering if someone can give me the code I need within a macro to return the phone number for the location I am logged into.

I've been able to figure out how to return the practice name - openvpms:get($location,'name')

But I can't figure out the phone number. I tried- openvpms:get($location,'Telephone') but that didn't work.

I'm trying to fit it into a macro such as the one below, replacing the phone number 90920400 with the location phone number.

Please find attached a referral letter for ', openvpms:get($patient,'name') ,' ', openvpms:get($customer,'lastName') ,'. Please contact the practice on 90920400 if you have any further queries regarding this case or any other case. Sincere thanks for your ongoing support of our practice.

 

 

Thanks!

Comment viewing options

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

Re: Location Phone Number

Try:

party:getTelephone($location)

 

See Party Functions for further reference.

-Tim

Re: Location Phone Number

Also note that in macros in OpenVPMS 1.9, you can also use the shorthand:

$patient.name for openvpms:get($patient, 'name')

and:

$customer.lastName for openvpms:get($customer, 'lastName')

E.g.:

concat($patient.name, ' ', $customer.lastName)

Re: Location Phone Number

Perfect. Thank you.

Syndicate content