Skip to content

Commit dfbe085

Browse files
committed
NPA-4922 Add Multiple Relationships with Single Patient Example
1 parent c8ffcec commit dfbe085

File tree

2 files changed

+131
-21
lines changed

2 files changed

+131
-21
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
ConsentMultipleRelationshipsSinglePatientBundle:
2+
summary: Multiple relationships (multiple proxy relationships with single patient)
3+
description: A Bundle containing multiple proxy relationships with single patient.
4+
value:
5+
resourceType: Bundle
6+
timestamp: '2020-08-26T14:00:00+00:00'
7+
total: 3
8+
type: searchset
9+
entry:
10+
- fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9
11+
resource:
12+
resourceType: Consent
13+
id: BBCC67E9
14+
status: active
15+
scope:
16+
coding:
17+
- system: 'http://terminology.hl7.org/CodeSystem/consentscope'
18+
code: patient-privacy
19+
display: Privacy Consent
20+
text: Patient Privacy Consent
21+
category:
22+
- coding:
23+
- system: 'http://terminology.hl7.org/CodeSystem/v3-ActCode'
24+
code: INFA
25+
display: Information Access
26+
text: Information Access Consent
27+
patient:
28+
identifier:
29+
system: 'https://fhir.nhs.uk/Id/nhs-number'
30+
value: '9000000100'
31+
dateTime: '2024-07-21T17:32:28Z'
32+
performer:
33+
- identifier:
34+
system: 'https://fhir.nhs.uk/Id/nhs-number'
35+
value: '9000000020'
36+
search:
37+
mode: match
38+
- fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1
39+
resource:
40+
resourceType: Consent
41+
id: WWCC67T1
42+
status: active
43+
scope:
44+
coding:
45+
- system: 'http://terminology.hl7.org/CodeSystem/consentscope'
46+
code: patient-privacy
47+
display: Privacy Consent
48+
text: Patient Privacy Consent
49+
category:
50+
- coding:
51+
- system: 'http://terminology.hl7.org/CodeSystem/v3-ActCode'
52+
code: INFA
53+
display: Information Access
54+
text: Information Access Consent
55+
patient:
56+
identifier:
57+
system: 'https://fhir.nhs.uk/Id/nhs-number'
58+
value: '9000000100'
59+
dateTime: '2024-07-21T17:32:28Z'
60+
performer:
61+
- identifier:
62+
system: 'https://fhir.nhs.uk/Id/nhs-number'
63+
value: '9000000021'
64+
verification:
65+
- verified: true
66+
verifiedWith:
67+
identifier:
68+
system: 'https://fhir.nhs.uk/Id/nhs-number'
69+
value: '9000000005'
70+
verificationDate: '2024-07-21T17:32:28Z'
71+
search:
72+
mode: match
73+
- fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1
74+
resource:
75+
resourceType: Consent
76+
id: AATD11A1
77+
status: inactive
78+
scope:
79+
coding:
80+
- system: 'http://terminology.hl7.org/CodeSystem/consentscope'
81+
code: patient-privacy
82+
display: Privacy Consent
83+
text: Patient Privacy Consent
84+
category:
85+
- coding:
86+
- system: 'http://terminology.hl7.org/CodeSystem/v3-ActCode'
87+
code: INFA
88+
display: Information Access
89+
text: Information Access Consent
90+
patient:
91+
identifier:
92+
system: 'https://fhir.nhs.uk/Id/nhs-number'
93+
value: '9000000100'
94+
dateTime: '2024-07-21T17:32:28Z'
95+
performer:
96+
- identifier:
97+
system: 'https://fhir.nhs.uk/Id/nhs-number'
98+
value: '9000000022'
99+
verification:
100+
- verified: true
101+
verifiedWith:
102+
identifier:
103+
system: 'https://fhir.nhs.uk/Id/nhs-number'
104+
value: '9000000006'
105+
verificationDate: '2024-07-21T17:32:28Z'
106+
search:
107+
mode: match

