Skip to content

Commit f0e4181

Browse files
committed
Merge branch 'NIAD-3240' of https://github.com/NHSDigital/integration-adaptor-gp2gp-sending into NIAD-3240
2 parents 6837b01 + 928ed9d commit f0e4181

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ private List<Specimen> fetchSpecimens(DiagnosticReport diagnosticReport, List<Ob
156156
specimens.addAll(nonDummySpecimens);
157157

158158
return specimens;
159-
160159
}
161160

162161
private boolean hasObservationsWithoutSpecimen(List<Observation> observations) {
@@ -237,7 +236,7 @@ private List<Observation> addDummyObservationsToObservationList(
237236

238237
// Generate a dummy Observation for each Specimen without an Observation
239238
for (String specimenWithoutObservations : specimensWithoutObservations) {
240-
Observation dummyObservation = generateDefaultObservation(diagnosticReport);
239+
Observation dummyObservation = generateDummyObservation(diagnosticReport);
241240
Reference specimenReference = new Reference(specimenWithoutObservations);
242241
dummyObservation.setSpecimen(specimenReference);
243242
completeObservations.add(dummyObservation);
@@ -251,7 +250,7 @@ private List<String> getSpecimenIdsWithoutObservation(List<Specimen> specimens,
251250
List<String> specimenIDList = new ArrayList<>();
252251
List<String> nonOrphanSpecimenIDList = new ArrayList<>();
253252
for (Specimen specimen : specimens) {
254-
//Dummy Specimens should not have a dummy Observation attached.
253+
// Dummy Specimens should not have a dummy observation attached.
255254
if (!specimen.getId().contains(DUMMY_SPECIMEN_ID_PREFIX)) {
256255
specimenIDList.add(specimen.getId());
257256
}
@@ -278,7 +277,7 @@ private boolean hasSpecimenWithoutObservation(List<Specimen> specimens, List<Obs
278277
return !specimensWithoutObservations.isEmpty();
279278
}
280279

281-
private Observation generateDefaultObservation(DiagnosticReport diagnosticReport) {
280+
private Observation generateDummyObservation(DiagnosticReport diagnosticReport) {
282281
Observation observation = new Observation();
283282

284283
observation.setId(DUMMY_OBSERVATION_ID_PREFIX + randomIdGeneratorService.createNewId());

0 commit comments

Comments
 (0)