
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
ConceptQL (pronounced concept-Q-L) is a high-level language that allows researchers to unambiguously define their research algorithms.
This gem interprets the ConceptQL language and translates it into SQL queries compatible with OMOP CDM-structured data. The ConceptQL "language" is a set of nested hashes and arrays representing search criteria and some set operations and temporal operations to glue those criteria together.
If you're interested in reading up on ConceptQL, a rough draft of the specifications document is available in markdown format.
Outcomes Insights intends to build a vast library of research algorithms and apply those algorithms to large databases of claims data. Early into building the library, we realized we had to overcome two major issues:
We developed ConceptQL to address these two issues.
We are writing a tool that can read research algorithms defined in ConceptQL. The tool can create a diagram for the algorithm which makes it easy to visualize and understand. The tool can also translate the algorithm into a SQL query which runs against data structured in OMOP's Common Data Model (CDM). The purpose of the CDM is to standardize the format and content of observational data, so standardized applications, tools and methods can be applied to them.
For instance, using ConceptQL we can take a statement that looks like this:
:icd9: '412'
And generate a diagram that looks like this:
And generate SQL that looks like this:
SELECT *
FROM cdm_data.condition_occurrence AS co
JOIN vocabulary.source_to_concept_map AS scm ON (c.condition_concept_id = scm.target_concept_id)
WHERE scm.source_code IN ('412')
AND scm.source_vocabulary_id = 2
AND scm.source_code = co.condition_source_value
As stated above, one of the goals of ConceptQL is to make it easy to assemble fairly complex queries without having to roll up our sleeves and write raw SQL. To accommodate this complexity, ConceptQL itself has some complexities of its own. That said, we believe ConceptQL will help researchers define, hone, and share their research algorithms.
If you'd like to interact with ConceptQL a bit before deciding to dive in, head over to the ConceptQL Sandbox for an online demonstration of the language and its features.
ConceptQL is in an early-alpha state. For now it is limited to working with OMOP CDM-structured data stored in the PostgreSQL database. It has been tested under Ubuntu Linux and Mac OS X 10.8+. The interpreter is written in Ruby and theoretically should be platform independent, but your mileage may vary.
Specifically, ConceptQL needs:
Add this line to your application's Gemfile:
gem 'conceptql'
And then execute:
bundle
Or install it yourself as:
gem install conceptql
ConceptQL comes with a Thor-based command-line program: conceptql
conceptql
allows you to translate a ConceptQL statement into a SQL statement or a graph depicting the ConceptQL statement.
conceptql
will print a basic help menu for each command if you run conceptql
Right now, the only way to create a new ConceptQL statement is to write it out by hand in either Ruby, JSON, or YAML.
If you're feeling bold, feel free to try your hand at authoring a ConceptQL statement.
In order to run the tests for ConceptQL, you first have to create a database and load the OMOP vocabularies into it. You can use loadmop do to so.
Follow the instructions in loadmop to setup the vocabulary files correctly.
After loading the vocabulary data file into the database,
create an .env file in the root of the conceptql directory,
similar or identical to the one used for loadmop. Then
run rake test_db_setup
. This will load the ConceptQL test
data into the database. This only needs to be done once, not
every time you run the tests.
If any of the CSV files in test/data
has been updated since you
last updated the database, you should run rake test_db_teardown test_db_setup
to reset the data in the database. Updates to the CSV files in
test/data
should be infrequent.
After the test database has been setup, you can run the tests
using rake
, as the default task is set to run the tests.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Or, use the conceptql-dev-box to get yourself setup and hack on ConceptQL that way.
FAQs
Unknown package
We found that conceptql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.