You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scenario: Search for multiple DocumentReferences by NHS number
39
+
Scenario: Search for a DocumentReference by NHS Number and Custodian where both search parameters match
40
40
Given the application 'DataShare' (ID 'z00z-y11y-x22x') is registered to access the API
41
41
And the organisation 'RX898' is authorised to access pointer types:
42
42
| system | value |
43
43
| http://snomed.info/sct | 736253002 |
44
44
And a DocumentReference resource exists with values:
45
-
| property | value |
46
-
| id | 02V-1111111111-SearchMultipleRefTest1 |
47
-
| subject | 9278693472 |
48
-
| status | current |
49
-
| type | 736253002 |
50
-
| category | 734163000 |
51
-
| contentType | application/pdf |
52
-
| url | https://example.org/my-doc-1.pdf |
53
-
| custodian | 02V |
54
-
| author | 02V |
45
+
| property | value |
46
+
| id | 02V-1111111111-SearchDocRefTest |
47
+
| subject | 9278693472 |
48
+
| status | current |
49
+
| type | 736253002 |
50
+
| category | 734163000 |
51
+
| contentType | application/pdf |
52
+
| url | https://example.org/my-doc.pdf |
53
+
| custodian | 02V |
54
+
| author | 02V |
55
+
When consumer 'RX898' searches for DocumentReferences with parameters:
56
+
| parameter | value |
57
+
| subject | 9278693472 |
58
+
| custodian | 02V |
59
+
Then the response status code is 200
60
+
And the response is a searchset Bundle
61
+
And the Bundle has a self link matching 'DocumentReference?subject:identifier=https://fhir.nhs.uk/Id/nhs-number|9278693472&custodian:identifier=https://fhir.nhs.uk/Id/ods-organization-code|02V'
62
+
And the Bundle has a total of 1
63
+
And the Bundle has 1 entry
64
+
And the Bundle contains an DocumentReference with values
65
+
| property | value |
66
+
| id | 02V-1111111111-SearchDocRefTest |
67
+
| subject | 9278693472 |
68
+
| status | current |
69
+
| type | 736253002 |
70
+
| category | 734163000 |
71
+
| contentType | application/pdf |
72
+
| url | https://example.org/my-doc.pdf |
73
+
| custodian | 02V |
74
+
| author | 02V |
75
+
76
+
Scenario: Search for a DocumentReference by NHS Number and Custodian where Custodian filter matches one pointer from result set
77
+
Given the application 'DataShare' (ID 'z00z-y11y-x22x') is registered to access the API
78
+
And the organisation 'RX898' is authorised to access pointer types:
79
+
| system | value |
80
+
| http://snomed.info/sct | 736253002 |
55
81
And a DocumentReference resource exists with values:
56
-
| property | value|
57
-
| id | 02V-1111111111-SearchMultipleRefTest2 |
58
-
| subject | 9278693472|
59
-
| status | current|
60
-
| type | 736253002|
61
-
| category | 734163000|
62
-
| contentType | application/pdf|
63
-
| url | https://example.org/my-doc-2.pdf |
64
-
| custodian | 02V|
65
-
| author | 02V|
82
+
| property | value |
83
+
| id | 02V-1111111111-SearchDocRefTest |
84
+
| subject | 9278693472 |
85
+
| status | current |
86
+
| type | 736253002 |
87
+
| category | 734163000 |
88
+
| contentType | application/pdf |
89
+
| url | https://example.org/my-doc.pdf |
90
+
| custodian | 02V |
91
+
| author | 02V |
66
92
And a DocumentReference resource exists with values:
67
-
| property | value|
68
-
| id | 02V-1111111111-SearchMultipleRefTest3 |
69
-
| subject | 9278693472|
70
-
| status | current|
71
-
| type | 887701000000100 |
72
-
| category | 734163000|
73
-
| contentType | application/pdf|
74
-
| url | https://example.org/my-doc-3.pdf |
75
-
| custodian | 02V |
76
-
| author | 02V |
93
+
| property | value |
94
+
| id | DK94-1111111112-SearchDocRefTest |
95
+
| subject | 9278693472 |
96
+
| status | current |
97
+
| type | 736253002 |
98
+
| category | 734163000 |
99
+
| contentType | application/pdf |
100
+
| url | https://example.org/my-doc.pdf |
101
+
| custodian | DK94 |
102
+
| author | DK94 |
77
103
When consumer 'RX898' searches for DocumentReferences with parameters:
78
104
| parameter | value |
79
105
| subject | 9278693472 |
106
+
| custodian | 02V |
80
107
Then the response status code is 200
81
108
And the response is a searchset Bundle
82
-
And the Bundle has a self link matching 'DocumentReference?subject:identifier=https://fhir.nhs.uk/Id/nhs-number|9278693472'
83
-
And the Bundle has a total of 2
84
-
And the Bundle has 2 entries
109
+
And the Bundle has a self link matching 'DocumentReference?subject:identifier=https://fhir.nhs.uk/Id/nhs-number|9278693472&custodian:identifier=https://fhir.nhs.uk/Id/ods-organization-code|02V'
110
+
And the Bundle has a total of 1
111
+
And the Bundle has 1 entry
85
112
And the Bundle contains an DocumentReference with values
86
-
| property | value |
87
-
| id | 02V-1111111111-SearchMultipleRefTest1 |
88
-
| subject | 9278693472 |
89
-
| status | current |
90
-
| type | 736253002 |
91
-
| category | 734163000 |
92
-
| contentType | application/pdf |
93
-
| url | https://example.org/my-doc-1.pdf |
94
-
| custodian | 02V |
95
-
| author | 02V |
113
+
| property | value |
114
+
| id | 02V-1111111111-SearchDocRefTest |
115
+
| subject | 9278693472 |
116
+
| status | current |
117
+
| type | 736253002 |
118
+
| category | 734163000 |
119
+
| contentType | application/pdf |
120
+
| url | https://example.org/my-doc.pdf |
121
+
| custodian | 02V |
122
+
| author | 02V |
123
+
124
+
Scenario: Search for a DocumentReference by NHS Number and Custodian where NHS number filter matches one pointer from result set
125
+
Given the application 'DataShare' (ID 'z00z-y11y-x22x') is registered to access the API
126
+
And the organisation 'RX898' is authorised to access pointer types:
127
+
| system | value |
128
+
| http://snomed.info/sct | 736253002 |
129
+
And a DocumentReference resource exists with values:
130
+
| property | value |
131
+
| id | 02V-1111111111-SearchDocRefTest |
132
+
| subject | 9278693472 |
133
+
| status | current |
134
+
| type | 736253002 |
135
+
| category | 734163000 |
136
+
| contentType | application/pdf |
137
+
| url | https://example.org/my-doc.pdf |
138
+
| custodian | 02V |
139
+
| author | 02V |
140
+
And a DocumentReference resource exists with values:
141
+
| property | value |
142
+
| id | 02V-1111111112-SearchDocRefTest |
143
+
| subject | 9785146901 |
144
+
| status | current |
145
+
| type | 736253002 |
146
+
| category | 734163000 |
147
+
| contentType | application/pdf |
148
+
| url | https://example.org/my-doc.pdf |
149
+
| custodian | 02V |
150
+
| author | 02V |
151
+
When consumer 'RX898' searches for DocumentReferences with parameters:
152
+
| parameter | value |
153
+
| subject | 9278693472 |
154
+
| custodian | 02V |
155
+
Then the response status code is 200
156
+
And the response is a searchset Bundle
157
+
And the Bundle has a self link matching 'DocumentReference?subject:identifier=https://fhir.nhs.uk/Id/nhs-number|9278693472&custodian:identifier=https://fhir.nhs.uk/Id/ods-organization-code|02V'
158
+
And the Bundle has a total of 1
159
+
And the Bundle has 1 entry
96
160
And the Bundle contains an DocumentReference with values
97
-
| property | value |
98
-
| id | 02V-1111111111-SearchMultipleRefTest2 |
99
-
| subject | 9278693472 |
100
-
| status | current |
101
-
| type | 736253002 |
102
-
| category | 734163000 |
103
-
| contentType | application/pdf |
104
-
| url | https://example.org/my-doc-2.pdf |
105
-
| custodian | 02V |
106
-
| author | 02V |
107
-
And the Bundle does not contain a DocumentReference with ID '02V-1111111111-SearchMultipleRefTest3'
161
+
| property | value |
162
+
| id | 02V-1111111111-SearchDocRefTest |
163
+
| subject | 9278693472 |
164
+
| status | current |
165
+
| type | 736253002 |
166
+
| category | 734163000 |
167
+
| contentType | application/pdf |
168
+
| url | https://example.org/my-doc.pdf |
169
+
| custodian | 02V |
170
+
| author | 02V |
108
171
109
172
Scenario: Search for multiple DocumentReferences by NHS number
110
173
Given the application 'DataShare' (ID 'z00z-y11y-x22x') is registered to access the API
And the Bundle does not contain a DocumentReference with ID '02V-1111111111-SearchMultipleRefTest3'
177
241
178
-
# No pointers found
179
-
# Pointers exist but no permissions
180
-
# Search by custodian
242
+
Scenario: Search for a DocumentReference by NHS Number where 0 pointers are found
243
+
Given the application 'DataShare' (ID 'z00z-y11y-x22x') is registered to access the API
244
+
And the organisation 'DK94' is authorised to access pointer types:
245
+
| system | value |
246
+
| http://snomed.info/sct | 736253002 |
247
+
| http://snomed.info/sct | 861421000000109 |
248
+
And the organisation 'RX898' is authorised to access pointer types:
249
+
| system | value |
250
+
| http://snomed.info/sct | 736253002 |
251
+
| http://snomed.info/sct | 861421000000109 |
252
+
And a DocumentReference resource exists with values:
253
+
| property | value |
254
+
| id | DK94-111-DeleteDocRefTest1 |
255
+
| subject | 9278693472 |
256
+
| status | current |
257
+
| type | 861421000000109 |
258
+
| category | 734163000 |
259
+
| contentType | application/pdf |
260
+
| url | https://example.org/my-doc.pdf |
261
+
| custodian | DK94 |
262
+
| author | N64 |
263
+
When producer 'DK94' requests to delete DocumentReference with id 'DK94-111-DeleteDocRefTest1'
264
+
And consumer 'RX898' searches for DocumentReferences with parameters:
265
+
| parameter | value |
266
+
| subject | 9278693472 |
267
+
| custodian | RX898 |
268
+
Then the response status code is 200
269
+
And the response is a searchset Bundle
270
+
And the Bundle has a self link matching 'DocumentReference?subject:identifier=https://fhir.nhs.uk/Id/nhs-number|9278693472&custodian:identifier=https://fhir.nhs.uk/Id/ods-organization-code|RX898'
271
+
And the Bundle has a total of 0
272
+
And the Bundle has 0 entry
273
+
274
+
# No pointers found - done
275
+
# Pointers exist but no permissions - covered in failure scenarios
0 commit comments