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
10 changes: 2 additions & 8 deletions EHR_App/test/src/org/labkey/test/tests/EHR_AppTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import static org.labkey.test.components.html.Input.Input;

Expand Down Expand Up @@ -115,12 +116,6 @@ private void doSetup() throws Exception
goToEHRFolder();
}

@Override
public BrowserType bestBrowser()
{
return BrowserType.CHROME;
}

@Override
protected String getModuleDirectory()
{
Expand Down Expand Up @@ -591,8 +586,7 @@ private void assertDemographicsNoRowsHaveStatus(ReactAnimalHistoryPage page, Str
List<String> statusValues = table.getColumnDataAsText("calculated_status");
for (String status : statusValues)
{
assertFalse("Demographics should not contain status '" + excludedStatus + "' but found it",
status.equals(excludedStatus));
assertNotEquals("Demographics should not contain status '" + excludedStatus + "' but found it", status, excludedStatus);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.labkey.ehr_compliancedb.model;

import org.jetbrains.annotations.NotNull;
import org.labkey.api.data.Container;
import org.labkey.api.exp.property.Domain;
import org.labkey.api.gwt.client.model.GWTPropertyDescriptor;
Expand Down Expand Up @@ -42,7 +43,7 @@ public String getKindName()
}

@Override
public Set<String> getReservedPropertyNames(Domain domain, User user)
public @NotNull Set<String> getReservedPropertyNames(Domain domain, User user)
{
return super.getReservedPropertyNames(domain, user);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package org.labkey.ehr_purchasing;

import org.jetbrains.annotations.NotNull;
import org.labkey.api.data.Container;
import org.labkey.api.data.ContainerManager.ContainerListener;
import org.labkey.api.data.DbScope;
Expand All @@ -25,16 +24,8 @@
import org.labkey.api.data.TableInfo;
import org.labkey.api.security.User;

import java.beans.PropertyChangeEvent;
import java.util.Collection;
import java.util.Collections;

public class EHR_PurchasingContainerListener implements ContainerListener
{
@Override
public void containerCreated(Container c, User user)
{
}

@Override
public void containerDeleted(Container c, User user)
Expand Down Expand Up @@ -68,20 +59,4 @@ public void containerDeleted(Container c, User user)
transaction.commit();
}
}

@Override
public void propertyChange(PropertyChangeEvent evt)
{
}

@Override
public void containerMoved(Container c, Container oldParent, User user)
{
}

@NotNull @Override
public Collection<String> canMove(Container c, Container newParent, User user)
{
return Collections.emptyList();
}
}
24 changes: 0 additions & 24 deletions EHR_SM/src/org/labkey/ehr_sm/EHR_SMContainerListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,18 @@

package org.labkey.ehr_sm;

import org.jetbrains.annotations.NotNull;
import org.labkey.api.data.Container;
import org.labkey.api.data.ContainerManager.ContainerListener;
import org.labkey.api.data.PropertyManager;
import org.labkey.api.security.User;
import java.util.Collections;
import java.util.Collection;

import java.beans.PropertyChangeEvent;

public class EHR_SMContainerListener implements ContainerListener
{
@Override
public void containerCreated(Container c, User user)
{
}

@Override
public void containerDeleted(Container c, User user)
{
PropertyManager.purgeObjectProperties(c);
}

@Override
public void propertyChange(PropertyChangeEvent evt)
{
}

@Override
public void containerMoved(Container c, Container oldParent, User user)
{
}

@NotNull @Override
public Collection<String> canMove(Container c, Container newParent, User user)
{
return Collections.emptyList();
}
}
3 changes: 1 addition & 2 deletions EHR_SM/src/org/labkey/ehr_sm/EHR_SMCustomizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public void customize(TableInfo tableInfo)
if (tableInfo instanceof AbstractTableInfo && props.containsKey(tableInfo.getName()))
{
customizeSamples((AbstractTableInfo) tableInfo);
return;
}
}
}
Expand Down Expand Up @@ -111,7 +110,7 @@ private void customizeSamples(AbstractTableInfo ti)

ColumnInfo receivedCol = ti.getColumn(receivedDateCol);
if (null == receivedCol)
_log.warn("Sample type " + ti.getName() + " does not have column " + receivedDateCol + " for age at sample calculation.");
_log.warn("Sample type {} does not have column {} for age at sample calculation.", ti.getName(), receivedDateCol);

TableInfo demographics = QueryService.get().getUserSchema(ti.getUserSchema().getUser(), ContainerService.get().getForPath(ehrContainerName), "study").getTable("demographics");

