ЕСОЗ - публічна документація
Deactivate medication registry
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
Decode base64 file.
Validate input according to schema.
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
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
Check that request using schema
Return 422 with the list of validation errors in case validation fails.
Check that registerType IN ('DEACTIVATE_INNM_REGISTER', ‘DEACTIVATE_INNM_DOSAGE_REGISTER', ‘DEACTIVATE_BRAND_REGISTER', 'DEACTIVATE_PROGRAM_MEDICATION_REGISTER’) and correspond to file structure
Return 422 with the list of validation errors in case validation fails
Check that reasonDescription filled
Return 422 with the list of validation errors in case validation fails
Check decoded and encoded input file according to file structure
Return 422 with the list of validation errors in case validation fails
Check that the identifiers from the request exist and active
Return 404 with the list of validation errors in case validation fails.
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
Return 422 with the list of validation errors in case validation fails.
File example:
DEACTIVATE_INNM_REGISTER
DEACTIVATE_INNM_DOSAGE_REGISTER
DEACTIVATE_BRAND_REGISTER
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 |
|
Backward compatibility
API paragraph not found
ЕСОЗ - публічна документація