ISPatientRule.RuleType

Description

The patient rule type.

Syntax

object.RuleType

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

Return Value

TSPatientRuleType

Example

Display the patient rules loaded by the specified patient ID and their types.

sub main

  Dim aPatient
  Dim aPatientId
  Dim aRules
  Dim aRule
  Dim aMessage
  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)
    aMessage = aMessage & vbNewLine & "Rule Type: " & aRule.RuleType &_ 
      " (type = " & GetTypeDescription(aRule.RuleType) & ")" 
  next

  Profile.MsgBox(aMessage) 
  
end sub

function GetTypeDescription(aType)
  Dim aResult

  Select Case aType
    Case 1
      aResult = "Blockout"
    Case 2
      aResult = "Unknown"       
  End Select
  
  GetTypeDescription = aResult
end function   
Note:

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

Version information

Added in v8.1.0