Skip to content

SQL-218: ReportQueryProvider.GetAttendingClaimsWithRelationship

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

Classification

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

Parameters

Parameter Direction Type Max length Description
providerLocationId Input long N/A Method argument of ReportQueryProvider.GetAttendingClaimsWithRelationship bound into the ORM expression; NHibernate generates the bind variable at runtime
parentProviderLocationId Input long N/A Method argument of ReportQueryProvider.GetAttendingClaimsWithRelationship bound into the ORM expression; NHibernate generates the bind variable at runtime

Tables

Table Access Columns used
ATTENDING_PHYSICIAN SELECT CLAIM_ID (projection); PROVIDER_LOCATION_SEQ_NUM, PARENT_PROVIDER_LOC_SEQ_NUM, EXP_DATE (filters)

LINQ statement

Source: Data/SAIF.Data/Queries/Claims/Reports/ReportQueryProvider.cs:40-44.

public IEnumerable<long> GetAttendingClaimsWithRelationship(long providerLocationId, long parentProviderLocationId)
{
    return Factory.GetRepository<AttendingPhysician>()
            .Query()
            .Where(att => att.ProviderLocation.Id == providerLocationId
                && att.ParentProvider.Id == parentProviderLocationId
                && att.ExpirationDate == null).Select(x => x.Claim.Id).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 AP.CLAIM_ID
FROM ATTENDING_PHYSICIAN AP
WHERE AP.PROVIDER_LOCATION_SEQ_NUM = :providerLocationId
  AND AP.PARENT_PROVIDER_LOC_SEQ_NUM = :parentProviderLocationId
  AND AP.EXP_DATE IS NULL

Operations and processes

Business rules

Sources

  • Data/SAIF.Data/Queries/Claims/Reports/ReportQueryProvider.cs:40