--- id: hl7 version: "0.4.5" license: BSD license_treatment: permissive maintenance: aging --- # hl7 — Python library parsing HL7 v2.x messages License: permissive · Maintenance: aging · Downloads: 648.3K/mo ## What it is and what it does python-hl7 is a parser for HL7 version 2.x messages, the standard format for exchanging healthcare data between medical systems. It converts raw HL7 message strings into Python objects, making it possible to programmatically extract and work with healthcare data fields and segments. The library has no runtime dependencies and supports Python 3.9 through 3.13. The package is designed for developers integrating with healthcare systems or processing medical records. It is stable but aging—last released in 2022 with a commit in June 2025—so it is suitable for maintenance work on existing systems but may not receive updates for emerging standards or Python features. Use it for: - Extract patient demographics and identifiers from incoming HL7 admission or registration messages - Parse lab results or clinical observations from HL7 messages for storage in a database - Build a middleware layer to transform HL7 messages between different healthcare applications - Validate and log HL7 message structure for compliance auditing in healthcare workflows ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses HL7 version 2.x medical messages into Python objects for programmatic access to healthcare data fields and segments. Yes, if you are working with HL7 2.x messages in a Python healthcare application. The library has no dependencies, is permissive licensed, and has no known vulnerabilities. The aging maintenance status is not a blocker for parsing—HL7 2.x is a stable standard—but do not expect active development or rapid bug fixes. ## Install pip install hl7 uv add hl7 poetry add hl7 ## Installing hl7 Before you install: Low friction installation with no runtime dependencies. Maintenance is aging—last release was in 2022 with a commit in June 2025, suggesting stability but not active development. License in practice: BSD license is permissive, allowing commercial and private use with minimal restrictions. Quickstart: pip install hl7 import hl7 message = hl7.parse('MSH|^~\\&|...') patient_id = message[0][3] Verify before relying: - Whether the package handles all HL7 2.x variants or only a subset of the standard - Support for MLLP transport mentioned in keywords but not detailed in the excerpt - Scope of backwards compatibility break introduced in v0.3.0 ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 648.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags hl7 message parsing, health level 7 parser, medical record parsing, hl7 v2 python, healthcare data extraction, hl7 segment parsing, healthcare, hl7-parsing, medical-data [View on SkillFed](https://skillfed.io/packages/hl7) · [View on PyPI](https://pypi.org/project/hl7/)