<div dir="ltr"><div>Hi Alfredo,</div><div><br></div><div>Sorry for the delay, I had to take a deeper look at the code to answer some of your questions. See below.</div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> 1. I added the file sub-<label>[_ses-<label>]_scans.tsv as suggested in the BIDS standard (<a href="https://bids-specification.readthedocs.io/en/stable/03-modality-agnostic-files.html#scans-file" rel="noreferrer" target="_blank">https://bids-specification.readthedocs.io/en/stable/03-modality-agnostic-files.html#scans-file</a>) to add the acquisition dates, do you take it into account to set the dates in LORIS? If not, how can I set the acquisition dates for the images in the session/visit?<br></blockquote><div><br></div><div>Indeed, if you enter a date under an 'acq_time' column in the scans.tsv file, it will add an entry in parameter_file for the scan_acquisition_time parameter.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br>
> 2. I am doing the insertion visit by visit to be able to identify issues instead of running all the subjects at once. In this approach I get an error stating that the participants file (".../data/bids_imports/INFORMS_BIDSVersion_1.4.0/participants.tsv") is different from for every execution. Is there a way I can upload subject by subject without having this issue?<br></blockquote><div><br></div><div>yeah, this is a current limitation that this file keeps changing each time you upload a new candidate. The pipeline was initially developed for retrospective BIDS datasets. We would need to modify <a href="https://github.com/aces/Loris-MRI/blob/b5a6fc8cc3cf1fad50df21d9d87a284981705e3c/python/bids_import.py#L299">this part</a> for prospective datasets so that instead of just trying to copy the participants.tsv file, if it already exists, it would append a row into the already existing file. You can find a fix for that in the following PR <a href="https://github.com/aces/Loris-MRI/pull/645">https://github.com/aces/Loris-MRI/pull/645</a>.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br>
> If l have to launch the whole dataset, is the bids script able to check what was already inserted in case there is an error and I have to it again?<br></blockquote><div><br></div><div>Yes, the pipeline is supposed to be smart enough to not reinsert something that was previously inserted. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br>
> 3. After insertion of BIDS for a subject in a visit I cannot access the visit in the front end, I am getting a 500 error. Here is the error log in LORIS:<br>
> <br>
> ===<br>
> [Mon Jul 12 12:05:37.705967 2021] [php7:error] [pid 14497] [client <a href="http://216.15.126.108:55424" rel="noreferrer" target="_blank">216.15.126.108:55424</a>] PHP Fatal error: Uncaught TypeError: Return value of Utility::getStageUsingCandID() must be of the type string, null returned in /var/www<br>
> /loris/php/libraries/Utility.class.inc:632\nStack trace:\n#0 /var/www/loris/modules/instrument_list/php/instrument_list.class.inc(177): Utility::getStageUsingCandID('207019')\n#1 /var/www/loris/php/libraries/NDB_Page.class.inc(<br>
> 707): LORIS\\instrument_list\\Instrument_List->setup()\n#2 /var/www/loris/src/Middleware/UserPageDecorationMiddleware.php(234): NDB_Page->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#3 /var/www/loris/src/Middleware/PageD<br>
> ecorationMiddleware.php(56): LORIS\\Middleware\\UserPageDecorationMiddleware->process(Object(Laminas\\Diactoros\\ServerRequest), Object(LORIS\\instrument_list\\Instrument_List))\n#4 /var/www/loris/php/libraries/NDB_Page.class.i<br>
> nc(692): LORIS\\Middleware\\PageDecorationMiddleware->process(Object(Laminas\\Diactoros\\ServerRequest), Object(LORIS\\instrument_list\\Instrument_List))\n#5 /var/www/loris/modules/instrument_list/php/instrument_list.class.inc(<br>
> 137): NDB_Page->pro in /var/www/loris/php/libraries/Utility.class.inc on line 632, referer: <a href="https://ipmsa-loris.bic.mni.mcgill.ca/candidate_profile/207019/" rel="noreferrer" target="_blank">https://ipmsa-loris.bic.mni.mcgill.ca/candidate_profile/207019/</a><br>
> ===<br></blockquote><div><br></div><div>This might be due to the Current_stage not being set when creating the visit via the bids_import.py script. Here is a PR to fix that issue next time you import a new visit via bids_import.py: <a href="https://github.com/aces/Loris-MRI/pull/644">https://github.com/aces/Loris-MRI/pull/644</a> </div><div><br></div><div>Hope this helps,</div><div><br></div><div>Cécile</div></div></div>