1
0
mirror of https://github.com/pcvolkmer/onkostar-plugin-dnpm.git synced 2025-07-03 09:42:54 +00:00

Fix typo in method name

This commit is contained in:
2023-09-25 13:53:09 +02:00
parent 8c35642283
commit 4949bfcc64
7 changed files with 10 additions and 10 deletions

View File

@ -252,7 +252,7 @@ public class DNPMHelper extends BackendService {
} }
if (personPoolBasedPermissionEvaluator.hasPermission(SecurityContextHolder.getContext().getAuthentication(), patient, PermissionType.READ)) { if (personPoolBasedPermissionEvaluator.hasPermission(SecurityContextHolder.getContext().getAuthentication(), patient, PermissionType.READ)) {
return systemtherapieService.ecogSatus(patient); return systemtherapieService.ecogStatus(patient);
} }
throw new IllegalSecuredObjectAccessException("Kein Zugriff auf diesen Patienten"); throw new IllegalSecuredObjectAccessException("Kein Zugriff auf diesen Patienten");

View File

@ -89,7 +89,7 @@ public class SystemtherapieAnalyzer extends Analyzer {
return; return;
} }
var ecogFromCompleted = systemtherapieService.ecogSatus(procedure.getPatient()) var ecogFromCompleted = systemtherapieService.ecogStatus(procedure.getPatient())
.stream() .stream()
.filter(ecogStatusWithDate -> ecogStatusWithDate.getDate().after(disease.getDiagnosisDate())) .filter(ecogStatusWithDate -> ecogStatusWithDate.getDate().after(disease.getDiagnosisDate()))
.collect(Collectors.toList()); .collect(Collectors.toList());

View File

@ -62,7 +62,7 @@ public class DefaultSystemtherapieService implements SystemtherapieService {
*/ */
@Override @Override
public Optional<String> latestEcogStatus(Patient patient) { public Optional<String> latestEcogStatus(Patient patient) {
return ecogSatus(patient).stream() return ecogStatus(patient).stream()
.max(Comparator.comparing(EcogStatusWithDate::getDate)) .max(Comparator.comparing(EcogStatusWithDate::getDate))
.map(EcogStatusWithDate::getStatus); .map(EcogStatusWithDate::getStatus);
} }
@ -74,7 +74,7 @@ public class DefaultSystemtherapieService implements SystemtherapieService {
* @return Eine Liste mit Datum und ECOG-Status als String * @return Eine Liste mit Datum und ECOG-Status als String
*/ */
@Override @Override
public List<EcogStatusWithDate> ecogSatus(Patient patient) { public List<EcogStatusWithDate> ecogStatus(Patient patient) {
return patient.getDiseases().stream() return patient.getDiseases().stream()
.flatMap(disease -> onkostarApi.getProceduresForDiseaseByForm(disease.getId(), getFormName()).stream()) .flatMap(disease -> onkostarApi.getProceduresForDiseaseByForm(disease.getId(), getFormName()).stream())
.filter(procedure -> procedure.getEditState() == ProcedureEditStateType.COMPLETED) .filter(procedure -> procedure.getEditState() == ProcedureEditStateType.COMPLETED)

View File

@ -41,7 +41,7 @@ public interface SystemtherapieService {
* @param patient Der zu verwendende Patient * @param patient Der zu verwendende Patient
* @return Eine Liste mit Datum und ECOG-Status als String * @return Eine Liste mit Datum und ECOG-Status als String
*/ */
List<EcogStatusWithDate> ecogSatus(Patient patient); List<EcogStatusWithDate> ecogStatus(Patient patient);
/** /**
* Datenklasse zum Abbilden des ECOG-Status und Datum * Datenklasse zum Abbilden des ECOG-Status und Datum

View File

@ -270,7 +270,7 @@ class DNPMHelperTest {
dnpmHelper.getEcogStatus(Map.of("PatientId", 42)); dnpmHelper.getEcogStatus(Map.of("PatientId", 42));
var argumentCaptor = ArgumentCaptor.forClass(Patient.class); var argumentCaptor = ArgumentCaptor.forClass(Patient.class);
verify(systemtherapieService, times(1)).ecogSatus(argumentCaptor.capture()); verify(systemtherapieService, times(1)).ecogStatus(argumentCaptor.capture());
assertThat(argumentCaptor.getValue()).isNotNull(); assertThat(argumentCaptor.getValue()).isNotNull();
assertThat(argumentCaptor.getValue().getId()).isEqualTo(42); assertThat(argumentCaptor.getValue().getId()).isEqualTo(42);
} }

View File

@ -55,7 +55,7 @@ class SystemtherapieAnalyzerTest {
final var procedureDate = daysPassed(1); final var procedureDate = daysPassed(1);
doAnswer(invocationOnMock -> List.of(new SystemtherapieService.EcogStatusWithDate(ecogDate, "0"))) doAnswer(invocationOnMock -> List.of(new SystemtherapieService.EcogStatusWithDate(ecogDate, "0")))
.when(systemtherapieService).ecogSatus(any(Patient.class)); .when(systemtherapieService).ecogStatus(any(Patient.class));
var patient = new Patient(onkostarApi); var patient = new Patient(onkostarApi);
patient.setId(1); patient.setId(1);
@ -89,7 +89,7 @@ class SystemtherapieAnalyzerTest {
final var procedureDate = daysPassed(1); final var procedureDate = daysPassed(1);
doAnswer(invocationOnMock -> List.of()) doAnswer(invocationOnMock -> List.of())
.when(systemtherapieService).ecogSatus(any(Patient.class)); .when(systemtherapieService).ecogStatus(any(Patient.class));
var patient = new Patient(onkostarApi); var patient = new Patient(onkostarApi);
patient.setId(1); patient.setId(1);
@ -115,7 +115,7 @@ class SystemtherapieAnalyzerTest {
final var procedureDate = daysPassed(1); final var procedureDate = daysPassed(1);
doAnswer(invocationOnMock -> List.of(new SystemtherapieService.EcogStatusWithDate(ecogDate, "0"))) doAnswer(invocationOnMock -> List.of(new SystemtherapieService.EcogStatusWithDate(ecogDate, "0")))
.when(systemtherapieService).ecogSatus(any(Patient.class)); .when(systemtherapieService).ecogStatus(any(Patient.class));
var patient = new Patient(onkostarApi); var patient = new Patient(onkostarApi);
patient.setId(1); patient.setId(1);

View File

@ -123,7 +123,7 @@ class DefaultSystemtherapieServiceTest {
var patient = new Patient(onkostarApi); var patient = new Patient(onkostarApi);
patient.setId(1); patient.setId(1);
var actual = service.ecogSatus(patient); var actual = service.ecogStatus(patient);
assertThat(actual) assertThat(actual)
.isNotNull() .isNotNull()