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

24.3 fb notification revamps #712

Merged
merged 40 commits into from
Dec 13, 2024

Conversation

aschmidt34
Copy link
Collaborator

ClinpathRefRange.sql: Added 'units' column for Clinpath Abnormal Results Alerts Revamp query.
WNPRC_EHRModule.java: Registered 5 new notifications (3 clinpaths, large infant, & treatment).
ClinpathAbnormalResultsAlertsRevamp.java: Created new revamped notification.
ClinpathAlertsRevamp.java: Created new revamped notification.
ClinpathResultAlertsRevamp.java: Created new revamped notification.
ColonyAlertsNotificationRevamp.java: Added Kim's fix (query was retrieving the wrong info; added condition to filter to only view results where the project is still active).
LargeInfantAlertsRevamp.java: Created new revamped notification.

aschmidt34 and others added 30 commits July 11, 2024 17:46
…Assignment Status' column header to 'Unassigned' and 'Completion Status' to 'Incomplete'. I also sorted all results so Incomplete draws show up first.

- In BloodDrawReviewTriggerNotification, I made it so warnings only send when the draw has a date of today.
- In BloodDrawReviewDailyNotification, I added a check to verify that there are no upcoming blood draws that will overdraw.

- TODO: After testing this on test servers, make sure to remove test dates in BloodDrawsTodayAll and BloodDrawReviewDailyNotification.
…d log for wnprc_triggers.js for when function is run to help debug until issue with webpack generation is fixed.
…blood is updated. Logic is run inside notification to determine if current draw is an overdraw. If it is an overdraw, the message is sent.
…revamped Death Notification. This occurred when the Type of Death resulted in a fee in the table 'ehr_lookups' > 'death_cause', but the 'prepaid' field was empty in the table 'study' > 'demographics'. This was due to labkeys table lookup resulting in a string 'null' instead of a real null when using the TableSelector. My new notifications use a new query function i wrote, but this Death Notification used the old TableSelector method.
…FromAnimalID() so they use new query function getTableMultiRowMultiColumnWithFieldKeys() instead of old function getTableRowAsList(). Also moved DeathNecropsyObject and DeathDemographicObject to DeathNotificationRevamp.java.

- DeathNotificationRevamp.java: Moved DeathNecropsyObject and DeathDemographicObject here from NotificationToolkit.java.  Also cleaned up these objects and updated these them to use the new query getTableMultiRowMultiColumnWithFieldKeys.
… is to avoid hardcoding URL's per new LabKey policy. Implimented these 2 new functions in DeathNotificationRevamp.java for getting the necropsy and animal abstract URL's.
…ification check functions, and a toolkit object containing reusable test functions that are commonly used when writing different tests.

- BloodOverdrawTriggerNotification.java & BloodDrawReviewTriggerNotification.java: Added a reset function to clear the data after notification is triggered.  This is because there are null checks that don't work when artifacts are left over from previous instances.
- NotificationToolkit.java: Added null check to checkIfBloodDrawIsOverdraw() because empty data was crashing the function.
… doesn't cause a failure if there's no taskID in the row returned from the query.

- WNPRC_EHRTest.java: Added a check for death notification and prenatal death notification.
…built in labkey notification setup just doesn't send a notification if there's a null body, but for my trigger notifications where I send it manually, I should check for null.
…Marty said it was not necessary if I called the function in doSetup(), but it's not showing up in the console log anymore. Trying to re-add this.
…ate data being uploaded. Looks like labkey's loadBloodBilledByLookup() already uploads the same values.
…ferences my functions that use QviewObject. Need to evenutally phase out all these functions as my new query functions work much better.
…sed for future notifications, and it's very tough coding this correctly in the right order. Please do not delete.
…ecommended by Binal via a LabKey ticket; it caused my test to run twice since the @test annotation already exists.
…pdateNotificationRevamp notification. Also moved call for old notification inside if/else statement so 'on/off' status is checked before sending. Will delete the old call after vefifying new version works well.

- WNPRC_EHRModule.java: Registered new EmptyNotificationRevamp and AnimalRequestUpdateNotificationRevamp notifications.

- AdminAlertsNotificationRevamp.java: Updated this notification so the days of the week are displayed in the correct order.  Also fixed an error with the wrong results being queried (needed to update the filter).

- AnimalRequestNotificationRevamp.java: Added test data to be set when notification is triggered from 'Run Report in Browser'.  Also added a resetClass function.

- AnimalRequestUpdateNotificationRevamp.java:  Created this new revamped notification.

- ColonyAlertsLiteNotificationRevamp.java: Updated this notification to use the new EmptyNotificationRevamp notification.  This is sent instead of the original notification if there is no data to be sent.

- EmptyNotificationRevamp.java: Created this new revamped notification.  This is sent when certain notifications have no data to send.  This is to prevent users from receiving empty emails, but allows Daniel and I to see that the notifications are still being sent.

- NotificationToolkit.java: Added function to send the new EmptyNotificationRevamp.java notification.
… had forgotten.

- BloodDrawReviewDailyNotification.java: Added 2 extra checks requested by blood draw team.
- BloodDrawsTodayAnimalCare.java: Updated this to use the new dummy notification when there is no data to be sent.
…ifferent in dataset and form.

- ColonyAlertsNotificationRevamp.java: Added extra query requested by Kim.  This query checks all animals in the 'Assignments' dataset and returns any where the project has expired or the protocol has deactivated.
- TreatmentAlertsNotificationRevamp.java: Created new notification.
- BloodDrawsTodayAll.java: Added 'incomplete count' to the notification (as requested by blood draw team).
- BloodDrawsTodayVetStaff.java: Added functionality so message does not send when there is no data (as requested by blood draw team).
… in ClinpathAbnormalResultsAlertsRevamp.java.

WNPRC_EHRModule.java - Registered the 2 new notifications.
ClinpathAbnormalResultsAlertsRevamp.java - Created new alert.
ClinpathAlertsRevamp.java - Created new alert.
WNPRC_EHRModule.java: Registered new notification.
WNPRC_EHRModule.java: Registered new LargeInfantAlertwsRevamp notification.
…and filter.

ClinpathAlertsRevamp.java: Fixed text display.
ClinpathResultAlertsRevamp.java: Fixed filter.
ColonyAlertsNotificationRevamp.java: Added Kim's fix (there was an issue where the query retrieved inactive projects.
LargeInfantAlertsRevamp.java: Fixed text display.
@aschmidt34 aschmidt34 requested a review from csebranek December 13, 2024 21:00
Copy link

WARNING: This PR appears to have the default title generated by GitHub. Please use something more descriptive.

Copy link
Collaborator

@csebranek csebranek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@aschmidt34 aschmidt34 merged commit 5968b20 into release24.3-SNAPSHOT Dec 13, 2024
4 of 6 checks passed
@aschmidt34 aschmidt34 deleted the 24.3_fb_notificationRevamps branch December 13, 2024 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants