ISRxPackage.BelongsTo

Description

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

Syntax

object.BelongsTo(RxCode)

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

Return Value

bool

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

Example

Display BelongsTo for the Rx packages loaded on the basis of the selected filter.

Dim aFilter
Dim aRxCollection
Dim aRxPackage
Dim aRxCode
Dim i
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)

aRxCode = "MMTC390" 'Gabapentin

aMessage = "Rx Packages Count = " & aRxCollection.Count &_
  vbNewLine & vbNewLine & "#  Name" & vbTab & vbTab & vbTab &_
  vbTab & "Code" & vbTab & vbTab & "Belongs to the group"

for i = 0 to aRxCollection.Count - 1
  set aRxPackage = aRxCollection.Item(i)
  aMessage = aMessage & vbNewLine & (i + 1) & ") " & aRxPackage.Name &_
    vbTab & aRxPackage.Code & vbTab & vbTab & aRxPackage.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 v8.4.0