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 running the authentication query against the REDCap database. The successful authentication returns hash ref containing project_id
, data_export_tool
and group_id
. In order to use CohortExplorer with REDCap the user must have the permission to export data in REDCap (i.e. data_export_tool != 0
). At present the application only supports the standard REDCap table authentication.
additional_params( $opts, $response )
This method adds the authentication response to the datasource object. The method also runs a SQL query to determine the datasource type (i.e. standard/cross-sectional or longitudinal). For longitudinal datasources the method attempts to set static_tables
and init_event_id
(i.e. event_id of the first repeating form). At present the application does not support datasources with multiple arms.
entity_structure()
This method returns a hash ref defining the entity structure. The method uses the init_event_id
parameter set in additional_params
to define visit
column for the longitudinal datasources. The hash ref contains the condition for the inclusion/exclusion of records.
table_structure()
This method returns a hash ref defining the table structure. The -columns
key within the table structure depends on the datasource type. For standard datasources the -columns
key includes 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 the data_export_tool
parameter set in additional_params
to specify condition for the inclusion/exclusion of variables tagged as identifiers. The variable attributes include columns such as table
, unit
, type
, category
and label
.
datatype_map()
This method returns variable type to SQL type mapping.
SEE ALSO
CohortExplorer::Command::Describe
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