Purpose
This WS is designed to resend SMS to a person (with verification_type = OTP) with Medication request info. This could be done only for medication request with intent order
Specification
Logic
API paragraph not found
Preconditions
API paragraph not found
Global and configurable parameters
No
Input parameters
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
id | String | a89f6a26-4221-4597-a1d2-542d5e40b565 |
Filters
No
Request structure
API paragraph not found
Authorize
Verify the validity of access token
Check user scope (scope = 'medication_request:resend') in order to perform this action
In case error - generate 401 response
Headers
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
Validate request
Resend of medication request info is possible only for medication requests with intent order
Get medication request intent
Check that intent == order
Otherwise - return (409, 'For medication request plan information cannot be resent')
Request data validation
Validation status
For info - status charts: Medication_request
Get Medication request status by $.id
Check status == ACTIVE
if invalid - return 409 error (message: "Invalid status Medication request for resend action!")'
Parameters that are used when processing the request
Configuration parameters
API paragraph not found
Dictionaries
API paragraph not found
Processing
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_SIGN_MEDICATION_REQUEST".
Sending SMS for MPI via service.
Response structure
See on Apiary
Example:
Post-processing processes
No
HTTP status codes
HTTP status code | Message | What caused the error |
---|---|---|
200 | Response |
|
401 | Unauthorized Error |
|
409 | Error |
Backward compatibility
API paragraph not found