Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

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

Page Properties
idAPI_Specification

Link

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

Resource

/api/rule_engine_rules

Scope

rule_engine_rule:read

Components

Dictionaries and Registers

Microservices

API paragraph not found

Protocol type

REST

Request type

GET

Sync/Async

Sync

Public/Private/Internal

Public

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

Validations

...

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

API paragraph not found

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

...

Service logic

...

Filter rule_engine_rules

  1. with is_active=true status

  2. by search params

...

Response structure

See on Apiary

Expand
titleResponse example
Code Block
{
  "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

API paragraph not found

HTTP status codes

Page Properties
idAPI_HTTP status codes

HTTP status code

Message

What caused the error

200