Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

REST API method / Метод REST API (настанова) (remove the link block before publishing the document)

...

Page Properties
idpage_properties_method_REST API

Document type

Метод REST API

Document title

[Document status] REST API [Назва методу] [ID методу]

Guideline ID

GUI-0011

Author

@

Document version

1

Document status

DRAFT

Date of creation

ХХ.ХХ.ХХХХ (дата фінальної версії документа – RC або PROD)

Date of update

ХХ.ХХ.ХХХХ (дата зміни версії)

Method API ID

API-007-001-002-0229

Microservices (namespace)

ME

Component

Care plan

Component ID

COM-007-001

Link на API-специфікацію

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

Resource

{{host}}/api/patients/{{patient_id}}/care_plans/{{care_plan_id}}/activities/{{id}}/actions/complete

Scope

care_plan:write

Protocol type

REST

Request type

PATCH

Sync/Async

Async(def)/Sync

Public/Private

Public

...

  1. Update activity status to completed (update also updated_at, updated_by)

  2. Set outcome_codeable_concept

Configuration parameters

Description of the configuration parameters that are used when processing a request in the system

Dictionaries

eHealth/care_plan_activity_complete_reasons

...

  1. if activity kind = medication_request:

    1. Check there is no medication request requests in status NEW based on the activity

      1. in case of error - return 409 (Unable to complete activity with new Medication Request requests).

    2. Check there is no medication requests in status ACTIVE based on the activity

      1. in case of error - return 409 (Unable to complete activity with active Medication requests).

  2. if activity kind = service_request:

    1. Check availability of service requests with status = active. If such service requests exist, then needs to check availability of service requests with program_processing_status:

      1. if program_processing_status is undefined (NULL), then return error 409 (Unable to complete activity with Service requests in status <status value> and program processing status is NULL or not completed)

      2. if program_processing_status is defined, then needs to check that program_processing_status = complete. Otherwise, return error 409 (Unable to complete activity with Service requests in status <status value> and program processing status is NULL or not completed)

    2. Check all related service requests in final status: completed, recalled or entered_in_error.

      1. in case at least one is active - return error 409 (Unable to complete activity with Service requests in active status)

Validate outcome

Validate value in the field $.outcome_codeable_concept, required

  1. Validate field type is array of codeable concepts

  2. Validate each value in array:

    1. it refers to the eHealth/care_plan_activity_outcomes dictionary

    2. value within dictionary

      1. in case of error - return 422 ('value is not allowed in enum')

Processing

A list of processes related to receiving, changing or transmitting data according to the logic defined in the REST API

Response structure examples

...

Post-processing processes

Description of actions performed on data after processing

Technical modules where the method is used

List of pages describing technical modules where the method is used

Page Properties Report
headingsID ТМ, Статус
cqllabel = "tr-mis"

...