-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschemas.html
More file actions
291 lines (264 loc) · 10.9 KB
/
Copy pathschemas.html
File metadata and controls
291 lines (264 loc) · 10.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Schemas | MEDWEAR</title>
<link rel="stylesheet" href="style.css" />
<link rel="icon" href="favicon.svg" type="image/svg+xml" />
</head>
<body>
<header>
<a href="index.html" class="header-brand">MEDWEAR</a>
<nav>
<a href="index.html">Home</a>
<a href="about.html">About</a>
<a href="documentation.html">Documentation</a>
<a href="schemas.html" class="active">Schemas</a>
<a href="med-api.html">MED-API</a>
<a href="use-cases.html">Use Cases</a>
<a href="contribute.html">Contribute</a>
</nav>
</header>
<div class="page-banner" style="background-image: url('assets/images/hero-schemas.jpg')">
<div class="page-banner-content">
<h1>Schemas</h1>
<p>JSON and ROS 2 definitions for physiological signals</p>
</div>
</div>
<div class="content-container">
<main>
<section>
<h2>MEDWEAR Physiological Signal Schemas</h2>
<p>
Below are the core MEDWEAR message types for common physiological signals.
JSON Schemas are maintained in the
<a href="https://github.com/SCAI-Lab/ord_schemas/tree/main/schema" target="_blank" rel="noopener">ord_schemas
repository</a>.
ROS 2 message definitions are in the
<a href="https://github.com/SCAI-Lab/healthcare_msgs" target="_blank" rel="noopener">healthcare_msgs
repository</a>.
</p>
<table>
<thead>
<tr>
<th>Signal</th>
<th>JSON Schema</th>
<th>ROS 2 Message</th>
</tr>
</thead>
<tbody>
<tr>
<td>Ballistocardiogram (BCG)</td>
<td><a href="https://github.com/SCAI-Lab/ord_schemas/tree/main/schema" target="_blank"
rel="noopener">bcg_schema.json</a></td>
<td><a href="https://github.com/SCAI-Lab/healthcare_msgs" target="_blank" rel="noopener">BCG.msg</a></td>
</tr>
<tr>
<td>Electrocardiogram (ECG)</td>
<td><a href="https://github.com/SCAI-Lab/ord_schemas/tree/main/schema" target="_blank"
rel="noopener">ecg_schema.json</a></td>
<td><a href="https://github.com/SCAI-Lab/healthcare_msgs" target="_blank" rel="noopener">ECG.msg</a></td>
</tr>
<tr>
<td>Electrodermal Activity (EDA)</td>
<td><a href="https://github.com/SCAI-Lab/ord_schemas/tree/main/schema" target="_blank"
rel="noopener">eda_schema.json</a></td>
<td><a href="https://github.com/SCAI-Lab/healthcare_msgs" target="_blank" rel="noopener">EDA.msg</a></td>
</tr>
<tr>
<td>Electroencephalogram (EEG)</td>
<td><a href="https://github.com/SCAI-Lab/ord_schemas/tree/main/schema" target="_blank"
rel="noopener">eeg_schema.json</a></td>
<td><a href="https://github.com/SCAI-Lab/healthcare_msgs" target="_blank" rel="noopener">EEG.msg</a></td>
</tr>
<tr>
<td>Electromyography (EMG)</td>
<td><a href="https://github.com/SCAI-Lab/ord_schemas/tree/main/schema" target="_blank"
rel="noopener">emg_schema.json</a></td>
<td><a href="https://github.com/SCAI-Lab/healthcare_msgs" target="_blank" rel="noopener">EMG.msg</a></td>
</tr>
<tr>
<td>Electrooculogram (EOG)</td>
<td><a href="https://github.com/SCAI-Lab/ord_schemas/tree/main/schema" target="_blank"
rel="noopener">eog_schema.json</a></td>
<td><a href="https://github.com/SCAI-Lab/healthcare_msgs" target="_blank" rel="noopener">EOG.msg</a></td>
</tr>
<tr>
<td>Impedance Cardiogram (ICG)</td>
<td><a href="https://github.com/SCAI-Lab/ord_schemas/tree/main/schema" target="_blank"
rel="noopener">icg_schema.json</a></td>
<td><a href="https://github.com/SCAI-Lab/healthcare_msgs" target="_blank" rel="noopener">ICG.msg</a></td>
</tr>
<tr>
<td>Photoplethysmogram (PPG)</td>
<td><a href="https://github.com/SCAI-Lab/ord_schemas/tree/main/schema" target="_blank"
rel="noopener">ppg_schema.json</a></td>
<td><a href="https://github.com/SCAI-Lab/healthcare_msgs" target="_blank" rel="noopener">PPG.msg</a></td>
</tr>
</tbody>
</table>
</section>
<section id="bcg">
<h2>BCG Example Schema Reference</h2>
<p>
The BCG schema represents waveform data from a specific lead with signal quality and temporal context.
The BCGInfo schema captures metadata about the sensor and acquisition parameters.
Every BCG data message references a BCGInfo session via <code>session_id</code>.
</p>
<h3>JSON Schemas</h3>
<details>
<summary>BCG.json - waveform data</summary>
<pre><code>{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "BCG Data",
"description": "Waveform data from a specific BCG lead with signal quality and temporal context.",
"type": "object",
"definitions": {
"time_frame": { "$ref": "time-frame-1.0.json" },
"time_interval": { "$ref": "time-interval-1.0.json" }
},
"properties": {
"session_id": {
"type": "string",
"description": "Session identifier matching BCGInfo's session_id"
},
"sample_size": {
"type": "integer",
"minimum": 0,
"maximum": 65535,
"description": "Number of samples in the bcg and signal_quality arrays"
},
"bcg": {
"type": "array",
"items": { "type": "number" },
"description": "Raw or filtered BCG values"
},
"signal_quality": {
"type": "array",
"items": { "type": "number", "minimum": 0, "maximum": 1 },
"description": "Signal quality per sample, from 0 (poor) to 1 (excellent)"
}
},
"required": ["session_id", "sample_size", "bcg", "signal_quality"]
}</code></pre>
</details>
<details>
<summary>BCGInfo.json - acquisition metadata</summary>
<pre><code>{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "BCGInfo",
"description": "Metadata describing BCG data acquisition parameters and sensor characteristics.",
"type": "object",
"definitions": {
"device_info": {
"type": "object",
"properties": {
"manufacturer": { "type": "string" },
"model": { "type": "string" },
"serial_number": { "type": "string" }
},
"required": ["manufacturer", "model"]
},
"filter_base": {
"type": "object",
"properties": {
"filter_type": { "type": "string" },
"cutoff_frequency_hz": { "type": "number" },
"order": { "type": "integer" }
}
}
},
"properties": {
"device_info": { "$ref": "#/definitions/device_info" },
"session_id": { "type": "string" },
"sampling_frequency": { "type": "number", "minimum": 0 },
"window_size_samples": { "type": "integer", "minimum": 1 },
"quality_window_size_samples": { "type": "integer", "minimum": 1 },
"units": {
"type": "string",
"enum": ["UNIT_UNKNOWN","UNIT_MV","UNIT_UV","UNIT_COUNTS","UNIT_M_S2","UNIT_NEWTON"]
},
"gain": { "type": "number" },
"adc_resolution": { "type": "integer", "minimum": 1, "maximum": 32 },
"sensor_placement": {
"type": "string",
"enum": ["PLACEMENT_UNKNOWN","PLACEMENT_CHEST","PLACEMENT_BACK","PLACEMENT_MATTRESS",
"PLACEMENT_CHAIR","PLACEMENT_ANKLE","PLACEMENT_FOOT","PLACEMENT_WRIST",
"PLACEMENT_ARM","PLACEMENT_DESK","PLACEMENT_CLOTHING","PLACEMENT_CUSTOM"]
},
"sensing_direction": {
"type": "string",
"enum": ["DIRECTION_UNKNOWN","DIRECTION_DORSO_VENTRAL","DIRECTION_LONGITUDINAL",
"DIRECTION_MEDIO_LATERAL","DIRECTION_CUSTOM"]
},
"sensing_modality": {
"type": "string",
"enum": ["MODALITY_UNKNOWN","MODALITY_PIEZOELECTRIC_FILM","MODALITY_FORCEPLATE",
"MODALITY_ACCELEROMETER","MODALITY_PIEZOELECTRIC_CRYSTAL","MODALITY_CUSTOM"]
},
"measurement_system": {
"type": "string",
"enum": ["SYSTEM_UNKNOWN","SYSTEM_STARR","SYSTEM_NICKERSON","SYSTEM_DOCK","SYSTEM_CUSTOM"]
},
"filter": { "$ref": "#/definitions/filter_base" }
},
"required": [
"device_info","session_id","sampling_frequency","window_size_samples",
"quality_window_size_samples","units","gain","adc_resolution",
"sensor_placement","sensing_direction","sensing_modality","measurement_system"
]
}</code></pre>
</details>
<h3>ROS 2 Message Definitions</h3>
<details>
<summary>BCG.msg</summary>
<pre><code>std_msgs/Header header
string session_id # Match BCGInfo's session_id
uint16 sample_size
float32[] bcg # Raw or filtered BCG values
float32[] signal_quality # 0 (poor) to 1 (excellent)</code></pre>
</details>
<details>
<summary>BCGInfo.msg</summary>
<pre><code>DeviceInfo device_info
string session_id
float32 sampling_frequency # Hz
uint32 window_size_samples
uint32 quality_window_size_samples
uint8 UNIT_UNKNOWN=0
uint8 UNIT_MV=1 uint8 UNIT_UV=2 uint8 UNIT_COUNTS=3
uint8 UNIT_M_S2=4 uint8 UNIT_NEWTON=5
uint8 units
float32 gain
uint8 adc_resolution
uint8 PLACEMENT_UNKNOWN=0 uint8 PLACEMENT_CHEST=1 uint8 PLACEMENT_BACK=2
uint8 PLACEMENT_MATTRESS=3 uint8 PLACEMENT_CHAIR=4 uint8 PLACEMENT_ANKLE=5
uint8 PLACEMENT_FOOT=6 uint8 PLACEMENT_WRIST=7 uint8 PLACEMENT_ARM=8
uint8 PLACEMENT_DESK=9 uint8 PLACEMENT_CLOTHING=10 uint8 PLACEMENT_CUSTOM=255
uint8 sensor_placement
uint8 DIRECTION_UNKNOWN=0 uint8 DIRECTION_DORSO_VENTRAL=1
uint8 DIRECTION_LONGITUDINAL=2 uint8 DIRECTION_MEDIO_LATERAL=3
uint8 DIRECTION_CUSTOM=255
uint8 sensing_direction
uint8 MODALITY_UNKNOWN=0 uint8 MODALITY_PIEZOELECTRIC_FILM=1
uint8 MODALITY_FORCEPLATE=2 uint8 MODALITY_ACCELEROMETER=3
uint8 MODALITY_PIEZOELECTRIC_CRYSTAL=4 uint8 MODALITY_CUSTOM=255
uint8 sensing_modality
uint8 SYSTEM_UNKNOWN=0 uint8 SYSTEM_STARR=1 uint8 SYSTEM_NICKERSON=2
uint8 SYSTEM_DOCK=3 uint8 SYSTEM_CUSTOM=255
uint8 measurement_system
FilterBase filter</code></pre>
</details>
</section>
</main>
</div>
<footer>
<div class="footer-logos">
<img src="assets/images/scai_logo.png" alt="SCAI Lab Logo" />
<img src="assets/images/ethz_logo.png" alt="ETH Zurich Logo" class="ethz-logo" />
</div>
<p>© 2026 ETH Zurich – MEDWEAR Project | Contact: diego.paez@scai.ethz.ch · monica.perezserrano@hest.ethz.ch</p>
</footer>
</body>
</html>