NAME

CohortExplorer::Application::Opal::Datasource - CohortExplorer class to initialise datasource stored under 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 REST URL specified in /etc/CohortExplorer/datasource-config.properties. By default, the REST URL is http://localhost:8080. The successful authentication results in the tables (excluding views) accessible to the user.

default_parameters( $opts, $response )

This method returns a hash ref containing all default parameters. By default,

datasource type = standard (i.e. non-longitudinal), 
entity_type = Participant, 
id_visit_separator (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, variable_count, label and entity_type.

variable_structure()

This method returns a hash ref defining the variable structure. The -where key in the hash ref includes the permission the user should have, to access the variables. The administrator has access to all variables from the specified datasource but for other users only the variables with permission TABLE_ALL, TABLE_VALUES, VIEW_ALL and VARIABLE_READ are accessible. The variable attributes are unit, type, category and label.

datatype_map()

This method returns variable type to SQL type mapping.

DEPENDENCIES

LWP::UserAgent

MIME::Base64

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-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