Giter Club home page Giter Club logo

redcap-em-shazam's Introduction

Shazam External Module

There is additional documentation to help you configure this once installed.

What does it do?

This module allows you to create custom instrument layouts, similar to custom input matrixes. You can arrange dropdown, radio, input, and other fields into a custom html element and insert that into your instrument.

It does require a little but of HTML skill, but you can do simple things like this:

Example Table

Or, you can get much more creative:

Example Complex

Or, you can go crazy as in this side-by-side radio example:

Example Side By Side

The way this works is to insert a 'descriptive' field on your form where you want to put the custom table.

Next, you set up the external module and define your custom HTML. Here is an example:

<table class='fy_summary'>
    <tr>
        <th></th>
        <th>2012</th>
        <th>2013</th>
        <th>2014</th>
        <th>2015</th>
        <th>2016</th>
    </tr>
    <tr>
        <th>Federal Grants</th>
        <td><div class='shazam shazam-icons'>fed_grants_fy12</div></td> <!-- including shazam-icons will add the history / data quality icons -->
        <td><div class='shazam'>fed_grants_fy13</div></td>
        <td><div class='shazam'>fed_grants_fy14</div></td>
        <td><div class='shazam'>fed_grants_fy15</div></td>
        <td><div class='shazam'>fed_grants_fy16</div></td>
    </tr>
    <tr>
        <th class='shazam'>nf_grants:label</th> <!-- This will map the LABEL to the field nf_grants -->
        <td class='shazam'>nf_grants_fy12</td>
        <td class='shazam'>nf_grants_fy13</td>
        <td class='shazam'>nf_grants_fy14</td>
        <td class='shazam'>nf_grants_fy15</td>
        <td class='shazam'>nf_grants_fy16</td>
    </tr>
    <tr><th>Research Agreements/Contracts</th>
        <td class='shazam'>rsch_contract_fy12</td>
        <td class='shazam'>rsch_contract_fy13</td>
        <td class='shazam'>rsch_contract_fy14</td>
        <td class='shazam'>rsch_contract_fy15</td>
        <td class='shazam'>rsch_contract_fy16</td>
    </tr>
    <tr shazam-mirror-visibility="clinical_trials"> <!-- This will make this entire TR only visible when the field 'clinical_trials' is visible -->
        <th>Clinical Trials</th>
        <td class='shazam'>ct_fy12</td>
        <td class='shazam'>ct_fy13</td>
        <td class='shazam'>ct_fy14</td>
        <td class='shazam'>ct_fy15</td>
        <td class='shazam'>ct_fy16</td>
    </tr>
</table>

Then, to make customization easier, you can use CSS instead of in-line CSS to tweak the look and feel.

Example CSS

It also supports the abiliy to hide and show some of your custom elements based on other branched REDCap elements. This means you could make a complex table and be able to hide/show rows of that table based on another REDCap field - similar to how one can do branching on rows in an input matrix.

Javascript can only be added/edited/removed by a superuser to prevent users from doing bad things :-)

Have fun!

DISCLAIMER:

This is an early release and I'm sure there are some issues - so please post.

redcap-em-shazam's People

Contributors

123andy avatar yjael avatar steentje34 avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.