mirror of
https://github.com/pcvolkmer/onkostar-plugin-dnpm.git
synced 2025-07-02 01:02:55 +00:00
Issue #42: Defaultangabe Version und Name sowie Typ der Pluginklasse
This commit is contained in:
12
src/main/java/DNPM/analyzer/Analyzer.java
Normal file
12
src/main/java/DNPM/analyzer/Analyzer.java
Normal file
@ -0,0 +1,12 @@
|
||||
package DNPM.analyzer;
|
||||
|
||||
import de.itc.onkostar.api.analysis.OnkostarPluginType;
|
||||
|
||||
public abstract class Analyzer implements IPluginPart {
|
||||
|
||||
@Override
|
||||
public final OnkostarPluginType getType() {
|
||||
return OnkostarPluginType.ANALYZER;
|
||||
}
|
||||
|
||||
}
|
25
src/main/java/DNPM/analyzer/BackendService.java
Normal file
25
src/main/java/DNPM/analyzer/BackendService.java
Normal file
@ -0,0 +1,25 @@
|
||||
package DNPM.analyzer;
|
||||
|
||||
import de.itc.onkostar.api.Disease;
|
||||
import de.itc.onkostar.api.Procedure;
|
||||
import de.itc.onkostar.api.analysis.OnkostarPluginType;
|
||||
|
||||
public abstract class BackendService implements IPluginPart {
|
||||
|
||||
@Override
|
||||
public final OnkostarPluginType getType() {
|
||||
return OnkostarPluginType.BACKEND_SERVICE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ein Backend-Service verwendet die Methode nicht, daher wird hier eine final Stub-Implementierung
|
||||
* verwendet, die ein Überschreiben verhindert.
|
||||
* @param procedure
|
||||
* @param disease
|
||||
*/
|
||||
@Override
|
||||
public final void analyze(Procedure procedure, Disease disease) {
|
||||
// No op
|
||||
}
|
||||
|
||||
}
|
@ -10,8 +10,6 @@ import de.itc.onkostar.api.Disease;
|
||||
import de.itc.onkostar.api.IOnkostarApi;
|
||||
import de.itc.onkostar.api.Procedure;
|
||||
import de.itc.onkostar.api.analysis.AnalyzerRequirement;
|
||||
import de.itc.onkostar.api.analysis.IProcedureAnalyzer;
|
||||
import de.itc.onkostar.api.analysis.OnkostarPluginType;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
@ -26,7 +24,7 @@ import java.util.Map;
|
||||
* @since 0.2.0
|
||||
*/
|
||||
@Component
|
||||
public class EinzelempfehlungAnalyzer implements IProcedureAnalyzer {
|
||||
public class EinzelempfehlungAnalyzer extends BackendService {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(EinzelempfehlungAnalyzer.class);
|
||||
|
||||
@ -50,21 +48,6 @@ public class EinzelempfehlungAnalyzer implements IProcedureAnalyzer {
|
||||
this.permissionEvaluator = permissionEvaluator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OnkostarPluginType getType() {
|
||||
return OnkostarPluginType.BACKEND_SERVICE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return "0.4.0";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "DNPM Einzelempfehlung Backend Service";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Stellt Funktionen zur Nutzung im Therapieplan-Unterformular für Einzelempfehlungen bereit";
|
||||
@ -93,11 +76,6 @@ public class EinzelempfehlungAnalyzer implements IProcedureAnalyzer {
|
||||
return AnalyzerRequirement.PROCEDURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void analyze(Procedure procedure, Disease disease) {
|
||||
// No op
|
||||
}
|
||||
|
||||
public List<Variant> getVariants(Map<String, Object> input) {
|
||||
var procedureId = AnalyzerUtils.getRequiredId(input, "id");
|
||||
|
||||
|
@ -6,8 +6,6 @@ import de.itc.onkostar.api.Item;
|
||||
import de.itc.onkostar.api.Procedure;
|
||||
import de.itc.onkostar.api.analysis.AnalyseTriggerEvent;
|
||||
import de.itc.onkostar.api.analysis.AnalyzerRequirement;
|
||||
import de.itc.onkostar.api.analysis.IProcedureAnalyzer;
|
||||
import de.itc.onkostar.api.analysis.OnkostarPluginType;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
@ -20,7 +18,7 @@ import java.util.Set;
|
||||
* @since 0.0.2
|
||||
*/
|
||||
@Component
|
||||
public class FollowUpAnalyzer implements IProcedureAnalyzer {
|
||||
public class FollowUpAnalyzer extends Analyzer {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
@ -30,21 +28,6 @@ public class FollowUpAnalyzer implements IProcedureAnalyzer {
|
||||
this.onkostarApi = onkostarApi;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OnkostarPluginType getType() {
|
||||
return OnkostarPluginType.ANALYZER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return "0.4.0";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "DNPM FollowUp Analyzer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Aktualisiert verknüpfte Formulare nach Änderungen im FollowUp-Formular";
|
||||
|
19
src/main/java/DNPM/analyzer/IPluginPart.java
Normal file
19
src/main/java/DNPM/analyzer/IPluginPart.java
Normal file
@ -0,0 +1,19 @@
|
||||
package DNPM.analyzer;
|
||||
|
||||
import de.itc.onkostar.api.analysis.IProcedureAnalyzer;
|
||||
|
||||
public interface IPluginPart extends IProcedureAnalyzer {
|
||||
|
||||
default String getVersion() {
|
||||
return "0.4.0";
|
||||
}
|
||||
|
||||
default String getName() {
|
||||
return "DNPM Plugin";
|
||||
}
|
||||
|
||||
default String getDescription() {
|
||||
return String.format("Plugin-Bestandteil '%s'", this.getClass().getSimpleName());
|
||||
}
|
||||
|
||||
}
|
@ -7,8 +7,6 @@ import de.itc.onkostar.api.Item;
|
||||
import de.itc.onkostar.api.Procedure;
|
||||
import de.itc.onkostar.api.analysis.AnalyseTriggerEvent;
|
||||
import de.itc.onkostar.api.analysis.AnalyzerRequirement;
|
||||
import de.itc.onkostar.api.analysis.IProcedureAnalyzer;
|
||||
import de.itc.onkostar.api.analysis.OnkostarPluginType;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
@ -25,7 +23,7 @@ import java.util.stream.Collectors;
|
||||
* @since 0.4.0
|
||||
*/
|
||||
@Component
|
||||
public class SystemtherapieAnalyzer implements IProcedureAnalyzer {
|
||||
public class SystemtherapieAnalyzer extends Analyzer {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
@ -41,21 +39,6 @@ public class SystemtherapieAnalyzer implements IProcedureAnalyzer {
|
||||
this.systemtherapieService = systemtherapieService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OnkostarPluginType getType() {
|
||||
return OnkostarPluginType.ANALYZER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return "0.4.0";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "DNPM Systemtherapie Analyzer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Aktualisiert verknüpfte Formulare nach Änderungen im Formularen vom Typ Systemtherapie";
|
||||
|
@ -8,8 +8,6 @@ import de.itc.onkostar.api.Disease;
|
||||
import de.itc.onkostar.api.Procedure;
|
||||
import de.itc.onkostar.api.analysis.AnalyseTriggerEvent;
|
||||
import de.itc.onkostar.api.analysis.AnalyzerRequirement;
|
||||
import de.itc.onkostar.api.analysis.IProcedureAnalyzer;
|
||||
import de.itc.onkostar.api.analysis.OnkostarPluginType;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@ -22,7 +20,7 @@ import java.util.Set;
|
||||
* @since 0.0.2
|
||||
*/
|
||||
@Component
|
||||
public class TherapieplanAnalyzer implements IProcedureAnalyzer {
|
||||
public class TherapieplanAnalyzer extends Analyzer {
|
||||
|
||||
private final TherapieplanServiceFactory therapieplanServiceFactory;
|
||||
|
||||
@ -40,21 +38,6 @@ public class TherapieplanAnalyzer implements IProcedureAnalyzer {
|
||||
this.permissionEvaluator = permissionEvaluator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OnkostarPluginType getType() {
|
||||
return OnkostarPluginType.ANALYZER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return "0.4.0";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "DNPM Therapieplan Analyzer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Aktualisiert Unterformulare nach Änderungen im Therapieplan-Formular";
|
||||
|
Reference in New Issue
Block a user