ISRxPreparation.BelongsTo

Description

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

Syntax

object.BelongsTo(RxCode)

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

Return Value

bool

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

Example

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

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

aRxCode = "MMTC11784" 'Mesalazine 

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

for i = 0 to aRxCollection.Count - 1
  set aRxPreparation = aRxCollection.Item(i)
  aMessage = aMessage & vbNewLine & (i + 1) & ") " & aRxPreparation.Name &_
    vbTab & aRxPreparation.Code & vbTab & vbTab & aRxPreparation.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,inClinical > Medical Record > New Encounter > Scripts > Rx > Show Information Panel > Groupsor inClinical > New Encounter > Scripts > Rx > Show Information Panel > Groups.

Version information

Added in v8.4.0