SQL-121: EbillQueryProvider.GetEbillResponseSet¶
This statement is a read operation invoked through ORM (NHibernate LINQ). Executed by EbillQueryProvider.GetEbillResponseSet.
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-121 |
| Operation type | Read |
| Execution method | ORM (NHibernate LINQ) |
| Database | Oracle* |
| Schema | [unqualified]** |
| Command type | N/A (ORM-generated) |
| Business object | EbillQueryProvider |
| Criteria property | N/A — ORM |
| Lifecycle method | GetEbillResponseSet |
Parameters¶
| Parameter | Direction | Type | Max length | Description |
|---|---|---|---|---|
responseSetSequenceNumber |
Input | int | N/A | Method argument of EbillQueryProvider.GetEbillResponseSet bound into the ORM expression; NHibernate generates the bind variable at runtime |
Tables¶
| Table | Access | Columns used |
|---|---|---|
| EBILL_RESPONSE_SET | SELECT | EBILL_RESPONSE_SET_SEQ_NUM, UPDATE_NUM, EBILL_RESPONSE_SET_DESCR, STATUS_CATEGORY_CODE, RESPONSE_STATUS_CODE, ACTION_CODE, UPDATE_USER, UPDATE_DATE, EBILL_STATUS_CODE |
LINQ statement¶
Source: Data/SAIF.Data/Queries/Claims/Ebilling/EbillQueryProvider.cs:95
// Data/SAIF.Data/Queries/Claims/Ebilling/EbillQueryProvider.cs:34
billResponseSetRepository = Factory.GetRepository<EbillResponseSet>().Query();
// Data/SAIF.Data/Queries/Claims/Ebilling/EbillQueryProvider.cs:95
return billResponseSetRepository.FirstOrDefault(x => x.Id == responseSetSequenceNumber);
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 *
FROM (
SELECT
ERS.EBILL_RESPONSE_SET_SEQ_NUM,
ERS.UPDATE_NUM,
ERS.EBILL_RESPONSE_SET_DESCR,
ERS.STATUS_CATEGORY_CODE,
ERS.RESPONSE_STATUS_CODE,
ERS.ACTION_CODE,
ERS.UPDATE_USER,
ERS.UPDATE_DATE,
ERS.EBILL_STATUS_CODE
FROM EBILL_RESPONSE_SET ERS
WHERE ERS.EBILL_RESPONSE_SET_SEQ_NUM = :responseSetSequenceNumber
)
WHERE ROWNUM <= 1
Translation notes:
- Oracle10 row limit for
FirstOrDefault(): the query (including anyORDER BY) is wrapped inROWNUM <= 1(limit written inline; NHibernate binds it as a parameter at runtime).
Operations and processes¶
Business rules¶
- SD-BR-050 E-bill status and assignment-rule code sets
- SD-BR-051 Bill included in clearinghouse response file by response-batch state
- SD-BR-052 Multiple prescription numbers mark all NDC lines as compound drug
Sources¶
Data/SAIF.Data/Queries/Claims/Ebilling/EbillQueryProvider.cs:95