Skip to content

SQL-178: MedicareQueryProvider.GetCountforBatchOfMedicareBeneficiary

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

Classification

Field Value
SQL ID SQL-178
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 GetCountforBatchOfMedicareBeneficiary

Parameters

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

Tables

Table Access Columns used
MEDICARE_BENEFICIARY_QUERY SELECT (aggregate) SUBMISSION_DATE

LINQ statement

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

// Data/SAIF.Data/Queries/Claims/MedicareQueryProvider.cs:18
medicareBeneficiaryRepository = factory.GetRepository<MedicareBeneficiaryQuery>().Query();

// Data/SAIF.Data/Queries/Claims/MedicareQueryProvider.cs:49
public int GetCountforBatchOfMedicareBeneficiary(DateTime submissionDate)
{
    return medicareBeneficiaryRepository.Count(x => x.SubmissionDate == 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_BENEFICIARY_QUERY MBQ
WHERE MBQ.SUBMISSION_DATE = :submissionDate

Translation notes: - Count(predicate) → server-side COUNT(*). The result is cast to int.

Operations and processes

Business rules

Sources

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