ISProvider.AddRecentPatient

Description

This function returns the list of the provider's recent patients before and after adding a new one.

Syntax

object.AddRecentPatient aPatientID

Part Attribute Type Description
object Required
The object always implements the ISProvider interface
aPatientID In, Required
int
ID of the patient

Example

Display the list of the provider's recent patients before and after adding a new one.

sub main()
  set aPatient = Profile.SelectPatient
  set aProvider = Profile.LoadProvider("PROV")

  aMessage = "BEFORE:" & GetProviderRecentPatients(aProvider)
  aProvider.AddRecentPatient(aPatient.Id)
  aProvider.Save
  aMessage = aMessage & vbNewLine & vbNewLine &_
    "AFTER:" & GetProviderRecentPatients(aProvider)
 
  Profile.MsgBox (aMessage)
end sub

function GetProviderRecentPatients(aProvider)
  aMessage = ""  
  set aPatients = aProvider.GetRecentPatients
  for i = 0 to aPatients.Count - 1
    set aPatient = aPatients.Item(i)
    aMessage = aMessage & vbNewLine & (i + 1) & ") " &_
      aPatient.FirstName & " " & aPatient.LastName 
  next
  GetProviderRecentPatients = aMessage
end function    
Note:

In Profile Client v8 on User Interface Recent Patients can be found in Organisation > Work Centre > Work > Today > Recent Patients.

Version information

Added in v8.4.0