Guideline Tutorial I
Introduction
This tutorial guide is a supplement to the Archetypes guide, utilising existing models to provide a step-by-step demonstration on how to design basic guidelines for different types of clinical decision support (CDS) applications using the Guideline Editor.
It is vital the model of a clinical concept is founded on a solid scientific basis, and therefore it is essential that proper research has been done ahead of construction. When published, any user should be able to quickly review the material the model is based on; always make sure to list the references.
Resources containing more in-depth information are listed at the end of the document for quick access in case they are needed. There is also a link to our CDS Apps Overview page on GitHub containing over 100 demo applications (using 250+ archetypes) available in this section.
The guide has been written by the Clinical Modelling Group at Cambio Healthcare Systems. If you have any questions or would like to provide feedback on this document, please send us an e-mail at models@cambiocds.com.
All the best,
Clinical Modelling Group
Contributors
Eneimi Allwell-Brown
Jimmy Axelsson
Syeeda S. Farruque
Dennis Forslund
Creating a Guideline
In order to generate data for storage and documentation, a guideline is required. Guidelines are used to express clinical rules and algorithms. Their format is based on a publicly available specification called the Guideline Definition Language (GDL). Guidelines use one or more archetypes to mimic the rules used in clinical practice. Even if two guidelines use the same archetypes they can be used to model different concepts according to the rules used in each guideline.
This guide provides step-by-step instructions on building a common calculation-based guideline model using the Guideline Editor (GE). This example builds on the steps from the earlier introductory guide that provides instructions on installing and setting up the Guideline Editor, and is an extension on the previous guide on creating an archetype for the Ideal Body Weight (IBW) model.
The IBW is a calculation based on the Devine formula, and provides a weight-based method of adjusting medication dosage for adequate prescriptions. An overview of the finished IBW guideline is displayed below:
Metadata
First, add metadata in the Description tab which is opened upon launching the program:
- Name the guideline.
- Enter the author details including organisation and date of creation.
- Select Author draft from the Authorship lifecycle drop-down menu.
- Add the copyright.
- Use the + to add and – to remove keywords. The pencil icon can be used to edit existing keywords.
- Enter the names of any contributors.
Next, enter text into the 1. Description, 2. Purpose, 3. Use, 4. Misuse and 5. References sections:
- Once all the metadata is filled in, ensure the model is saved.
Definitions
After all the metadata has been added, the next tab to go to is the Definitions tab.
Complete definitions of the IBW are shown in the image below. There are two input (EHR) archetypes and one output (CDS) archetype. The input archetypes are created to hold the input of height and gender and the output archetype holds the IBW calculation:
The input or EHR definitions which are indicated in the above image (1), are instantiated as shown in the following images:
- Drag and drop the Archetype instantiation element from the right-hand side to the main modelling screen.
- Drag and drop the Element instantiation by dropping it on top of the already instantiated blank archetype.
- Drag and drop the Predicate (Function) element on top of the already instantiated blank archetype.
Assign the blank elements as shown below:
- Click on Archetype within the archetype instantiation slot.
- Choose the basic demographic archetype from the folder.
- Click on Accept to select it.
Next, the element attribute can be entered:
- Click on the Element slot.
- Choose the coded text (cT) for Gender.
- Click on Accept.
The last part to enter is the Predicate (function) element:
- Click on Element within the Predicate (Function) slot.
- Choose the Event time data attribute from the list.
- Click on Accept.
- Choose max from the event time drop-down menu. This will ensure the values used in the tool are always the most recent.
Repeat the above sequence to create another blank EHR archetype instantiation to hold the Height data element needed for calculating the IBW score as mentioned earlier. Instantiate a Height observation archetype to contain a height element and maximum event time element.
The last instantiated archetype is an output or CDS archetype which holds the IBW calculation result. This is made up of only one internal element: the holder for the calculated IBW value for men and for women. There is no need for an event time element, as the calculation is triggered anew upon usage. Make sure to select the CDS format when instantiating the archetype:
The CDS/EHR selection is made at the top of the archetype instantiation window as shown in the image below (1).
Rules
Once the definitions have been created, they can be used to construct the rules for the IBW calculation.
IBW has two rules, one for men and one for women, as the calculation formula differs between the sexes. These rules are numbered 1 and 2 in the image below.
The following section will display the construction of the rule intended for males. For females, simply apply the same principles and adjust the gender and formula in accordance with the instructions.
Rule number one – Calculate IBW for males:
- Click on the Add rule button on the top row.
- Type the name of the rule in the RuleName text box – this is the “Calculate Ideal Body Weight Male” rule.
- Click on Accept.
Once the accept button has been clicked, the guide opens a new window for the specific rule:
- Name of the created rule.
- Conditions modelling area.
- Actions modelling area.
- Condition elements – used to model the conditions required to be fulfilled for the rules to fire.
- Action elements – trigger when the conditions assigned in the top modelling area are fulfilled.
Conditions that must be fulfilled for the rule to calculate IBW for men:
- Drag and drop the Compare (DataValue) into the main conditions modelling screen.
- Drag and drop the Compare (Attribute) into the main conditions modelling screen.
- Click into the Compare (DataValue) element.
- Choose cT Gender (coded text).
- Click on Accept.
- Choose == from the drop-down menu, and then click on DataValue.
- Select male from the gender drop-down menu.
- Click on Accept.
The other condition in the IBW rule for men is to ensure height has been measured in a specific unit, as the formula is based on the use of inches.
- Click on the Element attribute field of the Compare (Attribute) element.
- Choose units from the Height/Length element.
- Click on Accept.
- Choose == from the drop-down menu, and then click on Expression.
- Select in (inches).
- Click on Accept.
Once all the conditions for the IBW calculation for men rule have been entered, the actions in the bottom part of the rule modelling window can be set:
Create three blank Set (Attribute) elements to contain the three action triggers.
The calculation itself is contained within a magnitude attribute element:
- Click on Element attribute.
- Select the IBW magnitude attribute in the break-out box.
- Click on Accept.
- Click on Expression, which opens the Expression editor.
- Enter the calculation for men which is: (2.3x (Height (in inches) – 60 inches)) + 50.
- The height value is accessed from the right side – here the EHR_Height/Length_magnitude.
- Click on Accept.
The units with which the calculation is based is set as well:
- Click on Element attribute.
- Select the IBW units attribute from the list.
- Click on Accept.
- Click into the Expression slot to set the unit.
- Select Kg as the calculation unit from the drop-down menu.
- Click on Accept.
- Click on the last Element attribute slot.
- Select Precision from the list under IBW. Precision determines the number of decimal places used for the resulting value.
- Click on Accept.
- Click on the final Expression slot.
- Enter 2 into the top editor window to choose a precision of two decimal places.
- Click on Accept.
Repeat the same steps to build the rule for women – choosing female instead of male in the model. The formula for women to be entered into the expression editor is:
((2.3 * (Height/Length – 60)) + 45.5)
Once all the conditions and actions have been set – remember to save the model (1). It is possible to return to the main screen by clicking the “Back to guide” button (2) on the top menu:
Overview and Trial Run
Once all the data has been added, the Terminology tab displays the codes:
All that is left is to test the model by clicking on the Run button:
- Enter height in inches.
- Select inches (in) from the units drop-down menu.
- Choose gender.
- Click on the date field or the small calendar icon to enter the date in both date slots.
- Click on Execute to run the model.
The editor then issues a result for the values used for input, displayed at the bottom of the panel: