Versions Compared

Key

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

Purpose

This WS allows to get details about unidentified person from eHealth.

Specification

TBD

Service logic

  1. Only authenticated and authorized OWNER, SPECIALIST, ASSISTANT, RECEPTIONIST, DOCTOR, ADMIN employees can get preperson.

  2. Preperson could be got by any legal entity type except PHARMACY, if person_id is being known (returns after Create preperson).

  3. Only patient collection fields can be recieved.

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

    1. Return 403 in case invalid scope(s)

Validate person_id

  1. Check person_id does not exist in mpi.persons

    1. In case error - return 422 (Person_id doesn’t belong to unidentified person)

  2. Generate patient_id from person_id. Check if patient_id exists in patients collection.

    1. In case of error - return 404

Prepare response

Render response