ISRxGroup.BelongsTo

Description

This function checks if the Rx group belongs to the group with the specified code.

Syntax

object.BelongsTo(RxCode)

Part Attribute Type Description
object Required
The object always implements the ISRxGroup interface
RxCode In, Required
string
The code of the Rx group

Return Value

bool

Returns True if the loaded Rx group belongs to the group with the specified code.

Example

Display BelongsTo for the loaded Rx groups.

Dim aRxCollection
Dim aRxGroup
Dim aRxCode
Dim i
Dim aMessage

Set aRxCollection = Profile.LoadRxGroupByName("Penicillins")

aRxCode = "MMSCT8" 'Infections and Infestations 

aMessage = "Rx Groups Count = " & aRxCollection.Count &_
  vbNewLine & vbNewLine & "#  Name" & vbTab & vbTab & "Code" &_
  vbTab & vbTab & "As String" & vbTab & vbTab & "OID" 

for i = 0 to aRxCollection.Count - 1
  set aRxGroup = aRxCollection.Item(i)
  aMessage = aMessage & vbNewLine & (i + 1) & ") " & aRxGroup.Name &_
    vbTab & aRxGroup.Code & vbTab & aRxGroup.AsString & vbTab &_
    aRxGroup.BelongsTo(aRxCode)  
next

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 v7.10.120
Added in v8.1.0