<div dir="ltr">Dear Alfredo,<div><br></div><div>Indeed, the BIDS import script does not register any upload in the mri_upload table as those are for DICOM files mainly (in the current setup).</div><div><br></div><div>The easiest way to remove the data would be manual unfortunately in your case. I am guessing that no QC was attached to the inserted files, which will make things easier for you. </div><div><br></div><div>To remove the images:</div><div>- find the FileID you want to delete in the files table</div><div>- Run `DELETE FROM parameter_file WHERE FileID IN (..., ..., ...)` (to delete associated entries in the parameter_file table)</div><div>- Run `DELETE FROM files WHERE FileID IN (..., ..., ...)` (to delete file entries in the files table)</div><div>- Ensure to remove the related files that have been copied into the bids_import directory on the file system</div><div><br></div><div>One the images have been removed, you can then delete the visit from the session table.</div><div><br></div><div>Hope this helps. Let me know how it goes or if you have any questions,</div><div><br></div><div>Cécile</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 7, 2021 at 4:45 PM Morales Pinzon, Alfredo <<a href="mailto:AMORALESPINZON@bwh.harvard.edu">AMORALESPINZON@bwh.harvard.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div style="overflow-wrap: break-word;">
Hi Nicolas,
<div><br>
</div>
<div>I am using the script “<a href="http://delete_imaging_upload.pl" target="_blank">delete_imaging_upload.pl</a>” to delete uploaded images into a visit. This script needs the uploadId of the images however for this study, which was uploaded using the BIDS insertion script, I cannot find the uploadIds. I usually
 find the uploadIds with the following SQL</div>
