Skip to content

Commit 0cf48d3

Browse files
Merge pull request #1911 from NHSDigital/feature/file-size-r1
Feature/file size r1
2 parents 4de6578 + 2703b6f commit 0cf48d3

File tree

143 files changed

+3932
-563
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+3932
-563
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<AssignMessage async="false" continueOnError="false" enabled="true" name="AssignMessage.AddBaseUrlHeader">
2+
<Set>
3+
<Headers>
4+
<Header name="x-ers-sandbox-baseurl">https://{request.header.Host}/{proxy.basepath}</Header>
5+
</Headers>
6+
</Set>
7+
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
8+
<AssignTo createNew="false"/>
9+
</AssignMessage>

proxies/sandbox/apiproxy/targets/sandbox.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
<Response/>
88
</PostFlow>
99
<PreFlow name="PreFlow">
10-
<Request/>
11-
<Response></Response>
10+
<Request>
11+
<Step>
12+
<Name>AssignMessage.AddBaseUrlHeader</Name>
13+
</Step>
14+
</Request>
15+
<Response/>
1216
</PreFlow>
1317
<HTTPTargetConnection>{{ HOSTED_TARGET_CONNECTION }}</HTTPTargetConnection>
1418
</TargetEndpoint>

sandbox/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM node:18.3.0-alpine3.14
22

3-
ENV npm_config_cache /home/node/app/.npm
3+
ENV npm_config_cache=/home/node/app/.npm
44

55
WORKDIR /app
66

sandbox/src/app.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,24 @@ const Inert = require('@hapi/inert')
44
const process = require('process')
55
const routes = require('./routes')
66

7+
/*
8+
The purpose of this logic is to mirror the transformations the API proxy currently applies to responses.
9+
This allows the sandbox to have the same behaviour locally.
10+
*/
711
const addCommonHeaders = function (request, response) {
812
// if a response doesn't include any headers provide an empty object to allow for the common headers to be appended.
913
if (!response.headers) {
1014
response.headers = {}
1115
}
1216

17+
// API proxy always adds x-correlation-id to responses.
1318
if (request.headers["x-correlation-id"]) {
1419
response.headers["X-Correlation-ID"] = request.headers["x-correlation-id"]
1520
}
16-
response.headers["X-Request-ID"] = '58621d65-d5ad-4c3a-959f-0438e355990e-1'
21+
22+
if (!request.path.includes("/ObjectStore")) {
23+
response.headers["X-Request-ID"] = '58621d65-d5ad-4c3a-959f-0438e355990e-1'
24+
}
1725
}
1826

1927
const preResponse = function (request, h) {
23.1 KB
Binary file not shown.

sandbox/src/mocks/stu3/acceptReferral/responses/ExampleResponse.json

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,32 @@
249249
"value": "103264992985"
250250
}
251251
}
252+
},
253+
{
254+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1",
255+
"valueCoding":
256+
{
257+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1",
258+
"code": "AVAILABLE"
259+
}
260+
},
261+
{
262+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1",
263+
"valueReference": {
264+
"identifier": {
265+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
266+
"value": "R69"
267+
}
268+
}
269+
},
270+
{
271+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1",
272+
"valueReference": {
273+
"identifier": {
274+
"system": "http://fhir.nhs.net/Id/sds-user-id",
275+
"value": "021600556111"
276+
}
277+
}
252278
}
253279
],
254280
"contentType": "image/png",
@@ -282,5 +308,11 @@
282308
"reference": "#DocumentReference-70000"
283309
}
284310
],
285-
"intent": "plan"
311+
"intent": "plan",
312+
"identifier":[
313+
{
314+
"system":"https://fhir.nhs.uk/Id/ers-request-id",
315+
"value":"r.c18c4ec4-7d0a-480e-8506-347e0ec228b0"
316+
}
317+
]
286318
}

sandbox/src/mocks/stu3/cancelAppointmentActionLater/responses/MinimalExampleDBS.json

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,33 @@
249249
"value": "103264992985"
250250
}
251251
}
252-
}
252+
},
253+
{
254+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1",
255+
"valueCoding":
256+
{
257+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1",
258+
"code": "AVAILABLE"
259+
}
260+
},
261+
{
262+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1",
263+
"valueReference": {
264+
"identifier": {
265+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
266+
"value": "R69"
267+
}
268+
}
269+
},
270+
{
271+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1",
272+
"valueReference": {
273+
"identifier": {
274+
"system": "http://fhir.nhs.net/Id/sds-user-id",
275+
"value": "021600556111"
276+
}
277+
}
278+
}
253279
],
254280
"contentType": "image/png",
255281
"url": "Binary/857b901d-1491-47d3-90e2-6c9f13f744dc",
@@ -282,5 +308,11 @@
282308
"reference": "#DocumentReference-70000"
283309
}
284310
],
285-
"intent": "plan"
311+
"intent": "plan",
312+
"identifier":[
313+
{
314+
"system":"https://fhir.nhs.uk/Id/ers-request-id",
315+
"value":"r.c18c4ec4-7d0a-480e-8506-347e0ec228b0"
316+
}
317+
]
286318
}

