The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CohortExplorer::Application::REDCap::Datasource - CohortExplorer class to initialize datasource stored under REDCap framework

SYNOPSIS

The class is inherited from CohortExplorer::Datasource and overrides the following methods:

authenticate( $opts )

This method authenticates the user by performing POST request against the REDCap database. The successful POST is followed by SQL query to retrieve project_id, data_export_tool and group_id. In order to use CohortExplorer with REDCap the user must have the permission to export data (data_export_tool != 0).

additional_params( $opts, $response )

The method runs a SQL query to determine the datasource type (i.e. standard/cross-sectional or longitudinal), static_tables and arm name (if applicable).

entity_structure()

This method returns a hash ref defining the entity structure. The method uses redcap_events_metadata.descrip column to define visit column. The ordering of visits is defined using the column redcap_events_metadata.day_offset. The hash ref also contains the condition for the inclusion and exclusion of records (group level permissions).

table_structure()

This method returns a hash ref defining the table structure. -columns key within the table structure depends on the datasource type. For standard datasources -columns key includes table attributes such as table, label and variable_count where as for longitudinal datasources it comprises of table, arm, variable_count, label, event_count and event_description.

variable_structure()

This method returns a hash ref defining the variable structure. The hash ref uses data_export_tool parameter set in additional_params to specify condition for the inclusion and exclusion of variables tagged as identifiers. The variable attributes include attributes such as table, unit, type, category and label.

datatype_map()

This method returns variable type to SQL type mapping.

DEPENDENCIES

HTTP::Cookies

LWP::UserAgent

SEE ALSO

CohortExplorer

CohortExplorer::Datasource

CohortExplorer::Command::Describe

CohortExplorer::Command::Find

CohortExplorer::Command::History

CohortExplorer::Command::Query::Search

CohortExplorer::Command::Query::Compare

LICENSE AND COPYRIGHT

Copyright (c) 2013 Abhishek Dixit (adixit@cpan.org). All rights reserved.

This program is free software: you can redistribute it and/or modify it under the terms of either:

  • the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version, or

  • the "Artistic Licence".

AUTHOR

Abhishek Dixit