[Loris-dev] Normalizing/breaking down instruments

Justin Kat justin.kat at mcin.ca
Thu Dec 19 14:36:32 EST 2019


Hi,

To help answer your first question, just in case you're looking to split up
the large instrument in terms of the frontend, ie. the display and/or data
entry aspect, you can have a look into the instrument_subtests and
test_names tables in conjunction with this template that outlines how to
split the form fields into respective subpages:
https://github.com/aces/Loris/blob/master/docs/instruments/NDB_BVL_Instrument_TEMPLATE.class.inc

Justin

On Thu, Dec 19, 2019 at 7:25 AM Melanie Legault, Mrs <
melanie.legault2 at mcgill.ca> wrote:

> Hello,
>
> There is no easy, fit all answer to your question about importing the
> instrument's data.
> It depend on a few factors:
>
>    - the number of candidates you already have and amount of data that
>    would need to be migrated.
>    - if you have access to a software developer (or at least someone who
>    knows MySQL (MariaDB) and how to code scripts.
>    - If you have another instance of LORIS to develop a script without
>    affecting the production instance.
>    - the time that you have to complete this task.
>
> Depending on the answer to these questions, there are a few options:
>
>    - 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.
>    - 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.
>    - Write the script.
>       - Test and validate your script on a separate LORIS instance to
>       ensure that it would do the data transfer properly and without errors.
>       - Backup your production database in case something goes wrong.
>       - Run the script on the production instance at an appropriate time.
>
> 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.
> In the latest releases
>
>    - The "CommentID" field of the instruments table refer to the
>    "CommentID" of the "flag" table.
>    - In the same row on the "flag" table, the "SessionID" field refer to
>    the "ID" field of the "session" table.
>    - In the same row on the "session" table, the "CandID" field refer to
>    the "CandID" field of the candidate table.
>
> If you need more info, it will be a pleasure to answer your questions.
>
> Mélanie Legault | Software developer | Faculty of Medicine | McGill
> University
> 3801 University, Montréal, QC H3A 2B4
>
> ------------------------------
> *From:* loris-dev-bounces at bic.mni.mcgill.ca <
> loris-dev-bounces at bic.mni.mcgill.ca> on behalf of ALS Neuroimaging
> Research Unit <alsneuroimagingresearchunit at gmail.com>
> *Sent:* December 18, 2019 18:22
> *To:* loris-dev at bic.mni.mcgill.ca <loris-dev at bic.mni.mcgill.ca>
> *Subject:* [Loris-dev] Normalizing/breaking down instruments
>
> Hi!
>
> Currently our instruments are quite long, and we would like to break them
> down into separate instruments.
> 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.
>
> Also is there any documentation that I could refer to to understand the
> relationship between the individual instrument tables and the flag table?
> The LORIS database schema
> <https://github.com/aces/Loris/wiki/LORIS-database-schema> on GitHub is
> not updated and is redirected to a dead link on the LORIS demo instance,
>
> Thanks!
> _______________________________________________
> Loris-dev mailing list
> Loris-dev at bic.mni.mcgill.ca
> https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20191219/4f448b1c/attachment.html>


More information about the Loris-dev mailing list