...
...
Table of Contents |
---|
Page Properties | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Purpose
This procedure is designed to expire previously created Request for Medication request after ended time-life in ACTIVE status.
Process configuration
Parameter | Description | Value |
---|---|---|
MEDICATION_REQUEST_SCHEDULE | (Cron Format) How often to perform termination | `* * * * *` |
Procedure logic for transition
- For info - status charts: Medication_request
Get list Medication request
Code Block language sql SELECT * FROM medication_requestrequests MR WHERE MR.status == ACTIVE AND RMMR.ended_at <= current_date()
- Update (Set values) Request for Medication request
- status = STOPPEDEXPIRED
- updated_by = userSYSTEM_idUSER
- updated_at = timestamp