ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

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.

Specification

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

Global and configurable parameters

API paragraph not found

Input parameters

API paragraph not found

Filters

API paragraph not found

Dictionaries

API paragraph not found

Request structure

 Click here to expand...

mutation description - WIP

Authorize

  • Verify the validity of access token

    • in case of error - return 401 (“Invalid access token”) in case of validation fails.

  • Verify that token is not expired

    • in case of error - return 401 (“Invalid access token”).

  • Check user scopes in order to perform this action (scope = 'medication_registry:write')

    • return 403 (“Your scope does not allow to access this resource. Missing allowances: medication_registry:write”) in case of invalid scope(s).

Headers

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

  1. DEACTIVATE_INNM_DOSAGE_REGISTER

  1. DEACTIVATE_BRAND_REGISTER

  1. DEACTIVATE_PROGRAM_MEDICATION_REGISTER

Processing

See Logic

Response structure

API paragraph not found

Post-processing processes

API paragraph not found

HTTP status codes

HTTP status code

Message

What caused the error

401

Invalid access token

 

403

Your scope does not allow to access this resource. Missing allowances: medication_registry:write

 

404

Error

The identifiers from the request exist and active check failed

422

Error

  • Request check using schema failed.

  • registerType IN ('DEACTIVATE_INNM_REGISTER', ‘DEACTIVATE_INNM_DOSAGE_REGISTER', ‘DEACTIVATE_BRAND_REGISTER', 'DEACTIVATE_PROGRAM_MEDICATION_REGISTER’) and correspond to file structure check failed.

  • reasonDescription filled check failed.

  • Decoded and encoded input file according to file structure check failed.

  • Inclusion in case user try to deactivate innm with active innm_dosage or innm_dosage with active brand and brand with active program medication check failed.

Backward compatibility

API paragraph not found

  • No labels