diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsCasePanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsCasePanel.js index 752c7f113..fd05972c9 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsCasePanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsCasePanel.js @@ -146,7 +146,7 @@ Ext4.define('ONPRC_EHR.panel.AnimalDetailsCasePanel', { xtype: 'ldk-linkbutton', style: 'margin-top: 10px;', scope: this, - text: '[Show Full Hx]', + text: '[Show Full Hx show]', handler: function(){ if (this.subjectId){ EHR.window.ClinicalHistoryWindow.showClinicalHistory(null, this.subjectId, null); diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsExtendedPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsExtendedPanel.js index 9eb35842b..ddf02077d 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsExtendedPanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsExtendedPanel.js @@ -62,7 +62,7 @@ Ext4.define('ONPRC_EHR.panel.AnimalDetailsExtendedPanel', { xtype: 'ldk-linkbutton', style: 'margin-top: 10px;', scope: this, - text: '[Show Full Hx]', + text: '[Show Full Hx show]', handler: function(){ if (this.subjectId){ EHR.window.ClinicalHistoryWindow.showClinicalHistory(null, this.subjectId, null); @@ -92,7 +92,8 @@ Ext4.define('ONPRC_EHR.panel.AnimalDetailsExtendedPanel', { hidden: EHR.Security.hasClinicalEntryPermission() && !EHR.Security.hasPermission(EHR.QCStates.COMPLETED, 'update', [{schemaName: 'study', queryName: 'Treatment Orders'}]), handler: function(){ if (this.subjectId){ - Ext4.create('EHR.window.ManageTreatmentsWindow', {animalId: this.subjectId}).show(); + //Changed the container to onprc_ehr by Kollil, 11/13/24 + Ext4.create('onprc_ehr.window.ManageTreatmentsWindow', {animalId: this.subjectId}).show(); } else { console.log('no id'); diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsPanel.js index def99ed32..e8882d41b 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsPanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsPanel.js @@ -140,7 +140,7 @@ Ext4.define('ONPRC_EHR.panel.AnimalDetailsPanel', { xtype: 'ldk-linkbutton', style: 'margin-top: 10px;', scope: this, - text: '[Show Full Hx]', + text: '[Show Full Hx show]', handler: function(){ if (this.subjectId){ EHR.window.ClinicalHistoryWindow.showClinicalHistory(null, this.subjectId, null); @@ -170,7 +170,8 @@ Ext4.define('ONPRC_EHR.panel.AnimalDetailsPanel', { hidden: EHR.Security.hasClinicalEntryPermission() && !EHR.Security.hasPermission(EHR.QCStates.COMPLETED, 'update', [{schemaName: 'study', queryName: 'Treatment Orders'}]), handler: function(){ if (this.subjectId){ - Ext4.create('EHR.window.ManageTreatmentsWindow', {animalId: this.subjectId}).show(); + //Changed the container to onprc_ehr by Kollil, 6/26/24 + Ext4.create('onprc_ehr.window.ManageTreatmentsWindow', {animalId: this.subjectId}).show(); } else { console.log('no id'); diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/ManageTreatmentsPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/ManageTreatmentsPanel.js index a759687be..ebfe154cb 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/ManageTreatmentsPanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/ManageTreatmentsPanel.js @@ -77,6 +77,52 @@ Ext4.define('onprc_ehr.panel.ManageTreatmentsPanel', { }, (owner ? owner.animalId : null), category); }, + onSubmit: function(btn) { + var form = this.down('#formPanel'); + var rec = form.getRecord(); + if (!rec) + return; + //Added by Kollil, 6/26/24 + //Refer to the ticket #9669 + //This code snippet is added to show a pop-up question box when the user selects MPA medication on animal details panel + if (rec.get('Id') && rec.get('code')=='E-85760') + { + Ext4.Msg.confirm('Medication Question', 'Have you confirmed MPA start date on CMU Calendar?', function(val){ + if (val == 'yes') { + if (!rec.get('taskid')) { + var tsk = LABKEY.Utils.generateUUID().toUpperCase(); + LABKEY.Query.insertRows({ + schemaName: 'ehr', + queryName: 'tasks', + rows: [{ + taskid: tsk, + formtype: 'treatments', + title: 'Medication Order', + assignedto: LABKEY.Security.currentUser.userid, + qcstate: EHR.Security.getQCStateByLabel('Completed').RowId, + datecompleted: new Date(), + category: 'Task' + }], + scope: this, + failure: EHR.Utils.onError, + success: function () { + Ext4.Msg.hide(); + } + }); + rec.set('taskid', tsk); + } + this.down('#dataEntryPanel').onSubmit(btn); + } + else { + + } + }, this) + } + else { + this.down('#dataEntryPanel').onSubmit(btn); + } + }, + createTreatmentWindow: function(btn, config, animalId, category){ var cfg = Ext4.apply({ schemaName: 'study', 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..af4757870 --- /dev/null +++ b/onprc_ehr/resources/web/onprc_ehr/panel/TreatmentOrdersDataEntryPanel.js @@ -0,0 +1,41 @@ +/* Created: 3-12-2024 by Kollil and Raymond +This script is added to create a pop-up message box when MPA injection is selected in the medication order form. +Refer to the ticket #9669 +Modified: Kollil, 6/26/24 +*/ +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' ) // Removed the category filter, as the medication requires the validation whenever its ordered + 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 MPA start date on CMU Calendar?', function(val){ + if (val == 'yes'){ + this.onSubmit(btn, true); + } + else { + + } + }, this); + } + else { + this.onSubmit(btn, true); + } + return false; + } +}); \ No newline at end of file diff --git a/onprc_ehr/resources/web/onprc_ehr/plugin/onprc_RowEditor.js b/onprc_ehr/resources/web/onprc_ehr/plugin/onprc_RowEditor.js new file mode 100644 index 000000000..c5ba0bca1 --- /dev/null +++ b/onprc_ehr/resources/web/onprc_ehr/plugin/onprc_RowEditor.js @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2013-2019 LabKey Corporation + * + * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 + * + * Created by Kollil on 11/12/24 in efforts to create the MPA pop up message display + */ +Ext4.onReady(function(){ +Ext4.define('ONPRC_EHR.plugin.RowEditor', { + extend: 'EHR.plugin.RowEditor', + + getDetailsPanelCfg: function () { + return { + xtype: 'onprc_ehr-animaldetailspanels', + itemId: 'detailsPanel', + showDisableButton: false + } + }, + + getWindowCfg: function(){ + return { + modal: true, + width: 900, + border: false, + items: [{ + items: [this.getDetailsPanelCfg(), this.getFormPanelCfg()] + }], + buttons: this.getWindowButtons(), + closeAction: 'destroy', + listeners: { + scope: this, + close: this.onWindowClose, + destroy: this.onWindowClose, + beforerender: function(win){ + var cols = win.down('#formPanel').items.get(0).items.getCount(); + if (cols > 1){ + var newWidth = cols * (EHR.form.Panel.defaultFieldWidth + 20); + if (newWidth > win.width) { + win.setWidth(newWidth); + } + } + }, + afterrender: function(editorWin){ + this.keyNav = new Ext4.util.KeyNav({ + target: editorWin.getId(), + scope: this, + up: function(e){ + if (e.ctrlKey){ + this.loadPreviousRecord(); + } + }, + down: function (e){ + if (e.ctrlKey){ + this.loadNextRecord(); + } + } + }); + }, + animalchange: { + fn: function(id){ + this.getEditorWindow().down('#detailsPanel').loadAnimal(id); + }, + scope: this, + buffer: 200 + } + } + } + }, + +}); + EHR.Utils.rowEditorPlugin = 'ONPRC_EHR.plugin.RowEditor'; +}); \ No newline at end of file diff --git a/onprc_ehr/resources/web/onprc_ehr/window/ManageRecordWindow.js b/onprc_ehr/resources/web/onprc_ehr/window/ManageRecordWindow.js index 04d2aaa45..12e2b34fa 100644 --- a/onprc_ehr/resources/web/onprc_ehr/window/ManageRecordWindow.js +++ b/onprc_ehr/resources/web/onprc_ehr/window/ManageRecordWindow.js @@ -93,30 +93,47 @@ Ext4.define('ONPRC_EHR.window.ManageRecordWindow', { var rec = form.getRecord(); if (!rec) return; - if (!rec.get('taskid')) { - var tsk = LABKEY.Utils.generateUUID().toUpperCase(); - LABKEY.Query.insertRows({ - schemaName: 'ehr', - queryName: 'tasks', - rows: [{ - taskid: tsk, - formtype: 'treatments', - title: 'Medication/Diet', - assignedto: LABKEY.Security.currentUser.userid, - qcstate: EHR.Security.getQCStateByLabel('Completed').RowId, - datecompleted: new Date(), - category: 'Task' - }], - scope: this, - failure: EHR.Utils.onError, - success: function () { - Ext4.Msg.hide(); + //Added by Kollil, 6/26/24 + //Refer to the ticket #9669 + //This code snippet is added to show a pop-up question box when the user selects MPA medication on animal history snapshot screen - > Manage Treatments link. + if (rec.get('Id') && rec.get('code')=='E-85760') + { + Ext4.Msg.confirm('Medication Question', 'Have you confirmed MPA start date on CMU Calendar?', function(val){ + if (val == 'yes') { + if (!rec.get('taskid')) { + var tsk = LABKEY.Utils.generateUUID().toUpperCase(); + LABKEY.Query.insertRows({ + schemaName: 'ehr', + queryName: 'tasks', + rows: [{ + taskid: tsk, + formtype: 'treatments', + title: 'Medication/Diet', + assignedto: LABKEY.Security.currentUser.userid, + qcstate: EHR.Security.getQCStateByLabel('Completed').RowId, + datecompleted: new Date(), + category: 'Task' + }], + scope: this, + failure: EHR.Utils.onError, + success: function () { + Ext4.Msg.hide(); + } + }); + rec.set('taskid', tsk); + } + this.down('#dataEntryPanel').onSubmit(btn); + } + else { + } - }); - rec.set('taskid', tsk); + }, this) + } + else { + this.down('#dataEntryPanel').onSubmit(btn); } - this.down('#dataEntryPanel').onSubmit(btn); }, + onFormLoad: function(results){ this.formResults = results; this.setTitle(this.formResults.formConfig.label); diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/ONPRC_EHRModule.java b/onprc_ehr/src/org/labkey/onprc_ehr/ONPRC_EHRModule.java index df0f81a3f..5fb4b6be6 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/ONPRC_EHRModule.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/ONPRC_EHRModule.java @@ -96,9 +96,7 @@ import org.labkey.onprc_ehr.security.ONPRC_EHRCMUAdministrationRole; import org.labkey.onprc_ehr.security.ONPRC_EHRCustomerEditPermission; import org.labkey.onprc_ehr.security.ONPRC_EHRCustomerEditRole; -import org.labkey.onprc_ehr.security.ONPRC_EHREnvironmentalPermission; import org.labkey.onprc_ehr.security.ONPRC_EHREnvironmentalRole; -//import org.labkey.onprc_ehr.security.ONPRC_EHRPMICEditRole; import org.labkey.onprc_ehr.security.ONPRC_EHRTransferRequestRole; import org.labkey.onprc_ehr.table.ONPRC_EHRCustomizer; @@ -285,14 +283,17 @@ private void registerEHRResources() EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("onprc_ehr/panel/ManageTreatmentsPanel.js"), this); EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("onprc_ehr/panel/SmallFormSnapShotPanel.js"), this); + // Consider creating a base FormType to include these dependencies instead of blasting them on every page + EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("ehr/plugin/RowEditor.js"), this); + EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("onprc_ehr/plugin/onprc_RowEditor.js"), this); + EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("onprc_ehr/panel/AnimalDetailsPanel.js"), this); + //Added: 8-24-2016 R.Blasa EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("onprc_ehr/DemographicsRecord.js"), this); //Added: 2-22-2017 R.Blasa EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("onprc_ehr/panel/NarrowSnapshotPanel.js"), this); - - //Added: 10-25-2017 R.Blasa References new Xtype EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("onprc_ehr/form/field/CEG_PlantextArea.js"), this); diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/AnimalDetailsRoundsFormSection.java b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/AnimalDetailsRoundsFormSection.java index 6f80026a2..300abf3f6 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/AnimalDetailsRoundsFormSection.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/AnimalDetailsRoundsFormSection.java @@ -31,3 +31,4 @@ public AnimalDetailsRoundsFormSection() } } + diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/AuxProcedureFormType.java b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/AuxProcedureFormType.java index ac4d5effa..42c7350da 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/AuxProcedureFormType.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/AuxProcedureFormType.java @@ -15,7 +15,6 @@ */ package org.labkey.onprc_ehr.dataentry; -import org.labkey.onprc_ehr.dataentry.AnimalDetailsFormSection; import org.labkey.api.ehr.dataentry.BloodDrawFormSection; import org.labkey.api.ehr.dataentry.DataEntryFormContext; import org.labkey.api.ehr.dataentry.FormSection; @@ -23,7 +22,6 @@ import org.labkey.api.ehr.dataentry.TaskForm; import org.labkey.api.ehr.dataentry.TaskFormSection; import org.labkey.api.ehr.dataentry.WeightFormSection; -import org.labkey.onprc_ehr.dataentry.DrugAdministrationFormSection; import org.labkey.api.module.Module; import org.labkey.api.view.template.ClientDependency; @@ -47,7 +45,7 @@ public AuxProcedureFormType(DataEntryFormContext ctx, Module owner) new TaskFormSection(), - new AnimalDetailsFormSection(), + new ONPRCAnimalDetailsFormSection(), // new SimpleGridPanel("study", "encounters", "Procedures" ), new ClinicalEncountersFormSection(), //Added 5-4-2015 Blasa new BloodDrawFormSection(false), 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 8d72bf2dc..cd5240619 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/BulkClinicalEntryFormType.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/BulkClinicalEntryFormType.java @@ -16,14 +16,12 @@ package org.labkey.onprc_ehr.dataentry; import org.labkey.api.ehr.EHRService; -import org.labkey.onprc_ehr.dataentry.AnimalDetailsFormSection; import org.labkey.api.ehr.dataentry.DataEntryFormContext; import org.labkey.api.ehr.dataentry.FormSection; import org.labkey.api.ehr.dataentry.SimpleGridPanel; import org.labkey.api.ehr.dataentry.TaskForm; import org.labkey.api.ehr.dataentry.TaskFormSection; import org.labkey.api.ehr.dataentry.WeightFormSection; -import org.labkey.onprc_ehr.dataentry.DrugAdministrationFormSection; import org.labkey.api.ehr.security.EHRClinicalEntryPermission; import org.labkey.api.module.Module; import org.labkey.api.view.template.ClientDependency; @@ -45,7 +43,7 @@ public BulkClinicalEntryFormType(DataEntryFormContext ctx, Module owner) { super(ctx, owner, NAME, "Bulk Clinical Entry", "Clinical", Arrays.asList( new TaskFormSection(), - new AnimalDetailsFormSection(), + new ONPRCAnimalDetailsFormSection(), //Added 6-5-2015 Blasa new ClinicalEncountersFormSection(), @@ -79,6 +77,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, 6/26/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 a25e05949..d9c1314fc 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ClinicalReportFormType.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ClinicalReportFormType.java @@ -18,7 +18,6 @@ import org.labkey.api.ehr.EHRService; import org.labkey.api.ehr.dataentry.AbstractFormSection; import org.labkey.api.ehr.dataentry.DataEntryFormContext; -import org.labkey.onprc_ehr.dataentry.ExtendedAnimalDetailsFormSection; import org.labkey.api.ehr.dataentry.FormSection; import org.labkey.api.ehr.dataentry.NonStoreFormSection; import org.labkey.api.ehr.dataentry.SimpleFormPanelSection; @@ -27,13 +26,11 @@ import org.labkey.api.ehr.dataentry.TaskForm; import org.labkey.api.ehr.dataentry.TaskFormSection; import org.labkey.api.ehr.dataentry.WeightFormSection; -import org.labkey.api.ehr.dataentry.DrugAdministrationFormSection; import org.labkey.api.ehr.security.EHRClinicalEntryPermission; import org.labkey.api.module.Module; import org.labkey.api.query.Queryable; import org.labkey.api.view.template.ClientDependency; - import java.util.Arrays; import java.util.List; @@ -65,7 +62,6 @@ public ClinicalReportFormType(DataEntryFormContext ctx, Module owner) //Added 5-23-2015 Blasa new SimpleGridPanel("study", "housing", "Housing Transfers",EHRService.FORM_SECTION_LOCATION.Tabs) - )); setTemplateMode(AbstractFormSection.TEMPLATE_MODE.NO_ID); @@ -105,6 +101,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, 6/26/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/ClinicalRoundsFormType.java b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ClinicalRoundsFormType.java index b239dd586..817776e92 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ClinicalRoundsFormType.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ClinicalRoundsFormType.java @@ -24,7 +24,6 @@ import org.labkey.api.ehr.dataentry.TaskForm; import org.labkey.api.ehr.dataentry.TaskFormSection; import org.labkey.api.ehr.dataentry.WeightFormSection; -import org.labkey.api.ehr.dataentry.DrugAdministrationFormSection; import org.labkey.api.ehr.security.EHRClinicalEntryPermission; import org.labkey.api.module.Module; import org.labkey.api.query.Queryable; @@ -48,14 +47,15 @@ public ClinicalRoundsFormType(DataEntryFormContext ctx, Module owner) new TaskFormSection(), //Added 5-9-2016 R.Blasa new AnimalDetailsRoundsFormSection(), - new ClinicalRoundsRemarksFormSection(), //NOTE: originally removed in order to enforce non-editable IDs //however, have been re-added apparently people do use them new BloodDrawFormSection(false, EHRService.FORM_SECTION_LOCATION.Tabs), new WeightFormSection(EHRService.FORM_SECTION_LOCATION.Tabs), - new DrugAdministrationFormSection(EHRService.FORM_SECTION_LOCATION.Tabs, DrugAdministrationFormSection.LABEL, ClientDependency.supplierFromPath("onprc_ehr/window/ONPRC_AddScheduledTreatmentWindow.js")), - new TreatmentOrdersFormSection(EHRService.FORM_SECTION_LOCATION.Tabs), +// new DrugAdministrationFormSection(EHRService.FORM_SECTION_LOCATION.Tabs, DrugAdministrationFormSection.LABEL, ClientDependency.supplierFromPath("onprc_ehr/window/ONPRC_AddScheduledTreatmentWindow.js")), + new DrugAdministrationFormSection(ClientDependency.supplierFromPath("onprc_ehr/window/ONPRC_AddScheduledTreatmentWindow.js")), +// new TreatmentOrdersFormSection(EHRService.FORM_SECTION_LOCATION.Tabs), + new TreatmentOrdersFormSection(), new ClinicalObservationsFormSection(EHRService.FORM_SECTION_LOCATION.Tabs, false) )); @@ -73,9 +73,16 @@ 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, 6/26/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"); + setDisplayReviewRequired(true); + } @Override diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ExtendedAnimalDetailsFormSection.java b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ExtendedAnimalDetailsFormSection.java index 78f1184b6..b971535f5 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ExtendedAnimalDetailsFormSection.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ExtendedAnimalDetailsFormSection.java @@ -1,6 +1,5 @@ package org.labkey.onprc_ehr.dataentry; -import org.labkey.onprc_ehr.dataentry.AnimalDetailsFormSection; import org.labkey.api.ehr.dataentry.NonStoreFormSection; import org.labkey.api.view.template.ClientDependency; @@ -10,20 +9,10 @@ public class ExtendedAnimalDetailsFormSection extends NonStoreFormSection { public ExtendedAnimalDetailsFormSection() { -// super(); -// -// setXtype("onprc_ehr-animaldetailsextendedpanel"); - - super("AnimalDetails", "Animal Details", "onprc_ehr-animaldetailsextendedpanel"); - addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/panel/AnimalDetailsCasePanel.js")); addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/panel/AnimalDetailsExtendedPanel.js")); - - - - - - } + } } + diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/NecropsyFormType.java b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/NecropsyFormType.java index 20363e527..3e8225cb6 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/NecropsyFormType.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/NecropsyFormType.java @@ -51,7 +51,7 @@ public NecropsyFormType(DataEntryFormContext ctx, Module owner) new NecropsyInstructionFormSection(), //Added: 12-21-2021 R.Blasa new ClinicalEncountersFormPanelSection("Necropsy"), //Modified: 12-20-2018 R.Blasa - new AnimalDetailsFormSection(), + new ONPRCAnimalDetailsFormSection(), new GrossFindingsFormPanelSection(), new PathologyFormSection("ehr", "encounter_participants", "Staff"), new PathologyNotesFormPanelSection(), diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/AnimalDetailsFormSection.java b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ONPRCAnimalDetailsFormSection.java similarity index 89% rename from onprc_ehr/src/org/labkey/onprc_ehr/dataentry/AnimalDetailsFormSection.java rename to onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ONPRCAnimalDetailsFormSection.java index f92ae6abb..152174270 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/AnimalDetailsFormSection.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/ONPRCAnimalDetailsFormSection.java @@ -20,9 +20,9 @@ //Created:12-20-2018 R.Blasa -public class AnimalDetailsFormSection extends NonStoreFormSection +public class ONPRCAnimalDetailsFormSection extends NonStoreFormSection { - public AnimalDetailsFormSection() + public ONPRCAnimalDetailsFormSection() { super("AnimalDetails", "Animal Details", "onprc_ehr-animaldetailspanels"); addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/panel/AnimalDetailsPanel.js")); 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 0846869e7..1949f1dc9 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/TreatmentsFormType.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/dataentry/TreatmentsFormType.java @@ -16,12 +16,10 @@ package org.labkey.onprc_ehr.dataentry; import org.labkey.api.ehr.EHRService; -import org.labkey.onprc_ehr.dataentry.AnimalDetailsFormSection; import org.labkey.api.ehr.dataentry.DataEntryFormContext; import org.labkey.api.ehr.dataentry.FormSection; import org.labkey.api.ehr.dataentry.TaskForm; import org.labkey.api.ehr.dataentry.TaskFormSection; -import org.labkey.onprc_ehr.dataentry.DrugAdministrationFormSection; import org.labkey.api.ehr.security.EHRClinicalEntryPermission; import org.labkey.api.module.Module; import org.labkey.api.module.ModuleLoader; @@ -44,7 +42,7 @@ public TreatmentsFormType(DataEntryFormContext ctx, Module owner) { super(ctx, owner, NAME, LABEL, "Clinical", Arrays.asList( new TaskFormSection(), - new AnimalDetailsFormSection(), + new ONPRCAnimalDetailsFormSection(), new DrugAdministrationFormSection(ClientDependency.supplierFromPath("onprc_ehr/window/ONPRC_AddScheduledTreatmentWindow.js")), new TreatmentOrdersFormSection() )); @@ -59,9 +57,13 @@ public TreatmentsFormType(DataEntryFormContext ctx, Module owner) setDisplayReviewRequired(true); addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/model/sources/TreatmentDrugsClinical.js")); - //Added 4-24-2024 R. Blasa + //Added 4-24-2024 R. Blasa addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/window/FormTemplateWindow.js")); + //Added by Kollil, 6/26/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"))) { @@ -71,7 +73,6 @@ public TreatmentsFormType(DataEntryFormContext ctx, Module owner) } //Added 4-24-2024 R. Blasa - @Override protected List getMoreActionButtonConfigs() { @@ -82,9 +83,6 @@ protected List getMoreActionButtonConfigs() return ret; } - - - @Override protected boolean canInsert() {