Purpose
This WS allows to get details about unidentified person from eHealth.
Specification
Service logic
Only authenticated and authorized OWNER, SPECIALIST, ASSISTANT, RECEPTIONIST, ADMIN employees can get preperson.
Preperson could be got only in OUTPATIENT or EMERGENCY legal entity type, if MPI identifier of preperson is being known (returns after Create preperson).
Only patient collection fields can be recieved.
Authentication
Verify the validity of access token
Return 401 in case validation fails
Check user scopes in order to perform this action (scope = 'preperson:read')
Return 403 in case invalid scope(s)
Validate person_id
Check person_id does not exist in mpi.persons
In case error - return 422 (Person_id doesn’t belong to unidentified person)
Generate patient_id from person_id. Check if patient_id exists in patients collection.
In case of error - return 404
Prepare response
Render response