ISProfile.LoadPatientRules

Description

This function returns the patient rules with the specified patient ID.

Syntax

object.LoadPatientRules(aPatientID)

Part Attribute Type Description
object Required
The object always implements the ISProfile interface
aPatientID In, Required
int
ID of the patient whose rules are being loaded

Return Value

ISPatientRules

Returns the patient rules with the specified patient ID.

Example

Display the patient rules loaded by the specified patient ID, their descriptions, dates when they were created and the provider they were created by.

Dim aPatient
Dim aPatientId
Dim aRules
Dim aRule
Dim aMessage
Dim aProvider
Dim i

Set aPatient = Profile.SelectPatient 
aPatientId = aPatient.Id
set aRules = Profile.LoadPatientRules(aPatientId)

aMessage = "Rules Count = " & aRules.Count & vbNewLine
for i = 0 to aRules.Count - 1
  set aRule = aRules.Item(i)
  set aProvider = Profile.LoadProviderById(aRule.CreatedBy)
  aMessage = aMessage & vbNewLine & "The patient rule '" & aRule.Description &_
    "' was created on " & aRule.CreatedOn & " by " & aProvider.FullName 
next

Profile.MsgBox(aMessage) 
Note:

In Profile Client v8 on User Interface Patient Rules can be found in Patient > Alter Patient > Bookings > Patient Rules.

Version information

Added in v8.1.0