...
...
Purpose
This procedure is designed to expire previously created Request for Medication request after ended time-life in NEW ACTIVE status.
Procedure logic for transition
- For info - status charts: Request_forMedication_medication_request
Get list Request for Medication request
RMRSELECT * FROM requests_for_medication_request
WHERE
NEWRMR WHERE RMR.status ==
AND
NEW AND RMR.expiry_to <= current_date()
- Update (Set values) Request for Medication request
- status = EXPIRED STOPPED
- updated_by = user_id
- updated_at = timestamp