Skip to content

Commit 9c99f9e

Browse files
committed
addressing PR comments
1 parent cb77fb5 commit 9c99f9e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -255,32 +255,32 @@ private Optional<String> mapDefaultNotImplemented(Resource resource) {
255255
resource.getIdElement().getIdPart()));
256256
}
257257

258-
protected Optional<String> mapAllergyIntolerance(Resource resource) {
258+
private Optional<String> mapAllergyIntolerance(Resource resource) {
259259
return Optional.of(allergyStructureMapper.mapAllergyIntoleranceToAllergyStructure((AllergyIntolerance) resource));
260260
}
261261

262-
protected Optional<String> mapCondition(Resource resource) {
262+
private Optional<String> mapCondition(Resource resource) {
263263
return Optional.of(conditionLinkSetMapper.mapConditionToLinkSet((Condition) resource, IS_NESTED));
264264
}
265265

266-
protected Optional<String> mapDocumentReference(Resource resource) {
266+
private Optional<String> mapDocumentReference(Resource resource) {
267267
return Optional.of(
268268
documentReferenceToNarrativeStatementMapper.mapDocumentReferenceToNarrativeStatement((DocumentReference) resource));
269269
}
270270

271-
protected Optional<String> mapImmunization(Resource resource) {
271+
private Optional<String> mapImmunization(Resource resource) {
272272
return Optional.of(
273273
immunizationObservationStatementMapper.mapImmunizationToObservationStatement((Immunization) resource, IS_NESTED));
274274
}
275275

276-
protected Optional<String> mapMedicationRequest(Resource resource) {
276+
private Optional<String> mapMedicationRequest(Resource resource) {
277277
return Optional.of(resource)
278278
.map(MedicationRequest.class::cast)
279279
.filter(not(MedicationRequestUtils::isStoppedMedicationOrder))
280280
.map(medicationStatementMapper::mapMedicationRequestToMedicationStatement);
281281
}
282282

283-
protected Optional<String> mapObservation(Resource resource) {
283+
private Optional<String> mapObservation(Resource resource) {
284284
Observation observation = (Observation) resource;
285285
if (CodeableConceptMappingUtils.hasCode(observation.getCode(), List.of(NARRATIVE_STATEMENT_CODE))) {
286286
return Optional.of(observationToNarrativeStatementMapper.mapObservationToNarrativeStatement(observation, IS_NESTED));
@@ -292,17 +292,17 @@ protected Optional<String> mapObservation(Resource resource) {
292292
return Optional.of(observationStatementMapper.mapObservationToObservationStatement(observation, IS_NESTED));
293293
}
294294

295-
protected Optional<String> mapProcedureRequest(Resource resource) {
295+
private Optional<String> mapProcedureRequest(Resource resource) {
296296
return Optional.ofNullable(
297297
diaryPlanStatementMapper.mapProcedureRequestToPlanStatement((ProcedureRequest) resource, IS_NESTED)
298298
);
299299
}
300300

301-
protected Optional<String> mapReferralRequest(Resource resource) {
301+
private Optional<String> mapReferralRequest(Resource resource) {
302302
return Optional.of(requestStatementMapper.mapReferralRequestToRequestStatement((ReferralRequest) resource, IS_NESTED));
303303
}
304304

305-
protected Optional<String> mapDiagnosticReport(Resource resource) {
305+
private Optional<String> mapDiagnosticReport(Resource resource) {
306306
return Optional.of(diagnosticReportMapper.mapDiagnosticReportToCompoundStatement((DiagnosticReport) resource));
307307
}
308308

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,14 @@ public void tearDown() {
230230
}
231231

232232
@Test
233-
public void testObservationWithNOPATGetsTranslatedIntoNarrativeWithConfidentialityCode() {
233+
void testObservationWithNOPATGetsTranslatedIntoNarrativeWithConfidentialityCode() {
234234
var jsonInput = ResourceTestFileUtils.getFileContent(INPUT_AGENT_DIRECTORY);
235235
Bundle bundle = FHIR_PARSE_SERVICE.parseResource(jsonInput, Bundle.class);
236236
Resource observation = bundle.getEntry().get(1).getResource();
237237

238238
when(confidentialityService.generateConfidentialityCode(observation)).thenReturn(Optional.of(CONFIDENTIALITY_CODE));
239239

240-
var result = encounterComponentsMapper.mapObservation(observation);
240+
var result = encounterComponentsMapper.mapResourceToComponent(observation);
241241

242242
assertThat(result.get()).contains(CONFIDENTIALITY_CODE);
243243
}

0 commit comments

Comments
 (0)