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

Merge Party and MPI

ERD

Migration open questions

  1. Fields which are mandatory for Employee and optional or not present for Persons
    1. tax_id (optional)
    2. no_tax_id (not present) - by default false 
    3. email (optional) - >=3 emails: mpi (optional), doctor (required), employee (required)
    4. phones (optional) - >=3 phones: mpi (optional), doctor (required), employee (required)
  2. Fields which are mandatory for Persons and optional or not present for Employee
    1. birth_country (not present) - required, N/A
    2. birth_settlement (not present) - required, N/A
    3. secret (not present) - optional, by default N/A, collect via cabinet 
    4. addresses (not present) - empty for doctors, fix na get for dictionaries or foreign keys, return empty objects
    5. authentication_methods (not present) - by default offline
    6. emergency_contact (not present) - empty object - {}
    7. patient_signed (not present) - false by default 
    8. process_disclosure_data_consent (not present) - by default true, find evidence, add it to employee request for the future
  3. New field:
    1. preferred_way_communication - do not use 

Data structures

PERSONS

NameTypeM/ODescription and constraints
iduuidM
last_namevarcharM
first_namevarcharM
second_namevarcharO
birth_datedateM
birth_countryvarcharMM for person/O for employee
birth_settlementvarcharMM for person/O for employee
gender
M
email
OM for employee
tax_id
OM for employee
no_tax_id
OM for employee
death_date
O
is_active
M
documents
M
addresses
MM for person/O for employee
phones
OM for person/O for employee
secret
OM for person/O for employee
emergency_contact
M
confidant_person
O
patient_signed
M
process_disclosure_data_consent
M
authentication_methods
MM for persons
preferred_way_communication
M

DOCTOR_PROFILES

NameTypeM/ODescription and constraints
iduuidM
person_iduuidO
educationsjsonb[]M
qualificationsjsonb[]O
specialitiesjsonb[]M
science_degreejsonbO
phonesjsonb[]?M
addressesjsonb[]?M
start_datedateM
working_experiencestringO

EMPLOYEES

NameTypeM/ODescription and constraints
iduuidM
person_iduuidO
positionvarcharM
statusvarcharM
employee_typevarcharM
is_activebooleanM
start_datetimestampM
end_datetimestampO
legal_entity_iduuidM
division_iduuidO
status_reasonvarcharO

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