ISEncounter.ServiceID

Description

ID of the service (activity) given to the patient during the encounter.

Syntax

object.ServiceID

Part Attribute Type Description
object Required
The object always implements the ISEncounter interface
Restriction: This property is readonly.

Return Value

int

Example

Display the number of the encounters 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 Encounters 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) & ") The Patient Name: " & aPatient.SurnameFirstName & vbNewLine &_
    "     The 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 Service ID cannot be found, but Activity can be found in Clinical > Medical Record > Encounters > Open Encounter > Encounter Properties > Activity field.

Version information

Added in v7.8.0