ISRecallObjective.CreateVisit

Description

This function adds an intervention associated with the care plan objective.

Syntax

object.CreateVisit(pCode, pDescr, pDueDate[, isMissingHistoryOrRepeatedVisit = false])

Part Attribute Type Description
object Required
The object always implements the ISRecallObjective interface
pCode In, Required
string
The code of the intervention
pDescr In, Required
string
The code description of the intervention
pDueDate In, Required
DateTime
The due date of the intervention
isMissingHistoryOrRepeatedVisit In, Optional
Default value is false
bool
The flag that indicates whether the new intervention is a missing history or a repeated one.

Return Value

ISPatientRecallVisit

Returns the intervention associated with the care plan objective.

Example

Add the intervention associated with the care plan objective.

Dim aPatient
Dim aRecallPlans
Dim aMessage
Dim aPlan
Dim i
Dim aObjectives
Dim aObjective

Set aPatient = Profile.SelectPatient
set aRecallPlans = aPatient.RecallPlans

if aRecallPlans.Count = 0 then
  Profile.MsgBox("The patient has no care plans!")
  exit sub
end if

for each aPlan in aRecallPlans
  set aObjectives = aPlan.RecallObjectives
  aMessage = aMessage & "PLAN: '" & aPlan.Description & "'" & vbNewLine
  
  if aObjectives.Count = 0 then
    aMessage = aMessage & "  NO OBJECTIVES" & vbNewLine
  end if  
         
  for i = 0 to aObjectives.Count - 1
    set aObjective = aObjectives.Item(i)
    set aVisit = aObjective.CreateVisit("114", "ddddddd", #04/01/2019#, false)
    if aVisit.IsNew then
      aMessage = aMessage & "The intervention " & aVisit.Description &_
        " was successfully created!"
    else     
      aMessage = aMessage & "The intervention " & aVisit.Description &_
        " was successfully updated!"
    end if        
  next  
next

Profile.MsgBox(aMessage) 
Note:

In Profile Client v8 on User Interface Interventions can be found and added in Clinical > Care Plansor Clinical > Medical Record > Care Plans.

Version information

Added in v7.8.0