Table of Contents |
---|
...
Return object with response structure from WS Sign Medication Request.
Calculate medication remaining quantity:
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
Return medication_remaining_qty in the response