Skip to main content

Python Toolkit for EHR Processing

Project description

petehr

petehr is your Personal Assistant for Creating Research-Ready EHR Data. A Python Toolkit for EHR Processing.

Features

  • Text-to-Code Mapping: Convert medical text to standardized medical codes.
  • Custom Dictionary Support: Integrate your own medical concept dictionary. For string to medical codes, we recommend using UMLS.
  • Lightweight and Efficient: Designed for simplicity and speed in processing EHR data. Note: Negation detection is not available in this version.

Installation

pip install petehr

Usage

from petehr import Text2Code

# Dictionary is a two column CSV file with strings and their corresponding codes.
# Example of a sample String-CUI dictionary:

'''
str,code
Asthma,C0004096
Tuberculosis,C0041296
Tylenol,C0699142
Spinal fusion,C3278509
'''

mapper = Text2Code("sample_dict.csv")

# Convert text to a string of codes
codes = mapper.convert("Patient presents with a history of asthma and reports worsening asthma symptoms over the past.")

print(codes)  # Output: "C0004096,C0041296,C0699142,C3278509"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

petehr-0.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

petehr-0.0.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file petehr-0.0.1.tar.gz.

File metadata

  • Download URL: petehr-0.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.9

File hashes

Hashes for petehr-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6d0d9034dd9b736e3652820402f3ea4ac6ffb9fad09d2127c041bd098d29d40b
MD5 697bbfba5099dd465dcdd6a48b484926
BLAKE2b-256 22e1825c81d9c56860cc97b7982fb3bb50f7d51f99dc333e3ec676b8f3117ed6

See more details on using hashes here.

File details

Details for the file petehr-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: petehr-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.9

File hashes

Hashes for petehr-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ea337cecca498d7e45cc4fc17797bdf68805e16c7e7aba27c2dcfbf1f7a08b7c
MD5 b48a7d8e2e65d6fb893b418b617af63c
BLAKE2b-256 549526d3edd1593087cff1e6520d49cb08381aac8a4db898933329ce6ed055aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page