Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package org.labkey.nirc_ehr;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.labkey.api.data.CompareType;
import org.labkey.api.data.Container;
import org.labkey.api.data.DbScope;
import org.labkey.api.data.SimpleFilter;
import org.labkey.api.data.TableInfo;
import org.labkey.api.data.TableSelector;
import org.labkey.api.exp.OntologyManager;
import org.labkey.api.module.Module;
import org.labkey.api.module.ModuleLoader;
import org.labkey.api.module.ModuleProperty;
Expand Down
2 changes: 1 addition & 1 deletion nirc_ehr/src/org/labkey/nirc_ehr/NIRC_EHRManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class NIRC_EHRManager
public static final String SIB_OBS_TITLE = "SIB Observations";
public static final List<String> SIB_OBS = List.of("Environmental Change", "Self Biting Observed", "Other Stereotopy", "New Injury Observed", "Special Enrichment", "Wound Status", "Wound Severity");

private static NIRCOrchardFileGenerator _orchardFileGenerator = new NIRCOrchardFileGenerator();
private static final NIRCOrchardFileGenerator _orchardFileGenerator = new NIRCOrchardFileGenerator();
public static NIRCOrchardFileGenerator getOrchardFileGenerator()
{
return _orchardFileGenerator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import org.labkey.nirc_ehr.dataentry.section.NIRCAnimalDetailsFormSection;
import org.labkey.nirc_ehr.dataentry.section.NIRCArrivalFormSection;
import org.labkey.nirc_ehr.dataentry.section.NIRCArrivalInstructionsFormSection;
import org.labkey.nirc_ehr.dataentry.section.NIRCProjectAssignmentFormSection;
import org.labkey.nirc_ehr.dataentry.section.NIRCProtocolAssignmentFormSection;
import org.labkey.nirc_ehr.dataentry.section.NIRCTaskFormSection;
import org.labkey.nirc_ehr.dataentry.section.NIRCWeightFormSection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public NIRCBirthFormType (DataEntryFormContext ctx, Module owner)
@Override
protected List<String> getButtonConfigs()
{
List<String> defaultButtons = new ArrayList<String>();
List<String> defaultButtons = new ArrayList<>();
defaultButtons.add("SAVEDRAFT");
defaultButtons.add("BIRTHARRIVALREVIEW");
defaultButtons.add("BIRTHARRIVALFINAL");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public NIRCBulkBehaviorFormType(DataEntryFormContext ctx, Module owner)
s.addConfigSource("BehaviorDefaults");
s.addConfigSource("TreatmentSchedule");
s.addConfigSource("MedicationEndDate");
};
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public NIRCBulkClinicalFormType(DataEntryFormContext ctx, Module owner)
s.addConfigSource("BulkClinical");
s.addConfigSource("TreatmentSchedule");
s.addConfigSource("MedicationEndDate");
};
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public NIRCDeathNecropsyFormType(DataEntryFormContext ctx, Module owner)
@Override
protected List<String> getButtonConfigs()
{
List<String> defaultButtons = new ArrayList<String>();
List<String> defaultButtons = new ArrayList<>();
boolean isVetTech = getCtx().getContainer().hasPermission(getCtx().getUser(), NIRCEHRVetTechPermission.class);
boolean isVet = getCtx().getContainer().hasPermission(getCtx().getUser(), EHRVeterinarianPermission.class);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package org.labkey.nirc_ehr.dataentry.form;

import org.labkey.api.ehr.dataentry.DataEntryFormContext;
import org.labkey.api.ehr.dataentry.TaskForm;
import org.labkey.api.module.Module;
import org.labkey.api.view.template.ClientDependency;
import org.labkey.nirc_ehr.dataentry.section.NIRCAnimalDetailsFormSection;
import org.labkey.nirc_ehr.dataentry.section.NIRCDepartureFormSection;
import org.labkey.nirc_ehr.dataentry.section.NIRCTaskFormSection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.labkey.api.ehr.dataentry.DataEntryFormContext;
import org.labkey.api.ehr.security.EHRHousingTransferPermission;
import org.labkey.api.module.Module;
import org.labkey.api.view.template.ClientDependency;
import org.labkey.nirc_ehr.dataentry.section.NIRCAnimalDetailsFormSection;
import org.labkey.nirc_ehr.dataentry.section.NIRCHousingFormSection;
import org.labkey.nirc_ehr.dataentry.section.NIRCTaskFormSection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.labkey.api.ehr.dataentry.DataEntryFormContext;
import org.labkey.api.module.Module;
import org.labkey.api.view.template.ClientDependency;
import org.labkey.nirc_ehr.dataentry.section.NIRCAnimalDetailsFormSection;
import org.labkey.nirc_ehr.dataentry.section.NIRCTaskFormSection;
import org.labkey.nirc_ehr.dataentry.section.NIRCWeightFormSection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.json.JSONObject;
import org.labkey.api.data.TableInfo;
import org.labkey.api.ehr.dataentry.DataEntryFormContext;
import org.labkey.api.ehr.dataentry.forms.NewAnimalFormSection;
import org.labkey.api.query.FieldKey;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

public class NIRCBloodDrawFormSection extends BloodDrawFormSection
{
private boolean _collapsible = false;
private boolean _initCollapsed = false;
private boolean _addCopyFromSection = false;
private boolean _collapsible;
private boolean _initCollapsed;
private boolean _addCopyFromSection;

public NIRCBloodDrawFormSection(boolean collapsible, boolean initCollapsed, boolean addCopyFromSection)
{
Expand Down Expand Up @@ -41,6 +41,7 @@ public NIRCBloodDrawFormSection(boolean isChild, String parentQueryName)
}
}

@Override
public List<String> getTbarButtons()
{
List<String> defaultButtons = super.getTbarButtons();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

public class NIRCCasesFormPanelSection extends ParentFormPanelSection
{
private boolean isVetTech;
private boolean isVet;
private boolean isFolderAdmin;
private boolean isBehavior;
private final boolean isVetTech;
private final boolean isVet;
private final boolean isFolderAdmin;
private final boolean isBehavior;

public NIRCCasesFormPanelSection(String label, DataEntryFormContext ctx, boolean isBehavior)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
public class NIRCClinicalObservationsFormSection extends BaseFormSection
{
public static final String LABEL = "Observations";
private boolean _autoPopulateDailyObs = true;
private boolean _autoPopulateDailyObs;

public NIRCClinicalObservationsFormSection(boolean autoPopulateDailyObs, boolean initCollapsed)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
public class NIRCClinicalRemarksFormSection extends BaseFormSection
{
public static final String LABEL = "Clinical Remarks";
private boolean isVetTech;
private boolean isVet;
private boolean isFolderAdmin;
private final boolean isVetTech;
private final boolean isVet;
private final boolean isFolderAdmin;

public NIRCClinicalRemarksFormSection(boolean isVetTech, boolean isVet, boolean isFolderAdmin)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public NIRCDeathFormSection()
setSupportFormSort(false);
}

@Override
public JSONObject toJSON(DataEntryFormContext ctx, boolean includeFormElements)
{
JSONObject json = super.toJSON(ctx, includeFormElements);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.labkey.nirc_ehr.dataentry.section;

import org.labkey.api.ehr.EHRService;

public class NIRCExemptionsFormSection extends BaseFormSection
{
public NIRCExemptionsFormSection(String label)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.labkey.nirc_ehr.dataentry.section;

import org.labkey.api.ehr.EHRService;

public class NIRCFlagsFormSection extends BaseFormSection
{
public NIRCFlagsFormSection(String label)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.labkey.nirc_ehr.dataentry.section;

import org.json.JSONObject;
import org.labkey.api.ehr.dataentry.DataEntryFormContext;
import org.labkey.api.view.template.ClientDependency;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
package org.labkey.nirc_ehr.dataentry.section;

import org.json.JSONObject;
import org.labkey.api.data.TableInfo;
import org.labkey.api.ehr.dataentry.DataEntryFormContext;
import org.labkey.api.ehr.dataentry.SimpleFormPanelSection;
import org.labkey.api.query.FieldKey;
import org.labkey.api.view.template.ClientDependency;

import java.util.List;

public class NIRCNecropsyFormSection extends SimpleFormPanelSection
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class NIRCObservationOrdersFormSection extends BaseFormSection
{

public static final String LABEL = "Observation Orders";
private String _dailyObsOption;
private final String _dailyObsOption;

public NIRCObservationOrdersFormSection(String dailyObsOption, boolean initCollapsed)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.labkey.nirc_ehr.dataentry.section;

import org.labkey.api.ehr.EHRService;
import org.labkey.api.view.template.ClientDependency;

public class NIRCWeightFormSection extends BaseFormSection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public ActiveAssignmentsDemographicsProvider(Module owner)
@Override
protected Set<FieldKey> getFieldKeys()
{
Set<FieldKey> keys = new HashSet<FieldKey>();
Set<FieldKey> keys = new HashSet<>();
keys.add(FieldKey.fromString("lsid"));
keys.add(FieldKey.fromString("Id"));
keys.add(FieldKey.fromString("project"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public ActiveCasesDemographicsProvider(Module module)
@Override
protected Set<FieldKey> getFieldKeys()
{
Set<FieldKey> keys = new HashSet<FieldKey>();
Set<FieldKey> keys = new HashSet<>();
keys.add(FieldKey.fromString("lsid"));
keys.add(FieldKey.fromString("objectid"));
keys.add(FieldKey.fromString("Id"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public ActiveFlagsDemographicsProvider(Module module)
@Override
protected Set<FieldKey> getFieldKeys()
{
Set<FieldKey> keys = new HashSet<FieldKey>();
Set<FieldKey> keys = new HashSet<>();
keys.add(FieldKey.fromString("lsid"));
keys.add(FieldKey.fromString("Id"));
keys.add(FieldKey.fromString("date"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public ActiveTreatmentsDemographicsProvider(Module owner)
@Override
protected Set<FieldKey> getFieldKeys()
{
Set<FieldKey> keys = new HashSet<FieldKey>();
Set<FieldKey> keys = new HashSet<>();
keys.add(FieldKey.fromString("lsid"));
keys.add(FieldKey.fromString("Id"));
keys.add(FieldKey.fromString("code"));
Expand Down Expand Up @@ -60,6 +60,7 @@ public Collection<String> getKeysToTest()
return keys;
}

@Override
protected SimpleFilter getFilter(Collection<String> ids)
{
SimpleFilter filter = super.getFilter(ids);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ public boolean requiresRecalc(String schema, String query)
@Override
protected Collection<FieldKey> getFieldKeys()
{
Set<FieldKey> keys = new HashSet<FieldKey>();
Set<FieldKey> keys = new HashSet<>();
keys.add(FieldKey.fromString("Id"));
keys.add(FieldKey.fromString("necropsy_status"));

return keys;
}

@Override
protected SimpleFilter getFilter(Collection<String> ids)
{
List<String> qcStates = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class ProtocolAssignmentDemographicsProvider extends AbstractListDemographicsProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@ protected Set<String> getColumnNames()
@Override
protected String getHtml(Container c, Results rs, boolean redacted) throws SQLException
{
StringBuilder sb = new StringBuilder();

sb.append(safeAppend(rs, "Total Quantity", "quantity", " mL"));
sb.append(safeAppend(rs, "Sample Type", "type"));
sb.append(safeAppend(rs, "Remark", "remark"));
String sb = safeAppend(rs, "Total Quantity", "quantity", " mL") +
safeAppend(rs, "Sample Type", "type") +
safeAppend(rs, "Remark", "remark");

return sb.toString();
return sb;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ public BreederDataSource(Module module)
@Override
protected String getHtml(Container c, Results rs, boolean redacted) throws SQLException
{
StringBuilder sb = new StringBuilder();

sb.append(safeAppend(rs, "Type", "type"));
sb.append(safeAppend(rs, "Result", "result"));
sb.append(safeAppend(rs, "Remark", "remark"));
String sb = safeAppend(rs, "Type", "type") +
safeAppend(rs, "Result", "result") +
safeAppend(rs, "Remark", "remark");

return sb.toString();
return sb;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ protected Set<String> getColumnNames()
@Override
protected String getHtml(Container c, Results rs, boolean redacted) throws SQLException
{
StringBuilder sb = new StringBuilder();

sb.append(safeAppend(rs, "Type", "type"));
sb.append(safeAppend(rs, "Remark", "remark"));
String sb = safeAppend(rs, "Type", "type") +
safeAppend(rs, "Remark", "remark");

return sb.toString();
return sb;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ protected Set<String> getColumnNames()
@Override
protected String getHtml(Container c, Results rs, boolean redacted) throws SQLException
{
StringBuilder sb = new StringBuilder();

sb.append(safeAppend(rs, "Diagnosis", "diagnosis"));
sb.append(safeAppend(rs, "Remark", "remark"));
String sb = safeAppend(rs, "Diagnosis", "diagnosis") +
safeAppend(rs, "Remark", "remark");

return sb.toString();
return sb;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.labkey.nirc_ehr.history;

import org.apache.commons.lang3.time.DateUtils;
import org.jetbrains.annotations.NotNull;
import org.labkey.api.data.CompareType;
import org.labkey.api.data.Container;
Expand Down Expand Up @@ -31,14 +30,12 @@ protected String getHtml(Container c, Results rs, boolean redacted) throws SQLEx
{
Date start = rs.getDate(FieldKey.fromString("date"));

StringBuilder sb = new StringBuilder();
String sb = "Opened Date: " + DateUtil.formatDate(c, start) +
"\n" +
safeAppend(rs, "Problem Area", "problemCategory") +
safeAppend(rs, "Close Remark", "closeRemark");

sb.append("Opened Date: ").append(DateUtil.formatDate(c, start));
sb.append("\n");
sb.append(safeAppend(rs, "Problem Area", "problemCategory"));
sb.append(safeAppend(rs, "Close Remark", "closeRemark"));

return sb.toString();
return sb;
}

@Override
Expand Down
Loading