Add script which converts a REDCap data dictionary to LINST format
This adds a new tools/ script, redcap2linst, which takes a REDCap data dictionary CSV and outputs a LINST file for each instrument in it. It does not (currently) deal with rules or scoring, only builds the LINST files. It also doesn't deal with inserting into the Test_names or creating the .meta files, as that's currently done by the instrument_manager when the LINST file is uploaded to LORIS.
I was only able to implement the types in the data dictionary that I was given for HBCD, so it's possible there are some data types that are missing which need to be implemented (in which case the script will currently throw an exception.)
to add date validation, look at column 'Text Validation Type OR Show Slider Number' (8th col) which can have values such as 'date_ymd'. The 9th and 10th columns, 'Text Validation Min' and 'Text Validation Max' respectively, can also have further validation info
this needs to add {-@-}testname{@}<test_name> to each linst files
Why? The only reference I see to testname in NDB_BVL_Instrument_LINST comes from the meta file, not the LINST file.
(also I don't think the test name is in the redcap data dictionary)
Why? The only reference I see to
testnamein NDB_BVL_Instrument_LINST comes from the meta file, not the LINST file.
The issue is with tools/exporters/data_dictionary_builder.php which loops through ip_output looking for testname
@xlecours this is fixed somewhat by https://github.com/aces/Loris/pull/8434
@driusan that PR is assigned to you to sign off because the solution is a bit of a quick fix that @ridz1208 and I thought up. if it's all good with you, then we won't need to add {-@-}testname{@}<test_name> as xavier suggested
@driusan this PR is failing tests, probably just needs a rebasing. do you have some time to take a look at the unresolved comments before I leave?