From 83833c35c65e05937d9c8865c896ba43a0baf435 Mon Sep 17 00:00:00 2001 From: Lakshmi Kolli <69940873+kollil@users.noreply.github.com> Date: Tue, 21 May 2024 15:22:58 -0700 Subject: [PATCH] Replaced the onprcitsupport email in two locations: (#1021) 1. Altered MPA clinical remarks data entry stored proc 2. LockAnimalsPanel text --- .../sqlserver/onprc_ehr-23.011-23.012.sql | 52 +++++++++++++++++++ .../web/onprc_ehr/panel/LockAnimalsPanel.js | 2 +- .../org/labkey/onprc_ehr/ONPRC_EHRModule.java | 3 +- 3 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 onprc_ehr/resources/schemas/dbscripts/sqlserver/onprc_ehr-23.011-23.012.sql diff --git a/onprc_ehr/resources/schemas/dbscripts/sqlserver/onprc_ehr-23.011-23.012.sql b/onprc_ehr/resources/schemas/dbscripts/sqlserver/onprc_ehr-23.011-23.012.sql new file mode 100644 index 000000000..06353255d --- /dev/null +++ b/onprc_ehr/resources/schemas/dbscripts/sqlserver/onprc_ehr-23.011-23.012.sql @@ -0,0 +1,52 @@ +-- Alter the stored proc +/****** Object: StoredProcedure [onprc_ehr].[MPA_ClnRemarkAddition] Script Date: 5/17/2024 *****/ +-- ================================================================================= +-- Author: Lakshmi Kolli +-- Create date: 5/17/2024 +-- Description: Altering the procedure with the new ONPRC email address +-- ================================================================================= + +ALTER PROCEDURE [onprc_ehr].[MPA_ClnRemarkAddition] +AS + +DECLARE +@MPACount Int, +@taskId nvarchar(4000), +@displayName nvarchar(250) + +BEGIN + --Delete all rows from the temp_Drug table + Delete From onprc_ehr.Temp_ClnRemarks + + --Check if the MPA injection E-85760 was administered today + Select @MPACount = COUNT(*) From studyDataset.c6d178_drug + Where code = 'E-85760' And CONVERT(DATE, date) = CONVERT(DATE, GETDATE()) And qcstate = 18 + + --Found entries, so, enter the clinical remarks now + If @MPACount > 0 + Begin + -- Get the displayName for user: onprc-is from core.users table + Select @displayName = displayName from core.users where userid = 1003 + + -- Create a Task entry in ehr.tasks table + Set @taskid = NEWID() -- creating taskid + Insert Into ehr.tasks + (taskid, category, title, formtype, qcstate, assignedto, duedate, createdby, created, + container, modifiedby, modified, description, datecompleted) + Values + (@taskid, 'Task', 'Bulk Clinical Entry', 'Bulk Clinical Entry', 18, 1003, GETDATE(), 1003, GETDATE(), + 'CD17027B-C55F-102F-9907-5107380A54BE', 1003, GETDATE(), 'Created by the ETL process', GETDATE()) + + --Insert the clinical remark into the temp clinical remarks table. + /* Get all the Animals who had MPA injection today from studyDataset.c6d178_drug + and INSERT the data into the studyDataset.c6d185_clinremarks table */ + Insert Into onprc_ehr.Temp_ClnRemarks ( + date, qcstate, participantid, project, remark, p, performedby, category, taskid, createdby, modifiedby + ) + Select GETDATE(), 18, participantid, project, 'Remark entered by the ETL process', 'MPA injection administered', @displayName, 'Clinical', @taskId, 1003, 1003 + From studyDataset.c6d178_drug + Where code = 'E-85760' And CONVERT(DATE, date) = CONVERT(DATE, GETDATE()) And qcstate = 18 + End +END + +GO \ No newline at end of file diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/LockAnimalsPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/LockAnimalsPanel.js index 27ccd0417..cdc7056a8 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/LockAnimalsPanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/LockAnimalsPanel.js @@ -15,7 +15,7 @@ Ext4.define('ONPRC_EHR.panel.LockAnimalsPanel', { }, items: [{ //html: 'The creation of new animals can be locked, in order to prevent the creation of new animals during processing.
The Birth/Arrival data entry screen is disabled by default. Please click the "CLICK HERE TO ENABLE THE SCREEN FOR DATA ENTRY" button to enable the screen for data entry.
Please click on "CLICK HERE TO UNLOCK THE SCREEN" to disable the screen. Therefore, the screen becomes available for other users to do Birth/Arrival data entries!' , - html: 'The birth/arrival screen will be disabled as a default. You must enable the form in order to:

When you enable the form for data entry all others will automatically be blocked from using the form.
Once you "Submit for Review" or "Save and Close", the birth/arrival form will be automatically be available for all other users. If you do not submit/save please click the button below to exit data entry before leaving, otherwise all other users will be permanently locked out.

If the birth/arrival form is unavailable and you believe it has been kept locked by mistake please first contact the person who locked the form. If they cannot be reached and it is a weekday please e-mail onprcitsupport@ohsu.edu with the subject "Priority 1 Work Stoppage: birth/arrival Form Locked". If it is a weekend please contact an RFO lead tech. Please take care not to request the birth/arrival form be unlocked unless you are confident the lock is in error, otherwise you will kick a user out of the birth/arrival form and prevent data entry.' , + html: 'The birth/arrival screen will be disabled as a default. You must enable the form in order to:

When you enable the form for data entry all others will automatically be blocked from using the form.
Once you "Submit for Review" or "Save and Close", the birth/arrival form will be automatically be available for all other users. If you do not submit/save please click the button below to exit data entry before leaving, otherwise all other users will be permanently locked out.

If the birth/arrival form is unavailable and you believe it has been kept locked by mistake please first contact the person who locked the form. If they cannot be reached and it is a weekday please e-mail onprc-is@ohsu.edu with the subject "Priority 1 Work Stoppage: birth/arrival Form Locked". If it is a weekend please contact an RFO lead tech. Please take care not to request the birth/arrival form be unlocked unless you are confident the lock is in error, otherwise you will kick a user out of the birth/arrival form and prevent data entry.' , style: 'padding-bottom: 10px;' },{ itemId: 'infoArea', 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 94c83e7c1..bfb4c126e 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/ONPRC_EHRModule.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/ONPRC_EHRModule.java @@ -126,7 +126,7 @@ public String getName() @Override public @Nullable Double getSchemaVersion() { - return 23.011; + return 23.012; } @Override @@ -595,7 +595,6 @@ public String toString() EHRService.get().registerFormType(new DefaultDataEntryFormFactory(EnvironmentalATPFormType.class, this)); - //single section forms EHRService.get().registerSingleFormOverride(new SingleQueryFormProvider(this, "study", "treatment_order", new MedicationsQueryFormSection("study", "Treatment Orders", "Medication/Treatment Orders"))); EHRService.get().registerSingleFormOverride(new SingleQueryFormProvider(this, "study", "drug", new MedicationsQueryFormSection("study", "Drug Administration", "Medication/Treatments Given")));