Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

Name

Description

Format

Default value

MEDICAL_PROGRAM_PARTICIPANTS_DEACTIVATION_SCHEDULE

How often to perform this task

Cron Format

0 0 * * *

PROGRAM_DEVICES_DEACTIVATION_SCHEDULE

Schedule for deactivating ended program devices

Cron Format

0 0 * * *

Job logic

  1. Deactivate program medications:

    1. Fetch records from PRM.program_medications, where:

      1. is_active = TRUE

      2. end_date < current_date()

    2. Update all records to:

      1. is_active = FALSE

      2. medication_request_allowed = FALSE

      3. care_plan_activity_allowed = FALSE

      4. updated_at = now()

      5. updated_by = SYSTEM_USER

    3. Write changes to audit log

    4. Write changes to event manager

  2. Deactivate program devices:

    1. Fetch records from PRM.program_devices, where:

      1. is_active = TRUE

      2. end_date < current_date()

    2. Update all records to:

      1. is_active = FALSE

      2. device_request_allowed = FALSE

      3. care_plan_activity_allowed = FALSE

      4. updated_at = now()

      5. updated_by = SYSTEM_USER

    3. Write changes to audit log

    4. Write changes to event manager