Should you require any more information or have encountered a problem, please call the support helpdesk on (07) 5456 6000.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Overview

The last tutorial showed how archetypes can hold data for persistence and reuse with some GLIF. While this is effective, an alternative approach is to use patient states as intermediate state objects. In other words the patient state can hold a value which is then accessible to GELLO, within the GLIF application. This approach avoids encroaching on GELLO immutablity upon the EHR, which could technically be an issue when using archetypes (archetypes can be thought of as being part of the information model; and a tenet of GELLO is that it is side effect free). This tutorial will show a couple of examples of this use including GELLO for patient states. It finishes with showing GELLO for Sync nodes as alluded to in an earlier tutorial.

 

Patient states as intermediate state objects

This example will demonstrate how we can store a boolean value of True or False in a patient state for use later on in the GLIF flowchart.

First we will need some test data, in this case we will use a xml format. Save the following at GLIF_TutorialSix.xml


<?xml version="1.0" encoding="UTF-8"?>
<singlePatient xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./iso-21090-datatypes.xsd">
    <patient>
        <patientID
            root="1.2.36.174030967"
            extension="1234567892"
            reliability="VRF"
            scope="OBJ"/>
        <patientName>
            <part type="GIV" value="Alice" />
            <part type="GIV" value="A." />
            <part type="FAM" value="Someone" />
        </patientName>
        <dob value="19350621"/>
        <gender code="248152002"
            codeSystem="2.16.840.1.113883.6.96"
            codeSystemName="SNOMED-CT">
            <displayName value = "Female" />
        </gender>
        <ssn value="987-65-4320"/>
        <address use="WP">
            <part type="AL" value="1050 W Wishard Blvd" />
            <part type="CTY" value="Indianapolis" />
            <part type="STA" value="IN" />
            <part type="ZIP" value="46240" />
        </address>
    </patient>
    <allergies>
<allergenType code="373873005"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED-CT">
<displayName value = "pharmaceutical / biologic product" />
</allergenType>
<allergenCode code="111088007"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED-CT">
<displayName value = "latex (product)" />
</allergenCode>
<allergySeverity code="24484000"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED-CT">
<displayName value = "severe" />
</allergySeverity>
<allergyReaction code="39579001"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED-CT">
<displayName value = "anaphylaxis" />
</allergyReaction>
<identificationDate value="1980"/>
</allergies>
<allergies>
<allergenType code="373873005"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED-CT">
<displayName value = "pharmaceutical / biologic product" />
</allergenType>
<allergenCode code="27658006"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED-CT">
<displayName value = "Amoxicillin" />
</allergenCode>
<allergySeverity code="24484000"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED-CT">
<displayName value = "severe" />
</allergySeverity>
<allergyReaction code="39579001"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED-CT">
<displayName value = "anaphylaxis" />
</allergyReaction>
<identificationDate value="1980"/>
</allergies>
<historyOfPastIllness>
<pastIllness code="302914006"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED-CT">
<displayName value = "Barrett's esophagus" />
</pastIllness>
<temporalContext code="410587003"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED-CT">
<displayName value = "Past - specified" />
</temporalContext>
<illnessDates>
<!--IVL_TS -->
<low value="2000" />
</illnessDates>
<notesOnIllness></notesOnIllness>
</historyOfPastIllness>
<medications>
<currentMedications>
<!--1-->
<medicationCode code="317334001"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED-CT">
<displayName value = "Esomeprazole 40mg tablet" />
<translation code="606731"
codeSystem="2.16.840.1.113883.6.88"
codeSystemName="RxNorm">
<displayName value = "Esomeprazole 40 MG Delayed Release Oral Capsule [Nexium]" />
</translation>
</medicationCode>
<dosingSig code="229797004"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED-CT">
<displayName value = "Once daily" />
</dosingSig>
<requestedGiveRate></requestedGiveRate><!--PQ eg 100mls an hour-->
<medicationStartDate value="20160128" />
<medicationStopdate> </medicationStopdate>
<totalDailyDose> </totalDailyDose>
<reasonForCessation> </reasonForCessation>
<indication code="302914006"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED-CT">
<displayName value = "Barrett's esophagus" />
</indication>
<replacedBy> </replacedBy>
</currentMedications>
</medications>
<vitals>
<pulseRate>
<observationCode code="364075005"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED-CT">
<displayName value = "pulse rate" />
</observationCode>
<dateTime value = "20160618" />
<value xsi:type = "PQ" value = "164" unit = "bpm" />
</pulseRate>
</vitals>
</singlePatient>

 

Note we have a date of birth and a pulse rate available.

Now open the GLIF Editor and go File, New if necessary to clear the workspace.Make sure you save anything you had there before  that you want to use again (or you can open a new instance of the GLIFEditor - ie have two running at once - this can be handy when looking to cut and past GELLO code for example).

Put in an initial patient state linked to an action then link that to another patient state. Put an action linked to the second patient state. Name them 'Start', 'Consider tachycardia', 'tachycardic?' and 'tachycardia in the elderly'. Make the initial patient state the first step.

 

You can add some didactics to the action boxes, something like 'Tachycardia can represent significant illness' for the first, and 'Tachycardia in the elderly be the result of uncontrolled atrial fibrillation' for the second.

Ok, let's edit the 'tachycardic?' patient state. When you right click and go Edit properties notice the Edit Gello button in the bottom left of the window. Click on this.

Patient state GELLO is somewhat simpler in that we simply need to return a Boolean value rather than a GLIFDecisionResult class instance.

Here is the code to insert:

   Context GLIF_VMR::GLIFDecisionNode
   Let heartRate_SCT:CD = CD{code = '364075005',
    codeSystem = '2.16.840.1.113883.6.96',
    codeSystemName ='SNOMED-CT'
    }
   Let mostRecentPulseRate:PQ = If vmr.vitals.pulseRate.oclIsDefined() then
    vmr.vitals.pulseRate->select(observationCode=heartRate_SCT)->sortedBy(dateTime)->last().value.oclAsType(PQ) else
      null
    endif
   Let has_Tachycardia: Boolean =
    if mostRecentPulseRate > factory.PQ(120, 'bpm') then true
           else false
    endif
   has_Tachycardia

jsvdjv

 

 

 

 

 

 

 

 

 

  • No labels