From 14063fdeb06b87de9120bf2c1d011c8d0e2f086b Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Thu, 4 Sep 2025 19:07:28 -0700 Subject: [PATCH 1/4] Modified Pairing Observation to remove referencing files --- .../queries/ehr_lookups/pairingeventsAll.sql | 49 +++++++++++++++++++ .../model/sources/Pairing_Properties.js | 27 +++++++++- 2 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 onprc_ehr/resources/queries/ehr_lookups/pairingeventsAll.sql diff --git a/onprc_ehr/resources/queries/ehr_lookups/pairingeventsAll.sql b/onprc_ehr/resources/queries/ehr_lookups/pairingeventsAll.sql new file mode 100644 index 000000000..c0efb602a --- /dev/null +++ b/onprc_ehr/resources/queries/ehr_lookups/pairingeventsAll.sql @@ -0,0 +1,49 @@ +select + value, + category, + sort_order, + date_disabled + +from ehr_lookups.pairingdividerchange + +union all + +select + value, + category, + sort_order, + date_disabled + +from ehr_lookups.pairingEventType + +union all + +select + value, + category, + sort_order, + date_disabled + +from ehr_lookups.pairing_infant_related + +union all + +select + value, + category, + sort_order, + date_disabled + +from ehr_lookups.pairing_STF_Beh + +union all + +select + value, + category, + sort_order, + date_disabled + +from ehr_lookups.pairing_STF_clinical + +order by category,value,sort_order \ No newline at end of file diff --git a/onprc_ehr/resources/web/onprc_ehr/model/sources/Pairing_Properties.js b/onprc_ehr/resources/web/onprc_ehr/model/sources/Pairing_Properties.js index 86f14a441..d512a89bd 100644 --- a/onprc_ehr/resources/web/onprc_ehr/model/sources/Pairing_Properties.js +++ b/onprc_ehr/resources/web/onprc_ehr/model/sources/Pairing_Properties.js @@ -37,12 +37,35 @@ EHR.model.DataModelManager.registerMetadata('Pairing_Properties', { } }, - endeventType: { + eventtype: { + columnConfig: { + width: 250 + }, + editorConfig: { + caseSensitive: false, + anyMatch: true, + listConfig: { + innerTpl: '{[(values.category ? "" + LABKEY.Utils.encodeHtml(values.category) + ": " : "") + LABKEY.Utils.encodeHtml(values.value)]}', + getInnerTpl: function () { + return this.innerTpl; + } + } + }, lookup: { - sort: 'sort_order' + xtype: 'combobox', + schemaName: 'ehr_Lookups', + queryName: 'pairingeventsAll', + columns: 'value,category,sort_order,date_disabled', + keyColumn: 'value', + displayColumn: 'value', + sort: 'category,value,sort_order', + filterArray: [ + LABKEY.Filter.create('date_disabled', null, LABKEY.Filter.Types.ISBLANK) + ] } }, + enddate: { hidden: false }, From 19cc76afb17948458b89c1eec868008de79ca67b Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Thu, 4 Sep 2025 19:08:25 -0700 Subject: [PATCH 2/4] Modified Pairing Observation to remove referencing files --- .../web/onprc_ehr/model/sources/Pairing_Properties.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/onprc_ehr/resources/web/onprc_ehr/model/sources/Pairing_Properties.js b/onprc_ehr/resources/web/onprc_ehr/model/sources/Pairing_Properties.js index d512a89bd..84267be89 100644 --- a/onprc_ehr/resources/web/onprc_ehr/model/sources/Pairing_Properties.js +++ b/onprc_ehr/resources/web/onprc_ehr/model/sources/Pairing_Properties.js @@ -22,12 +22,7 @@ EHR.model.DataModelManager.registerMetadata('Pairing_Properties', { } }, - eventtype: { - allowBlank: false, - lookup: { - sort: 'sort_order' - } - }, + goal: { allowBlank: false, lookup: { From e8c410cc3dadd80c0522f2983d3f11fb4320e335 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Fri, 5 Sep 2025 17:57:30 -0700 Subject: [PATCH 3/4] Created a new program to allow Completion Dates entries made on the Complicance Access folder to be recorded onto the Compliaince main page. --- .../onprc_ehr_compliancedb-24.011-24.012.sql | 66 +++++++++++ .../ONPRC_EHR_ComplianceDBModule.java | 2 +- .../queries/ehr_lookups/pairingeventsAll.sql | 49 -------- .../model/sources/Pairing_Properties.js | 106 ------------------ 4 files changed, 67 insertions(+), 156 deletions(-) create mode 100644 ONPRC_EHR_ComplianceDB/resources/schemas/dbscripts/sqlserver/onprc_ehr_compliancedb-24.011-24.012.sql delete mode 100644 onprc_ehr/resources/queries/ehr_lookups/pairingeventsAll.sql delete mode 100644 onprc_ehr/resources/web/onprc_ehr/model/sources/Pairing_Properties.js diff --git a/ONPRC_EHR_ComplianceDB/resources/schemas/dbscripts/sqlserver/onprc_ehr_compliancedb-24.011-24.012.sql b/ONPRC_EHR_ComplianceDB/resources/schemas/dbscripts/sqlserver/onprc_ehr_compliancedb-24.011-24.012.sql new file mode 100644 index 000000000..e0e470d84 --- /dev/null +++ b/ONPRC_EHR_ComplianceDB/resources/schemas/dbscripts/sqlserver/onprc_ehr_compliancedb-24.011-24.012.sql @@ -0,0 +1,66 @@ + + +EXEC core.fn_dropifexists 'p_ComplianceAccesscontainerUpdate', 'onprc_ehr_compliancedb', 'PROCEDURE'; +GO + +-- Author: R. Blasa +-- Created: 10-2-2024 + +/* +** +** Created by +** Blasa 9-5-2025 Storedprocedure to update Compliance Access contaimer values. +** . +** +** +** +*/ + +CREATE Procedure onprc_ehr_compliancedb.p_ComplianceAccesscontainerUpdate + + + AS + + + +BEGIN + + ------ Update container value and include as part of the main Compliance module + +If exists(Select * from ehr_Compliancedb.CompletionDates ss where ss.container = 'F1C05E2D-618D-103D-ABC9-9814909BFFCD' ) +BEGIN + +Update ss +set ss.container = 'CD170458-C55F-102F-9907-5107380A54BE' ----Compliance folder on Prime Production + + from ehr_Compliancedb.CompletionDates ss +Where ss.container = 'F1C05E2D-618D-103D-ABC9-9814909BFFCD' ---Compliance Access folder on Prime Production + + If @@Error <> 0 + GoTo Err_Proc + +END + +ELSE ------ No new entries exit +BEGIN + +GOTO No_Records + +END + + + + +No_Records: + + RETURN 0 + + +Err_Proc: + -------Error Generated, Transfer process stopped + RETURN 1 + + +END + +GO \ No newline at end of file diff --git a/ONPRC_EHR_ComplianceDB/src/org/labkey/ONPRCEHR_ComplianceDB/ONPRC_EHR_ComplianceDBModule.java b/ONPRC_EHR_ComplianceDB/src/org/labkey/ONPRCEHR_ComplianceDB/ONPRC_EHR_ComplianceDBModule.java index 993af29fb..d81498a0b 100644 --- a/ONPRC_EHR_ComplianceDB/src/org/labkey/ONPRCEHR_ComplianceDB/ONPRC_EHR_ComplianceDBModule.java +++ b/ONPRC_EHR_ComplianceDB/src/org/labkey/ONPRCEHR_ComplianceDB/ONPRC_EHR_ComplianceDBModule.java @@ -55,7 +55,7 @@ public String getName() @Override public Double getSchemaVersion() { - return 24.011; + return 24.012; } @Override diff --git a/onprc_ehr/resources/queries/ehr_lookups/pairingeventsAll.sql b/onprc_ehr/resources/queries/ehr_lookups/pairingeventsAll.sql deleted file mode 100644 index c0efb602a..000000000 --- a/onprc_ehr/resources/queries/ehr_lookups/pairingeventsAll.sql +++ /dev/null @@ -1,49 +0,0 @@ -select - value, - category, - sort_order, - date_disabled - -from ehr_lookups.pairingdividerchange - -union all - -select - value, - category, - sort_order, - date_disabled - -from ehr_lookups.pairingEventType - -union all - -select - value, - category, - sort_order, - date_disabled - -from ehr_lookups.pairing_infant_related - -union all - -select - value, - category, - sort_order, - date_disabled - -from ehr_lookups.pairing_STF_Beh - -union all - -select - value, - category, - sort_order, - date_disabled - -from ehr_lookups.pairing_STF_clinical - -order by category,value,sort_order \ No newline at end of file diff --git a/onprc_ehr/resources/web/onprc_ehr/model/sources/Pairing_Properties.js b/onprc_ehr/resources/web/onprc_ehr/model/sources/Pairing_Properties.js deleted file mode 100644 index 84267be89..000000000 --- a/onprc_ehr/resources/web/onprc_ehr/model/sources/Pairing_Properties.js +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2016-2017 LabKey Corporation - * - * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 - */ - -//Created 6-7-2016 R.Blasa -EHR.model.DataModelManager.registerMetadata('Pairing_Properties', { - allQueries: { - - }, - byQuery: { - - 'study.pairings': { - - outcome: { - allowBlank: false, - lookup: { - filterArray: [ - LABKEY.Filter.create('date_disabled', null, LABKEY.Filter.Types.ISBLANK) - ] - } - }, - - - goal: { - allowBlank: false, - lookup: { - filterArray: [ - LABKEY.Filter.create('date_disabled', null, LABKEY.Filter.Types.ISBLANK) - ] - } - }, - - eventtype: { - columnConfig: { - width: 250 - }, - editorConfig: { - caseSensitive: false, - anyMatch: true, - listConfig: { - innerTpl: '{[(values.category ? "" + LABKEY.Utils.encodeHtml(values.category) + ": " : "") + LABKEY.Utils.encodeHtml(values.value)]}', - getInnerTpl: function () { - return this.innerTpl; - } - } - }, - lookup: { - xtype: 'combobox', - schemaName: 'ehr_Lookups', - queryName: 'pairingeventsAll', - columns: 'value,category,sort_order,date_disabled', - keyColumn: 'value', - displayColumn: 'value', - sort: 'category,value,sort_order', - filterArray: [ - LABKEY.Filter.create('date_disabled', null, LABKEY.Filter.Types.ISBLANK) - ] - } - }, - - - enddate: { - hidden: false - }, - - separationreason: { - allowBlank: true, - - lookup: { - filterArray: [ - LABKEY.Filter.create('date_disabled', null, LABKEY.Filter.Types.ISBLANK) - ] - } - - }, - observation: { - allowBlank: true, - columnConfig: { - width: 200 - }, - lookup: { - filterArray: [ - LABKEY.Filter.create('date_disabled', null, LABKEY.Filter.Types.ISBLANK) - ] - } - - }, - - remark2: { - xtype: 'textareafield', - width: 400, - - }, - room: { - allowBlank: false, - }, - remark: { - width: 400 - }, - - } - - } -}); \ No newline at end of file From 94816da138d1d8e1474794fc56e61a971ef9763f Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Fri, 5 Sep 2025 18:03:23 -0700 Subject: [PATCH 4/4] Created a new program to allow Completion Dates entries made on the Complicance Access folder to be recorded onto the Compliaince main page. --- .../model/sources/Pairing_Properties.js | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 onprc_ehr/resources/web/onprc_ehr/model/sources/Pairing_Properties.js diff --git a/onprc_ehr/resources/web/onprc_ehr/model/sources/Pairing_Properties.js b/onprc_ehr/resources/web/onprc_ehr/model/sources/Pairing_Properties.js new file mode 100644 index 000000000..84267be89 --- /dev/null +++ b/onprc_ehr/resources/web/onprc_ehr/model/sources/Pairing_Properties.js @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2016-2017 LabKey Corporation + * + * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 + */ + +//Created 6-7-2016 R.Blasa +EHR.model.DataModelManager.registerMetadata('Pairing_Properties', { + allQueries: { + + }, + byQuery: { + + 'study.pairings': { + + outcome: { + allowBlank: false, + lookup: { + filterArray: [ + LABKEY.Filter.create('date_disabled', null, LABKEY.Filter.Types.ISBLANK) + ] + } + }, + + + goal: { + allowBlank: false, + lookup: { + filterArray: [ + LABKEY.Filter.create('date_disabled', null, LABKEY.Filter.Types.ISBLANK) + ] + } + }, + + eventtype: { + columnConfig: { + width: 250 + }, + editorConfig: { + caseSensitive: false, + anyMatch: true, + listConfig: { + innerTpl: '{[(values.category ? "" + LABKEY.Utils.encodeHtml(values.category) + ": " : "") + LABKEY.Utils.encodeHtml(values.value)]}', + getInnerTpl: function () { + return this.innerTpl; + } + } + }, + lookup: { + xtype: 'combobox', + schemaName: 'ehr_Lookups', + queryName: 'pairingeventsAll', + columns: 'value,category,sort_order,date_disabled', + keyColumn: 'value', + displayColumn: 'value', + sort: 'category,value,sort_order', + filterArray: [ + LABKEY.Filter.create('date_disabled', null, LABKEY.Filter.Types.ISBLANK) + ] + } + }, + + + enddate: { + hidden: false + }, + + separationreason: { + allowBlank: true, + + lookup: { + filterArray: [ + LABKEY.Filter.create('date_disabled', null, LABKEY.Filter.Types.ISBLANK) + ] + } + + }, + observation: { + allowBlank: true, + columnConfig: { + width: 200 + }, + lookup: { + filterArray: [ + LABKEY.Filter.create('date_disabled', null, LABKEY.Filter.Types.ISBLANK) + ] + } + + }, + + remark2: { + xtype: 'textareafield', + width: 400, + + }, + room: { + allowBlank: false, + }, + remark: { + width: 400 + }, + + } + + } +}); \ No newline at end of file