Specification
Apiary | |
JSON Schema request | ABSENT |
JSON Schema response | ABSENT |
Purpose
This WS is designed to recall (cancel) previously created and signed Medication request (patch).
Input parameters (filters)
- id
- reason
Authorize
- Verify the validity of access token
- Check user scope (scope = 'medication_request:reject') in order to perform this action
- In case error - generate 401 response
Validation transition
- For info - status charts: Medication_request
- Get Medication request status by $.id
- Check status == ACTIVE
- if invalid - return 403 error (message: "Invalid status Medication request for reject transition!")'
Update status
- Update (Set values) Medication request
- status = REJECTED
- updated_by = user_id
- updated_at = timestamp
Send SMS for person
- Get authentication_method of MPI
- If authentication_method == OTP - send SMS:
- Generate text SMS (call Man method - templates rendering service with template "TEMPLATE_SMS_FOR_REJECT_MEDICATION_REQUEST".
- Sending SMS for MPI via service