Table of Contents |
---|
This procedure job is designed to expire previously created Request for Medication request after ended time-life in ACTIVE status.Medication requests. All active medication requests where dispense_valid_to in the past must be expired
Process configuration
Parameter | Description | Value |
---|---|---|
MEDICATION_REQUEST_AUTOTERMINATION_SCHEDULE | (Cron Format) How often to perform termination | `* * * * *` |
...
- For info - status charts: Medication_request
Get list Medication request
Code Block language sql SELECT * FROM medication_requests MR WHERE MR.status == ACTIVE AND MR.endeddispense_valid_atto <= current_date()
- Update (Set values) Medication request
- status = EXPIRED
- updated_by = SYSTEM_USER
- updated_at = timestamp
- Write changes to audit log
- Write changes to event manager