ЕСОЗ - публічна документація

(RC-01 FORBIDDEN) Approval jobs

Process configuration

Name

Description

Format

Default value

Name

Description

Format

Default value

APPROVALS_CLEANUP_SCHEDULE

How often to perform this task

Cron Format

`20 * * *`

APPROVAL_AUTOEXPIRATION_SCHEDULE

How often to perform this task

Cron Format

`20 * * *`

APPROVAL_TTL_HOURS

Approval lifetime period

Hours

12

APPROVAL_EXPIRATION

Approval duration period for other (episode, diagnostic report etc. except care plan) resources

Minutes

129600

CARE_PLAN_APPROVAL_EXPIRATION

Approval duration period for care_plan resources

Minutes

525600

FORBIDDEN_GROUP_APPROVAL_EXPIRATION

Approval duration period for forbidden_group resources

Minutes

525600

APPROVALS_CLEANUP_SCHEDULE

Job logic

  1. Search candidates

    1. Get all approvals where inserted_at < utc_now() - APPROVAL_TTL_HOURS and status is new

  1. Delete approvals

APPROVAL_AUTOEXPIRATION_SCHEDULE

Job logic

  1. Search candidates

    1. Get all approvals where expires_at is in the past and status is active

  2. Update approvals

    1. Set status for all candidates to expired

      1. updated_at = now()

      2. updated_by = SYSTEM_USER

ЕСОЗ - публічна документація