# Mindray uMEC 100 HL7 Forwarder This application listens for HL7 messages from Mindray uMEC 100 patient monitors over TCP/IP, parses the vital signs, stores them in a local SQLite database, and immediately forwards them to a configured REST API endpoint. It includes a FastAPI-based dashboard to view status and readings. ## Requirements - Python 3.12 (if running from source) - Dependencies in `requirements.txt` ## Running the Application The easiest way to start the application is using the provided `run.sh` script. This script will automatically set up the Python virtual environment, install dependencies, and start the application. 1. Install Python 3.12. 2. Edit `config.json` with your settings (target API URL, API token, etc.). 3. Run the following command in your terminal: ```bash ./run.sh ``` ## Configuration (`config.json`) - `hl7_host`: The IP address to listen on for HL7 connections (default: `0.0.0.0` for all interfaces). - `hl7_port`: The TCP port to listen on (default: `6060`). - `target_api_url`: The REST API URL to POST normalized vitals to. - `api_token`: Bearer token for authenticating with the target API. - `retry_interval_seconds`: How often to retry forwarding failed transmissions. - `log_file`: Name of the log file. - `database_url`: SQLite database URI. ## Building for Linux To package the application as a standalone executable for Linux: 1. Ensure you have installed the requirements (`pip install -r requirements.txt`). 2. Run `./build.sh` from your terminal. 3. The standalone executable `MindrayHL7Forwarder` will be generated in the `dist/` directory. ### Running the Linux Executable Simply copy the `MindrayHL7Forwarder` binary and `config.json` to the target Linux machine and run `./MindrayHL7Forwarder`. It does not require Python to be installed. The Dashboard API will be available at `http://localhost:8000/docs`. ## Dashboard APIs When the application is running, it starts a web server on port `8000`. You can access the following endpoints: - `GET /api/health` - `GET /api/status` - `GET /api/devices` - `GET /api/latest-readings` - `GET /api/transmission-logs` # ContectFiveParaMonitor