;Checks whether or not a given document is overdue
PURGE(DA)
; When purge criteria met, document and addenda purged
TSKPARM(TIUDA)
;Calculate a tiu parameter for the nightly task
; TIUDA = 1 then return NIGHTLY TASK START computation
; TIUDA = 2 then return NIGHTLY TASK END computation
OVERX
UPDDCDT(TIUDA)
; If missing DC date & Patient Movement file has DC date,
; DC date updated.
MAIN
; All records are read. DC date updated, Record purged, Alerts are
; generated if appropriate