Previous Topic

Next Topic

Book Contents

Checking for date/time control completion

This example illustrates a way to check whether a date/time control is complete. The script uses the VALIDDATEMAP attribute of the GetValueRF method on the Patient object. VALIDDATEMAP returns an integer that contains a bitmask indicating which elements of the date/time control are complete:

YEAR

1

MONTH

2

DAY

4

HOUR

8

MINUTE

16

SECOND

32

strItem = “0.Visit1.DEM.DEM.0.DEMDOB”

PFYEAR=1
PFMONTH=2
PFDAY=4

PFCOMPLETEDATE = PFYEAR Or PFMONTH Or PFDAY
‘PFCOMPLETEDATE=7

testDateMap = Patient.GetValueRF(strItem, “VALIDDATEMAP”,
0, 0, 0)
If testDateMap=PFCOMPLETEDATE Then
Result.RulePassed = 1
Else
Result.RulePassed = 0
End If

Send Feedback