Skip to content

Commit 72fab09

Browse files
authored
Merge pull request #19 from ProjectEKA/v0.9.4
Introduced on-notify response callback for consent notification to HIU and HIP
2 parents a184a54 + 30d74d0 commit 72fab09

File tree

1 file changed

+136
-3
lines changed

1 file changed

+136
-3
lines changed

contracts/gateway-v1.yaml

Lines changed: 136 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ paths:
661661
application/xml:
662662
schema:
663663
$ref: '#/components/schemas/ErrorResponse'
664-
/v1/health-information/hiu/on-request:
664+
/v1/health-information/cm/on-request:
665665
post:
666666
tags:
667667
- data flow
@@ -1156,9 +1156,10 @@ paths:
11561156
- cm facing
11571157
summary: Consent notification
11581158
description: >
1159-
Notification of consents to health information providers consent request granted, consent revoked, consent expired. Only the GRANTED and REVOKED status notifications will be sent to HIP.
1159+
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.
11601160
1. If consent is granted, status=GRANTED, then consentDetail contains the consent artefact details and signature is available.
11611161
2. If consent is revoked, then status=REVOKED, and consentId specifes which consent artefact is revoked.
1162+
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.
11621163
parameters:
11631164
- $ref: "#/components/parameters/authorization"
11641165
- $ref: "#/components/parameters/X-HIP-ID"
@@ -1196,6 +1197,51 @@ paths:
11961197
application/xml:
11971198
schema:
11981199
$ref: '#/components/schemas/ErrorResponse'
1200+
/v1/consents/hip/on-notify:
1201+
post:
1202+
tags:
1203+
- consent flow
1204+
- hip facing
1205+
summary: Consent notification
1206+
description: >
1207+
This API is called by HIP as acknowledgement to notification of consents, in cases of consent revocation and expiration.
1208+
parameters:
1209+
- $ref: "#/components/parameters/authorization"
1210+
- $ref: "#/components/parameters/X-CM-ID"
1211+
requestBody:
1212+
required: true
1213+
content:
1214+
application/json:
1215+
schema:
1216+
$ref: '#/components/schemas/HIPConsentNotificationResponse'
1217+
application/xml:
1218+
schema:
1219+
$ref: '#/components/schemas/HIPConsentNotificationResponse'
1220+
responses:
1221+
'202':
1222+
description: Request Accepted
1223+
'401':
1224+
description: >
1225+
**Causes:**
1226+
* Invalid/Expired/Empty token.
1227+
content:
1228+
application/json:
1229+
schema:
1230+
$ref: '#/components/schemas/ErrorResponse'
1231+
application/xml:
1232+
schema:
1233+
$ref: '#/components/schemas/ErrorResponse'
1234+
'500':
1235+
description: >
1236+
**Causes:**
1237+
* Downstream services are down
1238+
content:
1239+
application/json:
1240+
schema:
1241+
$ref: '#/components/schemas/ErrorResponse'
1242+
application/xml:
1243+
schema:
1244+
$ref: '#/components/schemas/ErrorResponse'
11991245
/v1/hip/consent/notification:
12001246
post:
12011247
tags:
@@ -1290,6 +1336,48 @@ paths:
12901336
application/xml:
12911337
schema:
12921338
$ref: '#/components/schemas/ErrorResponse'
1339+
/v1/consents/hiu/on-notify:
1340+
post:
1341+
tags:
1342+
- consent flow
1343+
- hiu facing
1344+
summary: Consent notification
1345+
description: |
1346+
This API is called by HIU as acknowledgement to consent notifications, specifically for cases when consent is REVOKED or EXPIRED.
1347+
parameters:
1348+
- $ref: '#/components/parameters/authorization'
1349+
- $ref: '#/components/parameters/X-CM-ID'
1350+
requestBody:
1351+
required: true
1352+
content:
1353+
application/json:
1354+
schema:
1355+
$ref: '#/components/schemas/HIUConsentNotificationResponse'
1356+
responses:
1357+
'202':
1358+
description: Request Accepted.
1359+
'401':
1360+
description: >
1361+
**Causes:**
1362+
* Invalid/Expired/Empty token.
1363+
content:
1364+
application/json:
1365+
schema:
1366+
$ref: '#/components/schemas/ErrorResponse'
1367+
application/xml:
1368+
schema:
1369+
$ref: '#/components/schemas/ErrorResponse'
1370+
'500':
1371+
description: >
1372+
**Causes:**
1373+
* Downstream services are down
1374+
content:
1375+
application/json:
1376+
schema:
1377+
$ref: '#/components/schemas/ErrorResponse'
1378+
application/xml:
1379+
schema:
1380+
$ref: '#/components/schemas/ErrorResponse'
12931381
/v1/hiu/consent/notification/:
12941382
post:
12951383
tags:
@@ -3272,4 +3360,49 @@ components:
32723360
error:
32733361
$ref: '#/components/schemas/Error'
32743362
resp:
3275-
$ref: '#/components/schemas/RequestReference'
3363+
$ref: '#/components/schemas/RequestReference'
3364+
HIPConsentNotificationResponse:
3365+
type: object
3366+
properties:
3367+
requestId:
3368+
type: string
3369+
format: uuid
3370+
description: a nonce, unique for each HTTP request
3371+
example: 5f7a535d-a3fd-416b-b069-c97d021fbacd
3372+
timestamp:
3373+
$ref: '#/components/schemas/TimestampSchema'
3374+
acknowledgement:
3375+
$ref: '#/components/schemas/ConsentAcknowledgement'
3376+
error:
3377+
$ref: '#/components/schemas/Error'
3378+
resp:
3379+
$ref: '#/components/schemas/RequestReference'
3380+
HIUConsentNotificationResponse:
3381+
type: object
3382+
properties:
3383+
requestId:
3384+
type: string
3385+
format: uuid
3386+
description: a nonce, unique for each HTTP request
3387+
example: 5f7a535d-a3fd-416b-b069-c97d021fbacd
3388+
timestamp:
3389+
$ref: '#/components/schemas/TimestampSchema'
3390+
acknowledgement:
3391+
type: array
3392+
items:
3393+
$ref: '#/components/schemas/ConsentAcknowledgement'
3394+
error:
3395+
$ref: '#/components/schemas/Error'
3396+
resp:
3397+
$ref: '#/components/schemas/RequestReference'
3398+
ConsentAcknowledgement:
3399+
type: object
3400+
properties:
3401+
status:
3402+
type: string
3403+
enum:
3404+
- OK
3405+
- UNKNOWN
3406+
consentId:
3407+
type: string
3408+
example: <consent-artefact-id>

0 commit comments

Comments
 (0)