ISProfile.CreatePatientRule

Description

This function adds a new patient rule by selected patient rule type and the specified patient ID.

Syntax

object.CreatePatientRule(aPatientID, aRuleType)

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
aRuleType In, Required
The type of the patient's rule

Return Value

ISPatientRule

Returns the added patient rule by selected patient rule type and the specified patient ID.

Example

Display the description of the added patient rule, its ID and the date when it was created.

Dim aPatient
Dim aPatientRuleType
Dim aPatientRule
Dim aPatientId

Set aPatient = Profile.SelectPatient
aPatientId = aPatient.Id 
aPatientRuleType = 1 'sprtBlockout 
set aPatientRule = Profile.CreatePatientRule(aPatientId, aPatientRuleType)
aPatientRule.Description = "blockout rule 1"

Profile.MsgBox("ID of the patient rule " & aPatientRule.Description &_
  " created on " & aPatientRule.CreatedOn & " is " & aPatientRule.ID)
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