Skip to content

croeder/matchbox_scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

matchbox_scripts

This is a repo of scripts to test the translation of a few FHIR resources to other resources that look like OMOP tables. It uses a docker image, croeder/matchbox:latest, that sets up a product called matchbox, that itself is deployable server built from HAPI-FHIR. The matchbox server knows about the Vulcan FHIR-to-OMOP IG and loads it for the structure maps. It also knows about the Echnica terminology server that has the OHDSI/OMOP vocabulary loaded in it for matchbox'x use.

Getting Started Locally

These instructions should guide you to running these tools on a local laptop. Terminology mapping will call out to the FHIR terminology server. Some experience with bash will be useful.

  • Install Docker and Git

  • Git Clone this repo

  • Start the matchbox server in Docker

    • easily from a git bash prompt:
      • bash> docker run -p 8080:8080 croeder/matchbox:latest
    • perhaps also from the Docker Desktop UI (TBD)
      • Search for croeder/matchbox:latest
      • Start it
        • expose the port 8080 as 8080
  • Run Scripts to Exercise the Mapping The scripts are paired with a JSON file containing a FHIR resource. They each curl into the server to transform the FHIR to OMOP. The output is a FHIR resource, but in the shape of an OMOP table.

    • payload.sh, patient.json
    • transform_condition_fever.sh, condition_fever.json
    • transform_condition.sh, condition_hypertension.json
  • Convert Transform Output to CSV omop_to_csv.py reads the JSON output of a transform script and emits a CSV row with the full set of OMOP column headers. It requires Python 3 and dispatches automatically on resourceType (currently supports ConditionOccurrence and Person).

    Pipe a single transform directly:

    bash transform_condition_fever.sh | python3 omop_to_csv.py

    Accumulate multiple records into one file:

    bash transform_condition_fever.sh | python3 omop_to_csv.py                   > conditions.csv
    bash transform_condition.sh       | python3 omop_to_csv.py --no-header >> conditions.csv

    Or convert a saved JSON file:

    python3 omop_to_csv.py condition_fever_output.json

Getting Started on a Jupyter notebook on Google Colab (TBD)

Running a public server involves taking on provisioning and deploying the hardware resources and restricted access to known and well behaved actors. With the matchbox server available, it would be possible to set up a Jupyter notebook on Google collab where the shell scripts could be run. The server above is doing the heavy lifting.

Links

TBD

  • more fine-grained detail in these instructions

MISC other scripts and data

  • check_ig_loaded.sh*
  • check_operations.sh*
  • check_structure_maps.sh*
  • run_via_docker.sh*
  • transform.json
  • transform.sh*
  • transform_0.sh*
  • transform_a.sh*
  • upload_personmap.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors