Versions Compared

Key

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

...

Schemas:

legalEntities.graphql

legalEntityMergeJobs.graphql

Table of Contents

Purpose

This WS is design to create relationship for reorganized legal entities by NHS admin using DS. Before the request is created new LE must be created (in case if needed) and employee from old legal entity must be registered in the new one.  After that NHS admin must set relationship via signed content. After basic validation

I

...

Specification

Schemas:

legalEntities.graphql

legalEntityMergeJobs.graphql

Page Properties
idAPI_Specification

Link

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

Resource

Посилання на ресурс, наприклад: /api/persons/create

Scope

Scope для доступу

Components

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

Microservices

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

Protocol type

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

Request type

Тип запиту API, наприклад: GET, POST, PATCH…

Sync/Async

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

Public/Private/Internal

Потрібно зазначити тип методу за ступенем доступності

Logic

API paragraph not found

Input parameters

Input is signed data in PKCS7 format. The data must be unpacked and validated using Json Schema.

Fields to sign:

field

type

Input parameter

Values

Type

Description

Example

merged_from_legal_entity

id

uuid

required

name

string

required

edrpou

string

required

merged_to_legal_entity

id

id

required

name

string

required

edrpou

string

required

reason

sring

required

Request structure

API paragraph not found

Authorize

    1. Verify the validity of access token

      1. in case of error return 401 ('Access denied')

    2. Check user scope legal_entity:merge in order to perform this action

      1. in case of error generate 401 response ('Invalid scopes')

Headers

API paragraph not found

Request data validation

Validate Digital signature

Decode content that is encrypted in an electronic digital signature.
Use Digital signature WS. Method checks digital signature and returns result.

...

merged_from

merged_to

MSP

PRIMARY_CARE, MSP

MSP_PHARMACY

MSP_PHARMACY

PHARMACY

PHARMACY

PRIMARY_CARE

PRIMARY_CARE, MSP

OUTPATIENT

OUTPATIENT

EMERGENCY

EMERGENCY

Response

...

Processing

Create job 

Async job must be created and started (scope to get job - legal_entity_merge_job:read)

...

field

value

id

generate id

merged_from_id

$merged_from.id

merged_to_id

$merged_to.id

is_active

true

reason

$reason

inserted_at

now()

inserted_by

$user_id

Response structure

In response can be received validation error or the job will be started.

Post-processing processes

API paragraph not found

HTTP status codes

API paragraph not found