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
7 changes: 7 additions & 0 deletions luminex/src/org/labkey/luminex/LuminexModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.labkey.api.exp.property.PropertyService;
import org.labkey.api.module.DefaultModule;
import org.labkey.api.module.ModuleContext;
import org.labkey.api.module.ModuleProperty;
import org.labkey.api.view.WebPartFactory;
import org.labkey.luminex.query.LuminexProtocolSchema;

Expand Down Expand Up @@ -84,6 +85,12 @@ public void doStartup(ModuleContext moduleContext)
PropertyService.get().registerDomainKind(new LuminexDataDomainKind());

AssayFlagHandler.registerHandler(AssayService.get().getProvider(LuminexAssayProvider.NAME), new AssayDefaultFlagHandler());

ModuleProperty leveyJenningsMinDateProp = new ModuleProperty(this, "leveyJenningsMinDate");
leveyJenningsMinDateProp.setLabel("Levey-Jennings Report Min Date Filter");
leveyJenningsMinDateProp.setDescription("If provided, the minimum acquisition date to use as a filter for the Luminex Levey-Jennings report data");
leveyJenningsMinDateProp.setInputType(ModuleProperty.InputType.text);
addModuleProperty(leveyJenningsMinDateProp);
}

@Override
Expand Down
5 changes: 5 additions & 0 deletions luminex/webapp/luminex/LeveyJenningsTrackingDataPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ LABKEY.LeveyJenningsTrackingDataPanel = Ext.extend(Ext.Component, {
filters.push(LABKEY.Filter.create('Titration/IncludeInQcReport', true));
}

var minDateProp = LABKEY.getModuleContext("luminex")?.leveyJenningsMinDate;
if (minDateProp) {
filters.push(LABKEY.Filter.create('Analyte/Data/AcquisitionDate', minDateProp, LABKEY.Filter.Types.GTE));
}

var buttonBarItems = [
LABKEY.QueryWebPart.standardButtons.views,
LABKEY.QueryWebPart.standardButtons.exportRows,
Expand Down
21 changes: 15 additions & 6 deletions luminex/webapp/luminex/LeveyJenningsTrendPlotPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,9 @@ LABKEY.LeveyJenningsTrendPlotPanel = Ext.extend(Ext.FormPanel, {
});
this.items.push(this.trendTabPanel);

this.fbar = [
{xtype: 'label', text: 'The default plot is showing the most recent ' + this.defaultRowSize + ' data points.'},
];
this.fbar = [];

LABKEY.LeveyJenningsTrendPlotPanel.superclass.initComponent.call(this);

this.fbar.hide();
},

// function called by the JSP when the graph params are selected and the "Apply" button is clicked
Expand Down Expand Up @@ -193,10 +189,23 @@ LABKEY.LeveyJenningsTrendPlotPanel = Ext.extend(Ext.FormPanel, {
}

this.plotDataLoadComplete = true;
this.fbar.setVisible(!hasReportFilter && this.trendDataStore.getTotalCount() >= this.defaultRowSize);

this.fbar.removeAll();
if (!hasReportFilter && this.trendDataStore.getTotalCount() >= this.defaultRowSize) {
this.fbar.add({xtype: 'label', text: 'The default plot is showing the most recent ' + this.defaultRowSize + ' data points.'});
}
if (this.getMinDateModuleProp()) {
this.fbar.add({xtype: 'label', text: 'Filtering for acquisition date greater than or equal to ' + this.getMinDateModuleProp() + '.'});
}
this.fbar.doLayout();

this.updateTrendPlot();
},

getMinDateModuleProp: function() {
return LABKEY.getModuleContext("luminex")?.leveyJenningsMinDate;
},

setTrendPlotLoading: function() {
this.plotDataLoadComplete = false;
var plotType = this.trendTabPanel.getActiveTab().itemId;
Expand Down