specification/validated-relationships-service-api.yaml

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -447,27 +447,28 @@ paths:
447447
448448
## Sandbox test scenarios
449449
450-
| Scenario | Request | Response |
451-
| -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------| ------------------------------------------------------------------------------------------------------------------|
452-
| Multiple proxy relationships filtered by 'active' status including details | `performer:identifier`=`9000000017` and `_include` = `Consent:patient` and `_include` = `Consent:proxy` and `status`=`active` | HTTP Status 200 Bundle containing a multiple active proxy relationships including performer and patient details |
453-
| Multiple proxy relationships filtered by 'inactive' status | `performer:identifier`=`9000000017` and `status`=`inactive` | HTTP Status 200 Bundle containing a multiple inactive proxy relationships |
454-
| Multiple proxy relationships filtered by 'proposed' and 'active' status | `performer:identifier`=`9000000017` and `status`=`proposed,active` | HTTP Status 200 Bundle containing a multiple proposed and active proxy relationships |
455-
| Multiple proxy relationships without filtering and details | `performer:identifier`=`9000000022` | HTTP Status 200 Bundle containing a multiple proxy relationships without details |
456-
| Multiple proxy relationships including performer details | `performer:identifier`=`9000000022` and `_include` = `Consent:performer` | HTTP Status 200 Bundle containing a multiple proxy relationships including performer details |
457-
| Multiple proxy relationships including patient details | `performer:identifier`=`9000000022` and `_include` = `Consent:patient` | HTTP Status 200 Bundle containing a multiple proxy relationships including patient details |
458-
| Multiple proxy relationships including performer and patient details | `performer:identifier`=`9000000022` and `_include` = `Consent:patient` and `_include` = `Consent:proxy` | HTTP Status 200 Bundle containing a multiple proxy relationships including performer and patient details |
459-
| No proxy relationships | `performer:identifier`=`9000000025` and `_include` = `Consent:patient` and `_include` = `Consent:proxy` and `status` = `active` | HTTP Status 200 empty bundle |
460-
| A single proxy relationship between consenting adults | `performer:identifier`=`9000000010` and/or `patient:identifier`=`9000000005` | HTTP Status 200 Bundle containing a single proxy relationship |
461-
| A single proxy relationship between consenting adults including details | `performer:identifier`=`9000000010` and/or `patient:identifier`=`9000000005` and `_include` = `Consent:patient` and `_include` = `Consent:proxy` | HTTP Status 200 Bundle containing a single proxy relationship including performer and patient details |
462-
| A single proxy relationship between a mother and child | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` | HTTP Status 200 Bundle containing a single proxy relationship |
463-
| A single proxy relationship between a mother and child including details | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` and `_include` = `Consent:patient` and `_include` = `Consent:proxy` | HTTP Status 200 Bundle containing a single proxy relationship including performer and patient details |
464-
| Invalid status parameter | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` and `status` = `test` | HTTP Status 422 and INVALID_VALUE error response |
465-
| Invalid include parameter | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` and `_include` = `test` | HTTP Status 422 and INVALID_VALUE error response |
466-
| Missing identifier | `patient:identifier`=`9000000009` | HTTP Status 400 and MISSING_IDENTIFIER_VALUE error response |
467-
| Invalid identifier | `identifier`=`900000000` Note: This identifier is 9 characters long, too short to be NHS Number | HTTP Status 422 and INVALID_IDENTIFIER_VALUE error response |
468-
| Invalid identifier system | `identifier`=`https://fhir.nhs.uk/Id/nhs-number/9730675929` | HTTP Status 422 and INVALID_IDENTIFIER_SYSTEM error response |
469-
| No performer record found | `identifier`=`9000000999` | HTTP Status 404 and INVALIDATED_RESOURCE error response |
470-
| GP Practice not found | `identifier`=`9000000012` | HTTP Status 404 and GP_PRACTICE_NOT_FOUND error response |
450+
| Scenario | Request | Response |
451+
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
452+
| Multiple proxy relationships filtered by 'active' status including details | `performer:identifier`=`9000000017` and `_include` = `Consent:patient` and `_include` = `Consent:proxy` and `status`=`active` | HTTP Status 200 Bundle containing a multiple active proxy relationships including performer and patient details |
453+
| Multiple proxy relationships filtered by 'inactive' status | `performer:identifier`=`9000000017` and `status`=`inactive` | HTTP Status 200 Bundle containing a multiple inactive proxy relationships |
454+
| Multiple proxy relationships filtered by 'proposed' and 'active' status | `performer:identifier`=`9000000017` and `status`=`proposed,active` | HTTP Status 200 Bundle containing a multiple proposed and active proxy relationships |
455+
| Multiple proxy relationships without filtering and details | `performer:identifier`=`9000000022` | HTTP Status 200 Bundle containing a multiple proxy relationships without details |
456+
| Multiple proxy relationships including performer details | `performer:identifier`=`9000000022` and `_include` = `Consent:performer` | HTTP Status 200 Bundle containing a multiple proxy relationships including performer details |
457+
| Multiple proxy relationships including patient details | `performer:identifier`=`9000000022` and `_include` = `Consent:patient` | HTTP Status 200 Bundle containing a multiple proxy relationships including patient details |
458+
| Multiple proxy relationships including performer and patient details | `performer:identifier`=`9000000022` and `_include` = `Consent:patient` and `_include` = `Consent:proxy` | HTTP Status 200 Bundle containing a multiple proxy relationships including performer and patient details |
459+
| Multiple proxy relationships, single patient | `patient:identifier`=`9000000100` | HTTP Status 200 Bundle containing a multiple proxy relationships including performer and patient details |
460+
| No proxy relationships | `performer:identifier`=`9000000025` and `_include` = `Consent:patient` and `_include` = `Consent:proxy` and `status` = `active` | HTTP Status 200 empty bundle |
461+
| A single proxy relationship between consenting adults | `performer:identifier`=`9000000010` and/or `patient:identifier`=`9000000005` | HTTP Status 200 Bundle containing a single proxy relationship |
462+
| A single proxy relationship between consenting adults including details | `performer:identifier`=`9000000010` and/or `patient:identifier`=`9000000005` and `_include` = `Consent:patient` and `_include` = `Consent:proxy` | HTTP Status 200 Bundle containing a single proxy relationship including performer and patient details |
463+
| A single proxy relationship between a mother and child | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` | HTTP Status 200 Bundle containing a single proxy relationship |
464+
| A single proxy relationship between a mother and child including details | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` and `_include` = `Consent:patient` and `_include` = `Consent:proxy` | HTTP Status 200 Bundle containing a single proxy relationship including performer and patient details |
465+
| Invalid status parameter | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` and `status` = `test` | HTTP Status 422 and INVALID_VALUE error response |
466+
| Invalid include parameter | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` and `_include` = `test` | HTTP Status 422 and INVALID_VALUE error response |
467+
| Missing identifier | `patient:identifier`=`9000000009` | HTTP Status 400 and MISSING_IDENTIFIER_VALUE error response |
468+
| Invalid identifier | `identifier`=`900000000` Note: This identifier is 9 characters long, too short to be NHS Number | HTTP Status 422 and INVALID_IDENTIFIER_VALUE error response |
469+
| Invalid identifier system | `identifier`=`https://fhir.nhs.uk/Id/nhs-number/9730675929` | HTTP Status 422 and INVALID_IDENTIFIER_SYSTEM error response |
470+
| No performer record found | `identifier`=`9000000999` | HTTP Status 404 and INVALIDATED_RESOURCE error response |
471+
| GP Practice not found | `identifier`=`9000000012` | HTTP Status 404 and GP_PRACTICE_NOT_FOUND error response |
471472
472473
### Sandbox constraints
473474
- Headers are not tested. `X-IM1-Connection-Params`, `X-Request-ID` and `X-Correlation-ID` are disregarded.
@@ -514,6 +515,8 @@ paths:
514515
$ref: "./examples/responses/GET_Consent/single-mother-child-relationship.yaml#/ConsentSingleAdultChildRelationshipBundle"
515516
ConsentSingleAdultChildRelationshipIncludePerformerPatientBundle:
516517
$ref: "./examples/responses/GET_Consent/single-mother-child-relationship-include-performer-patient.yaml#/ConsentSingleAdultChildRelationshipIncludePerformerPatientBundle"
518+
ConsentMultipleRelationshipsSinglePatientBundle:
519+
$ref: "./examples/responses/GET_Consent/multiple-relationships-single-patient.yaml#/ConsentMultipleRelationshipsSinglePatientBundle"
517520

518521
"4XX":
519522
description: |

0 commit comments

Comments
 (0)