ISPatientProblemVers.IsCaseDiagnosis

Description

This function checks whether the patient's problem of type 'Diagnosis' has the linked case in the selected problem version.

Syntax

object.IsCaseDiagnosis()

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

Return Value

bool

Returns True if the patient's problem of type 'Diagnosis' has the linked case in the selected problem version.

Example

Display IsCaseDiagnosis for each version of the patient's problems of type 'Diagnosis'.

sub main
  Dim aPatient
  Dim aProblemList
  Dim aCategory
  Dim aProblems, aProblem
  Dim aFilter
  Dim aProblemVersColl, aVersion
  Dim aMessage
  
  Set aPatient = Profile.SelectPatient

  set aProblemList = aPatient.ProblemList
  set aCategory = aProblemList.Categories.Item(0) 'Diagnosis  
  aMessage = aMessage & vbNewLine &_ 
    "---------" & aCategory.Description & "---------"  & vbNewLine  
  set aProblems = aCategory.Problems
  if aProblems.Count = 0 then 
    aMessage = aMessage & vbNewLine & "No diagnoses"
  end if
    for each aProblem in aProblems 
      aMessage = aMessage & "    " & GetProblemInfo(aProblem) & vbNewLine
      set aFilter = Profile.CreateVersionFilter
      aFilter.FromDate = #01/01/2019#
      aFilter.ToDate = #06/06/2019#
      set aProblemVersColl = aProblem.FindVersions(aFilter)
      for each aVersion in aProblemVersColl
        aMessage = aMessage & "      -" & GetProblemInfo(aVersion) & vbNewLine 
      next ' aVersion                  
    next ' aProblem
  Profile.MsgBox(aMessage)
end sub

function GetProblemInfo(aProblem)
  Dim aInfo

  aInfo = "Code: " & aProblem.DxCode & "; Description: " & aProblem.DxDescription &_
    " (the diagnosis has the linked case = " & aProblem.IsCaseDiagnosis & ")"
  GetProblemInfo = aInfo
end function  
Note:

In Profile Client v8 on User Interface title of the case linked to the problem version can be found in Report > Find Objects > Case > Problem > Problem Version.

Version information

Added in v7.8.0