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

Business rules engine data model_EN

Tables

Rule engine rules are stored in the MongoDB database

rule_engine_rules

Table used to store rule engine rule attributes

Name

Type

M/O

Description and constraints

Name

Type

M/O

Description and constraints

id

uuid

M

System identifier of the rule engine rule

name

string

M

Name of the rule engine rule

code

system

string

M

Code of rule engine rule. Fetches from the dictionary eHealth/rule_engine_dictionaries

code

string

M

Fetches from the dictionary selected from system field

description

string

O

Description of the rule engine rule

deactivation_reason

string

O

Reason for deactivating rule engine rule

is_active

bool

M

Technical flag. By default is true

value

string

string

M

Rule engine rule in Human readable string format

json

json

M

Rule engine rule in JsonLogic format

inserted_by

uuid

M

The last user by who the rule engine rule was created

inserted_at

timestamp

M

Time when a rule engine rule was created

updated_by

uuid

M

The last user by who the rule engine rule was updated

updated_at

timestamp

M

The last time the rule engine rule was updated

Example

{ "_id": "bf5a8ac6-1765-4f45-81ad-775877b4e7ac", "code": { "code": "insulin_5", "system": "eHealth/clinical_impression_patient_categories" }, "deactivation_reason": null, "description": "test rule 5", "inserted_at": "2022-06-16T08:46:36.324+0000", "inserted_by": "bd0f5860-6629-4309-bce0-dfc2fc022c86", "is_active": true, "name": "test rule 5", "updated_at": "2022-06-16T08:46:36.324+0000", "updated_by": "bd0f5860-6629-4309-bce0-dfc2fc022c86", "value": { "json": { "and": [ { "<": [ { "var": "patient.age" }, NumberInt(18) ] }, { "some": [ { "var": "conditions" }, { "and": [ { "some": [ { "var" : "code.coding" }, { "and": [ { "all": [ { "var": "code" }, { "in": [ { "var": "" }, [ "A09" ] ] } ] }, { "all": [ { "var": "code" }, { "in": [ { "var": "" }, [ "A01.1" ] ] } ] } ] } ] }, { "all": [ { "var": "verification_status" }, { "in": [ { "var": "" }, [ "confirmed" ] ] } ] }, { "all": [ { "var": "clinical_status" }, { "in": [ { "var": "" }, [ "active" ] ] } ] } ] } ] } ] }, "string": "(Patient.Age < 18 AND SOME OF Conditions HAVE (SOME OF Code.Coding HAVE (Code = [Проблеми потовиділення] AND Code = [Паратиф А]) AND Verification status = [заключний] AND Clinical status = [активний]))" } }

 

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