@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,450 +0,0 @@
|
|
|
1
|
-
@prefix sh: <http://www.w3.org/ns/shacl#> .
|
|
2
|
-
@prefix cascade: <https://ns.cascadeprotocol.org/core/v1#> .
|
|
3
|
-
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
4
|
-
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
5
|
-
|
|
6
|
-
# ============================================================================
|
|
7
|
-
# Cascade Protocol -- Core Vocabulary SHACL Validation Shapes
|
|
8
|
-
# ============================================================================
|
|
9
|
-
# Version: 1.0 (Phase 4, 2026-02-18)
|
|
10
|
-
# Validates: cascade:PatientProfile, cascade:Address, cascade:EmergencyContact,
|
|
11
|
-
# cascade:PharmacyInfo, cascade:AdvanceDirectives
|
|
12
|
-
#
|
|
13
|
-
# Severity levels:
|
|
14
|
-
# sh:Violation -- Must fix (blocks operations)
|
|
15
|
-
# sh:Warning -- Should address (shown prominently)
|
|
16
|
-
# sh:Info -- Suggestion (nice to have)
|
|
17
|
-
#
|
|
18
|
-
# These shapes validate core patient demographics and identity structures
|
|
19
|
-
# defined in core.ttl v2.2. They are used by all Cascade Protocol applications
|
|
20
|
-
# that serialize PatientProfile data (e.g., Cascade Checkup intake forms,
|
|
21
|
-
# POTS Check patient context).
|
|
22
|
-
# ============================================================================
|
|
23
|
-
|
|
24
|
-
# ============================================================================
|
|
25
|
-
# Shape: Patient Profile
|
|
26
|
-
# ============================================================================
|
|
27
|
-
|
|
28
|
-
cascade:PatientProfileShape a sh:NodeShape ;
|
|
29
|
-
sh:targetClass cascade:PatientProfile ;
|
|
30
|
-
rdfs:label "Patient Profile Shape"@en ;
|
|
31
|
-
rdfs:comment "Validation constraints for patient demographics and identity extensions"@en ;
|
|
32
|
-
|
|
33
|
-
# VIOLATION: dateOfBirth required for age calculation and screening eligibility
|
|
34
|
-
sh:property [
|
|
35
|
-
sh:path cascade:dateOfBirth ;
|
|
36
|
-
sh:datatype xsd:date ;
|
|
37
|
-
sh:minCount 1 ;
|
|
38
|
-
sh:maxCount 1 ;
|
|
39
|
-
sh:severity sh:Violation ;
|
|
40
|
-
sh:name "Date of Birth"@en ;
|
|
41
|
-
sh:message "Patient profile must have a date of birth for age calculation and screening eligibility"@en
|
|
42
|
-
] ;
|
|
43
|
-
|
|
44
|
-
# VIOLATION: biologicalSex required for clinical calculations
|
|
45
|
-
sh:property [
|
|
46
|
-
sh:path cascade:biologicalSex ;
|
|
47
|
-
sh:datatype xsd:string ;
|
|
48
|
-
sh:minCount 1 ;
|
|
49
|
-
sh:maxCount 1 ;
|
|
50
|
-
sh:in ( "male" "female" "intersex" ) ;
|
|
51
|
-
sh:severity sh:Violation ;
|
|
52
|
-
sh:name "Biological Sex"@en ;
|
|
53
|
-
sh:message "Patient profile must specify biological sex (male, female, or intersex) for clinical calculations"@en
|
|
54
|
-
] ;
|
|
55
|
-
|
|
56
|
-
# VIOLATION: dataProvenance required for source tracking
|
|
57
|
-
sh:property [
|
|
58
|
-
sh:path cascade:dataProvenance ;
|
|
59
|
-
sh:minCount 1 ;
|
|
60
|
-
sh:severity sh:Violation ;
|
|
61
|
-
sh:name "Data Provenance"@en ;
|
|
62
|
-
sh:message "Patient profile must have at least one data provenance classification"@en
|
|
63
|
-
] ;
|
|
64
|
-
|
|
65
|
-
# WARNING: genderIdentity recommended for patient-centered care
|
|
66
|
-
sh:property [
|
|
67
|
-
sh:path cascade:genderIdentity ;
|
|
68
|
-
sh:datatype xsd:string ;
|
|
69
|
-
sh:maxCount 1 ;
|
|
70
|
-
sh:in ( "woman" "man" "non_binary" "other" "prefer_not_to_say" ) ;
|
|
71
|
-
sh:severity sh:Warning ;
|
|
72
|
-
sh:name "Gender Identity"@en ;
|
|
73
|
-
sh:message "Gender identity is recommended for patient-centered care. Values: woman, man, non_binary, other, prefer_not_to_say"@en
|
|
74
|
-
] ;
|
|
75
|
-
|
|
76
|
-
# WARNING: emergencyContact recommended for safety
|
|
77
|
-
sh:property [
|
|
78
|
-
sh:path cascade:emergencyContact ;
|
|
79
|
-
sh:class cascade:EmergencyContact ;
|
|
80
|
-
sh:severity sh:Warning ;
|
|
81
|
-
sh:name "Emergency Contact"@en ;
|
|
82
|
-
sh:message "An emergency contact is recommended for patient safety"@en
|
|
83
|
-
] ;
|
|
84
|
-
|
|
85
|
-
# INFO: ageGroup for screening classification
|
|
86
|
-
sh:property [
|
|
87
|
-
sh:path cascade:ageGroup ;
|
|
88
|
-
sh:datatype xsd:string ;
|
|
89
|
-
sh:maxCount 1 ;
|
|
90
|
-
sh:in ( "pediatric" "young_adult" "adult" "senior" ) ;
|
|
91
|
-
sh:severity sh:Info ;
|
|
92
|
-
sh:name "Age Group"@en ;
|
|
93
|
-
sh:message "Age group helps classify patients for screening recommendations (pediatric, young_adult, adult, senior)"@en
|
|
94
|
-
] ;
|
|
95
|
-
|
|
96
|
-
# INFO: computedAge for convenience
|
|
97
|
-
sh:property [
|
|
98
|
-
sh:path cascade:computedAge ;
|
|
99
|
-
sh:datatype xsd:integer ;
|
|
100
|
-
sh:maxCount 1 ;
|
|
101
|
-
sh:minInclusive 0 ;
|
|
102
|
-
sh:maxInclusive 150 ;
|
|
103
|
-
sh:severity sh:Info ;
|
|
104
|
-
sh:name "Computed Age"@en ;
|
|
105
|
-
sh:message "Computed age should be between 0 and 150 years"@en
|
|
106
|
-
] ;
|
|
107
|
-
|
|
108
|
-
# INFO: maritalStatus for demographic context
|
|
109
|
-
sh:property [
|
|
110
|
-
sh:path cascade:maritalStatus ;
|
|
111
|
-
sh:datatype xsd:string ;
|
|
112
|
-
sh:maxCount 1 ;
|
|
113
|
-
sh:in ( "single" "married" "domestic_partnership" "divorced" "separated" "widowed" "prefer_not_to_say" ) ;
|
|
114
|
-
sh:severity sh:Info ;
|
|
115
|
-
sh:name "Marital Status"@en ;
|
|
116
|
-
sh:message "Marital status provides demographic context for care planning"@en
|
|
117
|
-
] ;
|
|
118
|
-
|
|
119
|
-
# INFO: raceEthnicity for health disparity tracking
|
|
120
|
-
sh:property [
|
|
121
|
-
sh:path cascade:raceEthnicity ;
|
|
122
|
-
sh:datatype xsd:string ;
|
|
123
|
-
sh:in ( "american_indian_alaska_native" "asian" "black_african_american" "hispanic_latino" "native_hawaiian_pacific_islander" "white" "other" "prefer_not_to_say" ) ;
|
|
124
|
-
sh:severity sh:Info ;
|
|
125
|
-
sh:name "Race/Ethnicity"@en ;
|
|
126
|
-
sh:message "Race/ethnicity data supports health equity tracking and risk assessment"@en
|
|
127
|
-
] ;
|
|
128
|
-
|
|
129
|
-
# INFO: address for contact information
|
|
130
|
-
sh:property [
|
|
131
|
-
sh:path cascade:address ;
|
|
132
|
-
sh:class cascade:Address ;
|
|
133
|
-
sh:maxCount 1 ;
|
|
134
|
-
sh:severity sh:Info ;
|
|
135
|
-
sh:name "Address"@en ;
|
|
136
|
-
sh:message "A postal address is helpful for care coordination and correspondence"@en
|
|
137
|
-
] ;
|
|
138
|
-
|
|
139
|
-
# INFO: preferredPharmacy for prescription routing
|
|
140
|
-
sh:property [
|
|
141
|
-
sh:path cascade:preferredPharmacy ;
|
|
142
|
-
sh:class cascade:PharmacyInfo ;
|
|
143
|
-
sh:maxCount 1 ;
|
|
144
|
-
sh:severity sh:Info ;
|
|
145
|
-
sh:name "Preferred Pharmacy"@en ;
|
|
146
|
-
sh:message "A preferred pharmacy helps streamline prescription fulfillment"@en
|
|
147
|
-
] ;
|
|
148
|
-
|
|
149
|
-
# INFO: advanceDirectives for care planning
|
|
150
|
-
sh:property [
|
|
151
|
-
sh:path cascade:advanceDirectives ;
|
|
152
|
-
sh:class cascade:AdvanceDirectives ;
|
|
153
|
-
sh:maxCount 1 ;
|
|
154
|
-
sh:severity sh:Info ;
|
|
155
|
-
sh:name "Advance Directives"@en ;
|
|
156
|
-
sh:message "Advance directives document patient wishes for end-of-life care"@en
|
|
157
|
-
] ;
|
|
158
|
-
|
|
159
|
-
# INFO: profileId for traceability
|
|
160
|
-
sh:property [
|
|
161
|
-
sh:path cascade:profileId ;
|
|
162
|
-
sh:datatype xsd:string ;
|
|
163
|
-
sh:maxCount 1 ;
|
|
164
|
-
sh:severity sh:Info ;
|
|
165
|
-
sh:name "Profile ID"@en ;
|
|
166
|
-
sh:message "A profile ID (UUID) enables traceability and deduplication"@en
|
|
167
|
-
] .
|
|
168
|
-
|
|
169
|
-
# ============================================================================
|
|
170
|
-
# Shape: Address
|
|
171
|
-
# ============================================================================
|
|
172
|
-
|
|
173
|
-
cascade:AddressShape a sh:NodeShape ;
|
|
174
|
-
sh:targetClass cascade:Address ;
|
|
175
|
-
rdfs:label "Address Shape"@en ;
|
|
176
|
-
rdfs:comment "Validation constraints for structured postal addresses. Accepts both simplified aliases (city, state) and FHIR-aligned properties (addressCity, addressState)."@en ;
|
|
177
|
-
|
|
178
|
-
# WARNING: city or addressCity recommended for location identification
|
|
179
|
-
sh:property [
|
|
180
|
-
sh:path cascade:city ;
|
|
181
|
-
sh:datatype xsd:string ;
|
|
182
|
-
sh:maxCount 1 ;
|
|
183
|
-
sh:severity sh:Warning ;
|
|
184
|
-
sh:name "City"@en ;
|
|
185
|
-
sh:message "City is recommended for meaningful address identification"@en
|
|
186
|
-
] ;
|
|
187
|
-
|
|
188
|
-
sh:property [
|
|
189
|
-
sh:path cascade:addressCity ;
|
|
190
|
-
sh:datatype xsd:string ;
|
|
191
|
-
sh:maxCount 1 ;
|
|
192
|
-
sh:severity sh:Warning ;
|
|
193
|
-
sh:name "Address City (FHIR-aligned)"@en ;
|
|
194
|
-
sh:message "City (FHIR-aligned) is recommended for meaningful address identification"@en
|
|
195
|
-
] ;
|
|
196
|
-
|
|
197
|
-
# WARNING: state or addressState recommended for location identification
|
|
198
|
-
sh:property [
|
|
199
|
-
sh:path cascade:state ;
|
|
200
|
-
sh:datatype xsd:string ;
|
|
201
|
-
sh:maxCount 1 ;
|
|
202
|
-
sh:severity sh:Warning ;
|
|
203
|
-
sh:name "State"@en ;
|
|
204
|
-
sh:message "State is recommended for meaningful address identification"@en
|
|
205
|
-
] ;
|
|
206
|
-
|
|
207
|
-
sh:property [
|
|
208
|
-
sh:path cascade:addressState ;
|
|
209
|
-
sh:datatype xsd:string ;
|
|
210
|
-
sh:maxCount 1 ;
|
|
211
|
-
sh:severity sh:Warning ;
|
|
212
|
-
sh:name "Address State (FHIR-aligned)"@en ;
|
|
213
|
-
sh:message "State (FHIR-aligned) is recommended for meaningful address identification"@en
|
|
214
|
-
] ;
|
|
215
|
-
|
|
216
|
-
# INFO: streetAddress or addressLine
|
|
217
|
-
sh:property [
|
|
218
|
-
sh:path cascade:streetAddress ;
|
|
219
|
-
sh:datatype xsd:string ;
|
|
220
|
-
sh:maxCount 1 ;
|
|
221
|
-
sh:severity sh:Info ;
|
|
222
|
-
sh:name "Street Address"@en ;
|
|
223
|
-
sh:message "Street address provides complete location details"@en
|
|
224
|
-
] ;
|
|
225
|
-
|
|
226
|
-
sh:property [
|
|
227
|
-
sh:path cascade:addressLine ;
|
|
228
|
-
sh:datatype xsd:string ;
|
|
229
|
-
sh:severity sh:Info ;
|
|
230
|
-
sh:name "Address Line (FHIR-aligned)"@en ;
|
|
231
|
-
sh:message "Address line (FHIR-aligned) provides complete location details"@en
|
|
232
|
-
] ;
|
|
233
|
-
|
|
234
|
-
# INFO: postalCode or addressPostalCode
|
|
235
|
-
sh:property [
|
|
236
|
-
sh:path cascade:postalCode ;
|
|
237
|
-
sh:datatype xsd:string ;
|
|
238
|
-
sh:maxCount 1 ;
|
|
239
|
-
sh:severity sh:Info ;
|
|
240
|
-
sh:name "Postal Code"@en ;
|
|
241
|
-
sh:message "Postal code helps with geographic identification"@en
|
|
242
|
-
] ;
|
|
243
|
-
|
|
244
|
-
sh:property [
|
|
245
|
-
sh:path cascade:addressPostalCode ;
|
|
246
|
-
sh:datatype xsd:string ;
|
|
247
|
-
sh:maxCount 1 ;
|
|
248
|
-
sh:severity sh:Info ;
|
|
249
|
-
sh:name "Address Postal Code (FHIR-aligned)"@en ;
|
|
250
|
-
sh:message "Postal code (FHIR-aligned) helps with geographic identification"@en
|
|
251
|
-
] ;
|
|
252
|
-
|
|
253
|
-
# INFO: country or addressCountry
|
|
254
|
-
sh:property [
|
|
255
|
-
sh:path cascade:country ;
|
|
256
|
-
sh:datatype xsd:string ;
|
|
257
|
-
sh:maxCount 1 ;
|
|
258
|
-
sh:severity sh:Info ;
|
|
259
|
-
sh:name "Country"@en ;
|
|
260
|
-
sh:message "Country is helpful for international patients"@en
|
|
261
|
-
] ;
|
|
262
|
-
|
|
263
|
-
sh:property [
|
|
264
|
-
sh:path cascade:addressCountry ;
|
|
265
|
-
sh:datatype xsd:string ;
|
|
266
|
-
sh:maxCount 1 ;
|
|
267
|
-
sh:severity sh:Info ;
|
|
268
|
-
sh:name "Address Country (FHIR-aligned)"@en ;
|
|
269
|
-
sh:message "Country (FHIR-aligned) is helpful for international patients"@en
|
|
270
|
-
] ;
|
|
271
|
-
|
|
272
|
-
# INFO: addressUse for address purpose
|
|
273
|
-
sh:property [
|
|
274
|
-
sh:path cascade:addressUse ;
|
|
275
|
-
sh:datatype xsd:string ;
|
|
276
|
-
sh:maxCount 1 ;
|
|
277
|
-
sh:in ( "home" "work" "temp" "old" ) ;
|
|
278
|
-
sh:severity sh:Info ;
|
|
279
|
-
sh:name "Address Use"@en ;
|
|
280
|
-
sh:message "Address use should be home, work, temp, or old"@en
|
|
281
|
-
] ;
|
|
282
|
-
|
|
283
|
-
# INFO: addressType for address classification
|
|
284
|
-
sh:property [
|
|
285
|
-
sh:path cascade:addressType ;
|
|
286
|
-
sh:datatype xsd:string ;
|
|
287
|
-
sh:maxCount 1 ;
|
|
288
|
-
sh:in ( "postal" "physical" "both" ) ;
|
|
289
|
-
sh:severity sh:Info ;
|
|
290
|
-
sh:name "Address Type"@en ;
|
|
291
|
-
sh:message "Address type should be postal, physical, or both"@en
|
|
292
|
-
] .
|
|
293
|
-
|
|
294
|
-
# ============================================================================
|
|
295
|
-
# Shape: Emergency Contact
|
|
296
|
-
# ============================================================================
|
|
297
|
-
|
|
298
|
-
cascade:EmergencyContactShape a sh:NodeShape ;
|
|
299
|
-
sh:targetClass cascade:EmergencyContact ;
|
|
300
|
-
rdfs:label "Emergency Contact Shape"@en ;
|
|
301
|
-
rdfs:comment "Validation constraints for patient emergency contact persons"@en ;
|
|
302
|
-
|
|
303
|
-
# VIOLATION: contactName required
|
|
304
|
-
sh:property [
|
|
305
|
-
sh:path cascade:contactName ;
|
|
306
|
-
sh:datatype xsd:string ;
|
|
307
|
-
sh:minCount 1 ;
|
|
308
|
-
sh:maxCount 1 ;
|
|
309
|
-
sh:minLength 1 ;
|
|
310
|
-
sh:severity sh:Violation ;
|
|
311
|
-
sh:name "Contact Name"@en ;
|
|
312
|
-
sh:message "Emergency contact must have a name"@en
|
|
313
|
-
] ;
|
|
314
|
-
|
|
315
|
-
# VIOLATION: contactPhone required
|
|
316
|
-
sh:property [
|
|
317
|
-
sh:path cascade:contactPhone ;
|
|
318
|
-
sh:datatype xsd:string ;
|
|
319
|
-
sh:minCount 1 ;
|
|
320
|
-
sh:maxCount 1 ;
|
|
321
|
-
sh:minLength 1 ;
|
|
322
|
-
sh:severity sh:Violation ;
|
|
323
|
-
sh:name "Contact Phone"@en ;
|
|
324
|
-
sh:message "Emergency contact must have a phone number"@en
|
|
325
|
-
] ;
|
|
326
|
-
|
|
327
|
-
# WARNING: contactRelationship recommended
|
|
328
|
-
sh:property [
|
|
329
|
-
sh:path cascade:contactRelationship ;
|
|
330
|
-
sh:datatype xsd:string ;
|
|
331
|
-
sh:maxCount 1 ;
|
|
332
|
-
sh:in ( "spouse" "parent" "child" "sibling" "partner" "friend" "caregiver" "other" ) ;
|
|
333
|
-
sh:severity sh:Warning ;
|
|
334
|
-
sh:name "Contact Relationship"@en ;
|
|
335
|
-
sh:message "Emergency contact relationship is recommended (spouse, parent, child, sibling, partner, friend, caregiver, other)"@en
|
|
336
|
-
] .
|
|
337
|
-
|
|
338
|
-
# ============================================================================
|
|
339
|
-
# Shape: Pharmacy Info
|
|
340
|
-
# ============================================================================
|
|
341
|
-
|
|
342
|
-
cascade:PharmacyInfoShape a sh:NodeShape ;
|
|
343
|
-
sh:targetClass cascade:PharmacyInfo ;
|
|
344
|
-
rdfs:label "Pharmacy Info Shape"@en ;
|
|
345
|
-
rdfs:comment "Validation constraints for preferred pharmacy information"@en ;
|
|
346
|
-
|
|
347
|
-
# VIOLATION: pharmacyName required
|
|
348
|
-
sh:property [
|
|
349
|
-
sh:path cascade:pharmacyName ;
|
|
350
|
-
sh:datatype xsd:string ;
|
|
351
|
-
sh:minCount 1 ;
|
|
352
|
-
sh:maxCount 1 ;
|
|
353
|
-
sh:minLength 1 ;
|
|
354
|
-
sh:severity sh:Violation ;
|
|
355
|
-
sh:name "Pharmacy Name"@en ;
|
|
356
|
-
sh:message "Pharmacy must have a name"@en
|
|
357
|
-
] ;
|
|
358
|
-
|
|
359
|
-
# INFO: pharmacyAddress for location
|
|
360
|
-
sh:property [
|
|
361
|
-
sh:path cascade:pharmacyAddress ;
|
|
362
|
-
sh:datatype xsd:string ;
|
|
363
|
-
sh:maxCount 1 ;
|
|
364
|
-
sh:severity sh:Info ;
|
|
365
|
-
sh:name "Pharmacy Address"@en ;
|
|
366
|
-
sh:message "Pharmacy address helps identify the correct location"@en
|
|
367
|
-
] ;
|
|
368
|
-
|
|
369
|
-
# INFO: pharmacyPhone for contact
|
|
370
|
-
sh:property [
|
|
371
|
-
sh:path cascade:pharmacyPhone ;
|
|
372
|
-
sh:datatype xsd:string ;
|
|
373
|
-
sh:maxCount 1 ;
|
|
374
|
-
sh:severity sh:Info ;
|
|
375
|
-
sh:name "Pharmacy Phone"@en ;
|
|
376
|
-
sh:message "Pharmacy phone number is helpful for prescription coordination"@en
|
|
377
|
-
] .
|
|
378
|
-
|
|
379
|
-
# ============================================================================
|
|
380
|
-
# Shape: Advance Directives
|
|
381
|
-
# ============================================================================
|
|
382
|
-
|
|
383
|
-
cascade:AdvanceDirectivesShape a sh:NodeShape ;
|
|
384
|
-
sh:targetClass cascade:AdvanceDirectives ;
|
|
385
|
-
rdfs:label "Advance Directives Shape"@en ;
|
|
386
|
-
rdfs:comment "Validation constraints for patient advance directive declarations. Elevated PHI sensitivity."@en ;
|
|
387
|
-
|
|
388
|
-
# VIOLATION: hasLivingWill required
|
|
389
|
-
sh:property [
|
|
390
|
-
sh:path cascade:hasLivingWill ;
|
|
391
|
-
sh:datatype xsd:boolean ;
|
|
392
|
-
sh:minCount 1 ;
|
|
393
|
-
sh:maxCount 1 ;
|
|
394
|
-
sh:severity sh:Violation ;
|
|
395
|
-
sh:name "Has Living Will"@en ;
|
|
396
|
-
sh:message "Advance directives must declare whether a living will is on file"@en
|
|
397
|
-
] ;
|
|
398
|
-
|
|
399
|
-
# VIOLATION: hasPowerOfAttorney required
|
|
400
|
-
sh:property [
|
|
401
|
-
sh:path cascade:hasPowerOfAttorney ;
|
|
402
|
-
sh:datatype xsd:boolean ;
|
|
403
|
-
sh:minCount 1 ;
|
|
404
|
-
sh:maxCount 1 ;
|
|
405
|
-
sh:severity sh:Violation ;
|
|
406
|
-
sh:name "Has Power of Attorney"@en ;
|
|
407
|
-
sh:message "Advance directives must declare whether a healthcare power of attorney is on file"@en
|
|
408
|
-
] ;
|
|
409
|
-
|
|
410
|
-
# VIOLATION: hasDNR required
|
|
411
|
-
sh:property [
|
|
412
|
-
sh:path cascade:hasDNR ;
|
|
413
|
-
sh:datatype xsd:boolean ;
|
|
414
|
-
sh:minCount 1 ;
|
|
415
|
-
sh:maxCount 1 ;
|
|
416
|
-
sh:severity sh:Violation ;
|
|
417
|
-
sh:name "Has DNR"@en ;
|
|
418
|
-
sh:message "Advance directives must declare whether a do-not-resuscitate order is on file"@en
|
|
419
|
-
] ;
|
|
420
|
-
|
|
421
|
-
# INFO: advanceDirectiveNotes for additional context
|
|
422
|
-
sh:property [
|
|
423
|
-
sh:path cascade:advanceDirectiveNotes ;
|
|
424
|
-
sh:datatype xsd:string ;
|
|
425
|
-
sh:maxCount 1 ;
|
|
426
|
-
sh:severity sh:Info ;
|
|
427
|
-
sh:name "Advance Directive Notes"@en ;
|
|
428
|
-
sh:message "Notes can provide additional context about advance directive wishes"@en
|
|
429
|
-
] .
|
|
430
|
-
|
|
431
|
-
# ============================================================================
|
|
432
|
-
# Changelog
|
|
433
|
-
# ============================================================================
|
|
434
|
-
#
|
|
435
|
-
# Version 1.0 (2026-02-18)
|
|
436
|
-
# - Initial release of core vocabulary SHACL shapes (Phase 4)
|
|
437
|
-
# - PatientProfileShape: VIOLATION for dateOfBirth, biologicalSex,
|
|
438
|
-
# dataProvenance; WARNING for genderIdentity, emergencyContact;
|
|
439
|
-
# INFO for ageGroup, computedAge, maritalStatus, raceEthnicity,
|
|
440
|
-
# address, preferredPharmacy, advanceDirectives, profileId
|
|
441
|
-
# - AddressShape: WARNING for city/addressCity, state/addressState;
|
|
442
|
-
# INFO for streetAddress/addressLine, postalCode/addressPostalCode,
|
|
443
|
-
# country/addressCountry, addressUse, addressType
|
|
444
|
-
# - EmergencyContactShape: VIOLATION for contactName, contactPhone;
|
|
445
|
-
# WARNING for contactRelationship
|
|
446
|
-
# - PharmacyInfoShape: VIOLATION for pharmacyName;
|
|
447
|
-
# INFO for pharmacyAddress, pharmacyPhone
|
|
448
|
-
# - AdvanceDirectivesShape: VIOLATION for hasLivingWill,
|
|
449
|
-
# hasPowerOfAttorney, hasDNR; INFO for advanceDirectiveNotes
|
|
450
|
-
#
|