Table of Contents |
---|
Purpose
This procedure (automatic schedule task) is designed to deactivate Program medications after end date ends.
Specification
Page Properties | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Link | automatic schedule task | Посилання на Apiary або Swagger | ||||||||||||||||
Resource | automatic schedule task | Посилання на ресурс, наприклад: /api/persons/create | Scope | no | Scope для доступу||||||||||||||
|
Logic
Fetch records from PRM.program_medications, where:
is_active = TRUE
end_date < current_date()
Update all records to:
is_active = FALSE
updated_at = now()
updated_by = SYSTEM_USER
Write changes to audit log
Write changes to event manager
...