Skip to content

SQL-106: EbillHealthInformationQueryProvider.GetDrgCode

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

Classification

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

Parameters

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

Tables

Table Access Columns used
EBILL_HEALTH_INFORMATION SELECT EBILL_HEALTH_INFO_SEQ_NUM, UPDATE_NUM, EBILL_HEALTH_INFO_SUB_NUM, EBILL_HEALTH_INFO_CODE, CBP_HEALTH_INFO_SUB_NUM, PROCEDURE_DATE, UPDATE_USER, UPDATE_DATE, EBILL_SEQ_NUM, EBILL_HEALTH_INFO_TYPE_CODE

LINQ statement

Source: Data/SAIF.Data/Queries/Claims/Ebilling/EbillHealthInformationQueryProvider.cs:31

The repository is a class field initialised from Factory.GetRepository<EbillHealthInformation>() at Data/SAIF.Data/Queries/Claims/Ebilling/EbillHealthInformationQueryProvider.cs:15.

// Data/SAIF.Data/Queries/Claims/Ebilling/EbillHealthInformationQueryProvider.cs:15
repository = Factory.GetRepository<EbillHealthInformation>().Query();

// Data/SAIF.Data/Queries/Claims/Ebilling/EbillHealthInformationQueryProvider.cs:31
var healthinfo = repository.SingleOrDefault(x => x.Bill.Id == billId && x.Type.Code == "DR");

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
  EHI.EBILL_HEALTH_INFO_SEQ_NUM,
  EHI.UPDATE_NUM,
  EHI.EBILL_HEALTH_INFO_SUB_NUM,
  EHI.EBILL_HEALTH_INFO_CODE,
  EHI.CBP_HEALTH_INFO_SUB_NUM,
  EHI.PROCEDURE_DATE,
  EHI.UPDATE_USER,
  EHI.UPDATE_DATE,
  EHI.EBILL_SEQ_NUM,
  EHI.EBILL_HEALTH_INFO_TYPE_CODE
FROM EBILL_HEALTH_INFORMATION EHI
WHERE EHI.EBILL_SEQ_NUM = :billId
  AND EHI.EBILL_HEALTH_INFO_TYPE_CODE = 'DR'
-- NHibernate expects at most one row

Translation notes:

  • Only InformationCode (EBILL_HEALTH_INFO_CODE) is used by the caller (L33). The whole entity is still materialized.

Operations and processes

Business rules

Sources

  • Data/SAIF.Data/Queries/Claims/Ebilling/EbillHealthInformationQueryProvider.cs:31