ISCareVisit.ValidityMacro

Description

A macro will run when creating the intervention based on the intervention template.

Syntax

object.ValidityMacro

Part Attribute Type Description
object Required
The object always implements the ISCareVisit interface

Return Value

string

Example

Set up a macro body for the intervention template.

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)    
    aVisit.ValidityMacro = "MsgBox(""" & aVisit.Description & """)"        
  next
end if  
Note:

In Profile Client v8 on User Interface Validity Macro can be found in Maintain > Care Plans > Open Plan > Interventions > Alter Intervention > Valid for > Set Validity Macro.

Version information

Added in v7.8.0