Skip to content

Commit

Permalink
extend settings for mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
nr23730 committed Feb 21, 2024
1 parent 766fd2f commit 12452cc
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 1 deletion.
45 changes: 45 additions & 0 deletions src/main/java/de/uksh/medic/etl/settings/Mapping.java
Original file line number Diff line number Diff line change
@@ -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;
}

}
21 changes: 21 additions & 0 deletions src/main/java/de/uksh/medic/etl/settings/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -12,6 +13,8 @@ public final class Settings {

private static URL fhirTsUrl;
private static CxxMdrSettings cxxmdr;
private static Map<String, Mapping> mapping;
private static int depthLimit;

private Settings() {}

Expand All @@ -33,4 +36,22 @@ public void setCxxMdrSettings(CxxMdrSettings newCxxMdr) {
cxxmdr = newCxxMdr;
}

public static Map<String, Mapping> getMapping() {
return mapping;
}

@JsonProperty("mapping")
public void setMapping(Map<String, Mapping> newMapping) {
mapping = newMapping;
}

public static int getDepthLimit() {
return depthLimit;
}

@JsonProperty("depthLimit")
public void setDepthLimit(int newDepthLimit) {
depthLimit = newDepthLimit;
}

}
9 changes: 8 additions & 1 deletion src/main/resources/settings.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@ cxxmdr:
password:
basicUsername:
basicPassword:
fhirTsUrl:
fhirTsUrl:
mapping:
/Patient/Meldung/Tumorzuordnung:
source:
sourceVersion: 1
target:
targetVersion: 1
depthLimit: 4

0 comments on commit 12452cc

Please sign in to comment.