ISPatientRecallVisit.NewFormAction

Description

This function adds a new action form to the patient's intervention.

Syntax

object.NewFormAction aFormShcdID

Part Attribute Type Description
object Required
The object always implements the ISPatientRecallVisit interface
aFormShcdID In, Required
int
ID of the short code

Example

Add a new action form to the patient's intervention.

sub main()
  Dim aPatient,aSCode,aVisits,aMessage
  
  Set aPatient = Profile.SelectPatient
  set aSCode = Profile.LoadShortCodeByCodeType("HEP", 11) ' sscForms 
  set aVisits = aPatient.RecallVisits.Due

  aMessage = aMessage & "BEFORE" & vbNewLine & GetVisistsInfo(aVisits)

  for each aVisit in aVisits
    aVisit.NewFormAction aSCode.Id
  next
 
  aMessage = aMessage & "AFTER" & vbNewLine & GetVisistsInfo(aVisits)
  
  Profile.MsgBox(aMessage)
end sub

function GetVisistsInfo(aVisits)
  for each aVisit in aVisits
     info = info & aVisit.Description & vbNewLine  
     set aActions = aVisit.Actions
     for i = 0 to aActions.Count - 1
       set aAction = aActions.Item(i) 
       info = info & "  -" & aAction.Description & vbNewLine     
     next
  next
  GetVisistsInfo = info
end function 
Note:

In Profile Client v8 on User Interface New Form Action can be found in Clinical > Medical Record > Care Plans > Open active object(s) > Actions > New > Form.

Version information

Added in v7.8.0