A REDCap external module (EM) that modifies the Image Viewer EM to annotate uploaded images (using markerjs2) in notes box field types.
NOTE: This EM does not include the Image Viewer EM's action tags.
img_upload
), and @IMAGE-ANNOTATE-UPLOAD
action tagimg_annotate
), and @IMAGE-ANNOTATE
action tag assigned to your image upload variable name (e.g., @IMAGE-ANNOTATE="img_upload"
)This module saves the annotation data within the note box field that will be available when exporting records as a CSV file. To export records:
Each row will be a record and each column will be a data point collected, with the column name being the variable name for a field in the survey. The import columns to take note in the exported CSV are columns with the annotation data. On the backend, when a user creates and accepts an annotation, the annotation data is represented as a JSON object encoded as a string to be inserted into the Notes Box field type within REDCap. This allows the annotation data to be exported within the CSV file. More explicitly, the annotation data from markerjs2 is strictly a FreehandMarker object which will have certain properties depending on the annotation created.
To export the images uploaded:
{record_ID}_{field_variable_name}.jpeg
where record_id
is the ID assigned to the record and the field_variable_name
is the variable name for field it was uploaded to. For example, below is the export of a single image with the variable name img_upload
:Data for this demo can be located at demo_data
.