...

  1. Only authenticated and authorized SPECIALIST, ASSISTANT, RECEPTIONIST employees can update external_id of preperson.

  2. Preperson can be updated only in OUTPATIENT or EMERGENCY legal entity type, if identifier of preperson is being known (returns after Create preperson).

  3. Only note and status fields can not be updated.

  4. Update allowed for prepersons with status = active.

...

  • Validate external_id according to regexp - 8-10.8-10.1-10 [0-9

  • Validate birth_date - must be <= today()

    • else error 422 "Birth date can't be in the future"Validate death_date < now():

    • In case of error - return 422 - “Death date can not be in future”

  • Validate death_date > = birth_date:

    • else error 422 "Death date should equal or greater than birth_date"

  • If death_date submitted, set mpi.preperson.status = inactive

...

Parameter

Source

Description

external_id

Request: external_id

Identifier from external system. Get from request body

first_name

Request: first_name

 

second_name

Request: second_name

 

last_name

Request: last_name

 

gender

Request: gender

 

birth_date

Request: birth_date 

 If submitted, set status = inactive

emergency_contact

Request: emergency_contact

 

death_date

Request: death_date

note

Request: note

updated_at

timestamp: now()

Get current date-time

updated_by

uuid

Extract user from token