ISProfileForm.PatientId

Description

ID of the patient from the form context.

Syntax

object.PatientId

Part Attribute Type Description
object Required
The object always implements the ISProfileForm interface
Restriction: This property is readonly.

Return Value

int

Example

Display some information about the form, including ID of the patient from the form context.

Dim aForm
Dim aPatient
Dim aMessage

Set aForm = Profile.Form
aMessage =_
  "ShortName: " & aForm.ShortName & vbNewLine &_
  "TypeName: " & aForm.TypeName & vbNewLine &_
  "PatientId: " & aForm.PatientId & vbNewLine
  
if aForm.PatientId = 0 then
  aMessage = aMessage & "There is no patient in the form context"
else
  set aPatient = Profile.PatientUtils.LoadPatientById(aForm.PatientId)
  aMessage = aMessage & "Form Patient: " & aPatient.SurnameFirstName 
end if
  
Profile.MsgBox(aMessage) 
Note: This macro should be executed in any event handler of the form control.

In Profile Client v8 on User Interface Patient ID cannot be found.

Version information

Added in v7.8.0