Previous Topic

Next Topic

Book Contents

RefName checker

The following script illustrates a calculation that requires input of three values for which the RefName path is specified in the script. When you run the rule with the RefName checker on, the output shows that the rule debugger has checked each RefName path. Additionally, because this is a calculation rule, the rule debugger displays the result of the calculation.

HT = CDbl(Patient.GetValueRF("0.Visit1.DEM.DEM.0.HEIGHT.PFHT_TC","",0,0,0))
WC = CDbl(Patient.GetValueRF("0.Visit1.DEM.DEM.0.WRISTCIRC.PFWC_TC","",0,0,0))
framesize = "Unknown"

if (HT <> 0 and WC <> 0) Then
HTCM = HT * 2.54
WCCM = WC * 2.54
Radius = HTCM/WCCM

if (Patient.GetValueRF("0.Visit1.DEM.DEM.0.GENDER.GENDERRADIO","",0,0,0) = 1) Then
if Radius > 10.4 Then framesize = "Small Frame"
if (Radius >= 9.6 and Radius <= 10.4) Then framesize = "Medium Frame"
if (Radius < 9.6 ) Then framesize = "Large Frame"

Else
if Radius > 11.0 Then framesize = "Small Frame"
if (Radius >= 10.1 and Radius <= 11.0) Then framesize = "Medium Frame"
if (Radius < 10.1 ) Then framesize = "Large Frame"
End If
End If

Result.Result = framesize

Patient.SetValue "0.Visit1.DEM.DEM.0.FRAME.FRAME_CC", "", 0, 0, 0, framesize

Send Feedback