Skip to content

Commit a8f66cd

Browse files
Ohsudevblasar
andauthored
25.11 fb clinpath panic notifications (#1680)
* Created a new Clinpath Chemistry email notification to alert lab values that contains "Panic value" entries * Modified program to allow immediate notifcation when Panic entries were made onto the Chemistry lab results. * Modified Clinpath notification to include one set of recipeints. * Created clinpath notification for Chemistry results that shows "Panic values". * Created clinpath notification for Chemistry results that shows "Panic values". * Created clinpath notification for Chemistry results that shows "Panic values". * Modified program implement Chemistry email notifications. * Modified program implement Chemistry email notifications. * Modified program implement Chemistry email notifications. * Modified Chemistry Results to flag Panic values. * Created a email notification for Chemistry entries that shows a "qualresutl" values that contain string called"panic"/ * Created a email notification for Chemistry entries that shows a "qualresutl" values that contain string called"panic"/ * Created a email notification for Chemistry entries that shows a "qualresutl" values that contain string called"panic"/ * Created a email notification for Chemistry entries that shows a "qualresutl" values that contain string called"panic"/ * Created a email notification for Chemistry entries that shows a "qualresutl" values that contain string called"panic"/ * Created a email notification for Chemistry entries that shows a "qualresutl" values that contain string called"panic"/ * Created a email notification for Chemistry entries that shows a "qualresutl" values that contain string called"panic"/ * Created Clinpath email notification * Modified Clinpath panic value notifications. * Modified Clinpath panic value notifications. * Modified Clinpath panic value notification to include task ids. * Modified clinpath email notification vet name. * Modified Clinpath email notification process. * Modified Email notification to send email per "Panic values". * Modified Email notification to send email per "Panic values". * Modified Email notification to send email per "Panic values". * Modified Chemistry panels to read "critical values" instead of "Panic values" * Modified Clinpath Chemistry "Alert value" email notification program. --------- Co-authored-by: blasar <blasar@ohsu.eddu>
1 parent 9e3c686 commit a8f66cd

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

onprc_ehr/resources/queries/onprc_ehr/ChemistryPanicNotification.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ select a.Id,
1414
from study.ClinpathRuns a, study.chemistryResults b
1515
Where a.objectid = b.runid
1616
And a.type = 'biochemistry'
17-
And b.qualresult like '%panic%'
17+
And b.qualresult like '%alert%'
18+
1819
And a.qcstate = 18
1920
And b.qcstate = 18

onprc_ehr/resources/scripts/onprc_ehr/onprc_triggers.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,8 +1381,10 @@ exports.init = function(EHR){
13811381
// Added: 10-6-2025
13821382
EHR.Server.TriggerManager.registerHandlerForQuery(EHR.Server.TriggerManager.Events.AFTER_UPSERT, 'study', 'chemistryResults', function (helper, scriptErrors, row, oldRow) {
13831383

1384-
if (row.Id && row.qualresult && row.qualresult.indexOf('panic') !== -1) {
1385-
console.log("panic values: " + row.qualresult);
1384+
1385+
if (row.Id && row.qualresult && row.qualresult.indexOf('alert') !== -1) {
1386+
1387+
console.log("alert values: " + row.qualresult);
13861388
triggerHelper.sendClinpathPanicEmail(row.Id, row.runid, row.objectid);
13871389
}
13881390
});

onprc_ehr/src/org/labkey/onprc_ehr/query/ONPRC_EHRTriggerHelper.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2640,7 +2640,8 @@ public void exec(ResultSet object) throws SQLException
26402640

26412641
public void sendClinpathPanicEmail(String id, String runid, String objectid)
26422642
{
2643-
String subject = "Chemistry Results with Panic values";
2643+
String subject = "Chemistry Results with alert values";
2644+
26442645
Container c = getContainer();
26452646

26462647

@@ -2671,7 +2672,7 @@ public void sendClinpathPanicEmail(String id, String runid, String objectid)
26712672

26722673
if (ts.getRowCount() == 0)
26732674
{
2674-
html.append("There are no Chemistry Panlc Values to display");
2675+
html.append("There are no Chemistry Alert Values to display");
26752676

26762677
return;
26772678
}

0 commit comments

Comments
 (0)