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:dates

Dates & Tracks

A track defines a sequence of surveys and calculates the period from valid from to valid until when a certain survey should be answered by or for a certain patient.

These calculations use dates from multiple sources:

  1. an answer from a survey
  2. an appointment linked to the track
  3. another round in the track
  4. from the track itself
  5. manual input

Using the Next Step engine you can only use the previous round in the track and answers from that previous round. This speeds up track editing and track calculation and simplifies the structure.

More complex dependencies are possible using the Previous Step engine, where you can use a date from any of the previous rounds for the valid from date and any of the rounds - either later or earlier - for the valid until date. As this is a more complex version of the Next Step engine you can always upgrade to the Previous Step engine, but nor revert back from it.

In both engines the valid from date of the first round cannot be dependent on a previous round, so the date should either be calculated from an appointment or from a track level date.

After selecting a date to use you can specify a number of Minutes, Hours, Days, Weeks, Months, Quarters or Years to add to the date. You can of course add nothing, but if you specify a number, the the specified number of units is added or subtracted from the date. Adding day and higher units to valid from dates always results in a time starting at midnight of that day. Adding days to valid until dates results in a date that ends one second before midnight of that day. When using hours or minutes the exact time is used.

An answer from a survey

Every survey has a completion date that can be used for a calculation, but some surveys also have date questions. If those exist, you can use their answers as a source for another date.

An appointment linked to the track

A track can have fields and fields can have the type appointment. If a track has an appointment field you can use the admission time of the appointment as a source for a calculation.

To use an appointment you need to link one to each track assigned to a patient. This can be done by hand using the patients “Edit track” screen, but some installations use automatic systems to link the appointments to the tracks.

When an appointment is linked or when the date of the appointment changes, then the track is recalculated using the new date.

When the status of a linked appointment is inactive, then the appointment remains linked to the track, but the date used for the calculation disappears and the calculated date will become undetermined.

Another round in the track

While an answer to a survey only exists after that survey has been answered, you can also use the valid from or valid until date from another round. Of course you can also use the completion date of that round, but that is the same date as the completion date in an answer to the survey.

From the track itself

Each track has a manually edited start date, that defaults to the date the track was created.

Track end date calculation

A track also has an end date that can be entered manually but is otherwise calculated from the tokens themselves.

When the end date for a track has been entered manually the date will no longer be changed by manual recalculation, but until then the end date is recalculated every time the track changes or a survey has been answered.

  1. When all rounds have been answered, the end date is the date the last round was answered
  2. When some rounds have been answered and all unanswered round have a valid until date, those valid until dates are used instead of the completion date
  3. When a round uses the track end date to calculate the valid until date, then that round is ignored for the calculation of the end date
  4. A round is also ignored if the valid from is calculated using the end date and the valid until date is calculated using the valid from date
  5. If you use more complex dependencies, e.g. using a previous round that uses the end date, then the end date will never be calculated
  6. When no end date can be calculated, the date will remain empty
Track date fields

A track has not just appointment fields, but also simple date fields. When you add a date field to a track you can use it to calculate another date.

Field dates are entered manually using the patients “Edit track” screen.

Manual input

When you enter a date manually it remains fixed. Whether you edit a date for a single token or the end date of the track: the systems notices when you change the date and from then on leaves it as it is. If you use the edit screen for a date but do not change the date - but e.g. change a comment or a track field - then the dates in question remain calculated by GemsTracker.

Every valid from date requires a calculation, but some older GemsTracker projects allow tracks to specifiy rounds without a calculated valid until date. In that case the valid until date will have to be entered manually when the survey is not answered. In reality this never happens, so it is better to specify an end date using a very long period. Therefore entering a valid until date calculation is required by default, but this can be changed for a specific project.

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