From 7506e6b0f2af755e53b3d418551a535e4dcbc7b9 Mon Sep 17 00:00:00 2001 From: Marty Pradere Date: Tue, 25 Aug 2026 20:05:27 -0700 Subject: [PATCH] Remove references to the retired MergeSync module (#977) ## Rationale Removes this module's last references to MergeSync, which is being retired. The labwork request form they belonged to is not registered, so none of this code was reachable at runtime. ## Changes - Removes the Merge integration from the labwork request form, along with its instructions panel. - Drops the prompt that offered to open Merge after a request was submitted. --- .../Panel/LabworkRequestDataEntryPanel.js | 24 ---------- .../Panel/LabworkRequestInstructionsPanel.js | 37 --------------- .../org/labkey/snprc_ehr/SNPRC_EHRModule.java | 1 - .../dataentry/LabworkRequestFormType.java | 2 - ...LabworkRequestInstructionsFormSection.java | 45 ------------------- 5 files changed, 109 deletions(-) delete mode 100644 snprc_ehr/resources/web/snprc_ehr/Panel/LabworkRequestInstructionsPanel.js delete mode 100644 snprc_ehr/src/org/labkey/snprc_ehr/dataentry/dataentry/LabworkRequestInstructionsFormSection.java diff --git a/snprc_ehr/resources/web/snprc_ehr/Panel/LabworkRequestDataEntryPanel.js b/snprc_ehr/resources/web/snprc_ehr/Panel/LabworkRequestDataEntryPanel.js index a8ee9b5b0..fbe7eb3a3 100644 --- a/snprc_ehr/resources/web/snprc_ehr/Panel/LabworkRequestDataEntryPanel.js +++ b/snprc_ehr/resources/web/snprc_ehr/Panel/LabworkRequestDataEntryPanel.js @@ -7,34 +7,10 @@ Ext4.define('SNPRC_EHR.panel.LabworkRequestDataEntryPanel', { extend: 'EHR.panel.RequestDataEntryPanel', alias: 'widget.snprc-labworkrequestdataentrypanel', - initComponent: function(){ - var mergeURL = LABKEY.getModuleProperty('MergeSync', 'MergeURL'); - - this.callParent(arguments); - }, - onStoreCollectionCommitComplete: function(sc, extraContext){ if (Ext4.Msg.isVisible()) Ext4.Msg.hide(); - if (extraContext && extraContext.successURL){ - var mergeURL = LABKEY.getModuleProperty('MergeSync', 'MergeURL'); - if (mergeURL){ - Ext4.Msg.confirm('Success', 'The requests have been synced to merge. Do you want to open merge now?' + - (!Ext4.isIE ? ' Note: merge does not work well in any browser besides IE, and you may want to switch to that browser.' : ''), function(val){ - window.onbeforeunload = Ext4.emptyFn; - if (val == 'yes'){ - window.location = mergeURL; - } - else { - window.location = extraContext.successURL; - } - }, this); - - return; - } - } - this.callParent(arguments); } }); \ No newline at end of file diff --git a/snprc_ehr/resources/web/snprc_ehr/Panel/LabworkRequestInstructionsPanel.js b/snprc_ehr/resources/web/snprc_ehr/Panel/LabworkRequestInstructionsPanel.js deleted file mode 100644 index e6a955e3b..000000000 --- a/snprc_ehr/resources/web/snprc_ehr/Panel/LabworkRequestInstructionsPanel.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2016-2018 LabKey Corporation - * - * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 - */ -Ext4.define('SNPRC_EHR.panel.RequestInstructionsPanel', { - extend: 'Ext.panel.Panel', - alias: 'widget.snprc-labworkrequestinstructionspanel', - - initComponent: function(){ - var mergeURL = LABKEY.getModuleProperty('MergeSync', 'MergeURL'); - var items; - if (mergeURL){ - items = [{ - html: 'This form allows you to request Labwork, similar to requesting in Merge. After requesting Clinpath services through this form, this request will be created in Merge. You can print print labels through Merge.

' + - 'Click here to open Merge

' + - 'Click here for instructions on Merge label printing', - style: 'padding: 5px;' - }] - } - else { - items = [{ - html: 'The Merge URL has not been configured for this site', - style: 'padding: 5px;' - }] - } - - Ext4.apply(this, { - defaults: { - border: false - }, - items: items - }); - - this.callParent(arguments); - } -}); \ No newline at end of file diff --git a/snprc_ehr/src/org/labkey/snprc_ehr/SNPRC_EHRModule.java b/snprc_ehr/src/org/labkey/snprc_ehr/SNPRC_EHRModule.java index 624005282..1662fbe9c 100644 --- a/snprc_ehr/src/org/labkey/snprc_ehr/SNPRC_EHRModule.java +++ b/snprc_ehr/src/org/labkey/snprc_ehr/SNPRC_EHRModule.java @@ -307,7 +307,6 @@ protected void doStartupAfterSpringConfig(ModuleContext moduleContext) // EHRService.get().registerFormType(new DefaultDataEntryFormFactory(AuxProcedureFormType.class, this)); // EHRService.get().registerFormType(new DefaultDataEntryFormFactory(ASBRequestFormType.class, this)); // EHRService.get().registerFormType(new DefaultDataEntryFormFactory(ColonyRequestFormType.class, this)); -// // Requires mergesync // EHRService.get().registerFormType(new DefaultDataEntryFormFactory(LabworkRequestFormType.class, this)); // EHRService.get().registerFormType(new DefaultDataEntryFormFactory(HousingRequestFormType.class, this)); // EHRService.get().registerFormType(new DefaultDataEntryFormFactory(BloodRequestBulkEditFormType.class, this)); diff --git a/snprc_ehr/src/org/labkey/snprc_ehr/dataentry/dataentry/LabworkRequestFormType.java b/snprc_ehr/src/org/labkey/snprc_ehr/dataentry/dataentry/LabworkRequestFormType.java index 0de3a3efd..f864abaa5 100644 --- a/snprc_ehr/src/org/labkey/snprc_ehr/dataentry/dataentry/LabworkRequestFormType.java +++ b/snprc_ehr/src/org/labkey/snprc_ehr/dataentry/dataentry/LabworkRequestFormType.java @@ -40,7 +40,6 @@ public LabworkRequestFormType(DataEntryFormContext ctx, Module owner) { super(ctx, owner, NAME, LABEL, "Requests", Arrays.asList( new RequestFormSection(), - new LabworkRequestInstructionsFormSection(), new AnimalDetailsFormSection(), new ClinpathRunsFormSection(true) )); @@ -53,7 +52,6 @@ public LabworkRequestFormType(DataEntryFormContext ctx, Module owner) //Added 2-8-2016 Blasa addClientDependency(ClientDependency.supplierFromPath("snprc_ehr/model/sources/labworkPanel.js")); - addClientDependency(ClientDependency.supplierFromModuleName("MergeSync")); addClientDependency(ClientDependency.supplierFromPath("snprc_ehr/panel/LabworkRequestDataEntryPanel.js")); setJavascriptClass("SNPRC_EHR.panel.LabworkRequestDataEntryPanel"); } diff --git a/snprc_ehr/src/org/labkey/snprc_ehr/dataentry/dataentry/LabworkRequestInstructionsFormSection.java b/snprc_ehr/src/org/labkey/snprc_ehr/dataentry/dataentry/LabworkRequestInstructionsFormSection.java deleted file mode 100644 index 849ef5c8d..000000000 --- a/snprc_ehr/src/org/labkey/snprc_ehr/dataentry/dataentry/LabworkRequestInstructionsFormSection.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2016 LabKey Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.labkey.snprc_ehr.dataentry.dataentry; - -import org.labkey.api.ehr.dataentry.AbstractFormSection; -import org.labkey.api.ehr.dataentry.DataEntryFormContext; -import org.labkey.api.ehr.dataentry.FormElement; -import org.labkey.api.view.template.ClientDependency; - -import java.util.Collections; -import java.util.List; - -/** - * User: bimber - * Date: 6/9/13 - * Time: 4:15 PM - */ -public class LabworkRequestInstructionsFormSection extends AbstractFormSection -{ - public LabworkRequestInstructionsFormSection() - { - super("LabworkRequestInstructions", "Instructions", "snprc-labworkrequestinstructionspanel"); - - addClientDependency(ClientDependency.supplierFromPath("snprc_ehr/panel/LabworkRequestInstructionsPanel.js")); - } - - @Override - protected List getFormElements(DataEntryFormContext ctx) - { - return Collections.emptyList(); - } -}