Skip to content

Commit f1fb8bc

Browse files
NPA-4313: Add examples for POST and PATCH Consent responses
1 parent df17428 commit f1fb8bc

File tree

5 files changed

+244
-92
lines changed

5 files changed

+244
-92
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
PatchConsentInvalidPatchFormatError:
2+
summary: Bad request format is invalid
3+
description: 400 error response bundle for a malformed JSON patch document
4+
value:
5+
issue:
6+
- code: invalid
7+
diagnostics: "Malformed JSON patch document."
8+
details:
9+
coding:
10+
- code: "INVALID_PATCH_FORMAT"
11+
display: "Request format is invalid."
12+
system: "https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode"
13+
version: '1'
14+
severity: error
15+
resourceType: "OperationOutcome"
16+
PatchConsentInvalidPathError:
17+
summary: Bad request path is invalid
18+
description: 400 error response bundle for patch targeting non-existent element
19+
value:
20+
issue:
21+
- code: invalid
22+
diagnostics: "Patch targeting non-existent element."
23+
details:
24+
coding:
25+
- code: "INVALID_PATCH_PATH"
26+
display: "Patch target is invalid."
27+
system: "https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode"
28+
version: '1'
29+
severity: error
30+
resourceType: "OperationOutcome"
31+
PatchConsentInvalidStatusCodeError:
32+
summary: Bad request invalid status code
33+
description: 422 error response bundle for a request with an invalid status code
34+
value:
35+
issue:
36+
- code: invalid
37+
diagnostics: "Invalid status code."
38+
details:
39+
coding:
40+
- code: "INVALID_STATUS_CODE"
41+
display: "Status code is invalid."
42+
system: "https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode"
43+
version: '1'
44+
severity: error
45+
resourceType: "OperationOutcome"
46+
PatchConsentInvalidStateTransitionError:
47+
summary: Bad request invalid state transition
48+
description: 422 error response bundle for a request with an invalid state transition
49+
value:
50+
issue:
51+
- code: invalid
52+
diagnostics: "Patch attempting invalid status change."
53+
details:
54+
coding:
55+
- code: "INVALID_STATE_TRANSITION"
56+
display: "Status change is invalid."
57+
system: "https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode"
58+
version: '1'
59+
severity: error
60+
resourceType: "OperationOutcome"
61+
PatchConsentRelationshipNotFoundError:
62+
summary: Bad request for proxy role that ais not found
63+
description: 404 error response bundle for proxy role that is not found
64+
value:
65+
issue:
66+
- code: invalid
67+
diagnostics: "Proxy role not found."
68+
details:
69+
coding:
70+
- code: "RESOURCE_NOT_FOUND"
71+
display: "Request must be for a existing proxy role."
72+
system: "https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode"
73+
version: '1'
74+
severity: error
75+
resourceType: "OperationOutcome"
76+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
PatchConsentSuccess:
2+
summary: Success
3+
description: A sample of the payload returned when a proxy role has been successfully updated
4+
value:
5+
resourceType: "OperationOutcome"
6+
issue:
7+
- severity: information
8+
code: informational
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
PostConsentInvalidPerformerIdentifierError:
2+
summary: Bad request performer identifier invalid
3+
description: 400 error response bundle for an invalid performer NHS number
4+
value:
5+
issue:
6+
- code: invalid
7+
diagnostics: "Performer identifier is not a valid NHS number."
8+
details:
9+
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'
14+
severity: error
15+
resourceType: "OperationOutcome"
16+
PostConsentInvalidAccessLevelError:
17+
summary: Bad request access level code invalid
18+
description: 400 error response bundle for an invalid access level code
19+
value:
20+
issue:
21+
- code: invalid
22+
diagnostics: "Access Level Code is not a valid."
23+
details:
24+
coding:
25+
- code: "INVALID_ACCESS_LEVEL"
26+
display: "Access Level is invalid."
27+
system: "https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode"
28+
version: '1'
29+
severity: error
30+
resourceType: "OperationOutcome"
31+
PostConsentInvalidEvidenceError:
32+
summary: Bad request missing evidence of responsibility
33+
description: 422 error response bundle for a request without evidence of responsibility
34+
value:
35+
issue:
36+
- code: invalid
37+
diagnostics: "Missing evidence of responsibility."
38+
details:
39+
coding:
40+
- code: "MISSING_EVIDENCE"
41+
display: "Evidence of Responsibility is required."
42+
system: "https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode"
43+
version: '1'
44+
severity: error
45+
resourceType: "OperationOutcome"
46+
PostConsentInvalidPatientAgeError:
47+
summary: Bad request invalid patient age
48+
description: 422 error response bundle for a request with an invalid patient age
49+
value:
50+
issue:
51+
- code: invalid
52+
diagnostics: "Patient age failed business validation."
53+
details:
54+
coding:
55+
- code: "MISSING_EVIDENCE"
56+
display: "Patient age is invalid."
57+
system: "https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode"
58+
version: '1'
59+
severity: error
60+
resourceType: "OperationOutcome"
61+
PostConsentDuplicateRelationshipError:
62+
summary: Bad request for proxy role that already exists
63+
description: 409 error response bundle for a duplicate proxy role
64+
value:
65+
issue:
66+
- code: invalid
67+
diagnostics: "Proxy role already exists."
68+
details:
69+
coding:
70+
- code: "DUPLICATE_RELATIONSHIP"
71+
display: "Request must be for a new proxy role."
72+
system: "https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode"
73+
version: '1'
74+
severity: error
75+
resourceType: "OperationOutcome"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
PostConsentSuccess:
2+
summary: Success
3+
description: A sample of the payload returned when a proxy role has been successfully created
4+
value:
5+
resourceType: "OperationOutcome"
6+
issue:
7+
- severity: information
8+
code: informational

0 commit comments

Comments
 (0)