ISProfileForm.ChangeFormPatient

Description

This function changes the patient the form is created for.

Syntax

object.ChangeFormPatient aPatient

Part Attribute Type Description
object Required
The object always implements the ISProfileForm interface
aPatient In, Required
The patient the form is created for

Example

Change the patient the form is created for.

Dim aForm
Dim aPatient
Dim aPrevPatientName
Dim aMessage

Set aForm = Profile.Form
set aPatient = aForm.Patient
if aPatient is nothing then
  aPrevPatientName = "-"
else
  aPrevPatientName =  aPatient.SurnameFirstName 
end if

set aPatient = Profile.SelectPatient
aForm.ChangeFormPatient (aPatient)
aMessage = "The patient of the form was changed from " & aPrevPatientName &_
  " to " & aPatient.SurnameFirstName

Profile.MsgBox (aMessage)  
Note: This macro should be executed in any event handler of the form control.

See also

Version information

Added in v7.8.0