ISProblemList.SortByDate

Description

This function sorts the patient problems within the collection by Date From.

Syntax

object.SortByDate

Part Attribute Type Description
object Required
The object always implements the ISProblemList interface

Example

Display the number of the patient's problems, sorted within the collection by Date From, their codes, descriptions and dates when they started.

Dim aPatient  
Dim aProblemList
Dim aProblem
Dim i
Dim aMessage

Set aPatient = Profile.SelectPatient 
set aProblemList = aPatient.ProblemList
aProblemList.SortByDate
aMessage = "Problems Count = " & aProblemList.Count

for i = 0 to aProblemList.Count - 1
  set aProblem = aProblemList.Item(i)
  aMessage = aMessage & vbNewLine & (i + 1) & ") Code: " & aProblem.DxCode &_ 
    "; Description: " & aProblem.DxDescription & " (From: " & aProblem.Date & ")" 
next

Profile.MsgBox(aMessage)    
Note:

In Profile Client v8 on User Interface Date can be found in Clinical > Medical Record > Problems > Open Problem > General > Date From field, in Clinical > Clinical Details > Problems > Open Problem > General > Date From field or in Patient > Cases > Clinical > Problems > Open Problem > General > Date From field.

Version information

Added in v7.8.0