[Loris-dev] [IPMSA] Error: DBD::mysql::st execute failed: Incorrect date value: '' for column 'DateAcquired'

Cecile Madjar cecile.madjar at mcin.ca
Tue Apr 9 10:08:34 EDT 2019


Hi Alfredo,

Could you take a look at the date field of your DICOMs? Is it possible that
the date of acquisition was removed from the dataset?

If so, this will be fixed with the release 20.3 of LORIS-MRI that should be
released in April. In the meantime, you can take a look at the following PR
that resolves all the issues in the insertion pipeline when no dates are
available in a DICOM dataset: https://github.com/aces/Loris-MRI/pull/395

Hope this helps.
Let me know how this goes or if you encounter additional issues!

Cécile

On Mon, Apr 8, 2019 at 6:37 PM Morales Pinzon, Alfredo <
AMORALESPINZON at bwh.harvard.edu> wrote:

> Dear LorisDev team,
>
> I have 2 MRI sessions that could not be uploaded due to the following
> error:
>
> --------------------------
> Use of uninitialized value $_ in pattern match (m//) at
> /AAA/loris_data/IPMSA/bin/mri//batch_uploads_imageuploader line 92.
> DBD::mysql::st execute failed: Incorrect date value: '' for column
> 'DateAcquired' at row 1 at
> /AAA/loris_data/IPMSA/bin/mri/dicom-archive/DICOM/DCMSUM.pm line 238.
> DBD::mysql::st execute failed: Cannot add or update a child row: a foreign
> key constraint fails (`IPMSA_LORIS`.`tarchive_series`, CONSTRAINT
> `tarchive_series_ibfk_1` FOREIGN KEY (`TarchiveID`) REFERENCES `tarchive`
> (`TarchiveID`) ON DELETE CASCADE) at
> /AAA/loris_data/IPMSA/bin/mri/dicom-archive/DICOM/DCMSUM.pm line 324.
> DBD::mysql::st execute failed: Cannot add or update a child row: a foreign
> key constraint fails (`IPMSA_LORIS`.`tarchive_series`, CONSTRAINT
> `tarchive_series_ibfk_1` FOREIGN KEY (`TarchiveID`) REFERENCES `tarchive`
> (`TarchiveID`) ON DELETE CASCADE) at
> /AAA/loris_data/IPMSA/bin/mri/dicom-archive/DICOM/DCMSUM.pm line 324.
> --------------------------
>
> This is what I get in the log
> file: /AAA/ANOM/CCC//log_batch_imageuploader_AAA10292_850501_w048.txt
> --------------------------
> Running now the following command:
> /AAA/loris_data/BBB/bin/mri/uploadNeuroDB/imaging_upload_file.pl -profile
> prod -upload_id 20872 /AAA/ANOM/CCC//AAA10292_850501_w048.tar.gz -verbose
>
> /AAA/loris_data/BBB/bin/mri/dicom-archive/dicomTar.pl
> /tmp/ImagingUpload-12-4-kG9b0L /AAA/loris_data/BBB/data/tarchive -clobber
> -database -profile prod -verbose
>  Source: /tmp/ImagingUpload-12-4-kG9b0L
> Target: /AAA/loris_data/BBB/data/tarchive
>
> Testing for database connectivity.
> Database is available.
>
> You will archive the dir                : ImagingUpload-12-4-kG9b0L
>
> You are creating a tar with the following command:
> tar -cf /AAA/loris_data/BBB/data/tarchive/ImagingUpload-12-4-kG9b0L.tar
> ImagingUpload-12-4-kG9b0L
>
>
> getting md5sums and gzipping!!
>
> * Taken from dir                   :    /tmp/ImagingUpload-12-4-kG9b0L
> * Archive target location          :
>  /AAA/loris_data/BBB/tarchive/DCM__ImagingUpload-12-4-kG9b0L.tar
> * Name of creating host            :    132.216.133.49
> * Name of host OS                  :    Linux
> * Created by user                  :    lorisadmin
> * Archived on                      :    2019-04-07 12:05:46
> * dicomSummary version             :    1
> * dicomTar version                 :    1
> * md5sum for DICOM tarball         :    19fbaf1fcab253c3bdf741f4b7b5d4a2
>  ImagingUpload-12-4-kG9b0L.tar
> * md5sum for DICOM tarball gzipped :    3611bbab463663880c58fe32def90c8a
>  ImagingUpload-12-4-kG9b0L.tar.gz
> * md5sum for complete archive      :    2dc51a007126ad41e8e0195eda37a378
>  DCM__ImagingUpload-12-4-kG9b0L.tar
>
> Adding archive info into database
> Failed running query:           INSERT INTO
>  tarchive SET           DicomArchiveID = ?,       PatientName = ?,
> PatientID = ?,            PatientDoB = ?,         PatientGender = ?,
>  DateAcquired = ?,         ScannerManufacturer = ?,  ScannerModel = ?,
>     ScannerSerialNumber = ?,  ScannerSoftwareVersion = ?,
> CenterName = ?,           AcquisitionCount = ?,         NonDicomFileCount =
> ?,    DicomFileCount = ?,         CreatingUser = ?,         SourceLocation
> = ?,         sumTypeVersion = ?,       AcquisitionMetadata = ?,
> DateLastArchived = NOW() ,  tarTypeVersion = ?,             md5sumArchive =
> ?,   md5sumDicomOnly = ?,             ArchiveLocation = ?, CreateInfo = ?
>  ,              DateFirstArchived = NOW(),              neurodbCenterName =
> ?
>
>
>
> Removing temporary files from target location
>
>
> The database command failed
>
> The dicomtar execution has failed
> --------------------------
>
> This cases were part of a list of 82 cases where 65 were correctly
> uploaded (15 had another type of error that I just reported in a different
> email). I can review the files with somebody from your team if required.
>
> Best regards,
> Alfredo.
> _______________________________________________
> Loris-dev mailing list
> Loris-dev at bic.mni.mcgill.ca
> https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20190409/3d74497b/attachment-0001.html>


More information about the Loris-dev mailing list