ISPatientRule.RuleCycle

Description

The rule cycle of the patient rule.

Syntax

object.RuleCycle

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

Return Value

TSPatientRuleCycleType

Example

Display the patient rules loaded by the specified patient ID and their rule cycle 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 Cycle: " & aRule.RuleCycle &_ 
      " (Rule cycle type = " & GetTypeDescription(aRule.RuleCycle) & ")" 
  next

  Profile.MsgBox(aMessage) 
  
end sub

function GetTypeDescription(aCycleType)
  Dim aResult

  Select Case aCycleType
    Case 1
      aResult = "Absolute"
    Case 2
      aResult = "Once" 
    Case 3
      aResult = "Weekly"
    Case 4 
      aResult = "WeekMonthly"          
  End Select
  
  GetTypeDescription = aResult
end function   
Note:

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

Version information

Added in v8.1.0