<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div class="">Dear LorisDev team.</div>
<div class=""><br class="">
</div>
<div class="">I have an insertion error in LORIS where a scan of subject was added to a different subject. I reviewed the scripts I am using and the logs from my scripts and from LORIS, and everything looks fine except the minc files that were created in LORIS.</div>
<div class=""><br class="">
</div>
<div class="">The error surfaced when I was trying to upload a minc file to a subject. LORIS was replying with the following message:</div>
<div class=""><br class="">
</div>
<div class="">===</div>
<div class="">log dir is /data_/ipmsa/loris_data/IPMSA/data/logs and log file is /data_/ipmsa/loris_data/IPMSA/data/logs/TarLoad-20-14-uvzbWX.log</div>
<div class=""><br class="">
</div>
<div class="">--> <font color="#ff1f00" class="">ERROR: there is already a file registered in the files table with SeriesUID='1.2.840.113619.2.25.4.2418272.1367947481.424' and EchoTime='0.081816'.</font></div>
<div class=""><font color="#ff1f00" class=""> The already registered file is 'assembly/240720/105ms302w48/mri/native/IPMSA_240720_105ms302w48_t2w_001.mnc'</font></div>
<div class=""> SELECT ArchiveLocation FROM tarchive WHERE TarchiveID = ( SELECT TarchiveID FROM tarchive_series WHERE SeriesUID=? AND EchoTime=? )
PSCID is: AZH101303</div>
<div class=""> CandID id: 814099</div>
<div class=""> visit_label is: 105ms302w48</div>
<div class="">PSCID is: AZH101303</div>
<div class=""> CandID id: 814099</div>
<div class=""> visit_label is: 105ms302w48</div>
<div class="">=== </div>
<div class=""><br class="">
</div>
<div class="">Based on that error, I looked at the provenance of the file "assembly/240720/105ms302w48/mri/native/IPMSA_240720_105ms302w48_t2w_001.mnc". I extracted the header for that file and found that indeed it has the same "SeriesInstanceUID"</div>
<div class=""><br class="">
</div>
<div class="">===</div>
<div class="">$ mincheader /data_/ipmsa/loris_data/IPMSA/data/assembly/240720/105ms302w48/mri/native/IPMSA_240720_105ms302w48_t2w_001.mnc | grep 0x0020:el_0x000e</div>
<div class=""><font color="#ff1f00" class="">dicom_0x0020:el_0x000e = "1.2.840.113619.2.25.4.2418272.1367947481.424" ;</font></div>
<div class="">===</div>
<div class=""><br class="">
</div>
<div class="">Then I found for the tarfile associated with that the visit for that minc file:</div>
<div class=""><br class="">
</div>
<div class="">===</div>
<div class="">SELECT DicomArchiveID, PatientID, PatientName, PatientDoB, PatientSex, neurodbCenterName, CenterName, LastUpdate, DateAcquired, DateFirstArchived, DateLastArchived, AcquisitionCount, NonDicomFileCount, DicomFileCount, md5sumDicomOnly, md5sumArchive,
CreatingUser, sumTypeVersion, tarTypeVersion, SourceLocation, ArchiveLocation, ScannerManufacturer, ScannerModel, ScannerSerialNumber, ScannerSoftwareVersion, SessionID, uploadAttempt, CreateInfo, TarchiveID, DateSent, PendingTransfer</div>
<div class=""> -> FROM tarchive</div>
<div class=""> -> WHERE SessionID IN ( SELECT ID FROM session WHERE CandID=240720 AND Visit_label='105ms302w48') \G;</div>
<div class="">*************************** 1. row ***************************</div>
<div class=""> DicomArchiveID: 1.3.12.2.1107.5.2.30.26523.30000014071913412629600000031</div>
<div class=""> PatientID: 105MS301_272-CAA-1_ccc_272-903_105MS302-w48</div>
<div class=""> PatientName: BAG272302_240720_105ms302w48</div>
<div class=""> PatientDoB: 1980-10-12</div>
<div class=""> PatientSex: Anonymized</div>
<div class=""> neurodbCenterName: NULL</div>
<div class=""> CenterName: Anonymized</div>
<div class=""> LastUpdate: NULL</div>
<div class=""> DateAcquired: 2014-07-19</div>
<div class=""> DateFirstArchived: 2020-11-24 07:56:13</div>
<div class=""> DateLastArchived: 2020-11-24 07:56:13</div>
<div class=""> AcquisitionCount: 5</div>
<div class=""> NonDicomFileCount: 0</div>
<div class=""> DicomFileCount: 300</div>
<div class=""> md5sumDicomOnly: 7d9e2c2e653de5586b30ad6125115441 ImagingUpload-7-24-6mxg7z.tar</div>
<div class=""><br class="">
</div>
<div class=""> md5sumArchive: 6d50ab9ebd4d2174eb961be7298b536f DCM_2014-07-19_ImagingUpload-7-24-6mxg7z.tar</div>
<div class=""><br class="">
</div>
<div class=""> CreatingUser: lorisadmin</div>
<div class=""> sumTypeVersion: 1</div>
<div class=""> tarTypeVersion: 1</div>
<div class=""> SourceLocation: /tmp/ImagingUpload-7-24-6mxg7z</div>
<div class=""> ArchiveLocation: 2014/DCM_2014-07-19_ImagingUpload-7-24-6mxg7z.tar</div>
<div class=""> ScannerManufacturer: SIEMENS</div>
<div class=""> ScannerModel: Avanto</div>
<div class=""> ScannerSerialNumber: 26523</div>
<div class="">ScannerSoftwareVersion: syngo MR B15</div>
<div class=""> SessionID: 116004</div>
<div class=""> uploadAttempt: 0</div>
<div class=""> CreateInfo: </div>
<div class="">* Taken from dir : /tmp/ImagingUpload-7-24-6mxg7z</div>
<div class="">* Archive target location : /data_/ipmsa/loris_data/IPMSA/data/tarchive/DCM_2014-07-19_ImagingUpload-7-24-6mxg7z.tar</div>
<div class="">* Name of creating host : 132.216.133.49</div>
<div class="">* Name of host OS : Linux</div>
<div class="">* Created by user : lorisadmin</div>
<div class="">* Archived on : 2020-11-24 07:54:05</div>
<div class="">* dicomSummary version : 1</div>
<div class="">* dicomTar version : 1</div>
<div class="">* md5sum for DICOM tarball : 7d9e2c2e653de5586b30ad6125115441 ImagingUpload-7-24-6mxg7z.tar</div>
<div class="">* md5sum for DICOM tarball gzipped : d9b420f7495ab7f5bad5ddcf0f198963 ImagingUpload-7-24-6mxg7z.tar.gz</div>
<div class="">* md5sum for complete archive : 6d50ab9ebd4d2174eb961be7298b536f DCM_2014-07-19_ImagingUpload-7-24-6mxg7z.tar</div>
<div class=""><br class="">
</div>
<div class=""> TarchiveID: 35280</div>
<div class=""> DateSent: NULL</div>
<div class=""> PendingTransfer: 0</div>
<div class="">1 row in set (0.00 sec)</div>
<div class="">===</div>
<div class=""><br class="">
</div>
<div class="">The tar file is the following: /data_/ipmsa/loris_data/IPMSA/data/tarchive/2014/DCM_2014-07-19_ImagingUpload-7-24-6mxg7z.tar</div>
<div class="">The "SeriesInstanceUID" for the t2w dicoms is <font color="#ff1f00" class="">
"1.3.12.2.1107.5.2.30.26523.2014071919365885482743202.0.0.0"</font> which different as the one reported in the minc file!</div>
<div class=""><br class="">
</div>
<div class="">What could be happening here? The only thing I think might play a role here is that I was uploading 7.500 visits for one study, running 15 insertions in parallel. Maybe some temporary files were overwritten by processes running in parallel?</div>
<div class=""><br class="">
</div>
<div class="">Please advice on how to deal with this issue, and how to validate/verify the integrity of the files that have been uploaded so far (~30.000 visits).</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Alfredo.</div>
<div class=""><br class="">
</div>
</div>
<div>The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at http://www.massgeneralbrigham.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.</div></body>
</html>