The time range in days (weeks, months, years) in which the intervention is to be considered 'due' after the specified due date.
object.WindowAfterUnits
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISCareVisit interface |
int
Display the time range in days (weeks, months, years) in which the intervention is to be considered 'due' after 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 After Units can be found in
.