Skip to content

Commit

Permalink
[tools][CouchDB_MRI_Importer] Fix date in MRI data (#8851)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
charlottesce authored Aug 16, 2023
1 parent c6c05ae commit 6705373
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/CouchDB_MRI_Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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']);
Expand Down

0 comments on commit 6705373

Please # to comment.