Skip to content

Commit 2ee57dd

Browse files
authored
Merge branch 'main' into NIAD-1573
2 parents 38e8408 + 6ce5944 commit 2ee57dd

File tree

5 files changed

+102
-7
lines changed

5 files changed

+102
-7
lines changed

e2e-tests/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ repositories {
1313
}
1414

1515
dependencies {
16-
implementation 'org.apache.qpid:qpid-jms-client:2.7.0'
16+
implementation 'org.apache.qpid:qpid-jms-client:2.8.0'
1717
implementation "org.apache.geronimo.specs:geronimo-jms_1.1_spec:1.1.1"
1818
implementation 'org.mongodb:mongo-java-driver:3.12.14'
1919
testImplementation(platform('org.junit:junit-bom:5.13.4'))
2020
testImplementation 'org.junit.jupiter:junit-jupiter'
21-
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.19.2'
22-
testImplementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.19.2'
21+
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.20.0'
22+
testImplementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0'
2323
testImplementation 'commons-io:commons-io:2.20.0'
2424
testImplementation 'org.awaitility:awaitility:4.3.0'
2525
testImplementation "org.assertj:assertj-core:3.27.4"
2626
testImplementation 'ch.qos.logback:logback-classic:1.5.18'
27-
testImplementation 'org.xmlunit:xmlunit-assertj3:2.10.3'
27+
testImplementation 'org.xmlunit:xmlunit-assertj3:2.10.4'
2828
testImplementation 'org.apache.httpcomponents.client5:httpclient5:5.5'
2929

3030
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

mock-mhs-adaptor/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies {
1919
implementation 'org.springframework.boot:spring-boot-starter-actuator'
2020
implementation 'org.springframework.boot:spring-boot-starter-web'
2121
implementation 'org.springframework:spring-jms'
22-
implementation 'org.apache.qpid:qpid-jms-client:2.7.0'
22+
implementation 'org.apache.qpid:qpid-jms-client:2.8.0'
2323
implementation 'org.apache.commons:commons-lang3:3.18.0'
2424
testImplementation 'org.springframework.boot:spring-boot-starter-test'
2525
}

service/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ dependencies {
5050
implementation 'org.springframework.boot:spring-boot-starter-logging'
5151

5252
// Infrastructure
53-
implementation 'software.amazon.awssdk:s3:2.32.14'
53+
implementation 'software.amazon.awssdk:s3:2.33.9'
5454
implementation ('com.azure:azure-storage-blob:12.30.0')
55-
implementation 'org.apache.qpid:qpid-jms-client:2.7.0'
55+
implementation 'org.apache.qpid:qpid-jms-client:2.8.0'
5656

5757
// Utils
5858
implementation 'org.apache.commons:commons-lang3:3.18.0'

service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EncounterMapperTest.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,22 @@ public void When_MappingEncounterWithNoType_Expect_Exception() {
173173
.hasMessage("Could not map Encounter type");
174174
}
175175

176+
@Test
177+
public void When_MappingEncounterLocationWithNoReference_Expect_Exception() {
178+
lenient().when(randomIdGeneratorService.createNewId()).thenReturn(TEST_ID);
179+
lenient().when(bundle.getEntry()).thenReturn(List.of(BUNDLE_ENTRY_WITH_CONSULTATION));
180+
var sampleComponent = ResourceTestFileUtils.getFileContent(SAMPLE_EHR_COMPOSITION_COMPONENT);
181+
182+
var jsonInput = ResourceTestFileUtils.getFileContent(TEST_FILES_DIRECTORY
183+
+ "input-encounter-with-location-with-no-reference.json");
184+
Encounter parsedEncounter = new FhirParseService().parseResource(jsonInput, Encounter.class);
185+
when(encounterComponentsMapper.mapComponents(parsedEncounter)).thenReturn(sampleComponent);
186+
187+
assertThatThrownBy(() -> encounterMapper.mapEncounterToEhrComposition(parsedEncounter))
188+
.isExactlyInstanceOf(EhrMapperException.class)
189+
.hasMessage("Resource not found: Location/EB3994A6-5A87-4B53-A414-913137072F57");
190+
}
191+
176192
@Test
177193
public void When_MappingEncounterWithInvalidParticipantReferenceResourceType_Expect_Exception() {
178194
var sampleComponent = ResourceTestFileUtils.getFileContent(SAMPLE_EHR_COMPOSITION_COMPONENT);
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"resourceType":"Encounter",
3+
"id":"F550CC56-EF65-4934-A7B1-3DC2E02243C3",
4+
"meta":{
5+
"profile":[
6+
"https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Encounter-1"
7+
]
8+
},
9+
"identifier":[
10+
{
11+
"system":"https://EMISWeb/A82038",
12+
"value":"F550CC56-EF65-4934-A7B1-3DC2E02243C3"
13+
}
14+
],
15+
"status":"finished",
16+
"type":[
17+
{
18+
"text":"GP Surgery",
19+
"coding": [
20+
{
21+
"system":"http://snomed.info/sct",
22+
"code":"24561000000109",
23+
"display":"A+E report"
24+
}
25+
]
26+
}
27+
],
28+
"subject":{
29+
"reference":"Patient/88F14BF6-CADE-47D6-90E2-B10519BF956F"
30+
},
31+
"participant":[
32+
{
33+
"type":[
34+
{
35+
"coding":[
36+
{
37+
"system":"http://hl7.org/fhir/v3/ParticipationType",
38+
"code":"PPRF",
39+
"display":"primary performer"
40+
}
41+
]
42+
}
43+
],
44+
"individual":{
45+
"reference":"Practitioner/6D340A1B-BC15-4D4E-93CF-BBCB5B74DF73"
46+
}
47+
},
48+
{
49+
"type":[
50+
{
51+
"coding":[
52+
{
53+
"system":"https://fhir.nhs.uk/STU3/CodeSystem/GPConnect-ParticipantType-1",
54+
"code":"REC",
55+
"display":"recorder"
56+
}
57+
]
58+
}
59+
],
60+
"individual":{
61+
"reference":"Practitioner/6D340A1B-BC15-4D4E-93CF-BBCB5B74DF73"
62+
}
63+
}
64+
],
65+
"period":{
66+
"start":"2010-01-13T15:20:00+00:00",
67+
"end":"2010-01-13T16:20:00+00:00"
68+
},
69+
"location":[
70+
{
71+
"location":{
72+
"reference":"Location/EB3994A6-5A87-4B53-A414-913137072F57"
73+
}
74+
}
75+
],
76+
"serviceProvider":{
77+
"reference":"Organization/5E496953-065B-41F2-9577-BE8F2FBD0757"
78+
}
79+
}

0 commit comments

Comments
 (0)