ISEncounterFilter.ActivityID

Description

This filter property is used to load the collection of the encounters by ID of the specified service.

Syntax

object.ActivityID

Part Attribute Type Description
object Required
The object always implements the ISEncounterFilter interface

Return Value

int

Example

Display the number of the encounters loaded on the basis of the selected filter and some information about them.

Dim aPatient
Dim aService, aServiceDescription
Dim aFilter
Dim aEncounters, aEncounter
Dim i
Dim aMessage

set aPatient = Profile.SelectPatient
set aService = Profile.LoadService("CON") 
set aFilter = Profile.CreateEncounterFilter 
aFilter.PatientId = aPatient.Id
aFilter.ActivityId = aService.Id 
set aEncounters = Profile.LoadEncounters(aFilter)

aMessage = "The number of the Encounters for " & aPatient.SurnameFirstName &_
  " is " & aEncounters.Count & vbNewLine

for i = 0 to aEncounters.Count - 1
  set aEncounter = aEncounters.Item(i)
 
  if aEncounter.ServiceID > 0 then
    set aService = Profile.LoadServiceById(aEncounter.ServiceID)
    aServiceDescription = aService.Description & " (" & aService.Code & ")"
  else
    aServiceDescription = " - "
  end if     
 
  aMessage = aMessage & vbNewLine &_
    (i + 1) & ") Encounter Date: " & aEncounter.Date & vbNewLine &_
    "     Service Description: " & aServiceDescription & vbNewLine &_
    "     Service ID: " & aEncounter.ServiceID & vbNewLine &_
    "     Service Code: " & aEncounter.ServiceCode & vbNewLine     
next      

Profile.MsgBox(aMessage)
Note: In Profile Client v8 on User Interface Activity ID cannot be found.

Activity can be found in Clinical > Medical Record > Encounters > Open Encounter > Encounter Properties > Activity field.

Version information

Added in v7.8.0