Versions Compared

Key

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

/wiki/spaces/EN/pages/17591304241 (remove the link block before publishing the document)

...

Document type

Метод REST API

Document title

[DRAFT] [NEW] Get Episode details in Composition context [API-007-011-001-0481]

Guideline ID

GUI-0011

Author

@Mariana Veremeieva (UA SoE eHealth)

Document version

1

Document status

DRAFT

Date of creation

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

Date of update

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

Method API ID

API-007-011-001-0481

Microservices (namespace)

ME

Component

Compositions_ME

Component ID

COM-007-011

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

https://ehealthmedicalevents991v11.docs.apiary.io/#reference/medical-events/composition/get-episode-details-in-composition-context

Resource

{{host}}//api.ehealth.gov.ua/api/patients/patient_id/compositions/id/episodes/episode_id

Scope

composition:read

Protocol type

REST

Request type

GET

Sync/Async

Async

Public/Private

Public

...

Request structure

See on API-specification

...

titleExample

...

Headers

Headers

Request data validation

...

  • 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 and client scopes in order to perform this action (scope = 'composition:read')

    • return 403 “Your scope does not allow to access this resource. Missing allowances: composition:read” in case of invalid scope(s)

  • Access to the resource is also managed by ABAC module

Validate Patient

  • Get Patient identifier from the URL

  • Check it exists in DB

    • Return 404 ('not found') in case of error

...