Web Monitoring API
Introduction
A protocol for uploading vital signs data to VitalDB web monitoring.
Upload Format
Please POST data as a URL-encoded (ref. RFC1738) JSON string to https://vitaldb.net/noti_post3.php as follows:
Variable Name | Description |
vrcode | Unique identification code of Vital Recorder consisting of 9 digit random numbers and alphabets. The vrcode should be registered by user on the VitalDB Web Monitoring page before use. |
rooms | array of real-time vital sign data for each tab (room/bed) in Vital Recorder |
Each room is formatted as follows:
Variable Name | Description |
roomname | name of a tab |
dtstart | start time of the transmitted data in unix timestamp |
dtend | end time fo the transmitted data in unix timestamp |
ptcon | whether or not patient is connected to Vital Recorder |
recording | whether or not Vital Recorder is recording vital signs data |
devs | array of information of devices connected to Vital Recorder |
trks | array of track data such as ECG, HR, etc. |
evts | array of event |
Each device is formatted as follows:
Variable Name | Description |
name | device name |
status | ON/OFF status of the device |
port | name of a serial communications port where the device is connected to |
Each track is formatted as follows:
Variable Name | Description |
name | track name |
type | type of the track data: wave, number, string |
srate | sample rate of the data |
unit | unit of the track |
recs | array of real-time data consisting of track value and time of the value |
Sample Data
// Sample Data String in JSON format
sample_data = '{"ver":"1.8.8.3","vrcode":"9a9uewrsv","rooms":[{"roomname":"DEMO","seqid":59,"dtstart":1607071644.806051,"dtend":1607071645.808981,"dtcase":1607071590.292408,"ptcon":1,"dtapp":1607071577.160322,"recording":1,"dgmt":-32400,"devs":[{"type":"Demo","name":"Demo","status":"on","ycable":"0","port":""}],"trks":[{"id":2109467744,"name":"EEG","type":"wav","montype":"EEG_WAV","srate":100,"mindisp":-100,"maxdisp":100,"color":"#dda0dd","unit":"uV","recs":[{"dt":1607071644.806051,"val":[-56.75,-58.05,-61,-65.2,-69.35,-71.05,-69.95,-66.65,-62.2,-54.05,-54.05,-55.05,-56.25,-61.15,-65.25,-68.15,-65.3,-63.4,-59,-53.7,-51.05,-50.85,-52.4,-56.65,-59.3,-62.1,-65.55,-65.8,-62.25,-58.95,-54.9,-50.65,-49.95,-49.95,-47.35,-46,-46.35,-46.7,-49.95,-52.65,-55.9,-59.5,-57.95,-55.25,-53.35,-49.4,-49.4,-53.05,-59,-56.9,-52.4,-47.1,-35,-32.9,-32.5,-31.9,-36.1,-38.75,-43.25,-49.55,-51.95,-54.9,-53.55,-46.9,-43.65,-39.25,-27.25,-26.05,-25.7,-27.7,-40.2,-47.2,-52.1,-54.65,-54,-51.35,-48.7,-41.25,-40.15,-40.1,-39.8,-44.3,-48.4,-52.4,-56.3,-57.1,-59.2,-60.6,-64.1,-67.2,-68.4,-70.85,-69.25,-66.4,-65.65,-68.15,-68.95,-68.9,-66.6,-64.25]}]},{"id":2109469360,"name":"NIBP_DBP","type":"num","montype":"NIBP_DBP","color":"#ffffff","unit":"mmHg","recs":[{"dt":1607071643.367762,"val":59},{"dt":1607071645.369666,"val":62}]}]}]}';
Upload Example with Sample Data
POST Data Using cURL command in terminal
curl -v -X POST https://vitaldb.net/noti_post3.php -d "data=sample_data"
POST Data Using PHP cURL
<?php
// A sample PHP Script to POST data using cURL
// MUST URL-encodes the data - https://www.php.net/manual/en/function.urlencode.php
$json = "data=".urlencode($sample_data);
// Initiate new cURL
$ch = curl_init('https://vitaldb.net/noti_post3.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
// Submit the POST request
$result = curl_exec($ch);
// Print curl information
var_dump(curl_getinfo($ch));
// Print response
var_dump($result);
// Print error if any
var_dump(curl_errno($ch) . curl_error($ch));
// Close cURL session handle
curl_close($ch);