<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hello,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
There is no easy, fit all answer to your question about importing the instrument's data.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
It depend on a few factors:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<ul>
<li>the number of candidates you already have and amount of data that would need to be migrated.</li><li>if you have access to a software developer (or at least someone who knows MySQL (MariaDB) and how to code scripts.</li><li>If you have another instance of LORIS to develop a script without affecting the production instance.</li><li>the time that you have to complete this task.<br>
</li></ul>
<div>Depending on the answer to these questions, there are a few options:<br>
</div>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<ul>
<li>If you only have a few candidates, it might be easier to just manually enter the same data in the new instruments via LORIS web interface as it was done in the first place.</li><li>If you have a lot of instruments from many candidates to import, then it might be preferable to write a script that would work directly in the back-end (database) to import the data from the old instruments to the new one.
<br>
<ul>
<li>Write the script.<br>
</li><li>Test and validate your script on a separate LORIS instance to ensure that it would do the data transfer properly and without errors. </li><li>Backup your production database in case something goes wrong.<br>
</li><li>Run the script on the production instance at an appropriate time. <br>
</li></ul>
</li></ul>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div>As for the relationship of the instruments with flag table, you can refer to the "SQL/0000-00-00-schema.sql" file in your LORIS directory for the exact version for your instance.</div>
<div>In the latest releases</div>
<div>
<ul>
<li>The "CommentID" field of the instruments table refer to the "CommentID" of the "flag" table.</li><li>In the same row on the "flag" table, the "SessionID" field refer to the "ID" field of the "session" table.</li><li>In the same row on the "session" table, the "CandID" field refer to the "CandID" field of the candidate table.</li></ul>
</div>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
If you need more info, it will be a pleasure to answer your questions.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0">M<span class="_Xbe">é</span>lanie Legault
<span style="color:rgb(255,0,0)">|</span> Software developer <span style="color:rgb(255,0,0)">|</span> Faculty of Medicine<span style="color:rgb(255,0,0)"> |</span>
<span style="color:rgb(255,0,0)">McGill University </span> <br>
</p>
<div>3801 University, Montr<span id="ms-rterangepaste-start"></span><span class="_Xbe">é</span><span id="ms-rterangepaste-end"></span>al, QC H3A 2B4 </div>
<br>
<p style="margin-top: 0px; margin-bottom: 0px;"></p>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> loris-dev-bounces@bic.mni.mcgill.ca <loris-dev-bounces@bic.mni.mcgill.ca> on behalf of ALS Neuroimaging Research Unit <alsneuroimagingresearchunit@gmail.com><br>
<b>Sent:</b> December 18, 2019 18:22<br>
<b>To:</b> loris-dev@bic.mni.mcgill.ca <loris-dev@bic.mni.mcgill.ca><br>
<b>Subject:</b> [Loris-dev] Normalizing/breaking down instruments</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div>Hi!</div>
<div><br>
</div>
<div>Currently our instruments are quite long, and we would like to break them down into separate instruments.</div>
<div>The code is easy to break down and separate. However, what would be the best way to import the data from the larger instrument and into to the new smaller instruments, given that the CommentIDs will be different.</div>
<div><br>
</div>
<div>Also is there any documentation that I could refer to to understand the relationship between the individual instrument tables and the flag table? The
<a href="https://github.com/aces/Loris/wiki/LORIS-database-schema" target="_blank">
LORIS database schema</a> on GitHub is not updated and is redirected to a dead link on the LORIS demo instance,</div>
<div><br>
</div>
<div>Thanks!</div>
</div>
</div>
</div>
</body>
</html>