Overview

Background

Expressing and sharing computerized clinical decision support (CDS) content across languages and technical platforms has been an evasive goal for a long time. Lack of commonly shared clinical information models and flexible support for various terminology resources have been identified as two main challenges for sharing decision logic across sites. The openEHR information architecture, coupled with external terminology provides a well-defined, open platform on which to base a computable guideline facility.

Scope

The scope of GDL is to express clinical logic as production rules. Discrete GDL rules, each containing 'when-then' statements, can be combined together as building blocks to support single decision making and more complex, chained decision making processes. The GDL rules can be used to drive at-point-of-care decision support applications as well as retrospective populational analytics.

The use cases of GDL2 include, but are not limited to:

  • Prompts, alerts & reminders;

  • Interactive single-screen decision support applications;

  • Detailed order-sets and care process support;

  • Algorithm-based calculators;

  • Generate and update personalized care plans as part of more complex care process support;

  • Retrospective treatment compliance check, and outcome measures.

An Example

The following is a simple GDL example that allows us to calculate CHA2DS2-VASc Score, a clinical tool for stroke risk stratification in atrial fibrillation.

GDL Guidelines are expressed in either the openEHR ODIN or JSON formats, such that a GDL source is a serialised instance of the GDL2 Object Model, described below in [_gdl2_object_model]. The example here uses ODIN.
<
    gdl_version = <"2.0">
    id = <"CHA2DS2-VASc.v1">
    concept = <"gt0001">
    original_language = <[ISO_639-1::en]>
    description = <
        details = <
            ["en"] = <
                copyright = <"Cambio Healthcare Systems">
                keywords = <"Atrial Fibrillation", "Stroke", "CHA2DS2-VASc">
                misuse = <"Do not use in patients with no diagnosis of atrial fibrillation.">
                purpose = <"Calculates stroke risk for patients with atrial fibrillation, possibly better than the CHADS2 score.">
                use = <"Calculates stroke risk for patients with atrial fibrillation, possibly better than the CHADS2 score.">
            >
        >
        lifecycle_state = <"in_review">
        original_author = <
            ["date"] = <"2016-12-16">
            ["email"] = <"rong.chen@cambio.se">
            ["name"] = <"Rong Chen">
            ["organisation"] = <"Cambio Healthcare Systems">
        >
        other_contributors = <"Carlos Valladares">
    >
    definition = <
        pre_conditions = <...>
        data_bindings = <
             ["gt0006"] = <...>
             ["gt0007"] = <...>
             ...
        >
        rules = <
             ["gt0024"] = <...>
             ["gt0025"] = <...>
             ...
        >
    >
    terminology = <
        term_definitions = <
            ["en"] = <
                ["gt123"] = <
                    text = <"some text">
                    description = "some description">
                >
            >
        >
        term_bindings = <
            ["ICD10"] = <
                ["gt123"] = <http://who.int/icd10/id/xxxx>
            >
        >
    >
>

The meta-data in the GDL header is based on the openEHR Resource model. The following GDL source illustrates the current version of the guideline, the supported natural languages, to which it has been translated, authorship information, lifecycle state, keywords and the purpose, use and misuse of the guideline. The other top-level sections are respectively definition and terminology.

The following block illustrates the data_bindings sub-section within the definition section, which binds data elements from a source data-set, defined in terms of an archetype, optionally within a specific template, to variables used by GDL rules. Variables are identified using 'gt-codes', e.g. 'gt0123'.

definition = <
    data_bindings = <
        ["gt0006"] = <
            model_id = <"openEHR-EHR-EVALUATION.problem-diagnosis.v1">
            type = <"INPUT">
            elements = <
                ["gt0107"] = <
                    path = <"/data[at0001]/items[at0002.1]">
                >
            >
        >
    >
>

Within the definition section, it is possible to define a set of logical pre-conditions that have to be met before the rules inside the guideline can be executed. In GDL2, the pre-conditions are formed from the pre_conditions sub-section (guideline-wide), and predicates defined in each of the subordinate data_bindings items, as in the CHA2DS2-VASc score calculation shown below:

definition = <
    pre_conditions = <"$gt0107|index diagnosis| != null">
    data_bindings = <
        [1] = <
            model_id = <"openEHR-EHR-EVALUATION.problem-diagnosis.v1">
            type = <"INPUT">
            elements = <
                ["gt0107"] = <
                    path = <"/data[at0001]/items[at0002.1]">
                >
            >
            predicates = <"/data[at0001]/items[at0002.1] is_a local::gt0105|Atrial fibrillation|">
            template_id = <"diagnosis_chadvas_icd10">
        >
    >
>

In this case, the pre-conditions consist of the statements:

-- there is a diagnosis in the data set
$gt0107|index diagnosis| != null

-- the diagnosis is gt0105, Atrial Fibrillation.
/data[at0001]/items[at0002.1] is_a local::gt0105|Atrial fibrillation|

Accordingly, the guideline will not be executed unless the patient has been diagnosed with atrial fibrillation.

The rules section makes use of locally defined variables to express the clinical logic. Each rule has a name codified by a locally defined gt-code, with which its natural language-dependent name and description are indexed in the term_definitions section. A priority can be assigned to ensure execution order of the rules. Higher priorities are executed earlier. This example illustrates rules that inspect different diagnoses relevant to CHA2DS2-VASc score and set the values of the DV_ORDINALs inside a CHA2DS2-VASc score archetype. The rule gt0026 ("Calculate total score") sums the values and sets the total score in CHA2DS2-VASc score archetype.

definition = <
    rules = <
        ["gt0018"] = <
            when = <"$gt0108 != null">
            then = <"$gt0014 = 1|local::at0031|Present|">
            priority = (11)
        >
        ["gt0019"] = <
            when = <"$gt0109 != null">
            then = <"$gt0010 = 1|local::at0034|Present|">
            priority = (9)
        >
        ["gt0026"] = <
            then = <"$gt0016.magnitude = gt0009.value + $gt0010.value + $gt0011.value + $gt0015.value + $gt0012.value + $gt0013.value + $gt0014.value">
            priority = (1)
        >
    >
>

Finally we have the terminology section of the guideline, where all the terms are bound to user interface labels and description of the terms in supported natural languages.

terminology = <
    term_definitions = <
        ["en"] = <
            ["gt0003"] = <
                text = <"Diagnosis">
            >
            ["gt0014"] = <
                text = <"Hypertension">
            >
            ["gt0102"] = <
                text = <"Diabetes">
            >
            ["gt0105"] = <
                text = <"Atrial fibrillation">
            >
            ["gt0018"] = <
                text = <"Set hypertension">
            >
            ["gt0019"] = <
                text = <"Set diabetes">
            >
            ["gt0026"] = <
                text = <"Calculate total score">
            >
        >
    >
>

In addition, locally defined terms may be bound to concepts or refsets defined by external reference terminologies in term_bindings. In this sample, the diagnosis of atrial fibrillation is bound to a specific code in ICD10.

terminology = <
    term_bindings = <
        ["ICD10"] = <
            ["gt0105"] = <"ICD10::I48">
        >
    >
>