Function Dispo Chronological()
Function Dispo_Chronological checks that the times in Category:2016 Time and Place changes are in a sensible chronological order.
The check will run each time one of the times is edited, and will generate an error if:
- Visit Admit DtTm field - no checks since taken direct from EPR
- if previous location = ER then
- Accept DtTm - error if >Transfer Ready DtTm or >Dispo DtTm
- Arrive DtTm - error if >Transfer Ready DtTm or >Dispo DtTm
- Dispo DtTm - error if in future (don't need to check for others because they need to be before this) and all other errors are taken care off by other pair checks above.
- Panelling or Discharge Planning - if Primary Admit Diagnosis is panelling then Arrive DtTm and Transfer Ready DtTm must be same
Transfer time rule
Will want to reconcile Transfer time rule