SQL-230: ServiceCodeQueryProvider.GetProcedureCode¶
This statement is a read operation invoked through ORM (NHibernate LINQ). Executed by ServiceCodeQueryProvider.GetProcedureCode.
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-230 |
| Operation type | Read |
| Execution method | ORM (NHibernate LINQ) |
| Database | Oracle* |
| Schema | [unqualified]** |
| Command type | N/A (ORM-generated) |
| Business object | ServiceCodeQueryProvider |
| Criteria property | N/A — ORM |
| Lifecycle method | GetProcedureCode |
Parameters¶
| Parameter | Direction | Type | Max length | Description |
|---|---|---|---|---|
code |
Input | string | N/A | Method argument of ServiceCodeQueryProvider.GetProcedureCode 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/ServiceCodeQueryProvider.cs:35.
public Model.Claims.Bills.CbpProcedureCode GetProcedureCode(string code)
{
return Factory.GetRepository<CbpProcedureCode>().Query().FirstOrDefault(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 * FROM (
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
) WHERE ROWNUM <= 1
Translation notes:
- The mapping class CbpProcedureCodeMap lives in file CbpProcedureCode.cs (no Map suffix in the file name).
Operations and processes¶
Sources¶
Data/SAIF.Data/Queries/Claims/ServiceCodeQueryProvider.cs:35