From f6466c9aeb365561ae04949be2bf51478c72edc2 Mon Sep 17 00:00:00 2001 From: kollil Date: Fri, 15 Mar 2024 11:30:47 -0700 Subject: [PATCH 1/4] Added a pop-up message for a medication order. --- .../panel/TreatmentOrdersDataEntryPanel.js | 40 +++++++++++++++++++ .../dataentry/TreatmentsFormType.java | 7 +++- 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 onprc_ehr/resources/web/onprc_ehr/panel/TreatmentOrdersDataEntryPanel.js diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/TreatmentOrdersDataEntryPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/TreatmentOrdersDataEntryPanel.js new file mode 100644 index 000000000..954a45721 --- /dev/null +++ b/onprc_ehr/resources/web/onprc_ehr/panel/TreatmentOrdersDataEntryPanel.js @@ -0,0 +1,40 @@ +/* Created: 3-12-2024 by Kollil and Raymond +This script is added to create a pop-up message box when a MPA injection is selected in the medication order form. +Refer to the ticket #9669 +*/ +Ext4.define('ONPRC_EHR.panel.TreatmentOrdersDataEntryPanel', { + extend: 'EHR.panel.TaskDataEntryPanel', + + onBeforeSubmit: function(btn){ + if (!btn || !btn.targetQC || ['Completed'].indexOf(btn.targetQC) == -1){ + return; + } + var store = this.storeCollection.getClientStoreByName('Treatment Orders'); + LDK.Assert.assertNotEmpty('Unable to find Treatment Orders store', store); + + var ids = []; + store.each(function(r){ + if (r.get('Id')&& r.get('code')=='E-85760' && r.get('category') == 'Clinical' ) + ids.push(r.get('Id')) + }, this); + ids = Ext4.unique(ids); + + if (!ids.length) + return; + + if (ids.length){ + Ext4.Msg.confirm('Medication Question', 'Have you confirmed start date on CMU Calendar?', function(val){ + if (val == 'yes'){ + this.onSubmit(btn, true); + } + else { + + } + }, this); + } + else { + this.onSubmit(btn, true); + } + return false; + } +}); diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/TreatmentsFormType.java b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/TreatmentsFormType.java index 8b6319e44..a1ee5afdf 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/TreatmentsFormType.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/TreatmentsFormType.java @@ -59,6 +59,11 @@ public TreatmentsFormType(DataEntryFormContext ctx, Module owner) } addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/model/sources/TreatmentDrugsClinical.js")); + //Added by Kollil, 3/12/24 + //This script was added to show a pop-up question box when the user selects MPA medication on the Medication order form. + addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/panel/TreatmentOrdersDataEntryPanel.js")); + setJavascriptClass("ONPRC_EHR.panel.TreatmentOrdersDataEntryPanel"); + if (ctx.getContainer().getActiveModules().contains(ModuleLoader.getInstance().getModule("onprc_billing"))) { addSection(new MiscChargesFormSection(EHRService.FORM_SECTION_LOCATION.Body)); @@ -66,8 +71,6 @@ public TreatmentsFormType(DataEntryFormContext ctx, Module owner) } - - @Override protected boolean canInsert() { From 6934073a0b1bff517dca87ab485a029e890668c3 Mon Sep 17 00:00:00 2001 From: kollil Date: Tue, 26 Mar 2024 13:25:42 -0700 Subject: [PATCH 2/4] Message verbiage altered. --- .../web/onprc_ehr/panel/TreatmentOrdersDataEntryPanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/TreatmentOrdersDataEntryPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/TreatmentOrdersDataEntryPanel.js index 954a45721..5d1f47915 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/TreatmentOrdersDataEntryPanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/TreatmentOrdersDataEntryPanel.js @@ -23,7 +23,7 @@ Ext4.define('ONPRC_EHR.panel.TreatmentOrdersDataEntryPanel', { return; if (ids.length){ - Ext4.Msg.confirm('Medication Question', 'Have you confirmed start date on CMU Calendar?', function(val){ + Ext4.Msg.confirm('Medication Question', 'Have you confirmed MPA start date on CMU Calendar?', function(val){ if (val == 'yes'){ this.onSubmit(btn, true); } From 865e5ce93532993f36906273fdcc79a97e2ff626 Mon Sep 17 00:00:00 2001 From: kollil Date: Wed, 3 Apr 2024 12:50:11 -0700 Subject: [PATCH 3/4] validation added to other forms. Bulk entry Exams and cases --- .../onprc_ehr/dataentry/BulkClinicalEntryFormType.java | 7 ++++++- .../labkey/onprc_ehr/dataentry/ClinicalReportFormType.java | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/BulkClinicalEntryFormType.java b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/BulkClinicalEntryFormType.java index 942abef1f..87b13c22f 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/BulkClinicalEntryFormType.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/BulkClinicalEntryFormType.java @@ -68,7 +68,7 @@ public BulkClinicalEntryFormType(DataEntryFormContext ctx, Module owner) addClientDependency(ClientDependency.supplierFromPath("ehr/model/sources/ClinicalDefaults.js")); addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/window/MassBleedWindow.js")); //Added 1-6-2015 Blasa - addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/window/BulkStrokeRoundsWindow.js")); + addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/window/BulkStrokeRoundsWindow.js")); //Added 6-4-2015 Blasa addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/model/sources/ClinicalProcedures.js")); @@ -79,6 +79,11 @@ public BulkClinicalEntryFormType(DataEntryFormContext ctx, Module owner) addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/panel/ExamCasesDataEntryPanel.js")); setDisplayReviewRequired(true); setJavascriptClass("ONPRC_EHR.panel.ExamCasesDataEntryPanel"); + + //Added by Kollil, 3/12/24 + //This script was added to show a pop-up question box when the user selects MPA medication on the Medication order form. + addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/panel/TreatmentOrdersDataEntryPanel.js")); + setJavascriptClass("ONPRC_EHR.panel.TreatmentOrdersDataEntryPanel"); } @Override diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ClinicalReportFormType.java b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ClinicalReportFormType.java index f0fe9974d..dc97c130b 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ClinicalReportFormType.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ClinicalReportFormType.java @@ -104,6 +104,11 @@ public ClinicalReportFormType(DataEntryFormContext ctx, Module owner) addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/panel/ExamCasesDataEntryPanel.js")); setDisplayReviewRequired(true); setJavascriptClass("ONPRC_EHR.panel.ExamCasesDataEntryPanel"); + + //Added by Kollil, 3/12/24 + //This script was added to show a pop-up question box when the user selects MPA medication on the Medication order form. + addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/panel/TreatmentOrdersDataEntryPanel.js")); + setJavascriptClass("ONPRC_EHR.panel.TreatmentOrdersDataEntryPanel"); } @Override From 45c80656246bc85ae2ba4cad8939d6591298756f Mon Sep 17 00:00:00 2001 From: kollil Date: Mon, 22 Apr 2024 14:46:52 -0700 Subject: [PATCH 4/4] Added the popup message on the medication orders panel in clinical rounds data entry form --- .../onprc_ehr/dataentry/ClinicalRoundsFormType.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ClinicalRoundsFormType.java b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ClinicalRoundsFormType.java index 3a883b5ae..ebbe154ad 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ClinicalRoundsFormType.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ClinicalRoundsFormType.java @@ -72,13 +72,10 @@ public ClinicalRoundsFormType(DataEntryFormContext ctx, Module owner) addClientDependency(ClientDependency.supplierFromPath("ehr/model/sources/ClinicalDefaults.js")); addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/model/sources/ClinicalRounds.js")); - - - - - - - + //Added by Kollil, 4/18/24 + //This script was added to show a pop-up question box when the user selects MPA medication on the Medication order form. + addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/panel/TreatmentOrdersDataEntryPanel.js")); + setJavascriptClass("ONPRC_EHR.panel.TreatmentOrdersDataEntryPanel"); }