ISOrderItem.AdHocText

Description

The name of the ad hoc investigation added to the order.

Syntax

object.AdHocText

Part Attribute Type Description
object Required
The object always implements the ISOrderItem interface
Restriction: This property is readonly.

Return Value

string

Example

Display the number of the orders and some information about the order items, including the names of the ad hoc investigations added to the orders.

Dim aPatient
Dim aOrdersLoader
Dim aOrders, aOrder
Dim aOrderItems, aOrderItem
Dim i, j
Dim aMessage

Set aPatient = Profile.SelectPatient
set aOrdersLoader = Profile.CreateOrdersLoader
aOrdersLoader.Patient = aPatient
aOrdersLoader.ChangedSince = #01/01/2000#

set aOrders = aOrdersLoader.LoadOrders

aMessage = "Orders Count = " & aOrders.Count & vbNewLine

for i = 0 to aOrders.Count - 1
  set aOrder = aOrders.Item(i)
  aMessage = aMessage & vbNewLine & (i + 1) & ") " &_
    "Order: " & aOrder.GetDTModified & vbNewLine
  
  set aOrderItems = aOrder.OrderItems   
  for j = 0 to aOrderItems.Count - 1
    set aOrderItem = aOrderItems.Item(j)
    aMessage = aMessage & (i + 1) & "." & (j + 1) & " " &_
      "-Order Item Creation Date: " & aOrderItem.CreationDate & vbNewLine &_
      "      -Ad Hoc Text: " & aOrderItem.AdHocText & vbNewLine &_
      "      -Additional Info: " & aOrderItem.AdditionalInfo & vbNewLine &_
      "      -Instructions: " & aOrderItem.Instructions & vbNewLine &_
      "      -Investigation Ref: " & aOrderItem.InvestigationRef.Name & vbNewLine 
  next 'j    
next 'i    

Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface Ad Hoc Text can be found in Clinical > Medical Record > Past Orders > Select the order > Edit the related encounter > New Encounter > Pathology/Radiology/Other Ix > Add ad hoc investigation to current order.

Version information

Added in v7.8.0