The number of the lines within the selected budget request, that contain the requested services, its quantity and prices.
object.Count
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISCaseBudgetRequestLines interface |
int
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
In Profile Client v8 on User Interface Lines can be found in
.