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 addresses.type exists in dictionaries. Addresses type required (RESIDENCE,REGISTRATION)

    1. In case error generate 422 response"value is not allowed in enum"

  2. Check that address exists in Uaddressesaddresses.area exists in Uaddresses.areas

    1. in case error generate 422 "invalid area value"

  3. Check that addresses.settlement exists in Uaddresses.settlements

    1. in case error generate 422 "invalid settlement value"

  4. Check that addresses.settlement_type exists in dictionaries.

    1. in case error generate 422 "value is not allowed in enum"

  5. Check that addresses.settlement_id exists in Uaddresses.settlements

    1. in case error generate 422 "settlement with id = <id> does not exist"

  6. Check that addresses.street_type exists in dictionaries.

    1. In case error generate 422 "value is not allowed in enum"

  7. Check that addresses.zip in "^[0-9]{5}$" format.

    1. In case error generate 422 "string does not match pattern \"^[0-9]{5}$\""

  8. Check mapping legal_entity_type, division_type and address_type and its obligation. See validation rules here: Validation rules on Divisions 

    1. in case error generate 422 response

...