...
...
...
...
...
...
Table of Contents |
---|
Page Properties | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Purpose
This procedure (Automatic schedule task) is designed to expire previously created Medication request Request after lifetime ends in status='NEW'.
Process configuration
Parameter | Description | Value |
---|---|---|
MEDICATION_REQUEST_REQUEST_SCHEDULE | (Cron Format) How often to perform termination | `* * * * *` |
Procedure logic for transition
- For info - status charts: Medication request Request Status Chart
Get list of Medication requestsrequest Requests
Code Block language sql SELECT * FROM medication_request_requests RMR WHERE RMR.status == NEW AND RMR.expired_at <= current_date()
- Update (Set values) Medication request Request
- status = EXPIRED
- updated_by = user SYSTEM_idUSER
- updated_at = timestamp