Skip to main content

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

Release files for vitaldemo 1.0.1

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

Source distribution (sdist)

Source distribution for vitaldemo 1.0.1
File Size Uploaded
vitaldemo-1.0.1.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vitaldemo 1.0.1
File Interpreter ABI Platform
vitaldemo-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.8 kB

Release files / vitaldemo-1.0.1.tar.gz

Download URL vitaldemo-1.0.1.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9d75ce56a6c6ac0e0bbe301393e75828e9600a2bd055e00abae02b0bc446b93e
BLAKE2b-256 checksum
How to use checksums
f0e9ba635fd80a903602625704d561700bfa69c9b02d9bcc7d8eca961ddb7b7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / vitaldemo-1.0.1-py3-none-any.whl

Download URL vitaldemo-1.0.1-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d9946e7f3a703c6a44ffa8ecac39632383934ce5fc915df32a46596d59cde9c
BLAKE2b-256 checksum
How to use checksums
62ace837cb2d1fad218b948c1bf4e85a7389a938d631d4c42df74803ed3bff68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

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