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 1/3] 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)){ From b2461b81d77e6ee8e5c2984d5f27cb7da2860689 Mon Sep 17 00:00:00 2001 From: Lakshmi Kolli <69940873+kollil@users.noreply.github.com> Date: Mon, 18 Dec 2023 23:21:52 -0800 Subject: [PATCH 2/3] BSU validation take#2 (#875) * Added defaults js file to open the amount units field. * Set the amount units hidden and default value is set to 'units'. Approved by Brent. --- .../model/sources/BehaviorDefaults.js | 125 ++++++++++++++++++ .../dataentry/BehaviorExamFormType.java | 3 +- 2 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 onprc_ehr/resources/web/onprc_ehr/model/sources/BehaviorDefaults.js diff --git a/onprc_ehr/resources/web/onprc_ehr/model/sources/BehaviorDefaults.js b/onprc_ehr/resources/web/onprc_ehr/model/sources/BehaviorDefaults.js new file mode 100644 index 000000000..ee242e767 --- /dev/null +++ b/onprc_ehr/resources/web/onprc_ehr/model/sources/BehaviorDefaults.js @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2014-2019 LabKey Corporation + * + * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 + * + * Added by Kollil on 12/18/23. Please refer to tke # 10285 for details + */ +EHR.model.DataModelManager.registerMetadata('BehaviorDefaults', { + allQueries: { + + }, + byQuery: { + 'study.clinremarks': { + category: { + defaultValue: 'Behavior', + hidden: true + }, + hx: { + hidden: true + }, + s: { + hidden: false + }, + o: { + hidden: false + }, + a: { + hidden: false + }, + p: { + hidden: false + }, + p2: { + hidden: true + }, + remark: { + columnConfg: { + width: 350 + } + } + }, + 'study.drug': { + category: { + defaultValue: 'Behavior' + }, + code: { + editorConfig: { + xtype: 'ehr-snomedcombo', + defaultSubset: 'Behavior' + } + }, + concentration: { + hidden: true + }, + conc_units: { + hidden: true + }, + dosage: { + hidden: true + }, + dosage_units: { + hidden: true + }, + volume: { + hidden: true + }, + vol_units: { + hidden: true + }, + amount: { + //hidden: true, + defaultValue: 1 + }, + amount_units: { //Changed by Kolli: 12/18/2023. + hidden: true, + defaultValue:'units' + }, + lot: { + hidden: true + }, + outcome: { + hidden: true + }, + route: { + hidden: true, + allowBlank: true + }, + reason: { + hidden: true + }, + qualifier: { + hidden: true + }, + enddate: { + hidden: true + }, + project: { + getInitialValue: function(v, rec){ + //return a default value only if this field is visible + var shouldReturn = false; + if (rec){ + var meta = rec.fields.get('project'); + if (meta){ + shouldReturn = meta.hidden == false + } + } + return v ? v : shouldReturn ? EHR.DataEntryUtils.getDefaultClinicalProject() : null; + } + }, + chargetype: { + defaultValue: 'No Charge' + } + }, + 'study.clinical_observations': { + area: { + hidden: true + }, + category: { + lookup: { + filterArray: [LABKEY.Filter.create('category', 'Behavior')] + } + } + } + } +}); \ No newline at end of file diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/BehaviorExamFormType.java b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/BehaviorExamFormType.java index d889bc93f..636208f29 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/BehaviorExamFormType.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/BehaviorExamFormType.java @@ -71,7 +71,8 @@ public BehaviorExamFormType(DataEntryFormContext ctx, Module owner) } } - addClientDependency(ClientDependency.supplierFromPath("ehr/model/sources/BehaviorDefaults.js")); + // addClientDependency(ClientDependency.supplierFromPath("ehr/model/sources/BehaviorDefaults.js")); + addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/model/sources/BehaviorDefaults.js")); setStoreCollectionClass("EHR.data.ClinicalReportStoreCollection"); addClientDependency(ClientDependency.supplierFromPath("ehr/data/ClinicalReportStoreCollection.js")); addClientDependency(ClientDependency.supplierFromPath("ehr/model/sources/ClinicalDefaults.js")); From 7e2e6e9322c55683d497de2f933d62a2e37d7537 Mon Sep 17 00:00:00 2001 From: Lakshmi Kolli <69940873+kollil@users.noreply.github.com> Date: Tue, 19 Dec 2023 02:31:03 -0800 Subject: [PATCH 3/3] Clinical alerts modification (#873) * Dupe cases warning is removed. * Dupe cases warning is removed. --- .../onprc_ehr/notification/ClinicalAlertsNotification.java | 5 ++++- .../onprc_ehr/notification/ClinicalRoundsNotification.java | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/notification/ClinicalAlertsNotification.java b/onprc_ehr/src/org/labkey/onprc_ehr/notification/ClinicalAlertsNotification.java index 44da6de65..c7e5ad85d 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/notification/ClinicalAlertsNotification.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/notification/ClinicalAlertsNotification.java @@ -97,7 +97,10 @@ public String getMessageBodyHTML(Container c, User u) groupProblemSummary(c, u, msg, 30, 10); roomProblemSummary(c, u, msg, 7, 5); roomProblemSummary(c, u, msg, 30, 10); - duplicateCases(c, u, msg); + + //Edited by Kollil: 12/18/23 + //Removing this warning per request. Please check tkt # 10276 for details. + //duplicateCases(c, u, msg); return msg.toString(); } diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/notification/ClinicalRoundsNotification.java b/onprc_ehr/src/org/labkey/onprc_ehr/notification/ClinicalRoundsNotification.java index 2c719c49d..6cedb7ec4 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/notification/ClinicalRoundsNotification.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/notification/ClinicalRoundsNotification.java @@ -84,7 +84,9 @@ public String getMessageBodyHTML(Container c, User u) { StringBuilder msg = new StringBuilder(); - duplicateCases(c, u, msg); + //Edited by Kollil: 12/18/23 + //Removing this warning per request. Please check tkt # 10276 for details. + //duplicateCases(c, u, msg); animalsWithoutRounds(c, u, msg); //animalsWithoutVetReview(c, u, msg);