ISRxMedication.GetEntityIdByIdentifier

Description

This function returns the entities of the Rx medication by the specified identifier.

Syntax

object.GetEntityIdByIdentifier(aIdentifier)

Part Attribute Type Description
object Required
The object always implements the ISRxMedication interface
aIdentifier In, Required
string
The entity identifier

Return Value

ISList

Returns the entities of the patient by the specified identifier.

Example

Add a new entity with the identifier 'Identifier1' to the loaded Rx medication. Get the entities with the specified identifier and display their count.

Dim aRxMedication
Dim aTr
Dim aSource
Dim aIdentifier
Dim aValue  
Dim aEntities1, aEntities2, aEntity  
Dim aRxMedicationInfo  

Set aTr = Profile.StartMapTransaction 
set aRxMedication = Profile.LoadRxMedication(1507)

if aRxMedication is nothing then 
  Profile.MsgBox("There is no Rx Medication with the specified ID")
  exit sub
end if

aIdentifier = "Identifier1"

set aEntities1 = aRxMedication.GetEntityIdByIdentifier(aIdentifier)
aRxMedicationInfo = "Before adding: " &_
   aRxMedication.RxName & " has " & aEntities1.Count & " entities" & vbNewLine
  
aSource = "Source1"
aValue = "Value1" 
set aEntity = aRxMedication.AddEntityId(aSource, aIdentifier, aValue)
aTr.SnapShot
  
if not aEntity is nothing then
  aRxMedicationInfo = aRxMedicationInfo & "New Entity with identifier '" &_
    aIdentifier & "' was added successfully " & vbNewLine 
end if
  
set aEntities2 = aRxMedication.GetEntityIdByIdentifier(aIdentifier)
aRxMedicationInfo = aRxMedicationInfo & "After adding: " &_ 
  aRxMedication.RxName & " has " & aEntities2.Count & " entities"  

Profile.MsgBox(aRxMedicationInfo) 
Note:

In Profile Client v8 on User Interface Entity Id cannot be found, but Rx medications can be found in Clinical > Medical Record > MedChart.

Version information

Added in v8.2.0