NAME
CohortExplorer::Application::Opal::Datasource - CohortExplorer class to initialize datasource stored in Opal (OBiBa) SQL framework
SYNOPSIS
The class is inherited from CohortExplorer::Datasource and overrides the following methods:
authenticate( $opts )
This method authenticates the user using the Opal URL specified in /etc/CohortExplorer/datasource-config.properties
. By default, the Opal URL is assumed to be http://localhost:8080
. The successful authentication returns reference to the list of base tables (i.e. tables excluding views) accessible to the user. In order to use CohortExplorer with Opal the user must have the permission to view at least one variable from at least one base table.
additional_params( $opts, $response )
This method returns a hash ref containing all configuration specific parameters. The method also fetches a list of all variables from base tables (i.e. $response
) whose values are accessible to the user via Opal REST API. By default,
datasource type = standard (i.e. cross-sectional)
entity_type = Participant
id_visit_separator (valid to longitudinal datasources) = _
entity_structure()
This method returns a hash ref defining the entity structure. The datasources in Opal are strictly standard but they can be easily made longitudinal by joining the entity_id
and visit
on id_visit_separator
(default _
). For example, PART001_1, implies the first visit of the participant PART001 and PART001_2 implies the second visit. The id_visit_separator
can also be a string (e.g. PARTIOP1, PARTIOP2).
table_structure()
This method returns a hash ref defining the table structure. The hash ref includes table attributes such as variable_count
, label
, entity_type
and description
.
variable_structure()
This method returns a hash ref defining the variable structure. The variable attributes include unit
, type
, category
, validation
and label
.
datatype_map()
This method returns variable type to SQL type mapping.
DEPENDENCIES
SEE ALSO
CohortExplorer::Command::Describe
CohortExplorer::Command::History
CohortExplorer::Command::Query::Search
CohortExplorer::Command::Query::Compare
LICENSE AND COPYRIGHT
Copyright (c) 2013-2014 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