@the-cascade-protocol/cli 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/pod/helpers.d.ts +1 -1
- package/dist/commands/pod/helpers.d.ts.map +1 -1
- package/dist/commands/pod/helpers.js +5 -20
- package/dist/commands/pod/helpers.js.map +1 -1
- package/package.json +17 -5
- package/.dockerignore +0 -7
- package/.eslintrc.json +0 -23
- package/.prettierrc +0 -7
- package/Dockerfile +0 -18
- package/src/commands/capabilities.ts +0 -235
- package/src/commands/conformance.ts +0 -447
- package/src/commands/convert.ts +0 -164
- package/src/commands/pod/export.ts +0 -85
- package/src/commands/pod/helpers.ts +0 -449
- package/src/commands/pod/index.ts +0 -32
- package/src/commands/pod/info.ts +0 -239
- package/src/commands/pod/init.ts +0 -273
- package/src/commands/pod/query.ts +0 -224
- package/src/commands/serve.ts +0 -92
- package/src/commands/validate.ts +0 -303
- package/src/index.ts +0 -58
- package/src/lib/fhir-converter/cascade-to-fhir.ts +0 -369
- package/src/lib/fhir-converter/converters-clinical.ts +0 -446
- package/src/lib/fhir-converter/converters-demographics.ts +0 -270
- package/src/lib/fhir-converter/fhir-to-cascade.ts +0 -82
- package/src/lib/fhir-converter/index.ts +0 -215
- package/src/lib/fhir-converter/types.ts +0 -318
- package/src/lib/mcp/audit.ts +0 -107
- package/src/lib/mcp/server.ts +0 -192
- package/src/lib/mcp/tools.ts +0 -668
- package/src/lib/output.ts +0 -76
- package/src/lib/shacl-validator.ts +0 -314
- package/src/lib/turtle-parser.ts +0 -277
- package/src/shapes/checkup.shapes.ttl +0 -1459
- package/src/shapes/clinical.shapes.ttl +0 -1350
- package/src/shapes/clinical.ttl +0 -1369
- package/src/shapes/core.shapes.ttl +0 -450
- package/src/shapes/core.ttl +0 -603
- package/src/shapes/coverage.shapes.ttl +0 -214
- package/src/shapes/coverage.ttl +0 -182
- package/src/shapes/health.shapes.ttl +0 -697
- package/src/shapes/health.ttl +0 -859
- package/src/shapes/pots.shapes.ttl +0 -481
- package/test-fixtures/fhir-bundle-example.json +0 -216
- package/test-fixtures/fhir-medication-example.json +0 -18
- package/tests/cli.test.ts +0 -126
- package/tests/fhir-converter.test.ts +0 -874
- package/tests/mcp-server.test.ts +0 -396
- package/tests/pod.test.ts +0 -400
- package/tsconfig.json +0 -24
|
@@ -1,481 +0,0 @@
|
|
|
1
|
-
@prefix sh: <http://www.w3.org/ns/shacl#> .
|
|
2
|
-
@prefix pots: <https://ns.cascadeprotocol.org/pots/v1#> .
|
|
3
|
-
@prefix cascade: <https://ns.cascadeprotocol.org/core/v1#> .
|
|
4
|
-
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
5
|
-
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
6
|
-
@prefix fhir: <http://hl7.org/fhir/> .
|
|
7
|
-
|
|
8
|
-
# ============================================================================
|
|
9
|
-
# Cascade Protocol -- POTS Screening Vocabulary SHACL Validation Shapes
|
|
10
|
-
# ============================================================================
|
|
11
|
-
#
|
|
12
|
-
# Version: 1.0 (Phase 4, 2026-02-18)
|
|
13
|
-
# Validates: pots:POTSCheckResult, pots:HeartRateMeasurement,
|
|
14
|
-
# pots:BloodPressureMeasurement, pots:SymptomEvent, pots:PostureStability
|
|
15
|
-
#
|
|
16
|
-
# Layer 2 domain-specific vocabulary for POTS orthostatic testing protocol.
|
|
17
|
-
#
|
|
18
|
-
# Severity levels:
|
|
19
|
-
# sh:Violation - Required fields; data is invalid without them
|
|
20
|
-
# sh:Warning - Important optional fields; data is usable but diminished
|
|
21
|
-
# sh:Info - Suggested fields; improve data quality when present
|
|
22
|
-
#
|
|
23
|
-
# ============================================================================
|
|
24
|
-
|
|
25
|
-
# ============================================================================
|
|
26
|
-
# Shape: POTS Check Result (Top-Level)
|
|
27
|
-
# ============================================================================
|
|
28
|
-
|
|
29
|
-
pots:POTSCheckResultShape a sh:NodeShape ;
|
|
30
|
-
sh:targetClass pots:POTSCheckResult ;
|
|
31
|
-
rdfs:label "POTS Check Result Shape"@en ;
|
|
32
|
-
rdfs:comment "Validation constraints for a complete POTS orthostatic screening check result bundle"@en ;
|
|
33
|
-
|
|
34
|
-
# ------------------------------------------------------------------
|
|
35
|
-
# REQUIRED (sh:Violation) -- data is invalid without these
|
|
36
|
-
# ------------------------------------------------------------------
|
|
37
|
-
|
|
38
|
-
# Required: date (when the check was performed)
|
|
39
|
-
sh:property [
|
|
40
|
-
sh:path pots:date ;
|
|
41
|
-
sh:datatype xsd:dateTime ;
|
|
42
|
-
sh:minCount 1 ;
|
|
43
|
-
sh:maxCount 1 ;
|
|
44
|
-
sh:severity sh:Violation ;
|
|
45
|
-
sh:name "Check Date"@en ;
|
|
46
|
-
sh:message "POTSCheckResult MUST have exactly one date (xsd:dateTime)"@en
|
|
47
|
-
] ;
|
|
48
|
-
|
|
49
|
-
# Required: protocol (currently only "nasaLean")
|
|
50
|
-
sh:property [
|
|
51
|
-
sh:path pots:protocol ;
|
|
52
|
-
sh:datatype xsd:string ;
|
|
53
|
-
sh:minCount 1 ;
|
|
54
|
-
sh:maxCount 1 ;
|
|
55
|
-
sh:in ("nasaLean") ;
|
|
56
|
-
sh:severity sh:Violation ;
|
|
57
|
-
sh:name "Test Protocol"@en ;
|
|
58
|
-
sh:message "POTSCheckResult MUST specify protocol as 'nasaLean'"@en
|
|
59
|
-
] ;
|
|
60
|
-
|
|
61
|
-
# Required: supineHeartRate (baseline HR observation)
|
|
62
|
-
sh:property [
|
|
63
|
-
sh:path pots:supineHeartRate ;
|
|
64
|
-
sh:class pots:HeartRateMeasurement ;
|
|
65
|
-
sh:minCount 1 ;
|
|
66
|
-
sh:maxCount 1 ;
|
|
67
|
-
sh:severity sh:Violation ;
|
|
68
|
-
sh:name "Supine Heart Rate"@en ;
|
|
69
|
-
sh:message "POTSCheckResult MUST have a supine heart rate measurement"@en
|
|
70
|
-
] ;
|
|
71
|
-
|
|
72
|
-
# Required: potsThresholdMet (primary screening outcome)
|
|
73
|
-
sh:property [
|
|
74
|
-
sh:path pots:potsThresholdMet ;
|
|
75
|
-
sh:datatype xsd:boolean ;
|
|
76
|
-
sh:minCount 1 ;
|
|
77
|
-
sh:maxCount 1 ;
|
|
78
|
-
sh:severity sh:Violation ;
|
|
79
|
-
sh:name "POTS Threshold Met"@en ;
|
|
80
|
-
sh:message "POTSCheckResult MUST declare whether POTS threshold was met"@en
|
|
81
|
-
] ;
|
|
82
|
-
|
|
83
|
-
# ------------------------------------------------------------------
|
|
84
|
-
# WARNING (sh:Warning) -- important optional, data is diminished
|
|
85
|
-
# ------------------------------------------------------------------
|
|
86
|
-
|
|
87
|
-
# Warning: standingHeartRates (needed for meaningful POTS assessment)
|
|
88
|
-
sh:property [
|
|
89
|
-
sh:path pots:standingHeartRates ;
|
|
90
|
-
sh:minCount 1 ;
|
|
91
|
-
sh:severity sh:Warning ;
|
|
92
|
-
sh:name "Standing Heart Rates"@en ;
|
|
93
|
-
sh:message "Standing heart rate measurements needed for POTS assessment"@en
|
|
94
|
-
] ;
|
|
95
|
-
|
|
96
|
-
# Warning: supineBloodPressure (important for orthostatic evaluation)
|
|
97
|
-
sh:property [
|
|
98
|
-
sh:path pots:supineBloodPressure ;
|
|
99
|
-
sh:class pots:BloodPressureMeasurement ;
|
|
100
|
-
sh:maxCount 1 ;
|
|
101
|
-
sh:severity sh:Warning ;
|
|
102
|
-
sh:name "Supine Blood Pressure"@en ;
|
|
103
|
-
sh:message "Supine blood pressure recommended for orthostatic evaluation"@en
|
|
104
|
-
] ;
|
|
105
|
-
|
|
106
|
-
# Warning: dataProvenance (important for data trustworthiness)
|
|
107
|
-
sh:property [
|
|
108
|
-
sh:path cascade:dataProvenance ;
|
|
109
|
-
sh:minCount 1 ;
|
|
110
|
-
sh:maxCount 1 ;
|
|
111
|
-
sh:severity sh:Warning ;
|
|
112
|
-
sh:name "Data Provenance"@en ;
|
|
113
|
-
sh:message "POTSCheckResult should have data provenance for traceability"@en
|
|
114
|
-
] ;
|
|
115
|
-
|
|
116
|
-
# ------------------------------------------------------------------
|
|
117
|
-
# INFO (sh:Info) -- suggested fields for improved data quality
|
|
118
|
-
# ------------------------------------------------------------------
|
|
119
|
-
|
|
120
|
-
# Info: maxHeartRateDelta (pre-computed delta, v1.2+)
|
|
121
|
-
sh:property [
|
|
122
|
-
sh:path pots:maxHeartRateDelta ;
|
|
123
|
-
sh:datatype xsd:double ;
|
|
124
|
-
sh:maxCount 1 ;
|
|
125
|
-
sh:minInclusive 0 ;
|
|
126
|
-
sh:severity sh:Info ;
|
|
127
|
-
sh:name "Maximum Heart Rate Delta"@en ;
|
|
128
|
-
sh:message "maxHeartRateDelta should be a non-negative number (bpm increase from baseline)"@en
|
|
129
|
-
] ;
|
|
130
|
-
|
|
131
|
-
# Info: orthostaticHypotensionSuspected
|
|
132
|
-
sh:property [
|
|
133
|
-
sh:path pots:orthostaticHypotensionSuspected ;
|
|
134
|
-
sh:datatype xsd:boolean ;
|
|
135
|
-
sh:maxCount 1 ;
|
|
136
|
-
sh:severity sh:Info ;
|
|
137
|
-
sh:name "Orthostatic Hypotension Suspected"@en ;
|
|
138
|
-
sh:message "orthostaticHypotensionSuspected improves clinical context"@en
|
|
139
|
-
] ;
|
|
140
|
-
|
|
141
|
-
# Info: orthostaticHypertensionSuspected (v1.1+)
|
|
142
|
-
sh:property [
|
|
143
|
-
sh:path pots:orthostaticHypertensionSuspected ;
|
|
144
|
-
sh:datatype xsd:boolean ;
|
|
145
|
-
sh:maxCount 1 ;
|
|
146
|
-
sh:severity sh:Info ;
|
|
147
|
-
sh:name "Orthostatic Hypertension Suspected"@en ;
|
|
148
|
-
sh:message "orthostaticHypertensionSuspected improves clinical context"@en
|
|
149
|
-
] ;
|
|
150
|
-
|
|
151
|
-
# Info: isIncomplete (early termination flag)
|
|
152
|
-
sh:property [
|
|
153
|
-
sh:path pots:isIncomplete ;
|
|
154
|
-
sh:datatype xsd:boolean ;
|
|
155
|
-
sh:maxCount 1 ;
|
|
156
|
-
sh:severity sh:Info ;
|
|
157
|
-
sh:name "Is Incomplete"@en ;
|
|
158
|
-
sh:message "isIncomplete flag helps identify partial test results"@en
|
|
159
|
-
] ;
|
|
160
|
-
|
|
161
|
-
# Info: earlyTerminationReason (v1.1+)
|
|
162
|
-
sh:property [
|
|
163
|
-
sh:path pots:earlyTerminationReason ;
|
|
164
|
-
sh:datatype xsd:string ;
|
|
165
|
-
sh:maxCount 1 ;
|
|
166
|
-
sh:severity sh:Info ;
|
|
167
|
-
sh:name "Early Termination Reason"@en ;
|
|
168
|
-
sh:message "earlyTerminationReason explains why a check ended early"@en
|
|
169
|
-
] ;
|
|
170
|
-
|
|
171
|
-
# Info: userAgeAtTest (v1.2+, used for age-adjusted thresholds)
|
|
172
|
-
sh:property [
|
|
173
|
-
sh:path pots:userAgeAtTest ;
|
|
174
|
-
sh:datatype xsd:integer ;
|
|
175
|
-
sh:maxCount 1 ;
|
|
176
|
-
sh:minInclusive 0 ;
|
|
177
|
-
sh:maxInclusive 150 ;
|
|
178
|
-
sh:severity sh:Info ;
|
|
179
|
-
sh:name "User Age at Test"@en ;
|
|
180
|
-
sh:message "userAgeAtTest should be 0-150 years"@en
|
|
181
|
-
] ;
|
|
182
|
-
|
|
183
|
-
# Info: baselineDurationSeconds
|
|
184
|
-
sh:property [
|
|
185
|
-
sh:path pots:baselineDurationSeconds ;
|
|
186
|
-
sh:datatype xsd:integer ;
|
|
187
|
-
sh:maxCount 1 ;
|
|
188
|
-
sh:minInclusive 0 ;
|
|
189
|
-
sh:severity sh:Info ;
|
|
190
|
-
sh:name "Baseline Duration (seconds)"@en ;
|
|
191
|
-
sh:message "baselineDurationSeconds should be a non-negative integer"@en
|
|
192
|
-
] ;
|
|
193
|
-
|
|
194
|
-
# Info: uprightDurationSeconds
|
|
195
|
-
sh:property [
|
|
196
|
-
sh:path pots:uprightDurationSeconds ;
|
|
197
|
-
sh:datatype xsd:integer ;
|
|
198
|
-
sh:maxCount 1 ;
|
|
199
|
-
sh:minInclusive 0 ;
|
|
200
|
-
sh:severity sh:Info ;
|
|
201
|
-
sh:name "Upright Duration (seconds)"@en ;
|
|
202
|
-
sh:message "uprightDurationSeconds should be a non-negative integer"@en
|
|
203
|
-
] ;
|
|
204
|
-
|
|
205
|
-
# Info: postureQualityScore (v1.1+, letter grade)
|
|
206
|
-
sh:property [
|
|
207
|
-
sh:path pots:postureQualityScore ;
|
|
208
|
-
sh:datatype xsd:string ;
|
|
209
|
-
sh:maxCount 1 ;
|
|
210
|
-
sh:in ("A" "B" "C" "D") ;
|
|
211
|
-
sh:severity sh:Info ;
|
|
212
|
-
sh:name "Posture Quality Score"@en ;
|
|
213
|
-
sh:message "postureQualityScore must be A, B, C, or D"@en
|
|
214
|
-
] ;
|
|
215
|
-
|
|
216
|
-
# Info: movementArtifactPercentage (v1.1+)
|
|
217
|
-
sh:property [
|
|
218
|
-
sh:path pots:movementArtifactPercentage ;
|
|
219
|
-
sh:datatype xsd:double ;
|
|
220
|
-
sh:maxCount 1 ;
|
|
221
|
-
sh:minInclusive 0 ;
|
|
222
|
-
sh:maxInclusive 100 ;
|
|
223
|
-
sh:severity sh:Info ;
|
|
224
|
-
sh:name "Movement Artifact Percentage"@en ;
|
|
225
|
-
sh:message "movementArtifactPercentage should be 0-100"@en
|
|
226
|
-
] ;
|
|
227
|
-
|
|
228
|
-
# Info: recoveryHeartRate (v1.1+)
|
|
229
|
-
sh:property [
|
|
230
|
-
sh:path pots:recoveryHeartRate ;
|
|
231
|
-
sh:datatype xsd:double ;
|
|
232
|
-
sh:maxCount 1 ;
|
|
233
|
-
sh:minInclusive 0 ;
|
|
234
|
-
sh:severity sh:Info ;
|
|
235
|
-
sh:name "Recovery Heart Rate"@en ;
|
|
236
|
-
sh:message "recoveryHeartRate should be a non-negative number (bpm)"@en
|
|
237
|
-
] ;
|
|
238
|
-
|
|
239
|
-
# ------------------------------------------------------------------
|
|
240
|
-
# Schema version (required for compatibility tracking)
|
|
241
|
-
# ------------------------------------------------------------------
|
|
242
|
-
|
|
243
|
-
sh:property [
|
|
244
|
-
sh:path cascade:schemaVersion ;
|
|
245
|
-
sh:datatype xsd:string ;
|
|
246
|
-
sh:minCount 1 ;
|
|
247
|
-
sh:maxCount 1 ;
|
|
248
|
-
sh:pattern "^[0-9]+\\.[0-9]+$" ;
|
|
249
|
-
sh:severity sh:Violation ;
|
|
250
|
-
sh:name "Schema Version"@en ;
|
|
251
|
-
sh:message "Schema version must be in format major.minor (e.g., '1.3')"@en
|
|
252
|
-
] .
|
|
253
|
-
|
|
254
|
-
# ============================================================================
|
|
255
|
-
# Shape: Heart Rate Measurement
|
|
256
|
-
# ============================================================================
|
|
257
|
-
|
|
258
|
-
pots:HeartRateMeasurementShape a sh:NodeShape ;
|
|
259
|
-
sh:targetClass pots:HeartRateMeasurement ;
|
|
260
|
-
rdfs:label "Heart Rate Measurement Shape"@en ;
|
|
261
|
-
rdfs:comment "Validation constraints for individual heart rate observations captured during a POTS check. Uses FHIR Observation pattern with fhir:valueQuantity."@en ;
|
|
262
|
-
|
|
263
|
-
# Required: heart rate value via fhir:valueQuantity
|
|
264
|
-
sh:property [
|
|
265
|
-
sh:path fhir:valueQuantity ;
|
|
266
|
-
sh:minCount 1 ;
|
|
267
|
-
sh:maxCount 1 ;
|
|
268
|
-
sh:severity sh:Violation ;
|
|
269
|
-
sh:name "Value Quantity"@en ;
|
|
270
|
-
sh:message "HeartRateMeasurement MUST have a fhir:valueQuantity"@en
|
|
271
|
-
] ;
|
|
272
|
-
|
|
273
|
-
# Required: the numeric heart rate value (fhir:value within valueQuantity)
|
|
274
|
-
sh:property [
|
|
275
|
-
sh:path ( fhir:valueQuantity fhir:value ) ;
|
|
276
|
-
sh:datatype xsd:double ;
|
|
277
|
-
sh:minCount 1 ;
|
|
278
|
-
sh:maxCount 1 ;
|
|
279
|
-
sh:minInclusive 20 ;
|
|
280
|
-
sh:maxInclusive 300 ;
|
|
281
|
-
sh:severity sh:Violation ;
|
|
282
|
-
sh:name "Heart Rate Value"@en ;
|
|
283
|
-
sh:message "Heart rate value must be 20-300 bpm"@en
|
|
284
|
-
] ;
|
|
285
|
-
|
|
286
|
-
# Info: secondsSinceStand (temporal position in standing phase)
|
|
287
|
-
sh:property [
|
|
288
|
-
sh:path pots:secondsSinceStand ;
|
|
289
|
-
sh:datatype xsd:double ;
|
|
290
|
-
sh:maxCount 1 ;
|
|
291
|
-
sh:minInclusive 0 ;
|
|
292
|
-
sh:severity sh:Info ;
|
|
293
|
-
sh:name "Seconds Since Stand"@en ;
|
|
294
|
-
sh:message "secondsSinceStand provides temporal context for the measurement"@en
|
|
295
|
-
] ;
|
|
296
|
-
|
|
297
|
-
# Info: atSeconds (legacy timing property)
|
|
298
|
-
sh:property [
|
|
299
|
-
sh:path pots:atSeconds ;
|
|
300
|
-
sh:datatype xsd:integer ;
|
|
301
|
-
sh:maxCount 1 ;
|
|
302
|
-
sh:minInclusive 0 ;
|
|
303
|
-
sh:severity sh:Info ;
|
|
304
|
-
sh:name "At Seconds"@en ;
|
|
305
|
-
sh:message "atSeconds provides temporal context for the measurement"@en
|
|
306
|
-
] .
|
|
307
|
-
|
|
308
|
-
# ============================================================================
|
|
309
|
-
# Shape: Blood Pressure Measurement
|
|
310
|
-
# ============================================================================
|
|
311
|
-
|
|
312
|
-
pots:BloodPressureMeasurementShape a sh:NodeShape ;
|
|
313
|
-
sh:targetClass pots:BloodPressureMeasurement ;
|
|
314
|
-
rdfs:label "Blood Pressure Measurement Shape"@en ;
|
|
315
|
-
rdfs:comment "Validation constraints for blood pressure observations. Uses FHIR Observation pattern with fhir:component for systolic and diastolic values."@en ;
|
|
316
|
-
|
|
317
|
-
# Required: at least one component (systolic/diastolic pair)
|
|
318
|
-
sh:property [
|
|
319
|
-
sh:path fhir:component ;
|
|
320
|
-
sh:minCount 1 ;
|
|
321
|
-
sh:severity sh:Violation ;
|
|
322
|
-
sh:name "BP Components"@en ;
|
|
323
|
-
sh:message "BloodPressureMeasurement MUST have fhir:component with systolic and diastolic values"@en
|
|
324
|
-
] ;
|
|
325
|
-
|
|
326
|
-
# Info: secondsSinceStand (temporal position)
|
|
327
|
-
sh:property [
|
|
328
|
-
sh:path pots:secondsSinceStand ;
|
|
329
|
-
sh:datatype xsd:double ;
|
|
330
|
-
sh:maxCount 1 ;
|
|
331
|
-
sh:minInclusive 0 ;
|
|
332
|
-
sh:severity sh:Info ;
|
|
333
|
-
sh:name "Seconds Since Stand"@en ;
|
|
334
|
-
sh:message "secondsSinceStand provides temporal context for the measurement"@en
|
|
335
|
-
] .
|
|
336
|
-
|
|
337
|
-
# ============================================================================
|
|
338
|
-
# Shape: Blood Pressure Component (Systolic)
|
|
339
|
-
# ============================================================================
|
|
340
|
-
#
|
|
341
|
-
# Validates the systolic component within a blood pressure fhir:component.
|
|
342
|
-
# Targets blank nodes within fhir:component that carry sct:271649006 code.
|
|
343
|
-
# Note: SHACL property paths on blank nodes are validated structurally;
|
|
344
|
-
# this shape serves as reference documentation and for explicit validation.
|
|
345
|
-
|
|
346
|
-
pots:SystolicComponentShape a sh:NodeShape ;
|
|
347
|
-
rdfs:label "Systolic BP Component Shape"@en ;
|
|
348
|
-
rdfs:comment "Validates systolic blood pressure component value within a FHIR Observation"@en ;
|
|
349
|
-
|
|
350
|
-
sh:property [
|
|
351
|
-
sh:path ( fhir:valueQuantity fhir:value ) ;
|
|
352
|
-
sh:datatype xsd:double ;
|
|
353
|
-
sh:minCount 1 ;
|
|
354
|
-
sh:maxCount 1 ;
|
|
355
|
-
sh:minInclusive 40 ;
|
|
356
|
-
sh:maxInclusive 300 ;
|
|
357
|
-
sh:severity sh:Violation ;
|
|
358
|
-
sh:name "Systolic Value"@en ;
|
|
359
|
-
sh:message "Systolic blood pressure must be 40-300 mmHg"@en
|
|
360
|
-
] .
|
|
361
|
-
|
|
362
|
-
# ============================================================================
|
|
363
|
-
# Shape: Blood Pressure Component (Diastolic)
|
|
364
|
-
# ============================================================================
|
|
365
|
-
|
|
366
|
-
pots:DiastolicComponentShape a sh:NodeShape ;
|
|
367
|
-
rdfs:label "Diastolic BP Component Shape"@en ;
|
|
368
|
-
rdfs:comment "Validates diastolic blood pressure component value within a FHIR Observation"@en ;
|
|
369
|
-
|
|
370
|
-
sh:property [
|
|
371
|
-
sh:path ( fhir:valueQuantity fhir:value ) ;
|
|
372
|
-
sh:datatype xsd:double ;
|
|
373
|
-
sh:minCount 1 ;
|
|
374
|
-
sh:maxCount 1 ;
|
|
375
|
-
sh:minInclusive 20 ;
|
|
376
|
-
sh:maxInclusive 200 ;
|
|
377
|
-
sh:severity sh:Violation ;
|
|
378
|
-
sh:name "Diastolic Value"@en ;
|
|
379
|
-
sh:message "Diastolic blood pressure must be 20-200 mmHg"@en
|
|
380
|
-
] .
|
|
381
|
-
|
|
382
|
-
# ============================================================================
|
|
383
|
-
# Shape: Symptom Event
|
|
384
|
-
# ============================================================================
|
|
385
|
-
|
|
386
|
-
pots:SymptomEventShape a sh:NodeShape ;
|
|
387
|
-
sh:targetClass pots:SymptomEvent ;
|
|
388
|
-
rdfs:label "Symptom Event Shape"@en ;
|
|
389
|
-
rdfs:comment "Validation constraints for user-reported symptom events during the standing phase of a POTS check"@en ;
|
|
390
|
-
|
|
391
|
-
# Required: symptom type
|
|
392
|
-
sh:property [
|
|
393
|
-
sh:path pots:symptom ;
|
|
394
|
-
sh:datatype xsd:string ;
|
|
395
|
-
sh:minCount 1 ;
|
|
396
|
-
sh:maxCount 1 ;
|
|
397
|
-
sh:minLength 1 ;
|
|
398
|
-
sh:severity sh:Violation ;
|
|
399
|
-
sh:name "Symptom Type"@en ;
|
|
400
|
-
sh:message "SymptomEvent MUST have a non-empty symptom type"@en
|
|
401
|
-
] ;
|
|
402
|
-
|
|
403
|
-
# Info: notes (optional description, 100 char limit per ontology)
|
|
404
|
-
sh:property [
|
|
405
|
-
sh:path pots:notes ;
|
|
406
|
-
sh:datatype xsd:string ;
|
|
407
|
-
sh:maxCount 1 ;
|
|
408
|
-
sh:maxLength 100 ;
|
|
409
|
-
sh:severity sh:Info ;
|
|
410
|
-
sh:name "Symptom Notes"@en ;
|
|
411
|
-
sh:message "Symptom notes should be 100 characters or fewer"@en
|
|
412
|
-
] ;
|
|
413
|
-
|
|
414
|
-
# Info: timestampSeconds (precise timing)
|
|
415
|
-
sh:property [
|
|
416
|
-
sh:path pots:timestampSeconds ;
|
|
417
|
-
sh:datatype xsd:double ;
|
|
418
|
-
sh:maxCount 1 ;
|
|
419
|
-
sh:minInclusive 0 ;
|
|
420
|
-
sh:severity sh:Info ;
|
|
421
|
-
sh:name "Timestamp Seconds"@en ;
|
|
422
|
-
sh:message "timestampSeconds should be a non-negative number"@en
|
|
423
|
-
] .
|
|
424
|
-
|
|
425
|
-
# ============================================================================
|
|
426
|
-
# Shape: Posture Stability
|
|
427
|
-
# ============================================================================
|
|
428
|
-
|
|
429
|
-
pots:PostureStabilityShape a sh:NodeShape ;
|
|
430
|
-
sh:targetClass pots:PostureStability ;
|
|
431
|
-
rdfs:label "Posture Stability Shape"@en ;
|
|
432
|
-
rdfs:comment "Validation constraints for posture stability readings from Core Motion sensors during the standing phase"@en ;
|
|
433
|
-
|
|
434
|
-
# Warning: isStable (primary stability indicator)
|
|
435
|
-
sh:property [
|
|
436
|
-
sh:path pots:isStable ;
|
|
437
|
-
sh:datatype xsd:boolean ;
|
|
438
|
-
sh:maxCount 1 ;
|
|
439
|
-
sh:severity sh:Warning ;
|
|
440
|
-
sh:name "Is Stable"@en ;
|
|
441
|
-
sh:message "PostureStability should indicate whether posture was stable"@en
|
|
442
|
-
] ;
|
|
443
|
-
|
|
444
|
-
# Info: stabilityScore (numerical precision)
|
|
445
|
-
sh:property [
|
|
446
|
-
sh:path pots:stabilityScore ;
|
|
447
|
-
sh:datatype xsd:double ;
|
|
448
|
-
sh:maxCount 1 ;
|
|
449
|
-
sh:minInclusive 0 ;
|
|
450
|
-
sh:maxInclusive 1 ;
|
|
451
|
-
sh:severity sh:Info ;
|
|
452
|
-
sh:name "Stability Score"@en ;
|
|
453
|
-
sh:message "stabilityScore should be 0.0 (unstable) to 1.0 (perfectly stable)"@en
|
|
454
|
-
] ;
|
|
455
|
-
|
|
456
|
-
# Info: atSeconds (temporal position)
|
|
457
|
-
sh:property [
|
|
458
|
-
sh:path pots:atSeconds ;
|
|
459
|
-
sh:datatype xsd:integer ;
|
|
460
|
-
sh:maxCount 1 ;
|
|
461
|
-
sh:minInclusive 0 ;
|
|
462
|
-
sh:severity sh:Info ;
|
|
463
|
-
sh:name "At Seconds"@en ;
|
|
464
|
-
sh:message "atSeconds provides temporal context for the stability reading"@en
|
|
465
|
-
] .
|
|
466
|
-
|
|
467
|
-
# ============================================================================
|
|
468
|
-
# Changelog
|
|
469
|
-
# ============================================================================
|
|
470
|
-
#
|
|
471
|
-
# Version 1.0 (2026-02-18)
|
|
472
|
-
# - Initial release of POTS SHACL shapes (Phase 4)
|
|
473
|
-
# - POTSCheckResultShape: 4 required (Violation), 3 warning, 12 info properties
|
|
474
|
-
# - HeartRateMeasurementShape: FHIR valueQuantity path, 20-300 bpm range
|
|
475
|
-
# - BloodPressureMeasurementShape: FHIR component pattern validation
|
|
476
|
-
# - SystolicComponentShape: 40-300 mmHg range
|
|
477
|
-
# - DiastolicComponentShape: 20-200 mmHg range
|
|
478
|
-
# - SymptomEventShape: required symptom string, optional notes (100 char)
|
|
479
|
-
# - PostureStabilityShape: isStable (Warning), stabilityScore 0-1 (Info)
|
|
480
|
-
# - Aligned with pots.ttl v1.3 ontology (2026-02-10)
|
|
481
|
-
#
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"resourceType": "Bundle",
|
|
3
|
-
"type": "collection",
|
|
4
|
-
"entry": [
|
|
5
|
-
{
|
|
6
|
-
"resource": {
|
|
7
|
-
"resourceType": "MedicationStatement",
|
|
8
|
-
"id": "med-1",
|
|
9
|
-
"status": "active",
|
|
10
|
-
"medicationCodeableConcept": {
|
|
11
|
-
"coding": [
|
|
12
|
-
{
|
|
13
|
-
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
|
|
14
|
-
"code": "860975",
|
|
15
|
-
"display": "Metformin 500mg"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
|
-
"text": "Metformin HCl 500mg"
|
|
19
|
-
},
|
|
20
|
-
"effectivePeriod": { "start": "2024-01-15" },
|
|
21
|
-
"dosage": [{ "text": "500mg twice daily" }]
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"resource": {
|
|
26
|
-
"resourceType": "Condition",
|
|
27
|
-
"id": "cond-1",
|
|
28
|
-
"code": {
|
|
29
|
-
"coding": [
|
|
30
|
-
{
|
|
31
|
-
"system": "http://snomed.info/sct",
|
|
32
|
-
"code": "44054006",
|
|
33
|
-
"display": "Type 2 Diabetes Mellitus"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"system": "http://hl7.org/fhir/sid/icd-10-cm",
|
|
37
|
-
"code": "E11.9",
|
|
38
|
-
"display": "Type 2 diabetes mellitus without complications"
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"text": "Type 2 Diabetes Mellitus"
|
|
42
|
-
},
|
|
43
|
-
"clinicalStatus": {
|
|
44
|
-
"coding": [
|
|
45
|
-
{
|
|
46
|
-
"system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
|
|
47
|
-
"code": "active"
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
"onsetDateTime": "2020-06-15"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"resource": {
|
|
56
|
-
"resourceType": "AllergyIntolerance",
|
|
57
|
-
"id": "allergy-1",
|
|
58
|
-
"code": {
|
|
59
|
-
"coding": [
|
|
60
|
-
{
|
|
61
|
-
"system": "http://snomed.info/sct",
|
|
62
|
-
"code": "91936005",
|
|
63
|
-
"display": "Penicillin allergy"
|
|
64
|
-
}
|
|
65
|
-
],
|
|
66
|
-
"text": "Penicillin"
|
|
67
|
-
},
|
|
68
|
-
"category": ["medication"],
|
|
69
|
-
"reaction": [
|
|
70
|
-
{
|
|
71
|
-
"manifestation": [
|
|
72
|
-
{ "text": "Hives" },
|
|
73
|
-
{ "text": "Difficulty breathing" }
|
|
74
|
-
],
|
|
75
|
-
"severity": "severe"
|
|
76
|
-
}
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"resource": {
|
|
82
|
-
"resourceType": "Observation",
|
|
83
|
-
"id": "lab-1",
|
|
84
|
-
"code": {
|
|
85
|
-
"coding": [
|
|
86
|
-
{
|
|
87
|
-
"system": "http://loinc.org",
|
|
88
|
-
"code": "4548-4",
|
|
89
|
-
"display": "Hemoglobin A1c"
|
|
90
|
-
}
|
|
91
|
-
],
|
|
92
|
-
"text": "Hemoglobin A1c"
|
|
93
|
-
},
|
|
94
|
-
"category": [
|
|
95
|
-
{
|
|
96
|
-
"coding": [
|
|
97
|
-
{ "code": "laboratory" }
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
],
|
|
101
|
-
"valueQuantity": {
|
|
102
|
-
"value": 6.8,
|
|
103
|
-
"unit": "%"
|
|
104
|
-
},
|
|
105
|
-
"effectiveDateTime": "2025-11-15T08:30:00Z",
|
|
106
|
-
"interpretation": [
|
|
107
|
-
{
|
|
108
|
-
"coding": [{ "code": "H" }]
|
|
109
|
-
}
|
|
110
|
-
],
|
|
111
|
-
"referenceRange": [
|
|
112
|
-
{
|
|
113
|
-
"low": { "value": 4.0, "unit": "%" },
|
|
114
|
-
"high": { "value": 5.6, "unit": "%" }
|
|
115
|
-
}
|
|
116
|
-
]
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"resource": {
|
|
121
|
-
"resourceType": "Observation",
|
|
122
|
-
"id": "vital-1",
|
|
123
|
-
"code": {
|
|
124
|
-
"coding": [
|
|
125
|
-
{
|
|
126
|
-
"system": "http://loinc.org",
|
|
127
|
-
"code": "8480-6",
|
|
128
|
-
"display": "Systolic blood pressure"
|
|
129
|
-
}
|
|
130
|
-
]
|
|
131
|
-
},
|
|
132
|
-
"category": [
|
|
133
|
-
{
|
|
134
|
-
"coding": [
|
|
135
|
-
{
|
|
136
|
-
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
|
|
137
|
-
"code": "vital-signs"
|
|
138
|
-
}
|
|
139
|
-
]
|
|
140
|
-
}
|
|
141
|
-
],
|
|
142
|
-
"valueQuantity": {
|
|
143
|
-
"value": 138,
|
|
144
|
-
"unit": "mmHg"
|
|
145
|
-
},
|
|
146
|
-
"effectiveDateTime": "2025-12-01T10:30:00Z"
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
"resource": {
|
|
151
|
-
"resourceType": "Patient",
|
|
152
|
-
"id": "patient-1",
|
|
153
|
-
"birthDate": "1985-03-15",
|
|
154
|
-
"gender": "female",
|
|
155
|
-
"maritalStatus": {
|
|
156
|
-
"coding": [{ "code": "M" }],
|
|
157
|
-
"text": "Married"
|
|
158
|
-
},
|
|
159
|
-
"address": [
|
|
160
|
-
{
|
|
161
|
-
"use": "home",
|
|
162
|
-
"line": ["123 Main Street", "Apt 4B"],
|
|
163
|
-
"city": "Portland",
|
|
164
|
-
"state": "OR",
|
|
165
|
-
"postalCode": "97201",
|
|
166
|
-
"country": "US"
|
|
167
|
-
}
|
|
168
|
-
]
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
"resource": {
|
|
173
|
-
"resourceType": "Immunization",
|
|
174
|
-
"id": "imm-1",
|
|
175
|
-
"status": "completed",
|
|
176
|
-
"vaccineCode": {
|
|
177
|
-
"coding": [
|
|
178
|
-
{
|
|
179
|
-
"system": "http://hl7.org/fhir/sid/cvx",
|
|
180
|
-
"code": "308",
|
|
181
|
-
"display": "COVID-19 mRNA Vaccine"
|
|
182
|
-
}
|
|
183
|
-
],
|
|
184
|
-
"text": "COVID-19 mRNA Vaccine"
|
|
185
|
-
},
|
|
186
|
-
"occurrenceDateTime": "2024-10-15T10:00:00Z",
|
|
187
|
-
"manufacturer": { "display": "Pfizer-BioNTech" },
|
|
188
|
-
"lotNumber": "FN2487"
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
"resource": {
|
|
193
|
-
"resourceType": "Coverage",
|
|
194
|
-
"id": "cov-1",
|
|
195
|
-
"subscriberId": "BCBS-AR-2020-78452",
|
|
196
|
-
"payor": [{ "display": "Blue Cross Blue Shield" }],
|
|
197
|
-
"class": [
|
|
198
|
-
{
|
|
199
|
-
"type": { "coding": [{ "code": "group" }] },
|
|
200
|
-
"value": "GRP-98765",
|
|
201
|
-
"name": "Blue PPO Select"
|
|
202
|
-
}
|
|
203
|
-
],
|
|
204
|
-
"period": { "start": "2020-01-01" },
|
|
205
|
-
"relationship": { "coding": [{ "code": "self" }] }
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
"resource": {
|
|
210
|
-
"resourceType": "DocumentReference",
|
|
211
|
-
"id": "doc-1",
|
|
212
|
-
"status": "current"
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
]
|
|
216
|
-
}
|