ISPatientProblem.OnsetAge

Description

The patient's age in years when the problem arose.

Syntax

object.OnsetAge

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

Return Value

int

Example

Display the codes, descriptions of the patient's problems in each category and the age of the patient when these problems arose.

Dim aPatient
Dim aProblemList
Dim aCategories
Dim aCategory
Dim aProblems
Dim aProblem
Dim aMessage

Set aPatient = Profile.SelectPatient

set aProblemList = aPatient.ProblemList
set aCategories = aProblemList.Categories

for each aCategory in aCategories
  aMessage = aMessage & vbNewLine & "---------" & aCategory.Description &_ 
    "---------"  & vbNewLine & vbNewLine 
  set aProblems = aCategory.Problems
  for each aProblem in aProblems
    if aProblem.ProblemType = 6 then  'ptPregnancy  
      aMessage = aMessage & "    " & "Code: " & aProblem.DxCode &_ 
        "; Description: " & aProblem.DxDescription & vbNewLine
    else 
      aMessage = aMessage & "    " &_ 
        "Code: " & aProblem.DxCode & "; Description: " & aProblem.DxDescription &_ 
        " (Onset Age = " & aProblem.OnsetAge & ")" & vbNewLine
    end if  
  next
next 

Profile.MsgBox(aMessage)  
Note: If the Onset Age field was not populated on User Interface, the property returns -1.

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

Version information

Added in v7.8.0