Status: this page is in development.
Overview
NOTE: In this page, we use the term ‘decision logic module’ (DLM) for convenience, and it should not be taken to be a permanent name. Other names such as ‘computerised guideline module’ (CGM), ‘clinical practice guideline’ (CPG) etc are also common.
The problem
The aim of this page is to describe the form of a ‘decision logic module’ (DLM) that can be used in at least the following scenarios:
...
This achieves the same effect as the openEHR Element
type, just in a simpler type system. This approach enables typical null-value rules to be defined, such that an expression such as ejection_fraction > 20%
will not cause an exception even if the ejection_fraction
raw value is null. Of course it is usually better to test for defined (ejection_fraction)
first, if ejection_fraction
was defined as Quantity?
.
QUESTION: We might have to consider whether using the ‘?' declaration obscures the difference between a 'non-available’ variable (i.e. no value available from the outside world) and one that is simply null in the standard programming language sense. If we assume that the latter can happen within datasets and guidelines, we might want to allow both Type?
and e.g. the use of the explicit type Data_item<T>
to distinguish the two cases.
Effective time
Sometimes the clinically significant time of a data item needs to be accessed in rules. This can be done by the reference x.effective_time
, e.g. ejection_fraction.effective_time
returns when the ejection fraction measurement being used was taken. For a variable like is_diabetic
, it means when the diagnosis was made.
...
Code Block |
---|
dlm RCHOPS21 language original_language = <[ISO_639-1::en]> description lifecycle_state = <"unmanaged"> original_author = < ["name"] = <"Dr Spock"> ["organisation"] = <"Acme healthcare"> ["date"] = <"2020-03-22"> > details = < ["en"] = < language = <[ISO_639-1::en]> purpose = <"NHS CHOPS-21 chemotherapy guideline ...."> > > use BSA: Body_surface_area reference paracetamol_dose: Quantity = 1g chlorphenamine_dose: Quantity = 10mg prednisolone_dose_per_m2: Quantity = 40mg rituximab_dose_per_m2: Quantity = 375mg doxorubicin_dose_per_m2: Quantity = 50mg vincristine_dose_per_m2: Quantity = 1.4mg cyclophosphamide_dose_per_m2: Quantity = 750mg cycle_period: Duration = 3w cycle_repeats: Integer = 6 input -- <time_window = "current_episode"> staging: Terminology_term «ann_arbor_staging» currency = 30 days has_metastases: Boolean currency = 30 days input neutrophils: Quantity currency = 3d ranges = { [normal]: |>1 x 10^9/L|, [low]: |0.5 - 1 x 10^9/L|, [very_low]: |<0.5 x 10^9/L| } platelets: Quantity currency = 12h ranges = { [normal]: |>75 x 10^9/L|, [low]: |50 - 74 x 10^9/L|, [very_low]: |<50 x 10^9/L| } bilirubin: Quantity currency = 12h ranges = { [normal]: |<20 mmol/L|, [high]: |20 - 51 mmol/L|, [very_high]: |51 - 85 mmol/L|, [crit_high]: |>85 mmol/L| } gfr: Quantity currency = 24h ranges = { [normal]: |>20 mL/min|, [low]: |10 - 20 mL/min|, [very_low]: |<10 mL/min| } ldh: Quantity currency = 24h ranges = { [normal]: |>20 mL/min|, [low]: |10 - 20 mL/min|, [very_low]: |<10 mL/min| } conditions high_ipi: Result <- ipi_risk ∈ {|[ipi_high _risk|3], |[ipi_intermediate-_high _risk|2]} | | patient fit to undertake regime | patient_fit: Result <- not (platelets.in_range (very_low) or neutrophils.in_range (very_low)) rules prednisolone_dose: Quantity Result <- prednisolone_dose_per_m2 * BSA.bsa_m2 rituximab_dose: Quantity Result <- rituximab_dose_per_m2 * BSA.bsa_m2 doxorubicin_dose: Quantity Result <- doxorubicin_dose_per_m2 * BSA.bsa_m2 * map bilirubin.range { [high]: 0.5, [very_high]: 0.25, [crit_high]: 0.0 } prednisolone_dose: Quantity Result <- prednisolone_dose_per_m2 * BSA.bsa_m2 | | TODO: hepatic impairment dose modification | vincristine_dose: Quantity Result <- vincristine_dose_per_m2 * BSA.bsa_m2 | | CHECK: is low platelets and GFR dose modification | cumulative? | cyclophosphamide_dose: Quantity Result <- cyclophosphamide_dose_per_m2 * BSA.bsa_m2 * map platelets.range { [normal]: 1, [low]: 0.75 } * map gfr.range { [normal]: 1, [low]: 0.75, [very_low]: 0.5 } | | International Prognostic Index | ref: https:|en.wikipedia.org/wiki/International_Prognostic_Index | | One point is assigned for each of the following risk factors: | Age greater than 60 years | Stage III or IV disease | Elevated serum LDH | ECOG/Zubrod performance status of 2, 3, or 4 | More than 1 extranodal site | | The sum of the points allotted correlates with the following risk groups: | Low risk (0-1 points) - 5-year survival of 73% | Low-intermediate risk (2 points) - 5-year survival of 51% | High-intermediate risk (3 points) - 5-year survival of 43% | High risk (4-5 points) - 5-year survival of 26% | ipi_raw_score: Integer if age > 60 Result <- Result + 1 if staging ∈ {|stage III|, |stage IV|} Result <- Result + 1 if ldh.in_range (normal) Result <- Result + 1 if ecog > 1 Result <- Result + 1 if extranodal_sites > 1 Result <- Result + 1 ipi_risk: Terminology_code Result <- map ipi_raw_score { |0..1| : |[ipi_low risk: 5y survival - 73%|0_risk], |2| : |[ipi_intermediate-_low risk: 5y survival - 51%|1_risk], |3| : |[ipi_intermediate-_high risk: 5y survival - 43%|2_risk], |4..5| : |[ipi_high _risk:] 5y survival - 26%|3 } terminology term_definitions = < ["en"] = < ["paracetamol_dose"] = < text = <"paracetamol dose"> description = <"paracetamol base dose level per sq. m of BSA"> > ["chlorphenamine_dose"] = < text = <"chlorphenamine dose"> description = <"chlorphenamine base dose level per sq. m of BSA"> > ... ["staging"] = < text = <"Cancer staging"> description = <"Cancer staging (Ann Arbor system)"> > ["has_metastases"] = < text = <"Metastatic status"> description = <"Status of metastasis of cancer"> > ... ["neutrophils"] = < text = <"neutrophils"> description = <"neutrophils level"> > ["platelets"] = < text = <"platelets"> description = <"platelets level"> > ... ["ipi_low_risk"] = < text = <"low risk: 5y survival - 73%"> description = <".."> > ["ipi_intermediate_low_risk"] = < text = <"intermediate-low risk: 5y survival - 51%"> description = <".."> > ["ipi_intermediate_high_risk"] = < text = <"intermediate-high risk: 5y survival - 43%"> description = <"..."> > ["ipi_high_risk"] = < text = <"high risk: 5y survival - 26%"> description = <"..."> > > > |
Questions
DLM - DLM relationships
...