Skip to content

Commit

Permalink
Merge branch 'main' into 2023_12_05_fix_eeg_chunk_gaps
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffersoncasimir authored Jan 23, 2024
2 parents 572da97 + 94c0adb commit 702438e
Show file tree
Hide file tree
Showing 176 changed files with 13,914 additions and 12,382 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ indent_size = 2

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ changes in the following format: PR #1234***
#### Bug Fixes
- Fix examiner site display (PR #8967)
- bvl_feedback updates in real-time (PR #8966)
- DoB and DoD format respected in candidate parameters (PR #9001)

## LORIS 25.0 (Release Date: ????-??-??)
### Core
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ data_release:
instrument_manager:
target=instrument_manager npm run compile

dataquery:
target=dataquery npm run compile

login:
target=login npm run compile

Expand Down
30 changes: 28 additions & 2 deletions SQL/0000-00-00-schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2278,7 +2278,7 @@ CREATE TABLE `consent` (
CREATE TABLE `candidate_consent_rel` (
`CandidateID` int(6) NOT NULL,
`ConsentID` integer unsigned NOT NULL,
`Status` enum('yes','no') DEFAULT NULL,
`Status` enum('yes','no', 'not_applicable') DEFAULT NULL,
`DateGiven` date DEFAULT NULL,
`DateWithdrawn` date DEFAULT NULL,
CONSTRAINT `PK_candidate_consent_rel` PRIMARY KEY (`CandidateID`,`ConsentID`),
Expand All @@ -2294,7 +2294,7 @@ CREATE TABLE `candidate_consent_history` (
`PSCID` varchar(255) NOT NULL,
`ConsentName` varchar(255) NOT NULL,
`ConsentLabel` varchar(255) NOT NULL,
`Status` enum('yes','no') DEFAULT NULL,
`Status` enum('yes','no', 'not_applicable') DEFAULT NULL,
`EntryStaff` varchar(255) DEFAULT NULL,
CONSTRAINT `PK_candidate_consent_history` PRIMARY KEY (`CandidateConsentHistoryID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Expand All @@ -2319,6 +2319,32 @@ CREATE TABLE `visit_project_cohort_rel` (
REFERENCES `project_cohort_rel`(`ProjectCohortRelID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Diagnosis Evolution
CREATE TABLE `diagnosis_evolution` (
`DxEvolutionID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Name` varchar(255) DEFAULT NULL,
`ProjectID` int(10) unsigned NOT NULL,
`visitLabel` varchar(255) DEFAULT NULL,
`instrumentName` varchar(255) DEFAULT NULL,
`sourceField` varchar(255) DEFAULT NULL,
`orderNumber` int(10) unsigned DEFAULT NULL,
CONSTRAINT `PK_diagnosis_evolution` PRIMARY KEY (`DxEvolutionID`),
CONSTRAINT `UK_diagnosis_evolution_Name` UNIQUE KEY `Name` (`Name`),
CONSTRAINT `FK_diagnosis_evolution_ProjectID` FOREIGN KEY (`ProjectID`) REFERENCES `Project` (`ProjectID`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `FK_diagnosis_evolution_instrumentName` FOREIGN KEY (`instrumentName`) REFERENCES `test_names` (`Test_name`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `candidate_diagnosis_evolution_rel` (
`CandID` int(6) NOT NULL,
`DxEvolutionID` int(10) unsigned NOT NULL,
`Diagnosis` text DEFAULT NULL,
`Confirmed` enum('Y', 'N') DEFAULT NULL,
`LastUpdate` datetime NOT NULL DEFAULT NOW() ON UPDATE NOW(),
CONSTRAINT `PK_candidate_diagnosis_evolution_rel` PRIMARY KEY (`CandID`, `DxEvolutionID`),
CONSTRAINT `FK_candidate_diagnosis_evolution_rel_CandID` FOREIGN KEY (`CandID`) REFERENCES `candidate` (`CandID`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `FK_candidate_diagnosis_evolution_rel_DxEvolutionID` FOREIGN KEY (`DxEvolutionID`) REFERENCES `diagnosis_evolution` (`DxEvolutionID`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Publication Status
CREATE TABLE `publication_status` (
`PublicationStatusID` int(2) unsigned NOT NULL AUTO_INCREMENT,
Expand Down
3 changes: 2 additions & 1 deletion SQL/0000-00-02-Permission.sql
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ INSERT INTO `permissions` VALUES
(60,'behavioural_quality_control_view','Flagged Behavioural Entries',(SELECT ID FROM modules WHERE Name='behavioural_qc'),'View','2'),
(61,'api_docs','API documentation',(SELECT ID FROM modules WHERE Name='api_docs'),'View','2'),
(62,'electrophysiology_browser_edit_annotations','Annotations',(SELECT ID FROM modules WHERE Name='electrophysiology_browser'),'Create/Edit','2'),
(63,'monitor_eeg_uploads','Monitor EEG uploads',(SELECT ID FROM modules WHERE Name='electrophysiology_uploader'),NULL,'2');
(63,'monitor_eeg_uploads','Monitor EEG uploads',(SELECT ID FROM modules WHERE Name='electrophysiology_uploader'),NULL,'2'),
(64,'dataquery_admin','Admin dataquery queries',(SELECT ID FROM modules WHERE Name='dataquery'),NULL,'2');

INSERT INTO `user_perm_rel` (userID, permID)
SELECT u.ID, p.permID
Expand Down
14 changes: 8 additions & 6 deletions SQL/0000-00-03-ConfigTables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,12 @@ INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType,
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'base', 'The base filesystem path where LORIS is installed', 1, 0, 'text', ID, 'Base', 1 FROM ConfigSettings WHERE Name="paths";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'DownloadPath', 'Where files are downloaded', 1, 0, 'text', ID, 'Downloads', 4 FROM ConfigSettings WHERE Name="paths";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'log', 'Path to logs (relative path starting from /var/www/$projectname)', 1, 0, 'text', ID, 'Logs', 2 FROM ConfigSettings WHERE Name="paths";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'MRICodePath', 'Path to directory where Loris-MRI (git) code is installed', 1, 0, 'text', ID, 'LORIS-MRI code', 6 FROM ConfigSettings WHERE Name="paths";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'MRIUploadIncomingPath', 'Path to the upload directory for incoming MRI studies', 1, 0, 'text', ID, 'MRI Incoming Directory', 7 FROM ConfigSettings WHERE Name="paths";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'GenomicDataPath', 'Path to Genomic data files', 1, 0, 'text', ID, 'Genomic Data Path', 8 FROM ConfigSettings WHERE Name="paths";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'mediaPath', 'Path to uploaded media files', 1, 0, 'text', ID, 'Media', 9 FROM ConfigSettings WHERE Name="paths";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'publication_uploads', 'Path to uploaded publications', 1, 0, 'web_path', ID, 'Publications', 10 FROM ConfigSettings WHERE Name="paths";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'publication_deletions', 'Path to deleted publications', 1, 0, 'web_path', ID, 'Deleted Publications', 11 FROM ConfigSettings WHERE Name="paths";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'MINCToolsPath', 'Path to the MINC tools', 1, 0, 'web_path', ID, 'Path to the MINC tools', 12 FROM ConfigSettings WHERE Name="paths";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'documentRepositoryPath', 'Path to uploaded document repository files', 1, 0, 'web_path', ID, 'Document Repository Upload Path', 13 FROM ConfigSettings WHERE Name="paths";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'dataReleasePath', 'Path to uploaded data release files', 1, 0, 'web_path', ID, 'Data release Upload Path', 14 FROM ConfigSettings WHERE Name="paths";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'EEGUploadIncomingPath', 'Path to the upload directory for incoming EEG studies', 1, 0, 'text', ID, 'EEG Incoming Directory', 7 FROM ConfigSettings WHERE Name="paths";



INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, Label, OrderNumber) VALUES ('gui', 'Settings related to the overall display of LORIS', 1, 0, 'GUI', 3);
Expand Down Expand Up @@ -130,7 +125,7 @@ INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType,
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'IssueTrackerDataPath', 'Path to Issue Tracker data files', 1, 0, 'web_path', ID, 'Issue Tracker Data Path', 8 FROM ConfigSettings WHERE Name="paths";

-- Loris-MRI/Imaging Pipeline options from the $profile (commonly "prod") file
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, Label, OrderNumber) VALUES ('imaging_pipeline', 'Imaging Pipeline settings', 1, 0, 'Imaging Pipeline', 12);
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, Label, OrderNumber) VALUES ('imaging_pipeline', 'Imaging Pipeline settings', 1, 0, 'Imaging Pipeline', 14);
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'dataDirBasepath', 'Base Path to the data directory of Loris-MRI', 1, 0, 'text', ID, 'Loris-MRI Data Directory', 1 FROM ConfigSettings WHERE Name="imaging_pipeline";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'prefix', 'Study prefix or study name', 1, 0, 'text', ID, 'Study Name', 2 FROM ConfigSettings WHERE Name="imaging_pipeline";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'mail_user', 'User to be notified during imaging pipeline execution', 1, 0, 'text', ID, 'User to notify when executing the pipeline', 3 FROM ConfigSettings WHERE Name="imaging_pipeline";
Expand Down Expand Up @@ -159,6 +154,9 @@ INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType,
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'reference_scan_type_for_defacing', 'Scan type to use as a reference for registration when defacing anatomical images (typically a T1W image)', 1, 0, 'scan_type', ID, 'Scan type to use as a reference for defacing (typically a T1W image)', 26 FROM ConfigSettings WHERE Name="imaging_pipeline";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'modalities_to_deface', 'Modalities for which defacing should be run and defaced image inserted in the database', 1, 1, 'scan_type', ID, 'Modalities on which to run the defacing pipeline', 27 FROM ConfigSettings WHERE Name="imaging_pipeline";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'MriPythonConfigFile', 'Name of the Python MRI config file (stored in dicom-archive/.loris_mri/)', 1, 0, 'text', ID, 'Name of the Python MRI config file', 28 FROM ConfigSettings WHERE Name="imaging_pipeline";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'MRICodePath', 'Path to directory where Loris-MRI (git) code is installed', 1, 0, 'text', ID, 'LORIS-MRI code', 6 FROM ConfigSettings WHERE Name="imaging_pipeline";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'MRIUploadIncomingPath', 'Path to the upload directory for incoming MRI studies', 1, 0, 'text', ID, 'MRI Incoming Directory', 7 FROM ConfigSettings WHERE Name="imaging_pipeline";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'MINCToolsPath', 'Path to the MINC tools', 1, 0, 'web_path', ID, 'Path to the MINC tools', 12 FROM ConfigSettings WHERE Name="imaging_pipeline";

-- MINC to BIDS converter settings
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, Label, OrderNumber) VALUES ('minc2bids', 'Settings related to converting MINC to BIDS LORIS-MRI tool script', 1, 0, 'MINC to BIDS Converter Tool Options', 13);
Expand All @@ -177,6 +175,10 @@ INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType,
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'AWS_S3_Region', 'AWS Region to use for accessing files stored in S3. Endpoint or region are required for S3 support.', 1, 0, 'text', ID, 'AWS S3 Region', 3 FROM ConfigSettings WHERE Name='aws';
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'AWS_S3_Default_Bucket', 'Default bucket for LORIS to use for accessing files in S3.', 1, 0, 'text', ID, 'AWS S3 Default Bucket', 3 FROM ConfigSettings WHERE Name='aws';

INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, Label, OrderNumber) VALUES ('eeg_pipeline', 'EEG Pipeline settings', 1, 0, 'EEG Pipeline', 15);
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'EEGS3DataPath', 'EEG S3 data path for assembly data', 1, 0, 'text', ID, 'EEG S3 data path', 15 FROM ConfigSettings WHERE Name = 'eeg_pipeline';
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'EEGUploadIncomingPath', 'Path to the upload directory for incoming EEG studies', 1, 0, 'text', ID, 'EEG Incoming Directory', 7 FROM ConfigSettings WHERE Name="eeg_pipeline";

--
-- Filling Config table with default values
--
Expand Down
2 changes: 1 addition & 1 deletion SQL/0000-00-05-ElectrophysiologyTables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ CREATE TABLE `physiological_annotation_rel` (
CREATE TABLE `electrophysiology_uploader` (
`UploadID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`UploadedBy` varchar(255) NOT NULL,
`UploadDate` DateTime NOT NULL,
`UploadDate` DateTime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`UploadLocation` varchar(255) NOT NULL,
`Status` enum('Not Started', 'Extracted', 'Failed Extraction', 'In Progress', 'Complete', 'Failed', 'Archived') DEFAULT 'Not Started',
`SessionID` int(10) unsigned,
Expand Down
6 changes: 6 additions & 0 deletions SQL/9999-99-99-drop_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ DROP TABLE IF EXISTS dataquery_query_names;
DROP TABLE IF EXISTS dataquery_queries;

-- 0000-00-05-ElectrophysiologyTables.sql
DROP TABLE IF EXISTS `physiological_event_parameter_category_level`;
DROP TABLE IF EXISTS `physiological_event_parameter`;
DROP TABLE IF EXISTS `physiological_event_archive`;
DROP TABLE IF EXISTS `physiological_event_file`;
DROP TABLE IF EXISTS `physiological_coord_system_electrode_rel`;
DROP TABLE IF EXISTS `physiological_coord_system_point_3d_rel`;
DROP TABLE IF EXISTS `point_3d`;
DROP TABLE IF EXISTS `physiological_coord_system`;
DROP TABLE IF EXISTS `physiological_coord_system_unit`;
DROP TABLE IF EXISTS `physiological_coord_system_name`;
DROP TABLE IF EXISTS `physiological_coord_system_type`;
DROP TABLE IF EXISTS `electrophysiology_uploader`;
DROP TABLE IF EXISTS `physiological_annotation_rel`;
DROP TABLE IF EXISTS `physiological_annotation_instance`;
DROP TABLE IF EXISTS `physiological_annotation_parameter`;
Expand Down Expand Up @@ -53,6 +58,7 @@ DROP TABLE IF EXISTS `issues`;
DROP TABLE IF EXISTS `issues_categories`;

-- 0000-00-02-Permission.sql
DROP TABLE IF EXISTS `testnames_permissions_rel`;
DROP TABLE IF EXISTS `user_perm_rel`;
DROP TABLE IF EXISTS `notification_modules_perm_rel`;
DROP TABLE IF EXISTS `permissions`;
Expand Down
1 change: 1 addition & 0 deletions SQL/Archive/25.0/2022-03-03-AddHEDTags.sql
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ INSERT INTO physiological_event_file (PhysiologicalFileID, FilePath, FileType)
UPDATE physiological_task_event te
SET EventFileID=(SELECT EventFileID FROM physiological_event_file WHERE PhysiologicalFileID=te.PhysiologicalFileID)
;
SET FOREIGN_KEY_CHECKS= 1;

-- Delete FilePath column in `physiological_task_event` table
ALTER TABLE physiological_task_event
Expand Down
24 changes: 24 additions & 0 deletions SQL/New_patches/2021-07-28_diagnosis_evolution.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
CREATE TABLE `diagnosis_evolution` (
`DxEvolutionID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Name` varchar(255) DEFAULT NULL,
`ProjectID` int(10) unsigned NOT NULL,
`visitLabel` varchar(255) DEFAULT NULL,
`instrumentName` varchar(255) DEFAULT NULL,
`sourceField` varchar(255) DEFAULT NULL,
`orderNumber` int(10) unsigned DEFAULT NULL,
CONSTRAINT `PK_diagnosis_evolution` PRIMARY KEY (`DxEvolutionID`),
CONSTRAINT `UK_diagnosis_evolution_Name` UNIQUE KEY `Name` (`Name`),
CONSTRAINT `FK_diagnosis_evolution_ProjectID` FOREIGN KEY (`ProjectID`) REFERENCES `Project` (`ProjectID`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `FK_diagnosis_evolution_instrumentName` FOREIGN KEY (`instrumentName`) REFERENCES `test_names` (`Test_name`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `candidate_diagnosis_evolution_rel` (
`CandID` int(6) NOT NULL,
`DxEvolutionID` int(10) unsigned NOT NULL,
`Diagnosis` text DEFAULT NULL,
`Confirmed` enum('Y', 'N') DEFAULT NULL,
`LastUpdate` datetime NOT NULL DEFAULT NOW() ON UPDATE NOW(),
CONSTRAINT `PK_candidate_diagnosis_evolution_rel` PRIMARY KEY (`CandID`, `DxEvolutionID`),
CONSTRAINT `FK_candidate_diagnosis_evolution_rel_CandID` FOREIGN KEY (`CandID`) REFERENCES `candidate` (`CandID`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `FK_candidate_diagnosis_evolution_rel_DxEvolutionID` FOREIGN KEY (`DxEvolutionID`) REFERENCES `diagnosis_evolution` (`DxEvolutionID`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
8 changes: 8 additions & 0 deletions SQL/New_patches/2023-04-25-FixIssueWrongModuleID.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- NOTE: This SQL patch follows up the running of single use tool `tools/single_use/Convert_LorisMenuID_to_ModuleID.php`
-- that was necessary to upgrade the `issues` table from LORIS version 22 to version 23. The tool forgot
-- to include an upgrade of the `issues_history` table, which is now tackled by this SQL patch.

-- delete from issues_history any orphaned module IDs
DELETE FROM issues_history WHERE fieldChanged='module' AND issueID IN (SELECT issueID FROM issues WHERE module IS NULL);
-- set issues history module ID to correct moduleID, replacing old LorisMenu ID
UPDATE issues_history ih SET newValue=(SELECT i.module FROM issues i WHERE i.issueID=ih.issueID) WHERE fieldChanged='module';
55 changes: 55 additions & 0 deletions SQL/New_patches/2023-05-01-imaging-eeg-configs.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
-- Add the EEG Pipeline Config group
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, Label, OrderNumber)
VALUES ('eeg_pipeline', 'EEG Pipeline settings', 1, 0, 'EEG Pipeline', 15);

-- Add the EEGS3DataPath Config
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, Label, OrderNumber, Parent)
SELECT 'EEGS3DataPath', 'EEG S3 data path for assembly data', 1, 0, 'EEG S3 data path', 15, ID
FROM ConfigSettings
WHERE Name = 'eeg_pipeline';

UPDATE
ConfigSettings cs1,
(
SELECT *
FROM ConfigSettings
WHERE Name = 'eeg_pipeline'
) AS cs2
SET cs1.Parent = cs2.ID
WHERE cs1.Name = 'EEGUploadIncomingPath';

-- Add the Imaging Pipeline Config group
UPDATE ConfigSettings SET OrderNumber = 14 WHERE Name = 'imaging_pipeline';

UPDATE
ConfigSettings cs1,
(
SELECT *
FROM ConfigSettings
WHERE Name = 'imaging_pipeline'
) AS cs2
SET cs1.Parent = cs2.ID
WHERE cs1.Name = 'MRICodePath';

UPDATE
ConfigSettings cs1,
(
SELECT *
FROM ConfigSettings
WHERE Name = 'imaging_pipeline'
) AS cs2
SET cs1.Parent = cs2.ID
WHERE cs1.Name = 'MRIUploadIncomingPath';

UPDATE
ConfigSettings cs1,
(
SELECT *
FROM ConfigSettings
WHERE Name = 'imaging_pipeline'
) AS cs2
SET cs1.Parent = cs2.ID
WHERE cs1.Name = 'MINCToolsPath';

-- Add default value to electrophysiology_uploader UploadDate
ALTER TABLE `electrophysiology_uploader` MODIFY COLUMN `UploadDate` DateTime NOT NULL DEFAULT CURRENT_TIMESTAMP;
2 changes: 2 additions & 0 deletions SQL/New_patches/2023-06-06-add_NA_to_consent_status.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE candidate_consent_rel MODIFY COLUMN `Status` enum('yes', 'no', 'not_applicable') DEFAULT NULL;
ALTER TABLE candidate_consent_history MODIFY COLUMN `Status` enum('yes', 'no', 'not_applicable') DEFAULT NULL;
6 changes: 6 additions & 0 deletions SQL/New_patches/2023-12-02-DQT-AdminPermission.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
INSERT INTO permissions (code, description, moduleID)
VALUES (
'dataquery_admin',
'Dataquery Admin',
(SELECT ID FROM modules WHERE Name='dataquery')
);
Loading

0 comments on commit 702438e

Please sign in to comment.