Skip to content
Merged
5 changes: 4 additions & 1 deletion onprc_ehr/resources/queries/onprc_ehr/MedsEndDateAlert.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
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)
*/
SELECT
Id,
Expand All @@ -27,5 +30,5 @@ SELECT
category,
taskid.rowid as TaskId
FROM study.treatment_order
WHERE code NOT IN ('E-85760', 'E-Y7735', 'E-X0500', 'E-Y9750')
WHERE code NOT IN ('E-85760', 'E-Y7735', 'E-X0500', 'E-Y9750', 'E-X1380')
AND enddate is null
12 changes: 7 additions & 5 deletions onprc_ehr/resources/scripts/onprc_ehr/onprc_triggers.js
Original file line number Diff line number Diff line change
Expand Up @@ -1053,19 +1053,21 @@ 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

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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("<b>There are no meds ordered except E-85760 (Medroxyprogesterone injectable 150mg/ml) and E-Y7735 (Diet - Weekly Multivitamin) with missing end dates!</b><hr>");
msg.append("<b>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:" +
" <br>1. E-85760 (Medroxyprogesterone injectable 150mg/ml) " +
" <br>2. E-Y7735 (Diet - Weekly Multivitamin)" +
" <br>3. E-X0500 (Diet, L-Phyto (Low-phytoestrogen)) " +
" <br>4. E-Y9750 (Diet, 5047 High Protein, Jumbo) </b><hr>");
" <br>4. E-Y9750 (Diet, 5047 High Protein, Jumbo) " +
" <br>5. E-X1380 (Diet Daily (Non-standard), 5LOP (TAD)) <hr>");
}
else if (count > 0)
{
//Display the report link on the notification page
msg.append("<br><b>Meds with missing end date:</b><br><br>");
msg.append("<b>" + count + " meds found with missing end dates:</b>");
msg.append("<p><a href='" + getExecuteQueryUrl(c, "onprc_ehr", "MedsEndDateAlert", null) + "'>Click here to view the meds/diets</a></p>\n");
msg.append("<br><b>" + count + " treatment order(s) found with missing end dates</b><br><br>");
msg.append("<p><a href='" + getExecuteQueryUrl(c, "onprc_ehr", "MedsEndDateAlert", null) + "'>Click here to view the treatments</a></p>\n");
msg.append("<hr>");

//Display the report in the email
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down