ISRxGroup.GetGroups

Description

This function returns the groups the Rx group is included in.

Syntax

object.GetGroups(aIncludeIndirect)

Part Attribute Type Description
object Required
The object always implements the ISRxGroup interface
aIncludeIndirect In, Required
bool
If aIncludeIndirect = True, the indirect groups of the Rx group are shown

Return Value

ISRxCollection

Returns the groups the Rx group is included in.

Example

Display some information about the loaded Rx groups, including the groups they are included in.

Dim aRxGroup1, aRxGroup2
Dim aRxCollection, aRxCollection2
Dim i, j
Dim aMessage

Set aRxCollection = Profile.LoadRxGroupByName("Penicillins")

aMessage = "Rx Groups Count = " & aRxCollection.Count & vbNewLine 

for i = 0 to aRxCollection.Count - 1
  set aRxGroup1 = aRxCollection.Item(i)
   
  aMessage = aMessage & vbNewLine & (i + 1) & ". " & aRxGroup1.AsString 
  
  set aRxCollection2 = aRxGroup1.GetGroups(False)
  for j = 0 to aRxCollection2.Count - 1
  set aRxGroup2 = aRxCollection2.Item(j)  
    aMessage = aMessage & vbNewLine & vbTab & (i + 1) & "." & (j + 1) & ". " &_
      aRxGroup2.AsString   
  next 'j      
next 'i

Profile.MsgBox(aMessage)    
Note:

In Profile Client v8 on User Interface Groups can be found in Maintain > Formulary > Rx > Show Information Panel > Groups, in Clinical > Medical Record > New Encounter > Scripts > Rx > Show Information Panel > Groups or in Clinical > New Encounter > Scripts > Rx > Show Information Panel > Groups.

Version information

Added in v8.4.0