Skip to content

SQL-065: ClaimQueryProvider.GetConditions

This statement is a read operation invoked through ORM (NHibernate LINQ). Executed by ClaimQueryProvider.GetConditions.

Classification

Field Value
SQL ID SQL-065
Operation type Read
Execution method ORM (NHibernate LINQ)
Database Oracle*
Schema [unqualified]**
Command type N/A (ORM-generated)
Business object ClaimQueryProvider
Criteria property N/A — ORM
Lifecycle method GetConditions

Parameters

Parameter Direction Type Max length Description
claimId Input long N/A Method argument of ClaimQueryProvider.GetConditions bound into the ORM expression; NHibernate generates the bind variable at runtime

Tables

Table Access Columns used
CL_MEDICAL_CONDITION SELECT CLAIM_ID, MEDICAL_CONDITION_ID, UPDATE_NUM, MEDICAL_CONDITION_DESCR, MAJOR_CONTRIBUTING_CAUSE_FL_CD, MEDICALLY_STATIONARY_DATE, REQUEST_DATE, UPDATE_DATE, UPDATE_USER, CONDITION_TYPE_CODE

LINQ statement

Source: Data/SAIF.Data/Queries/Claims/ClaimQueryProvider.cs:352.

return Factory.GetRepository<MedicalCondition>().Query().Where(p => p.Claim.Id == claimId).ToList();

Sample SQL

Inferred SQL: This SQL was inferred from the LINQ statement above and the NHibernate mappings. It is not concrete SQL from source code; NHibernate generates the executed statement at runtime, so aliases, column order, join syntax, and bind-parameter names may differ.

-- Inferred from LINQ (NHibernate mapping translation); not concrete SQL
SELECT
  CMC.CLAIM_ID,
  CMC.MEDICAL_CONDITION_ID,
  CMC.UPDATE_NUM,
  CMC.MEDICAL_CONDITION_DESCR,
  CMC.MAJOR_CONTRIBUTING_CAUSE_FL_CD,
  CMC.MEDICALLY_STATIONARY_DATE,
  CMC.REQUEST_DATE,
  CMC.UPDATE_DATE,
  CMC.UPDATE_USER,
  CMC.CONDITION_TYPE_CODE
FROM CL_MEDICAL_CONDITION CMC
WHERE CMC.CLAIM_ID = :claimId

Translation notes: - p.Claim.Id is the Id of InjuryClaim, so it resolves to the owner key-reference column CMC.CLAIM_ID with no join; CL_INJURY_CLAIM is not accessed as a separate table. - The collection mapped on MedicalCondition is lazy and is not loaded by this statement.

Operations and processes

Sources

  • Data/SAIF.Data/Queries/Claims/ClaimQueryProvider.cs:352