/
[AUTO] Close declaration
ЕСОЗ - публічна документація
[AUTO] Close declaration
Purpose
This procedure (automatic schedule task) is designed to close declaration after end date ends.
Process configuration
Name | Description | Format | Default value |
---|---|---|---|
DECLARATION_AUTOTERMINATION_SCHEDULE | How often to perform this task | Cron Format | “0 0-4 * * * *” |
Job logic
Fetch records from OPS.declarations, where:
is_active = TRUE
status not in [closed, terminated, rejected]
end_date < current_date()
Update all records to:
status = ‘closed’
updated_at = now()
updated_by = SYSTEM_USER
, multiple selections available,
Related content
Terminate declarations by employee or person
Terminate declarations by employee or person
Read with this
[AUTO] Terminate declaration requests
[AUTO] Terminate declaration requests
More like this
[AUTO] Terminate declaration
[AUTO] Terminate declaration
Read with this
[AUTO] Terminate Medication Dispenses
[AUTO] Terminate Medication Dispenses
More like this
Create declaration request v3
Create declaration request v3
Read with this
[AUTO] Deactivate Medications
[AUTO] Deactivate Medications
More like this
ЕСОЗ - публічна документація