Skip to content

Commit 7eff551

Browse files
Merge branch 'main' into update-changelog
2 parents 8de3ecb + 9686925 commit 7eff551

20 files changed

+71
-44
lines changed

CHANGELOG.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [2.3.0] - 2025-03-24
10+
911
### Fixed
1012

11-
* When mapping to `<code nullFlavor="UNK">` XML elements from an existing `CodeableConcept` the element will now contain
12-
the original text value from the DisplayExtension, if a separate text field is not provided.
13-
In the case that neither of these are present, the existing behavior of using the `code.display` element is used.
13+
* When mapping to `<code nullFlavor="UNK">` XML elements from an existing `CodeableConcept` the element will now contain the original text value from the DisplayExtension, if a separate text field is not provided. In the case that neither of these are present, the existing behavior of using the `code.display` element is used.
1414

1515
### Added
1616

17+
* Legacy codes are preserved as translations within the XML when mapping `CodeableConcepts`, when a SNOMEDCT code is provided along with additional codings for Egton, READ (v2 or v3), or EMIS drug codes. For other unknown code systems, these will not be preserved.
1718
* GP2GP Adaptor now populates the PlanStatement / confidentialityCode field when the ProcedureRequest.meta.security field contains NOPAT
19+
1820
* When the ReferralRequest.meta.security field contains NOPAT, the GP2GP Adaptor will now populate the RequestStatement / confidentialityCode field accordingly.
1921
* The GP2GP Adaptor now populates the CompoundStatement / confidentialityCode field when Observation.meta.security field contains NOPAT
2022
* When mapping from JSON FHIR `codaeableConcept` to HL7 XML `<code>`, if both a legacy code and system (i.e., ReadV2,
2123
Egton) and a `SNOMEDCT` code are provided, then the legacy code will be preserved and presented as a nested
2224
`<translation>` element. The provided `coding.system` will be converted from url to OID format for known codes systems.
2325

24-
2526
## [2.2.2] - 2025-02-07
2627

2728
### Fixed

