Versions Compared

Key

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

...

  1. Check external_id is not empty.

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

  2. Validate according to regexp - 8-10.8-10.1-10 ^[0-9]{8,10}.[0-9]{8,10}.[0-9]{1,10}$

Generate preperson_id

  1. Generate preperson_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).

...