Skip to content
Eduard Korchmar edited this page Dec 13, 2022 · 5 revisions

Jackalope

Introduction

You are looking at Jackalope, the open-source tool for enabling support for SNOMED CT-style post-coordinated expressions during ETL conversion of source EMR data into OMOP CDM format. Jackalope is developed and supported by Sciforce for the benefit of open science and the OHDSI community.

Scroll to the bottom of this document for API reference.

Read more:

Background

SNOMED CT is a large, complex, and highly structured ontology. It also features a syntax for expressing complex clinical using post-coordinated expressions, meaning coordinated use of multiple SNOMED CT concepts to represent a single complex idea.

The OMOP Common Data Model (CDM) is a standard for representing observational clinical data, also featuring a rich ecosystem of tools for research. SNOMED CT forms a centerpiece of the CDM, being used as the primary Standard coding system for many concept Domains.

However, the CDM does not support the use of SNOMED CT post-coordinated expressions. Or, rather, it used to not support them, until the Jackalope came along. Now, it is possible to build custom standard representation for any source concept by representing it as a SNOMED CT post-coordinated expression. Jackalope will build an extension of SNOMED CT hierarchy inside a deployed OMOP CDM instance, allowing for full use of OMOP CDM tools.

Read more:

Running Jackalope

Jackalope can be run in two ways:

  • As a tool which will evaluate expressions from a single CSV file and exit.
  • As a background service, responding to REST API requests.

Running as a tool

To run Jackalope as a tool, run $ python main.py %FILENAME% in the root directory of the repository. This will evaluate all expressions in the file and load the changes to the database.

%FILENAME% must be a path to a UTF-8 encoded, comma-delimited, .CSV file. Example file can be found in use_cases_icd.csv in the root directory of the repository.

File should have thefollowing structure:

Column name Description Optional
vocabulary_id Vocabulary ID of the source concept. Defaults to "SciForce". Must have an entry present in VOCABULARY Yes
concept_code Concept code of the source concept. No
concept_name Concept name of the source concept. Will also be used for the new standard concept No
concept_class_id Concept class ID of the source concept. Defaults to "Clinical Finding" Yes
domain_id Domain ID of the source concept. Defaults to "Condition". For concept set purposes will not matter. Yes
post_coordinated_expression Post-coordinated expression to be evaluated. Must be in Compositional Grammar syntax* No

*-Subexpressions are not currently supported.

Found parents and changes to the database will be printed to the console during the run.

Running as a service

To run Jackalope as a service, run $ python main.py in the root directory of the repository. This will start a server on the specified port and host, which will respond to REST API requests. The server is not intended as a full replacement for an SQL client, and can only make changes in line with the post-coordinated expression evaluation. rest_client/client.py can be referred to as an example of how to use the API.

Clone this wiki locally