Git Product home page Git Product logo

http_to_flatfile_to_http_hl7's Introduction

HL7 to HTTP and TCP Conversion and Validation

Overview

This project provides a complete solution for converting HL7 messages between plain/text HTTP payloads, flat files, and TCP connections. It includes validation of HL7 messages and generation of appropriate ACK messages. The solution is implemented with a simple HTTP server and TCP server.

Features

  • Convert HL7 messages from HTTP plain/text to flat files.
  • Convert HL7 messages from flat files to HTTP plain/text.
  • Validate HL7 messages.
  • Generate ACK messages based on the validation results.
  • HTTP server with endpoints for conversions and forwarding messages to TCP server.
  • TCP server for handling HL7 messages from HTTP server and remote TCP hosts.
  • Bi-directional communication between HTTP and TCP servers.

Requirements

  • Python 3.7 or higher
  • The requests library for HTTP client functionality

Installation

  1. Clone the repository:

    git clone <repository_url>
    cd <repository_directory>
  2. Install the required Python packages:

    pip install -r requirements.txt

Usage

Running the HTTP Server

To start the HTTP server, run the following command:

python server.py

### Running the TCP server

To Start the TCP server, run the following command:

```sh
python tcp_server.py

### Notes
I added a terminal in my local machine listening on port 8082 to receive messages sent by postman like this in the body as raw text:

MSH|^~\&|HIS|RIH|ADT|RIH|20230523102000||ADT^A31|123456|P|2.4 EVN|A31|20230523102000 PID|1||12345678^^^RIH^MR||Doe^John^A||19800101|M|||456 Elm St^^Newtown^CA^90211^USA||555-5678|||||M|N|123-45-6789 PV1|1|O|^^^RIH||||1234^Smith^John^A|||||||||||||||12345678

To this address::
http://localhost:8080/hl7_http

The program converts the message to flat file and sends to the TCP IP port.

The tcp_client.py will send a flat file HL7 to the TCP server which sends it on the HTTP server which passes it to beeceptor as a mock endpoint /hl7

http_to_flatfile_to_http_hl7's People

Contributors

luney-sp-76 avatar davidkennedy02 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.