SQL-352: Update CbpProcedureCode via UpdateProcedure¶
This ORM statement updates a CBP_PROCEDURE_CODE row's description and effective/expiration dates for a procedure code, executed from Services/SAIF.Services/Claims/ICDCodeService/Icd10CodeService.cs (L319). The SQL below is inferred from the IRepository<CbpProcedureCode>.Update call and the CbpProcedureCode NHibernate mapping, not literal SQL text in source.
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-352 |
| Operation type | Update |
| Execution method | ORM (IRepository.Update) |
| Database | Oracle |
| Schema | [unqualified]** |
| Command type | N/A (ORM-generated) |
| Business object | CbpProcedureCode |
| Criteria property | N/A — ORM |
| Lifecycle method | UpdateProcedure |
Parameters¶
| Parameter | Direction | Type | Max length | Description |
|---|---|---|---|---|
:Code |
Input | string (inherited from framework CodeTableEntity<T>) |
N/A | Identifier of the CbpProcedureCode being updated (CODE) |
:Description |
Input | string (inherited from framework CodeTableEntity<T>) |
N/A | New value of CODE_DESCR |
:ShortDescription |
Input | string | N/A | New value of SHORT_DESCR |
:EffectiveDate |
Input | DateTime | N/A | New value of EFF_DATE |
:ExpirationDate |
Input | DateTime? | N/A | New value of EXP_DATE |
:UpdateUser |
Input | string | N/A | New value of UPDATE_USER |
:UpdateDate |
Input | DateTime | N/A | New value of UPDATE_DATE |
:IcdVersionCode |
Input | string | N/A | New value of ICD_VERSION_CODE |
:newVersion |
Input | int | N/A | Incremented UPDATE_NUM value |
:oldVersion |
Input | int | N/A | Current UPDATE_NUM value (optimistic-concurrency check) |
Tables¶
| Table | Access | Columns used |
|---|---|---|
| CBP_PROCEDURE_CODE | UPDATE | CODE, UPDATE_NUM, CODE_DESCR, SHORT_DESCR, EFF_DATE, EXP_DATE, UPDATE_USER, UPDATE_DATE, ICD_VERSION_CODE |
LINQ statement¶
Source: Services/SAIF.Services/Claims/ICDCodeService/Icd10CodeService.cs:319
// Services/SAIF.Services/Claims/ICDCodeService/Icd10CodeService.cs:319
unitOfWork.GetRepository<CbpProcedureCode>().Update(cbpProcedure);
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
UPDATE CBP_PROCEDURE_CODE
SET
UPDATE_NUM = :newVersion,
CODE_DESCR = :Description,
SHORT_DESCR = :ShortDescription,
EFF_DATE = :EffectiveDate,
EXP_DATE = :ExpirationDate,
UPDATE_USER = :UpdateUser,
UPDATE_DATE = :UpdateDate,
ICD_VERSION_CODE = :IcdVersionCode
WHERE CODE = :Code
AND UPDATE_NUM = :oldVersion
Translation notes:
Version(x => x.UpdateNumber).Column("UPDATE_NUM")- NHibernate sets the incremented version and adds the old-version predicate.Update(entity)emits an explicit UPDATE of every updatable mapped column (noDynamicUpdate()on this map).
Operations and processes¶
- Icd10CodeService.UpdateProcedure — see Operations and processes
Sources¶
Services/SAIF.Services/Claims/ICDCodeService/Icd10CodeService.cs (L319)