Versions Compared

Key

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

Purpose

...

Page Properties

Project Name

Електронний рецепт

COVID-certificate

Project abreviation

ePrescription

SVC

Developer

API paragraph not found

Розробник методу API. Наприклад, Edenlab

Project Manager

API paragraph not found

Mykhailo Zhushman (Unlicensed)

Tech Lead

API paragraph not found

Product Owner

API paragraph not found

Yevhen Batura NHSU

Вusiness analyst

API paragraph not found

Taras Khometa (Unlicensed)

Status

Status
colourGreen
titleAPPROVED

Status
colourGreen
titleAPPROVED

Version

API paragraph not found

1.0

Date of release

API paragraph not found

Link

https://uaehealthapi.docs.apiary.io/#reference/public.-reimbursement/medication-request-requests/get-medication-request-request-by-id

Посилання на Apiary або Swagger

Resource

/api/medication_request_requests/{{id}}

Наприклад: /api/persons/create

Scope

medication_request_request:read

Зазначається потрібний scope

Components

ePrescription, Reimbursement

Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription

Microservices

API paragraph not found

Перелік мікросервісів, які використовує метод API. Наприклад: Auth, ABAC

Protocol type

REST

Тип протоколу, який використовується запитом, наприклад: SOAP | REST

Request type

GET

Тип HTTP методу, який використовується запитом, наприклад: POST | GET…

Sync/Async

Sync

Метод є синхронним чи асинхронним?

Logic

Logic WS

  1. Verify the validity of access token.

  2. Check user scopes in order to perform this action (scope = 'medication_request_request:read').

  3. Search Requests for Medication request by id in WS url: 

    Code Block
    SELECT * FROM medication_request_requests 
    	WHERE id=$.id 
    		AND legal_entity_id = $.context.legal_entity_id

     

Logic WS for medication request requests based on care plan

  1. Get party_id  from $.context.user_id

  2. Get list from $.prm.employees for this party_id

  3. Get care_plan_id from $.medication_request_requests.data_based_on_care_plan_id

  4. Check $.approvals for user's employees (granted_to) on care_plan_id (granted_resources) and $.medication_request_requests.person_id (granted_by)

  5. Search Medication request requests by filters: data_based_on_care_plan_id, person_id

    Code Block
    SELECT * FROM medication_request_requests MRR
    WHERE MRR.id = $.id 
    	AND MRR.data_based_on_care_plan_id = $.id
    	AND MRR.person_id = $.id
    	AND MRR.is_active = TRUE

...