From 6705373508e679bb5052c52bc19ab6cf038f2a2b Mon Sep 17 00:00:00 2001 From: charlottesce <75381352+charlottesce@users.noreply.github.com> Date: Wed, 16 Aug 2023 09:47:53 -0400 Subject: [PATCH] [tools][CouchDB_MRI_Importer] Fix date in MRI data (#8851) - Fix date imported into DQT to be a real date rather than a unix timestamp. - Fix incorrect order of parameters to `join` in import script --- tools/CouchDB_MRI_Importer.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/CouchDB_MRI_Importer.php b/tools/CouchDB_MRI_Importer.php index c58c28f73c5..a8d3dde87ec 100755 --- a/tools/CouchDB_MRI_Importer.php +++ b/tools/CouchDB_MRI_Importer.php @@ -249,7 +249,10 @@ function _addMRIHeaderInfo($FileObj, $scan_type) $FileObj, 'acquisition_date' ); - $header['FileInsertDate_'.$type] = $FileObj->getParameter('InsertTime'); + $header['FileInsertDate_'.$type] = date( + 'Y-m-d', + $FileObj->getParameter('InsertTime') + ); $header['SeriesDescription_'.$type] = $FileObj->getParameter($ser_desc); $header['SeriesNumber_'.$type] = $FileObj->getParameter($ser_num); $header['EchoTime_'.$type] = number_format( @@ -438,7 +441,7 @@ function updateCandidateDocs($data, $ScanTypes) $row['PSCID'], $row['Visit_label'], ]; - $docid = 'MRI_Files:' . join($identifier, '_'); + $docid = 'MRI_Files:' . join('_', $identifier); unset($doc['PSCID']); unset($doc['Visit_label']); unset($doc['SessionID']);