Skip to content

Commit 2751e7f

Browse files
simonsteadellie-bound1-NHSD
authored andcommitted
POST and PATCH specifications for /Consent API
1 parent b0852c8 commit 2751e7f

File tree

7 files changed

+766
-238
lines changed

7 files changed

+766
-238
lines changed

.github/pull_request_template.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
# Pull Request Checklist
1+
# Pull Request
2+
3+
<!--
4+
Stages to complete before opening the Pull Request:
5+
- PR title should be formatted in the following structure `NPA-XXXXX: title abc`
6+
- Added yourself/others as Assignees
7+
- Added the correct labels
8+
- Add Jira ticket link in the Ticket Link section below
9+
-->
210

311
## Ticket Link
412

manifest_template.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ APIGEE_ENVIRONMENTS:
1111
- name: internal-qa
1212
display_name: Internal QA
1313
has_mock_auth: true
14-
rate_limit: 300
14+
rate_limit: 600
1515
spike_rate_limit: 600pm # 10 requests per second
1616
approval_type: auto
1717
- name: internal-dev-sandbox
@@ -24,7 +24,7 @@ APIGEE_ENVIRONMENTS:
2424
display_name: Internal QA
2525
has_mock_auth: true
2626
portal_visibility: false
27-
rate_limit: 300
27+
rate_limit: 600
2828
spike_rate_limit: 600pm # 10 requests per second
2929
approval_type: auto
3030
- name: internal-qa-sandbox
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)