ISPatient.LoadPrincipalDiagnoses

Description

This function returns the diagnoses with principal nature by the selected case ID of the patient.

Syntax

object.LoadPrincipalDiagnoses(aCaseID)

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

Return Value

ISProblemList

Returns the diagnoses with principal nature by the selected case ID of the patient.

Example

Display the number of the principal diagnoses for the selected case and list their codes and descriptions.

Dim aPatient  
Dim aPrincipalDiagnoses
Dim aPrincipalDiagnosis
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
  Profile.MsgBox("No cases!")
else   
  set aFirstCase = aCases.Item(0)
  aCaseID = aFirstCase.ID 
  set aPrincipalDiagnoses = aPatient.LoadPrincipalDiagnoses(aCaseID)
  aMessage = "Principal Diagnoses Count= " & aPrincipalDiagnoses.Count
    
  for i = 0 to aPrincipalDiagnoses.Count - 1
    set aPrincipalDiagnosis = aPrincipalDiagnoses.Item(i)
    aMessage = aMessage & vbNewLine
    aMessage = aMessage & aPrincipalDiagnosis.DxCode & ", "
    aMessage = aMessage & aPrincipalDiagnosis.DxDescription
  next
  
  Profile.MsgBox(aMessage)

end if 
Note:

In Profile Client v8 on User Interface Principal Diagnoses can be found in Clinical > Medical Record > Problems > Diagnosis.

Version information

Added in v7.8.0