• Stars
    star
    119
  • Rank 296,209 (Top 6 %)
  • Language
    Python
  • License
    Other
  • Created over 10 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Basic Python 3 tools to interact with UMLS lexica

UMLS for Python

These are basic tools to interact with UMLS lexica, namely UMLS, SNOMED and RxNorm, using Python 3 scripts. For each of the three databases there are scripts (2 Bash and 1 Python) that facilitate import of the downloaded data into a local SQLite 3 database.

You will need a UMLS license to download UMLS lexica.

For a simple start, run one of the files (umls.py, snomed.py, rxnorm.py) in your Shell and follow the instructions. The scripts will prompt you to download and install the databases and, when completed, print a simple example lookup.

There are also utility scripts that offer help for specific use cases, see below.

Documentation

An auto-generated documentation (via Sphinx) is available but not very exhaustive at the moment. See below for some quick examples.

Usage

More detailed instructions here:

There are XYLookup classes in each of the three files which can be used for database lookups (where XY stands for UMLS, SNOMED or RxNorm). The following example code is appended to the end of the respective scripts and will be executed if you run it in the Shell. You might want to insert XY.check_databases() before this code so you will get an exception if the databases haven't been set up.

look_umls = UMLSLookup()
code_umls = 'C0002962'
meaning_umls = look_umls.lookup_code_meaning(code_umls)
print('UMLS code "{0}":     {1}'.format(code_umls, meaning_umls))

look_snomed = SNOMEDLookup()
code_snomed = '215350009'
meaning_snomed = look_snomed.lookup_code_meaning(code_snomed)
print('SNOMED code "{0}":  {1}'.format(code_snomed, meaning_snomed))

look_rxnorm = RxNormLookup()
code_rxnorm = '328406'
meaning_rxnorm = look_rxnorm.lookup_code_meaning(code_rxnorm, preferred=False)
print('RxNorm code "{0}":     {1}'.format(code_rxnorm, meaning_rxnorm))

You would typically use this module as a submodule in your own project. Best add this as a git submodule but that really is up to you. If you do use this module as a Python module, you can't use the name py-umls because it contains a dash, so you must checkout this code to a correctly named directory. I usually use umls.

License

This work is Apache licensed.

More Repositories

1

indivo_server

The Indivoβ„’ Personally Controlled Health Record
Python
103
star
2

ccdaScorecard

Automatic C-CDA scorecard to promote best practices
JavaScript
31
star
3

ccdaReceiver

Consolidated CDA Receiver: Accept C-CDA via HTTP, parse into JSON resources, and expose through a RESTful API
JavaScript
23
star
4

indivo_ui_server

JavaScript
21
star
5

indivo_client_py

Python client for Indivo X
Python
11
star
6

indivo_client_java

The Indivo Client library for Java
Java
6
star
7

IndivoFramework-ios

A framework written for iOS which enables drop-in support for iOS-based Indivo apps.
Objective-C
6
star
8

pop-health-app

The Pop-Health App of the LEAP Project
JavaScript
5
star
9

indivo_schemas

Document Schemas for Indivo X Data
Shell
5
star
10

survey_builder

JavaScript
5
star
11

i2b2-fhir-cell

i2b2 FHIR cell offering a FHIR REST API to push data into i2b2
HTML
5
star
12

clinical-trials-app

Clinical trials eligibility screening app, Python on Flask with a canJS frontend
JavaScript
4
star
13

mdht-ccda-webapp

Web app that validates C-CDA documents and returns results as JSON
Python
4
star
14

indivo_medications

Bundled Medications App for Indivo X UI Server
JavaScript
3
star
15

indivo_codingsystems

Code for loading codingsystems data into Indivo X Server
Python
3
star
16

indivo_sample_rails_app

Indivo app written in Rails to demonstrate Indivo authentication methods and generic OAuth calls
CSS
3
star
17

oauth_py

oAuth library for Python
Python
3
star
18

indivo_allergies

Bundled Allergies App for the Indivo X UI Server
JavaScript
3
star
19

survey_client

JavaScript
2
star
20

indivo_problems

Bundled Problems App for the Indivo X UI Server
Python
2
star
21

i2b2-ssr

i2b2 Self-scaling Registries
Java
2
star
22

clinical-trials-app-installer

Vagrant and ansible scripts to install clinical-trials-app
Python
2
star
23

indivo_labs

Bundled Labs App for the Indivo X UI Server
JavaScript
2
star
24

itdothealth

ITDotHealth web site
HTML
1
star
25

MedReconcile-iOS

Indivo-based medication list app (legacy)
Objective-C
1
star
26

med-hub-installer

Scripts to set up a box for MedHub
Python
1
star
27

fhir21cfr11

FDA 21 CFR Part 11 FHIR Implementation
1
star
28

i2b2-ssr-admin

i2b2-ssr core cell
JavaScript
1
star
29

has_named_bootstraps

Ruby
1
star
30

IndivoMedicationsExample-ios

An example medication management app written to demonstrate the Indivo ios Framework.
Objective-C
1
star
31

indivo_sample_surveys_app

Ruby
1
star
32

indivo_email_router

An Indivo application which routs incoming emails to the Indivo inbox using the messaging API.
Python
1
star
33

indivo_sample_data

Sample Patient Data Profiles for Indivo
Shell
1
star
34

indivo_admin

An administrative tool for managing Indivo records and accounts
Python
1
star