NAME
CohortExplorer::Command::Find - CohortExplorer class to find variables using keywords
SYNOPSIS
find [OPTIONS] [KEYWORD]
f [OPTIONS] [KEYWORD]
DESCRIPTION
This class is inherited from CLI::Framework::Command and overrides the following methods:
usage_text()
This method returns the usage information for the command.
option_spec()
(
[ 'ignore-case|i' => 'ignore case' ],
[ 'fuzzy|f' => 'fuzzy search' ]
)
validate( $opts, @args )
Validates the command options and arguments and throws exception if validation fails.
run( $opts, @args )
This method enables the user to search variables using keywords. The command looks for the presence of keywords in the columns specified under variable_structure method of the inherited datasource class. The command attempts to output the variable dictionary (i.e. meta data) of variables that are found. The variable dictionary can include the following variable attributes:
variable name (mandatory)
table name (mandatory)
type (i.e. integer, decimal, date, datetime etc.)
unit
categories (if any)
label
OPTIONS
DIAGNOSTICS
This command throws the following exceptions imported from CLI::Framework::Exceptions:
throw_cmd_run_exception
: This exception is thrown if one of the following conditions are met,The
select
method from SQL::Abstract::More fails to construct the SQL from the supplied hash ref.The method
execute
from DBI fails to execute the SQL query.
throw_cmd_validation_exception
: This exception is thrown only if no arguments (i.e. keywords) are supplied because this command requires at least one argument.
DEPENDENCIES
EXAMPLES
find --fuzzy --ignore-case cancer diabetes (fuzzy and case insensitive search)
find Demographics (exact search)
find -fi mmHg (options with bundling and aliases)
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