Versions Compared

Key

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

Specification 

...

According to requirements:

  • User can see all Medication Requests of which he is an author

  • User of MSP, PRIMARY_CARE, OUTPATIENT (DOCTOR, SPECIALIST, etc) can see all Medication request for which he is the a doctor (employee_id)requests from the user's legal entity

  • User of MSP, PRIMARY_CARE (DOCTOR, etc) can see all the Medication requests of the patients whom he has an active declaration with by yourself a doctor (employee_id)

  • User of PHARMACY can see all Medication request requests (without limitations)

  • User of MSP, PRIMARY_CARE, OUTPATIENT (DOCTOR, SPECIALIST, etc) can see all Medication request based requests based on the approval of the care plan that is contained in the Medication request

...

  1. Return object with response structure from WS Sign Medication Request.

  2. Calculate medication remaining quantity:

    1. Select all Medication Dispenses in status PROCESSED ACTIVE related to the Medication Request

      Sum medication_qty in the filtered Medication Dispenses as dispensed_qty

      Calculate medication_remaining_qty = medication_qty - dispensed_qty

  3. Return medication_remaining_qty in the response