ISEncounterFilter.LastCount

Description

The limitation for loading the encounters that is based on the rule defined in the property 'LastType'.

Syntax

object.LastCount

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 aFilter
Dim aEncounters, aEncounter
Dim i
Dim aMessage

set aPatient = Profile.SelectPatient
set aFilter = Profile.CreateEncounterFilter 
aFilter.PatientId = aPatient.Id
aFilter.LastType = 0 'by items number
aFilter.LastCount = 5

set aEncounters = Profile.LoadEncounters(aFilter)

aMessage = "Encounters Count = " & aEncounters.Count & vbNewLine

for i = 0 to aEncounters.Count - 1
  set aEncounter = aEncounters.Item(i) 
  aMessage = aMessage & vbNewLine &_
    (i + 1) & ")  " & aEncounter.Date & vbTab & " " & aEncounter.Time & vbTab &_
    aEncounter.Id & vbTab & aEncounter.TypeCode     
next      

Profile.MsgBox(aMessage)
Note: If 'Last Type' is equal to 0, 'LastCount' property is used to limit the loading by the number of the encounters. If 'Last Type' is equal to 1, 'LastCount' property is used to limit the loading by the period in days.

In Profile Client v8 on User Interface Last Count cannot be found.

Version information

Added in v7.8.0