From 1fff7f9032ae1e14e4edec57e2cf20424443a6fe Mon Sep 17 00:00:00 2001 From: ridz1208 Date: Fri, 6 Dec 2019 12:32:58 -0500 Subject: [PATCH] [DQT Importer] Issue where script breaks if scantype has a '-' character oops --- tools/CouchDB_MRI_Importer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/CouchDB_MRI_Importer.php b/tools/CouchDB_MRI_Importer.php index 61257edb8bd..f065a207313 100755 --- a/tools/CouchDB_MRI_Importer.php +++ b/tools/CouchDB_MRI_Importer.php @@ -99,12 +99,12 @@ function _generateCandidatesQuery($ScanTypes) $Query .= ", (SELECT f.File FROM files f LEFT JOIN mri_scan_type msc ON (msc.ID= f.AcquisitionProtocolID) WHERE f.SessionID=s.ID AND msc.Scan_type='$scantype' LIMIT 1) - as Selected_$scantype, (SELECT fqc.QCStatus + as `Selected_$scantype`, (SELECT fqc.QCStatus FROM files f LEFT JOIN files_qcstatus fqc USING(FileID) LEFT JOIN mri_scan_type msc ON(msc.ID= f.AcquisitionProtocolID) WHERE f.SessionID=s.ID AND msc.Scan_type='$scantype' LIMIT 1) - as $scantype"."_QCStatus"; + as `$scantype"."_QCStatus`"; } $Query .= " FROM session s JOIN candidate c USING (CandID) LEFT JOIN feedback_mri_comments fmric