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

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 Next »

Purpose

This WS allows to get list of rule engine rules without rules details. Used to get by id, name or code of the rule engine rule.

Key points

  1. This is a REST method used by MIS.

  2. Only authenticated and authorized employee with appropriate scope can get rule engine rules list.

Specification

Link

https://ehealthmedicaleventsapi.docs.apiary.io/#reference/rule-engine-rules/get-rule-engine-rule-list/get-rule-engine-rule-list

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

Resource

/api/rule_engine_rules

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

Scope

rule_engine_rule:read

Scope для доступу

Components

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

Microservices

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

Protocol type

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

Request type

GET

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

Sync/Async

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

Public/Private/Internal

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

Logic

  1. Filter rule_engine_rules

    1. with is_active=true status

    2. by search params

  2. Render a response according to specification.

Request structure

See on Apiary

Filters

Filter

Values

Type

Description

Example

name

String

Rule engine rule name

Some name

system

String

Code of rule engine rule system from dictionary eHealth/rule_engine_dictionaries

eHealth/clinical_impression_patient_categories

code

String

Code of rule engine rule from dictionary specified in the system

insulin_1

page

Number

Page number

2

page_size

Number

A limit on the number of objects to be returned, between 1 and 100. Default: 50

50

Authorize

  • Verify the validity of the access token

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

  • 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 = 'rule_engine_rule:read')

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

Headers

Content-Type:application/json

Request data validation

Processing

Search params

  1. name. Search by rule_engine_rules.name

  2. code. Searches by rule_engine_rules.code.code

  3. system. Searches by rule_engine_rules.code.system

Response structure

See on Apiary

 Response example
{
  "data": [
    {
      "id": "1f8444a0-e48b-440b-a082-c4703233efa2",
      "name": "Some name",
      "code": {
        "system": "eHealth/clinical_impression_patient_categories",
        "code": "insulin_1"
      }
    }
  ],
  "meta": {
    "code": 200,
    "url": "http://example.com/resource",
    "type": "object",
    "request_id": "req-adasdoijasdojsda"
  }
}

Post-processing processes

HTTP status codes

HTTP status code

Message

What caused the error

200 

 

 

  • No labels