Versions Compared

Key

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

Purpose

The service is designed to deactivate the medication register. The process uses the Jabba service. Upon execution of the request, a job is created, on the basis of which tasks are created. Each task is one request to create an entity from the register.

...

Page Properties

Link

API paragraph not found

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

Resource

API paragraph not found

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

Scope

medication_registry:write

Scope для доступу

Components

ePrescription

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

Microservices

API paragraph not found

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

Protocol type

API paragraph not found

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

Request type

API paragraph not found

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

Sync/Async

API paragraph not found

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

Logic

  1. Decode base64 file.

  2. Validate input according to schema.

  3. Return job identifier with result.

Preconditions

API paragraph not found

...

API paragraph not found

Request data validation

  1. Check that request using schema

    1. Return 422 with the list of validation errors in case validation fails.

  2. Check that registerType IN ('DEACTIVATE_INNM_REGISTER', ‘DEACTIVATE_INNM_DOSAGE_REGISTER', ‘DEACTIVATE_BRAND_REGISTER', 'DEACTIVATE_PROGRAM_MEDICATION_REGISTER’) and correspond to file structure

    1. Return 422 with the list of validation errors in case validation fails

  3. Check that reasonDescription filled

    1. Return 422 with the list of validation errors in case validation fails

  4. Check decoded and encoded input file according to file structure

    1. Return 422 with the list of validation errors in case validation fails

  5. Check that the identifiers from the request exist and active

    1. Return 404 with the list of validation errors in case validation fails.

  6. Check inclusion in case user try to deactivate innm with active innm_dosage or innm_dosage with active brand and brand with active program medication

    1. Return 422 with the list of validation errors in case validation fails.

File example:

  1. DEACTIVATE_INNM_REGISTER

View file
namedeactivate_innm_register.csv

  1. DEACTIVATE_INNM_DOSAGE_REGISTER

View file
namedeactivate_innm_dosage_register.csv

  1. DEACTIVATE_BRAND_REGISTER

View file
namedeactivate_brand_register.csv

  1. DEACTIVATE_PROGRAM_MEDICATION_REGISTER

View file
namedeactivate_program_medication_register.csv

...