From 6e31825e3ea15399521ac449b1eea8b88c96e991 Mon Sep 17 00:00:00 2001 From: Lakshmi Kolli <69940873+kollil@users.noreply.github.com> Date: Mon, 18 Dec 2023 15:52:01 -0800 Subject: [PATCH] Removing this validation check from the "Meds Given" data entry panel as some forms like BSU exam entry doesn't need amount_units (#874) --- .../scripts/onprc_ehr/onprc_triggers.js | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/onprc_ehr/resources/scripts/onprc_ehr/onprc_triggers.js b/onprc_ehr/resources/scripts/onprc_ehr/onprc_triggers.js index 719a555f5..a9655f453 100644 --- a/onprc_ehr/resources/scripts/onprc_ehr/onprc_triggers.js +++ b/onprc_ehr/resources/scripts/onprc_ehr/onprc_triggers.js @@ -1044,20 +1044,24 @@ exports.init = function(EHR){ } } - /* Added by Kollil, 11/17/2023. Tkt #10159 - Added extra validation: 1. If volume is not null, must enter vol units - 2. If amount is not null, must enter amount units - */ - if (!row.vol_units) { - if (row.volume) { - EHR.Server.Utils.addError(scriptErrors, 'vol_units', 'Must enter Vol Units if Volume is entered', 'WARN'); - } - } - if (!row.amount_units ) { - if (row.amount) { - EHR.Server.Utils.addError(scriptErrors, 'amount_units', 'Must enter Amount Units if Amount is entered', 'WARN'); - } - } + + // Removing this validation check from the "Meds Given" data entry panel as some forms like BSU exam entry doesn't need amount_units + // Please refer to the tkt # 10285 + + // /* Added by Kollil, 11/17/2023. Tkt #10159 + // Added extra validation: 1. If volume is not null, must enter vol units + // 2. If amount is not null, must enter amount units + // */ + // if (!row.vol_units) { + // if (row.volume) { + // EHR.Server.Utils.addError(scriptErrors, 'vol_units', 'Must enter Vol Units if Volume is entered', 'WARN'); + // } + // } + // if (!row.amount_units ) { + // if (row.amount) { + // EHR.Server.Utils.addError(scriptErrors, 'amount_units', 'Must enter Amount Units if Amount is entered', 'WARN'); + // } + // } if (row.frequency){ if (!triggerHelper.isTreatmentFrequencyActive(row.frequency)){