diff options
4 files changed, 11 insertions, 22 deletions
@@ -93,7 +93,14 @@ Eine Übernahme von Consent-Daten aus unbekannten Formularen ist nur manuell mö ## Therapieplan -Soll das automatische Befüllen der Unterformulare *Einzelempfehlung* und *Rebiopsie* nicht durchgeführt werden, weil es mehrere MTBs je MTB-Episode gibt, so muss die Einstellung `mehrere_mtb_in_mtbepisode` vorhanden sein und auf den Wert `true` gesetzt sein. +### Mehrere MTBs in Therapieplan (Veraltet - nicht mehr unterstützt!) + +**Achtung!** Dies wird nun nicht mehr angewendet. Es werden immer das Datum und der Verweis auf das MTB des Hauptformulars verwendet. +Zu den Gründen, siehe auch: https://github.com/pcvolkmer/onkostar-plugin-dnpm/issues/211#issuecomment-3498119327 + +**Im Zweifelsfall ist die Dokumentation entsprechend anzupassen, zumindest zu prüfen!** + +Soll das automatische Befüllen des MTB-Datums Datum der Unterformulare *Einzelempfehlung* und *Rebiopsie* nicht durchgeführt werden, weil es mehrere MTBs je MTB-Episode gibt, so muss die Einstellung `mehrere_mtb_in_mtbepisode` vorhanden sein und auf den Wert `true` gesetzt sein. ``` INSERT INTO einstellung (name, wert, kategorie, optionen, beschreibung) diff --git a/src/main/java/dev/dnpm/oshelper/services/therapieplan/MultipleMtbTherapieplanService.java b/src/main/java/dev/dnpm/oshelper/services/therapieplan/MultipleMtbTherapieplanService.java index 78612de..7452530 100644 --- a/src/main/java/dev/dnpm/oshelper/services/therapieplan/MultipleMtbTherapieplanService.java +++ b/src/main/java/dev/dnpm/oshelper/services/therapieplan/MultipleMtbTherapieplanService.java @@ -37,6 +37,7 @@ import java.util.stream.Collectors; import static dev.dnpm.oshelper.services.FormService.hasValue; import static dev.dnpm.oshelper.services.FormService.isYes; +@Deprecated(forRemoval = true, since = "2.0.0") public class MultipleMtbTherapieplanService extends AbstractTherapieplanService { public MultipleMtbTherapieplanService(final IOnkostarApi onkostarApi, final FormService formService) { diff --git a/src/main/java/dev/dnpm/oshelper/services/therapieplan/TherapieplanServiceFactory.java b/src/main/java/dev/dnpm/oshelper/services/therapieplan/TherapieplanServiceFactory.java index 2edf3fb..688f424 100644 --- a/src/main/java/dev/dnpm/oshelper/services/therapieplan/TherapieplanServiceFactory.java +++ b/src/main/java/dev/dnpm/oshelper/services/therapieplan/TherapieplanServiceFactory.java @@ -32,25 +32,19 @@ public class TherapieplanServiceFactory { private final IOnkostarApi onkostarApi; - private final SettingsService settingsService; - private final FormService formService; + @SuppressWarnings("unused") public TherapieplanServiceFactory( final IOnkostarApi onkostarApi, final SettingsService settingsService, final FormService formService ) { this.onkostarApi = onkostarApi; - this.settingsService = settingsService; this.formService = formService; } public TherapieplanService currentUsableInstance() { - if (settingsService.multipleMtbsInMtbEpisode()) { - return new MultipleMtbTherapieplanService(onkostarApi, formService); - } - return new DefaultTherapieplanService(onkostarApi, formService); } diff --git a/src/test/java/dev/dnpm/oshelper/services/therapieplan/TherapieplanServiceFactoryTest.java b/src/test/java/dev/dnpm/oshelper/services/therapieplan/TherapieplanServiceFactoryTest.java index 9b526e2..9ca5517 100644 --- a/src/test/java/dev/dnpm/oshelper/services/therapieplan/TherapieplanServiceFactoryTest.java +++ b/src/test/java/dev/dnpm/oshelper/services/therapieplan/TherapieplanServiceFactoryTest.java @@ -10,7 +10,6 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.Mockito.when; @ExtendWith(MockitoExtension.class) class TherapieplanServiceFactoryTest { @@ -30,20 +29,8 @@ class TherapieplanServiceFactoryTest { } @Test - void testShouldReturnDefaultTherapieplanServiceIfSettingIsFalse() { - when(settingsService.multipleMtbsInMtbEpisode()).thenReturn(false); - + void testShouldAlwaysReturnDefaultTherapieplanService() { var actual = this.therapieplanServiceFactory.currentUsableInstance(); - assertThat(actual).isInstanceOf(DefaultTherapieplanService.class); } - - @Test - void testShouldReturnMultipleMtbTherapieplanServiceIfSettingIsTrue() { - when(settingsService.multipleMtbsInMtbEpisode()).thenReturn(true); - - var actual = this.therapieplanServiceFactory.currentUsableInstance(); - - assertThat(actual).isInstanceOf(MultipleMtbTherapieplanService.class); - } } |
