...
Extract client_id from token (token.client_id == legal_entity_id)
Check legal entity status (status = ACTIVE, SUSPENDED)
In case of error - return 409 (Legal entity must be ACTIVE or SUSPENDED)
Validate request
Validate request using schema (TBD)
...
Required set of medical events (TBD)
Validate external_id
Check external_id is not empty.
In case of error - return 422 (external_id should not be empty)
...
Save object to DB
Insert preperson to MPI
persons table
Parameter | Source | Description |
---|---|---|
id | string | Autogenerated. |
status | string | Status. By default is “active” |
external_id | Request: external_id | Identifier from external system. Required |
preperson | bool | Mark that entry belongs to preperson, required. Set true. |
is_active | bool | Technical flag. By default is true. |
inserted_by | uuid | Extract user from token |
inserted_at | timestamp | Get current date-time |
updated_by | uuid | Extract user from token |
updated_at | timestamp | Get current date-time |
...