...
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