-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MRI Violated scans] Have the minc file linked to brainbrowser (Redmine 10928) #2219
Changes from 4 commits
a15c7af
fff0e86
ace9db3
6f35074
99d07e1
89ae9e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,11 +148,14 @@ class NDB_Menu_Filter_Form_mri_violations extends NDB_Menu_Filter_Form | |
$useProjects = true; | ||
} | ||
|
||
$dir_path = $config->getSetting("imagePath"); | ||
|
||
$this->columns = array( | ||
'v.PatientName', | ||
'v.Site', | ||
'v.TimeRun', | ||
'v.MincFile', | ||
'v.MincFileViolated', | ||
'v.Series_Description as Series_Description_Or_Scan_Type', | ||
'v.Problem', | ||
'v.SeriesUID', | ||
|
@@ -171,6 +174,7 @@ class NDB_Menu_Filter_Form_mri_violations extends NDB_Menu_Filter_Form | |
c.ProjectID as Project, | ||
s.SubprojectID as Subproject, | ||
minc_location as MincFile, | ||
CONCAT_WS('','" . $dir_path . "','trashbin/',SUBSTRING_INDEX(minc_location, '/', -2)) as MincFileViolated, | ||
series_description as Series_Description, | ||
'Could not identify scan type' as Problem, | ||
SeriesUID, | ||
|
@@ -195,6 +199,7 @@ class NDB_Menu_Filter_Form_mri_violations extends NDB_Menu_Filter_Form | |
c.ProjectID as Project, | ||
s.SubprojectID as Subproject, | ||
MincFile, | ||
IF(INSTR(`MincFile`, 'assembly'), IF(LEFT(`MincFile`, 8) = 'assembly',CONCAT_WS('','" . $dir_path . "',`MincFile`),`MincFile`), CONCAT_WS('','" . $dir_path . "','trashbin/',SUBSTRING_INDEX(MincFile, '/', -2))) as MincFileViolated, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line seems really complex and hard to understand. Does whatever it's doing need to be in SQL or can it be done in code? Either way, it should at least have a comment explaining it. (dir_path should also be quoted using the db quote function) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comments added. |
||
mri_scan_type.Scan_type, | ||
'Protocol Violation', | ||
SeriesUID, | ||
|
@@ -221,6 +226,7 @@ class NDB_Menu_Filter_Form_mri_violations extends NDB_Menu_Filter_Form | |
c.ProjectID as Project, | ||
s.SubprojectID as Subproject, | ||
MincFile, | ||
CONCAT_WS('','" . $dir_path . "','trashbin/',SUBSTRING_INDEX(MincFile, '/', -2)) as MincFileViolated, | ||
null, | ||
Reason, | ||
SeriesUID, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should use the $DB->quote function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done