ISRefillOrderItem.Outcome

Description

The outcome of the order item.

Syntax

object.Outcome

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

Return Value

int

Example

Display the number of the refill order items and some information about them.

sub main 
  Dim aPatient
  Dim aRefillOrderItems, aRefillOrderItem
  Dim aMessage
  Dim i

  Set aPatient = Profile.SelectPatient                            
  set aRefillOrderItems = aPatient.Medications.ApprovedMeds

  aMessage = "Refill Order Items Count = " & aRefillOrderItems.Count & vbNewLine 

  for i = 0 to aRefillOrderItems.Count - 1
    set aRefillOrderItem = aRefillOrderItems.Items(i)
    aMessage = aMessage & vbNewLine & (i + 1) & ". " &_
      "Actioned On: " & aRefillOrderItem.ActionedOn & vbNewLine &_
      "Notes: " & aRefillOrderItem.Notes & vbNewLine &_
      "Outcome: " & GetOutcomeDescr(aRefillOrderItem.Outcome) & vbNewLine &_
      "Order ID: " & aRefillOrderItem.OrderID & vbNewLine &_
      "Is Pharmacy Called: " & aRefillOrderItem.IsPharmacyCalled & vbNewLine &_
      "Requested On: " & aRefillOrderItem.RequestedOn & vbNewLine 

    if not aRefillOrderItem.RxPrescr is nothing then
      aMessage = aMessage & vbNewLine & " - Rx Prescription: " & aRefillOrderItem.RxPrescr.RxName
    end if       
  next

  Profile.MsgBox(aMessage) 

end sub

function GetOutcomeDescr(aOutcome)
  Dim aResult                             
                                                            
  Select Case aOutcome
    Case 0
      aResult = "None"  
    Case 1
      aResult = "Open"
    Case 2
      aResult = "Closed"       
  End Select                     
  
  GetOutcomeDescr = aResult               
end function            
Note:

In Profile Client v8 on User Interface Outcome can be found in Organisation > Work Centre > Work > Prescription Refills > Outcome.

Version information

Added in v7.8.0