Table of Contents | ||||
---|---|---|---|---|
|
Required parameters are marked with "*"
Якщо інформації по відповідному параметру немає, потрібно зазначити: “APIparagraph not found”.
Purpose*
This API allows to cancel Care plan in cases it has been rejected or entered in error.
...
Specification*
Page Properties | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
This method must be used to cancel of existing patient's Care plan. Method receives signed message (pkcs7) that consists of signed content, digital signature and signer public key. All signature fields will be validated (including signer certificate authority)
Important
Signed content of care plan must be equal to care plan stored in DB. See Get Care plan by ID
Activities should not be presented in signed content.
$.status_reason must be added to signed content
Key points
It can be cancelled by author of the Care plan who has an Approval granted by the patient on write Care plan resource
Cancel should be signed with DS. So, all the Care plan data (without activities data) should be submitted.
Status of the Care plan changed in async way. The result of the job should be a link on the Care plan details.
Input parameters
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
patient_id | String | MPI identifier of the patient |
| |
id | String | Care Plan identifier |
|
...
Request to process the request using a token in the headers
Headers*
Наприклад:
Content-Type:application/json
Authorization:Bearer mF_9.B5f-4.1JqM
api-key:aFBLVTZ6Z2dON1V
...
Signed content must match with Care plan in DB in order to be changed
Render Care plan from DB
Exclude $.status_reason from signed content
Compare rendered Care plan and signed content
In case both object doesn't match - return 422 ('Signed content doesn't match with previously created care plan')
Processing*
Service logic
Save signed content to media storage
Update Care plan status (update also updated_at, updated_by)
Set $.status_reason and $.status_history
Response structure*
See on Apiary
...