...
Let result:GLIFDecisionResult =
if not vmr.vitals.pulseRate.oclIsDefined() and not vmr.patient.dob.oclIsDefined() then
GLIFDecisionResult{Question = q,Answer = unknown, Reason = "No pulse rate or age information",Weight = aWeight}
else
If isTachycardic and ageInYears >= factory.PQ(75, 'yr')
then
GLIFDecisionResult{Question = q,Answer = true, Reason = "Patient is tachycardic and aged over 75 years",Weight = aWeight}
else
GLIFDecisionResult{Question = q,Answer = false, Reason = "Patient is not tachycardic and aged over 75 years",Weight = aWeight}
endif
endif
result
and I will leave it you to put the corresponding code for the 'No' link. Line 6 in the editor view is the salient one here. The method 'patient_state_by_name' passes a parameter which is the name of the relevant patient state. GLIFNodes is a class which is in GLIFDecisionNode being in turn a class in the GLIF_VMR package. You can look at this in the Model Explorer.
Here is the finished GLIF:
So this is showing how we can use a patient state as an intermediate state object.
Patient states as preconditions
T