From 0440874431654c68c8638ea2f328a75e2d70def7 Mon Sep 17 00:00:00 2001 From: HaneenT Date: Tue, 5 Mar 2024 11:38:00 -0500 Subject: [PATCH] KPMP-5178: added query to fetch biomarker counts --- .../dataSummary/DataSummaryRepository.java | 4 ++ .../kpmp/dataSummary/DataSummaryService.java | 72 ++++++++++++------- .../dataSummary/DataSummaryServiceTest.java | 12 ++-- 3 files changed, 56 insertions(+), 32 deletions(-) diff --git a/src/main/java/org/kpmp/dataSummary/DataSummaryRepository.java b/src/main/java/org/kpmp/dataSummary/DataSummaryRepository.java index 0d13df8..b393fc4 100755 --- a/src/main/java/org/kpmp/dataSummary/DataSummaryRepository.java +++ b/src/main/java/org/kpmp/dataSummary/DataSummaryRepository.java @@ -20,6 +20,10 @@ public interface DataSummaryRepository extends CrudRepository getSummaryData() { diff --git a/src/test/java/org/kpmp/dataSummary/DataSummaryServiceTest.java b/src/test/java/org/kpmp/dataSummary/DataSummaryServiceTest.java index bb0299b..d80b38a 100755 --- a/src/test/java/org/kpmp/dataSummary/DataSummaryServiceTest.java +++ b/src/test/java/org/kpmp/dataSummary/DataSummaryServiceTest.java @@ -70,14 +70,10 @@ public void testGetAtlasRepoSummary() throws Exception { strategies.get(3).setDataType("datatype"); when(atlasRepoSummaryRepository.findAll()).thenReturn(strategies); - when(dataSummaryRepository.getRepoDataSummaryCount(TissueTypeEnum.AKI.getParticipantTissueType(), - "abcd")).thenReturn(Long.valueOf(1)); - when(dataSummaryRepository.getRepoDataSummaryCount(TissueTypeEnum.CKD.getParticipantTissueType(), - "abcd")).thenReturn(Long.valueOf(2)); - when(dataSummaryRepository.getRepoDataSummaryCount(TissueTypeEnum.HEALTHY_REFERENCE.getParticipantTissueType(), - "abcd")).thenReturn(Long.valueOf(3)); - when(dataSummaryRepository.getRepoDataSummaryCount(TissueTypeEnum.DMR.getParticipantTissueType(), - "abcd")).thenReturn(4l); + when(dataSummaryRepository.getRepoBiomarkerSummaryCount(TissueTypeEnum.AKI.getParticipantTissueType())).thenReturn(Long.valueOf(1)); + when(dataSummaryRepository.getRepoBiomarkerSummaryCount(TissueTypeEnum.CKD.getParticipantTissueType())).thenReturn(Long.valueOf(2)); + when(dataSummaryRepository.getRepoBiomarkerSummaryCount(TissueTypeEnum.HEALTHY_REFERENCE.getParticipantTissueType())).thenReturn(Long.valueOf(3)); + when(dataSummaryRepository.getRepoBiomarkerSummaryCount(TissueTypeEnum.DMR.getParticipantTissueType())).thenReturn(4l); when(dataSummaryRepository.getRepoDataSummaryCount(TissueTypeEnum.AKI.getParticipantTissueType(), "")).thenReturn(Long.valueOf(5));