Status
- Specification SPECS
- Apiary SPECS
Purpose
This procedure is designed to expire previously created Request for Medication request after ended time-life in ACTIVE status.
Procedure logic for transition
- For info - status charts: Medication_request
Get list Medication request
SELECT * FROM medication_request MR WHERE MR.status == ACTIVE AND RM.ended_at <= current_date()
- Update (Set values) Request for Medication request
- status = STOPPED
- updated_by = user_id
- updated_at = timestamp