Table of Contents |
---|
...
Name | Description | Format | Default value |
---|---|---|---|
MEDICAL_PROGRAM_PARTICIPANTS_DEACTIVATION_SCHEDULE | How often to perform this task | Cron Format |
|
PROGRAM_DEVICES_DEACTIVATION_SCHEDULE | Schedule for deactivating ended program devices | Cron Format |
|
Job logic
Deactivate program medications:
Fetch records from PRM.program_medications, where:
is_active = TRUE
end_date < current_date()
Update all records to:
is_active = FALSE
medication_request_allowed = FALSE
care_plan_activity_allowed = FALSE
updated_at = now()
updated_by = SYSTEM_USER
Write changes to audit log
Write changes to event manager
Deactivate program devices:
Fetch records from PRM.program_devices, where:
is_active = TRUE
end_date < current_date()
Update all records to:
is_active = FALSE
device_request_allowed = FALSE
care_plan_activity_allowed = FALSE
updated_at = now()
updated_by = SYSTEM_USER
Write changes to audit log
Write changes to event manager