From d8ef82d17f8c4728558e7c8f057551c4f495dc55 Mon Sep 17 00:00:00 2001 From: Luke Sikina Date: Mon, 16 Sep 2024 15:50:32 -0400 Subject: [PATCH] [CHORE] I flipped em --- .../dbmi/avillach/dictionary/dashboard/DashboardColumn.java | 2 +- .../dbmi/avillach/dictionary/dashboard/DashboardRepository.java | 2 +- .../dictionary/dashboard/DashboardRowResultSetExtractor.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboard/DashboardColumn.java b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboard/DashboardColumn.java index f481eb7..f8a59fb 100644 --- a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboard/DashboardColumn.java +++ b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboard/DashboardColumn.java @@ -1,4 +1,4 @@ package edu.harvard.dbmi.avillach.dictionary.dashboard; -public record DashboardColumn(String label, String dataElement) { +public record DashboardColumn(String dataElement, String label) { } diff --git a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboard/DashboardRepository.java b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboard/DashboardRepository.java index a302d85..532aec2 100644 --- a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboard/DashboardRepository.java +++ b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboard/DashboardRepository.java @@ -45,7 +45,7 @@ dataset_meta.KEY IN (:keys) ORDER BY name ASC, abbreviation ASC """; List keys = columns.stream() - .map(DashboardColumn::label) + .map(DashboardColumn::dataElement) .filter(Predicate.not(nonMetaColumns::contains)) .toList(); MapSqlParameterSource params = new MapSqlParameterSource().addValue("keys", keys); diff --git a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboard/DashboardRowResultSetExtractor.java b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboard/DashboardRowResultSetExtractor.java index e2f2654..b60cfaf 100644 --- a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboard/DashboardRowResultSetExtractor.java +++ b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboard/DashboardRowResultSetExtractor.java @@ -36,7 +36,7 @@ public List> extractData(ResultSet rs) throws SQLException, String name = rs.getString("name"); if (!currentRow.equals(name + abbreviation)) { currentRow = name + abbreviation; - if (!row.isEmpty()) { + if (!row.equals(template)) { row.put("abbreviation", abbreviation); row.put("name", name); rows.add(row);