Skip to main content

Introduction

hl7_transform is a Python package that allows for transformation of HL7 messages using a field mapping dictionary.

Maintenance Docs build status GitHub Workflow Status PyPI license PyPI pyversions

As a standard, HL7 permits different ways of implementing message interfaces between systems. For example two systems that exchange ADT or SIU messages often pass the same information in different fields. In a hospital, an integration engine would map one type of HL7 messages to another, transforming the messages on the fly as they are passed through the interfaces. This Python package allows you to test message transformation without having an integration engine in place. You can modify your HL7 message structure freely, by using a JSON-encoded mapping of fields, then evaluate the conformance of the newly created transformed messages to the target software.

A live example of this package at work can be found in hl7_transform_web repository and online.

How to use

The easiest way to use this library is to install it from Pypi:

pip install hl7_transform

Alternatively, you can download and build this package from source:

git clone https://github.com/pdyban/hl7_transform.git
python setup.py build
python setup.py install

After installation, you can use the Python library in your own projects as well as call standalone script hl7_transform in the shell console of your choice.

hl7_transform --help

You can also build your own projects or experiment in Jupyter notebooks by importing the library in your Python code:

from hl7_transform.mapping import HL7Mapping
from hl7_transform.transform import HL7Transform
from hl7_transform.message import HL7Message

mapping = HL7Mapping.from_json('test_transform.json')
message = HL7Message.from_file('test_msg.hl7')
transform = HL7Transform(mapping)
transformed_message = transform(message)

For example code, see inside test module, in particular test_transform.py.

Documentation

This project is documented using sphinx. The documentation pages can be found in ReadTheDocs.

To understand how the package works, we suggest to start by reading the Mapping rules documentation page.

Release files for hl7-transform 0.1.6

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

Source distribution (sdist)

Source distribution for hl7-transform 0.1.6
File Size Uploaded
hl7_transform-0.1.6.tar.gz 10.7 kB Details

Release files / hl7_transform-0.1.6.tar.gz

Download URL hl7_transform-0.1.6.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b67f1d6a1b8bb12ef94363805fbbee661431398bee7820839c8cb08db1407e9c
BLAKE2b-256 checksum
How to use checksums
467b4afc1feed79fe9a065bb77d3c6bdf1dda07a12a50631a95fcf497661c211
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.1.6 This release

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

2 release files

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