Expand Down
7 changes: 0 additions & 7 deletions EHR_SM/src/org/labkey/ehr_sm/EHR_SMModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package org.labkey.ehr_sm;

import org.jetbrains.annotations.NotNull;
import org.labkey.api.data.Container;
import org.labkey.api.data.ContainerManager;
import org.labkey.api.module.CodeOnlyModule;
import org.labkey.api.module.ModuleContext;
Expand Down Expand Up @@ -56,10 +55,4 @@ public void doStartup(ModuleContext moduleContext)
ContainerManager.addContainerListener(new EHR_SMContainerListener());
}

@Override
@NotNull
public Collection<String> getSummary(Container c)
{
return Collections.emptyList();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private void appendVLCol(AbstractTableInfo ti, ColumnInfo subjectCol, ColumnInfo
List<ExpProtocol> protocols = AssayService.get().getAssayProtocols(target, ap);
if (protocols.size() == 1)
{
AssayProtocolSchema schema = ap.createProtocolSchema(ti.getUserSchema().getUser(), target, protocols.get(0), null);
AssayProtocolSchema schema = ap.createProtocolSchema(ti.getUserSchema().getUser(), target, protocols.getFirst(), null);
if (schema == null)
{
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ public String getName()
return 12.28;
}

@Override
public boolean hasScripts()
{
return true;
}

@Override
@NotNull
protected Collection<WebPartFactory> createWebPartFactories()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,7 @@ protected List<Map<String, Object>> processRowsFromFile(List<Map<String, Object>

if (TYPE.Standard.equals(category))
{
if (map.get("sampleVol") == null)
map.put("sampleVol", 1);
map.putIfAbsent("sampleVol", 1);

if (!(map.get(QUANTITY_FIELD) instanceof Double))
{
Expand All @@ -396,13 +395,8 @@ protected List<Map<String, Object>> processRowsFromFile(List<Map<String, Object>
}
else if (TYPE.NEG_CTL.equals(category))
{
if (map.get("sampleVol") == null)
map.put("sampleVol", 1);
map.putIfAbsent("sampleVol", 1);

if (map.get("cp") != null)
{
map.put("qcflag", "NTC had a value for CT");
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, why is this getting deleted?

}

for (String field : new String[]{"sampleVol", "volPerRxn", "eluateVol"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,7 @@ protected List<Map<String, Object>> processRowsFromFile(List<Map<String, Object>
if (map.get("well") != null) {
map.put("well", ((String) map.get("well")).toUpperCase());
}
if (map.get("sampleType") == null) {
map.put("sampleType", "vRNA");
}
map.putIfAbsent("sampleType", "vRNA");

if (!mergeTemplateRow(keyProperty, templateRows, map, context)) {
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ public JSONObject getMetadata(ViewContext ctx, ExpProtocol protocol)
return meta;
}

@Override
public boolean supportsRunTemplates()
{
return false;
}

protected enum Category {
STD(){
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package org.labkey.viral_load_assay.assay;

import org.json.JSONObject;
import org.jetbrains.annotations.NotNull;
import org.labkey.api.data.Container;
import org.labkey.api.data.ContainerManager;
import org.labkey.api.laboratory.NavItem;
Expand Down Expand Up @@ -119,7 +120,7 @@ public List<NavItem> getSettingsItems(Container c, User u)
}

@Override
public Set<ClientDependency> getClientDependencies()
public @NotNull Set<ClientDependency> getClientDependencies()
{
LinkedHashSet<ClientDependency> resources = new LinkedHashSet<>();
resources.add(ClientDependency.fromPath("Viral_Load_Assay/vl_utils.js"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ private void ensureABI7500Records() throws CommandException, IOException
else
{
log("ABI7500 already exists, no action needed");
Map<String, Object> row = resp.getRows().get(0);
Map<String, Object> row = resp.getRows().getFirst();
DETECTOR_NAME = (String)row.get("detector");
}
}
Expand Down Expand Up @@ -1050,11 +1050,4 @@ protected List<String> getEnabledModules()
modules.add("Viral_Load_Assay");
return modules;
}

@Override
public void checkViews()
{
//the module contains an R report tied to a specific assay name, so view check fails when an assay of that name isnt present
//when module-based assays can supply reports this should be corrected
}
}
18 changes: 9 additions & 9 deletions ehr/api-src/org/labkey/api/ehr/SharedEHRUpgradeCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ else if (methodName.startsWith(IMPORT_DOMAIN_TEMPLATE))
}
else
{
LOG.error("Domain template '" + domainGroup + "' not found for module '" + moduleName + "'");
LOG.error("Domain template '{}' not found for module '{}'", domainGroup, moduleName);
}
}
}
Expand All @@ -204,18 +204,18 @@ public void moduleStartupComplete(ServletContext servletContext)
Container container = EHRService.get().getEHRStudyContainer(ContainerManager.getRoot());
if (container == null)
{
LOG.warn("No EHR study container. Unable to perform upgrade steps for " + _module.getName());
LOG.warn("No EHR study container. Unable to perform upgrade steps for {}", _module.getName());
return;
}
if (!container.getActiveModules().contains(_module))
{
LOG.warn("EHR container does not have module " + _module.getName() + " enabled. Skipping upgrade work.");
LOG.warn("EHR container does not have module {} enabled. Skipping upgrade work.", _module.getName());
}

User user = EHRService.get().getEHRUser(ContainerManager.getRoot());
if (user == null || !user.isActive())
{
LOG.warn("No EHR admin user. Unable to perform upgrade steps for " + _module.getName());
LOG.warn("No EHR admin user. Unable to perform upgrade steps for {}", _module.getName());
return;
}

Expand All @@ -232,7 +232,7 @@ public void moduleStartupComplete(ServletContext servletContext)
}
else
{
LOG.warn("Unable to find container for path " + tsvImport._containerPath + ". Importing into EHR study container.");
LOG.warn("Unable to find container for path {}. Importing into EHR study container.", tsvImport._containerPath);
importFile(tsvImport, container, user);
}
}
Expand Down Expand Up @@ -260,12 +260,12 @@ public void moduleStartupComplete(ServletContext servletContext)
Pair<Long, String> result = DataIntegrationService.get().truncateTargets(container, user, etlInfo.getKey());
if (result.second != null)
{
LOG.error("Failed to truncate ETL " + etlInfo.getKey() + ", continuing without queuing a run. Details: " + result.second);
LOG.error("Failed to truncate ETL {}, continuing without queuing a run. Details: {}", etlInfo.getKey(), result.second);
continue;
}
if (!DataIntegrationService.get().resetTransformState(container, user, etlInfo.getKey()))
{
LOG.info("No saved state for " + etlInfo.getKey() + " found for reset, starting ETL.");
LOG.info("No saved state for {} found for reset, starting ETL.", etlInfo.getKey());
}
}
}
Expand All @@ -279,7 +279,7 @@ public void moduleStartupComplete(ServletContext servletContext)
}
catch(PipelineJobException | ConfigurationException e)
{
LOG.error("Failed to launch ETL " + etlInfo.getKey(), e);
LOG.error("Failed to launch ETL {}", etlInfo.getKey(), e);
}
}
}
Expand Down Expand Up @@ -311,7 +311,7 @@ private void importFile(TsvImport tsvImport, Container container, User user) thr
throw new IllegalArgumentException("No query update service for " + tsvImport._schemaName + "." + tsvImport._queryName);
}

