The patient the problem refers to in the selected problem version.
object.Patient
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISPatientProblemVers interface |
Display the full names of the patients the loaded problems refer to in each version.
sub main
Dim aPatient
Dim aProblemList
Dim aCategories, aCategory
Dim aProblems, aProblem
Dim aFilter
Dim aProblemVersColl, aVersion
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
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
next ' aCategory
Profile.MsgBox(aMessage)
end sub
function GetProblemInfo(aProblem)
Dim aInfo
if aProblem.ProblemType <> 6 then 'ptPregnancy
aInfo = "The patient " &_
aProblem.Patient.SurnameFirstName &_
" has a problem with the code: " & aProblem.DxCode & " (Description: " &_
aProblem.DxDescription & ")"
end if
GetProblemInfo = aInfo
end function