ISProfileForm.GetEncounter

Description

This function returns the encounter linked to the form.

Syntax

object.GetEncounter()

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

Return Value

ISEncounter

Returns the encounter linked to the form.

Example

Display some information about the form and the encounter linked to it.

Dim aForm
Dim aFormInfo
Dim aEncounter

Set aForm = Profile.Form
aFormInfo =_
  "Form Short Name: " & aForm.ShortName & vbNewLine &_ 
  "Form Type Name: " & aForm.TypeName & vbNewLine 
set aEncounter = aForm.GetEncounter
if not aEncounter is nothing then
  aFormInfo = aFormInfo &_
    "Encounter Date: " & aEncounter.Date & vbNewLine &_ 
    "Encounter Pos Code: " & aEncounter.PosCode & vbNewLine &_ 
    "Encounter Provider Code: " & aEncounter.ProviderCode 
else
  aFormInfo = aFormInfo & "No encounter linked to the form"
end if
  
Profile.MsgBox(aFormInfo) 
Note: This macro should be executed in any event handler of the form control.

Version information

Added in v7.8.0