@stackwright-pro/otters 1.0.0-alpha.7 → 1.0.0-alpha.71

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.
@@ -0,0 +1,719 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "FHIR US Core Subset — Stackwright Pro",
5
+ "description": "Curated FHIR US Core subset for Stackwright Pro. Source: HL7 FHIR R4 specification (https://www.hl7.org/fhir/R4/). Reduced to medically-fragile registry essentials: Patient, Encounter, Condition, MedicationRequest. NO external $refs — all schemas are inline. Suitable for Prism mock server without network access.",
6
+ "version": "4.0.1",
7
+ "license": {
8
+ "name": "HL7 FHIR Spec License",
9
+ "url": "https://www.hl7.org/fhir/license.html"
10
+ }
11
+ },
12
+ "servers": [
13
+ {
14
+ "url": "/fhir/R4",
15
+ "description": "FHIR R4 base URL"
16
+ }
17
+ ],
18
+ "paths": {
19
+ "/Patient/{id}": {
20
+ "get": {
21
+ "summary": "Read a Patient resource",
22
+ "operationId": "readPatient",
23
+ "tags": ["Patient"],
24
+ "parameters": [
25
+ {
26
+ "name": "id",
27
+ "in": "path",
28
+ "required": true,
29
+ "schema": { "type": "string" },
30
+ "example": "patient-001"
31
+ }
32
+ ],
33
+ "responses": {
34
+ "200": {
35
+ "description": "Patient resource",
36
+ "content": {
37
+ "application/fhir+json": {
38
+ "schema": { "$ref": "#/components/schemas/Patient" },
39
+ "example": {
40
+ "resourceType": "Patient",
41
+ "id": "patient-001",
42
+ "name": [{ "family": "Smith", "given": ["John"] }],
43
+ "gender": "male",
44
+ "birthDate": "1975-03-15"
45
+ }
46
+ }
47
+ }
48
+ },
49
+ "404": { "$ref": "#/components/responses/NotFound" }
50
+ }
51
+ }
52
+ },
53
+ "/Patient": {
54
+ "get": {
55
+ "summary": "Search for Patient resources",
56
+ "operationId": "searchPatient",
57
+ "tags": ["Patient"],
58
+ "parameters": [
59
+ { "name": "family", "in": "query", "schema": { "type": "string" } },
60
+ { "name": "given", "in": "query", "schema": { "type": "string" } },
61
+ { "name": "identifier", "in": "query", "schema": { "type": "string" } },
62
+ { "name": "_count", "in": "query", "schema": { "type": "integer" } }
63
+ ],
64
+ "responses": {
65
+ "200": {
66
+ "description": "Bundle of Patient resources",
67
+ "content": {
68
+ "application/fhir+json": {
69
+ "schema": { "$ref": "#/components/schemas/Bundle" },
70
+ "example": {
71
+ "resourceType": "Bundle",
72
+ "type": "searchset",
73
+ "total": 1,
74
+ "entry": [
75
+ {
76
+ "resource": {
77
+ "resourceType": "Patient",
78
+ "id": "patient-001",
79
+ "name": [{ "family": "Smith", "given": ["John"] }],
80
+ "gender": "male",
81
+ "birthDate": "1975-03-15"
82
+ }
83
+ }
84
+ ]
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ }
91
+ },
92
+ "/Encounter/{id}": {
93
+ "get": {
94
+ "summary": "Read an Encounter resource",
95
+ "operationId": "readEncounter",
96
+ "tags": ["Encounter"],
97
+ "parameters": [
98
+ {
99
+ "name": "id",
100
+ "in": "path",
101
+ "required": true,
102
+ "schema": { "type": "string" },
103
+ "example": "encounter-001"
104
+ }
105
+ ],
106
+ "responses": {
107
+ "200": {
108
+ "description": "Encounter resource",
109
+ "content": {
110
+ "application/fhir+json": {
111
+ "schema": { "$ref": "#/components/schemas/Encounter" },
112
+ "example": {
113
+ "resourceType": "Encounter",
114
+ "id": "encounter-001",
115
+ "status": "finished",
116
+ "class": {
117
+ "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
118
+ "code": "AMB"
119
+ },
120
+ "subject": { "reference": "Patient/patient-001" },
121
+ "period": { "start": "2024-01-15T09:00:00Z", "end": "2024-01-15T10:00:00Z" }
122
+ }
123
+ }
124
+ }
125
+ },
126
+ "404": { "$ref": "#/components/responses/NotFound" }
127
+ }
128
+ }
129
+ },
130
+ "/Encounter": {
131
+ "get": {
132
+ "summary": "Search for Encounter resources",
133
+ "operationId": "searchEncounter",
134
+ "tags": ["Encounter"],
135
+ "parameters": [
136
+ { "name": "patient", "in": "query", "schema": { "type": "string" } },
137
+ { "name": "status", "in": "query", "schema": { "type": "string" } },
138
+ { "name": "_count", "in": "query", "schema": { "type": "integer" } }
139
+ ],
140
+ "responses": {
141
+ "200": {
142
+ "description": "Bundle of Encounter resources",
143
+ "content": {
144
+ "application/fhir+json": {
145
+ "schema": { "$ref": "#/components/schemas/Bundle" },
146
+ "example": {
147
+ "resourceType": "Bundle",
148
+ "type": "searchset",
149
+ "total": 1,
150
+ "entry": [
151
+ {
152
+ "resource": {
153
+ "resourceType": "Encounter",
154
+ "id": "encounter-001",
155
+ "status": "finished",
156
+ "class": {
157
+ "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
158
+ "code": "AMB"
159
+ },
160
+ "subject": { "reference": "Patient/patient-001" }
161
+ }
162
+ }
163
+ ]
164
+ }
165
+ }
166
+ }
167
+ }
168
+ }
169
+ }
170
+ },
171
+ "/Condition/{id}": {
172
+ "get": {
173
+ "summary": "Read a Condition resource",
174
+ "operationId": "readCondition",
175
+ "tags": ["Condition"],
176
+ "parameters": [
177
+ {
178
+ "name": "id",
179
+ "in": "path",
180
+ "required": true,
181
+ "schema": { "type": "string" },
182
+ "example": "condition-001"
183
+ }
184
+ ],
185
+ "responses": {
186
+ "200": {
187
+ "description": "Condition resource",
188
+ "content": {
189
+ "application/fhir+json": {
190
+ "schema": { "$ref": "#/components/schemas/Condition" },
191
+ "example": {
192
+ "resourceType": "Condition",
193
+ "id": "condition-001",
194
+ "clinicalStatus": {
195
+ "coding": [
196
+ {
197
+ "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
198
+ "code": "active"
199
+ }
200
+ ]
201
+ },
202
+ "code": {
203
+ "coding": [
204
+ {
205
+ "system": "http://snomed.info/sct",
206
+ "code": "73211009",
207
+ "display": "Diabetes mellitus"
208
+ }
209
+ ]
210
+ },
211
+ "subject": { "reference": "Patient/patient-001" }
212
+ }
213
+ }
214
+ }
215
+ },
216
+ "404": { "$ref": "#/components/responses/NotFound" }
217
+ }
218
+ }
219
+ },
220
+ "/Condition": {
221
+ "get": {
222
+ "summary": "Search for Condition resources",
223
+ "operationId": "searchCondition",
224
+ "tags": ["Condition"],
225
+ "parameters": [
226
+ { "name": "patient", "in": "query", "schema": { "type": "string" } },
227
+ { "name": "clinical-status", "in": "query", "schema": { "type": "string" } },
228
+ { "name": "_count", "in": "query", "schema": { "type": "integer" } }
229
+ ],
230
+ "responses": {
231
+ "200": {
232
+ "description": "Bundle of Condition resources",
233
+ "content": {
234
+ "application/fhir+json": {
235
+ "schema": { "$ref": "#/components/schemas/Bundle" },
236
+ "example": {
237
+ "resourceType": "Bundle",
238
+ "type": "searchset",
239
+ "total": 1,
240
+ "entry": [
241
+ {
242
+ "resource": {
243
+ "resourceType": "Condition",
244
+ "id": "condition-001",
245
+ "clinicalStatus": {
246
+ "coding": [
247
+ {
248
+ "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
249
+ "code": "active"
250
+ }
251
+ ]
252
+ },
253
+ "subject": { "reference": "Patient/patient-001" }
254
+ }
255
+ }
256
+ ]
257
+ }
258
+ }
259
+ }
260
+ }
261
+ }
262
+ }
263
+ },
264
+ "/MedicationRequest/{id}": {
265
+ "get": {
266
+ "summary": "Read a MedicationRequest resource",
267
+ "operationId": "readMedicationRequest",
268
+ "tags": ["MedicationRequest"],
269
+ "parameters": [
270
+ {
271
+ "name": "id",
272
+ "in": "path",
273
+ "required": true,
274
+ "schema": { "type": "string" },
275
+ "example": "medreq-001"
276
+ }
277
+ ],
278
+ "responses": {
279
+ "200": {
280
+ "description": "MedicationRequest resource",
281
+ "content": {
282
+ "application/fhir+json": {
283
+ "schema": { "$ref": "#/components/schemas/MedicationRequest" },
284
+ "example": {
285
+ "resourceType": "MedicationRequest",
286
+ "id": "medreq-001",
287
+ "status": "active",
288
+ "intent": "order",
289
+ "medicationCodeableConcept": {
290
+ "coding": [
291
+ {
292
+ "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
293
+ "code": "1049502",
294
+ "display": "12 HR Oxycodone"
295
+ }
296
+ ]
297
+ },
298
+ "subject": { "reference": "Patient/patient-001" }
299
+ }
300
+ }
301
+ }
302
+ },
303
+ "404": { "$ref": "#/components/responses/NotFound" }
304
+ }
305
+ }
306
+ },
307
+ "/MedicationRequest": {
308
+ "get": {
309
+ "summary": "Search for MedicationRequest resources",
310
+ "operationId": "searchMedicationRequest",
311
+ "tags": ["MedicationRequest"],
312
+ "parameters": [
313
+ { "name": "patient", "in": "query", "schema": { "type": "string" } },
314
+ { "name": "status", "in": "query", "schema": { "type": "string" } },
315
+ { "name": "_count", "in": "query", "schema": { "type": "integer" } }
316
+ ],
317
+ "responses": {
318
+ "200": {
319
+ "description": "Bundle of MedicationRequest resources",
320
+ "content": {
321
+ "application/fhir+json": {
322
+ "schema": { "$ref": "#/components/schemas/Bundle" },
323
+ "example": {
324
+ "resourceType": "Bundle",
325
+ "type": "searchset",
326
+ "total": 1,
327
+ "entry": [
328
+ {
329
+ "resource": {
330
+ "resourceType": "MedicationRequest",
331
+ "id": "medreq-001",
332
+ "status": "active",
333
+ "intent": "order",
334
+ "subject": { "reference": "Patient/patient-001" }
335
+ }
336
+ }
337
+ ]
338
+ }
339
+ }
340
+ }
341
+ }
342
+ }
343
+ }
344
+ }
345
+ },
346
+ "components": {
347
+ "schemas": {
348
+ "Patient": {
349
+ "type": "object",
350
+ "description": "FHIR R4 Patient resource (inline schema — no external $refs)",
351
+ "required": ["resourceType"],
352
+ "properties": {
353
+ "resourceType": { "type": "string", "enum": ["Patient"] },
354
+ "id": { "type": "string" },
355
+ "meta": { "$ref": "#/components/schemas/Meta" },
356
+ "identifier": {
357
+ "type": "array",
358
+ "items": { "$ref": "#/components/schemas/Identifier" }
359
+ },
360
+ "active": { "type": "boolean" },
361
+ "name": {
362
+ "type": "array",
363
+ "items": { "$ref": "#/components/schemas/HumanName" }
364
+ },
365
+ "telecom": {
366
+ "type": "array",
367
+ "items": { "$ref": "#/components/schemas/ContactPoint" }
368
+ },
369
+ "gender": { "type": "string", "enum": ["male", "female", "other", "unknown"] },
370
+ "birthDate": { "type": "string", "format": "date" },
371
+ "address": {
372
+ "type": "array",
373
+ "items": { "$ref": "#/components/schemas/Address" }
374
+ },
375
+ "communication": {
376
+ "type": "array",
377
+ "items": {
378
+ "type": "object",
379
+ "properties": {
380
+ "language": { "$ref": "#/components/schemas/CodeableConcept" },
381
+ "preferred": { "type": "boolean" }
382
+ }
383
+ }
384
+ }
385
+ }
386
+ },
387
+ "Encounter": {
388
+ "type": "object",
389
+ "description": "FHIR R4 Encounter resource (inline schema — no external $refs)",
390
+ "required": ["resourceType", "status", "class"],
391
+ "properties": {
392
+ "resourceType": { "type": "string", "enum": ["Encounter"] },
393
+ "id": { "type": "string" },
394
+ "meta": { "$ref": "#/components/schemas/Meta" },
395
+ "status": {
396
+ "type": "string",
397
+ "enum": [
398
+ "planned",
399
+ "arrived",
400
+ "triaged",
401
+ "in-progress",
402
+ "onleave",
403
+ "finished",
404
+ "cancelled"
405
+ ]
406
+ },
407
+ "class": { "$ref": "#/components/schemas/Coding" },
408
+ "type": {
409
+ "type": "array",
410
+ "items": { "$ref": "#/components/schemas/CodeableConcept" }
411
+ },
412
+ "subject": { "$ref": "#/components/schemas/Reference" },
413
+ "participant": {
414
+ "type": "array",
415
+ "items": {
416
+ "type": "object",
417
+ "properties": {
418
+ "type": {
419
+ "type": "array",
420
+ "items": { "$ref": "#/components/schemas/CodeableConcept" }
421
+ },
422
+ "individual": { "$ref": "#/components/schemas/Reference" }
423
+ }
424
+ }
425
+ },
426
+ "period": { "$ref": "#/components/schemas/Period" },
427
+ "reasonCode": {
428
+ "type": "array",
429
+ "items": { "$ref": "#/components/schemas/CodeableConcept" }
430
+ },
431
+ "hospitalization": {
432
+ "type": "object",
433
+ "properties": {
434
+ "admitSource": { "$ref": "#/components/schemas/CodeableConcept" },
435
+ "dischargeDisposition": { "$ref": "#/components/schemas/CodeableConcept" }
436
+ }
437
+ },
438
+ "location": {
439
+ "type": "array",
440
+ "items": {
441
+ "type": "object",
442
+ "properties": {
443
+ "location": { "$ref": "#/components/schemas/Reference" },
444
+ "status": { "type": "string" }
445
+ }
446
+ }
447
+ }
448
+ }
449
+ },
450
+ "Condition": {
451
+ "type": "object",
452
+ "description": "FHIR R4 Condition resource (inline schema — no external $refs)",
453
+ "required": ["resourceType", "subject"],
454
+ "properties": {
455
+ "resourceType": { "type": "string", "enum": ["Condition"] },
456
+ "id": { "type": "string" },
457
+ "meta": { "$ref": "#/components/schemas/Meta" },
458
+ "clinicalStatus": { "$ref": "#/components/schemas/CodeableConcept" },
459
+ "verificationStatus": { "$ref": "#/components/schemas/CodeableConcept" },
460
+ "category": {
461
+ "type": "array",
462
+ "items": { "$ref": "#/components/schemas/CodeableConcept" }
463
+ },
464
+ "severity": { "$ref": "#/components/schemas/CodeableConcept" },
465
+ "code": { "$ref": "#/components/schemas/CodeableConcept" },
466
+ "subject": { "$ref": "#/components/schemas/Reference" },
467
+ "encounter": { "$ref": "#/components/schemas/Reference" },
468
+ "onsetDateTime": { "type": "string", "format": "date-time" },
469
+ "recordedDate": { "type": "string", "format": "date-time" },
470
+ "note": {
471
+ "type": "array",
472
+ "items": {
473
+ "type": "object",
474
+ "properties": {
475
+ "text": { "type": "string" }
476
+ }
477
+ }
478
+ }
479
+ }
480
+ },
481
+ "MedicationRequest": {
482
+ "type": "object",
483
+ "description": "FHIR R4 MedicationRequest resource (inline schema — no external $refs)",
484
+ "required": ["resourceType", "status", "intent", "subject"],
485
+ "properties": {
486
+ "resourceType": { "type": "string", "enum": ["MedicationRequest"] },
487
+ "id": { "type": "string" },
488
+ "meta": { "$ref": "#/components/schemas/Meta" },
489
+ "status": {
490
+ "type": "string",
491
+ "enum": [
492
+ "active",
493
+ "on-hold",
494
+ "cancelled",
495
+ "completed",
496
+ "entered-in-error",
497
+ "stopped",
498
+ "draft",
499
+ "unknown"
500
+ ]
501
+ },
502
+ "intent": {
503
+ "type": "string",
504
+ "enum": [
505
+ "proposal",
506
+ "plan",
507
+ "order",
508
+ "original-order",
509
+ "reflex-order",
510
+ "filler-order",
511
+ "instance-order",
512
+ "option"
513
+ ]
514
+ },
515
+ "medicationCodeableConcept": { "$ref": "#/components/schemas/CodeableConcept" },
516
+ "medicationReference": { "$ref": "#/components/schemas/Reference" },
517
+ "subject": { "$ref": "#/components/schemas/Reference" },
518
+ "encounter": { "$ref": "#/components/schemas/Reference" },
519
+ "authoredOn": { "type": "string", "format": "date-time" },
520
+ "requester": { "$ref": "#/components/schemas/Reference" },
521
+ "dosageInstruction": {
522
+ "type": "array",
523
+ "items": {
524
+ "type": "object",
525
+ "properties": {
526
+ "text": { "type": "string" },
527
+ "route": { "$ref": "#/components/schemas/CodeableConcept" },
528
+ "doseAndRate": {
529
+ "type": "array",
530
+ "items": {
531
+ "type": "object",
532
+ "properties": {
533
+ "doseQuantity": { "$ref": "#/components/schemas/Quantity" }
534
+ }
535
+ }
536
+ }
537
+ }
538
+ }
539
+ }
540
+ }
541
+ },
542
+ "Bundle": {
543
+ "type": "object",
544
+ "description": "FHIR R4 Bundle resource for search results",
545
+ "required": ["resourceType", "type"],
546
+ "properties": {
547
+ "resourceType": { "type": "string", "enum": ["Bundle"] },
548
+ "id": { "type": "string" },
549
+ "type": {
550
+ "type": "string",
551
+ "enum": [
552
+ "document",
553
+ "message",
554
+ "transaction",
555
+ "transaction-response",
556
+ "batch",
557
+ "batch-response",
558
+ "history",
559
+ "searchset",
560
+ "collection"
561
+ ]
562
+ },
563
+ "total": { "type": "integer" },
564
+ "link": {
565
+ "type": "array",
566
+ "items": {
567
+ "type": "object",
568
+ "properties": {
569
+ "relation": { "type": "string" },
570
+ "url": { "type": "string" }
571
+ }
572
+ }
573
+ },
574
+ "entry": {
575
+ "type": "array",
576
+ "items": {
577
+ "type": "object",
578
+ "properties": {
579
+ "fullUrl": { "type": "string" },
580
+ "resource": { "type": "object" }
581
+ }
582
+ }
583
+ }
584
+ }
585
+ },
586
+ "Meta": {
587
+ "type": "object",
588
+ "properties": {
589
+ "versionId": { "type": "string" },
590
+ "lastUpdated": { "type": "string", "format": "date-time" },
591
+ "profile": { "type": "array", "items": { "type": "string" } }
592
+ }
593
+ },
594
+ "Identifier": {
595
+ "type": "object",
596
+ "properties": {
597
+ "use": { "type": "string", "enum": ["usual", "official", "temp", "secondary", "old"] },
598
+ "system": { "type": "string" },
599
+ "value": { "type": "string" }
600
+ }
601
+ },
602
+ "HumanName": {
603
+ "type": "object",
604
+ "properties": {
605
+ "use": {
606
+ "type": "string",
607
+ "enum": ["usual", "official", "temp", "nickname", "anonymous", "old", "maiden"]
608
+ },
609
+ "text": { "type": "string" },
610
+ "family": { "type": "string" },
611
+ "given": { "type": "array", "items": { "type": "string" } },
612
+ "prefix": { "type": "array", "items": { "type": "string" } },
613
+ "suffix": { "type": "array", "items": { "type": "string" } }
614
+ }
615
+ },
616
+ "ContactPoint": {
617
+ "type": "object",
618
+ "properties": {
619
+ "system": {
620
+ "type": "string",
621
+ "enum": ["phone", "fax", "email", "pager", "url", "sms", "other"]
622
+ },
623
+ "value": { "type": "string" },
624
+ "use": { "type": "string", "enum": ["home", "work", "temp", "old", "mobile"] }
625
+ }
626
+ },
627
+ "Address": {
628
+ "type": "object",
629
+ "properties": {
630
+ "use": { "type": "string", "enum": ["home", "work", "temp", "old", "billing"] },
631
+ "line": { "type": "array", "items": { "type": "string" } },
632
+ "city": { "type": "string" },
633
+ "state": { "type": "string" },
634
+ "postalCode": { "type": "string" },
635
+ "country": { "type": "string" }
636
+ }
637
+ },
638
+ "Reference": {
639
+ "type": "object",
640
+ "properties": {
641
+ "reference": { "type": "string" },
642
+ "type": { "type": "string" },
643
+ "display": { "type": "string" }
644
+ }
645
+ },
646
+ "CodeableConcept": {
647
+ "type": "object",
648
+ "properties": {
649
+ "coding": { "type": "array", "items": { "$ref": "#/components/schemas/Coding" } },
650
+ "text": { "type": "string" }
651
+ }
652
+ },
653
+ "Coding": {
654
+ "type": "object",
655
+ "properties": {
656
+ "system": { "type": "string" },
657
+ "version": { "type": "string" },
658
+ "code": { "type": "string" },
659
+ "display": { "type": "string" }
660
+ }
661
+ },
662
+ "Period": {
663
+ "type": "object",
664
+ "properties": {
665
+ "start": { "type": "string", "format": "date-time" },
666
+ "end": { "type": "string", "format": "date-time" }
667
+ }
668
+ },
669
+ "Quantity": {
670
+ "type": "object",
671
+ "properties": {
672
+ "value": { "type": "number" },
673
+ "unit": { "type": "string" },
674
+ "system": { "type": "string" },
675
+ "code": { "type": "string" }
676
+ }
677
+ },
678
+ "OperationOutcome": {
679
+ "type": "object",
680
+ "required": ["resourceType", "issue"],
681
+ "properties": {
682
+ "resourceType": { "type": "string", "enum": ["OperationOutcome"] },
683
+ "issue": {
684
+ "type": "array",
685
+ "items": {
686
+ "type": "object",
687
+ "required": ["severity", "code"],
688
+ "properties": {
689
+ "severity": {
690
+ "type": "string",
691
+ "enum": ["fatal", "error", "warning", "information"]
692
+ },
693
+ "code": { "type": "string" },
694
+ "details": { "$ref": "#/components/schemas/CodeableConcept" },
695
+ "diagnostics": { "type": "string" }
696
+ }
697
+ }
698
+ }
699
+ }
700
+ }
701
+ },
702
+ "responses": {
703
+ "NotFound": {
704
+ "description": "Resource not found",
705
+ "content": {
706
+ "application/fhir+json": {
707
+ "schema": { "$ref": "#/components/schemas/OperationOutcome" },
708
+ "example": {
709
+ "resourceType": "OperationOutcome",
710
+ "issue": [
711
+ { "severity": "error", "code": "not-found", "diagnostics": "Resource not found" }
712
+ ]
713
+ }
714
+ }
715
+ }
716
+ }
717
+ }
718
+ }
719
+ }