Change reminder item date behaviour

Description

Reminder items generated via the Patient Reminder Queue Job have two dates:

  • Send Date:

    • indicates when the reminder should be sent, when the status is PENDING

    • updated with the actual date on successful send or completion

  • Due Date - indicates the first due date of the reminder

In practice, this has proved to be confusing:

  • changing the Send Date to the actual date sent means that there is no record when reminder was queued. If the original and actual send dates are very different, it is difficult to reconcile with the due dates

  • duplicating the first due date from the reminder is not as helpful as knowing what the due date was for a particular reminder count. This is because the Send Date is derived from the Next Due Date, minus the lead-time for the delivery type

To improve this:

  • Send Date will be set to the date when the reminder should be sent, and NOT change on completion

  • Due Date will indicate the due date for the reminder count

  • a new field, Processed Date, will be added to indicate when the reminder was actually sent, or cancelled

This will require migration:

  • copy startTime -> processedDate for COMPLETED and CANCELLED reminder items

  • calculate startTime (Send Date) for COMPLETED and CANCELLED reminder items

  • calculate endTime (Due Date) for all reminder items, based on reminder count

Environment

None

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Components

Fix versions

Affects versions

Priority

Minor
Configure