e2e-tests/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies {
2222
testImplementation 'org.awaitility:awaitility:4.3.0'
2323
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.4'
2424
testImplementation "org.assertj:assertj-core:3.27.3"
25-
testImplementation 'ch.qos.logback:logback-classic:1.5.17'
25+
testImplementation 'ch.qos.logback:logback-classic:1.5.18'
2626
testImplementation 'org.xmlunit:xmlunit-assertj3:2.10.0'
2727
testImplementation 'org.apache.httpcomponents.client5:httpclient5:5.4.2'
2828

mock-mhs-adaptor/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
plugins {
2-
id 'org.springframework.boot' version '3.4.3'
2+
id 'org.springframework.boot' version '3.4.4'
33
id 'io.spring.dependency-management' version '1.1.7'
44
id 'java'
5-
id "io.freefair.lombok" version "8.12.2.1"
5+
id "io.freefair.lombok" version "8.13"
66
}
77

88
apply plugin: 'java'

service/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ plugins {
1010

1111
// Mutation testing
1212
id 'info.solidsoft.pitest' version '1.15.0'
13-
id 'com.arcmutate.github' version '2.0.0'
13+
id 'com.arcmutate.github' version '2.1.0'
1414
}
1515

1616
apply plugin: 'java'
@@ -50,8 +50,8 @@ dependencies {
5050
implementation 'org.springframework.boot:spring-boot-starter-logging'
5151

5252
// Infrastructure
53-
implementation 'software.amazon.awssdk:s3:2.30.31'
54-
implementation ('com.azure:azure-storage-blob:12.29.1')
53+
implementation 'software.amazon.awssdk:s3:2.31.6'
54+
implementation ('com.azure:azure-storage-blob:12.30.0')
5555
implementation 'org.apache.qpid:qpid-jms-client:2.6.1'
5656

5757
// Utils
@@ -66,15 +66,15 @@ dependencies {
6666
// Test
6767
testImplementation 'org.springframework.boot:spring-boot-starter-test'
6868
testImplementation "org.assertj:assertj-core:3.27.3"
69-
testImplementation 'org.testcontainers:testcontainers:1.20.5'
69+
testImplementation 'org.testcontainers:testcontainers:1.20.6'
7070
testImplementation 'org.awaitility:awaitility:4.2.2'
7171
testImplementation 'org.wiremock:wiremock-standalone:3.12.1'
7272
testImplementation 'com.squareup.okhttp3:okhttp:4.12.0'
7373
testImplementation 'com.squareup.okhttp3:mockwebserver:4.12.0'
7474
testImplementation 'io.findify:s3mock_2.13:0.2.6'
7575

7676
pitest 'com.arcmutate:base:1.3.2'
77-
pitest 'com.arcmutate:pitest-git-plugin:2.0.0'
77+
pitest 'com.arcmutate:pitest-git-plugin:2.1.0'
7878
}
7979

8080
test {

service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/BloodPressureMapper.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,11 @@ public class BloodPressureMapper {
6262

6363
public String mapBloodPressure(Observation observation, boolean isNested) {
6464

65-
var confidentialityCode = confidentialityService.generateConfidentialityCode(observation);
66-
6765
BloodPressureParametersBuilder builder = BloodPressureParameters.builder()
6866
.isNested(isNested)
6967
.id(messageContext.getIdMapper().getOrNew(ResourceType.Observation, observation.getIdElement()))
7068
.effectiveTime(prepareEffectiveTimeForObservation(observation))
7169
.availabilityTime(prepareAvailabilityTimeForObservation(observation))
72-
.confidentialityCode(confidentialityCode.orElse(null))
7370
.compoundStatementCode(buildBloodPressureCode(observation));
7471

7572
extractBloodPressureComponent(observation, SYSTOLIC_CODE).ifPresent(observationComponent -> {

service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/CodeableConceptCdMapper.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package uk.nhs.adaptors.gp2gp.ehr.mapper;
22

3+
import java.util.ArrayList;
34
import java.util.Collections;
45
import java.util.List;
56
import java.util.Optional;
@@ -316,12 +317,16 @@ private List<Coding> getNonSnomedCodeCodings(CodeableConcept codeableConcept) {
316317
.filter(coding -> !isSnomed(coding))
317318
.toList();
318319

320+
List<Coding> nonSnomedCodings = new ArrayList<>();
321+
319322
for (Coding coding : nonSnomedCodeCodings) {
320323
var hl7CodeSystem = CodeSystemsUtil.getHl7code(coding.getSystem());
321-
coding.setSystem(hl7CodeSystem);
324+
if (!hl7CodeSystem.isEmpty()) {
325+
nonSnomedCodings.add(new Coding(hl7CodeSystem, coding.getCode(), coding.getDisplay()));
326+
}
322327
}
323328

324-
return nonSnomedCodeCodings;
329+
return nonSnomedCodings;
325330
}
326331

327332
private Optional<String> findOriginalText(CodeableConcept codeableConcept, Optional<Coding> coding) {

service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/RequestStatementMapper.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,11 @@ private String map() {
103103
processAgent(agentRef, onBehalfOf);
104104
}
105105

106-
var confidentialityCode = confidentialityService.generateConfidentialityCode(referralRequest);
107-
108106
final IdMapper idMapper = messageContext.getIdMapper();
109107
templateParameters
110108
.requestStatementId(idMapper.getOrNew(ResourceType.ReferralRequest, referralRequest.getIdElement()))
111109
.isNested(isNested)
112110
.availabilityTime(StatementTimeMappingUtils.prepareAvailabilityTime(referralRequest.getAuthoredOnElement()))
113-
.confidentialityCode(confidentialityCode.orElse(null))
114111
.text(buildTextDescription())
115112
.priorityCode(buildPriorityCode())
116113
.code(buildCode());

service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/parameters/BloodPressureParameters.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ public class BloodPressureParameters {
2323
private String systolicCode;
2424
private String diastolicCode;
2525
private String participant;
26-
private String confidentialityCode;
2726
}

service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/parameters/RequestStatementTemplateParameters.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ public class RequestStatementTemplateParameters {
1717
private String participant;
1818
private String responsibleParty;
1919
private String text;
20-
private String confidentialityCode;
2120
}

service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/utils/CodeSystemsUtil.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ public final class CodeSystemsUtil {
1212
"http://snomed.info/sct", "2.16.840.1.113883.2.1.3.2.4.15",
1313
"https://fhir.hl7.org.uk/Id/egton-codes", "2.16.840.1.113883.2.1.6.3",
1414
"http://read.info/readv2", "2.16.840.1.113883.2.1.6.2",
15-
"http://read.info/ctv3", "2.16.840.1.113883.2.1.3.2.4.14"
15+
"http://read.info/ctv3", "2.16.840.1.113883.2.1.3.2.4.14",
16+
"https://fhir.hl7.org.uk/Id/emis-drug-codes", "2.16.840.1.113883.2.1.6.9"
1617
);
1718

1819
public static String getHl7code(String fhirCodeSystem) {
19-
return SYSTEM_CODES.getOrDefault(fhirCodeSystem, fhirCodeSystem);
20+
return SYSTEM_CODES.getOrDefault(fhirCodeSystem, "");
2021
}
2122
}

0 commit comments

Comments
 (0)