1
0
mirror of https://github.com/pcvolkmer/onkostar-plugin-dnpm.git synced 2025-07-04 18:12:55 +00:00

Issue #29: Aktualisiere keinen EcogStatus vor Diagnosedatum

This commit is contained in:
2023-08-28 12:17:29 +02:00
parent cf9a68f6cd
commit aef9dd7889
2 changed files with 60 additions and 14 deletions

View File

@ -71,7 +71,7 @@ public class SystemtherapieAnalyzer implements IProcedureAnalyzer {
@Override
public boolean isRelevantForAnalyzer(Procedure procedure, Disease disease) {
return null != procedure && (
return null != procedure && null != disease && (
procedure.getFormName().equals("OS.Systemische Therapie")
|| procedure.getFormName().equals("OS.Systemische Therapie.VarianteUKW")
);
@ -106,7 +106,11 @@ public class SystemtherapieAnalyzer implements IProcedureAnalyzer {
return;
}
var ecogFromCompleted = systemtherapieService.ecogSatus(procedure.getPatient());
var ecogFromCompleted = systemtherapieService.ecogSatus(procedure.getPatient())
.stream()
.filter(ecogStatusWithDate -> ecogStatusWithDate.getDate().after(disease.getDiagnosisDate()))
.collect(Collectors.toList());
if (ecogFromCompleted.isEmpty()) {
// Nothing to do
return;