2018-04-17 08:28:46.401 INFO estContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [gov.va.ccrs.brengine.BatchProcessorAllRulesTest], using SpringBootContextLoader
2018-04-17 08:28:46.417 INFO AbstractContextLoader  - Could not detect default resource locations for test class [gov.va.ccrs.brengine.BatchProcessorAllRulesTest]: no resource found for suffixes {-context.xml, Context.groovy}.
2018-04-17 08:28:46.417 INFO nfigContextLoaderUtils - Could not detect default configuration classes for test class [gov.va.ccrs.brengine.BatchProcessorAllRulesTest]: BatchProcessorAllRulesTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
2018-04-17 08:28:46.655 INFO estContextBootstrapper - Found @SpringBootConfiguration gov.va.ccrs.brengine.BrEngineApplication for test class gov.va.ccrs.brengine.BatchProcessorAllRulesTest
2018-04-17 08:28:46.931 INFO estContextBootstrapper - Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener, org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener]
2018-04-17 08:28:46.969 INFO estContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@4d0f2471, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@7133da86, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@3232a28a, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@73e22a3d, org.springframework.test.context.support.DirtiesContextTestExecutionListener@47faa49c, org.springframework.test.context.transaction.TransactionalTestExecutionListener@28f2a10f, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@f736069, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@6da21078, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@7fee8714, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@4229bb3f, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@56cdfb3b, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@2b91004a]
2018-04-17 08:28:47.558 INFO hProcessorAllRulesTest - Starting BatchProcessorAllRulesTest on JX574H2 with PID 6548 (started by DWei in C:\Users\DWei\CCRS-BUSRULES\brengine)
2018-04-17 08:28:47.563 INFO hProcessorAllRulesTest - The following profiles are active: ut
2018-04-17 08:28:47.603 INFO nfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@13bc8645: startup date [Tue Apr 17 08:28:47 EDT 2018]; root of context hierarchy
2018-04-17 08:28:49.220 INFO ultListableBeanFactory - Overriding bean definition for bean 'authenticationManager' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=apiSecurityConfig; factoryMethodName=authenticationManager; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [gov/va/ccrs/brengine/security/ApiSecurityConfig.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=securityConfig; factoryMethodName=authenticationManager; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [gov/va/ccrs/brengine/security/SecurityConfig.class]]
2018-04-17 08:28:49.332 INFO ultListableBeanFactory - Overriding bean definition for bean 'dataSource' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Generic; factoryMethodName=dataSource; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Generic.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari; factoryMethodName=dataSource; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]]
2018-04-17 08:28:50.582 INFO anPostProcessorChecker - Bean 'org.springframework.kafka.annotation.KafkaBootstrapConfiguration' of type [org.springframework.kafka.annotation.KafkaBootstrapConfiguration$$EnhancerBySpringCGLIB$$808c4f65] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-04-17 08:28:50.619 INFO anPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$acda3de2] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-04-17 08:28:51.373 INFO HikariDataSource       - HikariPool-1 - Starting...
2018-04-17 08:28:51.731 INFO HikariDataSource       - HikariPool-1 - Start completed.
2018-04-17 08:28:51.871 INFO tityManagerFactoryBean - Building JPA container EntityManagerFactory for persistence unit 'default'
2018-04-17 08:28:53.218 WARN RootClass              - HHH000038: Composite-id class does not override equals(): gov.va.ccrs.brengine.seoc.SeocProcedure
2018-04-17 08:28:53.234 WARN RootClass              - HHH000039: Composite-id class does not override hashCode(): gov.va.ccrs.brengine.seoc.SeocProcedure
2018-04-17 08:28:53.972 INFO tityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'default'
2018-04-17 08:28:55.150 INFO HoconUtils             - Loading config file from C:\Users\DWei\CCRS-BUSRULES\brengine\bin\main\rules-config.conf
2018-04-17 08:28:56.008 WARN User                   - User.withDefaultPasswordEncoder() is considered unsafe for production and is only intended for sample applications.
2018-04-17 08:28:56.137 WARN User                   - User.withDefaultPasswordEncoder() is considered unsafe for production and is only intended for sample applications.
2018-04-17 08:28:56.999 INFO ultSecurityFilterChain - Creating filter chain: Ant [pattern='/fetchDecisions/**'], [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@7544260a, org.springframework.security.web.context.SecurityContextPersistenceFilter@46de118b, org.springframework.security.web.header.HeaderWriterFilter@2cc34cd5, org.springframework.security.web.csrf.CsrfFilter@144440f5, org.springframework.security.web.authentication.logout.LogoutFilter@6be8ce1b, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@2739ecc0, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@10cb050, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@2374452a, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@bb6869a, org.springframework.security.web.session.SessionManagementFilter@2de7c84a, org.springframework.security.web.access.ExceptionTranslationFilter@57927bc9, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@3e2772a9]
2018-04-17 08:28:57.054 INFO ultSecurityFilterChain - Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher@1, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@3dfc59c5, org.springframework.security.web.context.SecurityContextPersistenceFilter@33eab2e8, org.springframework.security.web.header.HeaderWriterFilter@7eefaca0, org.springframework.security.web.authentication.logout.LogoutFilter@5bf7f15f, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@34bddf43, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@3dec79f8, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@34bf66af, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@37364634, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@2cff5aa3, org.springframework.security.web.session.SessionManagementFilter@7d5ef1c3, org.springframework.security.web.access.ExceptionTranslationFilter@3dd750ba, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@8b1202a]
2018-04-17 08:28:57.304 INFO AbstractContextSource  - Property 'userDn' not set - anonymous context will be used for read-write operations
2018-04-17 08:28:58.450 INFO aultLifecycleProcessor - Starting beans in phase 2147483547
2018-04-17 08:28:58.461 INFO ationBeanPostProcessor - No TaskScheduler/ScheduledExecutorService bean found for scheduled processing
2018-04-17 08:28:58.476 INFO hProcessorAllRulesTest - Started BatchProcessorAllRulesTest in 11.438 seconds (JVM running for 12.894)
2018-04-17 08:28:58.528 INFO ScriptUtils            - Executing SQL script from class path resource [sql/create_tables_h2.sql]
2018-04-17 08:28:58.830 INFO ScriptUtils            - Executed SQL script from class path resource [sql/create_tables_h2.sql] in 300 ms.
2018-04-17 08:28:58.831 INFO ScriptUtils            - Executing SQL script from class path resource [sql/populate_claim.sql]
2018-04-17 08:28:58.957 INFO ScriptUtils            - Executed SQL script from class path resource [sql/populate_claim.sql] in 125 ms.
2018-04-17 08:28:58.958 INFO ScriptUtils            - Executing SQL script from class path resource [sql/populate_edi_nonconforming.sql]
2018-04-17 08:28:58.963 INFO ScriptUtils            - Executed SQL script from class path resource [sql/populate_edi_nonconforming.sql] in 4 ms.
Hibernate: 
    select
        batchinfo0_.etl_batch_id as etl_batc1_16_0_,
        batchinfo0_.batch_status as batch_st2_16_0_,
        batchinfo0_.last_updated_user as last_upd3_16_0_,
        batchinfo0_.end_date_time as end_date4_16_0_,
        batchinfo0_.source_system as source_s5_16_0_,
        batchinfo0_.last_updated_date as last_upd6_16_0_ 
    from
        claim_batch_log batchinfo0_ 
    where
        batchinfo0_.etl_batch_id=?
Hibernate: 
    /* insert gov.va.ccrs.brengine.batchprocessing.ProcessingTracker
        */ insert 
        into
            rules_batch_log
            (rules_batch_log_key, etl_batch_id, claim_type, engine_version, error, end_date_time, hostname, resume_mode, last_updated_user, number_of_claims, number_of_failures, number_of_lines, number_of_processed_claims, number_of_processed_lines, number_of_waiting_for_data, rule_names, environment_name, start_date_time, status, last_updated_date_time) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* load gov.va.ccrs.brengine.batchprocessing.BatchInfo */ select
        batchinfo0_.etl_batch_id as etl_batc1_16_0_,
        batchinfo0_.batch_status as batch_st2_16_0_,
        batchinfo0_.last_updated_user as last_upd3_16_0_,
        batchinfo0_.end_date_time as end_date4_16_0_,
        batchinfo0_.source_system as source_s5_16_0_,
        batchinfo0_.last_updated_date as last_upd6_16_0_ 
    from
        claim_batch_log batchinfo0_ 
    where
        batchinfo0_.etl_batch_id=?
Hibernate: 
    /* update
        gov.va.ccrs.brengine.batchprocessing.BatchInfo */ update
            claim_batch_log 
        set
            batch_status=?,
            last_updated_user=?,
            end_date_time=?,
            source_system=?,
            last_updated_date=? 
        where
            etl_batch_id=?
2018-04-17 08:28:59.207 INFO ncExecutionInterceptor - No task executor bean found for async processing: no bean of type TaskExecutor and no bean named 'taskExecutor' either
2018-04-17 08:28:59.222 INFO BatchProcessor         - Starting processing of batchId 'dent_batch_1'
2018-04-17 08:28:59.222 INFO tationBasedRuleFactory - Found the following rule beans annotated with gov.va.ccrs.brengine.rule.annotation.RuleFactoryBean
[]
2018-04-17 08:28:59.222 INFO tationBasedRuleFactory - Found the following rule beans annotated with gov.va.ccrs.brengine.rule.annotation.RuleBean
[referralRules, dollarThresholdRule, duplicateRules, episodeRules, icnRule, leieRule, paymentAuthorityRules, timelyFilingRule]
2018-04-17 08:28:59.222 INFO BatchProcessor         - Number of rules used for processing: 8
2018-04-17 08:28:59.222 INFO BatchProcessor         - Rules:
[gov.va.ccrs.brengine.rule.referral.ReferralRules@7f030c72, gov.va.ccrs.brengine.rule.dollarthreshold.DollarThresholdRule@15d79b70, gov.va.ccrs.brengine.rule.duplicate.DuplicateRules@669c2b07, gov.va.ccrs.brengine.rule.seoc.EpisodeRules@5ddd84d2, gov.va.ccrs.brengine.rule.icn.IcnRule@1dbeedff, gov.va.ccrs.brengine.rule.leie.LeieRule@1f48fa72, gov.va.ccrs.brengine.rule.paymentauthority.PaymentAuthorityRules@2570b316, gov.va.ccrs.brengine.rule.timelyfiling.TimelyFilingRule@304744a1]
2018-04-17 08:28:59.238 INFO BatchProcessor         - Updating status of batch 'dent_batch_1' to RULES_INIT
Hibernate: 
    /* load gov.va.ccrs.brengine.batchprocessing.ProcessingTracker */ select
        processing0_.rules_batch_log_key as rules_ba1_38_0_,
        processing0_.etl_batch_id as etl_batc2_38_0_,
        processing0_.claim_type as claim_ty3_38_0_,
        processing0_.engine_version as engine_v4_38_0_,
        processing0_.error as error5_38_0_,
        processing0_.end_date_time as end_date6_38_0_,
        processing0_.hostname as hostname7_38_0_,
        processing0_.resume_mode as resume_m8_38_0_,
        processing0_.last_updated_user as last_upd9_38_0_,
        processing0_.number_of_claims as number_10_38_0_,
        processing0_.number_of_failures as number_11_38_0_,
        processing0_.number_of_lines as number_12_38_0_,
        processing0_.number_of_processed_claims as number_13_38_0_,
        processing0_.number_of_processed_lines as number_14_38_0_,
        processing0_.number_of_waiting_for_data as number_15_38_0_,
        processing0_.rule_names as rule_na16_38_0_,
        processing0_.environment_name as environ17_38_0_,
        processing0_.start_date_time as start_d18_38_0_,
        processing0_.status as status19_38_0_,
        processing0_.last_updated_date_time as last_up20_38_0_ 
    from
        rules_batch_log processing0_ 
    where
        processing0_.rules_batch_log_key=?
Hibernate: 
    /* load gov.va.ccrs.brengine.batchprocessing.BatchInfo */ select
        batchinfo0_.etl_batch_id as etl_batc1_16_0_,
        batchinfo0_.batch_status as batch_st2_16_0_,
        batchinfo0_.last_updated_user as last_upd3_16_0_,
        batchinfo0_.end_date_time as end_date4_16_0_,
        batchinfo0_.source_system as source_s5_16_0_,
        batchinfo0_.last_updated_date as last_upd6_16_0_ 
    from
        claim_batch_log batchinfo0_ 
    where
        batchinfo0_.etl_batch_id=?
Hibernate: 
    /* update
        gov.va.ccrs.brengine.batchprocessing.ProcessingTracker */ update
            rules_batch_log 
        set
            etl_batch_id=?,
            claim_type=?,
            engine_version=?,
            error=?,
            end_date_time=?,
            hostname=?,
            resume_mode=?,
            last_updated_user=?,
            number_of_claims=?,
            number_of_failures=?,
            number_of_lines=?,
            number_of_processed_claims=?,
            number_of_processed_lines=?,
            number_of_waiting_for_data=?,
            rule_names=?,
            environment_name=?,
            start_date_time=?,
            status=?,
            last_updated_date_time=? 
        where
            rules_batch_log_key=?
Hibernate: 
    /* update
        gov.va.ccrs.brengine.batchprocessing.BatchInfo */ update
            claim_batch_log 
        set
            batch_status=?,
            last_updated_user=?,
            end_date_time=?,
            source_system=?,
            last_updated_date=? 
        where
            etl_batch_id=?
Hibernate: 
    /* select
        generatedAlias0 
    from
        DollarThreshold as generatedAlias0 */ select
            dollarthre0_.charge_amount_threshold_key as charge_a1_13_,
            dollarthre0_.claim_type as claim_ty2_13_,
            dollarthre0_.last_updated_user as last_upd3_13_,
            dollarthre0_.threshold_amount as threshol4_13_,
            dollarthre0_.last_updated_date_time as last_upd5_13_ 
        from
            rules.charge_amount_threshold dollarthre0_
2018-04-17 08:28:59.269 INFO BatchProcessor         - Deleting all prior outcomes/decisions for the batch, if any
Hibernate: 
    /* delete 
    from
        ValidationFailure vf 
    where
        vf.decision.key in (
            select
                key 
            from
                Decision d 
            where
                d.batchId= ?1 
                and d.decisionType != 'REJECTED' 
        ) */ delete 
        from
            validation_failure 
        where
            decision_key in (
                select
                    decision1_.decision_key 
                from
                    decision decision1_ 
                where
                    decision1_.etl_batch_id=? 
                    and decision1_.decision<>'REJECTED'
            )
Hibernate: 
    /* delete 
    from
        Decision d 
    where
        d.batchId= ?1 
        and d.decisionType != 'REJECTED' */ delete 
        from
            decision 
        where
            etl_batch_id=? 
            and decision<>'REJECTED'
