Skip to content

SQL-179: MedicareQueryProvider.GetCountforBatchOfMedicareHistory

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

Classification

Field Value
SQL ID SQL-179
Operation type Read
Execution method ORM (NHibernate LINQ)
Database Oracle*
Schema [unqualified]**
Command type N/A (ORM-generated)
Business object MedicareQueryProvider
Criteria property N/A — ORM
Lifecycle method GetCountforBatchOfMedicareHistory

Parameters

Parameter Direction Type Max length Description
submissionDate Input DateTime N/A Method argument of MedicareQueryProvider.GetCountforBatchOfMedicareHistory bound into the ORM expression; NHibernate generates the bind variable at runtime

Tables

Table Access Columns used
MEDICARE_QUERY_HISTORY SELECT (aggregate) LAST_SUBMISSION_DATE

LINQ statement

Source: Data/SAIF.Data/Queries/Claims/MedicareQueryProvider.cs:54. The repository/queryable is initialised at Data/SAIF.Data/Queries/Claims/MedicareQueryProvider.cs:19.

// Data/SAIF.Data/Queries/Claims/MedicareQueryProvider.cs:19
medicareHistoryRepository = factory.GetRepository<MedicareQueryHistory>().Query();

// Data/SAIF.Data/Queries/Claims/MedicareQueryProvider.cs:54
public int GetCountforBatchOfMedicareHistory(DateTime submissionDate)
{
    return medicareHistoryRepository.Count(x => x.LastSubmissionDate ==  submissionDate);
}

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 COUNT(*)
FROM MEDICARE_QUERY_HISTORY MQH
WHERE MQH.LAST_SUBMISSION_DATE = :submissionDate

Operations and processes

Business rules

Sources

  • Data/SAIF.Data/Queries/Claims/MedicareQueryProvider.cs:54