Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bot] Fast-forward for 24.11.11 #760

Merged
merged 2 commits into from
Feb 25, 2025
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<customView xmlns="http://labkey.org/data/xml/queryCustomView">
<columns>
<column name="protocol"/>
<column name="approve"/>
<column name="Species"/>
<column name="TotalAnimals"/>
</columns>
<sorts>
<sort column="protocol"/>
</sorts>
</customView>
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ FROM(

FROM study.waterScheduledAnimals wsaouter
WHERE wsaouter.qcstate.publicdata = true AND wsaouter.condition IS NOT NULL
AND (Id.death.date IS NULL)
GROUP BY wsaouter.id
) wsa
2 changes: 1 addition & 1 deletion WNPRC_EHR/resources/queries/study/waterOrders.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ function onUpdate(helper, scriptErrors, row, oldRow){
}
console.log ("value of triggerHelper admin "+ triggerHelper.isDataAdmin());

if (!triggerHelper.isDataAdmin()){
if (!triggerHelper.isDataAdmin() && !waterOrdersAdmin){
let errorField = null;
if(oldRow){

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2457,7 +2457,7 @@ public JSONArray changeWaterScheduled(String animalId, Date startDate, String wa
//service = ti.getUpdateService();

//if(errorMap.get(animalId)!= null && !"ERROR".equals(errorMap.get(animalId).get("severity")))
if(!arrayOfErrors.isEmpty() && !"ERROR".equals(returnHighestError(arrayOfErrors)))
if(!rowToAdd.isEmpty() || (!arrayOfErrors.isEmpty() && !"ERROR".equals(returnHighestError(arrayOfErrors))))
{
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,12 @@ public WaterMonitoringAnimalWithOutEntriesNotification(Module owner)
super(owner);
}

@Override
public String getName()
{
return "Water Monitoring Animal For Vets and Lab";
}



@Override
public String getEmailSubject(Container c)
{
Expand All @@ -69,6 +68,7 @@ public String getScheduleDescription()
return "every day at 1500 and 1900";
}

@Override
public String getDescription()
{
return "The report is designed to report total amount of water animal had gotten and report if they have not gotten the required 20 mls per kilogram.";
Expand All @@ -84,13 +84,17 @@ public String getMessageBodyHTML(final Container c, User u)
Date now = new Date();
msg.append("This email contains a series of automatic alerts about the water monitoring system. It was run on: " + AbstractEHRNotification._dateFormat.format(now) + " at " + AbstractEHRNotification._timeFormat.format(now) + ".<p>");

//Check animals that did not get any water for today and the last five days.
findAnimalsWithWaterEntries(c,u,msg,numDays);

//Check animals with less than 20 mls per kilogram of water for today, it also displays the animals on Lixit at the end of the notification
findAnimalsWithEnoughWater(c,u,msg);
findAnimalsWithEnoughWater(c,u,msg, 10);

//Check animals with less than 10 mls per kilogram of water for today, it also displays the animals on Lixit at the end of the notification
findAnimalsWithEnoughWater(c,u,msg, 20);

//Get animal on lixit
animalOnLixit(c,u,msg);

//Check animals that did not get any water for today and the last five days.
findAnimalsWithWaterEntries(c,u,msg,numDays);

return msg.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public WaterMonitoringAnimalWithOutEntriesSupervisorNotification(Module owner)
{
super(owner);
}
@Override
public String getName(){return "Water Monitoring Alert for Supervisors";}

@Override
Expand All @@ -29,6 +30,7 @@ public String getScheduleDescription()
return "every day at 1500 and 1900";
}

@Override
public String getDescription()
{
return "The report is designed to report total amount of water animal had gotten and report if they have not gotten the required 20 mls per kilogram.";
Expand All @@ -44,12 +46,12 @@ public String getMessageBodyHTML(final Container c, User u)
Date now = new Date();
msg.append("This email contains a series of automatic alerts about the water monitoring system. It was run on: " + AbstractEHRNotification._dateFormat.format(now) + " at " + AbstractEHRNotification._timeFormat.format(now) + ".<p>");

//Check animals that did not get any water for today and the last five days.
findAnimalsWithWaterEntries(c,u,msg,numDays);

//Animals on water restricted protocols that are on Lixit
animalOnLixit(c,u,msg);

//Check animals that did not get any water for today and the last five days.
findAnimalsWithWaterEntries(c,u,msg,numDays);

return msg.toString();
}

Expand Down
Loading