2018-04-17 08:28:59.338 INFO DecisionDaoImpl        - Deleted 0 decisions and 0 failures for batchId dent_batch_1
2018-04-17 08:28:59.338 INFO BatchProcessor         - Loading all claims for the batch dent_batch_1
Hibernate: 
    /* select
        distinct c 
    from
        Claim c 
    join
        fetch c.formType formType 
    join
        fetch c.dentClaimLines line 
    left join
        fetch c.billingProvider billProv 
    left join
        fetch c.renderingProvider renderingProv 
    left join
        fetch billProv.locations 
    left join
        fetch c.patient patient 
    left join
        fetch c.dentClaimTeeth 
    left join
        fetch line.procedure 
    left join
        fetch line.modifiers modifier 
    where
        c.isCurrent=true 
        and line.isCurrent=true 
        and (
            modifier is null 
            or modifier.isCurrent=true 
        ) 
        and formType.code='837D' 
        and line.key not in (
            select
                claimLineKey 
            from
                Decision d 
            where
                d.claim.key=c.key
        )  
        and c.batchId=?1  */ select
            distinct claim0_.claim_key as claim_ke1_30_0_,
            formtype1_.form_type_key as form_typ1_22_1_,
            dentclaiml2_.claim_detail_key as claim_de1_32_2_,
            procedure8_.procedure_key as procedur1_28_3_,
            modifiers9_.claim_line_modifier_key as claim_li1_19_4_,
            provider3_.provider_key as provider1_29_5_,
            locations5_.provider_location_key as provider1_37_6_,
            provider4_.provider_key as provider1_29_7_,
            patient6_.patient_key as patient_1_25_8_,
            dentclaimt7_.claim_tooth_key as claim_to1_20_9_,
            claim0_.etl_batch_id as etl_batc2_30_0_,
            claim0_.billing_provider_key as billing16_30_0_,
            claim0_.ccn_region as ccn_regi3_30_0_,
            claim0_.charge_amount as charge_a4_30_0_,
            claim0_.claim_id as claim_id5_30_0_,
            claim0_.end_date as end_date6_30_0_,
            claim0_.form_type_key as form_ty17_30_0_,
            claim0_.is_current as is_curre7_30_0_,
            claim0_.last_updated_date as last_upd8_30_0_,
            claim0_.other_insurance as other_in9_30_0_,
            claim0_.patient_key as patient18_30_0_,
            claim0_.patient_account_number as patient10_30_0_,
            claim0_.preauth_number as preauth11_30_0_,
            claim0_.claim_receipt_date as claim_r12_30_0_,
            claim0_.referral_number as referra13_30_0_,
            claim0_.referring_provider_key as referri19_30_0_,
            claim0_.rendering_provider_key as renderi20_30_0_,
            claim0_.source_system as source_14_30_0_,
            claim0_.start_date as start_d15_30_0_,
            claim0_.station_key as station21_30_0_,
            formtype1_.form_code as form_cod2_22_1_,
            dentclaiml2_.etl_batch_id as etl_batc2_32_2_,
            dentclaiml2_.claim_key as claim_ke8_32_2_,
            dentclaiml2_.date_paid as date_pai3_32_2_,
            dentclaiml2_.is_current as is_curre4_32_2_,
            dentclaiml2_.line_item_control_number as line_ite5_32_2_,
            dentclaiml2_.charge_amount as charge_a6_32_2_,
            dentclaiml2_.procedure_key as procedur9_32_2_,
            dentclaiml2_.service_date as service_7_32_2_,
            dentclaiml2_.claim_key as claim_ke8_32_0__,
            dentclaiml2_.claim_detail_key as claim_de1_32_0__,
            procedure8_.procedure_code as procedur2_28_3_,
            procedure8_.short_description as short_de3_28_3_,
            modifiers9_.modifier_code as modifier2_19_4_,
            modifiers9_.claim_detail_key_dt as claim_de4_19_4_,
            modifiers9_.claim_detail_key_in as claim_de5_19_4_,
            modifiers9_.is_current as is_curre3_19_4_,
            modifiers9_.claim_detail_key_pr as claim_de6_19_4_,
            modifiers9_.claim_detail_key_dt as claim_de4_19_1__,
            modifiers9_.claim_line_modifier_key as claim_li1_19_1__,
            provider3_.provider_name as provider2_29_5_,
            provider3_.npi as npi3_29_5_,
            provider3_.tax_id as tax_id4_29_5_,
            locations5_.address1 as address2_37_6_,
            locations5_.city as city3_37_6_,
            locations5_.country_code as country_4_37_6_,
            locations5_.postal_code as postal_c5_37_6_,
            locations5_.provider_key as provider8_37_6_,
            locations5_.provider_phone as provider6_37_6_,
            locations5_.state_long_name as state_lo7_37_6_,
            locations5_.provider_key as provider8_37_2__,
            locations5_.provider_location_key as provider1_37_2__,
            provider4_.provider_name as provider2_29_7_,
            provider4_.npi as npi3_29_7_,
            provider4_.tax_id as tax_id4_29_7_,
            patient6_.address1 as address2_25_8_,
            patient6_.address2 as address3_25_8_,
            patient6_.etl_batch_id as etl_batc4_25_8_,
            patient6_.city as city5_25_8_,
            patient6_.date_of_birth as date_of_6_25_8_,
            patient6_.first_name as first_na7_25_8_,
            patient6_.icn as icn8_25_8_,
            patient6_.insured_id as insured_9_25_8_,
            patient6_.last_name as last_na10_25_8_,
            patient6_.member_id as member_11_25_8_,
            patient6_.middle_initial as middle_12_25_8_,
            patient6_.postal_code as postal_13_25_8_,
            patient6_.sex as sex14_25_8_,
            patient6_.ssn as ssn15_25_8_,
            patient6_.state_code as state_c16_25_8_,
            dentclaimt7_.claim_key as claim_ke6_20_9_,
            dentclaimt7_.end_date as end_date2_20_9_,
            dentclaimt7_.start_date as start_da3_20_9_,
            dentclaimt7_.tooth_number as tooth_nu4_20_9_,
            dentclaimt7_.tooth_status as tooth_st5_20_9_,
            dentclaimt7_.claim_key as claim_ke6_20_3__,
            dentclaimt7_.claim_tooth_key as claim_to1_20_3__ 
        from
            dim_va_claim claim0_ 
        inner join
            dim_claim_form_type formtype1_ 
                on claim0_.form_type_key=formtype1_.form_type_key 
        inner join
            f_dental_claim_details dentclaiml2_ 
                on claim0_.claim_key=dentclaiml2_.claim_key 
        left outer join
            dim_procedure_code procedure8_ 
                on dentclaiml2_.procedure_key=procedure8_.procedure_key 
        left outer join
            claim_line_modifier modifiers9_ 
                on dentclaiml2_.claim_detail_key=modifiers9_.claim_detail_key_dt 
        left outer join
            dim_provider provider3_ 
                on claim0_.billing_provider_key=provider3_.provider_key 
        left outer join
            provider_location locations5_ 
                on provider3_.provider_key=locations5_.provider_key 
        left outer join
            dim_provider provider4_ 
                on claim0_.rendering_provider_key=provider4_.provider_key 
        left outer join
            dim_patient patient6_ 
                on claim0_.patient_key=patient6_.patient_key 
        left outer join
            claim_tooth_status dentclaimt7_ 
                on claim0_.claim_key=dentclaimt7_.claim_key 
        where
            claim0_.is_current='Y' 
            and dentclaiml2_.is_current='Y' 
            and (
                modifiers9_.claim_line_modifier_key is null 
                or modifiers9_.is_current='Y'
            ) 
            and formtype1_.form_code='837D' 
            and (
                dentclaiml2_.claim_detail_key not in  (
                    select
                        decision10_.claim_detail_key 
                    from
                        decision decision10_ 
                    where
                        decision10_.claim_key=claim0_.claim_key
                )
            ) 
            and claim0_.etl_batch_id=?
Hibernate: 
    select
        institutio0_.claim_key as claim_ke1_24_0_,
        institutio0_.admission_date as admissio2_24_0_,
        institutio0_.statement_from_date as statemen3_24_0_,
        institutio0_.statement_to_date as statemen4_24_0_,
        claim1_.claim_key as claim_ke1_30_1_,
        claim1_.etl_batch_id as etl_batc2_30_1_,
        claim1_.billing_provider_key as billing16_30_1_,
        claim1_.ccn_region as ccn_regi3_30_1_,
        claim1_.charge_amount as charge_a4_30_1_,
        claim1_.claim_id as claim_id5_30_1_,
        claim1_.end_date as end_date6_30_1_,
        claim1_.form_type_key as form_ty17_30_1_,
        claim1_.is_current as is_curre7_30_1_,
        claim1_.last_updated_date as last_upd8_30_1_,
        claim1_.other_insurance as other_in9_30_1_,
        claim1_.patient_key as patient18_30_1_,
        claim1_.patient_account_number as patient10_30_1_,
        claim1_.preauth_number as preauth11_30_1_,
        claim1_.claim_receipt_date as claim_r12_30_1_,
        claim1_.referral_number as referra13_30_1_,
        claim1_.referring_provider_key as referri19_30_1_,
        claim1_.rendering_provider_key as renderi20_30_1_,
        claim1_.source_system as source_14_30_1_,
        claim1_.start_date as start_d15_30_1_,
        claim1_.station_key as station21_30_1_,
        formtype2_.form_type_key as form_typ1_22_2_,
        formtype2_.form_code as form_cod2_22_2_ 
    from
        dim_institutional_claim institutio0_ 
    left outer join
        dim_va_claim claim1_ 
            on institutio0_.claim_key=claim1_.claim_key 
    left outer join
        dim_claim_form_type formtype2_ 
            on claim1_.form_type_key=formtype2_.form_type_key 
    where
        institutio0_.claim_key=?
Hibernate: 
    select
        institutio0_.claim_key as claim_ke1_24_0_,
        institutio0_.admission_date as admissio2_24_0_,
        institutio0_.statement_from_date as statemen3_24_0_,
        institutio0_.statement_to_date as statemen4_24_0_,
        claim1_.claim_key as claim_ke1_30_1_,
        claim1_.etl_batch_id as etl_batc2_30_1_,
        claim1_.billing_provider_key as billing16_30_1_,
        claim1_.ccn_region as ccn_regi3_30_1_,
        claim1_.charge_amount as charge_a4_30_1_,
        claim1_.claim_id as claim_id5_30_1_,
        claim1_.end_date as end_date6_30_1_,
        claim1_.form_type_key as form_ty17_30_1_,
        claim1_.is_current as is_curre7_30_1_,
        claim1_.last_updated_date as last_upd8_30_1_,
        claim1_.other_insurance as other_in9_30_1_,
        claim1_.patient_key as patient18_30_1_,
        claim1_.patient_account_number as patient10_30_1_,
        claim1_.preauth_number as preauth11_30_1_,
        claim1_.claim_receipt_date as claim_r12_30_1_,
        claim1_.referral_number as referra13_30_1_,
        claim1_.referring_provider_key as referri19_30_1_,
        claim1_.rendering_provider_key as renderi20_30_1_,
        claim1_.source_system as source_14_30_1_,
        claim1_.start_date as start_d15_30_1_,
        claim1_.station_key as station21_30_1_,
        formtype2_.form_type_key as form_typ1_22_2_,
        formtype2_.form_code as form_cod2_22_2_ 
    from
        dim_institutional_claim institutio0_ 
    left outer join
        dim_va_claim claim1_ 
            on institutio0_.claim_key=claim1_.claim_key 
    left outer join
        dim_claim_form_type formtype2_ 
            on claim1_.form_type_key=formtype2_.form_type_key 
    where
        institutio0_.claim_key=?
Hibernate: 
    select
        institutio0_.claim_key as claim_ke1_24_0_,
        institutio0_.admission_date as admissio2_24_0_,
        institutio0_.statement_from_date as statemen3_24_0_,
        institutio0_.statement_to_date as statemen4_24_0_,
        claim1_.claim_key as claim_ke1_30_1_,
        claim1_.etl_batch_id as etl_batc2_30_1_,
        claim1_.billing_provider_key as billing16_30_1_,
        claim1_.ccn_region as ccn_regi3_30_1_,
        claim1_.charge_amount as charge_a4_30_1_,
        claim1_.claim_id as claim_id5_30_1_,
        claim1_.end_date as end_date6_30_1_,
        claim1_.form_type_key as form_ty17_30_1_,
        claim1_.is_current as is_curre7_30_1_,
        claim1_.last_updated_date as last_upd8_30_1_,
        claim1_.other_insurance as other_in9_30_1_,
        claim1_.patient_key as patient18_30_1_,
        claim1_.patient_account_number as patient10_30_1_,
        claim1_.preauth_number as preauth11_30_1_,
        claim1_.claim_receipt_date as claim_r12_30_1_,
        claim1_.referral_number as referra13_30_1_,
        claim1_.referring_provider_key as referri19_30_1_,
        claim1_.rendering_provider_key as renderi20_30_1_,
        claim1_.source_system as source_14_30_1_,
        claim1_.start_date as start_d15_30_1_,
        claim1_.station_key as station21_30_1_,
        formtype2_.form_type_key as form_typ1_22_2_,
        formtype2_.form_code as form_cod2_22_2_ 
    from
        dim_institutional_claim institutio0_ 
    left outer join
        dim_va_claim claim1_ 
            on institutio0_.claim_key=claim1_.claim_key 
    left outer join
        dim_claim_form_type formtype2_ 
            on claim1_.form_type_key=formtype2_.form_type_key 
    where
        institutio0_.claim_key=?
Hibernate: 
    select
        institutio0_.claim_key as claim_ke1_24_0_,
        institutio0_.admission_date as admissio2_24_0_,
        institutio0_.statement_from_date as statemen3_24_0_,
        institutio0_.statement_to_date as statemen4_24_0_,
        claim1_.claim_key as claim_ke1_30_1_,
        claim1_.etl_batch_id as etl_batc2_30_1_,
        claim1_.billing_provider_key as billing16_30_1_,
        claim1_.ccn_region as ccn_regi3_30_1_,
        claim1_.charge_amount as charge_a4_30_1_,
        claim1_.claim_id as claim_id5_30_1_,
        claim1_.end_date as end_date6_30_1_,
        claim1_.form_type_key as form_ty17_30_1_,
        claim1_.is_current as is_curre7_30_1_,
        claim1_.last_updated_date as last_upd8_30_1_,
        claim1_.other_insurance as other_in9_30_1_,
        claim1_.patient_key as patient18_30_1_,
        claim1_.patient_account_number as patient10_30_1_,
        claim1_.preauth_number as preauth11_30_1_,
        claim1_.claim_receipt_date as claim_r12_30_1_,
        claim1_.referral_number as referra13_30_1_,
        claim1_.referring_provider_key as referri19_30_1_,
        claim1_.rendering_provider_key as renderi20_30_1_,
        claim1_.source_system as source_14_30_1_,
        claim1_.start_date as start_d15_30_1_,
        claim1_.station_key as station21_30_1_,
        formtype2_.form_type_key as form_typ1_22_2_,
        formtype2_.form_code as form_cod2_22_2_ 
    from
        dim_institutional_claim institutio0_ 
    left outer join
        dim_va_claim claim1_ 
            on institutio0_.claim_key=claim1_.claim_key 
    left outer join
        dim_claim_form_type formtype2_ 
            on claim1_.form_type_key=formtype2_.form_type_key 
    where
        institutio0_.claim_key=?
Hibernate: 
    select
        institutio0_.claim_key as claim_ke1_24_0_,
        institutio0_.admission_date as admissio2_24_0_,
        institutio0_.statement_from_date as statemen3_24_0_,
        institutio0_.statement_to_date as statemen4_24_0_,
        claim1_.claim_key as claim_ke1_30_1_,
        claim1_.etl_batch_id as etl_batc2_30_1_,
        claim1_.billing_provider_key as billing16_30_1_,
        claim1_.ccn_region as ccn_regi3_30_1_,
        claim1_.charge_amount as charge_a4_30_1_,
        claim1_.claim_id as claim_id5_30_1_,
        claim1_.end_date as end_date6_30_1_,
        claim1_.form_type_key as form_ty17_30_1_,
        claim1_.is_current as is_curre7_30_1_,
        claim1_.last_updated_date as last_upd8_30_1_,
        claim1_.other_insurance as other_in9_30_1_,
        claim1_.patient_key as patient18_30_1_,
        claim1_.patient_account_number as patient10_30_1_,
        claim1_.preauth_number as preauth11_30_1_,
        claim1_.claim_receipt_date as claim_r12_30_1_,
        claim1_.referral_number as referra13_30_1_,
        claim1_.referring_provider_key as referri19_30_1_,
        claim1_.rendering_provider_key as renderi20_30_1_,
        claim1_.source_system as source_14_30_1_,
        claim1_.start_date as start_d15_30_1_,
        claim1_.station_key as station21_30_1_,
        formtype2_.form_type_key as form_typ1_22_2_,
        formtype2_.form_code as form_cod2_22_2_ 
    from
        dim_institutional_claim institutio0_ 
    left outer join
        dim_va_claim claim1_ 
            on institutio0_.claim_key=claim1_.claim_key 
    left outer join
        dim_claim_form_type formtype2_ 
            on claim1_.form_type_key=formtype2_.form_type_key 
    where
        institutio0_.claim_key=?
