...
Only authenticated and authorized SPECIALIST, ASSISTANT, RECEPTIONIST employees can register prepersons.
Prepersons can be registered in OUTPATIENT and EMERGENCY legal entities.
Prepersons shoul be registered only with predefined set of medical events (package).
Preperson registered w/o entry in MPI. Only as document in patients collection.
Service should generate patient_id in MongoDB, but return person_id (w/o creating entry in MPI)external_id as a required field. Other are optional
Preperson registers as separate record in MPI.prepersons table. On create ID of preperson sholdn’t match with ID of existent person.
Service should return preperson_id.
Authentication
Verify the validity of access token
Return 401 in case validation fails
Check user scopes in order to perform this action (scope = 'preperson:create')
Return 403 in case invalid scope(s)
...
Check external_id is not empty.
In case of error - return 422 (external_id should not be empty)
Generate
...
preperson_id
Generate personpreperson_id (will be returned in response). Ensure there is no such person_id in MPI.persons
Generate patient_id to save it in patients collection (separate job).
...