Skip to content

SQL-049: BillQueryProvider.GetCbpProcedureCode

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

Classification

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

Parameters

Parameter Direction Type Max length Description
code Input string N/A Method argument of BillQueryProvider.GetCbpProcedureCode bound into the ORM expression; NHibernate generates the bind variable at runtime

Tables

Table Access Columns used
CBP_PROCEDURE_CODE SELECT CODE, UPDATE_NUM, CODE_DESCR, SHORT_DESCR, EFF_DATE, EXP_DATE, UPDATE_USER, UPDATE_DATE, ICD_VERSION_CODE

LINQ statement

Source: Data/SAIF.Data/Queries/Claims/BillQueryProvider.cs:221, the method starts at :218.

Factory.GetRepository<CbpProcedureCode>()
    .Query()
    .SingleOrDefault(x => x.Code  == code);

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
  CPC.CODE,
  CPC.UPDATE_NUM,
  CPC.CODE_DESCR,
  CPC.SHORT_DESCR,
  CPC.EFF_DATE,
  CPC.EXP_DATE,
  CPC.UPDATE_USER,
  CPC.UPDATE_DATE,
  CPC.ICD_VERSION_CODE
FROM CBP_PROCEDURE_CODE CPC
WHERE CPC.CODE = :code
-- NHibernate expects at most one row

Translation notes: - Unused parameter: icdVersion is accepted by GetCbpProcedureCode but is not used in the predicate, so ICD_VERSION_CODE is selected but not filtered.

Operations and processes

Business rules

Sources

  • Data/SAIF.Data/Queries/Claims/BillQueryProvider.cs:220