ISPatient.GetLatestMovement

Description

This function returns the patient's latest movement by the selected date and case ID.

Syntax

object.GetLatestMovement(aDateTime, aCaseID)

Part Attribute Type Description
object Required
The object always implements the ISPatient interface
aDateTime In, Required
DateTime
The date of the movements
aCaseID In, Required
int
ID of the patient's case

Return Value

ISMovement

Returns the patient's latest movement by the selected date and case ID.

Example

Display POS of the patient's latest movement, returned by the selected date and case ID.

Dim aPatient  
Dim aLatestMovement
Dim aFilter
Dim aCases
Dim aFirstCase
Dim aCaseID
Dim aMessage

Set aPatient = Profile.SelectPatient
set aFilter = Profile.CreateCasesFilter
aFilter.PatientId = aPatient.ID
set aCases = Profile.LoadCases(aFilter) 

if aCases.Count = 0 then
  aMessage = "No cases!"
else   
  set aFirstCase = aCases.Item(0)
  aCaseID = aFirstCase.ID 
  set aLatestMovement = aPatient.GetLatestMovement(#11/22/2018#, aCaseID)
  if aLatestMovement is nothing then
    aMessage = "On 11/22/2018 the selected case wasn't moved."
  else 
    aMessage = "Latest movemment was from " & aLatestMovement.POS.FullName
  end if
end if
      
Profile.MsgBox(aMessage)  
Note:

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

Version information

Added in v7.10.80
parameter aOwner removed in v7.10.80