v1.9 beta sms appointment reminders

Hi,

At http://www.openvpms.org/documentation/csh/1.9/admin/template/SMSAppointment/edit

it describes using an IF expression to change the sms reminder text for a surgery appointment type:

expr:if($appointment.appointmentType.entity.name = 'Admit - Surgery',

concat("Reminder: East Island Vets Surgery Appointment", $nl,
        expr:var("patient.name")," ",
        date:formatDate($appointment.startTime, "short"),
        " @ ", date:formatTime($appointment.startTime, "short"), $nl,
        "Remember: water is OK but no food after 9pm ",date:formatDate(date:add($appointment.startTime,"-1d"), "short"),$nl,
        'If queries phone ', party:getTelephone($location)),

concat("Reminder: East Island Vets Appointment", $nl,
        expr:if(expr:var("patient.name") != "",expr:var("patient.name"), "is on")," ",
        date:formatDate($appointment.startTime, "short"),
        " @ ", date:formatTime($appointment.startTime, "short"), $nl,
        'If queries phone ', party:getTelephone($location))

)

Can someone please tell me how I can edit this to make a nest of IF functions or some way of having different text for a number of different appointment types, e.g dental, surgery, xrays, grooming etc?

Many thanks,

Shanon

 

 

 

Comment viewing options

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

Re: v1.9 beta sms appointment reminders

Use expr:if e.g.:

expr:if($appointment.appointmentType.entity.name = 'Surgery',
        'Surgery text',
        expr:if($appointment.appointmentType.entity.name = 'Grooming',
                'Grooming text',                
                expr:if($appointment.appointmentType.entity.name = 'Dental',
                        'Dental text',
                        'Default text')))

 

Syndicate content