ISCDOTransaction.LoadRawMessages

Description

This function returns the collection of the raw messages linked to the CDO transaction.

Syntax

object.LoadRawMessages(aLatestMessages)

Part Attribute Type Description
object Required
The object always implements the ISCDOTransaction interface
aLatestMessages In, Required
int
The number of the latest raw messages that will be loaded

Return Value

ISCDOTransactionRawMessages

Returns the collection of the raw messages linked to the CDO transaction.

Example

Display some information about the CDO transactions and the raw messages linked to them.

Dim aPatient
Dim aFilter 
Dim aCDOTransactions, aCDOTransaction
Dim aRawMessages, aRawMessage 
Dim aMessage
Dim i, j

Set aPatient = Profile.SelectPatient
set aFilter = Profile.CreateCDOTransFilter
aFilter.PatientId = aPatient.Id
set aCDOTransactions = Profile.LoadCDOTransactions(aFilter)

aMessage = "CDO Transactions Count = " & aCDOTransactions.Count & vbNewLine
for i = 0 to aCDOTransactions.Count - 1
  set aCDOTransaction = aCDOTransactions.Item(i)
  aMessage = aMessage & vbNewLine & (i + 1) & ") " &_
    "Created on: " & aCDOTransaction.CreatedOn & vbNewLine &_
    "     ID: " & aCDOTransaction.ID & vbNewLine &_
    "     DisplayDate: " & aCDOTransaction.DisplayDate & vbNewLine &_
    "     Provider ID: " & aCDOTransaction.ProviderID & vbNewLine
  
  set aRawMessages = aCDOTransaction.LoadRawMessages(0)
  aMessage = aMessage & _
    "     The raw messages count is " & aRawMessages.Count & vbNewLine   
  for j = 0 to aRawMessages.Count - 1
    set aRawMessage = aRawMessages.Item(j) 
    aMessage = aMessage &_
      "          Raw Message Date: " & aRawMessage.Date & vbNewLine &_
      "          Raw Message : " & vbNewLine & aRawMessage.Message
  next 'j
next 'i 

Profile.MsgBox(aMessage)   
Note: If the 'aLatestMessages' parameter is 0, then all raw messages will be returned.

In Profile Client v8 on User Interface Raw Messages can be found in Clinical > Medical Record > Results > Right-click on the transaction > See Raw Message.

Version information

Added in v8.3.0