Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Only authenticated and authorized SPECIALIST, ASSISTANT, RECEPTIONIST employees can register prepersons.

  2. Prepersons can be registered in OUTPATIENT and EMERGENCY legal entities.

  3. Prepersons shoul be registered only with predefined set of medical events (package).

  4. Preperson registered w/o entry in MPI. Only as document in patients collection.

  5. 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

  6. Preperson registers as separate record in MPI.prepersons table. On create ID of preperson sholdn’t match with ID of existent person.

  7. Service should return preperson_id.

Authentication

  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:create')

    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)

Generate

...

preperson_id

  1. Generate personpreperson_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 (separate job).

...