REDCap Conversion - KCL-BMEIS/xnat_form_maker GitHub Wiki

The form-maker is able to convert REDCap data dictionaries with some limitations. Certain aspects are not implemented as of yet, including:

  • Cross-form references. If a calculation or branch references data from a separate form, it is ignored. The datatype is still created but will be a textbox in the form.
  • Complex Calculations - any complex calculations are replaced with a textbox in the form. Simple datediffs and sums are calculated.

XNAT uses Apache Velocity HTML templating to generate the screens. To customise the generated plugin, you can edit the screens:

./plugins/[PLUGIN NAME]/src/main/resources/META-INF/resources/templates/screens/

Macros are contained in the file:

./plugins/[PLUGIN NAME]/src/main/resources/META-INF/resources/templates/macros/[PLUGIN NAME]Macros.vm

And javascript is contained in:

./plugins/[PLUGIN NAME]/src/main/resources/META-INF/resources/scripts/

When you have made changes you must rebuild the plugin:

cd ./plugins/[PLUGIN NAME]
./gradlew clean jar

Form Length Restrictions:

The schema name is taken from the filename. For example, redcap-demo.csv creates a schema redcapdemo. The XNAT form names are taken from the Form Names column in the csv file. There is a limit of around 68 characters for the combined length of the schema and form names. The form-maker will identify and list any forms that exceed this require either name changes or changing the name of the file.