diff --git a/luminex/src/org/labkey/luminex/LuminexModule.java b/luminex/src/org/labkey/luminex/LuminexModule.java index a8979f7ab..3c06ab3e8 100644 --- a/luminex/src/org/labkey/luminex/LuminexModule.java +++ b/luminex/src/org/labkey/luminex/LuminexModule.java @@ -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; @@ -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 diff --git a/luminex/webapp/luminex/LeveyJenningsTrackingDataPanel.js b/luminex/webapp/luminex/LeveyJenningsTrackingDataPanel.js index a67cc0644..9e4942721 100644 --- a/luminex/webapp/luminex/LeveyJenningsTrackingDataPanel.js +++ b/luminex/webapp/luminex/LeveyJenningsTrackingDataPanel.js @@ -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, diff --git a/luminex/webapp/luminex/LeveyJenningsTrendPlotPanel.js b/luminex/webapp/luminex/LeveyJenningsTrendPlotPanel.js index 70b519b9c..6d47c1eb7 100644 --- a/luminex/webapp/luminex/LeveyJenningsTrendPlotPanel.js +++ b/luminex/webapp/luminex/LeveyJenningsTrendPlotPanel.js @@ -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 @@ -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;