This function returns the version of the patient's problem record on the specified date.
object.VersionOnDate(aDate)
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISPatientProblem interface |
|
aDate |
In, Required | DateTime |
The date of the returned version |
Display the codes, descriptions and statuses of the patient's problems in the current and the selected versions.
sub main
Dim aPatient
Dim aProblemList
Dim aCategories
Dim aCategory
Dim aProblems
Dim aProblem
Dim aProblemVers
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 & " " & GetProblemInfo(aProblem) & vbNewLine
else
set aProblemVers = aProblem.VersionOnDate(#06/06/2019#)
aMessage = aMessage & " " & GetProblemInfo(aProblem) & vbNewLine
if aProblemVers is nothing then
aMessage = aMessage & " - no version on this date" & vbNewLine
else
aMessage = aMessage & " -" & GetProblemInfo(aProblemVers) & vbNewLine
end if
end if
next ' aProblem
next ' aCategory
Profile.MsgBox(aMessage)
end sub
function GetProblemInfo(aProblem)
Dim aInfo
aInfo = "Code: " & aProblem.DxCode & "; Description: " & aProblem.DxDescription
if aProblem.ProblemType <> 6 then 'ptPregnancy
aInfo = aInfo & " (Status = " & aProblem.Status & ")"
end if
GetProblemInfo = aInfo
end function
In Profile Client v8 on User Interface Versions can be found in
, in or in .