LOG.info("Importing " + tsvImport._tsvPath + " to " + tsvImport._schemaName + "." + tsvImport._queryName);
LOG.info("Importing {} to {}.{}", tsvImport._tsvPath, tsvImport._schemaName, tsvImport._queryName);

// Delete the current rows
updateService.truncateRows(user, container, null, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected String getJsHandler(TableInfo ti)
String pkColName = null;
if (ti.getPkColumnNames() != null && ti.getPkColumnNames().size() == 1)
{
pkColName = ti.getPkColumnNames().get(0);
pkColName = ti.getPkColumnNames().getFirst();
}

return "EHR.window.MarkCompletedWindow.buttonHandler(dataRegionName, " + PageFlowUtil.jsString(_schemaName) + ", " + PageFlowUtil.jsString(_queryName) + ", " + PageFlowUtil.jsString(xtype) + ", " + PageFlowUtil.jsString(pkColName) + ");";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public Set<TableInfo> getTables(DataEntryFormContext ctx)
TableInfo ti = ctx.getTable(pair.first, pair.second);
if (ti == null)
{
_log.error("Unable to create table: " + pair.first + "." + pair.second);
_log.error("Unable to create table: {}.{}", pair.first, pair.second);
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public List<String> getTbarMoreActionButtons()
defaultButtons.add("REPEAT_SELECTED");

if (!_isRequest)
defaultButtons.add(0, "ADDBLOODDRAWS");
defaultButtons.addFirst("ADDBLOODDRAWS");

defaultButtons.add("BULK_ADD_BLOOD");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public DataEntryForm createForm(DataEntryFormContext ctx)
}
catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e)
{
_log.error("Unable to create form: " + _clazz.getName(), e);
_log.error("Unable to create form: {}", _clazz.getName(), e);
return null;
}
}
Expand Down
Loading
Loading