Skip to main content

VitalRecorder simulator that streams HL7 vital signs data to a VitalServer via Socket.IO

Project description

vitaldemo

VitalRecorder simulator that downloads sample vital signs data from VitalDB open dataset and streams it as HL7 v2.6 messages to a VitalServer via Socket.IO.

Acts as a VitalRecorder client, sending real-time HL7 data for 5 simulated beds.

Installation

pip install vitaldemo

Usage

# Stream to default server (vitaldb.net)
vitaldemo

# Stream to a custom server
vitaldemo https://my-server.com

# With custom VitalRecorder code
vitaldemo https://my-server.com --vrcode MY_DEMO

Options

Argument Default Description
server https://vitaldb.net VitalServer URL
--vrcode VITALDEMO VitalRecorder device identifier

What It Does

  1. Downloads 5 sample .vital files from api.vitaldb.net on startup
  2. Connects to the specified VitalServer via Socket.IO (WebSocket)
  3. Emits join_vr with the vrcode to register as a VitalRecorder
  4. Sends gzip-compressed HL7 v2.6 payloads via send_data event every 1 second
  5. Loops data infinitely - when a file ends, it restarts from the beginning

HL7 v2.6 Message Format

Each payload contains HL7 messages for all 5 beds concatenated together:

MSH|^~\&|VitalRecorder|VITALDEMO|||20250401120000||ORU^R01|1|P|2.6
PID|||
PV1||I|BED-1
OBR|1|||VITAL_SIGNS|||20250401115959|20250401120000
OBX|1|NM|ECG_HR^Monitor/HR||72|bpm|40^200||||R
OBX|2|NA|ECG_WAV^Monitor/ECG_II@100||0.12^0.15^...||mV|-1.5^1.5||||R
MSH|^~\&|VitalRecorder|VITALDEMO|||20250401120000||ORU^R01|2|P|2.6
PID|||
PV1||I|BED-2
...

OBX Value Types

Type Description Example
NM Numeric 72
NA Waveform (^-separated) 0.12^0.15^0.09
ST String event Induction Start

Node.js Version

A JavaScript version is also available:

npx vitaldemo [server_url] [--vrcode CODE]

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vitaldemo-1.0.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vitaldemo-1.0.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file vitaldemo-1.0.0.tar.gz.

File metadata

  • Download URL: vitaldemo-1.0.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for vitaldemo-1.0.0.tar.gz
Algorithm Hash digest
SHA256 50cc925671bf9eee34f7c7ca102ca493154e28a30a00a53f8c135ee4482b9d0b
MD5 1ba02ba6fe273e6b0ca61b735d7e3b18
BLAKE2b-256 7c2cc3faf6cc78f9ecb991ac24d48a6a38a15b751f9bfd902bb0aa5beedb7968

See more details on using hashes here.

File details

Details for the file vitaldemo-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: vitaldemo-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for vitaldemo-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d12eb661612e5c698e5226ca38fc7643b5b42f3a0359852434b6f9206c50d3bf
MD5 4adadbe1a2fca54afcd1cad4fad7d515
BLAKE2b-256 a9ee6806157a4571e38910c18fca102f764eddf59dd25d3e2ae1fa1646c9c76b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page