Various converters to convert value sets from CSV to JSON, etc.

Overview

ValueSet Converters

Tools for converting value sets in different formats. Such as converting extensional value sets in CSV format to JSON format able to be uploaded to a FHIR server.

Set up / installation

  1. You must have Python3 installed.
  2. Run to clone repo: git clone https://github.com/HOT-Ecosystem/ValueSet-Converters.git
  3. Change directory: cd ValueSet-Converters
  4. Make & use virtual environment: virtualenv env; source env/bin/activate
  5. Run to install dependencies: pip install -r requirements.txt
  6. To use the "VSAC to OMOP/FHIR JSON" tool, which fetches from Google Sheets, you'll need the following:
    3.a. Access to this google sheet.
    3.b. Place credentials.json and token.json inside the env/ directory. These can be obtained from Joe (will upload them to a Google Drive folder later).
  7. Create an env/.env file based on env/.env.example, replacing VSAC_API_KEY with your own VSAC API key as shown in your profile. More instructions on getting an API key can be found in "Step 1" on this page.

Tools

First, cd into the directory where this repository was cloned.

1. CSV to FHIR JSON

First, convert your CSV to have column names like the example below. Then can run these commands.

Syntax

python3 -m value_set_csv_to_fhir_json path/to/FILE.csv

Example

python3 -m value_set_csv_to_fhir_json examples/1/input/n3cLikeExtensionalValueSetExample.csv

Before:

valueSet.id,valueSet.name,valueSet.description,valueSet.status,valueSet.codeSystem,valueSet.codeSystemVersion,concept.code,concept.display
1,bear family,A family of bears.,draft,http://loinc.org,2.36,1234,mama bear
1,bear family,A family of bears.,draft,http://loinc.org,2.36,1235,papa bear
1,bear family,A family of bears.,draft,http://loinc.org,2.36,1236,baby bear

After:

\n\t\t\t

A family of bears.

\n\t\t
" }, "name": "bear family", "title": "bear family", "status": "draft", "description": "A family of bears.", "compose": { "include": [ { "system": "http://loinc.org", "version": 2.36, "concept": [ { "code": 1234, "display": "mama bear" }, { "code": 1235, "display": "papa bear" }, { "code": 1236, "display": "baby bear" } ] } ] } }">
{
    "resourceType": "ValueSet",
    "id": 1,
    "meta": {
        "profile": [
            "http://hl7.org/fhir/StructureDefinition/shareablevalueset"
        ]
    },
    "text": {
        "status": "generated",
        "div": "
  
\"http://www.w3.org/1999/xhtml\">\n\t\t\t

A family of bears.

\n\t\t
"
}, "name": "bear family", "title": "bear family", "status": "draft", "description": "A family of bears.", "compose": { "include": [ { "system": "http://loinc.org", "version": 2.36, "concept": [ { "code": 1234, "display": "mama bear" }, { "code": 1235, "display": "papa bear" }, { "code": 1236, "display": "baby bear" } ] } ] } }

2. VSAC to OMOP/FHIR JSON

This will fetch from the following google sheet: https://docs.google.com/spreadsheets/d/1jzGrVELQz5L4B_-DqPflPIcpBaTfJOUTrVJT5nS_j18/edit#gid=1335629675

Syntax

  • With default options: python3 -m value_set_vsac_to_json
  • Choosing an output format: python3 -m value_set_vsac_to_json -f omop

Options:

Short flag Long flag Options Default Description
-f --format ['omop', 'fhir'] 'omop' Output format.
Owner
Health Open Terminology Ecosystem
Health Open Terminology Ecosystem
Lumar - Smart File Creator

Lumar is a free tool for creating and managing files. With Lumar you can quickly create any type of file, add a file content and file size. With Lumar you can also find out if Photoshop or other imag

Paul - FloatDesign 3 Dec 10, 2021
ValveVMF - A python library to parse Valve's VMF files

ValveVMF ValveVMF is a Python library for parsing .vmf files for the Source Engi

pySourceSDK 2 Jan 02, 2022
Python library for reading and writing tabular data via streams.

