Skip to content

SQL-016: Incurred-cost aggregation

This document describes SQL-016, the incurred-cost aggregation statement or call used by SAIF.Business.

Classification

Field Value
SQL ID SQL-016
Operation type Read
Execution method Inline
Database Oracle
Schema [unqualified]**
Command type Text
Business object ClaimServices
Criteria property N/A
Lifecycle method IncurredCostsExist

Parameters

This SQL statement has no explicit parameters in the provided findings.

Tables

Table Access Columns used
CL_INCURRED_CATEGORY_COST SELECT See sample SQL and source implementation.
CL_INCURRED_COST_HISTORY SELECT See sample SQL and source implementation.

Sample SQL

SELECT NVL(SUM(cos.incurred_cost_amt), 0) AS IncurredCostAmt
  FROM CL_INCURRED_CATEGORY_COST cos,
       CL_INCURRED_COST_HISTORY his
 WHERE his.claim_id = :ClaimID
   AND his.cl_incurred_cost_hist_seq_num = cos.cl_incurred_cost_hist_seq_num
   AND his.claim_cost_date = (
       SELECT MAX(his2.claim_cost_date)
         FROM CL_INCURRED_CATEGORY_COST cos2,
              CL_INCURRED_COST_HISTORY his2
        WHERE his2.claim_id = :ClaimID
          AND cos2.cl_incurred_cost_hist_seq_num = his2.cl_incurred_cost_hist_seq_num
   )

Operations and processes

Note: Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Business\SAIF.Business\ClaimServices.vb