diff --git a/nirc_ehr/src/org/labkey/nirc_ehr/history/ArrivalDataSource.java b/nirc_ehr/src/org/labkey/nirc_ehr/history/ArrivalDataSource.java index 933caf5c..4b4a8798 100644 --- a/nirc_ehr/src/org/labkey/nirc_ehr/history/ArrivalDataSource.java +++ b/nirc_ehr/src/org/labkey/nirc_ehr/history/ArrivalDataSource.java @@ -4,7 +4,6 @@ import org.labkey.api.data.Results; import org.labkey.api.ehr.history.AbstractDataSource; import org.labkey.api.module.Module; -import org.labkey.api.query.FieldKey; import org.labkey.api.util.PageFlowUtil; import java.sql.SQLException; @@ -30,8 +29,7 @@ protected String getHtml(Container c, Results rs, boolean redacted) throws SQLEx sb.append(safeAppend(rs, "Arrival Type", "arrivalType")); sb.append(safeAppend(rs, "Acquisition Type", "acquisitionType")); - if (rs.hasColumn(FieldKey.fromString("sourceFacility")) && rs.getObject(FieldKey.fromString("sourceFacility")) != null) - sb.append("Lab Transfer From: " + rs.getString(FieldKey.fromString("sourceFacility"))); + sb.append(safeAppend(rs, "Lab Transfer From", "sourceFacility")); return sb.toString(); } diff --git a/nirc_ehr/src/org/labkey/nirc_ehr/history/BirthDataSource.java b/nirc_ehr/src/org/labkey/nirc_ehr/history/BirthDataSource.java index 6d07815e..055fc9a0 100644 --- a/nirc_ehr/src/org/labkey/nirc_ehr/history/BirthDataSource.java +++ b/nirc_ehr/src/org/labkey/nirc_ehr/history/BirthDataSource.java @@ -4,7 +4,6 @@ import org.labkey.api.data.Results; import org.labkey.api.ehr.history.AbstractDataSource; import org.labkey.api.module.Module; -import org.labkey.api.query.FieldKey; import org.labkey.api.util.PageFlowUtil; import java.sql.SQLException; @@ -27,11 +26,6 @@ protected Set getColumnNames() @Override protected String getHtml(Container c, Results rs, boolean redacted) throws SQLException { - StringBuilder sb = new StringBuilder(); - - if(rs.hasColumn(FieldKey.fromString("Id/Demographics/gender/meaning")) && rs.getObject(FieldKey.fromString("Id/Demographics/gender/meaning")) != null) - sb.append("Gender: " + rs.getString(FieldKey.fromString("Id/Demographics/gender/meaning"))); - - return sb.toString(); + return safeAppend(rs, "Gender", "Id/Demographics/gender/meaning"); } }