SQL-047: BillQueryProvider.GetNationalDrug¶
This statement is a read operation invoked through ORM (NHibernate LINQ). Executed by BillQueryProvider.GetNationalDrug.
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-047 |
| 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 | GetNationalDrug |
Parameters¶
| Parameter | Direction | Type | Max length | Description |
|---|---|---|---|---|
nationalDrugCode |
Input | string | N/A | Method argument of BillQueryProvider.GetNationalDrug bound into the ORM expression; NHibernate generates the bind variable at runtime |
Tables¶
| Table | Access | Columns used |
|---|---|---|
| CBP_NATIONAL_DRUG | SELECT | NATIONAL_DRUG_CODE, UPDATE_NUM, GENERIC_NAME, EFF_DATE, EXP_DATE, PRODUCT_NAME, UPDATE_USER, UPDATE_DATE |
LINQ statement¶
Source: Data/SAIF.Data/Queries/Claims/BillQueryProvider.cs:209.
return Factory.GetRepository<CbpNationalDrug>().Query().SingleOrDefault(x => x.Code == nationalDrugCode);
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
CND.NATIONAL_DRUG_CODE,
CND.UPDATE_NUM,
CND.GENERIC_NAME,
CND.EFF_DATE,
CND.EXP_DATE,
CND.PRODUCT_NAME,
CND.UPDATE_USER,
CND.UPDATE_DATE
FROM CBP_NATIONAL_DRUG CND
WHERE CND.NATIONAL_DRUG_CODE = :nationalDrugCode
-- NHibernate expects at most one row
Operations and processes¶
Business rules¶
- SD-BR-034 Bill entry source classification
- SD-BR-035 Bill allowed total treats null as zero
- SD-BR-036 Service code current only when expiration date is null
Sources¶
Data/SAIF.Data/Queries/Claims/BillQueryProvider.cs:209