ISLetter.LinkedDocuments

Description

This function returns the documents linked to each letter of the selected patient.

Syntax

object.LinkedDocuments()

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

Return Value

ISCDOTransactions

Returns IDs of the linked documents for each letter of the selected patient.

Example

Display IDs of the linked documents for each letter of the selected patient.

sub main
  Dim aPatient
  Dim aLetters
  Dim aMessage
  
  Set aPatient = Profile.SelectPatient
  set aLetters = aPatient.GetLetters (1) ' slcfWordRTF

  aMessage = "INITIAL STATE:" & GetLinkedResultsInfo(aLetters)

  Profile.MsgBox(aMessage)
end sub

function GetLinkedResultsInfo(aLetters)
  Dim aLetter
  Dim aDocuments
  Dim aDocument
  Dim aInfo
  
  for each aLetter in aLetters
    aInfo = aInfo & vbNewLine & "Letter ID: " & aLetter.ID
    set aDocuments = aLetter.LinkedDocuments
    if aDocuments.Count > 0 then aInfo = aInfo & vbNewLine & "  Documents IDs: "   
    for each aDocument in aDocuments
      aInfo = aInfo & aDocument.Id & ", "
    next
  next
  GetLinkedResultsInfo = aInfo
end function 
Note:

In Profile Client v8 on User Interface Linked Documents can be found in Clinical > Medical Record > Documents > Open saved document > Attachments > Documents or in Organisation > Work Centre > Communication > Letters > Open saved document > Attachments > Documents.

Version information

Added in v8.4.59