From 8a526400f87a2fb5af30a6be07abcc84146c6a08 Mon Sep 17 00:00:00 2001 From: Katy Ekey Date: Tue, 24 Feb 2026 14:42:29 -0500 Subject: [PATCH 1/2] feat!: RWT Power BI Report Data only includes listings with g7, g9, and g10 [#OCD-5152] --- .../RealWorldTestingPlanSummaryReportDao.java | 16 ---------------- .../RealWorldTestingSummaryReportCreatorJob.java | 4 +++- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/chpl/chpl-service/src/main/java/gov/healthit/chpl/report/realworldtesting/RealWorldTestingPlanSummaryReportDao.java b/chpl/chpl-service/src/main/java/gov/healthit/chpl/report/realworldtesting/RealWorldTestingPlanSummaryReportDao.java index cf32ea4253..ad4c1ab6ea 100644 --- a/chpl/chpl-service/src/main/java/gov/healthit/chpl/report/realworldtesting/RealWorldTestingPlanSummaryReportDao.java +++ b/chpl/chpl-service/src/main/java/gov/healthit/chpl/report/realworldtesting/RealWorldTestingPlanSummaryReportDao.java @@ -51,22 +51,6 @@ public List getRealWorldTestingReportsByTestingYe .toList(); } - private RealWorldTestingPlanSummaryReportEntity getEntity(Long id) throws EntityRetrievalException { - Query query = entityManager.createQuery( - "from RealWorldTestingPlanSummaryReportEntity where (NOT deleted = true) and id = :id", RealWorldTestingPlanSummaryReportEntity.class); - query.setParameter("id", id); - List result = query.getResultList(); - - if (result.size() > 1) { - throw new EntityRetrievalException("Data error. Duplicate id in real_world_testing_plan_summary_report table."); - } - - if (result.size() > 0) { - return result.get(0); - } - return null; - } - private RealWorldTestingPlanSummaryReportEntity getEntityByCheckedDateAndAcb(LocalDate checkedDate, Long certificationBodyId) throws EntityRetrievalException { Query query = entityManager.createQuery( "from RealWorldTestingPlanSummaryReportEntity rwtps " diff --git a/chpl/chpl-service/src/main/java/gov/healthit/chpl/scheduler/job/RealWorldTestingSummaryReportCreatorJob.java b/chpl/chpl-service/src/main/java/gov/healthit/chpl/scheduler/job/RealWorldTestingSummaryReportCreatorJob.java index 75e2c6ffac..f60ae4d21e 100644 --- a/chpl/chpl-service/src/main/java/gov/healthit/chpl/scheduler/job/RealWorldTestingSummaryReportCreatorJob.java +++ b/chpl/chpl-service/src/main/java/gov/healthit/chpl/scheduler/job/RealWorldTestingSummaryReportCreatorJob.java @@ -54,7 +54,9 @@ public void execute(JobExecutionContext context) throws JobExecutionException { .map(acb -> acb.getId()) .toList(); - List reportRows = rwtReportService.getRealWorldTestingReports(activeAcbIds, LOGGER); + List reportRows = rwtReportService.getRealWorldTestingReports(activeAcbIds, LOGGER).stream() + .filter(report -> report.getAttestsG7() || report.getAttestsG9() || report.getAttestsG10()) + .collect(Collectors.toList()); TransactionOperations transactionOperations = new TransactionTemplate(transactionManager, new DefaultTransactionDefinition(TransactionDefinition.PROPAGATION_REQUIRES_NEW)); From a2a7ec420cc4d1c2b1d8bc0c90c50ce8743fb3fa Mon Sep 17 00:00:00 2001 From: Katy Ekey Date: Wed, 25 Feb 2026 12:24:50 -0500 Subject: [PATCH 2/2] fix: Only filter RWT results calculations by g7,9,10 criteria [#OCD-5152] --- .../job/RealWorldTestingSummaryReportCreatorJob.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/chpl/chpl-service/src/main/java/gov/healthit/chpl/scheduler/job/RealWorldTestingSummaryReportCreatorJob.java b/chpl/chpl-service/src/main/java/gov/healthit/chpl/scheduler/job/RealWorldTestingSummaryReportCreatorJob.java index f60ae4d21e..0f2e4a832d 100644 --- a/chpl/chpl-service/src/main/java/gov/healthit/chpl/scheduler/job/RealWorldTestingSummaryReportCreatorJob.java +++ b/chpl/chpl-service/src/main/java/gov/healthit/chpl/scheduler/job/RealWorldTestingSummaryReportCreatorJob.java @@ -54,15 +54,19 @@ public void execute(JobExecutionContext context) throws JobExecutionException { .map(acb -> acb.getId()) .toList(); - List reportRows = rwtReportService.getRealWorldTestingReports(activeAcbIds, LOGGER).stream() + List rwtPlansReports = rwtReportService.getRealWorldTestingReports(activeAcbIds, LOGGER).stream() + .collect(Collectors.toList()); + + //RWT Results requirement is only enforced for listings with g7, g9, or g10 so we only want to report on those + List rwtResultReports = rwtPlansReports.stream() .filter(report -> report.getAttestsG7() || report.getAttestsG9() || report.getAttestsG10()) .collect(Collectors.toList()); TransactionOperations transactionOperations = new TransactionTemplate(transactionManager, new DefaultTransactionDefinition(TransactionDefinition.PROPAGATION_REQUIRES_NEW)); transactionOperations.executeWithoutResult(status -> { - processRwtPlanCounts(reportRows); - processRwtResultsCounts(reportRows); + processRwtPlanCounts(rwtPlansReports); + processRwtResultsCounts(rwtResultReports); }); } catch (Exception e) { LOGGER.catching(e);