Skip to content

Commit 94fbf8e

Browse files
authored
Merge pull request #162 from NHSDigital/dev/NPA-4513_Expand_Examples
NPA-4513 Expand POST /Consent Error Examples
2 parents 7dd38fb + a8f33c8 commit 94fbf8e

File tree

7 files changed

+85
-8
lines changed

7 files changed

+85
-8
lines changed

specification/examples/responses/POST_Consent/errors/duplicate_relationship_error.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PostConsentDuplicateRelationshipError:
22
summary: Duplicate request for proxy role that already exists
3-
description: 409 error response bundle for a duplicate proxy role
3+
description: Error response for a duplicate proxy role
44
value:
55
issue:
66
- code: invalid
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
PostConsentInvalidIdentifierValueError:
2+
summary: Invalid Identifier Value Error
3+
description: Error response for invalid identifier value
4+
value:
5+
issue:
6+
- code: invalid
7+
details:
8+
coding:
9+
- code: INVALID_IDENTIFIER_VALUE
10+
display: Invalid identifier value.
11+
system: https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode
12+
version: "1"
13+
diagnostics: Performer identifier value is invalid
14+
expression: performer[0].identifier.value
15+
severity: error
16+
resourceType: OperationOutcome

specification/examples/responses/POST_Consent/errors/invalid_performer_identifier_error.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PostConsentInvalidPerformerIdentifierError:
22
summary: Bad request performer identifier invalid
3-
description: Error response bundle for an invalid performer NHS number
3+
description: Error response for an invalid performer NHS number
44
value:
55
issue:
66
- code: invalid
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
PostConsentInvalidStatusError:
2+
summary: Invalid Status Error
3+
description: Error response for invalid status
4+
value:
5+
issue:
6+
- code: invalid
7+
details:
8+
coding:
9+
- code: INVALID_STATUS
10+
display: Invalid status.
11+
system: https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode
12+
version: "1"
13+
diagnostics: Status is invalid
14+
expression: status
15+
severity: error
16+
resourceType: OperationOutcome
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
PostConsentMissingIdentifierSystemError:
2+
summary: Missing Identifier System Error
3+
description: Error response for missing identifier system
4+
value:
5+
issue:
6+
- code: invalid
7+
details:
8+
coding:
9+
- code: MISSING_IDENTIFIER_SYSTEM
10+
display: Required values are missing.
11+
system: https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode
12+
version: "1"
13+
diagnostics: Unable to determine the patient identifier system
14+
expression: patient.identifier.system
15+
severity: error
16+
resourceType: OperationOutcome
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
PostConsentMissingScopeError:
2+
summary: Missing Scope Error
3+
description: Error response for missing scope
4+
value:
5+
issue:
6+
- code: invalid
7+
diagnostics: Unable to find scope
8+
details:
9+
coding:
10+
- code: MISSING_SCOPE
11+
display: Required values are missing.
12+
system: https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode
13+
version: "1"
14+
expression: scope
15+
severity: error
16+
resourceType: OperationOutcome

specification/validated-relationships-service-api.yaml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -543,13 +543,15 @@ paths:
543543
$ref: "./examples/responses/POST_Consent/success.yaml#/PostConsentSuccess"
544544
"4XX":
545545
description: |
546-
Errors will be returned for the first error encountered in the request. An error occurred as follows:
546+
Errors will be returned for the first error encountered in the request. For details, see the `diagnostics` field of error. An error occurred as follows:
547547
548548
| HTTP status | Error code | Description |
549549
| ----------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
550-
| 400 | `BAD_REQUEST` | Bad request. |
551-
| 400 | `MISSING_IDENTIFIER_VALUE` | Missing performer or patient identifier. For details, see the `diagnostics` field. |
552-
| 400 | `MISSING_IDENTIFIER_SYSTEM` | Missing performer or patient identifier system. For details, see the `diagnostics` field. |
550+
| 400 | `BAD_REQUEST` | Bad request. | |
551+
| 400 | `MISSING_IDENTIFIER_VALUE` | Missing performer or patient identifier. |
552+
| 400 | `MISSING_IDENTIFIER_SYSTEM` | Missing performer or patient identifier system. |
553+
| 400 | `MISSING_PATIENT` | Missing patient. |
554+
| 400 | `MISSING_PERFORMER` | Missing performer. |
553555
| 400 | `MISSING_STATUS` | Missing status. |
554556
| 400 | `MISSING_SCOPE` | Missing scope. |
555557
| 400 | `MISSING_CATEGORY` | Missing category. |
@@ -560,8 +562,10 @@ paths:
560562
| 405 | `METHOD_NOT_ALLOWED` | The method is not allowed. |
561563
| 408 | `TIMEOUT` | Request timed out. |
562564
| 409 | `DUPLICATE_RELATIONSHIP` | Conflict with requested proxy role. |
563-
| 422 | `INVALID_IDENTIFIER_VALUE` | Invalid performer or patient identifier value. For details, see the `diagnostics` field. |
564-
| 422 | `INVALID_IDENTIFIER_SYSTEM` | Invalid performer or patient identifier system. For details, see the `diagnostics` field. |
565+
| 422 | `INVALID_IDENTIFIER_VALUE` | Invalid performer or patient identifier value. |
566+
| 422 | `INVALID_IDENTIFIER_SYSTEM` | Invalid performer or patient identifier system. |
567+
| 422 | `INVALID_PATIENT` | Invalid patient. |
568+
| 422 | `INVALID_PERFORMER` | Invalid performer. |
565569
| 422 | `INVALID_STATUS` | Invalid status. |
566570
| 422 | `INVALID_SCOPE` | Invalid scope. |
567571
| 422 | `INVALID_CATEGORY` | Invalid category. |
@@ -578,6 +582,15 @@ paths:
578582
$ref: "./examples/responses/POST_Consent/errors/invalid_performer_identifier_error.yaml#/PostConsentInvalidPerformerIdentifierError"
579583
postConsentDuplicateRelationship:
580584
$ref: "./examples/responses/POST_Consent/errors/duplicate_relationship_error.yaml#/PostConsentDuplicateRelationshipError"
585+
postConsentInvalidIdentifierValue:
586+
$ref: "./examples/responses/POST_Consent/errors/invalid_identifier_value.yaml#/PostConsentInvalidIdentifierValueError"
587+
postConsentInvalidStatus:
588+
$ref: "./examples/responses/POST_Consent/errors/invalid_status.yaml#/PostConsentInvalidStatusError"
589+
postConsentMissingIdentifierSystem:
590+
$ref: "./examples/responses/POST_Consent/errors/missing_identifier_system.yaml#/PostConsentMissingIdentifierSystemError"
591+
postConsentMissingScope:
592+
$ref: "./examples/responses/POST_Consent/errors/missing_scope.yaml#/PostConsentMissingScopeError"
593+
581594
"5XX":
582595
description: |
583596
Errors will be returned for the first error encountered in the request. An error occurred as follows:

0 commit comments

Comments
 (0)