Skip to content

Commit

Permalink
Merge 23.11 to 24.3
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-teamcity committed May 27, 2024
2 parents 39355d2 + 83833c3 commit 5db5f47
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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. <br> 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. <br> 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: <br> <ul><li>Get an Animal ID(s)</li><li>Secure the numbers for processing</li><li>Finish entering data on acquired numbers</li></ul><br><b>When you enable the form for data entry all others will automatically be blocked from using the form.</b> <br>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 <i>please click the button below to exit data entry before leaving</i>, otherwise all other users will be permanently locked out. <br><br> 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: <br> <ul><li>Get an Animal ID(s)</li><li>Secure the numbers for processing</li><li>Finish entering data on acquired numbers</li></ul><br><b>When you enable the form for data entry all others will automatically be blocked from using the form.</b> <br>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 <i>please click the button below to exit data entry before leaving</i>, otherwise all other users will be permanently locked out. <br><br> 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',
Expand Down
3 changes: 1 addition & 2 deletions onprc_ehr/src/org/labkey/onprc_ehr/ONPRC_EHRModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public String getName()
@Override
public @Nullable Double getSchemaVersion()
{
return 23.011;
return 23.012;
}

@Override
Expand Down Expand Up @@ -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")));
Expand Down

0 comments on commit 5db5f47

Please sign in to comment.