diff --git a/src/main/java/org/kpmp/spatialViewerDataset/SpatialViewerDatasetService.java b/src/main/java/org/kpmp/spatialViewerDataset/SpatialViewerDatasetService.java index f59d74f..96db2c9 100644 --- a/src/main/java/org/kpmp/spatialViewerDataset/SpatialViewerDatasetService.java +++ b/src/main/java/org/kpmp/spatialViewerDataset/SpatialViewerDatasetService.java @@ -109,18 +109,39 @@ public List getSpatialViewerDataset() throws Exception { } for(SpatialViewerExternalLinkDataset spatialViewerExternalLinkDataset : datasetLinks){ - if(displayLinks.containsKey(spatialViewerExternalLinkDataset.getDlFileId())){ + if(displayLinks.containsKey(spatialViewerExternalLinkDataset.getId().getExternalLink())){ // update all of the list items in that display link - SpatialViewerExternalLinkDatasetDisplay displayLink = displayLinks.get(spatialViewerExternalLinkDataset.getDlFileId()); - // do adders - } - SpatialViewerExternalLinkDatasetDisplay displayLink = new SpatialViewerExternalLinkDatasetDisplay(spatialViewerExternalLinkDataset); - if(Double.compare(spatialViewerExternalLinkDataset.getReleaseVersion(), maxLinkReleaseVersion) == EQUALITY_OPERATOR){ - displayLink.setReleaseVersion("Recently Released - " + recentlyReleasedDate); + SpatialViewerExternalLinkDatasetDisplay displayLink = displayLinks.get(spatialViewerExternalLinkDataset.getId().getExternalLink()); + displayLink.addRedcapId(spatialViewerExternalLinkDataset.getId().getRedcapId()); + displayLink.addAge(spatialViewerExternalLinkDataset.getAge()); + displayLink.addProtocol(spatialViewerExternalLinkDataset.getProtocol()); + displayLink.addSampleType(spatialViewerExternalLinkDataset.getSampleType()); + displayLink.addSex(spatialViewerExternalLinkDataset.getSex()); + displayLink.addTissueSource(spatialViewerExternalLinkDataset.getTissueSource()); + displayLink.addEnrollmentCategory(spatialViewerExternalLinkDataset.getEnrollmentCategory()); + displayLink.addPrimaryAdjudicatedCategory(spatialViewerExternalLinkDataset.getPrimaryAdjudicatedCategory()); + displayLink.addKdigoStage(spatialViewerExternalLinkDataset.getKdigoStage()); + displayLink.addBaselineEgfr(spatialViewerExternalLinkDataset.getBaselineEgfr()); + displayLink.addProteinuria(spatialViewerExternalLinkDataset.getProteinuria()); + displayLink.addA1c(spatialViewerExternalLinkDataset.getA1c()); + displayLink.addAlbuminuria(spatialViewerExternalLinkDataset.getAlbuminuria()); + displayLink.addDiabetesHistory(spatialViewerExternalLinkDataset.getDiabetesHistory()); + displayLink.addDiabetesDuration(spatialViewerExternalLinkDataset.getDiabetesDuration()); + displayLink.addHypertensionHistory(spatialViewerExternalLinkDataset.getHypertensionHistory()); + displayLink.addHypertensionDuration(spatialViewerExternalLinkDataset.getHypertensionDuration()); + displayLink.addOnRaasBlockade(spatialViewerExternalLinkDataset.getOnRaasBlockade()); + displayLink.addRace(spatialViewerExternalLinkDataset.getRace()); + }else{ - displayLink.setReleaseVersion(null); + SpatialViewerExternalLinkDatasetDisplay displayLink = new SpatialViewerExternalLinkDatasetDisplay(spatialViewerExternalLinkDataset); + if(Double.compare(spatialViewerExternalLinkDataset.getReleaseVersion(), maxLinkReleaseVersion) == EQUALITY_OPERATOR){ + displayLink.setReleaseVersion("Recently Released - " + recentlyReleasedDate); + }else{ + displayLink.setReleaseVersion(null); + } + displayLinks.put(spatialViewerExternalLinkDataset.getId().getExternalLink(), displayLink); } - displayLinks.put(spatialViewerExternalLinkDataset.getId().getRedcapId(), displayLink); + } datasetsFinal.addAll(displayFiles.values()); datasetsFinal.addAll(displayLinks.values());