Hibernate: 
    select
        institutio0_.claim_key as claim_ke1_24_0_,
        institutio0_.admission_date as admissio2_24_0_,
        institutio0_.statement_from_date as statemen3_24_0_,
        institutio0_.statement_to_date as statemen4_24_0_,
        claim1_.claim_key as claim_ke1_30_1_,
        claim1_.etl_batch_id as etl_batc2_30_1_,
        claim1_.billing_provider_key as billing16_30_1_,
        claim1_.ccn_region as ccn_regi3_30_1_,
        claim1_.charge_amount as charge_a4_30_1_,
        claim1_.claim_id as claim_id5_30_1_,
        claim1_.end_date as end_date6_30_1_,
        claim1_.form_type_key as form_ty17_30_1_,
        claim1_.is_current as is_curre7_30_1_,
        claim1_.last_updated_date as last_upd8_30_1_,
        claim1_.other_insurance as other_in9_30_1_,
        claim1_.patient_key as patient18_30_1_,
        claim1_.patient_account_number as patient10_30_1_,
        claim1_.preauth_number as preauth11_30_1_,
        claim1_.claim_receipt_date as claim_r12_30_1_,
        claim1_.referral_number as referra13_30_1_,
        claim1_.referring_provider_key as referri19_30_1_,
        claim1_.rendering_provider_key as renderi20_30_1_,
        claim1_.source_system as source_14_30_1_,
        claim1_.start_date as start_d15_30_1_,
        claim1_.station_key as station21_30_1_,
        formtype2_.form_type_key as form_typ1_22_2_,
        formtype2_.form_code as form_cod2_22_2_ 
    from
        dim_institutional_claim institutio0_ 
    left outer join
        dim_va_claim claim1_ 
            on institutio0_.claim_key=claim1_.claim_key 
    left outer join
        dim_claim_form_type formtype2_ 
            on claim1_.form_type_key=formtype2_.form_type_key 
    where
        institutio0_.claim_key=?
2018-04-17 08:28:59.485 INFO BatchProcessor         - Loaded 6 claims 6 lines
2018-04-17 08:28:59.485 INFO BatchProcessor         - Updating status of batch 'dent_batch_1' to RULES_IN_PROCESS
Hibernate: 
    /* load gov.va.ccrs.brengine.batchprocessing.ProcessingTracker */ select
        processing0_.rules_batch_log_key as rules_ba1_38_0_,
        processing0_.etl_batch_id as etl_batc2_38_0_,
        processing0_.claim_type as claim_ty3_38_0_,
        processing0_.engine_version as engine_v4_38_0_,
        processing0_.error as error5_38_0_,
        processing0_.end_date_time as end_date6_38_0_,
        processing0_.hostname as hostname7_38_0_,
        processing0_.resume_mode as resume_m8_38_0_,
        processing0_.last_updated_user as last_upd9_38_0_,
        processing0_.number_of_claims as number_10_38_0_,
        processing0_.number_of_failures as number_11_38_0_,
        processing0_.number_of_lines as number_12_38_0_,
        processing0_.number_of_processed_claims as number_13_38_0_,
        processing0_.number_of_processed_lines as number_14_38_0_,
        processing0_.number_of_waiting_for_data as number_15_38_0_,
        processing0_.rule_names as rule_na16_38_0_,
        processing0_.environment_name as environ17_38_0_,
        processing0_.start_date_time as start_d18_38_0_,
        processing0_.status as status19_38_0_,
        processing0_.last_updated_date_time as last_up20_38_0_ 
    from
        rules_batch_log processing0_ 
    where
        processing0_.rules_batch_log_key=?
Hibernate: 
    /* load gov.va.ccrs.brengine.batchprocessing.BatchInfo */ select
        batchinfo0_.etl_batch_id as etl_batc1_16_0_,
        batchinfo0_.batch_status as batch_st2_16_0_,
        batchinfo0_.last_updated_user as last_upd3_16_0_,
        batchinfo0_.end_date_time as end_date4_16_0_,
        batchinfo0_.source_system as source_s5_16_0_,
        batchinfo0_.last_updated_date as last_upd6_16_0_ 
    from
        claim_batch_log batchinfo0_ 
    where
        batchinfo0_.etl_batch_id=?
Hibernate: 
    /* update
        gov.va.ccrs.brengine.batchprocessing.ProcessingTracker */ update
            rules_batch_log 
        set
            etl_batch_id=?,
            claim_type=?,
            engine_version=?,
            error=?,
            end_date_time=?,
            hostname=?,
            resume_mode=?,
            last_updated_user=?,
            number_of_claims=?,
            number_of_failures=?,
            number_of_lines=?,
            number_of_processed_claims=?,
            number_of_processed_lines=?,
            number_of_waiting_for_data=?,
            rule_names=?,
            environment_name=?,
            start_date_time=?,
            status=?,
            last_updated_date_time=? 
        where
            rules_batch_log_key=?
Hibernate: 
    /* update
        gov.va.ccrs.brengine.batchprocessing.BatchInfo */ update
            claim_batch_log 
        set
            batch_status=?,
            last_updated_user=?,
            end_date_time=?,
            source_system=?,
            last_updated_date=? 
        where
            etl_batch_id=?
2018-04-17 08:28:59.491 INFO BatchProcessor         - Starting 3 threads to process the batch dent_batch_1
Hibernate: 
    /* select
        r 
    from
        Referral r 
    where
        r.referralNumber = :referralNumber */ select
            referral0_.referral_key as referral1_10_,
            referral0_.referral_expiration_date as referral2_10_,
            referral0_.payment_authority_obligation_key as payment_3_10_,
            referral0_.referral_date as referral4_10_,
            referral0_.referral_number as referral5_10_,
            referral0_.referring_provider as referrin6_10_,
            referral0_.service_requested as service_7_10_ 
        from
            ccra.referral referral0_ 
        where
            referral0_.referral_number=?
Hibernate: 
    /* select
        r 
    from
        Referral r 
    where
        r.referralNumber = :referralNumber */ select
            referral0_.referral_key as referral1_10_,
            referral0_.referral_expiration_date as referral2_10_,
            referral0_.payment_authority_obligation_key as payment_3_10_,
            referral0_.referral_date as referral4_10_,
            referral0_.referral_number as referral5_10_,
            referral0_.referring_provider as referrin6_10_,
            referral0_.service_requested as service_7_10_ 
        from
            ccra.referral referral0_ 
        where
            referral0_.referral_number=?
Hibernate: 
    /* select
        r 
    from
        Referral r 
    where
        r.referralNumber = :referralNumber */ select
            referral0_.referral_key as referral1_10_,
            referral0_.referral_expiration_date as referral2_10_,
            referral0_.payment_authority_obligation_key as payment_3_10_,
            referral0_.referral_date as referral4_10_,
            referral0_.referral_number as referral5_10_,
            referral0_.referring_provider as referrin6_10_,
            referral0_.service_requested as service_7_10_ 
        from
            ccra.referral referral0_ 
        where
            referral0_.referral_number=?
2018-04-17 08:28:59.523 WARN larThresholdRuleConfig - Threshold for the claim type DENTAL is not defined in the database, using the default 30000 from config file
2018-04-17 08:28:59.523 WARN larThresholdRuleConfig - Threshold for the claim type DENTAL is not defined in the database, using the default 30000 from config file
2018-04-17 08:28:59.523 WARN larThresholdRuleConfig - Threshold for the claim type DENTAL is not defined in the database, using the default 30000 from config file
Hibernate: 
    /* select
        distinct c 
    from
        Claim c 
    join
        fetch c.formType 
    join
        fetch c.dentClaimLines line 
    join
        fetch c.decisions d 
    left join
        fetch c.billingProvider 
    left join
        fetch c.patient pt 
    left join
        fetch c.dentClaimTeeth 
    left join
        fetch line.procedure 
    left join
        fetch line.modifiers 
    where
        c.isCurrent = 'Y' 
        and d.decisionType in (
            'APPROVED', 'BILL_SENT', 'PAID'
        ) */ select
            distinct claim0_.claim_key as claim_ke1_30_0_,
            formtype1_.form_type_key as form_typ1_22_1_,
            dentclaiml2_.claim_detail_key as claim_de1_32_2_,
            procedure7_.procedure_key as procedur1_28_3_,
            modifiers8_.claim_line_modifier_key as claim_li1_19_4_,
            decisions3_.decision_key as decision1_21_5_,
            provider4_.provider_key as provider1_29_6_,
            patient5_.patient_key as patient_1_25_7_,
            dentclaimt6_.claim_tooth_key as claim_to1_20_8_,
            claim0_.etl_batch_id as etl_batc2_30_0_,
            claim0_.billing_provider_key as billing16_30_0_,
            claim0_.ccn_region as ccn_regi3_30_0_,
            claim0_.charge_amount as charge_a4_30_0_,
            claim0_.claim_id as claim_id5_30_0_,
            claim0_.end_date as end_date6_30_0_,
            claim0_.form_type_key as form_ty17_30_0_,
            claim0_.is_current as is_curre7_30_0_,
            claim0_.last_updated_date as last_upd8_30_0_,
            claim0_.other_insurance as other_in9_30_0_,
            claim0_.patient_key as patient18_30_0_,
            claim0_.patient_account_number as patient10_30_0_,
            claim0_.preauth_number as preauth11_30_0_,
            claim0_.claim_receipt_date as claim_r12_30_0_,
            claim0_.referral_number as referra13_30_0_,
            claim0_.referring_provider_key as referri19_30_0_,
            claim0_.rendering_provider_key as renderi20_30_0_,
            claim0_.source_system as source_14_30_0_,
            claim0_.start_date as start_d15_30_0_,
            claim0_.station_key as station21_30_0_,
            formtype1_.form_code as form_cod2_22_1_,
            dentclaiml2_.etl_batch_id as etl_batc2_32_2_,
            dentclaiml2_.claim_key as claim_ke8_32_2_,
            dentclaiml2_.date_paid as date_pai3_32_2_,
            dentclaiml2_.is_current as is_curre4_32_2_,
            dentclaiml2_.line_item_control_number as line_ite5_32_2_,
            dentclaiml2_.charge_amount as charge_a6_32_2_,
            dentclaiml2_.procedure_key as procedur9_32_2_,
            dentclaiml2_.service_date as service_7_32_2_,
            dentclaiml2_.claim_key as claim_ke8_32_0__,
            dentclaiml2_.claim_detail_key as claim_de1_32_0__,
            procedure7_.procedure_code as procedur2_28_3_,
            procedure7_.short_description as short_de3_28_3_,
            modifiers8_.modifier_code as modifier2_19_4_,
            modifiers8_.claim_detail_key_dt as claim_de4_19_4_,
            modifiers8_.claim_detail_key_in as claim_de5_19_4_,
            modifiers8_.is_current as is_curre3_19_4_,
            modifiers8_.claim_detail_key_pr as claim_de6_19_4_,
            modifiers8_.claim_detail_key_dt as claim_de4_19_1__,
            modifiers8_.claim_line_modifier_key as claim_li1_19_1__,
            decisions3_.etl_batch_id as etl_batc2_21_5_,
            decisions3_.claim_key as claim_ke8_21_5_,
            decisions3_.claim_detail_key as claim_de3_21_5_,
            decisions3_.decision_date_time as decision4_21_5_,
            decisions3_.decision as decision5_21_5_,
            decisions3_.last_updated_user as last_upd6_21_5_,
            decisions3_.last_updated_date_time as last_upd7_21_5_,
            decisions3_.claim_key as claim_ke8_21_2__,
            decisions3_.decision_key as decision1_21_2__,
            provider4_.provider_name as provider2_29_6_,
            provider4_.npi as npi3_29_6_,
            provider4_.tax_id as tax_id4_29_6_,
            patient5_.address1 as address2_25_7_,
            patient5_.address2 as address3_25_7_,
            patient5_.etl_batch_id as etl_batc4_25_7_,
            patient5_.city as city5_25_7_,
            patient5_.date_of_birth as date_of_6_25_7_,
            patient5_.first_name as first_na7_25_7_,
            patient5_.icn as icn8_25_7_,
            patient5_.insured_id as insured_9_25_7_,
            patient5_.last_name as last_na10_25_7_,
            patient5_.member_id as member_11_25_7_,
            patient5_.middle_initial as middle_12_25_7_,
            patient5_.postal_code as postal_13_25_7_,
            patient5_.sex as sex14_25_7_,
            patient5_.ssn as ssn15_25_7_,
            patient5_.state_code as state_c16_25_7_,
            dentclaimt6_.claim_key as claim_ke6_20_8_,
            dentclaimt6_.end_date as end_date2_20_8_,
            dentclaimt6_.start_date as start_da3_20_8_,
            dentclaimt6_.tooth_number as tooth_nu4_20_8_,
            dentclaimt6_.tooth_status as tooth_st5_20_8_,
            dentclaimt6_.claim_key as claim_ke6_20_3__,
            dentclaimt6_.claim_tooth_key as claim_to1_20_3__ 
        from
            dim_va_claim claim0_ 
        inner join
            dim_claim_form_type formtype1_ 
                on claim0_.form_type_key=formtype1_.form_type_key 
        inner join
            f_dental_claim_details dentclaiml2_ 
                on claim0_.claim_key=dentclaiml2_.claim_key 
        left outer join
            dim_procedure_code procedure7_ 
                on dentclaiml2_.procedure_key=procedure7_.procedure_key 
        left outer join
            claim_line_modifier modifiers8_ 
                on dentclaiml2_.claim_detail_key=modifiers8_.claim_detail_key_dt 
        inner join
            decision decisions3_ 
                on claim0_.claim_key=decisions3_.claim_key 
        left outer join
            dim_provider provider4_ 
                on claim0_.billing_provider_key=provider4_.provider_key 
        left outer join
            dim_patient patient5_ 
                on claim0_.patient_key=patient5_.patient_key 
        left outer join
            claim_tooth_status dentclaimt6_ 
                on claim0_.claim_key=dentclaimt6_.claim_key 
        where
            claim0_.is_current='Y' 
            and (
                decisions3_.decision in (
                    'APPROVED' , 'BILL_SENT' , 'PAID'
                )
            )
