This screen is used to create/edit/view the Schedule Views. These together with the schedules themselves (see Organisation|Schedules) determine how the Workflow|Scheduling screen works.
The fields are as follows:
Name - the name of the schedule view
Description - serves to clarify the name
Active - uncheck this box to deactivate the schedule view
Display Expression - this the expression used to construct what is displayed when the schedule view contains multiple schedules. (It's not used if there is only a single schedule in the view.) See also Expressions below.
Display Notes - uncheck this if you do not want the notes icon shown on the multi-schedule version of the Workflow|Scheduling screen. On the single-schedule version, the notes text is shown in the Notes column.
Highlight - you can select None, Clinician, Event Type (ie appointment type), or Status. This determines the initial setting of the Highlight setting on the Scheduling screen. Remember that if you are going to make proper use of this highlighting facility, then you need to set different colours for each clinician (in Administration|Users), appointment type (in Administration|Types|Appointment). However if you want to change the status colours, it's more difficult - see Reference|Colours.
Multiple Day View - if selected, multiple days worth of appointments can be shown at once.
Use strikethrough for Completed/Cancelled - if selected, Completed and Cancelled appointments are displayed with strikethrough text.
Schedules tab - used to set the Schedules which this Schedule View includes. If there are more than one, then the Workflow|Scheduling screen initially shows each schedule in its own column. If there is only one, then a different screen format is used with columns for each of Status, Appointment Type, Customer, Patient, Reason and Notes. Even with a multiple-schedule view, you can switch the Scheduling screen to show only a single schedule.
Test Button
Pressing the Test button opens a window that allows you to test and compose expressions. It includes documentation and examples as well as its own Test button that actually tests your expression and displays the resulting text.
Expressions
The expression shown in the screenshot above is duplicated here so you can copy it:
concat(openvpms:get(.,'clinician.name'),': ',openvpms:get(.,'customer.name'),' - ',openvpms:get(.,'patient.name'),'\n',openvpms:get(.,'act.reasonName'),' - ',openvpms:get(.,'act.statusName'))
Note that what we are doing is concatenating together bits of information from the openvpms:get calls with various separators, eg ': '. The '\n' injects a newline character to start a second line.
The following table shows the parameters that the expressions have access to, that is, each of the node names which can be used in the openvpms:get(.,'nodeName') function.
Node Name | Explanation |
---|---|
act.description | Appointment Notes |
act.status | Status code (eg PENDING) |
act.statusName | Status (eg Pending) |
act.reason | Reason code (eg HIT_BY_CAR) |
act.reasonName | Reason (eg Hit by Car) |
customer.name | Name of Customer (eg Smith,Fred) |
patient.name | Name of Patient |
clinician.name | Name of Clinician |
schedule.name | Name of the schedule |
scheduleType.name | Appointment Type |
arrivalTime | Time arrived, ie check-in time (eg Sat Jul 27 10:15:47 EST 2013) empty string if not checked-in yet use date:format functions to format, eg date:formatDateTime(openvpms:get(.,'arrivalTime'),'short') yields 27/7/13 10:16 AM |
waiting | Time as '(h:mm)' since check-in, empty string if not checked-in yet |
There are also a number of others which may be used, but not particularly efficiently as they require database queries.
To get the breed, do:
openvpms:lookup(openvpms:get(., "patient.objectReference"), "breed")
To get the customer's last name, do:
openvpms:get(.,"customer.objectReference.lastName")
Notes:
However, if you need a customer's full name and address to show on a schedule view so that a house call vet can look at the schedule with his iPhone to see where to go next, then the following will do the trick:
normalize-space(openvpms:get(., "customer.objectReference.description"))
The 'normalize-space' function (one of the xpath functions) removes the newline characters to convert the multiline address into a single line.
Finally, an example where the information is displayed over three lines but is limited to 30 characters wide:
concat(substring(concat(openvpms:get(., 'clinician.name'),': ', openvpms:get(., 'patient.name'),' ',openvpms:get(.,'customer.objectReference.lastName')),1,30),'\n', substring(concat('[',openvpms:lookup(openvpms:get(., 'patient.objectReference'),'breed'),']'),1,30),'\n', substring(concat(openvpms:get(.,'scheduleType.name'), ':', openvpms:get(.,'act.reasonName'),' ', openvpms:get(.,'waiting')),1,30))
This is the screen used to select a Discount Type. It works like a standard select screen.