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' ],
[ 'and|a' => 'Join keywords using AND (default OR)' ]
)
validate( $opts, @args )
Validates the command options and arguments and throws exception if validation fails.
run( $opts, @args )
This method enables the user to find variables using keywords. The command looks for the presence of keywords in columns specified in variable_structure method of the sub class. The command attempts to print the variable dictionary (i.e. meta data) of variables meeting the search criteria. 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) separated by newlines
label
OPTIONS
- -f, --fuzzy
-
Fuzzy search
- -i, --ignore-case
-
Ignore case
- -a, --and
-
Join keywords using AND (default OR)
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:select
method in SQL::Abstract::More fails to construct the SQL query from the supplied hash ref.execute
method in DBI fails to execute the SQL query.
throw_cmd_validation_exception
: This exception is thrown if the user has not supplied any arguments/keywords to the command. The command expects at least one keyword.
DEPENDENCIES
EXAMPLES
find --fuzzy --ignore-case cancer diabetes mmhg (fuzzy and case insensitive search)
find Demographics (exact search)
find -fia mmse total (using AND operation 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