ISCaseBudgetRequestLine.Total

Description

The total price of the requested service.

Syntax

object.Total

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

Return Value

Decimal

Example

Display the number of the budget requests related to the selected case and some information about them, including the requested services, their quantity and prices.

sub main
  Dim aResult 
  Dim aPatientID 
  Dim aCaseID
  Dim aCase
  Dim aBudgetRequests, aBudgetRequest 
  Dim aLines, aLine
  Dim aService
  Dim i,j
  Dim aMessage
  
  aResult = Profile.Lookup_PatientCaseSearch(aPatientID, aCaseID, "Case Search", True)

  Set aCase = Profile.OpenCase(aCaseID)
  set aBudgetRequests = aCase.GetBudgetRequests
  aMessage = aCase.CaseTitle & " was opened on " & aCase.OpenedOn & vbNewLine &_ 
    "Budget Requests Count = " & aBudgetRequests.Count  
  
  for i = 0 to aBudgetRequests.Count -1
    set aBudgetRequest = aBudgetRequests.Item(i)
    set aLines = aBudgetRequest.GetLines
    aMessage = aMessage & vbNewLine & (i + 1) & ") Request Info:" & vbNewLine &_ 
      "       Date: " & aBudgetRequest.Date & vbNewLine &_ 
      "       Reference = " & aBudgetRequest.Reference & vbNewLine &_ 
      "       Status = " & GetStatusDescr(aBudgetRequest.Status) 
    for j = 0 to aLines.Count -1
      set aLine = aLines.Item(j) 
      if not aLine.Service is nothing then
        aService = Profile.LoadService(aLine.Service.Code).Description
      else
        aService = "No selected service" 
      end if  
      aMessage = aMessage & vbNewLine & "     Line Info: " & vbNewLine &_ 
        "       Service: " & aService & vbNewLine &_ 
        "       Price: " & aLine.Price & vbNewLine &_ 
        "       Quantity = " & aLine.Quantity & vbNewLine &_ 
        "       Total = " & aLine.Total & vbNewLine &_ 
        "       Line Type = " & GetaLineTypeDescr(aLine.LineType)
    next            
  next          

  Profile.MsgBox(aMessage)
end sub

function GetStatusDescr(aStatus)
  Dim aResult

  Select Case aStatus
    Case 1
      aResult = "Unknown"
    Case 2
      aResult = "Pending"
    Case 4
      aResult = "Accepted"
    Case 8
      aResult = "Rejected"
    Case Else
      aResult = "Not Identified"            
  End Select
  
  GetStatusDescr = aResult
end function

function GetaLineTypeDescr(aLineType)
  Dim aResult

  Select Case aLineType
    Case 1
      aResult = "Request"
    Case 2
      aResult = "Approved"          
  End Select
  
  GetaLineTypeDescr = aResult
end function  
Note:

In Profile Client v8 on User Interface Total Price can be found in Organisation > Work Centre > Work > Cases > Edit Case > Administrative > Financial > Budget tab > Edit the selected budget request > General > Total.

Version information

Added in v7.8.0