MIGRATE GDL1 GUIDELINE TO GDL2
This tutorial shows how to migrate a guideline from GDL1 to GDL2. The tutorial includes all steps taken to migrate the guideline CHA2DS2-VASc.v1 and explains how to deal with common mismatches between the platforms.
IMPORT GUIDELINE FROM GIT REPOSITORY IN THE GDL2 EDITOR
In the GDL2 Editor, click on “Guideline” in the menu and choose “Import Guideline from GIT Repository”.
Choose the GitHub common-clinical-models repo.
Leave the Username and Password fields empty and click on “Next”.
Select the master branch.
Select a guideline and click on “Import guideline”.
The guideline is now converted to GDL2 format and, depending on which guideline you have chosen, might work immediatly. However, most guidelines, like this one, need editing to work properly in the GDL2 format.
ENSURE CORRECT MIGRATION REGARDING DOMAINS
In the GDL2 Editor the domains are called INPUT and OUTPUT, whereas in GDL1 Editor they were called EHR and CDS. The names corresponded to data from the EHR versus data as a result from a CDS guideline.
For most guidelines the elements will automatically be mapped into the correct domain but for some guidelines all elements will end up in the OUTPUT domain. This is especially true for assessment guidelines, where the input to the guideline is a result from a previous calculation guideline. In GDL1 this would be defined as one CDS output being further analyzed to another CDS output, whereas in GDL2 all input is defined as INPUT, no matter if it comes from the EHR, the user or a previous CDS guideline.
For the CHA2DS2-VASc guideline the domains are converted correctly, as can be seen below.
For the CHA2DS2-VASc assessment guideline, however, all elements end up in the OUTPUT domain.
Identify which elements are used as input for the guideline (in this case the Total score) and click on the archetype.
In the archetype selection window, change the domain from Output to Input.
Click on the checkmark and see that the element has moved to the INPUT domain.
SOLVE FUNCTION PREDICATE FOR EVENT TIME ISSUES
In GDL2, the Function Predicate for Event Time requires an instantiated Event Time element to work. Most guidelines in the GDL1 format utilize the Function Predicate but do not have the corresponding Event time element instantiated. This is solved in one of two ways, described below.
Remove unnecessary Function Predicates
If the guideline is intended for demonstration purposes there is no need to have the event time function predicate and in this case the best thing to do is to simply remove the predicate. This is done by clicking on the minus sign and confirming with the check mark.
Instantiate Event Time elements
If you do want to keep the function predicate you need to instantiate the element to which the predicate refer. In this example that is an event time element.
Drag and drop an element instantiation into the archetype and select the Event Time element.
REMOVE THE ATTRIBUTE “VALUE” FROM CURRENTDATETIME ELEMENTS
In GDL1, the currentDateTime element required the value attribute to function. This has been changed in GDL2 and so the value attributes needs to be removed from the currentDateTime elements. You notice the issue when you try to execute the guideline, see an exclamation mark on the execution button and when hovering over the execution button see an error message saying “Failed to retrieve attribute [value] value for variable $currentDateTime value at …”, as shown below.
One way to solve the attribute value issue is to save the modified guideline and open it in an editor (for example Notepad++ as used in this tutorial) and search the file for “.value”.
Remove the attribute value from the currentDateTime variables only. Do not remove “.value” from other variables.
Save the file locally and load it in the GDL2 Editor.
Now execute the guideline and verify correct execution.