Table of Contents | ||||
---|---|---|---|---|
|
Required parameters are marked with "*"
Якщо інформації по відповідному параметру немає, потрібно зазначити: “APIparagraph not found”.
Purpose*
This method allows to create Care Plan for a person in eHealth.
...
Specification*
Page Properties | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
This method allows to create Care Plan for a person in eHealth. 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). Service will store signed copy of Care Plan in Media Content Storage if all checks is passed.
Key points
Only authenticated and authorized DOCTOR or SPECIALIST with appropriate speciality pointed in config can create a Care plan.
Care plan can be created from MSP, PRIMARY_CARE or OUTPATIENT legal entity.
Care plan can be created for persons and prepersons.
Care plan should be signed with DS.
Care plan creates in async way as all MEs.
Activities are added to a Care plan using Create Care Plan activity method. Thus, Care plan is being initially created without activities.
Input parameters
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
patient_id | String | MPI identifier of the person |
|
...
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
...
Note: requisition number should be unique for each care plan and should not match with number of another entities.
Service logic
Save signed content to media storage
Save data to care_plans collection in DB according to https://e-health-ua.atlassian.net/wiki/spaces/EH/pages/2125038856
Save link from media storage to the $.signed_content_links field in care plans collection
Create job and return it’s id.
Send SMS notification
If patient not a preperson and his default authentication method determined by Determination of a default authentication method and return person's active auth_methods is OTP or third_person.OTP, send SMS to that patient with requisition number.
...