tabulator-py A library for reading and writing tabular data (csv/xls/json/etc). [Important Notice] We have released Frictionless Framework. This frame

Frictionless Data 231 Dec 09, 2022
CleverCSV is a Python package for handling messy CSV files.

CleverCSV is a Python package for handling messy CSV files. It provides a drop-in replacement for the builtin CSV module with improved dialect detection, and comes with a handy command line applicati

The Alan Turing Institute 1k Dec 19, 2022
Python's Filesystem abstraction layer

PyFilesystem2 Python's Filesystem abstraction layer. Documentation Wiki API Documentation GitHub Repository Blog Introduction Think of PyFilesystem's

pyFilesystem 1.8k Jan 02, 2023
Sheet Data Image/PDF-to-CSV Converter

Sheet Data Image/PDF-to-CSV Converter

Quy Truong 5 Nov 22, 2021
Automatically generates a TypeQL script for doing entity and relationship insertions from a .csv file, so you don't have to mess with writing TypeQL.

Automatically generates a TypeQL script for doing entity and relationship insertions from a .csv file, so you don't have to mess with writing TypeQL.

3 Feb 09, 2022
Publicly Open Amazon AWS S3 Bucket Viewer

S3Viewer Publicly open storage viewer (Amazon S3 Bucket, Azure Blob, FTP server, HTTP Index Of/) s3viewer is a free tool for security researchers that

Sharon Brizinov 377 Dec 02, 2022
Python function to construct a ZIP archive with on the fly - without having to store the entire ZIP in memory or disk

Python function to construct a ZIP archive with on the fly - without having to store the entire ZIP in memory or disk

Department for International Trade 34 Jan 05, 2023
A simple file sharing tool written in python

Share it A simple file sharing tool written in python Installation If you are using Windows os you can directly Run .exe file -- download If you are

Sachit Yadav 7 Dec 16, 2022
Python interface for reading and appending tar files

Python interface for reading and appending tar files, while keeping a fast index for finding and reading files in the archive. This interface has been

Lawrence Livermore National Laboratory 1 Nov 12, 2021
RMfuse provides access to your reMarkable Cloud files in the form of a FUSE filesystem

RMfuse provides access to your reMarkable Cloud files in the form of a FUSE filesystem. These files are exposed either in their original format, or as PDF files that contain your annotations. This le

Robert Schroll 82 Nov 24, 2022
Extract longest transcript or longest CDS transcript from GTF annotation file or gencode transcripts fasta file.

Extract longest transcript or longest CDS transcript from GTF annotation file or gencode transcripts fasta file.

laojunjun 13 Nov 23, 2022
Uproot is a library for reading and writing ROOT files in pure Python and NumPy.

Uproot is a library for reading and writing ROOT files in pure Python and NumPy. Unlike the standard C++ ROOT implementation, Uproot is only an I/O li

Scikit-HEP Project 164 Dec 31, 2022
File support for asyncio

aiofiles: file support for asyncio aiofiles is an Apache2 licensed library, written in Python, for handling local disk files in asyncio applications.

Tin Tvrtković 2.1k Jan 01, 2023
Convert All TXT Files To One File.

AllToOne Convert All TXT Files To One File. Hi 👋 , I'm Alireza A Python Developer Boy 🔭 I’m currently working on my C# projects 🌱 I’m currently Lea

4 Jun 07, 2022
Read and write TIFF files

Read and write TIFF files Tifffile is a Python library to store numpy arrays in TIFF (Tagged Image File Format) files, and read image and metadata fro

Christoph Gohlke 346 Dec 18, 2022
A tool written in python to generate basic repo files from github

A tool written in python to generate basic repo files from github

Riley 7 Dec 02, 2021
Python module that parse power builder file (PBD) and analyze code

PowerBuilder-decompile Python module that parse power builder file (PBD) and analyze code (Incomplete) this tool is composed of: pbd_dump.py pbd file

Samy Sultan 8 Dec 15, 2022
An easy-to-use library for emulating code in minidump files.

dumpulator Note: This is a work-in-progress prototype, please treat it as such. An easy-to-use library for emulating code in minidump files. Example T

Duncan Ogilvie 362 Dec 31, 2022