Table of Contents |
---|
...
User of MSP, PRIMARY_CARE, OUTPATIENT (DOCTOR, SPECIALIST, etc) can see all Medication request for which he is an author (employee_id)
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 (without limitations)
User of MSP, PRIMARY_CARE, OUTPATIENT (DOCTOR, SPECIALIST, etc) can see all Medication request based on the approval of the care plan that is contained in the Medication request
...
Return object with response structure from WS Sign Medication Request.
Calculate medication remaining quantity:
Select all Medication Dispenses in status 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
Return medication_remaining_qty in the response