Giter VIP home page Giter VIP logo

dicom2omop's Introduction

Dicom2OMOP

This project looks at creating a controlled vocabulary for the DICOM Pt 6 Data Dictionary with a focus on CS code strings in the OMOP vocabulary format and harmonizing common data elements (CDE).

  • Create a library that takes a dicom tag
    • (eg Part 6 0010,0040 Patient Sex)
    • (Link to Part 16 CID 7455 Sex)
    • (Ingest FHIR JSON)
    • (Create "maps to" from Source to Standard vocabulary for OMOP gender)
  • Identify current gaps in SNOMED and LOINC mapping from DICOM

Requirements

Developed and Tested for:

  • WSL Ubuntu 22.04.3 LTS (Jammy Jellyfish)
  • openjdk version "11.0.21" 2023-10-17
  • Python 3.10.12

Instructions

0. Ensure the system is up to date and install dependencies

sudo apt update && sudo apt upgrade
sudo apt install bzip2 default-jdk default-jre xsltproc libxml2-utils python3-pip python3.10-venv

Verify java installation

java -version

openjdk version "11.0.21" 2023-10-17

1. Download the current source and rendering pipeline from dicom.nema.org using curl (wget or another method will also work)

curl https://dicom.nema.org/medical/dicom/current/DocBookDICOM2023e_sourceandrenderingpipeline_20231120022735.tar.bz2 --output sourceandrenderingpipeline.tar.bz2

2. Extract to a directory, remove archive, and navigate to the directory

mkdir sourceandrenderingpipeline 

tar -xvf sourceandrenderingpipeline.tar.bz2 -C sourceandrenderingpipeline

rm sourceandrenderingpipeline.tar.bz2

cd sourceandrenderingpipeline

3. Update absolute paths using the provided bash script

./updateabsolutepaths.sh

4. Generate the databases for the parts (example for part 16)

./generateolinkdb.sh 16

5. Generate FHIR valuesets

5.1 Navigate to the valuesets subdirectory and download Java package dependencies

cd valuesets
curl https://repo1.maven.org/maven2/javax/json/javax.json-api/1.0/javax.json-api-1.0.jar --output javax.json-api-1.0.jar
curl https://repo1.maven.org/maven2/org/glassfish/javax.json/1.0.4/javax.json-1.0.4.jar --output javax.json-1.0.4.jar

5.2 Create a backup of the bash script used to extract valuesets, then modify the reference to the Java packages in the bash file and run it

cp extractvaluesets.sh{,.old}
sed -i 's|${HOME}/work/pixelmed/imgbook/lib/additional/|./|g' extractvaluesets.sh

./extractvaluesets.sh

5.3 Count the extracted json files to validate they match

find ./valuesets/fhir/json/ -type f -name "*.json" | wc -l

1341

6. Setup the Python virtual environment

note: this should be done in the root DICOM2OMOP directory. We use cd ../.. here to navigate there from DICOM2OMOP/sourceandrenderingpipeline/valuesets

This may take a few minutes as packages are installed.

cd ../..
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python DICOM_P16_harvest_fhir_json.py

References

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.