Hibernate: 
    /* select
        distinct c 
    from
        Claim c 
    join
        fetch c.formType 
    join
        fetch c.dentClaimLines line 
    join
        fetch c.decisions d 
    left join
        fetch c.billingProvider 
    left join
        fetch c.patient pt 
    left join
        fetch c.dentClaimTeeth 
    left join
        fetch line.procedure 
    left join
        fetch line.modifiers 
    where
        c.isCurrent = 'Y' 
        and d.decisionType in (
            'APPROVED', 'BILL_SENT', 'PAID'
        ) */ select
            distinct claim0_.claim_key as claim_ke1_30_0_,
            formtype1_.form_type_key as form_typ1_22_1_,
            dentclaiml2_.claim_detail_key as claim_de1_32_2_,
            procedure7_.procedure_key as procedur1_28_3_,
            modifiers8_.claim_line_modifier_key as claim_li1_19_4_,
            decisions3_.decision_key as decision1_21_5_,
            provider4_.provider_key as provider1_29_6_,
            patient5_.patient_key as patient_1_25_7_,
            dentclaimt6_.claim_tooth_key as claim_to1_20_8_,
            claim0_.etl_batch_id as etl_batc2_30_0_,
            claim0_.billing_provider_key as billing16_30_0_,
            claim0_.ccn_region as ccn_regi3_30_0_,
            claim0_.charge_amount as charge_a4_30_0_,
            claim0_.claim_id as claim_id5_30_0_,
            claim0_.end_date as end_date6_30_0_,
            claim0_.form_type_key as form_ty17_30_0_,
            claim0_.is_current as is_curre7_30_0_,
            claim0_.last_updated_date as last_upd8_30_0_,
            claim0_.other_insurance as other_in9_30_0_,
            claim0_.patient_key as patient18_30_0_,
            claim0_.patient_account_number as patient10_30_0_,
            claim0_.preauth_number as preauth11_30_0_,
            claim0_.claim_receipt_date as claim_r12_30_0_,
            claim0_.referral_number as referra13_30_0_,
            claim0_.referring_provider_key as referri19_30_0_,
            claim0_.rendering_provider_key as renderi20_30_0_,
            claim0_.source_system as source_14_30_0_,
            claim0_.start_date as start_d15_30_0_,
            claim0_.station_key as station21_30_0_,
            formtype1_.form_code as form_cod2_22_1_,
            dentclaiml2_.etl_batch_id as etl_batc2_32_2_,
            dentclaiml2_.claim_key as claim_ke8_32_2_,
            dentclaiml2_.date_paid as date_pai3_32_2_,
            dentclaiml2_.is_current as is_curre4_32_2_,
            dentclaiml2_.line_item_control_number as line_ite5_32_2_,
            dentclaiml2_.charge_amount as charge_a6_32_2_,
            dentclaiml2_.procedure_key as procedur9_32_2_,
            dentclaiml2_.service_date as service_7_32_2_,
            dentclaiml2_.claim_key as claim_ke8_32_0__,
            dentclaiml2_.claim_detail_key as claim_de1_32_0__,
            procedure7_.procedure_code as procedur2_28_3_,
            procedure7_.short_description as short_de3_28_3_,
            modifiers8_.modifier_code as modifier2_19_4_,
            modifiers8_.claim_detail_key_dt as claim_de4_19_4_,
            modifiers8_.claim_detail_key_in as claim_de5_19_4_,
            modifiers8_.is_current as is_curre3_19_4_,
            modifiers8_.claim_detail_key_pr as claim_de6_19_4_,
            modifiers8_.claim_detail_key_dt as claim_de4_19_1__,
            modifiers8_.claim_line_modifier_key as claim_li1_19_1__,
            decisions3_.etl_batch_id as etl_batc2_21_5_,
            decisions3_.claim_key as claim_ke8_21_5_,
            decisions3_.claim_detail_key as claim_de3_21_5_,
            decisions3_.decision_date_time as decision4_21_5_,
            decisions3_.decision as decision5_21_5_,
            decisions3_.last_updated_user as last_upd6_21_5_,
            decisions3_.last_updated_date_time as last_upd7_21_5_,
            decisions3_.claim_key as claim_ke8_21_2__,
            decisions3_.decision_key as decision1_21_2__,
            provider4_.provider_name as provider2_29_6_,
            provider4_.npi as npi3_29_6_,
            provider4_.tax_id as tax_id4_29_6_,
            patient5_.address1 as address2_25_7_,
            patient5_.address2 as address3_25_7_,
            patient5_.etl_batch_id as etl_batc4_25_7_,
            patient5_.city as city5_25_7_,
            patient5_.date_of_birth as date_of_6_25_7_,
            patient5_.first_name as first_na7_25_7_,
            patient5_.icn as icn8_25_7_,
            patient5_.insured_id as insured_9_25_7_,
            patient5_.last_name as last_na10_25_7_,
            patient5_.member_id as member_11_25_7_,
            patient5_.middle_initial as middle_12_25_7_,
            patient5_.postal_code as postal_13_25_7_,
            patient5_.sex as sex14_25_7_,
            patient5_.ssn as ssn15_25_7_,
            patient5_.state_code as state_c16_25_7_,
            dentclaimt6_.claim_key as claim_ke6_20_8_,
            dentclaimt6_.end_date as end_date2_20_8_,
            dentclaimt6_.start_date as start_da3_20_8_,
            dentclaimt6_.tooth_number as tooth_nu4_20_8_,
            dentclaimt6_.tooth_status as tooth_st5_20_8_,
            dentclaimt6_.claim_key as claim_ke6_20_3__,
            dentclaimt6_.claim_tooth_key as claim_to1_20_3__ 
        from
            dim_va_claim claim0_ 
        inner join
            dim_claim_form_type formtype1_ 
                on claim0_.form_type_key=formtype1_.form_type_key 
        inner join
            f_dental_claim_details dentclaiml2_ 
                on claim0_.claim_key=dentclaiml2_.claim_key 
        left outer join
            dim_procedure_code procedure7_ 
                on dentclaiml2_.procedure_key=procedure7_.procedure_key 
        left outer join
            claim_line_modifier modifiers8_ 
                on dentclaiml2_.claim_detail_key=modifiers8_.claim_detail_key_dt 
        inner join
            decision decisions3_ 
                on claim0_.claim_key=decisions3_.claim_key 
        left outer join
            dim_provider provider4_ 
                on claim0_.billing_provider_key=provider4_.provider_key 
        left outer join
            dim_patient patient5_ 
                on claim0_.patient_key=patient5_.patient_key 
        left outer join
            claim_tooth_status dentclaimt6_ 
                on claim0_.claim_key=dentclaimt6_.claim_key 
        where
            claim0_.is_current='Y' 
            and (
                decisions3_.decision in (
                    'APPROVED' , 'BILL_SENT' , 'PAID'
                )
            )
Hibernate: 
    /* select
        distinct r 
    from
        Referral r 
    left join
        fetch r.preAuthorization 
    where
        r.referralNumber = :referralNumber */ select
            distinct referral0_.referral_key as referral1_10_0_,
            preauthori1_.preauthorization_key as preautho1_8_1_,
            referral0_.referral_expiration_date as referral2_10_0_,
            referral0_.payment_authority_obligation_key as payment_3_10_0_,
            referral0_.referral_date as referral4_10_0_,
            referral0_.referral_number as referral5_10_0_,
            referral0_.referring_provider as referrin6_10_0_,
            referral0_.service_requested as service_7_10_0_,
            preauthori1_.date_from as date_fro2_8_1_,
            preauthori1_.date_to as date_to3_8_1_,
            preauthori1_.preauthorization_number as preautho4_8_1_,
            preauthori1_.referral_key as referral5_8_1_,
            preauthori1_.referral_key as referral5_8_0__,
            preauthori1_.preauthorization_key as preautho1_8_0__ 
        from
            ccra.referral referral0_ 
        left outer join
            ccra.preauthorization preauthori1_ 
                on referral0_.referral_key=preauthori1_.referral_key 
        where
            referral0_.referral_number=?
Hibernate: 
    select
        preauthori0_.preauthorization_key as preautho5_9_0_,
        preauthori0_.preauthorization_detail_key as preautho1_9_0_,
        preauthori0_.preauthorization_detail_key as preautho1_9_1_,
        preauthori0_.preauthorization_key as preautho5_9_1_,
        preauthori0_.preauthorized_service as preautho2_9_1_,
        preauthori0_.quantity as quantity3_9_1_,
        preauthori0_.subcategory as subcateg4_9_1_,
        orderset1_.orderset_key as orderset1_3_2_,
        orderset1_.code as code2_3_2_,
        orderset1_.order_set_description as order_se3_3_2_,
        orderset1_.pre_authorization_detail_key as pre_auth4_3_2_,
        ordersetda2_.orderset_date_key as orderset1_4_3_,
        ordersetda2_.date_from as date_fro2_4_3_,
        orderset3_.orderset_key as orderset1_3_4_,
        orderset3_.code as code2_3_4_,
        orderset3_.order_set_description as order_se3_3_4_,
        orderset3_.pre_authorization_detail_key as pre_auth4_3_4_ 
    from
        ccra.preauthorization_detail preauthori0_ 
    left outer join
        ccra.orderset orderset1_ 
            on preauthori0_.preauthorization_detail_key=orderset1_.pre_authorization_detail_key 
    left outer join
        ccra.ordersetdate ordersetda2_ 
            on orderset1_.orderset_key=ordersetda2_.orderset_date_key 
    left outer join
        ccra.orderset orderset3_ 
            on ordersetda2_.orderset_date_key=orderset3_.orderset_key 
    where
        preauthori0_.preauthorization_key=?
Hibernate: 
    /* select
        distinct r 
    from
        Referral r 
    left join
        fetch r.preAuthorization 
    where
        r.referralNumber = :referralNumber */ select
            distinct referral0_.referral_key as referral1_10_0_,
            preauthori1_.preauthorization_key as preautho1_8_1_,
            referral0_.referral_expiration_date as referral2_10_0_,
            referral0_.payment_authority_obligation_key as payment_3_10_0_,
            referral0_.referral_date as referral4_10_0_,
            referral0_.referral_number as referral5_10_0_,
            referral0_.referring_provider as referrin6_10_0_,
            referral0_.service_requested as service_7_10_0_,
            preauthori1_.date_from as date_fro2_8_1_,
            preauthori1_.date_to as date_to3_8_1_,
            preauthori1_.preauthorization_number as preautho4_8_1_,
            preauthori1_.referral_key as referral5_8_1_,
            preauthori1_.referral_key as referral5_8_0__,
            preauthori1_.preauthorization_key as preautho1_8_0__ 
        from
            ccra.referral referral0_ 
        left outer join
            ccra.preauthorization preauthori1_ 
                on referral0_.referral_key=preauthori1_.referral_key 
        where
            referral0_.referral_number=?
Hibernate: 
    /* select
        r 
    from
        Referral r 
    join
        fetch r.referralPatients patient 
    where
        r.referralNumber = :referralNumber 
        and r.referralDate<=:serviceFromDate */ select
            referral0_.referral_key as referral1_10_0_,
            referralpa1_.referral_patient_key as referral1_11_1_,
            referral0_.referral_expiration_date as referral2_10_0_,
            referral0_.payment_authority_obligation_key as payment_3_10_0_,
            referral0_.referral_date as referral4_10_0_,
            referral0_.referral_number as referral5_10_0_,
            referral0_.referring_provider as referrin6_10_0_,
            referral0_.service_requested as service_7_10_0_,
            referralpa1_.icn as icn2_11_1_,
            referralpa1_.referral_key as referral3_11_1_,
            referralpa1_.referral_key as referral3_11_0__,
            referralpa1_.referral_patient_key as referral1_11_0__ 
        from
            ccra.referral referral0_ 
        inner join
            ccra.referral_patient referralpa1_ 
                on referral0_.referral_key=referralpa1_.referral_key 
        where
            referral0_.referral_number=? 
            and referral0_.referral_date<=?
Hibernate: 
    select
        ordersetda0_.orderset_date_key as orderset3_5_0_,
        ordersetda0_.orderset_date_item_key as orderset1_5_0_,
        ordersetda0_.orderset_date_item_key as orderset1_5_1_,
        ordersetda0_.orderset_date_key as orderset3_5_1_,
        ordersetda0_.procedure_code as procedur2_5_1_ 
    from
        ccra.ordersetdateitem ordersetda0_ 
    where
        ordersetda0_.orderset_date_key=?
Hibernate: 
    /* select
        distinct c 
    from
        Claim c 
    join
        fetch c.formType 
    join
        fetch c.dentClaimLines line 
    join
        fetch c.decisions d 
    left join
        fetch c.billingProvider 
    left join
        fetch c.patient pt 
    left join
        fetch c.dentClaimTeeth 
    left join
        fetch line.procedure 
    left join
        fetch line.modifiers 
    where
        c.isCurrent = 'Y' 
        and d.decisionType in (
            'APPROVED', 'BILL_SENT', 'PAID'
        ) */ select
            distinct claim0_.claim_key as claim_ke1_30_0_,
            formtype1_.form_type_key as form_typ1_22_1_,
            dentclaiml2_.claim_detail_key as claim_de1_32_2_,
            procedure7_.procedure_key as procedur1_28_3_,
            modifiers8_.claim_line_modifier_key as claim_li1_19_4_,
            decisions3_.decision_key as decision1_21_5_,
            provider4_.provider_key as provider1_29_6_,
            patient5_.patient_key as patient_1_25_7_,
            dentclaimt6_.claim_tooth_key as claim_to1_20_8_,
            claim0_.etl_batch_id as etl_batc2_30_0_,
            claim0_.billing_provider_key as billing16_30_0_,
            claim0_.ccn_region as ccn_regi3_30_0_,
            claim0_.charge_amount as charge_a4_30_0_,
            claim0_.claim_id as claim_id5_30_0_,
            claim0_.end_date as end_date6_30_0_,
            claim0_.form_type_key as form_ty17_30_0_,
            claim0_.is_current as is_curre7_30_0_,
            claim0_.last_updated_date as last_upd8_30_0_,
            claim0_.other_insurance as other_in9_30_0_,
            claim0_.patient_key as patient18_30_0_,
            claim0_.patient_account_number as patient10_30_0_,
            claim0_.preauth_number as preauth11_30_0_,
            claim0_.claim_receipt_date as claim_r12_30_0_,
            claim0_.referral_number as referra13_30_0_,
            claim0_.referring_provider_key as referri19_30_0_,
            claim0_.rendering_provider_key as renderi20_30_0_,
            claim0_.source_system as source_14_30_0_,
            claim0_.start_date as start_d15_30_0_,
            claim0_.station_key as station21_30_0_,
            formtype1_.form_code as form_cod2_22_1_,
            dentclaiml2_.etl_batch_id as etl_batc2_32_2_,
            dentclaiml2_.claim_key as claim_ke8_32_2_,
            dentclaiml2_.date_paid as date_pai3_32_2_,
            dentclaiml2_.is_current as is_curre4_32_2_,
            dentclaiml2_.line_item_control_number as line_ite5_32_2_,
            dentclaiml2_.charge_amount as charge_a6_32_2_,
            dentclaiml2_.procedure_key as procedur9_32_2_,
            dentclaiml2_.service_date as service_7_32_2_,
            dentclaiml2_.claim_key as claim_ke8_32_0__,
            dentclaiml2_.claim_detail_key as claim_de1_32_0__,
            procedure7_.procedure_code as procedur2_28_3_,
            procedure7_.short_description as short_de3_28_3_,
            modifiers8_.modifier_code as modifier2_19_4_,
            modifiers8_.claim_detail_key_dt as claim_de4_19_4_,
            modifiers8_.claim_detail_key_in as claim_de5_19_4_,
            modifiers8_.is_current as is_curre3_19_4_,
            modifiers8_.claim_detail_key_pr as claim_de6_19_4_,
            modifiers8_.claim_detail_key_dt as claim_de4_19_1__,
            modifiers8_.claim_line_modifier_key as claim_li1_19_1__,
            decisions3_.etl_batch_id as etl_batc2_21_5_,
            decisions3_.claim_key as claim_ke8_21_5_,
            decisions3_.claim_detail_key as claim_de3_21_5_,
            decisions3_.decision_date_time as decision4_21_5_,
            decisions3_.decision as decision5_21_5_,
            decisions3_.last_updated_user as last_upd6_21_5_,
            decisions3_.last_updated_date_time as last_upd7_21_5_,
            decisions3_.claim_key as claim_ke8_21_2__,
            decisions3_.decision_key as decision1_21_2__,
            provider4_.provider_name as provider2_29_6_,
            provider4_.npi as npi3_29_6_,
            provider4_.tax_id as tax_id4_29_6_,
            patient5_.address1 as address2_25_7_,
            patient5_.address2 as address3_25_7_,
            patient5_.etl_batch_id as etl_batc4_25_7_,
            patient5_.city as city5_25_7_,
            patient5_.date_of_birth as date_of_6_25_7_,
            patient5_.first_name as first_na7_25_7_,
            patient5_.icn as icn8_25_7_,
            patient5_.insured_id as insured_9_25_7_,
            patient5_.last_name as last_na10_25_7_,
            patient5_.member_id as member_11_25_7_,
            patient5_.middle_initial as middle_12_25_7_,
            patient5_.postal_code as postal_13_25_7_,
            patient5_.sex as sex14_25_7_,
            patient5_.ssn as ssn15_25_7_,
            patient5_.state_code as state_c16_25_7_,
            dentclaimt6_.claim_key as claim_ke6_20_8_,
            dentclaimt6_.end_date as end_date2_20_8_,
            dentclaimt6_.start_date as start_da3_20_8_,
            dentclaimt6_.tooth_number as tooth_nu4_20_8_,
            dentclaimt6_.tooth_status as tooth_st5_20_8_,
            dentclaimt6_.claim_key as claim_ke6_20_3__,
            dentclaimt6_.claim_tooth_key as claim_to1_20_3__ 
        from
            dim_va_claim claim0_ 
        inner join
            dim_claim_form_type formtype1_ 
                on claim0_.form_type_key=formtype1_.form_type_key 
        inner join
            f_dental_claim_details dentclaiml2_ 
                on claim0_.claim_key=dentclaiml2_.claim_key 
        left outer join
            dim_procedure_code procedure7_ 
                on dentclaiml2_.procedure_key=procedure7_.procedure_key 
        left outer join
            claim_line_modifier modifiers8_ 
                on dentclaiml2_.claim_detail_key=modifiers8_.claim_detail_key_dt 
        inner join
            decision decisions3_ 
                on claim0_.claim_key=decisions3_.claim_key 
        left outer join
            dim_provider provider4_ 
                on claim0_.billing_provider_key=provider4_.provider_key 
        left outer join
            dim_patient patient5_ 
                on claim0_.patient_key=patient5_.patient_key 
        left outer join
            claim_tooth_status dentclaimt6_ 
                on claim0_.claim_key=dentclaimt6_.claim_key 
        where
            claim0_.is_current='Y' 
            and (
                decisions3_.decision in (
                    'APPROVED' , 'BILL_SENT' , 'PAID'
                )
            )
Hibernate: 
    /* select
        generatedAlias0 
    from
        Seoc as generatedAlias0 
    where
        generatedAlias0.seocId=:param0 */ select
            seoc0_.seoc_key as seoc_key1_39_,
            seoc0_.category_of_care as category2_39_,
            seoc0_.duration as duration3_39_,
            seoc0_.end_date as end_date4_39_,
            seoc0_.is_pal as is_pal5_39_,
            seoc0_.name as name6_39_,
            seoc0_.seoc_id as seoc_id7_39_,
            seoc0_.start_date as start_da8_39_,
            seoc0_.version as version9_39_ 
        from
            seoc seoc0_ 
        where
            seoc0_.seoc_id=?
Hibernate: 
    select
        procedures0_.seoc_key as seoc_key1_40_0_,
        procedures0_.procedure_key as procedur2_40_0_,
        procedures0_.seoc_key as seoc_key1_40_1_,
        procedures0_.procedure_key as procedur2_40_1_,
        procedure1_.procedure_key as procedur1_28_2_,
        procedure1_.procedure_code as procedur2_28_2_,
        procedure1_.short_description as short_de3_28_2_ 
    from
        seoc_procedure_junction procedures0_ 
    inner join
        dim_procedure_code procedure1_ 
            on procedures0_.procedure_key=procedure1_.procedure_key 
    where
        procedures0_.seoc_key=?
Hibernate: 
    /* select
        r 
    from
        Referral r 
    join
        fetch r.referralPatients patient 
    where
        r.referralNumber = :referralNumber 
        and r.referralDate<=:serviceFromDate */ select
            referral0_.referral_key as referral1_10_0_,
            referralpa1_.referral_patient_key as referral1_11_1_,
            referral0_.referral_expiration_date as referral2_10_0_,
            referral0_.payment_authority_obligation_key as payment_3_10_0_,
            referral0_.referral_date as referral4_10_0_,
            referral0_.referral_number as referral5_10_0_,
            referral0_.referring_provider as referrin6_10_0_,
            referral0_.service_requested as service_7_10_0_,
            referralpa1_.icn as icn2_11_1_,
            referralpa1_.referral_key as referral3_11_1_,
            referralpa1_.referral_key as referral3_11_0__,
            referralpa1_.referral_patient_key as referral1_11_0__ 
        from
            ccra.referral referral0_ 
        inner join
            ccra.referral_patient referralpa1_ 
                on referral0_.referral_key=referralpa1_.referral_key 
        where
            referral0_.referral_number=? 
            and referral0_.referral_date<=?
Hibernate: 
    /* 
from
    ProviderSanction 
where
    exclusionDate is not null 
    and (
        npi in :npis 
    ) */ select
        providersa0_.provider_sanction_key as provider1_36_,
        providersa0_.exclusion_date as exclusio2_36_,
        providersa0_.npi as npi3_36_,
        providersa0_.reinstate_date as reinstat4_36_,
        providersa0_.tax_id as tax_id5_36_ 
    from
        lkup_provider_sanction providersa0_ 
    where
        (
            providersa0_.exclusion_date is not null
        ) 
        and (
            providersa0_.npi in (
                ?
            )
        )
Hibernate: 
    /* 
from
    ProviderSanction 
where
    exclusionDate is not null 
    and (
        npi in :npis 
    ) */ select
        providersa0_.provider_sanction_key as provider1_36_,
        providersa0_.exclusion_date as exclusio2_36_,
        providersa0_.npi as npi3_36_,
        providersa0_.reinstate_date as reinstat4_36_,
        providersa0_.tax_id as tax_id5_36_ 
    from
        lkup_provider_sanction providersa0_ 
    where
        (
            providersa0_.exclusion_date is not null
        ) 
        and (
            providersa0_.npi in (
                ?
            )
        )
Hibernate: 
    /* select
        r 
    from
        Referral r 
    where
        r.referralNumber = :referralNumber */ select
            referral0_.referral_key as referral1_10_,
            referral0_.referral_expiration_date as referral2_10_,
            referral0_.payment_authority_obligation_key as payment_3_10_,
            referral0_.referral_date as referral4_10_,
            referral0_.referral_number as referral5_10_,
            referral0_.referring_provider as referrin6_10_,
            referral0_.service_requested as service_7_10_ 
        from
            ccra.referral referral0_ 
        where
            referral0_.referral_number=?
Hibernate: 
    /* select
        distinct r 
    from
        Referral r 
    left join
        fetch r.preAuthorization 
    where
        r.referralNumber = :referralNumber */ select
            distinct referral0_.referral_key as referral1_10_0_,
            preauthori1_.preauthorization_key as preautho1_8_1_,
            referral0_.referral_expiration_date as referral2_10_0_,
            referral0_.payment_authority_obligation_key as payment_3_10_0_,
            referral0_.referral_date as referral4_10_0_,
            referral0_.referral_number as referral5_10_0_,
            referral0_.referring_provider as referrin6_10_0_,
            referral0_.service_requested as service_7_10_0_,
            preauthori1_.date_from as date_fro2_8_1_,
            preauthori1_.date_to as date_to3_8_1_,
            preauthori1_.preauthorization_number as preautho4_8_1_,
            preauthori1_.referral_key as referral5_8_1_,
            preauthori1_.referral_key as referral5_8_0__,
            preauthori1_.preauthorization_key as preautho1_8_0__ 
        from
            ccra.referral referral0_ 
        left outer join
            ccra.preauthorization preauthori1_ 
                on referral0_.referral_key=preauthori1_.referral_key 
        where
            referral0_.referral_number=?
Hibernate: 
    select
        preauthori0_.preauthorization_key as preautho5_9_0_,
        preauthori0_.preauthorization_detail_key as preautho1_9_0_,
        preauthori0_.preauthorization_detail_key as preautho1_9_1_,
        preauthori0_.preauthorization_key as preautho5_9_1_,
        preauthori0_.preauthorized_service as preautho2_9_1_,
        preauthori0_.quantity as quantity3_9_1_,
        preauthori0_.subcategory as subcateg4_9_1_,
        orderset1_.orderset_key as orderset1_3_2_,
        orderset1_.code as code2_3_2_,
        orderset1_.order_set_description as order_se3_3_2_,
        orderset1_.pre_authorization_detail_key as pre_auth4_3_2_,
        ordersetda2_.orderset_date_key as orderset1_4_3_,
        ordersetda2_.date_from as date_fro2_4_3_,
        orderset3_.orderset_key as orderset1_3_4_,
        orderset3_.code as code2_3_4_,
        orderset3_.order_set_description as order_se3_3_4_,
        orderset3_.pre_authorization_detail_key as pre_auth4_3_4_ 
    from
        ccra.preauthorization_detail preauthori0_ 
    left outer join
        ccra.orderset orderset1_ 
            on preauthori0_.preauthorization_detail_key=orderset1_.pre_authorization_detail_key 
    left outer join
        ccra.ordersetdate ordersetda2_ 
            on orderset1_.orderset_key=ordersetda2_.orderset_date_key 
    left outer join
        ccra.orderset orderset3_ 
            on ordersetda2_.orderset_date_key=orderset3_.orderset_key 
    where
        preauthori0_.preauthorization_key=?
Hibernate: 
    select
        ordersetda0_.orderset_date_key as orderset3_5_0_,
        ordersetda0_.orderset_date_item_key as orderset1_5_0_,
        ordersetda0_.orderset_date_item_key as orderset1_5_1_,
        ordersetda0_.orderset_date_key as orderset3_5_1_,
        ordersetda0_.procedure_code as procedur2_5_1_ 
    from
        ccra.ordersetdateitem ordersetda0_ 
    where
        ordersetda0_.orderset_date_key=?
Hibernate: 
    /* select
        r 
    from
        Referral r 
    where
        r.referralNumber = :referralNumber */ select
            referral0_.referral_key as referral1_10_,
            referral0_.referral_expiration_date as referral2_10_,
            referral0_.payment_authority_obligation_key as payment_3_10_,
            referral0_.referral_date as referral4_10_,
            referral0_.referral_number as referral5_10_,
            referral0_.referring_provider as referrin6_10_,
            referral0_.service_requested as service_7_10_ 
        from
            ccra.referral referral0_ 
        where
            referral0_.referral_number=?
Hibernate: 
    /* select
        r 
    from
        PaymentAuthorityObligation r 
    where
        r.id = :id */ select
            paymentaut0_.payment_authority_obligation_key as payment_1_7_,
            paymentaut0_.end_date as end_date2_7_,
            paymentaut0_.obligation_key as obligati4_7_,
            paymentaut0_.payment_authority_key as payment_5_7_,
            paymentaut0_.start_date as start_da3_7_ 
        from
            ccra.payment_authority_obligation paymentaut0_ 
        where
            paymentaut0_.payment_authority_obligation_key=?
Hibernate: 
    select
        obligation0_.obligation_key as obligati1_1_0_,
        obligation0_.acc as acc2_1_0_,
        obligation0_.category_of_care as category3_1_0_,
        obligation0_.category_of_care_subset as category4_1_0_,
        obligation0_.cost_center_boc as cost_cen5_1_0_,
        obligation0_.fund as fund6_1_0_,
        obligation0_.last_updated_date as last_upd7_1_0_,
        obligation0_.last_updated_user as last_upd8_1_0_,
        obligation0_.mnemonics as mnemonic9_1_0_,
        obligation0_.obligation_number as obligat10_1_0_,
        cptobligat1_.obligation_key as obligati4_0_1_,
        cptobligat1_.cpt_obligation_key as cpt_obli1_0_1_,
        cptobligat1_.cpt_obligation_key as cpt_obli1_0_2_,
        cptobligat1_.end_date as end_date2_0_2_,
        cptobligat1_.obligation_key as obligati4_0_2_,
        cptobligat1_.procedure_key as procedur5_0_2_,
        cptobligat1_.start_date as start_da3_0_2_,
        procedure2_.procedure_key as procedur1_28_3_,
        procedure2_.procedure_code as procedur2_28_3_,
        procedure2_.short_description as short_de3_28_3_ 
    from
        ccra.obligation obligation0_ 
    left outer join
        ccra.cpt_obligation cptobligat1_ 
            on obligation0_.obligation_key=cptobligat1_.obligation_key 
    left outer join
        dim_procedure_code procedure2_ 
            on cptobligat1_.procedure_key=procedure2_.procedure_key 
    where
        obligation0_.obligation_key=?
Hibernate: 
    /* select
        generatedAlias0 
    from
        Seoc as generatedAlias0 
    where
        generatedAlias0.seocId=:param0 */ select
            seoc0_.seoc_key as seoc_key1_39_,
            seoc0_.category_of_care as category2_39_,
            seoc0_.duration as duration3_39_,
            seoc0_.end_date as end_date4_39_,
            seoc0_.is_pal as is_pal5_39_,
            seoc0_.name as name6_39_,
            seoc0_.seoc_id as seoc_id7_39_,
            seoc0_.start_date as start_da8_39_,
            seoc0_.version as version9_39_ 
        from
            seoc seoc0_ 
        where
            seoc0_.seoc_id=?
Hibernate: 
    select
        paymentaut0_.payment_authority_key as payment_1_6_0_,
        paymentaut0_.code as code2_6_0_,
        paymentaut0_.description as descript3_6_0_,
        paymentaut0_.name as name4_6_0_,
        paymentaut1_.payment_authority_key as payment_5_7_1_,
        paymentaut1_.payment_authority_obligation_key as payment_1_7_1_,
        paymentaut1_.payment_authority_obligation_key as payment_1_7_2_,
        paymentaut1_.end_date as end_date2_7_2_,
        paymentaut1_.obligation_key as obligati4_7_2_,
        paymentaut1_.payment_authority_key as payment_5_7_2_,
        paymentaut1_.start_date as start_da3_7_2_,
        obligation2_.obligation_key as obligati1_1_3_,
        obligation2_.acc as acc2_1_3_,
        obligation2_.category_of_care as category3_1_3_,
        obligation2_.category_of_care_subset as category4_1_3_,
        obligation2_.cost_center_boc as cost_cen5_1_3_,
        obligation2_.fund as fund6_1_3_,
        obligation2_.last_updated_date as last_upd7_1_3_,
        obligation2_.last_updated_user as last_upd8_1_3_,
        obligation2_.mnemonics as mnemonic9_1_3_,
        obligation2_.obligation_number as obligat10_1_3_,
        cptobligat3_.obligation_key as obligati4_0_4_,
        cptobligat3_.cpt_obligation_key as cpt_obli1_0_4_,
        cptobligat3_.cpt_obligation_key as cpt_obli1_0_5_,
        cptobligat3_.end_date as end_date2_0_5_,
        cptobligat3_.obligation_key as obligati4_0_5_,
        cptobligat3_.procedure_key as procedur5_0_5_,
        cptobligat3_.start_date as start_da3_0_5_,
        procedure4_.procedure_key as procedur1_28_6_,
        procedure4_.procedure_code as procedur2_28_6_,
        procedure4_.short_description as short_de3_28_6_ 
    from
        ccra.payment_authority paymentaut0_ 
    left outer join
        ccra.payment_authority_obligation paymentaut1_ 
            on paymentaut0_.payment_authority_key=paymentaut1_.payment_authority_key 
    left outer join
        ccra.obligation obligation2_ 
            on paymentaut1_.obligation_key=obligation2_.obligation_key 
    left outer join
        ccra.cpt_obligation cptobligat3_ 
            on obligation2_.obligation_key=cptobligat3_.obligation_key 
    left outer join
        dim_procedure_code procedure4_ 
            on cptobligat3_.procedure_key=procedure4_.procedure_key 
    where
        paymentaut0_.payment_authority_key=?
Hibernate: 
    select
        procedures0_.seoc_key as seoc_key1_40_0_,
        procedures0_.procedure_key as procedur2_40_0_,
        procedures0_.seoc_key as seoc_key1_40_1_,
        procedures0_.procedure_key as procedur2_40_1_,
        procedure1_.procedure_key as procedur1_28_2_,
        procedure1_.procedure_code as procedur2_28_2_,
        procedure1_.short_description as short_de3_28_2_ 
    from
        seoc_procedure_junction procedures0_ 
    inner join
        dim_procedure_code procedure1_ 
            on procedures0_.procedure_key=procedure1_.procedure_key 
    where
        procedures0_.seoc_key=?
Hibernate: 
    /* select
        r 
    from
        Referral r 
    join
        fetch r.referralPatients patient 
    where
        r.referralNumber = :referralNumber 
        and r.referralDate<=:serviceFromDate */ select
            referral0_.referral_key as referral1_10_0_,
            referralpa1_.referral_patient_key as referral1_11_1_,
            referral0_.referral_expiration_date as referral2_10_0_,
            referral0_.payment_authority_obligation_key as payment_3_10_0_,
            referral0_.referral_date as referral4_10_0_,
            referral0_.referral_number as referral5_10_0_,
            referral0_.referring_provider as referrin6_10_0_,
            referral0_.service_requested as service_7_10_0_,
            referralpa1_.icn as icn2_11_1_,
            referralpa1_.referral_key as referral3_11_1_,
            referralpa1_.referral_key as referral3_11_0__,
            referralpa1_.referral_patient_key as referral1_11_0__ 
        from
            ccra.referral referral0_ 
        inner join
            ccra.referral_patient referralpa1_ 
                on referral0_.referral_key=referralpa1_.referral_key 
        where
            referral0_.referral_number=? 
            and referral0_.referral_date<=?
Hibernate: 
    /* 
from
    ProviderSanction 
where
    exclusionDate is not null 
    and (
        npi in :npis 
    ) */ select
        providersa0_.provider_sanction_key as provider1_36_,
        providersa0_.exclusion_date as exclusio2_36_,
        providersa0_.npi as npi3_36_,
        providersa0_.reinstate_date as reinstat4_36_,
        providersa0_.tax_id as tax_id5_36_ 
    from
        lkup_provider_sanction providersa0_ 
    where
        (
            providersa0_.exclusion_date is not null
        ) 
        and (
            providersa0_.npi in (
                ?
            )
        )
Hibernate: 
    /* select
        r 
    from
        Referral r 
    where
        r.referralNumber = :referralNumber */ select
            referral0_.referral_key as referral1_10_,
            referral0_.referral_expiration_date as referral2_10_,
            referral0_.payment_authority_obligation_key as payment_3_10_,
            referral0_.referral_date as referral4_10_,
            referral0_.referral_number as referral5_10_,
            referral0_.referring_provider as referrin6_10_,
            referral0_.service_requested as service_7_10_ 
        from
            ccra.referral referral0_ 
        where
            referral0_.referral_number=?
Hibernate: 
    /* select
        r 
    from
        PaymentAuthorityObligation r 
    where
        r.id = :id */ select
            paymentaut0_.payment_authority_obligation_key as payment_1_7_,
            paymentaut0_.end_date as end_date2_7_,
            paymentaut0_.obligation_key as obligati4_7_,
            paymentaut0_.payment_authority_key as payment_5_7_,
            paymentaut0_.start_date as start_da3_7_ 
        from
            ccra.payment_authority_obligation paymentaut0_ 
        where
            paymentaut0_.payment_authority_obligation_key=?
Hibernate: 
    select
        obligation0_.obligation_key as obligati1_1_0_,
        obligation0_.acc as acc2_1_0_,
        obligation0_.category_of_care as category3_1_0_,
        obligation0_.category_of_care_subset as category4_1_0_,
        obligation0_.cost_center_boc as cost_cen5_1_0_,
        obligation0_.fund as fund6_1_0_,
        obligation0_.last_updated_date as last_upd7_1_0_,
        obligation0_.last_updated_user as last_upd8_1_0_,
        obligation0_.mnemonics as mnemonic9_1_0_,
        obligation0_.obligation_number as obligat10_1_0_,
        cptobligat1_.obligation_key as obligati4_0_1_,
        cptobligat1_.cpt_obligation_key as cpt_obli1_0_1_,
        cptobligat1_.cpt_obligation_key as cpt_obli1_0_2_,
        cptobligat1_.end_date as end_date2_0_2_,
        cptobligat1_.obligation_key as obligati4_0_2_,
        cptobligat1_.procedure_key as procedur5_0_2_,
        cptobligat1_.start_date as start_da3_0_2_,
        procedure2_.procedure_key as procedur1_28_3_,
        procedure2_.procedure_code as procedur2_28_3_,
        procedure2_.short_description as short_de3_28_3_ 
    from
        ccra.obligation obligation0_ 
    left outer join
        ccra.cpt_obligation cptobligat1_ 
            on obligation0_.obligation_key=cptobligat1_.obligation_key 
    left outer join
        dim_procedure_code procedure2_ 
            on cptobligat1_.procedure_key=procedure2_.procedure_key 
    where
        obligation0_.obligation_key=?
Hibernate: 
    select
        paymentaut0_.payment_authority_key as payment_1_6_0_,
        paymentaut0_.code as code2_6_0_,
        paymentaut0_.description as descript3_6_0_,
        paymentaut0_.name as name4_6_0_,
        paymentaut1_.payment_authority_key as payment_5_7_1_,
        paymentaut1_.payment_authority_obligation_key as payment_1_7_1_,
        paymentaut1_.payment_authority_obligation_key as payment_1_7_2_,
        paymentaut1_.end_date as end_date2_7_2_,
        paymentaut1_.obligation_key as obligati4_7_2_,
        paymentaut1_.payment_authority_key as payment_5_7_2_,
        paymentaut1_.start_date as start_da3_7_2_,
        obligation2_.obligation_key as obligati1_1_3_,
        obligation2_.acc as acc2_1_3_,
        obligation2_.category_of_care as category3_1_3_,
        obligation2_.category_of_care_subset as category4_1_3_,
        obligation2_.cost_center_boc as cost_cen5_1_3_,
        obligation2_.fund as fund6_1_3_,
        obligation2_.last_updated_date as last_upd7_1_3_,
        obligation2_.last_updated_user as last_upd8_1_3_,
        obligation2_.mnemonics as mnemonic9_1_3_,
        obligation2_.obligation_number as obligat10_1_3_,
        cptobligat3_.obligation_key as obligati4_0_4_,
        cptobligat3_.cpt_obligation_key as cpt_obli1_0_4_,
        cptobligat3_.cpt_obligation_key as cpt_obli1_0_5_,
        cptobligat3_.end_date as end_date2_0_5_,
        cptobligat3_.obligation_key as obligati4_0_5_,
        cptobligat3_.procedure_key as procedur5_0_5_,
        cptobligat3_.start_date as start_da3_0_5_,
        procedure4_.procedure_key as procedur1_28_6_,
        procedure4_.procedure_code as procedur2_28_6_,
        procedure4_.short_description as short_de3_28_6_ 
    from
        ccra.payment_authority paymentaut0_ 
    left outer join
        ccra.payment_authority_obligation paymentaut1_ 
            on paymentaut0_.payment_authority_key=paymentaut1_.payment_authority_key 
    left outer join
        ccra.obligation obligation2_ 
            on paymentaut1_.obligation_key=obligation2_.obligation_key 
    left outer join
        ccra.cpt_obligation cptobligat3_ 
            on obligation2_.obligation_key=cptobligat3_.obligation_key 
    left outer join
        dim_procedure_code procedure4_ 
            on cptobligat3_.procedure_key=procedure4_.procedure_key 
    where
        paymentaut0_.payment_authority_key=?
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Decision
        */ insert 
        into
            decision
            (decision_key, etl_batch_id, claim_key, claim_detail_key, decision_date_time, decision, last_updated_user, last_updated_date_time) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Decision
        */ insert 
        into
            decision
            (decision_key, etl_batch_id, claim_key, claim_detail_key, decision_date_time, decision, last_updated_user, last_updated_date_time) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Decision
        */ insert 
        into
            decision
            (decision_key, etl_batch_id, claim_key, claim_detail_key, decision_date_time, decision, last_updated_user, last_updated_date_time) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Validation
        */ insert 
        into
            validation_failure
            (validation_failure_key, carc_code, decision_key, last_updated_user, message, rarc_code, rule_name, last_updated_date_time, validation_name) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Validation
        */ insert 
        into
            validation_failure
            (validation_failure_key, carc_code, decision_key, last_updated_user, message, rarc_code, rule_name, last_updated_date_time, validation_name) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Validation
        */ insert 
        into
            validation_failure
            (validation_failure_key, carc_code, decision_key, last_updated_user, message, rarc_code, rule_name, last_updated_date_time, validation_name) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Validation
        */ insert 
        into
            validation_failure
            (validation_failure_key, carc_code, decision_key, last_updated_user, message, rarc_code, rule_name, last_updated_date_time, validation_name) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Validation
        */ insert 
        into
            validation_failure
            (validation_failure_key, carc_code, decision_key, last_updated_user, message, rarc_code, rule_name, last_updated_date_time, validation_name) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Validation
        */ insert 
        into
            validation_failure
            (validation_failure_key, carc_code, decision_key, last_updated_user, message, rarc_code, rule_name, last_updated_date_time, validation_name) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Decision
        */ insert 
        into
            decision
            (decision_key, etl_batch_id, claim_key, claim_detail_key, decision_date_time, decision, last_updated_user, last_updated_date_time) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* select
        r 
    from
        Referral r 
    where
        r.referralNumber = :referralNumber */ select
            referral0_.referral_key as referral1_10_,
            referral0_.referral_expiration_date as referral2_10_,
            referral0_.payment_authority_obligation_key as payment_3_10_,
            referral0_.referral_date as referral4_10_,
            referral0_.referral_number as referral5_10_,
            referral0_.referring_provider as referrin6_10_,
            referral0_.service_requested as service_7_10_ 
        from
            ccra.referral referral0_ 
        where
            referral0_.referral_number=?
2018-04-17 08:28:59.803 WARN larThresholdRuleConfig - Threshold for the claim type DENTAL is not defined in the database, using the default 30000 from config file
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Validation
        */ insert 
        into
            validation_failure
            (validation_failure_key, carc_code, decision_key, last_updated_user, message, rarc_code, rule_name, last_updated_date_time, validation_name) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Validation
        */ insert 
        into
            validation_failure
            (validation_failure_key, carc_code, decision_key, last_updated_user, message, rarc_code, rule_name, last_updated_date_time, validation_name) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* select
        distinct r 
    from
        Referral r 
    left join
        fetch r.preAuthorization 
    where
        r.referralNumber = :referralNumber */ select
            distinct referral0_.referral_key as referral1_10_0_,
            preauthori1_.preauthorization_key as preautho1_8_1_,
            referral0_.referral_expiration_date as referral2_10_0_,
            referral0_.payment_authority_obligation_key as payment_3_10_0_,
            referral0_.referral_date as referral4_10_0_,
            referral0_.referral_number as referral5_10_0_,
            referral0_.referring_provider as referrin6_10_0_,
            referral0_.service_requested as service_7_10_0_,
            preauthori1_.date_from as date_fro2_8_1_,
            preauthori1_.date_to as date_to3_8_1_,
            preauthori1_.preauthorization_number as preautho4_8_1_,
            preauthori1_.referral_key as referral5_8_1_,
            preauthori1_.referral_key as referral5_8_0__,
            preauthori1_.preauthorization_key as preautho1_8_0__ 
        from
            ccra.referral referral0_ 
        left outer join
            ccra.preauthorization preauthori1_ 
                on referral0_.referral_key=preauthori1_.referral_key 
        where
            referral0_.referral_number=?
Hibernate: 
    select
        preauthori0_.preauthorization_key as preautho5_9_0_,
        preauthori0_.preauthorization_detail_key as preautho1_9_0_,
        preauthori0_.preauthorization_detail_key as preautho1_9_1_,
        preauthori0_.preauthorization_key as preautho5_9_1_,
        preauthori0_.preauthorized_service as preautho2_9_1_,
        preauthori0_.quantity as quantity3_9_1_,
        preauthori0_.subcategory as subcateg4_9_1_,
        orderset1_.orderset_key as orderset1_3_2_,
        orderset1_.code as code2_3_2_,
        orderset1_.order_set_description as order_se3_3_2_,
        orderset1_.pre_authorization_detail_key as pre_auth4_3_2_,
        ordersetda2_.orderset_date_key as orderset1_4_3_,
        ordersetda2_.date_from as date_fro2_4_3_,
        orderset3_.orderset_key as orderset1_3_4_,
        orderset3_.code as code2_3_4_,
        orderset3_.order_set_description as order_se3_3_4_,
        orderset3_.pre_authorization_detail_key as pre_auth4_3_4_ 
    from
        ccra.preauthorization_detail preauthori0_ 
    left outer join
        ccra.orderset orderset1_ 
            on preauthori0_.preauthorization_detail_key=orderset1_.pre_authorization_detail_key 
    left outer join
        ccra.ordersetdate ordersetda2_ 
            on orderset1_.orderset_key=ordersetda2_.orderset_date_key 
    left outer join
        ccra.orderset orderset3_ 
            on ordersetda2_.orderset_date_key=orderset3_.orderset_key 
    where
        preauthori0_.preauthorization_key=?
Hibernate: 
    select
        ordersetda0_.orderset_date_key as orderset3_5_0_,
        ordersetda0_.orderset_date_item_key as orderset1_5_0_,
        ordersetda0_.orderset_date_item_key as orderset1_5_1_,
        ordersetda0_.orderset_date_key as orderset3_5_1_,
        ordersetda0_.procedure_code as procedur2_5_1_ 
    from
        ccra.ordersetdateitem ordersetda0_ 
    where
        ordersetda0_.orderset_date_key=?
Hibernate: 
    /* select
        r 
    from
        Referral r 
    where
        r.referralNumber = :referralNumber */ select
            referral0_.referral_key as referral1_10_,
            referral0_.referral_expiration_date as referral2_10_,
            referral0_.payment_authority_obligation_key as payment_3_10_,
            referral0_.referral_date as referral4_10_,
            referral0_.referral_number as referral5_10_,
            referral0_.referring_provider as referrin6_10_,
            referral0_.service_requested as service_7_10_ 
        from
            ccra.referral referral0_ 
        where
            referral0_.referral_number=?
Hibernate: 
    /* select
        generatedAlias0 
    from
        Seoc as generatedAlias0 
    where
        generatedAlias0.seocId=:param0 */ select
            seoc0_.seoc_key as seoc_key1_39_,
            seoc0_.category_of_care as category2_39_,
            seoc0_.duration as duration3_39_,
            seoc0_.end_date as end_date4_39_,
            seoc0_.is_pal as is_pal5_39_,
            seoc0_.name as name6_39_,
            seoc0_.seoc_id as seoc_id7_39_,
            seoc0_.start_date as start_da8_39_,
            seoc0_.version as version9_39_ 
        from
            seoc seoc0_ 
        where
            seoc0_.seoc_id=?
Hibernate: 
    select
        procedures0_.seoc_key as seoc_key1_40_0_,
        procedures0_.procedure_key as procedur2_40_0_,
        procedures0_.seoc_key as seoc_key1_40_1_,
        procedures0_.procedure_key as procedur2_40_1_,
        procedure1_.procedure_key as procedur1_28_2_,
        procedure1_.procedure_code as procedur2_28_2_,
        procedure1_.short_description as short_de3_28_2_ 
    from
        seoc_procedure_junction procedures0_ 
    inner join
        dim_procedure_code procedure1_ 
            on procedures0_.procedure_key=procedure1_.procedure_key 
    where
        procedures0_.seoc_key=?
2018-04-17 08:28:59.819 WARN larThresholdRuleConfig - Threshold for the claim type DENTAL is not defined in the database, using the default 30000 from config file
Hibernate: 
    /* select
        r 
    from
        Referral r 
    join
        fetch r.referralPatients patient 
    where
        r.referralNumber = :referralNumber 
        and r.referralDate<=:serviceFromDate */ select
            referral0_.referral_key as referral1_10_0_,
            referralpa1_.referral_patient_key as referral1_11_1_,
            referral0_.referral_expiration_date as referral2_10_0_,
            referral0_.payment_authority_obligation_key as payment_3_10_0_,
            referral0_.referral_date as referral4_10_0_,
            referral0_.referral_number as referral5_10_0_,
            referral0_.referring_provider as referrin6_10_0_,
            referral0_.service_requested as service_7_10_0_,
            referralpa1_.icn as icn2_11_1_,
            referralpa1_.referral_key as referral3_11_1_,
            referralpa1_.referral_key as referral3_11_0__,
            referralpa1_.referral_patient_key as referral1_11_0__ 
        from
            ccra.referral referral0_ 
        inner join
            ccra.referral_patient referralpa1_ 
                on referral0_.referral_key=referralpa1_.referral_key 
        where
            referral0_.referral_number=? 
            and referral0_.referral_date<=?
Hibernate: 
    /* select
        distinct r 
    from
        Referral r 
    left join
        fetch r.preAuthorization 
    where
        r.referralNumber = :referralNumber */ select
            distinct referral0_.referral_key as referral1_10_0_,
            preauthori1_.preauthorization_key as preautho1_8_1_,
            referral0_.referral_expiration_date as referral2_10_0_,
            referral0_.payment_authority_obligation_key as payment_3_10_0_,
            referral0_.referral_date as referral4_10_0_,
            referral0_.referral_number as referral5_10_0_,
            referral0_.referring_provider as referrin6_10_0_,
            referral0_.service_requested as service_7_10_0_,
            preauthori1_.date_from as date_fro2_8_1_,
            preauthori1_.date_to as date_to3_8_1_,
            preauthori1_.preauthorization_number as preautho4_8_1_,
            preauthori1_.referral_key as referral5_8_1_,
            preauthori1_.referral_key as referral5_8_0__,
            preauthori1_.preauthorization_key as preautho1_8_0__ 
        from
            ccra.referral referral0_ 
        left outer join
            ccra.preauthorization preauthori1_ 
                on referral0_.referral_key=preauthori1_.referral_key 
        where
            referral0_.referral_number=?
Hibernate: 
    select
        preauthori0_.preauthorization_key as preautho5_9_0_,
        preauthori0_.preauthorization_detail_key as preautho1_9_0_,
        preauthori0_.preauthorization_detail_key as preautho1_9_1_,
        preauthori0_.preauthorization_key as preautho5_9_1_,
        preauthori0_.preauthorized_service as preautho2_9_1_,
        preauthori0_.quantity as quantity3_9_1_,
        preauthori0_.subcategory as subcateg4_9_1_,
        orderset1_.orderset_key as orderset1_3_2_,
        orderset1_.code as code2_3_2_,
        orderset1_.order_set_description as order_se3_3_2_,
        orderset1_.pre_authorization_detail_key as pre_auth4_3_2_,
        ordersetda2_.orderset_date_key as orderset1_4_3_,
        ordersetda2_.date_from as date_fro2_4_3_,
        orderset3_.orderset_key as orderset1_3_4_,
        orderset3_.code as code2_3_4_,
        orderset3_.order_set_description as order_se3_3_4_,
        orderset3_.pre_authorization_detail_key as pre_auth4_3_4_ 
    from
        ccra.preauthorization_detail preauthori0_ 
    left outer join
        ccra.orderset orderset1_ 
            on preauthori0_.preauthorization_detail_key=orderset1_.pre_authorization_detail_key 
    left outer join
        ccra.ordersetdate ordersetda2_ 
            on orderset1_.orderset_key=ordersetda2_.orderset_date_key 
    left outer join
        ccra.orderset orderset3_ 
            on ordersetda2_.orderset_date_key=orderset3_.orderset_key 
    where
        preauthori0_.preauthorization_key=?
