Skip to content

Commit 0092e61

Browse files
authored
Merge pull request #109 from NHSDigital/NPA-3543_add_consent_endpoint_to_OAS
NPA-3543: add initial /Consent endpoint and associated schema refactoring
2 parents 7ae3a48 + bfdad35 commit 0092e61

File tree

15 files changed

+1592
-354
lines changed

15 files changed

+1592
-354
lines changed

.editorconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ indent_size = 2
1717
[*.postman_collection.json]
1818
indent_style = tab
1919

20-
[*.yaml]
21-
trim_trailing_whitespace = false
22-
2320
[*.js]
2421
ij_javascript_force_semicolon_style = true
2522
ij_javascript_use_semicolon_after_statement = false
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
QuestionnaireResponseAdultNominatesAdultRequest:
2+
summary: Adult nominates Adult access request
3+
description: |
4+
Example proxy access request from an adult (Jill) with NHS number `9000000006` nominating her husband (Tom) with NHS number `9000000005` to act on her behalf.
5+
6+
Significant things to point out:
7+
8+
- `source.type` should be `Patient` when a patient is nominating a proxy
9+
- `source.identifier.value` should be the NHS number of the user completing the form - this should correlate with the Identity token in the request
10+
- `subject.type` should be `Patient` since it is the patient that is the subject of the application
11+
- `subject.identifier.value` should be the NHS Number of the patient to which the application relates
12+
- `relatedPerson` demographics are present in the request as a result of being provided by the applicant
13+
value:
14+
resourceType: QuestionnaireResponse
15+
status: "completed"
16+
authored: "2024-07-15T09:43:03.280Z"
17+
source:
18+
type: "Patient"
19+
identifier:
20+
system: "https://fhir.nhs.uk/Id/nhs-number"
21+
value: "9000000006"
22+
subject:
23+
type: "Patient"
24+
identifier:
25+
system: "https://fhir.nhs.uk/Id/nhs-number"
26+
value: "9000000006"
27+
questionnaire: "https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1"
28+
item:
29+
- linkId: "relatedPerson"
30+
text: "Proxy details"
31+
item:
32+
- linkId: "relatedPerson_identifier"
33+
text: "NHS number"
34+
answer:
35+
- valueString: "9000000005"
36+
- linkId: "relatedPerson_name"
37+
text: "Name"
38+
item:
39+
- linkId: "relatedPerson_name_first"
40+
text: "First name"
41+
answer:
42+
- valueString: "Tom"
43+
- linkId: "relatedPerson_name_family"
44+
text: "Last name"
45+
answer:
46+
- valueString: "Jones"
47+
- linkId: "relatedPerson_birthDate"
48+
text: "Date of birth"
49+
answer:
50+
- valueDate: "1970-07-12"
51+
- linkId: "relatedPerson_basisForAccess"
52+
text: "Basis for Access"
53+
answer:
54+
- valueCoding:
55+
system: "https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole"
56+
code: "Personal"
57+
display: "Personal relationship with the patient"
58+
- linkId: "relatedPerson_relationship"
59+
text: "Relationship"
60+
answer:
61+
- valueCoding:
62+
system: "http://terminology.hl7.org/CodeSystem/v3-RoleCode"
63+
code: "SPS"
64+
display: "Spouse"
65+
- linkId: "patient"
66+
text: "Patient details"
67+
item:
68+
- linkId: "patient_identifier"
69+
text: "NHS number"
70+
answer:
71+
- valueString: "9000000006"
72+
- linkId: "requestedAccess"
73+
text: "Requested access"
74+
item:
75+
- linkId: "requestedAccess_accessLevel"
76+
text: "Requested access level"
77+
answer:
78+
- valueCoding:
79+
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess"
80+
code: "APPT"
81+
display: "Appointment Booking"
82+
- valueCoding:
83+
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess"
84+
code: "VACC"
85+
display: "Vaccination Records"
86+
- linkId: "requestedAccess_reasonsForAccess"
87+
text: "Reason for access"
88+
answer:
89+
- valueCoding:
90+
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess"
91+
code: "PRAC"
92+
display: "Practical Reasons"
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
QuestionnaireResponseAdultToAdultWithCapacityRequest:
2+
summary: Adult > Adult (with capacity) access request
3+
description: |
4+
Example proxy access request from an adult (Tom) with NHS number `9000000005` requesting access to act on behalf of his wife (Jill) with NHS number `9000000006`.
5+
6+
Significant details to point out:
7+
8+
- `source.type` should be `RelatedPerson` when a proxy is applying
9+
- `source.identifier.value` should be the NHS number of the user completing the form - this should correlate with the Identity token in the request
10+
- `subject.type` should be `Patient` since it is the patient that is the subject of the application
11+
- `subject.identifier.value` should be the NHS Number of the patient to which the application relates
12+
- `patient` demographics are present in the request as a result of being provided by the applicant
13+
value:
14+
resourceType: QuestionnaireResponse
15+
status: "completed"
16+
authored: "2024-07-15T09:43:03.280Z"
17+
source:
18+
type: "RelatedPerson"
19+
identifier:
20+
system: "https://fhir.nhs.uk/Id/nhs-number"
21+
value: "9000000005"
22+
subject:
23+
type: "Patient"
24+
identifier:
25+
system: "https://fhir.nhs.uk/Id/nhs-number"
26+
value: "9000000006"
27+
questionnaire: "https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1"
28+
item:
29+
- linkId: "relatedPerson"
30+
text: "Proxy details"
31+
item:
32+
- linkId: "relatedPerson_identifier"
33+
text: "NHS number"
34+
answer:
35+
- valueString: "9000000005"
36+
- linkId: "relatedPerson_basisForAccess"
37+
text: "Basis for Access"
38+
answer:
39+
- valueCoding:
40+
system: "https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole"
41+
code: "Personal"
42+
display: "Personal relationship with the patient"
43+
- linkId: "relatedPerson_relationship"
44+
text: "Relationship"
45+
answer:
46+
- valueCoding:
47+
system: "http://terminology.hl7.org/CodeSystem/v3-RoleCode"
48+
code: "SPS"
49+
display: "Spouse"
50+
- linkId: "patient"
51+
text: "Patient details"
52+
item:
53+
- linkId: "patient_identifier"
54+
text: "NHS number"
55+
answer:
56+
- valueString: "9000000006"
57+
- linkId: "patient_name"
58+
text: "Name"
59+
item:
60+
- linkId: "patient_name_first"
61+
text: "First name"
62+
answer:
63+
- valueString: "Jill"
64+
- linkId: "patient_name_family"
65+
text: "Last name"
66+
answer:
67+
- valueString: "Jones"
68+
- linkId: "patient_birthDate"
69+
text: "Date of birth"
70+
answer:
71+
- valueDate: "1965-01-01"
72+
- linkId: "requestedAccess"
73+
text: "Requested access"
74+
item:
75+
- linkId: "requestedAccess_accessLevel"
76+
text: "Requested access level"
77+
answer:
78+
- valueCoding:
79+
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess"
80+
code: "APPT"
81+
display: "Appointment Booking"
82+
- valueCoding:
83+
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess"
84+
code: "VACC"
85+
display: "Vaccination Records"
86+
- linkId: "requestedAccess_reasonsForAccess"
87+
text: "Reason for access"
88+
answer:
89+
- valueCoding:
90+
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess"
91+
code: "PRAC"
92+
display: "Practical Reasons"
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
QuestionnaireResponseAdultToAdultWithoutCapacityRequest:
2+
summary: Adult > Adult (without capacity) access request
3+
description: |
4+
Example proxy access request from an adult (Danny) with NHS number `9876543210` requesting access to act on behalf of an elderly parent (Florence) without capacity wth NHS number `9000000008`.
5+
6+
Significant details to point out:
7+
8+
- `source.type` should be `RelatedPerson` when a proxy is applying
9+
- `source.identifier.value` should be the NHS number of the user completing the form - this should correlate with the Identity token in the request
10+
- `subject.type` should be `Patient` since it is the patient that is the subject of the application
11+
- `subject.identifier.value` should be the NHS Number of the patient to which the application relates
12+
- `patient` demographics are present in the request as a result of being provided by the applicant
13+
value:
14+
resourceType: QuestionnaireResponse
15+
status: "completed"
16+
authored: "2024-07-15T09:43:03.280Z"
17+
source:
18+
type: "RelatedPerson"
19+
identifier:
20+
system: "https://fhir.nhs.uk/Id/nhs-number"
21+
value: "9876543210"
22+
subject:
23+
type: "Patient"
24+
identifier:
25+
system: "https://fhir.nhs.uk/Id/nhs-number"
26+
value: "9000000008"
27+
questionnaire: "https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1"
28+
item:
29+
- linkId: "relatedPerson"
30+
text: "Proxy details"
31+
item:
32+
- linkId: "relatedPerson_identifier"
33+
text: "NHS number"
34+
answer:
35+
- valueString: "9876543210"
36+
- linkId: "relatedPerson_basisForAccess"
37+
text: "Basis for Access"
38+
answer:
39+
- valueCoding:
40+
system: "https://fhir.nhs.uk/STU3/CodeSystem/RARecord-ProxyRole-1"
41+
code: "002"
42+
display: "Best interest decision made on behalf of the patient (Mental Capacity Act 2005)"
43+
- linkId: "relatedPerson_relationship"
44+
text: "Relationship"
45+
answer:
46+
- valueCoding:
47+
system: "http://terminology.hl7.org/CodeSystem/v3-RoleCode"
48+
code: "CHILD"
49+
display: "Child"
50+
- linkId: "patient"
51+
text: "Patient details"
52+
item:
53+
- linkId: "patient_identifier"
54+
text: "NHS number"
55+
answer:
56+
- valueString: "9000000008"
57+
- linkId: "patient_name"
58+
text: "Name"
59+
item:
60+
- linkId: "patient_name_first"
61+
text: "First name"
62+
answer:
63+
- valueString: "Florence"
64+
- linkId: "patient_name_family"
65+
text: "Last name"
66+
answer:
67+
- valueString: "Smith"
68+
- linkId: "patient_birthDate"
69+
text: "Date of birth"
70+
answer:
71+
- valueDate: "1935-01-02"
72+
- linkId: "requestedAccess"
73+
text: "Requested access"
74+
item:
75+
- linkId: "requestedAccess_accessLevel"
76+
text: "Requested access level"
77+
answer:
78+
- valueCoding:
79+
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess"
80+
code: "APPT"
81+
display: "Appointment Booking"
82+
- valueCoding:
83+
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess"
84+
code: "VACC"
85+
display: "Vaccination Records"
86+
- linkId: "requestedAccess_reasonsForAccess"
87+
text: "Reason for access"
88+
answer:
89+
- valueCoding:
90+
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess"
91+
code: "TECH"
92+
display: "Technical Barriers"

0 commit comments

Comments
 (0)