Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel3

Required parameters are marked with "*"

Якщо інформації по відповідному параметру немає, потрібно зазначити: “APIparagraph not found”.

Purpose*

This method allows to create Care Plan for a person in eHealth.

...

Specification*

Page Properties

Link

https://ehealthmedicaleventsapimedicaleventsmisapi.docs.apiary.io/#reference/care-plan/create-care-plan/create-care-plan

Resource

/api/patients/{{patient_id}}/care_plans

Scope

care_plan:write

Components

Care plan

Microservices

API paragraph not found

Protocol type

REST

Request type

POST

Sync/Async

Async

Public/Private/Internal

Public

...

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

  1. Only authenticated and authorized DOCTOR or SPECIALIST with appropriate speciality pointed in config can create a Care plan.

  2. Care plan can be created from MSP, PRIMARY_CARE or OUTPATIENT legal entity.

  3. Care plan can be created for persons and prepersons.

  4. Care plan should be signed with DS.

  5. Care plan creates in async way as all MEs.

  6. 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

7075e0e2-6b57-47fd-aff7-324806efa7e5

...

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

  1. Save signed content to media storage

  2. Save data to care_plans collection in DB according to https://e-health-ua.atlassian.net/wiki/spaces/EH/pages/2125038856

  3. Save link from media storage to the $.signed_content_links field in care plans collection

  4. 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.

...