ISCase.Movements

Description

All movements of the case between different places of service and locations.

Syntax

object.Movements

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

Return Value

ISMovements

Example

Display the number of the cases loaded on the basis of the selected filter, their titles, some details of their movements, the dates and time when these cases were opened.

sub main 
  Dim aPatient 
  Dim aFilter
  Dim aCases, aCase
  Dim aMovements, aMovement 
  Dim i
  Dim aMessage
  
  Set aPatient = Profile.SelectPatient
  set aFilter = Profile.CreateCasesFilter
  aFilter.Patient = aPatient
  set aCases = Profile.LoadCases(aFilter)

  aMessage = "The number of the cases for " & aPatient.SurnameFirstName &_ 
    " = " & aCases.Count 
  
  for i = 0 to aCases.Count -1
    set aCase = aCases.Item(i)
    set aMovements = aCase.Movements
    aMessage = aMessage & vbNewLine & (i + 1) & ") " & aCase.CaseTitle &_ 
      " was opened on " & aCase.OpenedOn 
    if aMovements.Count > 0 then
      aMessage = aMessage & vbNewLine & "    Movements: "
      for each aMovement in aMovements
        aMessage = aMessage & vbNewLine & "       -Type: " &_ 
          GetMovType(aMovement.MovType) & " (" & aMovement.Date & ")" 
      next  
    end if   
  next      

  Profile.MsgBox(aMessage)
end sub

function GetMovType(aMovType)
  Dim aResult

  Select Case aMovType
    Case 0
      aResult = "Admit"
    Case 1
      aResult = "Discharge"
    Case 2
      aResult = "Transfer"
    Case 3
      aResult = "Move"
    Case Default
      aResult = "Unknown"                 
  End Select
    
  GetMovType = aResult
end function   
Note:

In Profile Client v8 on User Interface Movements can be found in Organisation > Work Centre > Work > Cases > Edit Case > Administrative > Movements.

Version information

Added in v7.8.0