Skip to content

Commit 2ea0806

Browse files
committed
Revert temp change to test pediatric data
1 parent 3ab73e2 commit 2ea0806

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/main/java/edu/harvard/dbmi/avillach/dictionary/legacysearch/MetadataResultSetUtil.java

+14-14
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ public Result mapContinuousMetadata(ResultSet rs) throws SQLException {
3131
String hashedVarId = hashVarId(rs.getString("conceptPath"));
3232
String description = getDescription(rs);
3333
String parentName = getParentName(rs);
34-
// String parentDisplay = getParentDisplay(rs);
35-
String parentDisplay = rs.getString("parentDisplay"); // Testing pediatric fix
34+
String parentDisplay = getParentDisplay(rs);
3635

3736
String max = String.valueOf(jsonBlobParser.parseMax(rs.getString("values")));
3837
String min = String.valueOf(jsonBlobParser.parseMin(rs.getString("values")));
@@ -50,24 +49,13 @@ public Result mapContinuousMetadata(ResultSet rs) throws SQLException {
5049
);
5150
}
5251

53-
// private static String getParentDisplay(ResultSet rs) throws SQLException {
54-
// return rs.getString("parentDisplay") == null || rs.getString("parentDisplay").isBlank() ? "" : rs.getString("parentDisplay");
55-
// }
5652

57-
private static String getParentName(ResultSet rs) throws SQLException {
58-
return rs.getString("parentName") == null || rs.getString("parentName").isBlank() ? "All Variables" : rs.getString("parentName");
59-
}
60-
61-
private static String getDescription(ResultSet rs) throws SQLException {
62-
return rs.getString("description") == null || rs.getString("description").isBlank() ? "" : rs.getString("description");
63-
}
6453

6554
public Result mapCategoricalMetadata(ResultSet rs) throws SQLException {
6655
String hashedVarId = hashVarId(rs.getString("conceptPath"));
6756
String description = getDescription(rs);
6857
String parentName = getParentName(rs);
69-
// String parentDisplay = getParentDisplay(rs);
70-
String parentDisplay = rs.getString("parentDisplay"); // Testing pediatric fix
58+
String parentDisplay = getParentDisplay(rs);
7159

7260
CategoricalMetadata metadata = new CategoricalMetadata(
7361
rs.getString("stigmatized"), rs.getString("display"), description, "", rs.getString("conceptPath"), parentName,
@@ -107,4 +95,16 @@ private static String bytesToHex(byte[] hash) {
10795
}
10896
return hexString.toString();
10997
}
98+
99+
private static String getParentDisplay(ResultSet rs) throws SQLException {
100+
return rs.getString("parentDisplay") == null || rs.getString("parentDisplay").isBlank() ? "" : rs.getString("parentDisplay");
101+
}
102+
103+
private static String getParentName(ResultSet rs) throws SQLException {
104+
return rs.getString("parentName") == null || rs.getString("parentName").isBlank() ? "All Variables" : rs.getString("parentName");
105+
}
106+
107+
private static String getDescription(ResultSet rs) throws SQLException {
108+
return rs.getString("description") == null || rs.getString("description").isBlank() ? "" : rs.getString("description");
109+
}
110110
}

0 commit comments

Comments
 (0)