Configuration
Process configuration
Parameter | Description | Value |
---|---|---|
MEDICATION_DISPENSE_SCHEDULE | (Cron Format) How often to perform termination | `* * * * *` |
MEDICATION_DISPENSE_EXPIRATION | (Minutes, integer > 0) Medication Dispense lifetime | 10 |
Specification
Search candidates
1. Read MEDICATION_DISPENSE_EXPIRATION parameter value
2. Fetch records from OPS.medication_dispenses, where:
- status = 'NEW'
- inserted_at < now() - MEDICATION_DISPENSE_EXPIRATION
Change status
1. Update status for all records to EXPIRED:
- status = 'EXPIRED'
- updated_at = now()
- updated_by = SYSTEM_USER