ISReferral.LinkedProblems

Description

This function returns the problems linked to each referral of the selected patient.

Syntax

object.LinkedProblems()

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

Return Value

ISProblemList

Returns IDs of the linked problems for each referral of the selected patient.

Example

Display IDs of the linked problems for each referral of the selected patient.

sub main
  Dim aPatient
  Dim aFilter
  Dim aReferrals
  
  Dim aMessage

  Set aPatient = Profile.SelectPatient
  set aFilter = Profile.CreateReferralsFilter
  aFilter.Patient = aPatient
  set aReferrals = Profile.LoadReferrals(aFilter)

  aMessage = "INITIAL STATE:" & GetLinkedProblemsInfo(aReferrals)
  
  Profile.MsgBox(aMessage)
end sub

function GetLinkedProblemsInfo(aReferrals)
  Dim aReferral
  Dim aProblems, aProblem
  Dim aInfo
  
  for each aReferral in aReferrals
    aInfo = aInfo & vbNewLine & "Referral Id: " & aReferral.Id
    set aProblems = aReferral.LinkedProblems
    if aProblems.Count > 0 then aInfo = aInfo & vbNewLine & "  Problem IDs: "   
    for each aProblem in aProblems
      aInfo = aInfo & aProblem.Id & ", "
    next
  next
  GetLinkedProblemsInfo = aInfo
end function  
Note:

In Profile Client v8 on User Interface Problems can be found in Patient > Patient Referrals > Open Outward Referral > Attachments > ticked items in Adverse > Diagnosis > Procedures > Social > Risk nodes.

Version information

Added in v8.4.32