diff --git a/onprc_ehr/resources/scripts/onprc_ehr/onprc_triggers.js b/onprc_ehr/resources/scripts/onprc_ehr/onprc_triggers.js
index d6f8da6ac..6a96e4701 100644
--- a/onprc_ehr/resources/scripts/onprc_ehr/onprc_triggers.js
+++ b/onprc_ehr/resources/scripts/onprc_ehr/onprc_triggers.js
@@ -1053,7 +1053,7 @@ exports.init = function(EHR){
}
//Added by Kollil, 8/1/24
- /* User can bypass the enddate for these two medications, as per ticket #11016
+ /* User can bypass the enddate for the following meddications, as per ticket #11016
Validation code on the Prime side to bypass the following two medications without entering the end dates.
1. E-85760 - Medroxyprogesterone injectable (150mg/ml)
2. E-Y7735 - Diet - Weekly Multivitamin
@@ -1061,11 +1061,13 @@ exports.init = function(EHR){
Added these two Diets to the list by Kollil on 4/15/25. Refer to tkt #12363
3. E-X0500 - Diet, L-Phyto (Low-phytoestrogen)
4. E-Y9750 - Diet, 5047 High Protein, Jumbo
+
+ Added Diet to the list by Kollil on 5/14/25. Refer to tkt #12506
+ 5. E-X1380 - Diet Daily (Non-standard), 5LOP (TAD)
*/
- if (row.code != 'E-85760' && row.code != 'E-Y7735' && row.code != 'E-X0500' && row.code != 'E-Y9750'){
- if (!row.enddate) {
- EHR.Server.Utils.addError(scriptErrors, 'enddate', 'Must enter enddate', 'WARN');
- }
+ if (row.code != 'E-85760' && row.code != 'E-Y7735' && row.code != 'E-X0500' &&
+ row.code != 'E-Y9750' && row.code != 'E-X1380' && !row.enddate) {
+ EHR.Server.Utils.addError(scriptErrors, 'enddate', 'Must enter enddate', 'WARN');
}
//Added by Kollil, 9/15/25
diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/NHPTrainingFormType.java b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/NHPTrainingFormType.java
index 54bd16e60..8faf1cba8 100644
--- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/NHPTrainingFormType.java
+++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/NHPTrainingFormType.java
@@ -21,7 +21,11 @@
import org.labkey.api.ehr.dataentry.TaskFormSection;
import org.labkey.api.ehr.security.EHRBehaviorEntryPermission;
import org.labkey.api.module.Module;
+import org.labkey.api.security.Group;
+import org.labkey.api.security.GroupManager;
+import org.labkey.api.security.permissions.AdminPermission;
import org.labkey.api.view.template.ClientDependency;
+import org.labkey.security.xml.GroupEnumType;
import java.util.Arrays;
diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/PairingFormType.java b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/PairingFormType.java
index 19b877428..abf1da752 100644
--- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/PairingFormType.java
+++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/PairingFormType.java
@@ -66,19 +66,7 @@ public PairingFormType(DataEntryFormContext ctx, Module owner)
addClientDependency(ClientDependency.supplierFromPath("/onprc_ehr/form/field/PairedAdultsEntryField.js"));
-
-
-
-
-
}
- @Override
- protected boolean canInsert()
- {
- if (!getCtx().getContainer().hasPermission(getCtx().getUser(), EHRBehaviorEntryPermission.class))
- return false;
- return super.canInsert();
- }
}
diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/notification/AdminNotifications.java b/onprc_ehr/src/org/labkey/onprc_ehr/notification/AdminNotifications.java
index 427f50039..d9fc7fd8e 100644
--- a/onprc_ehr/src/org/labkey/onprc_ehr/notification/AdminNotifications.java
+++ b/onprc_ehr/src/org/labkey/onprc_ehr/notification/AdminNotifications.java
@@ -101,19 +101,18 @@ private void MedsEndDateAlert(Container c, User u, final StringBuilder msg, fina
TableSelector ts = new TableSelector(ti, null, new Sort("date"));
long count = ts.getRowCount();
if (count == 0) {
- //msg.append("There are no meds ordered except E-85760 (Medroxyprogesterone injectable 150mg/ml) and E-Y7735 (Diet - Weekly Multivitamin) with missing end dates!
");
- msg.append("No medication orders found with missing end date except the following approved list:" +
+ msg.append("No treatment orders found with missing end date except the following approved list:" +
"
1. E-85760 (Medroxyprogesterone injectable 150mg/ml) " +
"
2. E-Y7735 (Diet - Weekly Multivitamin)" +
"
3. E-X0500 (Diet, L-Phyto (Low-phytoestrogen)) " +
- "
4. E-Y9750 (Diet, 5047 High Protein, Jumbo)
");
+ "
4. E-Y9750 (Diet, 5047 High Protein, Jumbo) " +
+ "
5. E-X1380 (Diet Daily (Non-standard), 5LOP (TAD))
");
}
else if (count > 0)
{
//Display the report link on the notification page
- msg.append("
Meds with missing end date:
");
- msg.append("" + count + " meds found with missing end dates:");
- msg.append("Click here to view the meds/diets
\n");
+ msg.append("
" + count + " treatment order(s) found with missing end dates
");
+ msg.append("Click here to view the treatments
\n");
msg.append("
");
//Display the report in the email
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 0a40e50fa..8a5363df3 100644
--- a/onprc_ehr/src/org/labkey/onprc_ehr/notification/ColonyAlertsNotification.java
+++ b/onprc_ehr/src/org/labkey/onprc_ehr/notification/ColonyAlertsNotification.java
@@ -1551,7 +1551,7 @@ else if (rs.getString("ActiveClinicalTreatment") != null && rs.getString("Active
protected void LongTermMedsAlert(final Container c, User u, final StringBuilder msg)
{
if (QueryService.get().getUserSchema(u, c, "onprc_ehr") == null) {
- msg.append("Warning: The study schema has not been enabled in this folder, so the alert cannot run!
");
+ msg.append("Warning: The onprc_ehr schema has not been enabled in this folder, so the alert cannot run!
");
return;
}
@@ -2333,6 +2333,33 @@ protected void duplicateFlags(Container c, User u, final StringBuilder msg)
}
}
+ /**
+ * Created by Kollil, 10/25
+ * Get a list of tasks daily on a rolling 7 day window to review for QC.
+ * This will allow techs to see what new IDs were created by whom, and review for accuracy,
+ * housing history, group ids and flags.
+ * Refer tkt # 13504
+ */
+ protected void newBirthTasks(final Container c, User u, final StringBuilder msg)
+ {
+ if (QueryService.get().getUserSchema(u, c, "onprc_ehr") == null) {
+ msg.append("Warning: The onprc_ehr schema has not been enabled in this folder, so the alert cannot run!
");
+ return;
+ }
+
+ //Get birth tasks
+ TableInfo ti = QueryService.get().getUserSchema(u, c, "onprc_ehr").getTable("NewBirthTasks", ContainerFilter.Type.AllFolders.create(c, u));
+ TableSelector ts = new TableSelector(ti, null, null);
+ long count = ts.getRowCount();
+
+ if (count > 0) {
+ msg.append("WARNING: There are " + count + " new birth(s) found in last 7 days.
");
+ msg.append("Click here to view them
\n");
+ msg.append("
");
+ }
+
+ }
+
/**
* Created by Kollil, 9/6/23
* Get the new animals found with the flag, "NHPR NOTE: BCG Vaccinated".
diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/notification/DataValidationNotification.java b/onprc_ehr/src/org/labkey/onprc_ehr/notification/DataValidationNotification.java
index 79b34ea4c..6e5cda088 100644
--- a/onprc_ehr/src/org/labkey/onprc_ehr/notification/DataValidationNotification.java
+++ b/onprc_ehr/src/org/labkey/onprc_ehr/notification/DataValidationNotification.java
@@ -48,19 +48,19 @@ public String getEmailSubject(Container c)
@Override
public String getCronString()
{
- return "0 25 6 * * ?";
+ return "0 50 6/15 * * ?";
}
@Override
public String getScheduleDescription()
{
- return "every day at 6:25AM";
+ return "every day at 6:50AM and 3:50PM";
}
@Override
public String getDescription()
{
- return "The report is designed to identify potential problems with the EHR data. It is similar to Colony Alerts, except it is limited to alerts that indicate a true problem in the data itself.";
+ return "The report identifies potential problems with the EHR data. Although similar to Colony Alerts, it is limited to problems in the data itself.";
}
@Override
@@ -112,11 +112,14 @@ public String getMessageBodyHTML(Container c, User u)
birthRecordsNotMatchingHousing(c, u, msg);
duplicateGroupMembership(c, u, msg);
duplicateFlags(c, u, msg);
+ //Added by Kolli, Oct 2025
+ //Tasks list alert for the new animal births, Refer to # 13504
+ newBirthTasks(c, u, msg);
//only send if there are alerts
if (!msg.isEmpty())
{
- msg.insert(0, "This email contains a series of automatic alerts designed to identify problems in the EHR data. It was run on: " + getDateFormat(c).format(now) + " at " + _timeFormat.format(now) + ".");
+ msg.insert(0, "This email contains a series of automatic alerts identifying problems in the EHR data. It was run on: " + getDateFormat(c).format(now) + " at " + _timeFormat.format(now) + ".
");
}
return msg.toString();
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 e1313a66f..bdf812dd0 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
@@ -1073,7 +1073,6 @@ public void testExamEntry() throws Exception
Assert.assertEquals("mg/kg", ordersGrid.getFieldValue(3, "dosage_units"));
//note: amount calculation testing handled in surgery test
-
//blood draws
waitAndClick(Ext4Helper.Locators.ext4Tab("Blood Draws"));
Ext4GridRef bloodGrid = _helper.getExt4GridForFormSection("Blood Draws");