Hibernate: 
    select
        ordersetda0_.orderset_date_key as orderset3_5_0_,
        ordersetda0_.orderset_date_item_key as orderset1_5_0_,
        ordersetda0_.orderset_date_item_key as orderset1_5_1_,
        ordersetda0_.orderset_date_key as orderset3_5_1_,
        ordersetda0_.procedure_code as procedur2_5_1_ 
    from
        ccra.ordersetdateitem ordersetda0_ 
    where
        ordersetda0_.orderset_date_key=?
Hibernate: 
    /* select
        r 
    from
        Referral r 
    where
        r.referralNumber = :referralNumber */ select
            referral0_.referral_key as referral1_10_,
            referral0_.referral_expiration_date as referral2_10_,
            referral0_.payment_authority_obligation_key as payment_3_10_,
            referral0_.referral_date as referral4_10_,
            referral0_.referral_number as referral5_10_,
            referral0_.referring_provider as referrin6_10_,
            referral0_.service_requested as service_7_10_ 
        from
            ccra.referral referral0_ 
        where
            referral0_.referral_number=?
Hibernate: 
    /* select
        generatedAlias0 
    from
        Seoc as generatedAlias0 
    where
        generatedAlias0.seocId=:param0 */ select
            seoc0_.seoc_key as seoc_key1_39_,
            seoc0_.category_of_care as category2_39_,
            seoc0_.duration as duration3_39_,
            seoc0_.end_date as end_date4_39_,
            seoc0_.is_pal as is_pal5_39_,
            seoc0_.name as name6_39_,
            seoc0_.seoc_id as seoc_id7_39_,
            seoc0_.start_date as start_da8_39_,
            seoc0_.version as version9_39_ 
        from
            seoc seoc0_ 
        where
            seoc0_.seoc_id=?
2018-04-17 08:28:59.835 WARN larThresholdRuleConfig - Threshold for the claim type DENTAL is not defined in the database, using the default 30000 from config file
Hibernate: 
    select
        procedures0_.seoc_key as seoc_key1_40_0_,
        procedures0_.procedure_key as procedur2_40_0_,
        procedures0_.seoc_key as seoc_key1_40_1_,
        procedures0_.procedure_key as procedur2_40_1_,
        procedure1_.procedure_key as procedur1_28_2_,
        procedure1_.procedure_code as procedur2_28_2_,
        procedure1_.short_description as short_de3_28_2_ 
    from
        seoc_procedure_junction procedures0_ 
    inner join
        dim_procedure_code procedure1_ 
            on procedures0_.procedure_key=procedure1_.procedure_key 
    where
        procedures0_.seoc_key=?
Hibernate: 
    /* select
        distinct r 
    from
        Referral r 
    left join
        fetch r.preAuthorization 
    where
        r.referralNumber = :referralNumber */ select
            distinct referral0_.referral_key as referral1_10_0_,
            preauthori1_.preauthorization_key as preautho1_8_1_,
            referral0_.referral_expiration_date as referral2_10_0_,
            referral0_.payment_authority_obligation_key as payment_3_10_0_,
            referral0_.referral_date as referral4_10_0_,
            referral0_.referral_number as referral5_10_0_,
            referral0_.referring_provider as referrin6_10_0_,
            referral0_.service_requested as service_7_10_0_,
            preauthori1_.date_from as date_fro2_8_1_,
            preauthori1_.date_to as date_to3_8_1_,
            preauthori1_.preauthorization_number as preautho4_8_1_,
            preauthori1_.referral_key as referral5_8_1_,
            preauthori1_.referral_key as referral5_8_0__,
            preauthori1_.preauthorization_key as preautho1_8_0__ 
        from
            ccra.referral referral0_ 
        left outer join
            ccra.preauthorization preauthori1_ 
                on referral0_.referral_key=preauthori1_.referral_key 
        where
            referral0_.referral_number=?
Hibernate: 
    select
        preauthori0_.preauthorization_key as preautho5_9_0_,
        preauthori0_.preauthorization_detail_key as preautho1_9_0_,
        preauthori0_.preauthorization_detail_key as preautho1_9_1_,
        preauthori0_.preauthorization_key as preautho5_9_1_,
        preauthori0_.preauthorized_service as preautho2_9_1_,
        preauthori0_.quantity as quantity3_9_1_,
        preauthori0_.subcategory as subcateg4_9_1_,
        orderset1_.orderset_key as orderset1_3_2_,
        orderset1_.code as code2_3_2_,
        orderset1_.order_set_description as order_se3_3_2_,
        orderset1_.pre_authorization_detail_key as pre_auth4_3_2_,
        ordersetda2_.orderset_date_key as orderset1_4_3_,
        ordersetda2_.date_from as date_fro2_4_3_,
        orderset3_.orderset_key as orderset1_3_4_,
        orderset3_.code as code2_3_4_,
        orderset3_.order_set_description as order_se3_3_4_,
        orderset3_.pre_authorization_detail_key as pre_auth4_3_4_ 
    from
        ccra.preauthorization_detail preauthori0_ 
    left outer join
        ccra.orderset orderset1_ 
            on preauthori0_.preauthorization_detail_key=orderset1_.pre_authorization_detail_key 
    left outer join
        ccra.ordersetdate ordersetda2_ 
            on orderset1_.orderset_key=ordersetda2_.orderset_date_key 
    left outer join
        ccra.orderset orderset3_ 
            on ordersetda2_.orderset_date_key=orderset3_.orderset_key 
    where
        preauthori0_.preauthorization_key=?
Hibernate: 
    /* select
        r 
    from
        Referral r 
    join
        fetch r.referralPatients patient 
    where
        r.referralNumber = :referralNumber 
        and r.referralDate<=:serviceFromDate */ select
            referral0_.referral_key as referral1_10_0_,
            referralpa1_.referral_patient_key as referral1_11_1_,
            referral0_.referral_expiration_date as referral2_10_0_,
            referral0_.payment_authority_obligation_key as payment_3_10_0_,
            referral0_.referral_date as referral4_10_0_,
            referral0_.referral_number as referral5_10_0_,
            referral0_.referring_provider as referrin6_10_0_,
            referral0_.service_requested as service_7_10_0_,
            referralpa1_.icn as icn2_11_1_,
            referralpa1_.referral_key as referral3_11_1_,
            referralpa1_.referral_key as referral3_11_0__,
            referralpa1_.referral_patient_key as referral1_11_0__ 
        from
            ccra.referral referral0_ 
        inner join
            ccra.referral_patient referralpa1_ 
                on referral0_.referral_key=referralpa1_.referral_key 
        where
            referral0_.referral_number=? 
            and referral0_.referral_date<=?
Hibernate: 
    /* 
from
    ProviderSanction 
where
    exclusionDate is not null 
    and (
        npi in :npis 
    ) */ select
        providersa0_.provider_sanction_key as provider1_36_,
        providersa0_.exclusion_date as exclusio2_36_,
        providersa0_.npi as npi3_36_,
        providersa0_.reinstate_date as reinstat4_36_,
        providersa0_.tax_id as tax_id5_36_ 
    from
        lkup_provider_sanction providersa0_ 
    where
        (
            providersa0_.exclusion_date is not null
        ) 
        and (
            providersa0_.npi in (
                ?
            )
        )
Hibernate: 
    /* select
        r 
    from
        Referral r 
    where
        r.referralNumber = :referralNumber */ select
            referral0_.referral_key as referral1_10_,
            referral0_.referral_expiration_date as referral2_10_,
            referral0_.payment_authority_obligation_key as payment_3_10_,
            referral0_.referral_date as referral4_10_,
            referral0_.referral_number as referral5_10_,
            referral0_.referring_provider as referrin6_10_,
            referral0_.service_requested as service_7_10_ 
        from
            ccra.referral referral0_ 
        where
            referral0_.referral_number=?
Hibernate: 
    /* select
        r 
    from
        PaymentAuthorityObligation r 
    where
        r.id = :id */ select
            paymentaut0_.payment_authority_obligation_key as payment_1_7_,
            paymentaut0_.end_date as end_date2_7_,
            paymentaut0_.obligation_key as obligati4_7_,
            paymentaut0_.payment_authority_key as payment_5_7_,
            paymentaut0_.start_date as start_da3_7_ 
        from
            ccra.payment_authority_obligation paymentaut0_ 
        where
            paymentaut0_.payment_authority_obligation_key=?
2018-04-17 08:28:59.850 INFO IcnRule                - Found 1 referrals for the icn rule matching referral number 4321a
Hibernate: 
    /* select
        r 
    from
        Referral r 
    join
        fetch r.referralPatients patient 
    where
        r.referralNumber = :referralNumber 
        and r.referralDate<=:serviceFromDate */ select
            referral0_.referral_key as referral1_10_0_,
            referralpa1_.referral_patient_key as referral1_11_1_,
            referral0_.referral_expiration_date as referral2_10_0_,
            referral0_.payment_authority_obligation_key as payment_3_10_0_,
            referral0_.referral_date as referral4_10_0_,
            referral0_.referral_number as referral5_10_0_,
            referral0_.referring_provider as referrin6_10_0_,
            referral0_.service_requested as service_7_10_0_,
            referralpa1_.icn as icn2_11_1_,
            referralpa1_.referral_key as referral3_11_1_,
            referralpa1_.referral_key as referral3_11_0__,
            referralpa1_.referral_patient_key as referral1_11_0__ 
        from
            ccra.referral referral0_ 
        inner join
            ccra.referral_patient referralpa1_ 
                on referral0_.referral_key=referralpa1_.referral_key 
        where
            referral0_.referral_number=? 
            and referral0_.referral_date<=?
Hibernate: 
    /* 
from
    ProviderSanction 
where
    exclusionDate is not null 
    and (
        npi in :npis 
    ) */ select
        providersa0_.provider_sanction_key as provider1_36_,
        providersa0_.exclusion_date as exclusio2_36_,
        providersa0_.npi as npi3_36_,
        providersa0_.reinstate_date as reinstat4_36_,
        providersa0_.tax_id as tax_id5_36_ 
    from
        lkup_provider_sanction providersa0_ 
    where
        (
            providersa0_.exclusion_date is not null
        ) 
        and (
            providersa0_.npi in (
                ?
            )
        )
Hibernate: 
    /* select
        r 
    from
        Referral r 
    where
        r.referralNumber = :referralNumber */ select
            referral0_.referral_key as referral1_10_,
            referral0_.referral_expiration_date as referral2_10_,
            referral0_.payment_authority_obligation_key as payment_3_10_,
            referral0_.referral_date as referral4_10_,
            referral0_.referral_number as referral5_10_,
            referral0_.referring_provider as referrin6_10_,
            referral0_.service_requested as service_7_10_ 
        from
            ccra.referral referral0_ 
        where
            referral0_.referral_number=?
Hibernate: 
    /* select
        r 
    from
        PaymentAuthorityObligation r 
    where
        r.id = :id */ select
            paymentaut0_.payment_authority_obligation_key as payment_1_7_,
            paymentaut0_.end_date as end_date2_7_,
            paymentaut0_.obligation_key as obligati4_7_,
            paymentaut0_.payment_authority_key as payment_5_7_,
            paymentaut0_.start_date as start_da3_7_ 
        from
            ccra.payment_authority_obligation paymentaut0_ 
        where
            paymentaut0_.payment_authority_obligation_key=?
Hibernate: 
    select
        obligation0_.obligation_key as obligati1_1_0_,
        obligation0_.acc as acc2_1_0_,
        obligation0_.category_of_care as category3_1_0_,
        obligation0_.category_of_care_subset as category4_1_0_,
        obligation0_.cost_center_boc as cost_cen5_1_0_,
        obligation0_.fund as fund6_1_0_,
        obligation0_.last_updated_date as last_upd7_1_0_,
        obligation0_.last_updated_user as last_upd8_1_0_,
        obligation0_.mnemonics as mnemonic9_1_0_,
        obligation0_.obligation_number as obligat10_1_0_,
        cptobligat1_.obligation_key as obligati4_0_1_,
        cptobligat1_.cpt_obligation_key as cpt_obli1_0_1_,
        cptobligat1_.cpt_obligation_key as cpt_obli1_0_2_,
        cptobligat1_.end_date as end_date2_0_2_,
        cptobligat1_.obligation_key as obligati4_0_2_,
        cptobligat1_.procedure_key as procedur5_0_2_,
        cptobligat1_.start_date as start_da3_0_2_,
        procedure2_.procedure_key as procedur1_28_3_,
        procedure2_.procedure_code as procedur2_28_3_,
        procedure2_.short_description as short_de3_28_3_ 
    from
        ccra.obligation obligation0_ 
    left outer join
        ccra.cpt_obligation cptobligat1_ 
            on obligation0_.obligation_key=cptobligat1_.obligation_key 
    left outer join
        dim_procedure_code procedure2_ 
            on cptobligat1_.procedure_key=procedure2_.procedure_key 
    where
        obligation0_.obligation_key=?
Hibernate: 
    select
        paymentaut0_.payment_authority_key as payment_1_6_0_,
        paymentaut0_.code as code2_6_0_,
        paymentaut0_.description as descript3_6_0_,
        paymentaut0_.name as name4_6_0_,
        paymentaut1_.payment_authority_key as payment_5_7_1_,
        paymentaut1_.payment_authority_obligation_key as payment_1_7_1_,
        paymentaut1_.payment_authority_obligation_key as payment_1_7_2_,
        paymentaut1_.end_date as end_date2_7_2_,
        paymentaut1_.obligation_key as obligati4_7_2_,
        paymentaut1_.payment_authority_key as payment_5_7_2_,
        paymentaut1_.start_date as start_da3_7_2_,
        obligation2_.obligation_key as obligati1_1_3_,
        obligation2_.acc as acc2_1_3_,
        obligation2_.category_of_care as category3_1_3_,
        obligation2_.category_of_care_subset as category4_1_3_,
        obligation2_.cost_center_boc as cost_cen5_1_3_,
        obligation2_.fund as fund6_1_3_,
        obligation2_.last_updated_date as last_upd7_1_3_,
        obligation2_.last_updated_user as last_upd8_1_3_,
        obligation2_.mnemonics as mnemonic9_1_3_,
        obligation2_.obligation_number as obligat10_1_3_,
        cptobligat3_.obligation_key as obligati4_0_4_,
        cptobligat3_.cpt_obligation_key as cpt_obli1_0_4_,
        cptobligat3_.cpt_obligation_key as cpt_obli1_0_5_,
        cptobligat3_.end_date as end_date2_0_5_,
        cptobligat3_.obligation_key as obligati4_0_5_,
        cptobligat3_.procedure_key as procedur5_0_5_,
        cptobligat3_.start_date as start_da3_0_5_,
        procedure4_.procedure_key as procedur1_28_6_,
        procedure4_.procedure_code as procedur2_28_6_,
        procedure4_.short_description as short_de3_28_6_ 
    from
        ccra.payment_authority paymentaut0_ 
    left outer join
        ccra.payment_authority_obligation paymentaut1_ 
            on paymentaut0_.payment_authority_key=paymentaut1_.payment_authority_key 
    left outer join
        ccra.obligation obligation2_ 
            on paymentaut1_.obligation_key=obligation2_.obligation_key 
    left outer join
        ccra.cpt_obligation cptobligat3_ 
            on obligation2_.obligation_key=cptobligat3_.obligation_key 
    left outer join
        dim_procedure_code procedure4_ 
            on cptobligat3_.procedure_key=procedure4_.procedure_key 
    where
        paymentaut0_.payment_authority_key=?
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Decision
        */ insert 
        into
            decision
            (decision_key, etl_batch_id, claim_key, claim_detail_key, decision_date_time, decision, last_updated_user, last_updated_date_time) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* 
from
    ProviderSanction 
