ISPatient.AddEntityId

Description

This function adds an entity to the patient.

Syntax

object.AddEntityId(aSource, aIdentifier, aValue)

Part Attribute Type Description
object Required
The object always implements the ISPatient interface
aSource In, Required
string
The entity source
aIdentifier In, Required
string
The entity identifier
aValue In, Required
string
The entity value

Return Value

ISEntityID

Returns the added entity.

Example

Add two entities with the identifier "My identifier" to the patient. Get the entities with the specified identifier and display their count.

Dim aPatient
Dim aTr
Dim aEntityCollection
Dim aEntityCollection2

Set aTr = Profile.StartMapTransaction
set aPatient = Profile.SelectPatient

set aEntityCollection = aPatient.GetEntityIdByIdentifier ("My identifier")
Profile.MsgBox("Entities Count before changes = " & aEntityCollection.Count)

aPatient.AddEntityId "My source  1", "My identifier", "My value A"
aPatient.AddEntityId "My source  2", "My identifier", "My value B"
aPatient.Save
aTr.SnapShot

set aEntityCollection2 = aPatient.GetEntityIdByIdentifier ("My identifier")
Profile.MsgBox("Entities Count after changes = " & aEntityCollection2.Count)
Note:

In Profile Client v8 on User Interface Entity Id can be found and added in Patient > Alter Patient > Registry.

Version information

Added in v7.8.0