ISLetter.ReasonID

Description

ID of the short code of type ‘Letter Reason’.

Syntax

object.ReasonID

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

Return Value

int

Example

Display some information about the letter, including ID of the short code of type ‘Letter Reason’.

Dim aPatient
Dim aLetters, aLetter
Dim aReason
Dim i
Dim aMessage

Set aPatient = Profile.SelectPatient
set aLetters = aPatient.GetLetters (1) ' slcfWordRTF
                                                                 
aMessage =_
  "The number of the letters of the selected format is " & aLetters.Count

for i = 0 to aLetters.Count - 1
  set aLetter = aLetters.Item(i)                             
  aMessage = aMessage & vbNewLine &_
    "Letter Date: " & aLetter.Date & vbNewLine &_
    "Letter Subject: " & aLetter.Subject2 & vbNewLine &_
    "Reason ID: " & aLetter.ReasonID & vbNewLine
  if aLetter.ReasonID > 0 then   
    set aReason = Profile.LoadShortCode(aLetter.ReasonID)
    aMessage = aMessage & vbNewLine &_
      "Reason Description: " & aReason.Description
  end if
next

Profile.MsgBox(aMessage)  
Note: In Profile Client v8 on User Interface Reason ID cannot be found.

Version information

Added in v7.8.0