The time range in which the intervention template is to be considered 'due' before the specified due date.
object.WindowBefore
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISCareVisit interface |
int
Display the time range in which the intervention template is to be considered 'due' before the specified due date.
sub main()
Dim aCarePlan
Dim aMessage
Dim aVisits
Dim aVisit
set aCarePlan = Profile.LoadCarePlanByCode ("FLU")
set aVisits = aCarePlan.Visits
if aVisits.Count = 0 then
aMessage = aMessage & vbNewLine & "There are no care visits!"
else
for i = 0 to aVisits.Count - 1
set aVisit = aVisits.Item(i)
aMessage = aMessage & vbNewLine & aVisit.Description & vbNewLine &_
" The timeline for the intervention template starts from " &_
GetTimeDescription(aVisit.WindowBefore, aVisit.WindowBeforeUnits) &_
" before its specified 'due' date " & vbNewLine &_
" The timeline for the intervention template ends until " &_
GetTimeDescription(aVisit.WindowAfter, aVisit.WindowAfterUnits) &_
" after its specified 'due' date "
next
end if
Profile.MsgBox (aMessage)
end sub
function GetTimeDescription(interval, units)
if interval = 0 then
aResult = "0 days"
else
aResult = interval
select case units
case 0:
case 1: aResult = aResult & " day(s)"
case 2: aResult = aResult & " week(s)"
case 3: aResult = aResult & " month(s)"
case 4: aResult = aResult & " year(s)"
case else: aResult = aResult & " ???"
end Select
end if
GetTimeDescription = aResult
end function
In Profile Client v8 on User Interface Window Before can be found in
.