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

This is an old revision of the document!


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

These calculations use dates from multiple sources:

- an answer from a survey - an appointment linked to the track - another round in the track - from the track itself - 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 from 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 be of 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 “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.

A track also has an end date that can be entered manually (and in that case it will remain fixed) but is otherwise calculated from the tokens themselves. The calculation is rather complicated.

Track end date calculation
  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

Manual input

userzone/userdoc/dates.1394127000.txt.gz · Last modified: 2020/03/12 12:08 (external edit)