...

  1. Check there is no entry in MPI.persons with this person_id

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

  2. Convert person_id into patient_id. Check patient_id exists in medical_data.patients collection

    1. In case error - 404

  3. Check preperson has status=active

    1. In case error - return 422 (Unidentified person Preperson is not active)

Validate external_id

...