Operation Details
Description: Search service invoice line item by provider and service invoice. @deprecated Since Curam 5.2 SP6, replaced with { @link curam.cpm.sl.entity.base.ServiceInvoiceLineItem#searchByProviderAndServiceInvoiceID(RetrieveProviderSILIKey)}. This method is not performant. This method takes a long time when a service invoice for a provider is searched. This method is replaced by a more performant method. See release note: CR00303803
Sterotype: nsmulti
SQL
SELECT
  ServiceInvoiceLineItem.serviceInvoiceLineItemID,
  ServiceInvoiceLineItem.serviceInvoiceID,
  ServiceInvoiceLineItem.referenceNo,
  ServiceInvoiceLineItem.externalReferenceNo,
  ServiceInvoiceLineItem.saReferenceNo,
  ServiceInvoiceLineItem.serviceID,
  ServiceInvoiceLineItem.serviceDateFrom,
  ServiceInvoiceLineItem.serviceDateTo,
  ServiceInvoiceLineItem.noOfUnits,
  ServiceInvoiceLineItem.unitAmount,
  ServiceInvoiceLineItem.amountInvoiced,
  ServiceInvoiceLineItem.caseReferenceNo,
  ServiceInvoiceLineItem.caseID,
  ServiceInvoiceLineItem.clientReferenceNo,
  ServiceInvoiceLineItem.clientID,
  ServiceInvoiceLineItem.clientFirstName,
  ServiceInvoiceLineItem.clientLastName,
  ServiceInvoiceLineItem.clientDOB,
  ServiceInvoiceLineItem.providerReferenceNo,
  ServiceInvoiceLineItem.providerID,
  ServiceInvoiceLineItem.providerName,
  ServiceInvoiceLineItem.payeeReferenceNo,
  ServiceInvoiceLineItem.payeeID,
  ServiceInvoiceLineItem.payeeName,
  ServiceInvoiceLineItem.status,
  ServiceInvoiceLineItem.serviceAuthorizationLIID,
  ServiceInvoiceLineItem.expProInd,
  ServiceInvoiceLineItem.allowDuplicateSILI,
  ServiceInvoiceLineItem.payeeNameUpper,
  ServiceInvoiceLineItem.validityStatus,
  ServiceInvoiceLineItem.versionNo
INTO
  :serviceInvoiceLineItemID,
  :serviceInvoiceID,
  :referenceNo,
  :externalReferenceNo,
  :saReferenceNo,
  :serviceID,
  :serviceDateFrom,
  :serviceDateTo,
  :noOfUnits,
  :unitAmount,
  :amountInvoiced,
  :caseReferenceNo,
  :caseID,
  :clientReferenceNo,
  :clientID,
  :clientFirstName,
  :clientLastName,
  :clientDOB,
  :providerReferenceNo,
  :providerID,
  :providerName,
  :payeeReferenceNo,
  :payeeID,
  :payeeName,
  :status,
  :serviceAuthorizationLIID,
  :expProInd,
  :allowDuplicateSILI, 
  :payeeNameUpper,
  :validityStatus,
  :versionNo
FROM
  ServiceInvoice,
  ServiceInvoiceLineItem 
WHERE ServiceInvoiceLineItem.serviceInvoiceID = :serviceInvoiceID 
  AND ServiceInvoiceLineItem.serviceInvoiceID = ServiceInvoice.serviceInvoiceID 
  AND 
  (
    ServiceInvoice.originatorID = :providerID 
    OR 
    (
      ServiceInvoiceLineItem.payeeID = :payeeID 
      OR ServiceInvoiceLineItem.providerID = :providerID 
    ) 
  )