Skip to content

fardolieri/icd-10-api

 
 

Repository files navigation

ICD-10 API (German Version)

API to search the german version of the 10th revision of the International Statistical Classification of Diseases Database.

GitHub release (latest by date)

Quick Nav

  1. Production Deployment
  2. Configuration
  3. Considerations
  4. Contributing

Production Deployment

Want an ICD-10 api of your own? The easiest way is to deploy our docker container. Just follow the steps below to get started.

Docker Build Status

Requirements

Deployment

  1. Set environment variables to configure the container:
    export MAX_SEARCH_WORDS="6"
  2. Start the container with a single command
    docker run --name icd-10-api -p 3000:3000 -d ghcr.io/dot-base/icd-10-api:latest
    
  3. Done and dusted 🎉. The ICD-10 api is available on port 3000.

Configuration

Environment Variables

Variable Name Default Example
MAX_SEARCH_WORDS 6 -

Considerations

Pre-processing and multi-term searches

The ICD-10 api processes a search query by first splitting it into separate search terms as in the following example:

'Parkinson-Syndrom Primär' -> ['Parkinson', 'Syndrom', Primär]
'Parkinson G20.9 unspezifisch' -> ['Parkinson', 'G20.9', 'unspezifisch']

If a query consists of several terms, the ICD-10 api will assemble all combinations of these terms and order them by length:

'Parkinson-Syndrom Primär' -> ['Parkinson Syndrom Primär', 'Parkinson Syndrom', 'Parkinson Primär', 'Syndrom Primär', 'Parkinson', 'Syndrom', 'Primär']

The service will search for matches in descending order, meaning it will first search for the full term 'Parkinson Syndrom Primär'. If no match was found, the search will proceed with 'Parkinson AND Syndrom' 'Parkinson AND Primär' 'Syndrom AND Primär'. If the combination of two search terms results in one or several matches, the search will stop and return the result. Otherwise, it will proceed to search for each single term separately. Due too performance and time-out reasons the default max. value for search terms is set to 6, but can be changed indiviually by setting MAX_SEARCH_WORDS.

Prioritization of ICD-10 codes

Terms that match the ICD code pattern are handled with priority. If a query contains something like 'Parkinson G20' or 'Parkinson G20.9', the service will first try to find exact matches for these ICD codes. It will only search for further results matching 'Parkinson', if no matching ICD codes were found.

Contributing

This project is written in Typescript. For an introduction into the language and best practices see the typescript documentation.

You will need docker, git, jq and openssl. Checkout a local copy of this repository, cd into it and run:

./launch-stack.sh

Follow the steps on the screen.

By default the server is available at http://localhost:3000.

Go and mix up some code 👩‍💻. The server will reload automatically once you save. Remember to keep an eye on the console.

About

Rest API to search the 10th revision of the International Statistical Classification of Diseases Database.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 81.8%
  • Shell 14.4%
  • Dockerfile 3.8%