<div><br>
</div>
<div>===</div>
<div>select UploadID from mri_upload where SessionID={SessionId};</div>
<div>===</div>
<div><br>
</div>
<div>How can I remove the images or the visits?</div>
<div><br>
</div>
<div>Best,</div>
<div>Alfredo.</div>
<div>
<div><br>
<blockquote type="cite">
<div>On Sep 2, 2021, at 12:08 PM, Morales Pinzon, Alfredo <<a href="mailto:AMORALESPINZON@BWH.HARVARD.EDU" target="_blank">AMORALESPINZON@BWH.HARVARD.EDU</a>> wrote:</div>
<br>
<div>
<div style="overflow-wrap: break-word;">
<p><span style="padding:3px 10px;border-radius:5px;color:rgb(255,255,255);font-weight:bold;display:inline-block;background-color:rgb(255,0,0)">        External Email - Use Caution        </span></p>
<div><br>
</div>
Hi Nicolas,
<div><br>
</div>
<div>Thank you. I will then delete and re-upload with the right visit label.</div>
<div><br>
</div>
<div>Best,</div>
<div>Alfredo.</div>
<div>
<div><br>
<blockquote type="cite">
<div>On Sep 1, 2021, at 4:36 PM, Nicolas Brossard <<a href="mailto:nicolasbrossard.mni@gmail.com" target="_blank">nicolasbrossard.mni@gmail.com</a>> wrote:</div>
<br>
<div>
<p><span style="padding:3px 10px;border-radius:5px;color:rgb(255,255,255);font-weight:bold;display:inline-block;background-color:rgb(255,0,0)">        External Email - Use Caution        </span></p>
<div><br>
</div>
<div dir="ltr">Hi Alfredo,<br>
<div><br>
</div>
<div>I would remove the visits and re-upload the scans to the proper visit since the number of scans is low.</div>
<div><br>
</div>
<div><br>
</div>
<div>Best,</div>
<div>Nicolas</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Sep 1, 2021 at 3:37 PM Morales Pinzon, Alfredo <<a href="mailto:AMORALESPINZON@bwh.harvard.edu" target="_blank">AMORALESPINZON@bwh.harvard.edu</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>Hi Nicolas,
<div><br>
</div>
<div>Here are the answer to the questions:</div>
<div>
<blockquote type="cite">
<div dir="ltr">
<div><br>
</div>
<div>- How many images are we talking about?</div>
</div>
</blockquote>
<div><br>
</div>
<div>4 visits with around 4 images per visit</div>
<br>
<blockquote type="cite">
<div dir="ltr">
<div>- Is there behavioural data in the database for visit 'screening2'</div>
</div>
</blockquote>
<div><br>
</div>
<div>No</div>
<br>
<blockquote type="cite">
<div dir="ltr">
<div>- You are supposed to set the patient name DICOM header of all the images you inserted to <PSCID>_<CandID>_<Visit_label>. When you did that, did you use the visit label 'screening' or 'screening2'?</div>
</div>
</blockquote>
<div><br>
</div>
I used the BIDS insertion script for these specific visits as the dataset is in BIDS format.</div>
<div><br>
</div>
<div>What is you suggestion?</div>
<div><br>
</div>
<div>Best,</div>
<div>Alfredo.<br>
<div><br>
<blockquote type="cite">
<div>On Aug 31, 2021, at 3:00 PM, Nicolas Brossard <<a href="mailto:nicolasbrossard.mni@gmail.com" target="_blank">nicolasbrossard.mni@gmail.com</a>> wrote:</div>
<br>
<div>
<p><span style="padding:3px 10px;border-radius:5px;color:rgb(255,255,255);font-weight:bold;display:inline-block;background-color:rgb(255,0,0)">        External Email - Use Caution        </span></p>
<div><br>
</div>
<div dir="ltr">Hi Alfredo,<br>
<div><br>
</div>
<div>I need to ask you a few questions in order to provide the best solution:</div>
<div><br>
</div>
<div>- How many images are we talking about?</div>
<div>- Is there behavioural data in the database for visit 'screening2'</div>
<div>- You are supposed to set the patient name DICOM header of all the images you inserted to <PSCID>_<CandID>_<Visit_label>. When you did that, did you use the visit label 'screening' or 'screening2'?</div>
<div><br>
</div>
<div>I'll suggest something based on your answers.</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks!</div>
<div>Nicolas</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Aug 30, 2021 at 10:57 AM Morales Pinzon, Alfredo <<a href="mailto:AMORALESPINZON@bwh.harvard.edu" target="_blank">AMORALESPINZON@bwh.harvard.edu</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Dear LorisDev Team,<br>
<br>
By mistake I added images to a visit with label “screening2” instead of to the visit with label “screening”. Is it possible to change the visit label or I need to remove the visit and upload the images to the proper visit.<br>
<br>
Thank you in advance.<br>
<br>
Regards,<br>
Alfredo.<br>
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
<a href="http://secure-web.cisco.com/1y5PBW7skD2grQZZ2Cx6GxLSQn516dgwLE8Q44oE__XNJhz4X-4FNe2wqTYOVfZTKDjcAb_x1fIRX-N_GGCsD8uLaq8x0vyPf8xAf9p7k5ZpZ8xI1IvRHshe5ffWWiw3He7m2wbr2G3ZmHzjpvMZ3YHxBFApyCU33IIcArRGNDUL2r3ZjPQrIq8S2uAv-236YmksiB36DIjOKlid-dn3bmCDshLhuDgtCn-10fjNV6_uPFl6Io_eZwLMS091409WIQZ-PD0V0eCyJ9QW4OJzORA/http%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline" rel="noreferrer" target="_blank">
http://www.massgeneralbrigham.org/complianceline</a> . 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.<br>
Please note that this e-mail is not secure (encrypted).  If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send or respond to e-mail after receiving this message means
 you understand and accept this risk and wish to continue to communicate over unencrypted e-mail.
