Skip to content

Commit 67a365b

Browse files
committed
NPA-4514 Update Status Codes
1 parent 8ce0c48 commit 67a365b

File tree

2 files changed

+27
-20
lines changed

2 files changed

+27
-20
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
PostConsentInvalidPerformerIdentifierError:
22
summary: Bad request performer identifier invalid
3-
description: 400 error response bundle for an invalid performer NHS number
3+
description: Error response bundle for an invalid performer NHS number
44
value:
55
issue:
66
- code: invalid
7-
diagnostics: "Performer identifier is not a valid NHS number."
7+
diagnostics: "Not a valid NHS Number provided for the Performer identifier parameter"
88
details:
99
coding:
10-
- code: "INVALID_NHS_NUMBER"
11-
display: "Performer identifier is invalid."
12-
system: "https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode"
13-
version: '1'
10+
- "system": "https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode"
11+
version: "1"
12+
code: "INVALID_IDENTIFIER_VALUE"
13+
display: "Provided value is invalid"
1414
severity: error
15-
resourceType: "OperationOutcome"
15+
resourceType: "OperationOutcome"

specification/validated-relationships-service-api.yaml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -503,15 +503,15 @@ paths:
503503
The sandbox supports a limited number of scenarios, and does not attempt to validate requests. The returned result is dependant on the `performer.identifier.value`.
504504
505505
See the postman collection for an example request body.
506-
| Scenario | Request | Response |
507-
| --------------------------------------- | ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
508-
| Successful parent-child proxy creation | Valid request with a legal basis of parental responsibility, with performer identifier value of 9000000009 | HTTP Status 201 and OperationOutcome response |
509-
| Successful adult-adult proxy creation | Valid request with legal basis of consent, with performer identifier value of 9000000017 | HTTP Status 201 and OperationOutcome response |
510-
| Invalid access level | Request with undefined access level code, with performer identifier value of 9000000025 | HTTP Status 403 and INVALID_ACCESS_LEVEL error response |
511-
| Invalid performer NHS number | Request with invalid NHS number format, with performer identifier value of 9000000000 | HTTP Status 422 and INVALID_NHS_NUMBER error response |
512-
| Missing required evidence | Request without evidence of responsibility, with performer identifier value of 9000000033 | HTTP Status 422 and MISSING_EVIDENCE error response |
513-
| Patient age validation failure | Request for child proxy where child is over 16, with performer identifier value of 9000000041 | HTTP Status 422 and INVALID_PATIENT_AGE error response |
514-
| Duplicate relationship | Request for relationship that already exists, with performer identifier value of 9000000049 | HTTP Status 409 and DUPLICATE_RELATIONSHIP error response |
506+
| Scenario | Request | Response |
507+
| --------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
508+
| Successful parent-child proxy creation | Valid request with a legal basis of parental responsibility, with performer identifier value of 9000000009 | HTTP Status 201 and OperationOutcome response |
509+
| Successful adult-adult proxy creation | Valid request with legal basis of consent, with performer identifier value of 9000000017 | HTTP Status 201 and OperationOutcome response |
510+
| Invalid access level | Request with undefined access level code, with performer identifier value of 9000000025 | HTTP Status 403 and INVALID_ACCESS_LEVEL error response |
511+
| Invalid performer NHS number | Request with invalid NHS number format, with performer identifier value of 9000000000 | HTTP Status 422 and INVALID_IDENTIFIER_VALUE error response |
512+
| Missing required evidence | Request without evidence of responsibility, with performer identifier value of 9000000033 | HTTP Status 422 and MISSING_EVIDENCE error response |
513+
| Patient age validation failure | Request for child proxy where child is over 16, with performer identifier value of 9000000041 | HTTP Status 422 and INVALID_PATIENT_AGE error response |
514+
| Duplicate relationship | Request for relationship that already exists, with performer identifier value of 9000000049 | HTTP Status 409 and DUPLICATE_RELATIONSHIP error response |
515515
516516
operationId: create-proxy-role
517517
parameters:
@@ -551,15 +551,22 @@ paths:
551551
552552
| HTTP status | Error code | Description |
553553
| ----------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
554+
| 400 | `MISSING_IDENTIFIER` | Missing performer or patient identifier. For details, see the `diagnostics` field. |
555+
| 400 | `MISSING_STATUS` | Missing status. |
556+
| 400 | `MISSING_SCOPE` | Missing scope. |
557+
| 400 | `MISSING_CATEGORY` | Missing category. |
558+
| 400 | `MISSING_DATETIME` | Missing datetime. |
554559
| 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. |
555560
| 403 | `FORBIDDEN` | Access denied to resource. |
556-
| 403 | `INVALID_ACCESS_LEVEL` | Invalid authorisation access level |
557561
| 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved |
558562
| 408 | `TIMEOUT` | Request timed out. |
559563
| 409 | `DUPLICATE_RELATIONSHIP` | Conflict with requested proxy role. |
560-
| 422 | `INVALID_NHS_NUMBER` | Invalid NHS number. |
561-
| 422 | `INVALID_PATIENT_AGE` | Patient age is invalid. |
562-
| 422 | `MISSING_EVIDENCE` | Evidence of responsibility is missing. |
564+
| 422 | `INVALID_IDENTIFIER` | Invalid performer or patient identifier. For details, see the `diagnostics` field. |
565+
| 422 | `INVALID_STATUS` | Invalid status. |
566+
| 422 | `INVALID_SCOPE` | Invalid scope. |
567+
| 422 | `INVALID_CATEGORY` | Invalid category. |
568+
| 422 | `INVALID_DATETIME` | Invalid datetime. |
569+
| 422 | `INVALID_VERIFICATION` | Invalid verification. For details, see the `diagnostics` field. |
563570
| 429 | `THROTTLED` | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
564571
565572
content:

0 commit comments

Comments
 (0)