Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

  1. Verify the validity of access token

    1. Return 401 in case validation fails

  2. Check user scopes in order to perform this action (scope = 'preperson:createwrite')

    1. Return 403 in case invalid scope(s)

...

  1. Check external_id is not empty.

    1. In case of error - return 422 (external_id should not be empty)

  2. Check external_id is unique ? (unique within le?)

    1. In case of error - return 422 (external_id already exists) ?

Generate person_id

  1. Generate person_id (will be returned in response). Ensure there is no such person_id in MPI.persons

  2. Generate patient_id to save it in patients collection.

...