<br>
<br>
_______________________________________________<br>
Loris-dev mailing list<br>
<a href="mailto:Loris-dev@bic.mni.mcgill.ca" target="_blank">Loris-dev@bic.mni.mcgill.ca</a><br>
<a href="https://secure-web.cisco.com/1ErJvwVr9ght-ZdXQnfIsa0qS_ryiQC98YD3qXVVtwwVOuQRfO444qDpHJ6rcS4JrHCpD-35FXEytMe56g5ejhGll8kSdUu5g1wdF_c8QiU3rutxCU8cEPJeFPi0GttPuUB5ypEtNidKoduGyOUWlawF1HGAgwpczZkC0T5sXnjeBJUyvpxCYZHfOggCe5KjTRbdWzT_R87Rj4-lmKuztXkfSBqFBFwApmVxrvmlBtUgYyigW4eEXrBE6WqbZicw9ZabMTSxtGLlJSZ2ZWKaITQ/https%3A%2F%2Fmailman.bic.mni.mcgill.ca%2Fmailman%2Flistinfo%2Floris-dev" rel="noreferrer" target="_blank">https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev</a><br>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br>
</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 <a href="http://secure-web.cisco.com/1vn0ZiKxTm2sy2RajDTvJyghmq_bdKypIE7Cy9OIYMbVK5y8WCpwCOEtbBhgojjD0FhXGDJVdtdK7m80sKcEimw6pbEJKycxTq8fQNgWkhfjO8Xu3DN5YQDWtptqLegYXzOuP88trqnVY9y5mbMDwhDxWAhOGLI-UVNTGpJhbnJvc02VpbIk9mUY7Km3T8hWGbi5ZqlA1O8mzdeDJTIQFS1gDXf8KncwNxY6iRlpBWxoelYKAQHwOrThlibMAbel85SgxpkHoCSljFzHyRazhCw/http%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline" target="_blank">
http://www.massgeneralbrigham.org/complianceline</a> . 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>
<br>
<p class="MsoNormal">Please note that this e-mail is not secure (encrypted).  If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send or respond to e-mail after receiving
 this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail. 
</p>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br>
</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 <a href="http://www.massgeneralbrigham.org/complianceline" target="_blank">http://www.massgeneralbrigham.org/complianceline</a> . 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>
<br>
<p class="MsoNormal">Please note that this e-mail is not secure (encrypted).  If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send or respond to e-mail after receiving
 this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail. 
</p>
</div>
_______________________________________________<br>
Loris-dev mailing list<br>
<a href="mailto:Loris-dev@bic.mni.mcgill.ca" target="_blank">Loris-dev@bic.mni.mcgill.ca</a><br>
<a href="https://secure-web.cisco.com/1jqhRt_by2nFbUhOQm9zVI1XxT-HwfvUQpV8-GuXYNwUfxpgj-K2GI8WDD1a7UDFZObPi0cOs3QckK47y43l7aE6jeiYURTbUi2hFh1Q5Gbb7f9UtjZfQRwpfWKfComUV_Tm_9z9ySQJ7sYL5kOvESaD5yG71XLe41Oz4zU94eL1aL7ISUKE7V77na0yATArwJsX2U5z-ArOyyQ64-HAiWtOHnyHtlcV1lWqr7C-tKltDJq_YS4L8UYOfsboj95GI-tV8OeHJZ4EmwDQAHjqwTQ/https%3A%2F%2Fmailman.bic.mni.mcgill.ca%2Fmailman%2Flistinfo%2Floris-dev" target="_blank">https://secure-web.cisco.com/1jqhRt_by2nFbUhOQm9zVI1XxT-HwfvUQpV8-GuXYNwUfxpgj-K2GI8WDD1a7UDFZObPi0cOs3QckK47y43l7aE6jeiYURTbUi2hFh1Q5Gbb7f9UtjZfQRwpfWKfComUV_Tm_9z9ySQJ7sYL5kOvESaD5yG71XLe41Oz4zU94eL1aL7ISUKE7V77na0yATArwJsX2U5z-ArOyyQ64-HAiWtOHnyHtlcV1lWqr7C-tKltDJq_YS4L8UYOfsboj95GI-tV8OeHJZ4EmwDQAHjqwTQ/https%3A%2F%2Fmailman.bic.mni.mcgill.ca%2Fmailman%2Flistinfo%2Floris-dev</a><br>
</div>
</blockquote>
</div>
<br>
</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 <a href="http://www.massgeneralbrigham.org/complianceline" target="_blank">http://www.massgeneralbrigham.org/complianceline</a> . 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><br>
<p class="MsoNormal">Please note that this e-mail is not secure
(encrypted).  If you do not wish to continue communication over
unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send or respond to e-mail after receiving this message means you
understand and accept this risk and wish to continue to communicate over
unencrypted e-mail.  </p></div>

_______________________________________________<br>
Loris-dev mailing list<br>
<a href="mailto:Loris-dev@bic.mni.mcgill.ca" target="_blank">Loris-dev@bic.mni.mcgill.ca</a><br>
<a href="https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev" rel="noreferrer" target="_blank">https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev</a><br>
</blockquote></div>