<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Cécile,
<div class=""><br class="">
</div>
<div class="">I changed the Current_stage to Not Started for the visits that had it in NULL. Now I can see all the visits in the front-end. Thank you!</div>
<div class=""><br class="">
</div>
<div class="">Regarding the scan_acquisition_time, would it be possible to debug it over a Zoom call. As I mentioned I have in place the file *_scans.tsv but the acquisition date is not in the database after insertion.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Alfredo.<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Jul 19, 2021, at 3:35 PM, Cecile Madjar <<a href="mailto:cecile.madjar@mcin.ca" class="">cecile.madjar@mcin.ca</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<p class=""><span style="padding: 3px 10px; border-radius: 5px; color: #ffffff; font-weight: bold; display: inline-block; background-color: #ff0000;" class=""> External Email - Use Caution </span></p>
<div class=""><br class="webkit-block-placeholder">
</div>
<div dir="ltr" class="">You can change the Current_stage to Not Started for those two visits then.
<div class=""><br class="">
</div>
<div class="">It should not be affecting the scan_acquisition_time since that information is stored in parameter_file and not the session table.</div>
<div class=""><br class="">
</div>
<div class="">Hope this helps,</div>
<div class=""><br class="">
</div>
<div class="">Cécile</div>
</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Jul 19, 2021 at 3:07 PM Morales Pinzon, Alfredo <<a href="mailto:AMORALESPINZON@bwh.harvard.edu" class="">AMORALESPINZON@bwh.harvard.edu</a>> wrote:<br class="">
</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;" class="">
<div class="">Hi Cécile,</div>
<div class=""><br class="">
</div>
Yes, I think two out of three visits had Current_stage NULL, what should value should it be? Is it enough to change it from NULL to “something_else”?
<div class=""><br class="">
</div>
<div class="">Does this impact the <span style="font-family:Menlo;font-size:11px" class="">scan_acquisition_time?</span></div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div class="">Best,</div>
<div class="">Alfredo.</div>
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On Jul 19, 2021, at 1:41 PM, Cecile Madjar <<a href="mailto:cecile.madjar@mcin.ca" target="_blank" class="">cecile.madjar@mcin.ca</a>> wrote:</div>
<br class="">
<div class="">
<p class=""><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)" class=""> External Email - Use Caution </span></p>
<div class=""><br class="">
</div>
<div dir="ltr" class="">Hi Alfredo,
<div class=""><br class="">
</div>
<div class="">The issue here is that the first session has a Current_stage set as NULL. Maybe verify which session has Current_stage set to NULL. Maybe it comes from an old import?</div>
</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Jul 19, 2021 at 11:41 AM Morales Pinzon, Alfredo <<a href="mailto:AMORALESPINZON@bwh.harvard.edu" target="_blank" class="">AMORALESPINZON@bwh.harvard.edu</a>> wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="">Hi Cécile,
<div class=""><br class="">
</div>
<div class="">Thank you for the prompt reply. Here are the results for the queries:</div>
<div class=""><br class="">
</div>
<div class="">===</div>
<div class="">
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class="">
<span style="font-variant-ligatures:no-common-ligatures" class="">SELECT pf.Value FROM parameter_file pf JOIN parameter_type pt USING (ParameterTypeID) WHERE pt.Name="scan_acquisition_time" AND FileID=428983;</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class="">
<span style="font-variant-ligatures:no-common-ligatures" class="">Empty set (0.00 sec)</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class="">
<span style="font-variant-ligatures:no-common-ligatures" class="">===</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class="">
<span style="font-variant-ligatures:no-common-ligatures" class=""><br class="">
</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class="">
<span style="font-variant-ligatures:no-common-ligatures" class="">===</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class="">
<span style="font-variant-ligatures:no-common-ligatures" class="">
<div style="margin:0px;font-stretch:normal;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">SELECT DISTINCT Current_stage FROM session WHERE CandID=207019;</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">+---------------+</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">| Current_stage |</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">+---------------+</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">| NULL |</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">| Not Started |</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">+---------------+</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">2 rows in set (0.01 sec)</span></div>
</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class="">
<span style="font-variant-ligatures:no-common-ligatures" class="">===</span></div>
<div class="">
<div class="">
<div class=""><br class="">
</div>
<div class="">As I said before, we can have a call if this makes things easier and faster.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Alfredo.</div>
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On Jul 19, 2021, at 11:26 AM, Cecile Madjar <<a href="mailto:cecile.madjar@mcin.ca" target="_blank" class="">cecile.madjar@mcin.ca</a>> wrote:</div>
<br class="">
<div class="">
<p class=""><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)" class=""> External Email - Use Caution </span></p>
<div class=""><br class="">
</div>
<div dir="ltr" class="">Hi Alfredo,
<div class=""><br class="">
</div>
<div class="">For the acquisition date, try the following query:</div>
<div class="">SELECT pf.Value FROM parameter_file pf JOIN parameter_type pt USING (ParameterTypeID) WHERE pt.Name="scan_acquisition_time" AND FileID=428983;</div>
<div class=""><br class="">
</div>
<div class="">For 2., what does the following query return?</div>
<div class="">SELECT DISTINCT Current_stage FROM session WHERE CandID=207019;</div>
<div class=""><br class="">
</div>
<div class="">Cécile</div>
</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Jul 19, 2021 at 11:19 AM Morales Pinzon, Alfredo <<a href="mailto:AMORALESPINZON@bwh.harvard.edu" target="_blank" class="">AMORALESPINZON@bwh.harvard.edu</a>> wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="">
<div dir="auto" class="">Hi Cécile,
<div class=""><br class="">
</div>
<div class="">I patched LORIS and inserted one visit.</div>
<div class=""><br class="">
</div>
<div class="">Before moving forward I want to make sure the acquisition date was inserted, could you please tell me what is the “ParameterFileID” for the acquisition date, I looked at the table parameter_file using one of the FileIDs from the last insertion
but couldn't find the acquisition date. See the result of the query below.</div>
<div class=""><br class="">
</div>
<div class="">2. The front-end is still crashing. This is the log:</div>
<div class=""><br class="">
</div>
<div class="">===</div>
<div class="">[php7:error] [pid 32588] [client <a href="http://secure-web.cisco.com/1nROtbNw-Vzt6PDAU71bMpkZ2DX-C8_gGT7jPalLUwf7iW0vRUudY_S6vIhtCPN4YHMDNIlD9L_XfAEixBt2iRg_KHw6treMqgGID9xjB3xoxlLD2fhNblD3jlfGfUSZYqaMb2TZKSCJoVCGMoDx12cEmnzWRfPe2QxGRgwYHNP7Bf9SBcfWaAQ_ODCTQVBimXbr1NWavp5WNDM_hcGsLLupgF6xBbXBxr7s1e7BLCemInf4-AlIdok-y3-ZvC8BDdDbKsCs7sHYqn0gSK7YQsA/http%3A%2F%2F155.33.137.12%3A23564" target="_blank" class="">
155.33.137.12:23564</a>] PHP Fatal error: Uncaught TypeError: Return value of Utility::getStageUsingCandID() must be of the type string, null returned in /var/www/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(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/PageDecorationMiddleware.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.inc(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(137): NDB_Page->pro in /var/www/loris/php/libraries/Utility.class.inc
on line 632, referer: <a href="https://secure-web.cisco.com/1mVIQ6ONSXAF7-5MPbIxuWHNbxYUn-M6MiKm-VfZKDScn_0YJ02NPcV4p7rirYg2XnVfXdHzODTPAcrLuUItZ6KKzzEdJ2lQXp9ZTMufpswd6YsZlGwob5GriUoRzGl7WJKfUwk2hnizx5FQXgIT0jZjFQqSf0w-2sproV85wbmg5r4X4UtFMV9WCoOG__khDbsnWOcdGaPJHTS1tVcjVuS2tRv628XtslAP_5jnzzfTPMndhvwR3-tRMLUp_ptV7i_ww353-P3KHxecwTBVnXg/https%3A%2F%2Fipmsa-loris.bic.mni.mcgill.ca%2Fcandidate_profile%2F207019%2F" target="_blank" class="">
https://ipmsa-loris.bic.mni.mcgill.ca/candidate_profile/207019/</a></div>
<div class="">===</div>
<div class=""><br class="">
</div>
<div class="">Happy to have a Zoom call if it helps.<br class="">
<div class=""><br class="">
</div>
<div class="">Thank you for your help.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Alfredo.</div>
<div class=""><br class="">
</div>
<div class="">===</div>
<div class="">
<div class="">select ParameterFileID,Value from parameter_file where FileID=428983;</div>
<div class="">+-----------------+----------------------------------------------------------------------------------------------------------------------------------+</div>
<div class="">| ParameterFileID | Value |</div>
<div class="">+-----------------+----------------------------------------------------------------------------------------------------------------------------------+</div>
<div class="">| 109949932 | MR |</div>
<div class="">| 109949967 | 130 |</div>
<div class="">| 109949981 | 0.9765625 |</div>
<div class="">| 109949977 | syngo_MR_A35_4VA35A |</div>
<div class="">| 109949958 | 12:13:34.360020 |</div>
<div class="">| 109949968 | t1_RIPOSIZ. |</div>
<div class="">| 109949973 | SK_SP_OSP |</div>
<div class="">| 109949962 | 2D |</div>
<div class="">| 109949960 | [0.999742, 0.000840254, 0.0226824, 1.88704e-10, 0.999315, -0.0370189] |</div>
<div class="">| 109949982 | 0.9765625 |</div>
<div class="">| 109949975 | 5 |</div>
<div class="">| 109949969 | CP_HeadArray |</div>
<div class="">| 109949965 | 70.3125 |</div>
<div class="">| 109949966 | i |</div>
<div class="">| 109949945 | 0.187383 |</div>
<div class="">| 109949978 | 3 |</div>
<div class="">| 109949963 | 1.5 |</div>
<div class="">| 109949976 | 3 |</div>
<div class="">| 109949970 | 0.655 |</div>
<div class="">| 109949964 | HFS |</div>
<div class="">| 109949974 | t1_RIPOSIZ. |</div>
<div class="">| 109949971 | SE |</div>
<div class="">| 109949956 | 99 |</div>
<div class="">| 109949959 | 0.01 |</div>
<div class="">| 109949930 | Siemens |</div>
<div class="">| 109949957 | 1 |</div>
<div class="">| 109949983 | 2.9999998 |</div>
<div class="">| 109949985 | 207019/sub-ANOM_ses-endoftreatment_ce-Gd_run-1_T1w_ZZZ_check.png |</div>
<div class="">| 109949972 | _tse2d1_5 |</div>
<div class="">| 109949914 | 20140629 |</div>
<div class="">| 109949915 | 99 |</div>
<div class="">| 109949916 | 1 |</div>
<div class="">| 109949917 | 12:13:34.360020 |</div>
<div class="">| 109949918 | 256 |</div>
<div class="">| 109949919 | dcm2niix |</div>
<div class="">| 109949920 | v1.0.20180622 (JP2:OpenJPEG) (JP-LS:CharLS) GCC7.3.0 |</div>
<div class="">| 109949921 | 0.01 |</div>
<div class="">| 109949923 | 150 |</div>
<div class="">| 109949924 | [0.999742, 0.000840254, 0.0226824, 1.88704e-10, 0.999315, -0.0370189] |</div>
<div class="">| 109949925 | ['ORIGINAL', 'PRIMARY', 'M', 'ND'] |</div>
<div class="">| 109949926 | ROW |</div>
<div class="">| 109949928 | 2D |</div>
<div class="">| 109949929 | 1.5 |</div>
<div class="">| 109949931 | Sonata |</div>
<div class="">| 109949933 | 1 |</div>
<div class="">| 109949934 | HFS |</div>
<div class="">| 109949935 | 70.3125 |</div>
<div class="">| 109949936 | i |</div>
<div class="">| 109949937 | 100 |</div>
<div class="">| 109949938 | 0.55 |</div>
<div class="">| 109949939 | 130 |</div>
<div class="">| 109949940 | t1_RIPOSIZ. |</div>
<div class="">| 109949941 | %SiemensSeq%_tse |</div>
<div class="">| 109949942 | CP_HeadArray |</div>
<div class="">| 109949943 | 512 |</div>
<div class="">| 109949944 | 0.655 |</div>
<div class="">| 109949946 | SE |</div>
<div class="">| 109949947 | _tse2d1_5 |</div>
<div class="">| 109949948 | SK_SP_OSP |</div>
<div class="">| 109949949 | t1_RIPOSIZ. |</div>
<div class="">| 109949950 | 5 |</div>
<div class="">| 109949951 | [48, 57, 59, 361, 234, 67, -246, 256] |</div>
<div class="">| 109949952 | 3 |</div>
<div class="">| 109949953 | syngo_MR_A35_4VA35A |</div>
<div class="">| 109949954 | 3 |</div>
<div class="">| 109949955 | 202.922 |</div>
<div class="">| 109949961 | ['ORIGINAL', 'PRIMARY', 'M', 'ND'] |</div>
<div class="">| 109949979 | bids_imports/INFORMS_BIDSVersion_1.4.0/sub-ANOM/ses-endoftreatment/anat/sub-ANOM_ses-endoftreatment_run-1_T1w.json |</div>
<div class="">| 109949980 | 7655f29d97c14a6b88055f99c7879097650c31cafa7405a1ad3a93062d04669417f42b67c175e9ad904da1e1bb677b2fb6a44ed8b26af482a4d3c40498f284df |</div>
<div class="">| 109949984 | 3f487183fe830d801477568aec824c967a44d3bf3feb9cbd6575830d31b90b089cc625a037c487d3985fb10ee0a00f2eac824980955949c8955cdd304ea838b9 |</div>
<div class="">| 109949922 | 5 |</div>
<div class="">| 109949927 | 1 |</div>
<div class="">+-----------------+----------------------------------------------------------------------------------------------------------------------------------+</div>
</div>
<div class="">===</div>
<div class=""><br class="">
</div>
<div class="">This is the content of the *_scan.tsv file:</div>
<div class="">===</div>
<div class="">
<div style="margin:0px;font-stretch:normal;line-height:normal" class="">
<div style="margin:0px;font-stretch:normal;line-height:normal" class=""><font face="Menlo" class=""><span style="font-size:11px" class="">filename acq_time</span></font></div>
<div style="margin:0px;font-stretch:normal;line-height:normal" class=""><font face="Menlo" class=""><span style="font-size:11px" class="">anat/sub-ANOM_ses-endoftreatment_run-1_T1w.nii.gz 2014-06-29T00:00:00</span></font></div>
<div style="margin:0px;font-stretch:normal;line-height:normal" class=""><font face="Menlo" class=""><span style="font-size:11px" class="">anat/sub-ANOM_ses-endoftreatment_ce-Gd_run-1_T1w.nii.gz 2014-06-29T00:00:00</span></font></div>
<div style="margin:0px;font-stretch:normal;line-height:normal" class=""><font face="Menlo" class=""><span style="font-size:11px" class="">anat/sub-ANOM_ses-endoftreatment_run-1_FLAIR.nii.gz 2014-06-29T00:00:00</span></font></div>
<div style="margin:0px;font-stretch:normal;line-height:normal" class=""><font face="Menlo" class=""><span style="font-size:11px" class="">anat/sub-ANOM_ses-endoftreatment_ce-Gd_run-2_T1w.nii.gz 2014-06-29T00:00:00</span></font></div>
<div style="margin:0px;font-stretch:normal;line-height:normal" class=""><font face="Menlo" class=""><span style="font-size:11px" class="">anat/sub-ANOM_ses-endoftreatment_run-1_PD.nii.gz 2014-06-29T00:00:00</span></font></div>
<div style="margin:0px;font-stretch:normal;line-height:normal" class=""><font face="Menlo" class=""><span style="font-size:11px" class="">anat/sub-ANOM_ses-endoftreatment_run-1_T2w.nii.gz 2014-06-29T00:00:00</span></font></div>
</div>
</div>
<div class="">=== </div>
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On Jul 15, 2021, at 5:23 PM, Cecile Madjar <<a href="mailto:cecile.madjar@mcin.ca" target="_blank" class="">cecile.madjar@mcin.ca</a>> wrote:</div>
<br class="">
<div class="">
<p class=""><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)" class=""> External Email - Use Caution </span></p>
<div class=""><br class="">
</div>
<div dir="ltr" class="">
<div class="">Hi Alfredo,</div>
<div class=""><br class="">
</div>
<div class="">Sorry for the delay, I had to take a deeper look at the code to answer some of your questions. See below.</div>
<br class="">
<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://secure-web.cisco.com/1RT0b_pDRzGh5oEnKt7wHclfIWMewUlzzoH-FStRocNdjI2mrpqsgr33eVaIS22zsvLSZ7Z8ugyaoZ07SHA_O7tObAB409DokII49oyHlFVQnGqaaxEoC_87rcI6ivzH41s36uv9R13FRzaiRJPDhbqmj3kt67BF36UEJp4e5xglyAHPcxx1DV8sf3sJ2TRBCKhNhHUWeRbPM9DdNrFxpoZzYHnN4xy-VMBRK5T9SF4afE6jv3tqdaKdfSYG2wDh-CWrIBbzyeSECIRnMYikelA/https%3A%2F%2Fbids-specification.readthedocs.io%2Fen%2Fstable%2F03-modality-agnostic-files.html%23scans-file" rel="noreferrer" target="_blank" class="">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 class="">
</blockquote>
<div class=""><br class="">
</div>
<div class="">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 class=""> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br class="">
> 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 class="">
</blockquote>
<div class=""><br class="">
</div>
<div class="">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://secure-web.cisco.com/1FA74HdTiHzhrcJezSt2K6DKMGwP_wqxcdk1oXclu1U6jCz4rd2fSi-NwskWq_Qfb0p4MTUX6_XEbTFvgo_VxzSI4YiWtniz3W9Yi_Y_Yhd3GKBQD7kKnXK8l0jqEWj-6sZ77YTpIg9X5O235SfFeZ3JW3V5MFXQOH7vMnzgPDBS-6dsjvmCAtnAjP4DJoXkGwQ6VJLV21yWj9np6NfjWvjphVgXfpYnIoS4jb57yVl8xBW0ttGeejb-HEHsaZ-bNfre-16KCLmR-IJO3pZbnwg/https%3A%2F%2Fgithub.com%2Faces%2FLoris-MRI%2Fblob%2Fb5a6fc8cc3cf1fad50df21d9d87a284981705e3c%2Fpython%2Fbids_import.py%23L299" target="_blank" class="">
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://secure-web.cisco.com/1Tpg7v8DtF0HJJEnPZUNGN7gwCdF7vLrM19WZmYU8p4-riYcbJ1FVNYH0FGEvIBT0KwSYUMgtVeulxeEaGSohphmm0NQn8wIbxh5cSX4VwbKcKLhvQY1RtnS2SxEKUi4Pln5KHxRYDcVhz9sWnZ6EIhfZEDECvkuT2-zTt24B5MMeBduiQG8W3Pqa7Qr2oEjJW_m84bq0EVtbGQmu5ZVKytj8tPkwWAUE8gTEtLOb1DjwDX5O8y8EHAN_8lf2ZqJ9eojMRDufJj2QObf0g02n3Q/https%3A%2F%2Fgithub.com%2Faces%2FLoris-MRI%2Fpull%2F645" target="_blank" class="">
https://github.com/aces/Loris-MRI/pull/645</a>.</div>
<div class=""> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br class="">
> 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 class="">
</blockquote>
<div class=""><br class="">
</div>
<div class="">Yes, the pipeline is supposed to be smart enough to not reinsert something that was previously inserted. </div>
<div class=""> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br class="">
> 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 class="">
> <br class="">
> ===<br class="">
> [Mon Jul 12 12:05:37.705967 2021] [php7:error] [pid 14497] [client <a href="http://secure-web.cisco.com/1WYhYdfRTqaTteJ_4rndbHmww7uTfLympsocUwkjHV2oHQVOQ_ddIjv7AcfCoiP5cJIbw5iksCEFI9RVOxA3_lM6etO-PCaDz89PgNjaEjQPMC5dEfLOft3B7YhP7TCF4ISn-hvCOCFnhQqmRbs9zS1PRbVr6qe_Fra0AR2dZzskzHnYp2A_u29fTzE5u8vYJLMpl4t10wah4Bga-hhoD3gkgnRHVU5KAWy4uwX30Ma4tng8DnVlqBopiM9DpYE6ZEviZpdmHvWqJZxPHxbnHOw/http%3A%2F%2F216.15.126.108%3A55424" rel="noreferrer" target="_blank" class="">
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 class="">
> /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 class="">
> 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 class="">
> 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 class="">
> 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 class="">
> 137): NDB_Page->pro in /var/www/loris/php/libraries/Utility.class.inc on line 632, referer:
<a href="https://secure-web.cisco.com/1XkKe3e3JkFCEbEAQx3rrZ25ZCaDXFH7ViiHfRCVtt0ZTI9ckG_4i5CYOnY_Wv0SYfmdvUUZ0jQkdjvUgzKY9qJfqnqcVF_7n2nRaR-c1a4U_Y95LN-Dv96I8j-OBHltZ52DoTaYZ9RvB7YL9vP82yG9pUb2XlYJwK6xA6b2gGwhHhyqpdrPfRW0HZFx4__6pDI4CU5CQWx9_dteaDW3_xjntBo3296km9H-nJNiywrGrKtv_1pO6wCU5ygXs2bqXwZ9j7X4eILwCv0N7S7PlKA/https%3A%2F%2Fipmsa-loris.bic.mni.mcgill.ca%2Fcandidate_profile%2F207019%2F" rel="noreferrer" target="_blank" class="">
https://ipmsa-loris.bic.mni.mcgill.ca/candidate_profile/207019/</a><br class="">
> ===<br class="">
</blockquote>
<div class=""><br class="">
</div>
<div class="">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://secure-web.cisco.com/1RuRCEtVgtWrK7Pm95g10P8zRltmw5fqwt4wM4vzTM2N7zp7p8HXJKNSQo5QSAfOa23ID04z8m13DojdlnneipDRp6yoYNUJIoorexU5ixp49Alwi5aaHokrOmz-gRnpRkrUxMNI04i2tsCDBAsyiwIBoMwgWyCGHg8asEvLiHrEcYtWAdRycS4UQ7Udt6hrVhp6DqF6kpBH3s4oWPPlFvnJ9CHywNOno0NqHI0zXVnlWI2BuIW0heLJeaDSyrvK-5FcYxqhfnBEJTq1hkNB-Jg/https%3A%2F%2Fgithub.com%2Faces%2FLoris-MRI%2Fpull%2F644" target="_blank" class="">https://github.com/aces/Loris-MRI/pull/644</a> </div>
<div class=""><br class="">
</div>
<div class="">Hope this helps,</div>
<div class=""><br class="">
</div>
<div class="">Cécile</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
<div class="">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/12oS_QzclpiQcg_5CjSIubWkQntHnTzqFtBX6mIpa2UBfLh0PVFbNhw3IdXKR4AZ34z6Y4oONHxNl8RPg_-v5rbGH1bm25TzFr3nnHzzX-JiG9TdS5w_tGDS8dGTAdqHOqRD0y6Fn6ceB81q-IYVyZxyd-oWY8_bD4W7nK_hFDdMGi_GjLB5Qm-Opov0A6h0QkxNvnxJQpq85R1ace87QLIkJNTDBloRdcjKgYJm3NLT9JbBe-uOsotk5sBO21JKnuVHFKcIakn138zVhP4vF1A/http%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline" target="_blank" class="">
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 class="">
<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 class="">
</div>
</div>
</div>
<div class="">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/115fegSDBx-RMF0OZa7z6f9XwFGUk4Xam4Sg3xrPrQuji2Bvh1lzopdqWHKdnV8zxQteTdJOU3ULO9w9ar4RPfujGMZNU4ZYBb_HGdeZJ0wf4RSY0bGkgL7GKZRGpDZSXpq8AaFc1gToO4pT-kmlfh92gKSzFA1YzUI_zbDopunD0mu6OjMATfN0ZNZIgVFbFJBejtS_KWpqpqE1IzO0K55Af2GEQ19VfRXJ8BT-tIHLbnb_pNiQeP6xHCAOajKtX3JkHm27p6yYfPjQz0c6pZA/http%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline" target="_blank" class="">
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 class="">
<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 class="">
</div>
</div>
<div class="">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/1DuGeL6ukT-h5rrq0xxRXGA9OhaQ1ml18He9vyWuEEo6NnR3iTE5ZoIN5VgKkSlmL7h1LH3Ga75RFJNERZkLAz3zewuS2qhCrAIXqy4ZXTNVlA4loK8X6q3ILBHSzIZdi3i0E5JQzbZu29cj6sbcYEow9fVyh-zccYRbPVIIzZUGgDnExYl4cr0_O9Yw6LpJ28qIRDdvip2cAIBbemL5dr3k3v6gwx1C7QEIsvmZI8u1X0bBV5qe7AEYs4X3eCPVzcpAJ1tIawvW0SYqbzZDwOA/http%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline" target="_blank" class="">
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 class="">
<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 class="">
</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><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></body>
</html>