Skip to content

SQL-130: EbillQueryProvider.GetPendedPatientErrors

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

Classification

Field Value
SQL ID SQL-130
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 GetPendedPatientErrors

Parameters

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

Tables

Table Access Columns used
EBILL_ERROR_CONDITION SELECT EBILL_ERROR_CONDITION_SEQ_NUM, UPDATE_NUM, ERROR_TEXT, PENDED_BILL_FLAG, PROVIDER_ERROR_FLAG, EBILL_SERVICE_SUB_NUM, UPDATE_USER, UPDATE_DATE, EBILL_SEQ_NUM, EBILL_PROVIDER_SEQ_NUM, EBILL_PATIENT_SEQ_NUM

LINQ statement

Source: Data/SAIF.Data/Queries/Claims/Ebilling/EbillQueryProvider.cs:244. The repository is obtained at Data/SAIF.Data/Queries/Claims/Ebilling/EbillQueryProvider.cs:31.

// Data/SAIF.Data/Queries/Claims/Ebilling/EbillQueryProvider.cs:31
errorRepository = Factory.GetRepository<EbillErrorCondition>().Query();

// Data/SAIF.Data/Queries/Claims/Ebilling/EbillQueryProvider.cs:244
return errorRepository
    .Where(x => x.Patient.Id == patientId &&
                x.IsPendedBill)
    .ToList();

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
  EEC.EBILL_ERROR_CONDITION_SEQ_NUM,
  EEC.UPDATE_NUM,
  EEC.ERROR_TEXT,
  EEC.PENDED_BILL_FLAG,
  EEC.PROVIDER_ERROR_FLAG,
  EEC.EBILL_SERVICE_SUB_NUM,
  EEC.UPDATE_USER,
  EEC.UPDATE_DATE,
  EEC.EBILL_SEQ_NUM,
  EEC.EBILL_PROVIDER_SEQ_NUM,
  EEC.EBILL_PATIENT_SEQ_NUM
FROM EBILL_ERROR_CONDITION EEC
WHERE EEC.EBILL_PATIENT_SEQ_NUM = :patientId
  AND EEC.PENDED_BILL_FLAG = 'Y'

Translation notes:

  • x.IsPendedBill uses YesNoType, so it becomes = 'Y'.

Operations and processes

Business rules

Sources

  • Data/SAIF.Data/Queries/Claims/Ebilling/EbillQueryProvider.cs:244