Table of Contents | ||||
---|---|---|---|---|
|
Purpose
...
This method allows to create Care Plan for a person in eHealth.
Specification
...
Page Properties | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Logic
...
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.
...
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
patient_id | String | MPI identifier of the person |
|
Request structure
...
See on Apiary
Example:
Expand | ||
---|---|---|
| ||
|
Authorize
...
Verify the validity of access token
in case of error - return 401 (“Invalid access token”) in case of validation fails
Verify that token is not expired
in case of error - return 401 (“Invalid access token”)
Check user scopes in order to perform this action (scope = 'care_plan:write')
return 403 (“Your scope does not allow to access this resource. Missing allowances: care_plan:write”) in case of invalid scope(s)
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
Request data validation
...
Validate request
Validate encoded and decoded request using schema. Return 422 with the list of validation errors in case validation fails.
...
If $.auth_method_id is specified
Check authentication method:
is exist in MPI.person_authentication_method
is belong to patient (MPI.person_authentication_method.person_id = $.patient_id)
is active (MPI.person_authentication_method.ended_at > now() and MPI.person_authentication_method.is_active = true)
in case of any validations fails generate error: 422, "Authentication method doesn't exist, is inactive or does not belong to this person"
If Create Care Plan doesn't have this field, then choose that method which is returned from mpi as
Processing
...
Generate requisition
Generate requisition number (see Human readable requisition number) based on the care plan id
Set care plan attribute $.requisition
...
If field inform_with specified then send SMS to that patient with requisition number according to the specified communication channel.
Response structure
...
See on Apiary
Example:
Expand | ||
---|---|---|
| ||
|
Expand | ||
---|---|---|
| ||
|
Post-processing processes
...
API paragraph not found
HTTP status codes
...
Page Properties | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
...