/
Auto termination of preperson

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

Auto termination of preperson

Purpose

Automatically deactivate prepersons to prevent fraud if they doesn’t have appropriate set of medical events.

Job logic

  1. Job starts once according configured parameter PREPERSON_DEACTIVATION_SCHEDULE.

  2. After starting it gets value from config DAYS_FOR_PREPERSON_VERIFICATION.

  3. Select all entries from mpi.prepersons with status=active and verified is false:

    1. if preperson has Observation.codes = height and weight and sex and Observation.status = valid:

      • set verified = true

      • set updated_at = current_datetime()

      • set updated_by = system_user()

    2. else if preperson has no required set of medical events:

      1. if inseted_at < current_date() - DAYS_FOR_PREPERSON_VERIFICATION

        • set status = inactive

        • set updated_at = current_datetime()

        • set updated_by = system_user()

      2. else if inserted_at >= current_date() - DAYS_FOR_PREPERSON_VERIFICATION, then skip the preperson.

Related content

Variables
Variables
Read with this
[AUTO] Terminate Medical program provision_EN
[AUTO] Terminate Medical program provision_EN
More like this
Update Person verification status
Update Person verification status
Read with this
Online verification of Persons with DRACS death acts registry_EN
Online verification of Persons with DRACS death acts registry_EN
More like this
Create declaration request v3
Create declaration request v3
Read with this
[AUTO] Terminate Person requests
[AUTO] Terminate Person requests
More like this

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