Skip to content

Commit

Permalink
[EEG] EEG uploader module
Browse files Browse the repository at this point in the history
  • Loading branch information
laemtl committed Feb 24, 2023
1 parent de56976 commit 66babb4
Show file tree
Hide file tree
Showing 14 changed files with 1,705 additions and 1 deletion.
1 change: 1 addition & 0 deletions SQL/0000-00-01-Modules.sql
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ INSERT INTO modules (Name, Active) VALUES ('timepoint_list', 'Y');
INSERT INTO modules (Name, Active) VALUES ('user_accounts', 'Y');
INSERT INTO modules (Name, Active) VALUES ('electrophysiology_browser', 'Y');
INSERT INTO modules (Name, Active) VALUES ('dqt', 'Y');
INSERT INTO modules (Name, Active) VALUES ('electrophysiology_uploader', 'Y');

ALTER TABLE issues ADD CONSTRAINT `fk_issues_7` FOREIGN KEY (`module`) REFERENCES `modules` (`ID`);
4 changes: 3 additions & 1 deletion SQL/0000-00-03-ConfigTables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType,
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 @@ -284,4 +286,4 @@ INSERT INTO Config (ConfigID, Value) SELECT ID, '' FROM ConfigSettings WHERE Na
INSERT INTO Config (ConfigID, Value) SELECT ID, '' FROM ConfigSettings WHERE Name='bids_dataset_authors';
INSERT INTO Config (ConfigID, Value) SELECT ID, '' FROM ConfigSettings WHERE Name='bids_acknowledgments_text';
INSERT INTO Config (ConfigID, Value) SELECT ID, '' FROM ConfigSettings WHERE Name='bids_readme_text';
INSERT INTO Config (ConfigID, Value) SELECT ID, '' FROM ConfigSettings WHERE Name='bids_validator_options_to_ignore';
INSERT INTO Config (ConfigID, Value) SELECT ID, '' FROM ConfigSettings WHERE Name='bids_validator_options_to_ignore';
15 changes: 15 additions & 0 deletions SQL/0000-00-05-ElectrophysiologyTables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,21 @@ CREATE TABLE `physiological_annotation_rel` (
REFERENCES `physiological_annotation_file` (`AnnotationFileID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Create EEG upload table
CREATE TABLE `electrophysiology_uploader` (
`UploadID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`UploadedBy` varchar(255) NOT NULL DEFAULT '',
`UploadDate` DateTime DEFAULT NULL,
`UploadLocation` varchar(255) NOT NULL DEFAULT '',
`Status` enum('Not Started', 'In Progress', 'Complete', 'Failed') DEFAULT 'Not Started',
`SessionID` int(10) unsigned NOT NULL default '0',
`MetaData` TEXT default NULL,
PRIMARY KEY (`UploadID`),
KEY (`SessionID`),
CONSTRAINT `FK_eegupload_SessionID`
FOREIGN KEY (`SessionID`) REFERENCES `session` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Insert into physiological_output_type
INSERT INTO physiological_output_type
(`OutputTypeName`, `OutputTypeDescription`)
Expand Down
21 changes: 21 additions & 0 deletions SQL/New_patches/2023-02-24-electrophysiology_uploader.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-- Create EEG upload table
CREATE TABLE `electrophysiology_uploader` (
`UploadID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`UploadedBy` varchar(255) NOT NULL DEFAULT '',
`UploadDate` DateTime DEFAULT NULL,
`UploadLocation` varchar(255) NOT NULL DEFAULT '',
`Status` enum('Not Started', 'In Progress', 'Complete', 'Failed') DEFAULT 'Not Started',
`SessionID` int(10) unsigned NOT NULL default '0',
`MetaData` TEXT default NULL,
PRIMARY KEY (`UploadID`),
KEY (`SessionID`),
CONSTRAINT `FK_eegupload_SessionID`
FOREIGN KEY (`SessionID`) REFERENCES `session` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Add to module table
INSERT INTO modules (Name, Active) VALUES ('electrophysiology_uploader', 'Y');

-- Add new configurations for eeg uploader
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";

Loading

0 comments on commit 66babb4

Please sign in to comment.