Skip to main content

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"

Metadata

Release files for petehr 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for petehr 0.0.1
File Size Uploaded Provenance Actions
petehr-0.0.1.tar.gz 3.2 kB Without provenance Details for petehr-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for petehr 0.0.1
File Interpreter ABI Platform Actions
petehr-0.0.1-py3-none-any.whl Python 3 none any Details for petehr-0.0.1-py3-none-any.whl

Total release size: 6.1 kB

Release files / petehr-0.0.1.tar.gz

Download URL petehr-0.0.1.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6d0d9034dd9b736e3652820402f3ea4ac6ffb9fad09d2127c041bd098d29d40b
BLAKE2b-256 checksum
How to use checksums
22e1825c81d9c56860cc97b7982fb3bb50f7d51f99dc333e3ec676b8f3117ed6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.9

Release files / petehr-0.0.1-py3-none-any.whl

Download URL petehr-0.0.1-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea337cecca498d7e45cc4fc17797bdf68805e16c7e7aba27c2dcfbf1f7a08b7c
BLAKE2b-256 checksum
How to use checksums
549526d3edd1593087cff1e6520d49cb08381aac8a4db898933329ce6ed055aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.9

Security for petehr 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page