-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
656 lines (656 loc) · 18.5 KB
/
swagger.yaml
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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
swagger: '2.0'
info:
version: 1.0.0
title: Encounter
description: The Encounters service
host: api.spectrumhealth.org
basePath: /appointment
schemes:
- http
- https
produces:
- application/json
- text/plain
paths:
/getEncountersByCpi:
get:
summary: Patient Encounters
description: |
The Encounters endpoint returns all encounters for a given patient.
The response includes all past and future encounters from the
inpatient, outpatient, and emergency settings.
parameters:
- name: cpi
in: query
description: Patient identification number.
required: true
type: number
format: string
- name: start
in: query
description: The date (in seconds since epoch) from which you want to start looking for encounters.
required: true
type: string
- name: end
in: query
description: The date (in seconds since epoch) from which you want to stop looking for encounters.
required: true
type: string
responses:
200:
description: An array of encounters
schema:
type: array
items:
$ref: '#/definitions/Encounters'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/getEncounterById:
get:
summary: Patient Encounters
description: |
The Encounters endpoint returns all encounters for a given patient.
The response includes all past and future encounters from the
inpatient, outpatient, and emergency settings.
parameters:
- name: identifier
in: body
description: Encounter identifier.
required: true
schema:
$ref: '#/definitions/Identifier'
responses:
200:
description: An appointment
schema:
$ref: '#/definitions/Encounter'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/getEncountersByDepartmentId:
get:
summary: Patient Appointments
description: |
The Encounters endpoint returns all encounters for a given department.
The response includes all past and future encounters from the
inpatient, outpatient, and emergency settings.
parameters:
- name: departmentId
in: query
description: Department identification number.
required: true
type: number
format: string
- name: start
in: query
description: The date (in seconds since epoch) from which you want to start looking for appointments.
required: true
type: string
- name: end
in: query
description: The date (in seconds since epoch) from which you want to stop looking for appointments.
required: true
type: string
/getAppointmentsByCpi:
get:
summary: Patient Appointments
description: |
The Appointment endpoint returns all encounters for a given patient.
The response includes all past and future encounters from the
inpatient, outpatient, and emergency settings.
parameters:
- name: cpi
in: query
description: Patient identification number.
required: true
type: number
format: string
- name: start
in: query
description: The date (in seconds since epoch) from which you want to start looking for appointments.
required: true
type: string
- name: end
in: query
description: The date (in seconds since epoch) from which you want to stop looking for appointments.
required: true
type: string
/getAppointmentsByCpis:
get:
summary: Patient Appointments
description: |
The Appointment endpoint returns all encounters for the given patient(s).
The response includes all past and future encounters from the
inpatient, outpatient, and emergency settings.
parameters:
- name: cpis
in: query
description: Patient identification number(s).
required: true
type: array
items:
type: number
format: string
- name: start
in: query
description: The date (in seconds since epoch) from which you want to start looking for appointments.
required: true
type: string
- name: end
in: query
description: The date (in seconds since epoch) from which you want to stop looking for appointments.
required: true
type: string
responses:
200:
description: An array of appointments
schema:
type: array
items:
$ref: '#/definitions/Appointments'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/getAppointmentById:
get:
summary: Patient Appointment
description: |
The Appointment endpoint returns all encounters for a given patient.
The response includes all past and future encounters from the
inpatient, outpatient, and emergency settings.
parameters:
- name: identifier
in: body
description: Appointment identifier.
required: true
schema:
$ref: '#/definitions/Identifier'
responses:
200:
description: An appointment
schema:
$ref: '#/definitions/Appointment'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/getAppointmentsByDepartmentId:
get:
summary: Patient Appointments
description: |
The Appointment endpoint returns all encounters for a given department.
The response includes all past and future encounters from the
inpatient, outpatient, and emergency settings.
parameters:
- name: departmentId
in: query
description: Department identification number.
required: true
type: number
format: string
- name: start
in: query
description: The date (in seconds since epoch) from which you want to start looking for appointments.
required: true
type: string
- name: end
in: query
description: The date (in seconds since epoch) from which you want to stop looking for appointments.
required: true
type: string
definitions:
Encounters:
type: object
properties:
encounter:
type: array
items:
$ref: '#/definitions/Encounter'
Encounter:
type: object
properties:
identifier:
$ref: '#/definitions/Identifier'
encounterStatus:
$ref: "#/definitions/EncounterStatus"
classValue:
$ref: "#/definitions/Class"
type:
description: Specific type of appointment
type: string
patient:
$ref: '#/definitions/Identifier'
providers:
type: object
properties:
provider:
type: array
items:
$ref: "#/definitions/Provider"
appointment:
$ref: "#/definitions/Identifier"
period:
$ref: "#/definitions/Period"
reason:
description: Reason the appointment takes place
type: string
location:
$ref: "#/definitions/Location"
extensions:
$ref: "#/definitions/EncounterExtensions"
EncounterStatus:
description: The calculated status of the appointment
type: string
enum:
- PLANNED
- ARRIVED
- CANCELED
- FINISHED
- OTHER
Class:
description: Encounter class values derived from FHIR specification https://www.hl7.org/fhir/valueset-appointment-class.html
type: string
enum:
- INPATIENT
- OUTPATIENT
- AMBULATORY
- EMERGENCY
- HOME
- FIELD
- DAYTIME
- VIRTUAL
- OTHER
Appointments:
type: object
properties:
appointment:
type: array
items:
$ref: '#/definitions/Appointment'
Appointment:
type: object
properties:
identifier:
$ref: '#/definitions/Identifier'
appointmentStatus:
$ref: "#/definitions/AppointmentStatus"
type:
description: The type of the appointment
type: string
patient:
$ref: '#/definitions/Identifier'
description:
description: Shown on a subject line in a meeting request, or appointment list
type: string
start:
type: string
description: When appointment is to take place
end:
type: string
description: When appointment is to conclude
minutesDuration:
type: integer
description: Can be less than start/end (e.g. estimate)
providers:
type: object
properties:
provider:
type: array
items:
$ref: "#/definitions/Provider"
location:
$ref: "#/definitions/Location"
extensions:
$ref: "#/definitions/AppointmentExtensions"
AppointmentStatus:
description: The calculated status of the appointment
type: string
enum:
- SCHEDULED
- COMPLETED
- CANCELED
- NO_SHOW
- LEFT_WITHOUT_SEEN
- CHECKED_IN
- CHECKED_OUT
- RESCHEDULED
- CONFIRMED
- PENDING
- OTHER
Period:
description: The start and end time of the event. https://www.hl7.org/fhir/datatypes.html#Period
type: object
properties:
start:
type: string
description: Starting time with inclusive boundary.
end:
type: string
description: End time with inclusive boundary, if not ongoing
Location:
type: object
properties:
identifier:
$ref: '#/definitions/Identifier'
address:
$ref: '#/definitions/Address'
name:
type: string
room:
type: string
bed:
type: string
bedPhoneNumber:
type: string
Address:
type: object
properties:
addressLine1:
type: string
addressLine2:
type: string
addressType:
type: string
city:
type: string
country:
type: string
county:
type: string
state:
type: string
zipCode:
type: string
Provider:
type: object
properties:
name:
type: string
type:
$ref: '#/definitions/ProviderType'
role:
type: string
identifiers:
type: object
properties:
identifier:
type: array
items:
$ref: '#/definitions/Identifier'
isDisplayProvider:
type: boolean
ProviderType:
type: string
description: The available Provider type
enum:
- SCHEDULING
- REFERRING
- TREATMENT_TEAM
- CARE_TEAM
- ATTENDING
- ADMITTING
- SURGEON
- PRIMARY_CARE_PROVIDER
- OTHER
Identifier:
type: object
description: Associated Ids for this item
properties:
type:
type: string
system:
type: string
value:
type: string
EncounterExtensions:
type: object
properties:
toggles:
$ref: '#/definitions/EncounterToggles'
guarantor:
$ref: '#/definitions/Guarantor'
insuranceCoverage:
$ref: '#/definitions/InsuranceCoverage'
patientDisplayName:
type: string
clinicalDocumentHandles:
type: object
properties:
clinicalDocumentHandle:
type: array
items:
$ref: '#/definitions/ClinicalDocumentHandle'
AppointmentExtensions:
type: object
properties:
toggles:
$ref: '#/definitions/AppointmentToggles'
cancelContactId:
type: string
eCheckinStatus:
$ref: '#/definitions/eCheckinStatus'
confirmedStatus:
$ref: '#/definitions/ConfirmedStatus'
appointmentNotes:
type: string
description: Notes meant specifically for clinical staff. This should be used with caution - this data is usally not suitable for patients.
patientInstructions:
$ref: '#/definitions/PatientInstructions'
patientArrivalTimeOffset:
type: string
patientDisplayName:
type: string
waitLists:
type: array
items:
$ref: '#/definitions/Waitlist'
questionnaires:
type: array
items:
$ref: '#/definitions/Questionnaire'
PatientInstructions:
description: Instructions meant specifically for the patient.
type: object
properties:
preArrivalInstructions:
type: string
preBookingInstructions:
type: string
eCheckinStatus:
type: string
enum:
- NOT_OFFERED
- NOT_YET_AVAILABLE
- NOT_STARTED
- IN_PROGRESS
- COMPLETED
- NOT_NEEDED
- FILTERED
- OTHER
ConfirmedStatus:
type: string
enum:
- CONFIRMED
- NOT_CONFIRMED
- REMOVED
- OTHER
EncounterToggles:
description: Toggles are enterprise decisions which represent triggers to act upon within consumers.
type: object
properties:
isTimeViewable:
type: boolean
description: This toggle indicates when a patient facing application should make the time of an appointment viewable to the patient (eg. A surgical appointment scheduled at 3:00pm but the patient should actually arrive at 1:00pm for surgical-prep).
isPatientViewable:
type: boolean
description: Whether this appointment can be shown to the patient at all.
isLocationViewable:
type: boolean
description: Whether or not the location should be shown for this event. This mainly pertains to video visits.
AppointmentToggles:
description: Toggles are enterprise decisions which represent triggers to act upon within consumers.
type: object
properties:
isTimeViewable:
type: boolean
description: Whether or not the time should be shown to the patient
isVideoVisit:
type: boolean
description: Whether or not this appointment is an e-visit
isECheckinViewable:
type: boolean
description: Whether or not this appointment can be e-checked in, and whether it should be shown to the patient
isConfirmable:
type: boolean
isPatientViewable:
type: boolean
description: Whether this appointment can be shown to the patient at all
isWaitListed:
type: boolean
description: Whether or not this appointment has been wait-listed
isCancelable:
type: boolean
description: Whether or not this appointment can be canceled
isLocationViewable:
type: boolean
description: Whether or not the location should be shown for this event. This mainly pertains to video visits.
Guarantor:
type: object
properties:
identifier:
$ref: '#/definitions/Identifier'
name:
type: string
type:
type: string
relationshipToPatient:
type: string
InsuranceCoverage:
type: object
properties:
identifier:
$ref: '#/definitions/Identifier'
plan:
type: string
payor:
type: string
contractNumber:
type: string
groupNumber:
type: string
subscriber:
$ref: '#/definitions/Subscriber'
Subscriber:
type: object
properties:
name:
type: string
relationshipToPatient:
type: string
Waitlist:
type: object
properties:
waitListStatus:
$ref: '#/definitions/WaitListStatus'
isAvailable:
type: boolean
offerDateTime:
type: string
offerResolvedDateTime:
type: string
offerSentDateTime:
type: string
offerViewedDateTime:
type: string
WaitListStatus:
type: string
enum:
- ACTIVE
- ACCEPTED
- DECLINED
- EXPIRED
- UNAVAILABLE
- DELETED
- OTHER
Questionnaire:
type: object
properties:
context:
$ref: '#/definitions/QuestionnaireContext'
name:
type: string
description: Name of questionnaire from Epic
questionnaireStatus:
$ref: '#/definitions/QuestionnaireStatus'
type:
$ref: '#/definitions/Type'
identifiers:
type: array
items:
$ref: '#/definitions/Identifier'
QuestionnaireStatus:
type: string
description: The possible statuses, as documented by Epic - https://datahandbook.epic.com/WebServices/Details/3059381
enum:
- NEW
- IN_PROGRESS
- REVIEWABLE
- COMPLETED
- OTHER
Type:
type: string
description: The possible types, as documented by Epic - https://datahandbook.epic.com/WebServices/Details/3059381
enum:
- GENERAL
- HISTORY
- OTHER
QuestionnaireContext:
type: object
description: Questionnaire context that will enable deep linking into the datatile
properties:
name:
type: string
token:
type: string
ClinicalDocumentHandle:
type: object
description: Clinical Document Handle will allow user to call the clinical-DocumentService to get documents corresponding to the encounter.
properties:
cpi:
type: string
documentId:
type: string
documentType:
$ref: '#/definitions/ClinicalDocumentType'
sourceSystem:
type: string
ClinicalDocumentType:
type: string
description: The possible types found in the clinical-DocumentService - https://jira.internal.priority-health.com/stash/projects/EWS/repos/clinical-document/browse/clinical-documentservice/src/main/java/org/spectrumhealth/ws/enterprise/clinicaldocument/model/DocumentType.java
enum:
- AFTER_VISIT_SUMMARY
- INPATIENT_AVS_GENERAL
- INPATIENT_AVS_OB_DELIVERED
- INPATIENT_AVS_OB_UNDELIVERED
- INPATIENT_DAY_AT_A_GLANCE
- SURGICAL_AVS
- EMERGENCY_AVS
- PATIENT_DEPART_SUMMARY
- CONTINUITY_OF_CARE
- PATIENT_HEALTH_SUMMARY
- TRANSITION_OF_CARE
- AMBULATORY_SUMMARY
Error:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
fields:
type: string