ISPatientEncounters.Last5Years

Description

The patient's encounters for the last 5 years.

Syntax

object.Last5Years

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

Return Value

ISEncounters

Example

Display the number of the patient's encounters for the last 5 years, their dates and contacts.

Dim aPatient  
Dim aEncounters
Dim aEncounter
Dim aContact
Dim aMessage

Set aPatient = Profile.SelectPatient 
set aEncounters = aPatient.Encounters
aMessage = "Encounters Count for the last 5 years = " & aEncounters.Last5Years.Count

for i = 0 to aEncounters.Last5Years.Count - 1
  set aEncounter = aEncounters.Last5Years.Item(i)
  aMessage = aMessage & vbNewLine & aEncounter.date
  if aEncounter.Contacts.Count <> 0 then
    for each aContact in aEncounter.Contacts
      aMessage = aMessage & vbNewLine & "    -Contact Subject: " & aContact.Subject
    next
  end if  
next 
Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface Encounters can be found in Clinical > Medical Record > Encounters.

Version information

Added in v7.8.0