GemsTracker

GEneric Medical Survey Tracker

User Tools

Site Tools


Sidebar

Quick Links

Main site / download

API Docs
Bug tracker
Demo site
GitHub

Index

userzone:userdoc:tracks:appointments

Appointments and tracks

Appointments can be linked to tracks using track fields of the appointment type.

Once you have added an appointment field, you can use them to calculated round dates and other fields. Also after you have defines the appropriate Agenda filters you can have appointments linked automatically to appointment fields and even have tracks created automatically.

Whenever an appointment is changed or track fields are saved these changes propagate automatically.

Using appointments in rounds

When defining rounds you can choose to calculate a date using an appointment field as soon as you have defined the field. Then whenever the date of an appointment changes, the track is recalculated.

If an appointment is aborted or cancelled then the appointment remains linked to the field, but as the date is no longer valid all dates calculated using this field will be removed.

Using appointments for other fields

The location and caretaker fields can be calculated using appointments. In the field definition you can check which appointment fields to use for to calculate the value. If you specify multiple fields then the calculation always uses the last appointment field that has a valid appointment.

Automatic assignment of appointments

You can automate linking appointments to appointment fields by creating Agenda filters in Setup ⇒ Agenda ⇒ Agenda filters. There are multiple filter types, including types that combine other filters using logical operations such as AND and OR.

Multiple appointment fields can share the same filter. Appointments are linked using the field order to calculate each field in order where every next linked appointment must occur either after (= default) or before the previous appointment - as determined by the link ascending field when editing track fields in the track builder.

As an example: if you have two checkup fields that are linked using a 'checkup' activity filter then the first checkup appointment for that patient that is later or equal to the track start date is assigned to the first field only and not to the second as it is not later than itself. When a second checkup appointment is created that is later than the first it assigned to the second field.

When there are three checkup fields and the first two filled and a third appointment is created that is later then the second appointment then it saved in the third field the moment the appointment itself is created and the track is recalculated.

When the third appointment occurs between the first and the second appointment then it will be saved in the second appointment field, while the previous second appointment will be saved in the third field. (If there is no third field then that appointment will no longer be linked to the track.)

The only appointment that treated slightly differently is the first appointment as this will compare to the track start date (by default the same as the creation date). It will be assigned the first checkup appointment that occurs either later than or equal to the track start date or before or at the same day as the start date - again as determined by the link ascending field. If the first appointment should occur before the track starts uncheck this field and the most recent appointment before or on the same day as the track start date is used.

So if we have a checkup appointment two months in the future at the first position (with a track start date earlier than today) and another checkup appointment one month in the future, that earlier appointment will be assigned to the track, but if there exist a past checkup appointment from before the track creation it will not be linked, unless the link ascending field is unchecked.

As recalculation occurs after every change the only way to manually assign an appointment earlier than the track start date is a) to use a field without agenda filter or b) by changing the start date,

Automatic track creation

Appointment fields with a agenda filter can also be used to automatically create the track, by setting the create track check box in the track field editor. You can use multiple appointment fields as triggers for tracks but tracks are only created when the following conditions are met:

  1. The appointment must be in the future, not in the past at the moment of save / creation.
  2. No open track of the same type exists for the patient (i.e. a track with unanswered surveys).
  3. If a finished track exists the difference in days between the appointment and the track end date must be at least the number of wait days specified in the track field editor. (Default is 182 days, i.e. about half a year.)

The first rule implies that when e.g. an appointment is imported after it has occurred the track will have to be created by hand.

userzone/userdoc/tracks/appointments.txt · Last modified: 2020/03/12 12:06 (external edit)