Skip to content

Commit

Permalink
Revert temp change to test pediatric data
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcolon021 committed Nov 14, 2024
1 parent 3ab73e2 commit 2ea0806
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ public Result mapContinuousMetadata(ResultSet rs) throws SQLException {
String hashedVarId = hashVarId(rs.getString("conceptPath"));
String description = getDescription(rs);
String parentName = getParentName(rs);
// String parentDisplay = getParentDisplay(rs);
String parentDisplay = rs.getString("parentDisplay"); // Testing pediatric fix
String parentDisplay = getParentDisplay(rs);

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

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

private static String getParentName(ResultSet rs) throws SQLException {
return rs.getString("parentName") == null || rs.getString("parentName").isBlank() ? "All Variables" : rs.getString("parentName");
}

private static String getDescription(ResultSet rs) throws SQLException {
return rs.getString("description") == null || rs.getString("description").isBlank() ? "" : rs.getString("description");
}

public Result mapCategoricalMetadata(ResultSet rs) throws SQLException {
String hashedVarId = hashVarId(rs.getString("conceptPath"));
String description = getDescription(rs);
String parentName = getParentName(rs);
// String parentDisplay = getParentDisplay(rs);
String parentDisplay = rs.getString("parentDisplay"); // Testing pediatric fix
String parentDisplay = getParentDisplay(rs);

CategoricalMetadata metadata = new CategoricalMetadata(
rs.getString("stigmatized"), rs.getString("display"), description, "", rs.getString("conceptPath"), parentName,
Expand Down Expand Up @@ -107,4 +95,16 @@ private static String bytesToHex(byte[] hash) {
}
return hexString.toString();
}

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

private static String getParentName(ResultSet rs) throws SQLException {
return rs.getString("parentName") == null || rs.getString("parentName").isBlank() ? "All Variables" : rs.getString("parentName");
}

private static String getDescription(ResultSet rs) throws SQLException {
return rs.getString("description") == null || rs.getString("description").isBlank() ? "" : rs.getString("description");
}
}

0 comments on commit 2ea0806

Please sign in to comment.