Purpose
This procedure is designed to expire previously created Request for Medication request after ended time-life in NEW status.
Procedure logic for transition
- For info - status charts: Request_for_medication_request
- Get Request for Medication request status by $.id
- Check status == NEW
- if invalid - return 403 error (message: "Invalid status Request for Medication request for reject transition!")'
- Update (Set values) Request for Medication request
- status = REJECTED
- updated_by = user_id
- updated_at = timestamp