Versions Compared

Key

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

...

Page Properties
idAPI_Specification

Link

https://ehealthmisapi1.docs.apiary.io/#reference/public.-medical-service-provider-integration-layer/divisions/update-division

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

Resource

/api/divisions/{{id}}

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

Scope

division:write

Scope для доступу

Components

Divisions

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

Microservices

il/api

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

Protocol type

REST

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

Request type

PATCH

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

Sync/Async

Sync

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

Public/Private/Internal

Public

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

Logic

  1. Only authenticated and authorized user of this legal entity with appropriate scope can update division.

  2. Division can be updated for RESIDENCE, REGISTRATION addresses types.

  3. Division can be updated for legal entities in ACTIVE or SUSPENDED statuses.

  4. Editable information on division:

    • name

    • addresses

    • phones

    • email

    •  add the gps-coordinates attributed to the division (location)

    • working hours

...

  1. Check that type exists in dictionaries. Type required  (DRUGSTORE,DRUGSTORE2,CLINIC,AMBULANT_CLINIC,FAP)

    1. in case error generate 422 response

  2. Check mapping of legal_entity_type and division type. 

    1. in case error generate 422 response

Processing

...

  1. Verify the validity of access token

  2. Check user scope (scope = 'division:write') in order to perform this action

    1. In case error generate 401 response

  3. If BLOCK_UNVERIFIED_PARTY_USERS is true, then check party's data match following condition: verification_status != NOT_VERIFIED or (verification_status = NOT_VERIFIED and updated_at > current_date - UNVERIFIED_PARTY_PERIOD_DAYS_ALLOWED):

    1. in case not match - return 403 ("Access denied. Party is not verified")

Response structure

Example:

...