This screen is used to create/edit/view the Work List Views. These together with the work lists themselves (see Organisation|Work Lists) determine how the Workflow|Work Lists screen works.

The fields are as follows:
Work List View - the name of the work list 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 work list view contains multiple work lists. (It's not used if there is only a single work list in the view.) See also Expressions below.
Display Notes - uncheck this if you do not want the notes icon shown on the multi-work list version of the Workflow|Work List screen. On the single-work list version, the notes text is shown in the Notes column.
Highlight - you can select None, Clinician, Event Type (ie task type), or Status. This determines the initial setting of the Highlight setting on the Work Lists 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), task type (in Administration|Types|Task Type). However if you want to change the status colours, it's more difficult - see Reference|Colours.
Work Lists tab - used to set the Work Lists which this Work List View includes.  If there are more than one, then the Workflow|Work Lists screen shows each work list 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-work list view, you can switch the Work List screen to show only a single work list.

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.  Note that it is possible to write a valid complex expression that the Test facility says is invalid - see the note at the bottom of this page.

The expression shown in the screenshot above is duplicated here so you can copy it:

 concat(openvpms:get(.,''),':',openvpms:get(.,''),' ',openvpms:get(.,'customer.objectReference.lastName'),' =',substring(openvpms:get(.,'act.status'),1,2),' ', openvpms:get(.,'waiting'),'{',date:format(openvpms:get(., 'act.objectReference.appointments.source.startTime'), "HH:mm"),'}',openvpms:get(.,''),'\n','[',openvpms:lookup(openvpms:get(.,'patient.objectReference'),'breed'),'] ',openvpms:get(.,''),':',openvpms:get(.,''),'\n',openvpms:get(.,'act.description')) 

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 above expression generates output like:

ie the clinician is DQ, the patient is Miso, customer last name Liang, status is In Progress, 1 hour 32 between being checked in and the consult starting, the appointment was at 09:15, the customer Account Type is 'Creature Comforts', breed is Poodle-Toy, task type is Hospital Inpatient, the task author is 'Anita Chiu', and the bottom line gives the task notes.

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.

act.description Task Notes
act.status Status code (eg PENDING)
act.statusName Status (eg Pending)
act.reason [can be used but always empty]
act.reasonName [can be used but always empty] Name of Customer (eg Smith,Fred) Name of Patient Name of Clinician Name of the work list Task Type
waiting Time between check-in and consult starting in format (hh:mm). Empty if this not available.

There are also a number of others which may be used, but not particularly efficiently as they require database queries.

  • patient.objectReference - reference to the patient
  • act.objectReference - reference to the appointment/task
  • schedule.objectReference - reference to the schedule
  • customer.objectReference - reference to the customer
  • clinician.objectReference - reference to the clinician
  • author.objectReference - reference to the author

To get the breed, do:

openvpms:lookup(openvpms:get(., "patient.objectReference"), "breed")

To get the customer's last name, do:


To get the referring practice if any, use:

expr:concatIf('\n', 'Ref: ',openvpms:get(party:getPatientReferralVetPractice(openvpms:get(., 'patient.objectReference')), 'name'))

In the above, the expr:concatIf() function ensures that things work nicely if there is no referring practice since the whole expression becomes null if one component is null.

To get the appointment start time (in 24hour format) for this task, do:

date:format(openvpms:get(., 'act.objectReference.appointments.source.startTime'), "HH:mm"))


  • the various objectReference properties above aren't supported by the Display Expression editor and hence if you use its Test function, you will get 'Expression Error'
  • when you are testing a new expression, remember that you need to logout and log back in again in order for the new expression to be active
  • if there is no patient, and empty string will be returned
  • The various $patient, $customer, $task etc variables that are available in macro expressions are not available here

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.

Syndicate content