This is an old revision of the document!
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.
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.
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.
You can automate linking appointments to appointment fields by creating Agenda filters in Setup ⇒ Agenda ⇒ Agenda filters. There exist multiple filter types, including types that combine other filters using logical operations such as AND and OR.
Multiple fields can share the same filter. Appointment fields are filled using the field order to calculate each field in order where every next linked appointment must occur after the previous appointment.
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 not treated in this manner is the first appointment. Once it assigned (e.g. using automatic track creation) it will keep it position. The only exception is when that appointment is cancelled or aborted. Then it becomes effectively empty and the first checkup appointment that occurs is later or equal to 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 not be assigned to the track, unless the appointment in two months is cancelled.
The reason for this behaviour