Table of Contents |
---|
...
This WS allows linking medical data of an unidentified person to a person in eHealth. Thus it helps a person who was unidentified during some period to store all its medical history.
Specification
Page Properties | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||
|
Logic
Only authenticated and authorized SPECIALIST, ASSISTANT or RECEPTIONIST employees can merge prepersons with prepersons.
Prepersons can be merged in EMERGENCY or OUTPATIENT legal entities.
Employee can merge any active preperson to any active person.
To merge person with preperson only their MPI ids needed.
Change status should be logged in the Event manager.
Dictionaries
AUTHENTICATION_METHOD
DOCUMENT_TYPE
Request structure
Example:
...
Verify the validity of access token
Return 401 in case validation fails
Check user scopes in order to perform this action (scope = 'merge_request:write')
Return 403 in case invalid scope(s)
Headers
Наприклад:
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9api{{access_token}}
Api-key:uXhEczJ56adsfh3Ri9SUkc4en{{secret}}
Request data validation
Validate request
...
If type is OTP or THIRD_PERSON - Generate verification code as on create patient request process.
If type is OFFLINE - Generate uploaded URLs as on create patient request process. Set il.merge_requests.documents
In case no auth methods found (null) - return error with code 409 (Person has no auth methods)
Processing
Save object to DB
il.merge_requeststable
Parameter | Source | Description |
---|---|---|
id | uuid | Autogenerated |
data | jsonb | Contains data for signed_content in json format. At this step is null. Optional field |
master_person_id | Request: master_person_id | Person identifier in MPI (mpi.persons.id). Required |
merge_person_id | Request: merge_person_id | Preperson identifier that corresponds to MPI.prepersons.id (returned on create preperson). Required |
status | string | Status of the request, required. Set NEW |
merged_pair_id | uuid | Reference to mpi.merged_pairs table when person becomes merged with preperson (on sign). By default is null. |
printout_form | text | Printout form of preperson merge request in html format. By default is null at this step |
legal_entity_id | Request: client_id | Legal entity where request was created. Client_id extracted from token. Required |
documents | jsonb | urls of the person`s documents if chosen authentication method is OFFLINE |
authentication_method_current | jsonb | Person current authentication method. |
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 |
...
Page Properties | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||
|