where
    exclusionDate is not null 
    and (
        taxId in :taxIds 
    ) */ select
        providersa0_.provider_sanction_key as provider1_36_,
        providersa0_.exclusion_date as exclusio2_36_,
        providersa0_.npi as npi3_36_,
        providersa0_.reinstate_date as reinstat4_36_,
        providersa0_.tax_id as tax_id5_36_ 
    from
        lkup_provider_sanction providersa0_ 
    where
        (
            providersa0_.exclusion_date is not null
        ) 
        and (
            providersa0_.tax_id in (
                ?
            )
        )
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Validation
        */ insert 
        into
            validation_failure
            (validation_failure_key, carc_code, decision_key, last_updated_user, message, rarc_code, rule_name, last_updated_date_time, validation_name) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Validation
        */ insert 
        into
            validation_failure
            (validation_failure_key, carc_code, decision_key, last_updated_user, message, rarc_code, rule_name, last_updated_date_time, validation_name) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* select
        r 
    from
        Referral r 
    where
        r.referralNumber = :referralNumber */ select
            referral0_.referral_key as referral1_10_,
            referral0_.referral_expiration_date as referral2_10_,
            referral0_.payment_authority_obligation_key as payment_3_10_,
            referral0_.referral_date as referral4_10_,
            referral0_.referral_number as referral5_10_,
            referral0_.referring_provider as referrin6_10_,
            referral0_.service_requested as service_7_10_ 
        from
            ccra.referral referral0_ 
        where
            referral0_.referral_number=?
Hibernate: 
    /* select
        r 
    from
        PaymentAuthorityObligation r 
    where
        r.id = :id */ select
            paymentaut0_.payment_authority_obligation_key as payment_1_7_,
            paymentaut0_.end_date as end_date2_7_,
            paymentaut0_.obligation_key as obligati4_7_,
            paymentaut0_.payment_authority_key as payment_5_7_,
            paymentaut0_.start_date as start_da3_7_ 
        from
            ccra.payment_authority_obligation paymentaut0_ 
        where
            paymentaut0_.payment_authority_obligation_key=?
2018-04-17 08:28:59.872 INFO BatchProcessor         - Claim processing thread Thread[SimpleAsyncTaskExecutor-2,5,main] completed, processed 2 claims
Hibernate: 
    select
        obligation0_.obligation_key as obligati1_1_0_,
        obligation0_.acc as acc2_1_0_,
        obligation0_.category_of_care as category3_1_0_,
        obligation0_.category_of_care_subset as category4_1_0_,
        obligation0_.cost_center_boc as cost_cen5_1_0_,
        obligation0_.fund as fund6_1_0_,
        obligation0_.last_updated_date as last_upd7_1_0_,
        obligation0_.last_updated_user as last_upd8_1_0_,
        obligation0_.mnemonics as mnemonic9_1_0_,
        obligation0_.obligation_number as obligat10_1_0_,
        cptobligat1_.obligation_key as obligati4_0_1_,
        cptobligat1_.cpt_obligation_key as cpt_obli1_0_1_,
        cptobligat1_.cpt_obligation_key as cpt_obli1_0_2_,
        cptobligat1_.end_date as end_date2_0_2_,
        cptobligat1_.obligation_key as obligati4_0_2_,
        cptobligat1_.procedure_key as procedur5_0_2_,
        cptobligat1_.start_date as start_da3_0_2_,
        procedure2_.procedure_key as procedur1_28_3_,
        procedure2_.procedure_code as procedur2_28_3_,
        procedure2_.short_description as short_de3_28_3_ 
    from
        ccra.obligation obligation0_ 
    left outer join
        ccra.cpt_obligation cptobligat1_ 
            on obligation0_.obligation_key=cptobligat1_.obligation_key 
    left outer join
        dim_procedure_code procedure2_ 
            on cptobligat1_.procedure_key=procedure2_.procedure_key 
    where
        obligation0_.obligation_key=?
Hibernate: 
    select
        obligation0_.obligation_key as obligati1_1_0_,
        obligation0_.acc as acc2_1_0_,
        obligation0_.category_of_care as category3_1_0_,
        obligation0_.category_of_care_subset as category4_1_0_,
        obligation0_.cost_center_boc as cost_cen5_1_0_,
        obligation0_.fund as fund6_1_0_,
        obligation0_.last_updated_date as last_upd7_1_0_,
        obligation0_.last_updated_user as last_upd8_1_0_,
        obligation0_.mnemonics as mnemonic9_1_0_,
        obligation0_.obligation_number as obligat10_1_0_,
        cptobligat1_.obligation_key as obligati4_0_1_,
        cptobligat1_.cpt_obligation_key as cpt_obli1_0_1_,
        cptobligat1_.cpt_obligation_key as cpt_obli1_0_2_,
        cptobligat1_.end_date as end_date2_0_2_,
        cptobligat1_.obligation_key as obligati4_0_2_,
        cptobligat1_.procedure_key as procedur5_0_2_,
        cptobligat1_.start_date as start_da3_0_2_,
        procedure2_.procedure_key as procedur1_28_3_,
        procedure2_.procedure_code as procedur2_28_3_,
        procedure2_.short_description as short_de3_28_3_ 
    from
        ccra.obligation obligation0_ 
    left outer join
        ccra.cpt_obligation cptobligat1_ 
            on obligation0_.obligation_key=cptobligat1_.obligation_key 
    left outer join
        dim_procedure_code procedure2_ 
            on cptobligat1_.procedure_key=procedure2_.procedure_key 
    where
        obligation0_.obligation_key=?
Hibernate: 
    select
        paymentaut0_.payment_authority_key as payment_1_6_0_,
        paymentaut0_.code as code2_6_0_,
        paymentaut0_.description as descript3_6_0_,
        paymentaut0_.name as name4_6_0_,
        paymentaut1_.payment_authority_key as payment_5_7_1_,
        paymentaut1_.payment_authority_obligation_key as payment_1_7_1_,
        paymentaut1_.payment_authority_obligation_key as payment_1_7_2_,
        paymentaut1_.end_date as end_date2_7_2_,
        paymentaut1_.obligation_key as obligati4_7_2_,
        paymentaut1_.payment_authority_key as payment_5_7_2_,
        paymentaut1_.start_date as start_da3_7_2_,
        obligation2_.obligation_key as obligati1_1_3_,
        obligation2_.acc as acc2_1_3_,
        obligation2_.category_of_care as category3_1_3_,
        obligation2_.category_of_care_subset as category4_1_3_,
        obligation2_.cost_center_boc as cost_cen5_1_3_,
        obligation2_.fund as fund6_1_3_,
        obligation2_.last_updated_date as last_upd7_1_3_,
        obligation2_.last_updated_user as last_upd8_1_3_,
        obligation2_.mnemonics as mnemonic9_1_3_,
        obligation2_.obligation_number as obligat10_1_3_,
        cptobligat3_.obligation_key as obligati4_0_4_,
        cptobligat3_.cpt_obligation_key as cpt_obli1_0_4_,
        cptobligat3_.cpt_obligation_key as cpt_obli1_0_5_,
        cptobligat3_.end_date as end_date2_0_5_,
        cptobligat3_.obligation_key as obligati4_0_5_,
        cptobligat3_.procedure_key as procedur5_0_5_,
        cptobligat3_.start_date as start_da3_0_5_,
        procedure4_.procedure_key as procedur1_28_6_,
        procedure4_.procedure_code as procedur2_28_6_,
        procedure4_.short_description as short_de3_28_6_ 
    from
        ccra.payment_authority paymentaut0_ 
    left outer join
        ccra.payment_authority_obligation paymentaut1_ 
            on paymentaut0_.payment_authority_key=paymentaut1_.payment_authority_key 
    left outer join
        ccra.obligation obligation2_ 
            on paymentaut1_.obligation_key=obligation2_.obligation_key 
    left outer join
        ccra.cpt_obligation cptobligat3_ 
            on obligation2_.obligation_key=cptobligat3_.obligation_key 
    left outer join
        dim_procedure_code procedure4_ 
            on cptobligat3_.procedure_key=procedure4_.procedure_key 
    where
        paymentaut0_.payment_authority_key=?
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Decision
        */ insert 
        into
            decision
            (decision_key, etl_batch_id, claim_key, claim_detail_key, decision_date_time, decision, last_updated_user, last_updated_date_time) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Validation
        */ insert 
        into
            validation_failure
            (validation_failure_key, carc_code, decision_key, last_updated_user, message, rarc_code, rule_name, last_updated_date_time, validation_name) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    select
        paymentaut0_.payment_authority_key as payment_1_6_0_,
        paymentaut0_.code as code2_6_0_,
        paymentaut0_.description as descript3_6_0_,
        paymentaut0_.name as name4_6_0_,
        paymentaut1_.payment_authority_key as payment_5_7_1_,
        paymentaut1_.payment_authority_obligation_key as payment_1_7_1_,
        paymentaut1_.payment_authority_obligation_key as payment_1_7_2_,
        paymentaut1_.end_date as end_date2_7_2_,
        paymentaut1_.obligation_key as obligati4_7_2_,
        paymentaut1_.payment_authority_key as payment_5_7_2_,
        paymentaut1_.start_date as start_da3_7_2_,
        obligation2_.obligation_key as obligati1_1_3_,
        obligation2_.acc as acc2_1_3_,
        obligation2_.category_of_care as category3_1_3_,
        obligation2_.category_of_care_subset as category4_1_3_,
        obligation2_.cost_center_boc as cost_cen5_1_3_,
        obligation2_.fund as fund6_1_3_,
        obligation2_.last_updated_date as last_upd7_1_3_,
        obligation2_.last_updated_user as last_upd8_1_3_,
        obligation2_.mnemonics as mnemonic9_1_3_,
        obligation2_.obligation_number as obligat10_1_3_,
        cptobligat3_.obligation_key as obligati4_0_4_,
        cptobligat3_.cpt_obligation_key as cpt_obli1_0_4_,
        cptobligat3_.cpt_obligation_key as cpt_obli1_0_5_,
        cptobligat3_.end_date as end_date2_0_5_,
        cptobligat3_.obligation_key as obligati4_0_5_,
        cptobligat3_.procedure_key as procedur5_0_5_,
        cptobligat3_.start_date as start_da3_0_5_,
        procedure4_.procedure_key as procedur1_28_6_,
        procedure4_.procedure_code as procedur2_28_6_,
        procedure4_.short_description as short_de3_28_6_ 
    from
        ccra.payment_authority paymentaut0_ 
    left outer join
        ccra.payment_authority_obligation paymentaut1_ 
            on paymentaut0_.payment_authority_key=paymentaut1_.payment_authority_key 
    left outer join
        ccra.obligation obligation2_ 
            on paymentaut1_.obligation_key=obligation2_.obligation_key 
    left outer join
        ccra.cpt_obligation cptobligat3_ 
            on obligation2_.obligation_key=cptobligat3_.obligation_key 
    left outer join
        dim_procedure_code procedure4_ 
            on cptobligat3_.procedure_key=procedure4_.procedure_key 
    where
        paymentaut0_.payment_authority_key=?
2018-04-17 08:28:59.872 INFO BatchProcessor         - Claim processing thread Thread[SimpleAsyncTaskExecutor-4,5,main] completed, processed 2 claims
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Decision
        */ insert 
        into
            decision
            (decision_key, etl_batch_id, claim_key, claim_detail_key, decision_date_time, decision, last_updated_user, last_updated_date_time) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Validation
        */ insert 
        into
            validation_failure
            (validation_failure_key, carc_code, decision_key, last_updated_user, message, rarc_code, rule_name, last_updated_date_time, validation_name) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: 
    /* insert gov.va.ccrs.brengine.rule.decision.Validation
        */ insert 
        into
            validation_failure
            (validation_failure_key, carc_code, decision_key, last_updated_user, message, rarc_code, rule_name, last_updated_date_time, validation_name) 
        values
            (null, ?, ?, ?, ?, ?, ?, ?, ?)
2018-04-17 08:28:59.888 INFO BatchProcessor         - Claim processing thread Thread[SimpleAsyncTaskExecutor-3,5,main] completed, processed 2 claims
2018-04-17 08:28:59.888 INFO BatchProcessor         - Batch 'dent_batch_1', host 'JX574H2' completed successfully, processed 6 lines, 11 failures
2018-04-17 08:28:59.888 INFO BatchProcessor         - Updating status of batch 'dent_batch_1' to RULES_COMPLETED
Hibernate: 
    /* load gov.va.ccrs.brengine.batchprocessing.ProcessingTracker */ select
        processing0_.rules_batch_log_key as rules_ba1_38_0_,
        processing0_.etl_batch_id as etl_batc2_38_0_,
        processing0_.claim_type as claim_ty3_38_0_,
        processing0_.engine_version as engine_v4_38_0_,
        processing0_.error as error5_38_0_,
        processing0_.end_date_time as end_date6_38_0_,
        processing0_.hostname as hostname7_38_0_,
        processing0_.resume_mode as resume_m8_38_0_,
        processing0_.last_updated_user as last_upd9_38_0_,
        processing0_.number_of_claims as number_10_38_0_,
        processing0_.number_of_failures as number_11_38_0_,
        processing0_.number_of_lines as number_12_38_0_,
        processing0_.number_of_processed_claims as number_13_38_0_,
        processing0_.number_of_processed_lines as number_14_38_0_,
        processing0_.number_of_waiting_for_data as number_15_38_0_,
        processing0_.rule_names as rule_na16_38_0_,
        processing0_.environment_name as environ17_38_0_,
        processing0_.start_date_time as start_d18_38_0_,
        processing0_.status as status19_38_0_,
        processing0_.last_updated_date_time as last_up20_38_0_ 
    from
        rules_batch_log processing0_ 
    where
        processing0_.rules_batch_log_key=?
Hibernate: 
    /* load gov.va.ccrs.brengine.batchprocessing.BatchInfo */ select
        batchinfo0_.etl_batch_id as etl_batc1_16_0_,
        batchinfo0_.batch_status as batch_st2_16_0_,
        batchinfo0_.last_updated_user as last_upd3_16_0_,
        batchinfo0_.end_date_time as end_date4_16_0_,
        batchinfo0_.source_system as source_s5_16_0_,
        batchinfo0_.last_updated_date as last_upd6_16_0_ 
    from
        claim_batch_log batchinfo0_ 
    where
        batchinfo0_.etl_batch_id=?
Hibernate: 
    /* update
        gov.va.ccrs.brengine.batchprocessing.ProcessingTracker */ update
            rules_batch_log 
        set
            etl_batch_id=?,
            claim_type=?,
            engine_version=?,
            error=?,
            end_date_time=?,
            hostname=?,
            resume_mode=?,
            last_updated_user=?,
            number_of_claims=?,
            number_of_failures=?,
            number_of_lines=?,
            number_of_processed_claims=?,
            number_of_processed_lines=?,
            number_of_waiting_for_data=?,
            rule_names=?,
            environment_name=?,
            start_date_time=?,
            status=?,
            last_updated_date_time=? 
        where
            rules_batch_log_key=?
Hibernate: 
    /* update
        gov.va.ccrs.brengine.batchprocessing.BatchInfo */ update
            claim_batch_log 
        set
            batch_status=?,
            last_updated_user=?,
            end_date_time=?,
            source_system=?,
            last_updated_date=? 
        where
            etl_batch_id=?
2018-04-17 08:28:59.888 INFO EmailNotifier          - Sending email to 'alexander@myarch.com'. Subject:
Batch 'dent_batch_1', host 'JX574H2' completed successfully, processed 6 lines, 11 failures
2018-04-17 08:28:59.888 INFO EmailNotifier          - Email sending is disabled, the email won't be sent
Hibernate: 
    /* select
        d 
    from
        Decision d 
    where
        d.batchId=?1 */ select
            decision0_.decision_key as decision1_21_,
            decision0_.etl_batch_id as etl_batc2_21_,
            decision0_.claim_key as claim_ke8_21_,
            decision0_.claim_detail_key as claim_de3_21_,
            decision0_.decision_date_time as decision4_21_,
            decision0_.decision as decision5_21_,
            decision0_.last_updated_user as last_upd6_21_,
            decision0_.last_updated_date_time as last_upd7_21_ 
        from
            decision decision0_ 
        where
            decision0_.etl_batch_id=?
2018-04-17 08:28:59.935 INFO nfigApplicationContext - Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@13bc8645: startup date [Tue Apr 17 08:28:47 EDT 2018]; root of context hierarchy
2018-04-17 08:28:59.935 INFO aultLifecycleProcessor - Stopping beans in phase 2147483547
2018-04-17 08:28:59.935 INFO aultLifecycleProcessor - Stopping beans in phase 0
2018-04-17 08:28:59.950 INFO tityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default'
2018-04-17 08:28:59.950 INFO HikariDataSource       - HikariPool-1 - Shutdown initiated...
2018-04-17 08:28:59.969 INFO HikariDataSource       - HikariPool-1 - Shutdown completed.
