SPECPROC-41. Add Decision Language specification.
-diff --git a/docs/decision_language.html b/docs/decision_language.html index 89d0a0c..b1d253e 100644 --- a/docs/decision_language.html +++ b/docs/decision_language.html @@ -4,11 +4,13 @@ - +
Release: PROC latest
-Status: DEVELOPMENT
Release: PROC Release-1.7.0
Status: RETIRED
Revision: [latest_issue]
Issue | -Details | -Raiser, Implementer | -Completed | -
---|---|---|---|
PROC Release 2.0.0 (unreleased) |
-|||
- |
- SPECPROC-41. Add Decision Language specification. - |
-T Beale |
-- |
This document specifies the openEHR Decision Language, in both abstract syntax form and as a related model. The latter defines the semantics of a first order predicate style logic that can be used to write Decision Logic Modules (DLMs) containing rule-sets that may be used standalone or with a Process / Plan oriented system such as openEHR Task Planning.
+This document specifies the openEHR Decision Language, in both abstract syntax form and as a related model. The latter defines the semantics of a first order predicate style logic that can be used to write Decision Logic Modules (DLMs) containing rule-sets that may be used standalone or with a Process / Plan oriented system such as openEHR Task Planning.
The intended audience includes:
@@ -273,7 +241,7 @@The Guideline Definition Language (GDL2).
@@ -284,7 +252,7 @@This specification is in the DEVELOPMENT state. The development version of this document can be found at https://specifications.openehr.org/releases/PROC/latest/decision_language.html.
+This specification is in the RETIRED state.
Known omissions or questions are indicated in the text with a 'to be determined' paragraph, as follows:
@@ -317,7 +285,7 @@The openEHR Decision Language (DL) and model defines a formalism for expressing decision logic and rules used by process-oriented healthcare information systems, active forms and so on. Decision logic usually sits within a larger environment of plans, guidelines and data sources such as the EHR, as described in the openEHR Process and Planning Overview. The primary encapsulation of DL is within a Decision Logic Module (DLM).
+The openEHR Decision Language (DL) and model defines a formalism for expressing decision logic and rules used by process-oriented healthcare information systems, active forms and so on. Decision logic usually sits within a larger environment of plans, guidelines and data sources such as the EHR, as described in the openEHR Process and Planning Overview. The primary encapsulation of DL is within a Decision Logic Module (DLM).
Within the openEHR ecosystem, Task Plans and GDL3 guidelines both require a way of expressing rules and declaring input variables. Guidelines additionally need a way of declaring output variables. These needs are achieved with the flexible use of a single kind of multi-section module called a decision logic module (DLM).
@@ -485,23 +453,23 @@definitions -- Terminology
+definitions -- Terminology
- terminology = {
- term_definitions: {
- "en" : {
- "resting_heart_rate" : {
- text: "heart rate at rest",
- description: "..."
- }
- ...
- "SpO2": {
- text: "Oxygen saturation";
- description: "..."
- }
- }
- }
- }
+ terminology = {
+ term_definitions: {
+ "en" : {
+ "resting_heart_rate" : {
+ text: "heart rate at rest",
+ description: "..."
+ }
+ ...
+ "SpO2": {
+ text: "Oxygen saturation";
+ description: "..."
+ }
+ }
+ }
+ }
definitions -- Descriptive
+definitions -- Descriptive
- language = {
- original_language: [ISO_639-1::en]
- }
- ;
+ language = {
+ original_language: [ISO_639-1::en]
+ }
+ ;
- description = {
- lifecycle_state: "unmanaged",
- original_author: {
- name: "Thomas Beale",
- email: "thomas.beale@openEHR.org",
- organisation: "openEHR Foundation <http://www.openEHR.org>",
- date: "2021-01-10"
- },
- details: {
- "en" : {
- language: [ISO_639-1::en],
- purpose: "To record an individual's QRISK3 score."
- }
- },
- copyright: "© 2021 openEHR Foundation",
- licence: "Creative Commons CC-BY <https://creativecommons.org/licenses/by/3.0/>",
- ip_acknowledgements: {
- "ClinRisk" : "This content developed from original publication of
+ description = {
+ lifecycle_state: "unmanaged",
+ original_author: {
+ name: "Thomas Beale",
+ email: "thomas.beale@openEHR.org",
+ organisation: "openEHR Foundation <http://www.openEHR.org>",
+ date: "2021-01-10"
+ },
+ details: {
+ "en" : {
+ language: [ISO_639-1::en],
+ purpose: "To record an individual's QRISK3 score."
+ }
+ },
+ copyright: "© 2021 openEHR Foundation",
+ licence: "Creative Commons CC-BY <https://creativecommons.org/licenses/by/3.0/>",
+ ip_acknowledgements: {
+ "ClinRisk" : "This content developed from original publication of
© 2017 ClinRisk Ltd., see https://qrisk.org",
- "QRISK" : "QRISK® is a registered trademark of the University of Nottingham and EMIS"
- }
- }
- ;
+ "QRISK" : "QRISK® is a registered trademark of the University of Nottingham and EMIS"
+ }
+ }
+ ;
definitions -- Reference
+definitions -- Reference
- paracetamol_dose: Quantity = 1g;
- chlorphenamine_dose: Quantity = 10mg;
- prednisolone_dose_per_m2: Quantity = 40mg;
+ paracetamol_dose: Quantity = 1g;
+ chlorphenamine_dose: Quantity = 10mg;
+ prednisolone_dose_per_m2: Quantity = 40mg;
definitions -- Reference
+definitions -- Reference
- Snoking_interaction_scales = {
- [female]: {
- [age_1]: {
- [non_smoker]: 0,
- [ex_smoker]: -4.70571617858518910,
- [light_smoker]: -2.74303834035733370,
- [moderate_smoker]: -0.866080888293921820,
- [heavy_smoker]: 0.902415623697106480
- },
- [age_2]: {
- [non_smoker]: 0,
- [etc]: -0.0755892446431930260000000
- }
- },
- [male]: {
- [age_1]: {
- [non_smoker]: 0,
- [etc]: -0.2101113393351634600000000
- },
- [age_2]: {
- [non_smoker]: 0,
- [etc]: -0.0004985487027532612100000
- }
- }
- }
- ;
+ Snoking_interaction_scales = {
+ [female]: {
+ [age_1]: {
+ [non_smoker]: 0,
+ [ex_smoker]: -4.70571617858518910,
+ [light_smoker]: -2.74303834035733370,
+ [moderate_smoker]: -0.866080888293921820,
+ [heavy_smoker]: 0.902415623697106480
+ },
+ [age_2]: {
+ [non_smoker]: 0,
+ [etc]: -0.0755892446431930260000000
+ }
+ },
+ [male]: {
+ [age_1]: {
+ [non_smoker]: 0,
+ [etc]: -0.2101113393351634600000000
+ },
+ [age_2]: {
+ [non_smoker]: 0,
+ [etc]: -0.0004985487027532612100000
+ }
+ }
+ }
+ ;
input
- heart_rate: Quantity
+ heart_rate: Quantity
rules
- is_hypertensive:
- Result := systolic_blood_pressure.is_available and then systolic_blood_pressure.in_range([high]) or ...
+ is_hypertensive:
+ Result := systolic_blood_pressure.is_available and then systolic_blood_pressure.in_range([high]) or ...
input -- Administrative State
+input -- Administrative State
- |
- | untracked variable:
- | DOB never changes, no currency needed
- |
- date_of_birth: Date
- ;
+ |
+ | untracked variable:
+ | DOB never changes, no currency needed
+ |
+ date_of_birth: Date
+ ;
-input -- Historical State
+input -- Historical State
- |
- | tracked variable:
- | weight changes over a period of days
- |
- weight: Quantity
- currency = 3 days
- ;
+ |
+ | tracked variable:
+ | weight changes over a period of days
+ |
+ weight: Quantity
+ currency = 3 days
+ ;
- |
- | untracked variable:
- | assuming an adult subject, height constant
- |
- height: Quantity
- ;
+ |
+ | untracked variable:
+ | assuming an adult subject, height constant
+ |
+ height: Quantity
+ ;
-input -- Tracked State
+input -- Tracked State
- |
- | tracked variable:
- | blood glucose changes within minutes in response to food
- |
- blood_glucose: Quantity
- currency = 15 min
- ;
+ |
+ | tracked variable:
+ | blood glucose changes within minutes in response to food
+ |
+ blood_glucose: Quantity
+ currency = 15 min
+ ;
- |
- | tracked variable:
- | Heart-rate may change quickly
- |
- heart_rate: Quantity
- currency = 5 sec
- ;
+ |
+ | tracked variable:
+ | Heart-rate may change quickly
+ |
+ heart_rate: Quantity
+ currency = 5 sec
+ ;
rules -- Conditions
+rules -- Conditions
- her2_positive:
- Result := her2_expression = [positive]
- ;
+ her2_positive:
+ Result := her2_expression = [positive]
+ ;
- non_class_I_heart_failure:
- Result := has_heart_failure_class_II or
- has_heart_failure_class_III or
- has_heart_failure_class_IV
- ;
+ non_class_I_heart_failure:
+ Result := has_heart_failure_class_II or
+ has_heart_failure_class_III or
+ has_heart_failure_class_IV
+ ;
- anthracyclines_contraindicated:
- Result := has_transmural_MI or
- ejection_fraction.in_range ([low]) or
- non_class_I_heart_failure
- ;
+ anthracyclines_contraindicated:
+ Result := has_transmural_MI or
+ ejection_fraction.in_range ([low]) or
+ non_class_I_heart_failure
+ ;
rules -- Main
+rules -- Main
- hypertension_risk: Terminology_term
- Result :=
- choice in
- =================================================
- has_pre_eclampsia or
- has_eclampsia: [emergency],
- -------------------------------------------------
- previous_obstetric_hypertension or
- previous_pre_eclampsia or
- previous_eclampsia or
- has_pregnancy_hypertension: [high_risk],
- -------------------------------------------------
- *: [low_risk]
- =================================================
- ;
+ hypertension_risk: Terminology_term
+ Result :=
+ choice in
+ =================================================
+ has_pre_eclampsia or
+ has_eclampsia: [emergency],
+ -------------------------------------------------
+ previous_obstetric_hypertension or
+ previous_pre_eclampsia or
+ previous_eclampsia or
+ has_pregnancy_hypertension: [high_risk],
+ -------------------------------------------------
+ *: [low_risk]
+ =================================================
+ ;
- gestational_diabetes_risk: Boolean
- Result :=
- bmi.in_range ([high]) or
- previous_macrosomic_baby or
- previous_gestational_diabetes or
- family_history_of_diabetes or
- race_related_diabetes_risk
- ;
+ gestational_diabetes_risk: Boolean
+ Result :=
+ bmi.in_range ([high]) or
+ previous_macrosomic_baby or
+ previous_gestational_diabetes or
+ family_history_of_diabetes or
+ race_related_diabetes_risk
+ ;
definitions -- Terminology
+definitions -- Terminology
- terminology = {
- term_definitions: {
- "en" : {
- "date_of_birth" : {
- text: "Date of birth"
- },
- "age_in_years" : {
- text: "Age (years)"
- },
- "qRisk_score" : {
- text: "QRISK2 score"
- },
- "diabetes_status" : {
- text: "Diabetic status of subject"
- },
- "no_diabetes" : {
- text: "Non-diabetic"
- },
- "type1_diabetes" : {
- text: "Has type 1 diabetes"
- },
- "type2_diabetes" : {
- text: "Has type 2 diabetes"
- }
- }
- }
+ terminology = {
+ term_definitions: {
+ "en" : {
+ "date_of_birth" : {
+ text: "Date of birth"
+ },
+ "age_in_years" : {
+ text: "Age (years)"
+ },
+ "qRisk_score" : {
+ text: "QRISK2 score"
+ },
+ "diabetes_status" : {
+ text: "Diabetic status of subject"
+ },
+ "no_diabetes" : {
+ text: "Non-diabetic"
+ },
+ "type1_diabetes" : {
+ text: "Has type 1 diabetes"
+ },
+ "type2_diabetes" : {
+ text: "Has type 2 diabetes"
+ }
+ }
+ }
- value_sets: {
- "diabetes_status" : {
- id: "diabetes_status",
- members: ["no_diabetes", "type1_diabetes", "type2_diabetes"]
- }
- }
- }
- ;
+ value_sets: {
+ "diabetes_status" : {
+ id: "diabetes_status",
+ members: ["no_diabetes", "type1_diabetes", "type2_diabetes"]
+ }
+ }
+ }
+ ;
systolic_blood_pressure: Quantity
- currency = 1 min,
- ranges["mm[Hg]"] =
- --------------------------------
- |≥180|: [critical_high],
- |>140|: [very_high],
- |>120|: [high],
- |>90..≤120|: [normal],
- |≤90|: [low],
- |≤50|: [critical_low]
- --------------------------------
- ;
+ systolic_blood_pressure: Quantity
+ currency = 1 min,
+ ranges["mm[Hg]"] =
+ --------------------------------
+ |≥180|: [critical_high],
+ |>140|: [very_high],
+ |>120|: [high],
+ |>90..≤120|: [normal],
+ |≤90|: [low],
+ |≤50|: [critical_low]
+ --------------------------------
+ ;
// build the ranges Map
-ranges: Map <Terminology_code, Interval<Quantity> ();
-ranges.put (Terminology_code("critical_high"), Interval<Quantity>(180 mm[Hg], Void);
- ...
-ranges.put (Terminology_code("critical_low"), Interval<Quantity>(Void, 50 mm[Hg]);
+ranges: Map <Terminology_code, Interval<Quantity> ();
+ranges.put (Terminology_code("critical_high"), Interval<Quantity>(180 mm[Hg], Void);
+ ...
+ranges.put (Terminology_code("critical_low"), Interval<Quantity>(Void, 50 mm[Hg]);
// instantiate the tracked variable object
-systolic_blood_pressure: TRACKED_QUANTITATIVE_VARIABLE<Quantity> (
- "systolic_blood_pressure", // name
- "PT1M", // currency
- ranges // ranges
+systolic_blood_pressure: TRACKED_QUANTITATIVE_VARIABLE<Quantity> (
+ "systolic_blood_pressure", // name
+ "PT1M", // currency
+ ranges // ranges
);
Issue | +Details | +Raiser, Implementer | +Completed | +
---|---|---|---|
PROC Release 1.7.0 |
+|||
+ |
+ SPECPROC-52. Retire Process component and all its specifications. + |
+openEHR SEC |
++ |
0.6.0 |
+
+ SPECPROC-41. Add Decision Language specification. + |
+T Beale |
+02 Jan 2021 |
+