From 12452cc2bf5fc8c85ecb8c94045d0cf2c5f068e3 Mon Sep 17 00:00:00 2001 From: Niklas Reimer Date: Wed, 21 Feb 2024 09:21:12 +0100 Subject: [PATCH] extend settings for mapping --- .../de/uksh/medic/etl/settings/Mapping.java | 45 +++++++++++++++++++ .../de/uksh/medic/etl/settings/Settings.java | 21 +++++++++ src/main/resources/settings.yml.example | 9 +++- 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 src/main/java/de/uksh/medic/etl/settings/Mapping.java diff --git a/src/main/java/de/uksh/medic/etl/settings/Mapping.java b/src/main/java/de/uksh/medic/etl/settings/Mapping.java new file mode 100644 index 0000000..ec8dbc3 --- /dev/null +++ b/src/main/java/de/uksh/medic/etl/settings/Mapping.java @@ -0,0 +1,45 @@ +package de.uksh.medic.etl.settings; + +/** + * Defines mappings between source and target profiles used for MDR mapping. + */ +public class Mapping { + + private String source; + private String sourceVersion; + private String target; + private String targetVersion; + + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source; + } + + public String getSourceVersion() { + return sourceVersion; + } + + public void setSourceVersion(String sourceVersion) { + this.sourceVersion = sourceVersion; + } + + public String getTarget() { + return target; + } + + public void setTarget(String target) { + this.target = target; + } + + public String getTargetVersion() { + return targetVersion; + } + + public void setTargetVersion(String targetVersion) { + this.targetVersion = targetVersion; + } + +} diff --git a/src/main/java/de/uksh/medic/etl/settings/Settings.java b/src/main/java/de/uksh/medic/etl/settings/Settings.java index 2fcde78..ff5784d 100644 --- a/src/main/java/de/uksh/medic/etl/settings/Settings.java +++ b/src/main/java/de/uksh/medic/etl/settings/Settings.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.net.URL; +import java.util.Map; /** * Settings for OpenEhrObds. @@ -12,6 +13,8 @@ public final class Settings { private static URL fhirTsUrl; private static CxxMdrSettings cxxmdr; + private static Map mapping; + private static int depthLimit; private Settings() {} @@ -33,4 +36,22 @@ public void setCxxMdrSettings(CxxMdrSettings newCxxMdr) { cxxmdr = newCxxMdr; } + public static Map getMapping() { + return mapping; + } + + @JsonProperty("mapping") + public void setMapping(Map newMapping) { + mapping = newMapping; + } + + public static int getDepthLimit() { + return depthLimit; + } + + @JsonProperty("depthLimit") + public void setDepthLimit(int newDepthLimit) { + depthLimit = newDepthLimit; + } + } diff --git a/src/main/resources/settings.yml.example b/src/main/resources/settings.yml.example index 007648d..4357c30 100644 --- a/src/main/resources/settings.yml.example +++ b/src/main/resources/settings.yml.example @@ -4,4 +4,11 @@ cxxmdr: password: basicUsername: basicPassword: -fhirTsUrl: \ No newline at end of file +fhirTsUrl: +mapping: + /Patient/Meldung/Tumorzuordnung: + source: + sourceVersion: 1 + target: + targetVersion: 1 +depthLimit: 4 \ No newline at end of file