ISLetter.LinkedUsualPrescriptions

Description

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

Syntax

object.LinkedUsualPrescriptions()

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

Return Value

ISUsualPrescriptions

Returns IDs of the linked usual prescriptions for each letter of the selected patient.

Example

Display IDs of the linked usual prescriptions 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:" & GetLinkedUsuslaMedicationsInfo(aLetters)
  
  Profile.MsgBox(aMessage)
end sub

function GetLinkedUsuslaMedicationsInfo(aLetters)
  Dim aLetter
  Dim aUsualPrescriptions, aUsualPrescription
  Dim aInfo

  for each aLetter in aLetters
    aInfo = aInfo & vbNewLine & "Letter ID: " & aLetter.ID
    set aUsualPrescriptions = aLetter.LinkedUsualPrescriptions
    if aUsualPrescriptions.Count > 0 then aInfo = aInfo & vbNewLine & "  Med IDs: "   
    for each aUsualPrescription in aUsualPrescriptions
      aInfo = aInfo & aUsualPrescription.Oid & ", "
    next
  next
  GetLinkedUsuslaMedicationsInfo = aInfo
end function  
Note:

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

Version information

Added in v8.4.59