toShow = new LinkedHashSet<>();
- toShow.addAll(Arrays.asList(_fields));
- toShow.retainAll(foundCols);
-
- //now build the table itself
- msg.append("| Project | Alias | OGA Project | Category | ");
- for (FieldDescriptor fd : toShow)
- {
- msg.append("" + fd.getLabel() + " | ");
- }
- msg.append("
");
-
- //and append rows
- for (String key : newDataMap.keySet())
- {
- String[] tokens = key.split("<>");
- Map> dataByCategory = newDataMap.get(key);
- for (String category : dataByCategory.keySet())
- {
- Map totals = dataByCategory.get(category);
-
- String baseUrl = getExecuteQueryUrl(containerMap.get(category), ONPRC_BillingSchema.NAME, categoryToQuery.get(category), null) + "&query.param.StartDate=" + getDateFormat(c).format(start.getTime()) + "&query.param.EndDate=" + getDateFormat(c).format(endDate.getTime());
- String projUrl = baseUrl + ("None".equals(tokens[0]) ? "&query.project/displayName~isblank" : "&query.project/displayName~eq=" + tokens[0]);
- msg.append("| " + tokens[0] + " | ");
-
- //alias
- String accountUrl = null;
- Container financeContainer = ONPRC_BillingManager.get().getBillingContainer(containerMap.get(category));
- if (financeContainer != null && !"Unknown".equals((tokens[1])))
- {
- accountUrl = getExecuteQueryUrl(financeContainer, ONPRC_BillingSchema.NAME, "aliases", null, null) + "&query.alias~eq=" + tokens[1];
- }
-
- if (accountUrl != null)
- {
- msg.append("" + tokens[1] + " | ");
- }
- else
- {
- msg.append("" + (tokens[1]) + " | ");
- }
-
- msg.append("" + (tokens[2]) + " | ");
- msg.append("" + category + " | ");
-
- for (FieldDescriptor fd : toShow)
- {
- if (totals.containsKey(fd.getFieldName()))
- {
- String url = projUrl + fd.getFilter();
- msg.append("" + totals.get(fd.getFieldName()) + " | ");
- }
- else
- {
- msg.append(" | ");
- }
- }
-
- msg.append("
");
- }
- }
-
- msg.append("
");
- msg.append("
");
- }
-}
diff --git a/onprc_billing/src/org/labkey/onprc_billing/notification/FinanceNotification.java b/onprc_billing/src/org/labkey/onprc_billing/notification/FinanceNotification.java
index 5fa82ec32..daa3d5a5b 100644
--- a/onprc_billing/src/org/labkey/onprc_billing/notification/FinanceNotification.java
+++ b/onprc_billing/src/org/labkey/onprc_billing/notification/FinanceNotification.java
@@ -39,6 +39,7 @@
import org.labkey.api.query.QueryService;
import org.labkey.api.query.UserSchema;
import org.labkey.api.security.User;
+import org.labkey.api.util.PageFlowUtil;
import org.labkey.onprc_billing.ONPRC_BillingManager;
import org.labkey.onprc_billing.ONPRC_BillingModule;
import org.labkey.onprc_billing.ONPRC_BillingSchema;
@@ -422,8 +423,8 @@ protected void writeResultTable(final StringBuilder msg, Date lastInvoiceEnd, Ca
Map totalsMap = totalsByCategory.get(category);
Container container = containerMap.get(category);
- String url = getExecuteQueryUrl(container, ONPRC_BillingSchema.NAME, categoryToQuery.get(category), null) + "&query.param.StartDate=" + getDateFormat(c).format(start.getTime()) + "&query.param.EndDate=" + getDateFormat(c).format(endDate.getTime());
- msg.append("| " + category + " | " + totalsMap.get("total") + " | " + _dollarFormat.format(totalsMap.get("totalCost")) + " |
");
+ String url = getExecuteQueryUrl(container, ONPRC_BillingSchema.NAME, categoryToQuery.get(category), null) + "&query.param.StartDate=" + PageFlowUtil.encodeURIComponent(getDateFormat(c).format(start.getTime())) + "&query.param.EndDate=" + PageFlowUtil.encodeURIComponent(getDateFormat(c).format(endDate.getTime()));
+ msg.append("| " + PageFlowUtil.filter(category) + " | " + totalsMap.get("total") + " | " + _dollarFormat.format(totalsMap.get("totalCost")) + " |
");
}
msg.append("
");
@@ -466,37 +467,37 @@ protected void writeResultTable(final StringBuilder msg, Date lastInvoiceEnd, Ca
{
Map totals = dataByCategory.get(category);
- String baseUrl = getExecuteQueryUrl(containerMap.get(category), ONPRC_BillingSchema.NAME, categoryToQuery.get(category), null) + "&query.param.StartDate=" + getDateFormat(c).format(start.getTime()) + "&query.param.EndDate=" + getDateFormat(c).format(endDate.getTime());
- String projUrl = baseUrl + ("None".equals(tokens[1]) ? "&query.project/displayName~isblank" : "&query.project/displayName~eq=" + tokens[1]);
- msg.append("| " + financialAnalyst + " | "); //the FA
- msg.append("" + tokens[1] + " | ");
+ String baseUrl = getExecuteQueryUrl(containerMap.get(category), ONPRC_BillingSchema.NAME, categoryToQuery.get(category), null) + "&query.param.StartDate=" + PageFlowUtil.encodeURIComponent(getDateFormat(c).format(start.getTime())) + "&query.param.EndDate=" + PageFlowUtil.encodeURIComponent(getDateFormat(c).format(endDate.getTime()));
+ String projUrl = baseUrl + ("None".equals(tokens[1]) ? "&query.project/displayName~isblank" : "&query.project/displayName~eq=" + PageFlowUtil.encodeURIComponent(tokens[1]));
+ msg.append("
| " + PageFlowUtil.filter(financialAnalyst) + " | "); //the FA
+ msg.append("" + PageFlowUtil.filter(tokens[1]) + " | ");
//alias
String accountUrl = null;
Container financeContainer = ONPRC_BillingManager.get().getBillingContainer(containerMap.get(category));
if (financeContainer != null && !"Unknown".equals((tokens[2])))
{
- accountUrl = getExecuteQueryUrl(financeContainer, ONPRC_BillingSchema.NAME, "aliases", null, null) + "&query.alias~eq=" + tokens[2];
+ accountUrl = getExecuteQueryUrl(financeContainer, ONPRC_BillingSchema.NAME, "aliases", null, null) + "&query.alias~eq=" + PageFlowUtil.encodeURIComponent(tokens[2]);
}
if (accountUrl != null)
{
- msg.append("" + tokens[2] + " | ");
+ msg.append("" + PageFlowUtil.filter(tokens[2]) + " | ");
}
else
{
- msg.append("" + (tokens[2]) + " | ");
+ msg.append("" + PageFlowUtil.filter(tokens[2]) + " | ");
}
- msg.append("" + (tokens[3]) + " | ");
- msg.append("" + category + " | ");
+ msg.append("" + PageFlowUtil.filter(tokens[3]) + " | ");
+ msg.append("" + PageFlowUtil.filter(category) + " | ");
for (FieldDescriptor fd : foundCols)
{
if (totals.containsKey(fd.getFieldName()))
{
String url = projUrl + fd.getFilter();
- msg.append("" + totals.get(fd.getFieldName()) + " | ");
+ msg.append("" + totals.get(fd.getFieldName()) + " | ");
}
else
{
diff --git a/onprc_ehr/resources/queries/study/Birth/BirthSource.qview.xml b/onprc_ehr/resources/queries/study/Birth/BirthSource.qview.xml
new file mode 100644
index 000000000..cdebfc248
--- /dev/null
+++ b/onprc_ehr/resources/queries/study/Birth/BirthSource.qview.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/onprc_ehr/resources/queries/study/NHPCull.query.xml b/onprc_ehr/resources/queries/study/NHPCull.query.xml
new file mode 100644
index 000000000..944591c17
--- /dev/null
+++ b/onprc_ehr/resources/queries/study/NHPCull.query.xml
@@ -0,0 +1,10 @@
+
+
+
+
+ NHPs marked as Cull
+ NHPCull
+
+
+
+
\ No newline at end of file
diff --git a/onprc_ehr/resources/queries/study/NHPCull.sql b/onprc_ehr/resources/queries/study/NHPCull.sql
new file mode 100644
index 000000000..de594a997
--- /dev/null
+++ b/onprc_ehr/resources/queries/study/NHPCull.sql
@@ -0,0 +1,13 @@
+SELECT f.Id,
+f.date,
+f.flag,
+f.performedby,
+f.remark,
+f.taskid,
+f.description,
+f.RequestedBY,
+f.TargetEndDate,
+f.ScheduleNecropsy,
+f.history
+FROM flags f join demographics d on f.id = d.id
+where f.flag.value like '%Cull%' and d.calculated_Status = 'alive' and f.enddate is null
\ No newline at end of file
diff --git a/onprc_ehr/resources/queries/study/NHPUUL.query.xml b/onprc_ehr/resources/queries/study/NHPUUL.query.xml
new file mode 100644
index 000000000..b4fb37cd9
--- /dev/null
+++ b/onprc_ehr/resources/queries/study/NHPUUL.query.xml
@@ -0,0 +1,10 @@
+
+
+
+
+ NHPs marked as Cull
+ NHPULL
+
+
+
+
\ No newline at end of file
diff --git a/onprc_ehr/resources/queries/study/NHPUUL.sql b/onprc_ehr/resources/queries/study/NHPUUL.sql
new file mode 100644
index 000000000..88af13a9a
--- /dev/null
+++ b/onprc_ehr/resources/queries/study/NHPUUL.sql
@@ -0,0 +1,13 @@
+SELECT f.Id,
+f.date,
+f.enddate,
+f.flag,
+f.performedby,
+f.remark,
+f.taskid,
+f.description,
+f.RequestedBY,
+f.ScheduleNecropsy,
+f.history
+FROM flags f join demographics d on f.id = d.id
+where f.flag.value like '%Underutilized%' and d.calculated_status = 'alive' and f.enddate is null
\ No newline at end of file
diff --git a/onprc_ehr/resources/queries/study/clinpathRuns/Requests.qview.xml b/onprc_ehr/resources/queries/study/clinpathRuns/Requests.qview.xml
index 022367044..e8b0c0146 100644
--- a/onprc_ehr/resources/queries/study/clinpathRuns/Requests.qview.xml
+++ b/onprc_ehr/resources/queries/study/clinpathRuns/Requests.qview.xml
@@ -17,11 +17,6 @@
-
-
-
-
-
diff --git a/onprc_ehr/resources/queries/study/treatmentSchedule.query.xml b/onprc_ehr/resources/queries/study/treatmentSchedule.query.xml
index e5689ef32..751f34472 100644
--- a/onprc_ehr/resources/queries/study/treatmentSchedule.query.xml
+++ b/onprc_ehr/resources/queries/study/treatmentSchedule.query.xml
@@ -73,7 +73,7 @@
true
- true
+ false
core
qcstate
diff --git a/onprc_ehr/resources/queries/study/treatmentSchedule/.qview.xml b/onprc_ehr/resources/queries/study/treatmentSchedule/.qview.xml
index 9ef8f2ccd..95509a802 100644
--- a/onprc_ehr/resources/queries/study/treatmentSchedule/.qview.xml
+++ b/onprc_ehr/resources/queries/study/treatmentSchedule/.qview.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/onprc_ehr/resources/schemas/dbscripts/postgresql/onprc_ehr-26.002-26.003.sql b/onprc_ehr/resources/schemas/dbscripts/postgresql/onprc_ehr-26.002-26.003.sql
index 3580eee74..091659828 100644
--- a/onprc_ehr/resources/schemas/dbscripts/postgresql/onprc_ehr-26.002-26.003.sql
+++ b/onprc_ehr/resources/schemas/dbscripts/postgresql/onprc_ehr-26.002-26.003.sql
@@ -1,3 +1,6 @@
+-- Current scripts create this as a FUNCTION, but earlier versions had created a PROCEDURE by this name. Tolerate that case.
+DROP PROCEDURE IF EXISTS audit.ArchiveAuditTables;
+
CREATE OR REPLACE FUNCTION audit.ArchiveAuditTables(
INOUT RetentionMonths INT
)
diff --git a/onprc_ehr/resources/schemas/dbscripts/postgresql/onprc_ehr-26.003-26.004.sql b/onprc_ehr/resources/schemas/dbscripts/postgresql/onprc_ehr-26.003-26.004.sql
new file mode 100644
index 000000000..00fad4b96
--- /dev/null
+++ b/onprc_ehr/resources/schemas/dbscripts/postgresql/onprc_ehr-26.003-26.004.sql
@@ -0,0 +1,71 @@
+/*
+ PostgreSQL equivalent of the sqlserver onprc_ehr-26.003-26.004.sql script.
+
+ Two translation notes:
+ - SQL Server stored procedures are implemented as zero-argument plpgsql functions here, so each
+ EXEC core.fn_dropifexists '','','PROCEDURE' becomes DROP FUNCTION IF EXISTS .().
+ - The objects the sqlserver script drops out of 'dbo', and the onprc_ehr_compliancedb procedure, have no
+ PostgreSQL counterpart -- nothing on this platform ever created them. They are left as comments below,
+ in the same order as the sqlserver script, so the two files still read side by side.
+ */
+---Dropping user defined sql queries
+--- ComplianceProcedureRecenttTestsorg.sql
+---- ComplianceProcedureRecentTestsorg --> directory and xml files
+
+--- ComplianceRecenttTestsorg.sql
+---- ComplianceRecentTestsorg --> directory and xml files
+
+
+----Drop corresponding temp tables
+---- No temp tables to include here
+--Drop stored procedures
+DROP FUNCTION IF EXISTS onprc_ehr.sp_Compliance_requirementname_Update_Process();
+
+----Drop corresponding temp tables
+
+--Drop stored procedures
+DROP FUNCTION IF EXISTS onprc_ehr.s_JmacRemovalDateProcess();
+
+DROP TABLE IF EXISTS onprc_ehr.Rpt_TempJmacDate;
+
+DROP TABLE IF EXISTS onprc_ehr.JmacRemovalDate;
+
+----Drop corresponding temp tables
+ ---- No temp tables to include here
+--Drop stored procedures
+DROP FUNCTION IF EXISTS onprc_ehr.p_EnvironmentalHistoricalUpdates();
+
+----Drop corresponding temp tables
+ ---- No temp tables to include here
+--Drop stored procedures
+DROP FUNCTION IF EXISTS onprc_ehr.p_Environmental_Update_Process();
+
+--Drop stored procedures
+---- sqlserver only: dbo.sp_RpSLASummaryCensus was never created on PostgreSQL
+
+----Drop corresponding temp tables
+---- sqlserver only: dbo.Rpt_SLaCensus was never created on PostgreSQL
+
+
+--Drop stored procedures
+---- sqlserver only: dbo.RptMergeChargetypeUpdateSP was never created on PostgreSQL
+
+----Drop corresponding temp tables
+---- sqlserver only: dbo.Rpt_Labwork_MergeUpdate was never created on PostgreSQL
+---- sqlserver only: dbo.Rpt_Labwork_MergeUpdatelog was never created on PostgreSQL
+
+
+--Drop stored procedures
+DROP FUNCTION IF EXISTS onprc_ehr.s_MasterProblemHistoricalProcess();
+
+
+----Drop corresponding temp tables
+---- No temp tables to include here
+--Drop stored procedures
+---- sqlserver only: the onprc_ehr_compliancedb schema has no PostgreSQL dbscripts, so
+---- p_ComplianceTranslatestringUpdate does not exist on this platform
+
+----Drop corresponding temp tables
+DROP TABLE IF EXISTS onprc_ehr.Rpt_TempProblemList;
+
+DROP TABLE IF EXISTS onprc_ehr.Rpt_TempProblemListMaster;
diff --git a/onprc_ehr/resources/schemas/dbscripts/sqlserver/onprc_ehr-26.003-26.004.sql b/onprc_ehr/resources/schemas/dbscripts/sqlserver/onprc_ehr-26.003-26.004.sql
new file mode 100644
index 000000000..26838c022
--- /dev/null
+++ b/onprc_ehr/resources/schemas/dbscripts/sqlserver/onprc_ehr-26.003-26.004.sql
@@ -0,0 +1,82 @@
+/*
+ Created: 7-16-2026 R. Blasa Process to removed temp tables, and stored prcoedure that are no longer needed
+
+ */
+---Dropping user defined sql queries
+--- ComplianceProcedureRecenttTestsorg.sql
+---- ComplianceProcedureRecentTestsorg --> directory and xml files
+
+--- ComplianceRecenttTestsorg.sql
+---- ComplianceRecentTestsorg --> directory and xml files
+
+
+----Drop corresponding temp tables
+---- No temp tables to include here
+--Drop stored procedures
+EXEC core.fn_dropifexists 'sp_Compliance_requirementname_Update_Process','onprc_ehr','PROCEDURE';
+GO
+----Drop corresponding temp tables
+
+--Drop stored procedures
+EXEC core.fn_dropifexists 's_JmacRemovalDateProcess','onprc_ehr','PROCEDURE';
+GO
+
+EXEC core.fn_dropifexists 'Rpt_TempJmacDate','onprc_ehr','TABLE';
+GO
+
+EXEC core.fn_dropifexists 'JmacRemovalDate','onprc_ehr','TABLE';
+GO
+----Drop corresponding temp tables
+ ---- No temp tables to include here
+--Drop stored procedures
+EXEC core.fn_dropifexists 'p_EnvironmentalHistoricalUpdates','onprc_ehr','PROCEDURE';
+GO
+----Drop corresponding temp tables
+ ---- No temp tables to include here
+--Drop stored procedures
+EXEC core.fn_dropifexists 'p_Environmental_Update_Process','onprc_ehr','PROCEDURE';
+GO
+
+--Drop stored procedures
+EXEC core.fn_dropifexists 'sp_RpSLASummaryCensus','dbo','PROCEDURE';
+GO
+
+----Drop corresponding temp tables
+EXEC core.fn_dropifexists 'Rpt_SLaCensus','dbo','TABLE';
+GO
+
+
+--Drop stored procedures
+EXEC core.fn_dropifexists 'RptMergeChargetypeUpdateSP','dbo','PROCEDURE';
+GO
+
+----Drop corresponding temp tables
+EXEC core.fn_dropifexists 'Rpt_Labwork_MergeUpdate','dbo','TABLE';
+GO
+EXEC core.fn_dropifexists 'Rpt_Labwork_MergeUpdatelog','dbo','TABLE';
+GO
+
+
+--Drop stored procedures
+EXEC core.fn_dropifexists 's_MasterProblemHistoricalProcess','onprc_ehr','PROCEDURE';
+GO
+
+
+----Drop corresponding temp tables
+---- No temp tables to include here
+--Drop stored procedures
+EXEC core.fn_dropifexists 'p_ComplianceTranslatestringUpdate','onprc_ehr_compliancedb','PROCEDURE';
+GO
+
+----Drop corresponding temp tables
+EXEC core.fn_dropifexists 'Rpt_TempProblemList','onprc_ehr','TABLE';
+GO
+
+EXEC core.fn_dropifexists 'Rpt_TempProblemListMaster','onprc_ehr','TABLE';
+GO
+
+
+
+
+
+
diff --git a/onprc_ehr/resources/schemas/onprc_ehr.xml b/onprc_ehr/resources/schemas/onprc_ehr.xml
index 2e4c069f5..26e225c6f 100644
--- a/onprc_ehr/resources/schemas/onprc_ehr.xml
+++ b/onprc_ehr/resources/schemas/onprc_ehr.xml
@@ -1517,46 +1517,4 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/onprc_ehr/resources/scripts/onprc_ehr/onprc_triggers.js b/onprc_ehr/resources/scripts/onprc_ehr/onprc_triggers.js
index ff62d73b8..c5103d51b 100644
--- a/onprc_ehr/resources/scripts/onprc_ehr/onprc_triggers.js
+++ b/onprc_ehr/resources/scripts/onprc_ehr/onprc_triggers.js
@@ -1150,6 +1150,9 @@ exports.init = function(EHR){
if (!row.quantity && row.num_tubes && row.tube_vol){
row.quantity = row.num_tubes * row.tube_vol;
}
+ if (row.additionalServices == null) {
+ EHR.Server.Utils.addError(scriptErrors, 'additionalServices', 'Please select from a list of Additional Services items', 'INFO');
+ }
if (row.additionalServices) {
if (row.tube_type || row.tube_vol){
diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/EnterDataPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/EnterDataPanel.js
index a06c1c71f..d0420b20f 100644
--- a/onprc_ehr/resources/web/onprc_ehr/panel/EnterDataPanel.js
+++ b/onprc_ehr/resources/web/onprc_ehr/panel/EnterDataPanel.js
@@ -497,14 +497,9 @@ Ext4.define('onprc_ehr.panel.EnterDataPanel', {
width: 200
},{
xtype: 'ldk-linkbutton',
- text: 'Requests With Manual Results',
+ text: 'Requests',
linkCls: 'labkey-text-link',
- href: LABKEY.ActionURL.buildURL('query', 'executeQuery', null, {schemaName: 'study', 'query.queryName': 'Clinpath Runs', 'query.viewName': 'Requests', 'query.QCState/Label~startswith': 'Request:', 'query.servicerequested/chargetype~eq': 'Clinpath', 'query.mergeSyncInfo/automaticresults~eq': false})
- },{
- xtype: 'ldk-linkbutton',
- text: 'Requests With Automatic Results',
- linkCls: 'labkey-text-link',
- href: LABKEY.ActionURL.buildURL('query', 'executeQuery', null, {schemaName: 'study', 'query.queryName': 'Clinpath Runs', 'query.viewName': 'Requests', 'query.QCState/Label~startswith': 'Request:', 'query.servicerequested/chargetype~eq': 'Clinpath', 'query.mergeSyncInfo/automaticresults~eq': true})
+ href: LABKEY.ActionURL.buildURL('query', 'executeQuery', null, {schemaName: 'study', 'query.queryName': 'Clinpath Runs', 'query.viewName': 'Requests', 'query.QCState/Label~startswith': 'Request:', 'query.servicerequested/chargetype~eq': 'Clinpath'})
}]
},{
layout: 'hbox',
diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/LabworkRequestInstructionsPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/LabworkRequestInstructionsPanel.js
deleted file mode 100644
index 2b6422127..000000000
--- a/onprc_ehr/resources/web/onprc_ehr/panel/LabworkRequestInstructionsPanel.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2014-2026 LabKey Corporation
- *
- * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
- */
-Ext4.define('ONPRC_EHR.panel.RequestInstructionsPanel', {
- extend: 'Ext.panel.Panel',
- alias: 'widget.onprc-labworkrequestinstructionspanel',
-
- initComponent: function(){
- var mergeURL = LABKEY.getModuleProperty('MergeSync', 'MergeURL');
- var items;
- if (mergeURL){
- items = [{
- html: 'This form allows you to request Labwork, similar to requesting in Merge. After requesting Clinpath services through this form, this request will be created in Merge. You can print print labels through Merge.' +
- 'Click here to open Merge
' +
- 'Click here for instructions on Merge label printing',
- style: 'padding: 5px;'
- }]
- }
- else {
- items = [{
- html: 'The Merge URL has not been configured for this site',
- style: 'padding: 5px;'
- }]
- }
-
- Ext4.apply(this, {
- defaults: {
- border: false
- },
- items: items
- });
-
- this.callParent(arguments);
- }
-});
\ No newline at end of file
diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/ManageTreatmentsPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/ManageTreatmentsPanel.js
index 0f2dcbf99..7305f0d54 100644
--- a/onprc_ehr/resources/web/onprc_ehr/panel/ManageTreatmentsPanel.js
+++ b/onprc_ehr/resources/web/onprc_ehr/panel/ManageTreatmentsPanel.js
@@ -193,7 +193,8 @@ Ext4.define('onprc_ehr.panel.ManageTreatmentsPanel', {
columns: 'lsid,objectid,Id,date,enddate,project,category,remark,performedby,code,route,frequency,frequency/meaning,amountAndVolume,modifiedby/DisplayName,modified,enddateTimeCoalesced',
filterArray: [
LABKEY.Filter.create('Id', this.animalId, LABKEY.Filter.Types.EQUAL),
- LABKEY.Filter.create('enddateTimeCoalesced', xdate, LABKEY.Filter.Types.GTE)//Modified: 6-28-2018 R.Blasa
+ LABKEY.Filter.create('QCState/Label', 'Completed', LABKEY.Filter.Types.EQUAL),
+ LABKEY.Filter.create('enddateTimeCoalesced', xdate, LABKEY.Filter.Types.GTE)
],
autoLoad: true,
listeners: {
diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/ONPRC_EHRModule.java b/onprc_ehr/src/org/labkey/onprc_ehr/ONPRC_EHRModule.java
index eb1347e17..aeeeb29b8 100644
--- a/onprc_ehr/src/org/labkey/onprc_ehr/ONPRC_EHRModule.java
+++ b/onprc_ehr/src/org/labkey/onprc_ehr/ONPRC_EHRModule.java
@@ -124,7 +124,7 @@ public String getName()
@Override
public @Nullable Double getSchemaVersion()
{
- return 26.003;
+ return 26.004;
}
@Override
diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/LabworkRequestFormType.java b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/LabworkRequestFormType.java
index 06c00dc03..0ac927ec9 100644
--- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/LabworkRequestFormType.java
+++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/LabworkRequestFormType.java
@@ -39,10 +39,6 @@ public LabworkRequestFormType(DataEntryFormContext ctx, Module owner)
{
super(ctx, owner, NAME, LABEL, "Requests", Arrays.asList(
new RequestFormSection(),
-
- //Modified: 1-14-2019 R. Blasa No longer need Merge web link
-// new LabworkRequestInstructionsFormSection(),
-
new AnimalDetailsFormSection(),
new ClinpathRunsFormSection(true)
));
@@ -55,7 +51,6 @@ public LabworkRequestFormType(DataEntryFormContext ctx, Module owner)
//Added 2-8-2016 Blasa
addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/model/sources/labworkPanel.js"));
- addClientDependency(ClientDependency.supplierFromModuleName("MergeSync"));
addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/panel/LabworkRequestDataEntryPanel.js"));
setJavascriptClass("ONPRC_EHR.panel.LabworkRequestDataEntryPanel");
}
diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/LabworkRequestInstructionsFormSection.java b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/LabworkRequestInstructionsFormSection.java
deleted file mode 100644
index 9ea7343a3..000000000
--- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/LabworkRequestInstructionsFormSection.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014-2026 LabKey Corporation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.labkey.onprc_ehr.dataentry;
-
-import org.labkey.api.ehr.dataentry.AbstractFormSection;
-import org.labkey.api.ehr.dataentry.DataEntryFormContext;
-import org.labkey.api.ehr.dataentry.FormElement;
-import org.labkey.api.view.template.ClientDependency;
-
-import java.util.Collections;
-import java.util.List;
-
-/**
- * User: bimber
- * Date: 6/9/13
- * Time: 4:15 PM
- */
-public class LabworkRequestInstructionsFormSection extends AbstractFormSection
-{
- public LabworkRequestInstructionsFormSection()
- {
- super("LabworkRequestInstructions", "Instructions", "onprc-labworkrequestinstructionspanel");
-
- addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/panel/LabworkRequestInstructionsPanel.js"));
- }
-
- @Override
- protected List getFormElements(DataEntryFormContext ctx)
- {
- return Collections.emptyList();
- }
-}
diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/demographics/ActiveTreatmentsXDemographicsProvider.java b/onprc_ehr/src/org/labkey/onprc_ehr/demographics/ActiveTreatmentsXDemographicsProvider.java
index 69ff1ef68..5b50c6941 100644
--- a/onprc_ehr/src/org/labkey/onprc_ehr/demographics/ActiveTreatmentsXDemographicsProvider.java
+++ b/onprc_ehr/src/org/labkey/onprc_ehr/demographics/ActiveTreatmentsXDemographicsProvider.java
@@ -87,6 +87,8 @@ protected SimpleFilter getFilter(Collection ids)
roundedMax = DateUtils.truncate(roundedMax, Calendar.DATE);
SimpleFilter filter = super.getFilter(ids);
+ filter.addCondition(FieldKey.fromString("isActive"), true, CompareType.EQUAL);
+ filter.addCondition(FieldKey.fromString("qcstate/publicData"), true, CompareType.EQUAL);
filter.addCondition(FieldKey.fromString("enddateTimeCoalesced"),roundedMax, CompareType.GTE);
filter.addCondition(FieldKey.fromString("category"), "Husbandry", CompareType.NEQ_OR_NULL);
diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/notification/ColonyAlertsNotification.java b/onprc_ehr/src/org/labkey/onprc_ehr/notification/ColonyAlertsNotification.java
index f7fa1b57d..240451c8b 100644
--- a/onprc_ehr/src/org/labkey/onprc_ehr/notification/ColonyAlertsNotification.java
+++ b/onprc_ehr/src/org/labkey/onprc_ehr/notification/ColonyAlertsNotification.java
@@ -225,7 +225,7 @@ protected void doCandidateChecks(final Container c, User u, final StringBuilder
protected void candidatesForLongTime(final Container c, User u, final StringBuilder msg)
{
SimpleFilter filter = new SimpleFilter(FieldKey.fromString("isActive"), true, CompareType.EQUAL);
- filter.addCondition(FieldKey.fromString("daysElapsed"), 30, CompareType.GTE);
+ filter.addCondition(FieldKey.fromString("daysElapsed"), 180, CompareType.GTE);
filter.addCondition(FieldKey.fromString("flag/category"), "Assign Alias", CompareType.EQUAL);
filter.addCondition(FieldKey.fromString("flag/value"), ONPRC_EHRManager.AUC_RESERVED, CompareType.NEQ_OR_NULL);
@@ -233,7 +233,8 @@ protected void candidatesForLongTime(final Container c, User u, final StringBuil
long count = ts.getRowCount();
if (count > 0)
{
- msg.append("WARNING: There are " + count + " flags for assignment aliases/candidates that have been active for more than 30 days. This may indicate these flags should be ended.
\n");
+ //Changed the num of days by Kollil in Aug, 2026. Refer to tkt #15129
+ msg.append("WARNING: There are " + count + " flags for assignment aliases/candidates that have been active for more than 180 days. This may indicate these flags should be ended.
\n");
msg.append("Click here to view them
\n\n");
msg.append("
\n\n");
}
diff --git a/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_BillingTest.java b/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_BillingTest.java
index 484293385..55bdb0a44 100644
--- a/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_BillingTest.java
+++ b/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_BillingTest.java
@@ -128,7 +128,6 @@ public void testNotifications()
//run finance notifications
Set notifications = new HashSet<>();
- notifications.add("DCM Finance Notification");
notifications.add("Finance Notification");
beginAt(WebTestHelper.getBaseURL() + "/ldk/" + getContainerPath() + "/notificationAdmin.view");
diff --git a/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_EHRTest.java b/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_EHRTest.java
index 5d91b7b35..89a380485 100644
--- a/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_EHRTest.java
+++ b/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_EHRTest.java
@@ -22,6 +22,7 @@
import org.json.JSONObject;
import org.junit.Assert;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.labkey.remoteapi.CommandException;
@@ -558,6 +559,8 @@ public void testArrivalApi() throws Exception
}
@Test
+ // Disabled because the flakiness is blocking ONPRC work; re-enable once it is resolved.
+ @Ignore("Flaky on TeamCity: 'Force Submit' is only disabled while validation is in flight, so the 'More Actions' menu check races a fast validation pass")
public void testSubmitButtonsDisabledDuringValidation() throws Exception
{
List allIds = createTemporaryValidationAnimals(30);
diff --git a/onprc_reports/resources/queries/sequenceanalysis/MHC_Data_Unified.sql b/onprc_reports/resources/queries/sequenceanalysis/MHC_Data_Unified.sql
index 5e9794932..4b350de19 100644
--- a/onprc_reports/resources/queries/sequenceanalysis/MHC_Data_Unified.sql
+++ b/onprc_reports/resources/queries/sequenceanalysis/MHC_Data_Unified.sql
@@ -10,7 +10,8 @@ SELECT
null as shortName,
sum(t.totalTests) as totalTests,
t.result,
- GROUP_CONCAT(distinct t.assaytype) as type
+ GROUP_CONCAT(distinct t.assaytype) as type,
+ GROUP_CONCAT(distinct t.libraryType) as libraryTypes
FROM geneticscore.mhc_data t
GROUP BY t.subjectid, t.marker, t.result
diff --git a/onprc_ssu/module.properties b/onprc_ssu/module.properties
index b21928fe5..fbfea49ba 100644
--- a/onprc_ssu/module.properties
+++ b/onprc_ssu/module.properties
@@ -1,3 +1,3 @@
ModuleClass: org.labkey.onprc_ssu.ONPRC_SSUModule
-SupportedDatabases: mssql
-ManageVersion: false
+SupportedDatabases: mssql, pgsql
+ManageVersion: true
diff --git a/onprc_ssu/resources/queries/onprc_ssu/schedule.js b/onprc_ssu/resources/queries/onprc_ssu/schedule.js
index 8ad1d68aa..3aa4e6c60 100644
--- a/onprc_ssu/resources/queries/onprc_ssu/schedule.js
+++ b/onprc_ssu/resources/queries/onprc_ssu/schedule.js
@@ -6,6 +6,7 @@
var console = require("console");
var LABKEY = require("labkey");
+var ldkUtils = require("ldk/Utils").LDK.Server.Utils;
var helper = org.labkey.ldk.query.LookupValidationHelper.create(LABKEY.Security.currentContainer.id, LABKEY.Security.currentUser.id, 'onprc_ssu', 'schedule');
@@ -27,17 +28,5 @@ function beforeUpdate(row, oldRow, errors){
}
function beforeUpsert(row, errors){
- var lookupFields = ['projectName'];
- for (var i=0;i= 21 days and enter
--- the data into SLA tables
--- ==========================================================================================
-
CREATE OR REPLACE FUNCTION onprc_ehr.SLAWeaningDataTransfer()
RETURNS void
LANGUAGE plpgsql
@@ -545,16 +275,16 @@ DECLARE
_DOT2 TIMESTAMP;
_max_rowid INTEGER;
BEGIN
- --Check if any rodents age is 21 days and above and not transferred into SLA tables
+ -- Check if any rodents age is 21 days and above and not transferred into SLA tables
SELECT COUNT(*) INTO _WCount
FROM sla.weaning
WHERE numAlive > 0
AND dateofTransfer IS NULL
AND (CURRENT_DATE - CAST(date AS DATE)) >= 21;
- --Found entries, so, insert those records into SLA.purchase and SLA.purchasedetails tables
+ -- Found entries, so, insert those records into SLA.purchase and SLA.purchasedetails tables
IF _WCount > 0 THEN
- --Create a local temp table to process the weaning data.
+ -- Create a local temp table to process the weaning data.
CREATE TEMP TABLE TempWeaning (
rowid SERIAL NOT NULL,
orig_weaning_rowid INTEGER,
@@ -572,7 +302,7 @@ BEGIN
created TIMESTAMP
) ON COMMIT DROP;
- --Move the weaning entries into a temp table
+ -- Move the weaning entries into a temp table
INSERT INTO TempWeaning (orig_weaning_rowid, investigator, date, project, vendorlocation, DOB, DOM, species, sex, strain, numAlive, created)
SELECT rowid, investigator, date, project, vendorlocation, date, DOM, species,
CASE
@@ -586,18 +316,13 @@ BEGIN
AND dateofTransfer IS NULL
AND (CURRENT_DATE - CAST(date AS DATE)) >= 21;
- --Set the counter seed value and upper bound
+ -- Set the counter seed value and upper bound
SELECT MIN(rowid), MAX(rowid) INTO _counter, _max_rowid FROM TempWeaning;
+-- TODO: Hard-coded, all-caps ENTITYIDs below! These should probably be lowercased.
+
WHILE _counter <= _max_rowid
LOOP
- /* Requestorid - (Kati Marshall ) - 7B3F1ED1-4CD9-4D9A-AFF4-FE0618D49C4B
- Userid - (Kati Marshall) - 1294
- vendor - (ONPRC Weaning - SLA) - E1EE1B64-B7BE-1035-BFC4-5107380AE41E
- container - (SLA) - 4831D09C-4169-1034-BAD2-5107380A9819
- created - (onprc-is) - 1003
- */
-
SELECT dateofTransfer INTO _DOT FROM TempWeaning WHERE rowid = _counter;
IF _DOT IS NULL THEN
-- Get projectid, PI and account
@@ -607,7 +332,6 @@ BEGIN
_purchaseId := gen_random_uuid()::ENTITYID;
- -- Check if the row is already transferred into the main SLA tables. If DOT is null means the row hasn't been transferred yet.
-- Insert weaning data into sla.purchase table as a pending order
INSERT INTO sla.purchase
(project, account, requestorid, vendorid, hazardslist, dobrequired, comments, confirmationnum, housingconfirmed,
@@ -616,7 +340,7 @@ BEGIN
(_center_project, _alias, '7B3F1ED1-4CD9-4D9A-AFF4-FE0618D49C4B', 'E1EE1B64-B7BE-1035-BFC4-5107380AE41E', '', 0, '', NULL, NULL, NULL, NULL, NULL, '', _purchaseId,
'4831D09C-4169-1034-BAD2-5107380A9819', 1003, now(), NULL, NULL, '', '');
- --Insert data into purchasedetails with the newly created purchaseid above
+ -- Insert data into purchasedetails with the newly created purchaseid above
INSERT INTO sla.purchaseDetails
(purchaseid, species, age, weight, weight_units, gestation, gender, strain, room, animalsordered, animalsreceived, boxesquantity, costperanimal, shippingcost,
totalcost, housingInstructions, requestedarrivaldate, expectedarrivaldate, receiveddate, receivedby, cancelledby, datecancelled,
@@ -626,7 +350,7 @@ BEGIN
gen_random_uuid()::ENTITYID, '4831D09C-4169-1034-BAD2-5107380A9819', 1003, now(), NULL, NULL, date, vendorLocation
FROM TempWeaning WHERE rowid = _counter;
- --Update the sla.weaning row with the date of transfer date set for the transferred weaning row
+ -- Update the sla.weaning row with the date of transfer date set for the transferred weaning row
UPDATE sla.weaning
SET dateofTransfer = now()
WHERE rowid = (SELECT orig_weaning_rowid FROM TempWeaning WHERE rowid = _counter);
@@ -635,19 +359,18 @@ BEGIN
SET dateofTransfer = now()
WHERE rowid = _counter;
- --Find if there are any rows with the same center project. Then create them under the same purchaseId
- --set the new counter
+ -- Find if there are any rows with the same center project. Then create them under the same purchaseId
_counter2 := _counter + 1;
WHILE _counter2 <= _max_rowid
LOOP
SELECT dateofTransfer INTO _DOT2 FROM TempWeaning WHERE rowid = _counter2;
IF _DOT2 IS NULL THEN
- --Get projectid of the next row
+ -- Get projectid of the next row
SELECT project INTO _center_project2
FROM ehr.project
WHERE name = (SELECT project FROM TempWeaning WHERE rowid = _counter2);
- --If they are same projects, then use the the same purchaseid when creating the purchase details record
+ -- If they are same projects, then use the same purchaseid when creating the purchase details record
IF (_center_project = _center_project2) THEN
INSERT INTO sla.purchaseDetails
(purchaseid, species, age, weight, weight_units, gestation, gender, strain, room, animalsordered, animalsreceived, boxesquantity, costperanimal, shippingcost,