Table of Contents |
---|
...
Verify the validity of access token
Return 401 in case validation fails
Check user scopes in order to perform this action (scope = 'preperson:createwrite')
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)
Check external_id is unique ? (unique within le?)
In case of error - return 422 (external_id already exists) ?
Generate person_id
Generate person_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.
...