Operation Details
Description: Reads the performance measure against all utilization contracts for the provider. @deprecated Since Curam 6.0 SP1, as the query has been converted into an equivalent dynamic queryand this method is no longer accessed by the application. Hence this method is deprecated. See release note: CR00260936.
Sterotype: ns
SQL
SELECT
  SUM(paymentAmt)
INTO
  :count 
FROM
  
  ( 
  SELECT
    SUM(InstructionLineItem.amount) AS paymentAmt 
  FROM
    CaseDecisionFinancialComp,
    CaseDecisionObjective,
    InstructionLineItem 
    WHERE CaseDecisionFinancialComp.caseDecisionObjectiveID = CaseDecisionObjective.caseDecisionObjectiveID 
    AND InstructionLineItem.financialCompID = CaseDecisionFinancialComp.financialCompID 
    AND CaseDecisionObjective.overflowInd = :overflowInd 
    AND CaseDecisionObjective.relatedReference IN  
    ( 
    SELECT
      CAST(ServiceInvoiceLineItem.serviceInvoiceLineItemID AS CHAR(20))
    FROM
      ServiceInvoiceLineItem,
      ProviderOffering,
      ServiceOffering 
      WHERE ProviderOffering.providerConcernRoleID = :resourceID 
      AND ProviderOffering.serviceOfferingID = ServiceOffering.serviceOfferingID 
      AND ServiceInvoiceLineItem.serviceID = ServiceOffering.serviceOfferingID 
      AND ProviderOffering.providerOfferingID IN 
      ( 
      SELECT
        ContractPOLink.providerOfferingID 
      FROM
        UtilizationContract,
        ContractVersion,
        ContractPOLink 
      WHERE ContractVersion.concernRoleID = :resourceID 
        AND ContractVersion.contractType = :contractType 
        AND ContractVersion.status = :contractStatus 
        AND ContractVersion.contractVersionID = ContractPOLink.contractVersionID 
        AND ServiceInvoiceLineItem.serviceDateFrom BETWEEN ContractVersion.startDate AND ContractVersion.endDate 
        AND UtilizationContract.contractVersionID = ContractVersion.contractVersionID 
      ) 
    ) 
    AND InstructionLineItem.instructionLineItemType = :siliInstructionLineItemType 
    AND InstructionLineItem.instructLineItemCategory = :instructLineItemCategory 
    AND InstructionLineItem.statusCode = :statusCode 
  
  UNION ALL
    
  SELECT
    SUM(InstructionLineItem.amount) AS paymentAmt 
  FROM
    CaseDecisionFinancialComp,
    CaseDecisionObjective,
    InstructionLineItem 
  WHERE CaseDecisionFinancialComp.caseDecisionObjectiveID = CaseDecisionObjective.caseDecisionObjectiveID 
    AND InstructionLineItem.financialCompID = CaseDecisionFinancialComp.financialCompID 
    AND CaseDecisionObjective.overflowInd = :overflowInd 
    AND CaseDecisionObjective.relatedReference IN 
    ( 
    SELECT
      CAST(ProviderRosterLineItem.providerRosterLineItemID  AS CHAR(20))
    FROM
      ProviderRosterLineItem,
      RosterLineItem,
      Roster 
    WHERE Roster.concernRoleID = :resourceID 
      AND Roster.rosterID = RosterLineItem.rosterID 
      AND RosterLineItem.rosterLineItemID = ProviderRosterLineItem.rosterLineItemID 
      AND Roster.serviceID IN 
      ( 
      SELECT
        ContractPOLink.providerOfferingID 
      FROM
        UtilizationContract,
        ContractVersion,
        ContractPOLink 
      WHERE ContractVersion.concernRoleID = :resourceID 
        AND ContractVersion.contractType = :contractType 
        AND ContractVersion.status = :contractStatus 
        AND ContractVersion.contractVersionID = ContractPOLink.contractVersionID 
        AND RosterLineItem.serviceFrom BETWEEN ContractVersion.startDate AND ContractVersion.endDate 
        AND UtilizationContract.contractVersionID = ContractVersion.contractVersionID 
      ) 
    ) 
    AND InstructionLineItem.instructionLineItemType = :rosterInstructionLineItemType 
    AND InstructionLineItem.instructLineItemCategory = :instructLineItemCategory 
    AND InstructionLineItem.statusCode = :statusCode 
  ) InstructionLineItem