sandbox/src/mocks/stu3/cancelAppointmentActionLater/responses/MinimalExampleIBS.json

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,24 @@
240240
"value": "021600556514"
241241
}
242242
}
243-
}
243+
},
244+
{
245+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1",
246+
"valueCoding":
247+
{
248+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1",
249+
"code": "AVAILABLE"
250+
}
251+
},
252+
{
253+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1",
254+
"valueReference": {
255+
"identifier": {
256+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
257+
"value": "R69"
258+
}
259+
}
260+
}
244261
],
245262
"contentType": "image/png",
246263
"url": "Binary/857b901d-1491-47d3-90e2-6c9f13f744dc",
@@ -273,5 +290,11 @@
273290
"reference": "#DocumentReference-70000"
274291
}
275292
],
276-
"intent": "plan"
293+
"intent": "plan",
294+
"identifier":[
295+
{
296+
"system":"https://fhir.nhs.uk/Id/ers-request-id",
297+
"value":"r.c18c4ec4-7d0a-480e-8506-347e0ec228b0"
298+
}
299+
]
277300
}

sandbox/src/mocks/stu3/cancelAppointmentActionLater/responses/PriorityChangeAndWithAttachmentsDBS.json

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,24 @@
249249
"value": "103264992985"
250250
}
251251
}
252-
}
252+
},
253+
{
254+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1",
255+
"valueCoding":
256+
{
257+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1",
258+
"code": "PENDING"
259+
}
260+
},
261+
{
262+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1",
263+
"valueReference": {
264+
"identifier": {
265+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
266+
"value": "R69"
267+
}
268+
}
269+
}
253270
],
254271
"contentType": "image/png",
255272
"url": "Binary/857b901d-1491-47d3-90e2-6c9f13f744dc",
@@ -293,7 +310,24 @@
293310
"value": "021600556514"
294311
}
295312
}
296-
}
313+
},
314+
{
315+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1",
316+
"valueCoding":
317+
{
318+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1",
319+
"code": "AVAILABLE"
320+
}
321+
},
322+
{
323+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1",
324+
"valueReference": {
325+
"identifier": {
326+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
327+
"value": "R69"
328+
}
329+
}
330+
}
297331
],
298332
"contentType": "application/pdf",
299333
"url": "Binary/89d0521b-057e-4d5c-8630-f5ba2728843e",
@@ -337,7 +371,24 @@
337371
"value": "021600556514"
338372
}
339373
}
340-
}
374+
},
375+
{
376+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1",
377+
"valueCoding":
378+
{
379+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1",
380+
"code": "AVAILABLE"
381+
}
382+
},
383+
{
384+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1",
385+
"valueReference": {
386+
"identifier": {
387+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
388+
"value": "R69"
389+
}
390+
}
391+
}
341392
],
342393
"contentType": "application/pdf",
343394
"url": "Binary/badaf6fc-90f4-411d-999f-04ccd79fa166",
@@ -376,5 +427,11 @@
376427
"reference": "#DocumentReference-70000"
377428
}
378429
],
379-
"intent": "plan"
430+
"intent": "plan",
431+
"identifier":[
432+
{
433+
"system":"https://fhir.nhs.uk/Id/ers-request-id",
434+
"value":"r.c18c4ec4-7d0a-480e-8506-347e0ec228b0"
435+
}
436+
]
380437
}

sandbox/src/mocks/stu3/cancelReferral/responses/CancelledBookedReferralReferrerCancellation.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,13 @@
247247
}
248248
},
249249
"supportingInfo": [],
250-
"intent": "plan"
250+
"intent": "plan",
251+
"identifier":[
252+
{
253+
"system":"https://fhir.nhs.uk/Id/ers-request-id",
254+
"value":"r.c18c4ec4-7d0a-480e-8506-347e0ec228b0"
255+
}
256+
]
251257
}
252258
},
253259
{

0 commit comments

Comments
 (0)