Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 1
Table of Contents

...

  1. Invoke Get patient by ID

  2. Validate person_id - mpi_id exists

    • in case invalid return 422 (422 Person not found)

  3. Save temporary variables from: $.data.authentication_methods

  4. Validate Response $.data.is_active==TRUE

    1. if not found - return 422 error (message: "Only for active MPI record can be created medication request!")

  5. Validate person's verification status:

    1. If MRR has based_on with valid activity, then skip this validation.

    2. Else check patient's verification_status is not equal to NOT_VERIFIED.

      1. in case of error return 409, "Patient is not verified"

Validate dates

  1. created_at - similar to assertion date in FHIR -> Actual date medication request being created

  2. inserted_at - date when Medication request was registered in E-Health

  3. started_at/ended_at - Treatment period. Cannot be less than MR expiration period. Defined by doctor.

  4. dispence_valid_from - Used for dispense validation. As for now equals Created at.

  5. dispense_valid_to - Dispense valid from + medication_dispense_period parameter value. Implements dispense expiration period.

...