ID of the encounter linked to the patient's message.
object.EncounterID
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISPatientMessage interface |
int
Add the custom patient message and link the selected encounter to the added message, display the patient's messages and IDs of the linked encounters.
Dim tr
Dim aPatient
Dim aProvider
Dim aFilter
Dim aEncounters
Dim aFirstEnc
Dim aCustomMsg
Dim aPatMessages
Dim aPatMessage
Dim aMessage
set tr = Profile.StartMapTransaction
Set aPatient = Profile.SelectPatient
set aProvider = Profile.LoadProvider("MM")
if aProvider.ID = 0 then
Profile.MsgBox("There is no provider with the specified code")
exit sub
end if
set aCustomMsg = Profile.CreateCustomPatientMessage(1, aPatient.ID, aProvider.ID,_
"Hello!")
set aEncounters = aPatient.Encounters.All
if aEncounters.Count > 0 then
set aFirstEnc = aEncounters.Item(0)
aCustomMsg.EncounterID = aFirstEnc.ID
else
aMessage = "The patient has no encounters to link to the new message!" & vbNewLine
end if
tr.SnapShot
set aFilter = Profile.CreatePatientMessagesFilter
aFilter.PatientId = aPatient.ID
set aPatMessages = Profile.LoadPatientMessages(aFilter)
for i = 0 to aPatMessages.Count - 1
set aPatMessage = aPatMessages.Item(i)
aMessage = aMessage & aPatMessage.Text & " (Encouter ID: " &_
aPatMessage.EncounterID & ")" & vbNewLine
next
Profile.MsgBox(aMessage)
In Profile Client v8 on User Interface Encounter ID cannot be found, but the linked Encounter can be found in
.Access changed to
read/write in
v8.2.0