mirror of
https://github.com/pcvolkmer/onkostar-plugin-dnpm.git
synced 2025-07-05 02:22:54 +00:00
Verschiebe Implementierungen für Therapiepläne in eigenes Paket
This commit is contained in:
@ -4,7 +4,7 @@ import DNPM.security.DelegatingDataBasedPermissionEvaluator;
|
|||||||
import DNPM.security.PermissionType;
|
import DNPM.security.PermissionType;
|
||||||
import DNPM.services.Studie;
|
import DNPM.services.Studie;
|
||||||
import DNPM.services.StudienService;
|
import DNPM.services.StudienService;
|
||||||
import DNPM.services.TherapieplanServiceFactory;
|
import DNPM.services.therapieplan.TherapieplanServiceFactory;
|
||||||
import DNPM.services.mtb.MtbService;
|
import DNPM.services.mtb.MtbService;
|
||||||
import de.itc.onkostar.api.Disease;
|
import de.itc.onkostar.api.Disease;
|
||||||
import de.itc.onkostar.api.Procedure;
|
import de.itc.onkostar.api.Procedure;
|
||||||
|
@ -7,6 +7,7 @@ import DNPM.services.mtb.DefaultMtbService;
|
|||||||
import DNPM.services.mtb.MtbService;
|
import DNPM.services.mtb.MtbService;
|
||||||
import DNPM.services.systemtherapie.DefaultSystemtherapieService;
|
import DNPM.services.systemtherapie.DefaultSystemtherapieService;
|
||||||
import DNPM.services.systemtherapie.SystemtherapieService;
|
import DNPM.services.systemtherapie.SystemtherapieService;
|
||||||
|
import DNPM.services.therapieplan.TherapieplanServiceFactory;
|
||||||
import de.itc.onkostar.api.IOnkostarApi;
|
import de.itc.onkostar.api.IOnkostarApi;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
package DNPM.services;
|
|
||||||
|
|
||||||
import de.itc.onkostar.api.Procedure;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface TherapieplanService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Verlinke MTB und Übernahme Datum aus Hauptformular in weiteren Bereichen
|
|
||||||
* "Humangenetische Beratung" und "Reevaluation" und Unterformularen, wenn erforderlich.
|
|
||||||
*
|
|
||||||
* @param procedure Die Prozedur mit Hauptformular
|
|
||||||
*/
|
|
||||||
void updateRequiredMtbEntries(Procedure procedure);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Finde verlinkte MTBs in Hauptformular und Unterformularen
|
|
||||||
*
|
|
||||||
* @param procedure Die Prozedur mit Hauptformular
|
|
||||||
* @return Liste mit verlinkten MTBs
|
|
||||||
*/
|
|
||||||
List<Procedure> findReferencedMtbs(Procedure procedure);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Finde verlinkte MTBs in Hauptformular und Unterformularen
|
|
||||||
*
|
|
||||||
* @param procedureId ID der Prozedur mit Hauptformular
|
|
||||||
* @return Liste mit verlinkten MTBs
|
|
||||||
*/
|
|
||||||
List<Procedure> findReferencedMtbs(int procedureId);
|
|
||||||
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
package DNPM.services;
|
|
||||||
|
|
||||||
import de.itc.onkostar.api.IOnkostarApi;
|
|
||||||
|
|
||||||
public class TherapieplanServiceFactory {
|
|
||||||
|
|
||||||
private final IOnkostarApi onkostarApi;
|
|
||||||
|
|
||||||
private final SettingsService settingsService;
|
|
||||||
|
|
||||||
private final FormService formService;
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,5 +1,30 @@
|
|||||||
package DNPM.services;
|
/*
|
||||||
|
* MIT License
|
||||||
|
*
|
||||||
|
* 2023 Comprehensive Cancer Center Mainfranken
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package DNPM.services.therapieplan;
|
||||||
|
|
||||||
|
import DNPM.services.FormService;
|
||||||
import de.itc.onkostar.api.IOnkostarApi;
|
import de.itc.onkostar.api.IOnkostarApi;
|
||||||
import de.itc.onkostar.api.Item;
|
import de.itc.onkostar.api.Item;
|
||||||
import de.itc.onkostar.api.Procedure;
|
import de.itc.onkostar.api.Procedure;
|
@ -1,5 +1,30 @@
|
|||||||
package DNPM.services;
|
/*
|
||||||
|
* MIT License
|
||||||
|
*
|
||||||
|
* 2023 Comprehensive Cancer Center Mainfranken
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package DNPM.services.therapieplan;
|
||||||
|
|
||||||
|
import DNPM.services.FormService;
|
||||||
import de.itc.onkostar.api.IOnkostarApi;
|
import de.itc.onkostar.api.IOnkostarApi;
|
||||||
import de.itc.onkostar.api.Procedure;
|
import de.itc.onkostar.api.Procedure;
|
||||||
|
|
@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
* MIT License
|
||||||
|
*
|
||||||
|
* 2023 Comprehensive Cancer Center Mainfranken
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package DNPM.services.therapieplan;
|
||||||
|
|
||||||
|
import de.itc.onkostar.api.Procedure;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface TherapieplanService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Verlinke MTB und Übernahme Datum aus Hauptformular in weiteren Bereichen
|
||||||
|
* "Humangenetische Beratung" und "Reevaluation" und Unterformularen, wenn erforderlich.
|
||||||
|
*
|
||||||
|
* @param procedure Die Prozedur mit Hauptformular
|
||||||
|
*/
|
||||||
|
void updateRequiredMtbEntries(Procedure procedure);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finde verlinkte MTBs in Hauptformular und Unterformularen
|
||||||
|
*
|
||||||
|
* @param procedure Die Prozedur mit Hauptformular
|
||||||
|
* @return Liste mit verlinkten MTBs
|
||||||
|
*/
|
||||||
|
List<Procedure> findReferencedMtbs(Procedure procedure);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finde verlinkte MTBs in Hauptformular und Unterformularen
|
||||||
|
*
|
||||||
|
* @param procedureId ID der Prozedur mit Hauptformular
|
||||||
|
* @return Liste mit verlinkten MTBs
|
||||||
|
*/
|
||||||
|
List<Procedure> findReferencedMtbs(int procedureId);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
* MIT License
|
||||||
|
*
|
||||||
|
* 2023 Comprehensive Cancer Center Mainfranken
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package DNPM.services.therapieplan;
|
||||||
|
|
||||||
|
import DNPM.services.FormService;
|
||||||
|
import DNPM.services.SettingsService;
|
||||||
|
import de.itc.onkostar.api.IOnkostarApi;
|
||||||
|
|
||||||
|
public class TherapieplanServiceFactory {
|
||||||
|
|
||||||
|
private final IOnkostarApi onkostarApi;
|
||||||
|
|
||||||
|
private final SettingsService settingsService;
|
||||||
|
|
||||||
|
private final FormService formService;
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -4,6 +4,9 @@ import DNPM.security.DelegatingDataBasedPermissionEvaluator;
|
|||||||
import DNPM.security.PermissionType;
|
import DNPM.security.PermissionType;
|
||||||
import DNPM.services.*;
|
import DNPM.services.*;
|
||||||
import DNPM.services.mtb.MtbService;
|
import DNPM.services.mtb.MtbService;
|
||||||
|
import DNPM.services.therapieplan.MultipleMtbTherapieplanService;
|
||||||
|
import DNPM.services.therapieplan.TherapieplanService;
|
||||||
|
import DNPM.services.therapieplan.TherapieplanServiceFactory;
|
||||||
import de.itc.onkostar.api.IOnkostarApi;
|
import de.itc.onkostar.api.IOnkostarApi;
|
||||||
import de.itc.onkostar.api.Item;
|
import de.itc.onkostar.api.Item;
|
||||||
import de.itc.onkostar.api.Procedure;
|
import de.itc.onkostar.api.Procedure;
|
||||||
|
@ -2,7 +2,7 @@ package DNPM.config;
|
|||||||
|
|
||||||
import DNPM.services.FormService;
|
import DNPM.services.FormService;
|
||||||
import DNPM.services.SettingsService;
|
import DNPM.services.SettingsService;
|
||||||
import DNPM.services.TherapieplanServiceFactory;
|
import DNPM.services.therapieplan.TherapieplanServiceFactory;
|
||||||
import DNPM.services.consent.ConsentManagerServiceFactory;
|
import DNPM.services.consent.ConsentManagerServiceFactory;
|
||||||
import de.itc.onkostar.api.IOnkostarApi;
|
import de.itc.onkostar.api.IOnkostarApi;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
@ -1,5 +1,32 @@
|
|||||||
package DNPM.services;
|
/*
|
||||||
|
* MIT License
|
||||||
|
*
|
||||||
|
* 2023 Comprehensive Cancer Center Mainfranken
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package DNPM.services.therapieplan;
|
||||||
|
|
||||||
|
import DNPM.services.FormService;
|
||||||
|
import DNPM.services.therapieplan.DefaultTherapieplanService;
|
||||||
|
import DNPM.services.therapieplan.TherapieplanService;
|
||||||
import de.itc.onkostar.api.IOnkostarApi;
|
import de.itc.onkostar.api.IOnkostarApi;
|
||||||
import de.itc.onkostar.api.Item;
|
import de.itc.onkostar.api.Item;
|
||||||
import de.itc.onkostar.api.Procedure;
|
import de.itc.onkostar.api.Procedure;
|
@ -1,5 +1,34 @@
|
|||||||
package DNPM.services;
|
/*
|
||||||
|
* MIT License
|
||||||
|
*
|
||||||
|
* 2023 Comprehensive Cancer Center Mainfranken
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package DNPM.services.therapieplan;
|
||||||
|
|
||||||
|
import DNPM.services.FormService;
|
||||||
|
import DNPM.services.SettingsService;
|
||||||
|
import DNPM.services.therapieplan.DefaultTherapieplanService;
|
||||||
|
import DNPM.services.therapieplan.MultipleMtbTherapieplanService;
|
||||||
|
import DNPM.services.therapieplan.TherapieplanServiceFactory;
|
||||||
import de.itc.onkostar.api.IOnkostarApi;
|
import de.itc.onkostar.api.IOnkostarApi;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
Reference in New Issue
Block a user