ISRxPreparation.GetGroups

Description

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

Syntax

object.GetGroups(aIncludeIndirect)

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

Return Value

ISRxCollection

Returns the groups the Rx preparation is included in.

Example

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

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

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

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

for i = 0 to aRxCollection.Count - 1
  set aRxPreparation = aRxCollection.Item(i)
   
  aMessage = aMessage & vbNewLine & (i + 1) & ". " & aRxPreparation.AsString 
  
  set aRxCollection2 = aRxPreparation.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, in Clinical > 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