-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathgateway.yaml
More file actions
3981 lines (3962 loc) · 124 KB
/
gateway.yaml
File metadata and controls
3981 lines (3962 loc) · 124 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
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
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
version: "0.5"
title: Gateway
description: >
Gateway is the hub that routes/orchestrates the interaction between consent managers and API bridges. There are 5 categories of APIs; discovery, link, consent flow, data flow and monitoring. To reflect the consumers of APIs, the above apis are also categorized under cm facing, hiu facing and hip facing
servers:
- url: https://ncg-dev.projecteka.in/gateway
description: Dev
tags:
- name: user auth
- name: discovery
- name: link
- name: consent flow
- name: data flow
- name: identification
- name: monitoring
- name: sessions
- name: cm facing
- name: hiu facing
- name: hip facing
paths:
/v0.5/care-contexts/discover:
post:
tags:
- discovery
- cm facing
summary: Discover patient's accounts
description: >
Request for patient care context discover, made by CM for a specific HIP. It is expected that HIP will subsequently return either zero or one patient record with (potentially masked) associated care contexts
1. **At least one of the verified identifier matches**
2. **Name (fuzzy), gender matches**
3. **If YoB was given, age band(+-2) matches**
4. **If unverified identifiers were given, one of them matches**
5. **If more than one patient records would be found after aforementioned steps, then patient who matches most verified and unverified identifiers would be returned.**
6. **If there would be still more than one patients (after ranking) error would be returned**
7. **Intended HIP should be able to resolve and identify results returned in the subsequent link confirmation request via the specified transactionId**
8. **Intended HIP should store the discovery results with transactionId and care contexts discovered for subsequent link initiation**
parameters:
- $ref: "#/components/parameters/authorization"
- $ref: "#/components/parameters/X-HIP-ID"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PatientDiscoveryRequest'
application/xml:
schema:
$ref: '#/components/schemas/PatientDiscoveryRequest'
responses:
'202':
description: Request accepted
'400':
description: >
**Causes:**
* Empty verified identifiers.
* Format mismatch of any of attributes.
| type | Format/Allowed Values|
| ------- | ---------------- |
| gender | M/F/O |
| MOBILE | valid mobile number with proper country code |
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: >
**Causes:**
* Unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream system(s) is down.
* Unhandled exceptions.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/care-contexts/on-discover:
post:
tags:
- discovery
- cm facing
summary: Response to patient's account discovery request
description: >
Result of patient care-context discovery request at HIP end. If a matching patient found with zero or more care contexts associated, it is specified as result attribute. If the prior discovery request, resulted in errors then it is specified in the error attribute. Reasons of errors can be
1. **more than one definitive match for the given request**
2. **no verified identifer was specified**
parameters:
- $ref: "#/components/parameters/authorization"
- $ref: "#/components/parameters/X-CM-ID"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PatientDiscoveryResult'
application/xml:
schema:
$ref: '#/components/schemas/PatientDiscoveryResult'
responses:
'202':
description: Request accepted
'400':
description: >
**Causes:**
* Format mismatch of any of attributes.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: >
**Causes:**
* Unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream system(s) is down.
* Unhandled exceptions.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/links/link/init:
post:
tags:
- link
- cm facing
summary: Link patient's care contexts
description: >
Request from CM to links care contexts associated with only one patient
1. **Validate account reference number and care context reference number**
2. **Validate transactionId in the request with discovery request entry to check whether there was a discovery
and were these care contexts discovered or not for a given patient**
3. **Before eventual link confirmation, HIP needs to authenticate the request with the patient(eg: OTP verification)**
4. **HIP should communicate the mode of authentication of a successful request to Consent Manager**
parameters:
- $ref: "#/components/parameters/authorization"
- $ref: "#/components/parameters/X-HIP-ID"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PatientLinkReferenceRequest'
application/xml:
schema:
$ref: '#/components/schemas/PatientLinkReferenceRequest'
responses:
'202':
description: Request accepted
'400':
description: >
**Causes:**
* Consent manager user id is not provided
* Patient reference number is not provided
* Care context references are not provided
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: >
**Causes:**
* Unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream system(s) is down.
* Unhandled exceptions.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/links/link/on-init:
post:
tags:
- link
- hip facing
summary: Response to patient's care context link request
description: >
Result of patient care-context link request from HIP end. This happens in context of previous discovery of patient found at HIP end, therefore the link requests ought to be in reference to the patient reference and care-context references previously returned by the HIP. The correlation of discovery and link request is maintained through the transactionId. HIP should have
1. **Validated transactionId in the request to check whether there was a discovery done previously, and the link request corresponds to returned patient care care context references**
2. **Before returning the response, HIP should have sent an authentication request to the patient(eg: OTP verification)**
3. **HIP should communicate the mode of authentication of a successful request**
4. **HIP subsequently should expect the token passed via /link/confirm against the link.referenceNumber passed in this call**
The error section in the body, represents the potential errors that may have occurred. Possible reasons:
1. **Patient reference number is invalid**
2. **Care context reference numbers are invalid**
parameters:
- $ref: "#/components/parameters/authorization"
- $ref: "#/components/parameters/X-CM-ID"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PatientLinkReferenceResult'
application/xml:
schema:
$ref: '#/components/schemas/PatientLinkReferenceResult'
responses:
'202':
description: Request accepted
'400':
description: >
**Causes:**
* Format mismatch of any of attributes.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: >
**Causes:**
* Unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream system(s) is down.
* Unhandled exceptions.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/links/link/confirm:
post:
tags:
- link
- hip facing
parameters:
- $ref: "#/components/parameters/authorization"
- $ref: "#/components/parameters/X-HIP-ID"
summary: Token submission by Consent Manager for link confirmation
description: >
API to submit the token that was sent by HIP during the link request.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LinkConfirmationRequest'
application/xml:
schema:
$ref: '#/components/schemas/LinkConfirmationRequest'
responses:
'202':
description: accepted
'400':
description: >
**Causes:**
* Token is not provided
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: >
**Causes:**
* Unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream system(s) is down.
* Unhandled exceptions.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/links/link/on-confirm:
post:
tags:
- link
- cm facing
parameters:
- $ref: "#/components/parameters/authorization"
- $ref: "#/components/parameters/X-CM-ID"
summary: Token authenticated by HIP, indicating completion of linkage of care-contexts
description: >
Returns a list of linked care contexts with patient reference number.
1. **Validated and linked account reference number**
2. **Validated that the token sent from Consent Manager is same as the one generated by HIP**
3. **Verified that same Consent Manager which made the link request is sending the token**
4. **Results of unmasked linked care contexts with patient reference number**
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PatientLinkResult'
application/xml:
schema:
$ref: '#/components/schemas/PatientLinkResult'
responses:
'202':
description: accepted
'400':
description: >
**Causes:**
* resp not specified
* atleast patient or error should be specified
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: >
**Causes:**
* Unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream system(s) is down.
* Unhandled exceptions.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/links/link/add-contexts:
post:
tags:
- link
- hip facing
parameters:
- $ref: "#/components/parameters/authorization"
- $ref: "#/components/parameters/X-CM-ID"
summary: API for HIP initiated care-context linking for patient
description: >
API to submit care-context to CM for HIP initiated linking. The API must accompany the "accessToken" fetched in the users/auth process.
1. subsequent usage for accessToken may be invalid if it was meant for one-time usage or if it expired
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PatientCareContextLinkRequest'
application/xml:
schema:
$ref: '#/components/schemas/PatientCareContextLinkRequest'
responses:
'202':
description: accepted
'400':
description: >
**Causes:**
* required information not provided
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: >
**Causes:**
* Unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream system(s) is down.
* Unhandled exceptions.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/links/link/on-add-contexts:
post:
tags:
- link
- cm facing
parameters:
- $ref: "#/components/parameters/authorization"
- $ref: "#/components/parameters/X-HIP-ID"
summary: callback API for HIP initiated patient linking /link/add-context
description: >
If the accessToken is valid for purpose of linking, and specified details provided, CM will send "acknoweldgement.status" as SUCCESS. If any error occcurred, for example invalid token, or other required patient or care-context information not provided, then "error" attribute conveys so.
1. **accessToken must be valid and must be for the purpose of linking**
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PatientCareContextLinkResponse'
application/xml:
schema:
$ref: '#/components/schemas/PatientCareContextLinkResponse'
responses:
'202':
description: accepted
'400':
description: >
**Causes:**
* resp not specified
* atleast acknowledgement or error should be specified
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: >
**Causes:**
* Unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream system(s) is down.
* Unhandled exceptions.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/health-information/cm/request:
post:
tags:
- data flow
- hiu facing
summary: Health information data request
description: >
Request for Health information against a consent id. CM would generate a transactionId against each consent and pass it as trnasaction context / correlation id to the HIP and also return the same to HIU via /on-request.
parameters:
- $ref: "#/components/parameters/authorization"
- $ref: "#/components/parameters/X-CM-ID"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/HIRequest'
application/xml:
schema:
$ref: '#/components/schemas/HIRequest'
responses:
'202':
description: Request Accepted
'400':
description: >
**Causes:**
* Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: >
**Causes:**
* Token is invalid or Link has expired
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream system(s) is down.
* Unhandled exceptions.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/health-information/cm/on-request:
post:
tags:
- data flow
- cm facing
summary: Health information data request
description: >
Callback API for acknowledgement of Health information request of HIU. CM calls this API when it has validated the Health Information request given the consent id. Either the **hiRequest** or **error** would need to be specified. If the health info request was valid, then the ***hiRequest.transactionId*** specifies the transaction context against which HIP would send over the data.
Possible cases of errors are
1. **Invalid consent artefact id**
2. **Consent has expired**
3. **Date ranges are invalid**
parameters:
- $ref: "#/components/parameters/authorization"
- $ref: "#/components/parameters/X-HIU-ID"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/HIUHealthInformationRequestResponse'
application/xml:
schema:
$ref: '#/components/schemas/HIUHealthInformationRequestResponse'
responses:
'202':
description: Request Accepted
'400':
description: >
**Causes:**
* Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: >
**Causes:**
* Token is invalid or Link has expired
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream system(s) is down.
* Unhandled exceptions.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/consent-requests/init:
post:
tags:
- consent flow
- hiu facing
summary: Create consent request
description: Creates a consent request to get data about a patient by HIU user.
parameters:
- $ref: "#/components/parameters/authorization"
- $ref: "#/components/parameters/X-CM-ID"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConsentRequest'
application/xml:
schema:
$ref: '#/components/schemas/ConsentRequest'
responses:
'202':
description: Request Accepted
'400':
description: >
**Causes:**
* Invalid data sent
* Required attributes not mentioned
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: >
**Causes:**
* Expired/Invalid token.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream system(s) is down.
* Unhandled exceptions.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/consent-requests/on-init:
post:
tags:
- consent flow
- cm facing
summary: Response to consent request
description: |
Result of consent request creation for a patient. **consentRequest.id** represents the consentrequest id created by CM. The result must contain either **consentRequest** or the **error** caused. <br/>
Reasons for error may be
* Invalid references (e.g patient id, hiu id), purpose, hiTypes, ranges, persmission
parameters:
- $ref: "#/components/parameters/authorization"
- $ref: "#/components/parameters/X-HIU-ID"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConsentRequestInitResponse'
application/xml:
schema:
$ref: '#/components/schemas/ConsentRequestInitResponse'
responses:
'202':
description: Request Accepted
'400':
description: >
**Causes:**
* Invalid data sent
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: >
**Causes:**
* Expired/Invalid token.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream system(s) is down.
* Unhandled exceptions.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/consent-requests/status:
post:
tags:
- consent flow
- hiu facing
summary: Get consent request status
description: Get status of consent request done previously
parameters:
- $ref: '#/components/parameters/authorization'
- $ref: "#/components/parameters/X-CM-ID"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConsentRequestStatusRequest'
application/xml:
schema:
$ref: '#/components/schemas/ConsentRequestStatusRequest'
responses:
'202':
description: Request Accepted
'400':
description: >
**Causes:**
* Invalid data sent
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: >
**Causes:**
* Expired/Invalid token.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream system(s) is down.
* Unhandled exceptions.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/consent-requests/on-status:
post:
tags:
- consent flow
- cm facing
summary: Result of consent request status
description: |
Result of consent request done previously. Status of request can be GRANTED, DENIED, EXPIRED. If the request was GRANTED, then
parameters:
- $ref: '#/components/parameters/authorization'
- $ref: "#/components/parameters/X-HIU-ID"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/HIUConsentRequestStatus'
application/xml:
schema:
$ref: '#/components/schemas/HIUConsentRequestStatus'
responses:
'202':
description: Request Accepted
'400':
description: >
**Causes:**
* Invalid data sent
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: >
**Causes:**
* Expired/Invalid token.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream system(s) is down.
* Unhandled exceptions.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/consents/hip/notify:
post:
tags:
- consent flow
- cm facing
summary: Consent notification
description: >
Notification of consents to health information providers consent request granted, consent revoked, consent expired. Only the GRANTED, REVOKED and EXPIRED status notifications will be sent to HIP.
1. If consent is granted, status=GRANTED, then consentDetail contains the consent artefact details and signature is available.
2. If consent is revoked, then status=REVOKED, and consentId specifes which consent artefact is revoked.
3. If the consent has expired, then status=EXPIRED, and consentId specifies which consent artefact has expired. Note, this is also responsibility of the HIP to keep track of consent expiry. Any data request on expired consent artefact must not be done.
parameters:
- $ref: "#/components/parameters/authorization"
- $ref: "#/components/parameters/X-HIP-ID"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/HIPConsentNotification'
application/xml:
schema:
$ref: '#/components/schemas/HIPConsentNotification'
responses:
'202':
description: Request Accepted
'401':
description: >
**Causes:**
* Invalid/Expired/Empty token.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream services are down
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/consents/hip/on-notify:
post:
tags:
- consent flow
- hip facing
summary: Consent notification
description: >
This API is called by HIP as acknowledgement to notification of consents, in cases of consent revocation and expiration.
parameters:
- $ref: "#/components/parameters/authorization"
- $ref: "#/components/parameters/X-CM-ID"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/HIPConsentNotificationResponse'
application/xml:
schema:
$ref: '#/components/schemas/HIPConsentNotificationResponse'
responses:
'202':
description: Request Accepted
'401':
description: >
**Causes:**
* Invalid/Expired/Empty token.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream services are down
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/consents/hiu/notify:
post:
tags:
- consent flow
- cm facing
summary: Consent notification
description: |
Health information user will get notified about the consent request granted or denied, consent revoked, consent expired.
1. For consent request grant, status=GRANTED, consentRequestId=<consent-request-id>, and consentArtefacts is an array of generated consent artefact Ids.
2. For consent request expiry, status=EXPIRED, consentRequestId=<consent-request-id>
3. For consent request denied, status=DENIED, consentRequestId=<consent-request-id>
4. For consent revocation, status=REVOKED, consentArtefacts is an array of revoked consent artefact ids
parameters:
- $ref: '#/components/parameters/authorization'
- $ref: '#/components/parameters/X-HIU-ID'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/HIUConsentNotificationEvent'
responses:
'202':
description: Request Accepted.
'401':
description: >
**Causes:**
* Invalid/Expired/Empty token.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: >
**Causes:**
* Downstream services are down
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v0.5/consents/hiu/on-notify:
post:
tags:
- consent flow
- hiu facing
summary: Consent notification