ISRxPackage.GetGroups

Description

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

Syntax

object.GetGroups(aIncludeIndirect)

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

Return Value

ISRxCollection

Returns the groups the Rx package is included in.

Example

Display some information about the Rx packages loaded on the basis of the selected filter, including the groups the Rx packages are included in.

Dim aFilter
Dim aRxPackage
Dim aRxCollection, aRxCollection2
Dim aRxGroup 
Dim i, j
Dim aMessage

Set aFilter = Profile.CreateRxFilter
aFilter.RxName = "Pendine"
aFilter.IncludePreparations = False
aFilter.IncludePackages = True
aFilter.IncludeGroups = False
aFilter.IncludeChemicals = False
aFilter.RxNameSearchMode = 1 'rnsmStartsWith
set aRxCollection = Profile.LoadRxCollection(aFilter)

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

for i = 0 to aRxCollection.Count - 1
  set aRxPackage = aRxCollection.Item(i)
   
  aMessage = aMessage & vbNewLine & (i + 1) & ". " & aRxPackage.AsString 
  
  set aRxCollection2 = aRxPackage.GetGroups(False)
  for j = 0 to aRxCollection2.Count - 1
  set aRxGroup = aRxCollection2.Item(j)  
    aMessage = aMessage & vbNewLine & vbTab & (i + 1) & "." & (j + 1) & ". " &_
      aRxGroup.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, inClinical > Medical Record > New Encounter > Scripts > Rx > Show Information Panel > Groups or inClinical > New Encounter > Scripts > Rx > Show Information Panel > Groups.

Version information

Added in v8.4.0