diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/cli/model/CliContext.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/cli/model/CliContext.java index c5525cb0d..89395d687 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/cli/model/CliContext.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/cli/model/CliContext.java @@ -2,7 +2,6 @@ package org.hl7.fhir.validation.cli.model; import com.fasterxml.jackson.annotation.JsonProperty; import org.hl7.fhir.validation.Validator; -import org.hl7.fhir.validation.cli.utils.SnomedVersion; import java.util.*; @@ -47,7 +46,7 @@ public class CliContext { @JsonProperty("fhirpath") private String fhirpath = null; @JsonProperty("snomedCT") - private String snomedCT = SnomedVersion.INTL.getCode(); + private String snomedCT = "900000000000207008"; @JsonProperty("targetVer") private String targetVer = null; @@ -339,12 +338,18 @@ public class CliContext { return this; } - public SnomedVersion getSnomedCT() { - return SnomedVersion.getFromCode(snomedCT); - } @JsonProperty("snomedCT") public String getSnomedCTCode() { + if ("intl".equals(snomedCT)) return "900000000000207008"; + if ("us".equals(snomedCT)) return "731000124108"; + if ("uk".equals(snomedCT)) return "999000041000000102"; + if ("au".equals(snomedCT)) return "32506021000036107"; + if ("ca".equals(snomedCT)) return "20611000087101"; + if ("nl".equals(snomedCT)) return "11000146104"; + if ("se".equals(snomedCT)) return "45991000052106"; + if ("es".equals(snomedCT)) return "449081005"; + if ("dk".equals(snomedCT)) return "554471000005108"; return snomedCT; } diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/cli/utils/SnomedVersion.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/cli/utils/SnomedVersion.java deleted file mode 100644 index dc4f01462..000000000 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/cli/utils/SnomedVersion.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.hl7.fhir.validation.cli.utils; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; - -public enum SnomedVersion { - INTL("intl", "900000000000207008"), - US("us", "731000124108"), - UK("uk", "999000041000000102"), - AU("au", "32506021000036107"), - CA("ca", "20611000087101"), - NL("nl", "11000146104"), - SE("se", "45991000052106"), - ES("es", "449081005"), - DK("dk", "554471000005108"); - - private static final String DEFAULT_CODE = "900000000000207008"; - - private final String lang; - private final String code; - - SnomedVersion(String lang, String code) { - this.lang = lang; - this.code = code; - } - - public String getLang() { - return lang; - } - - public String getCode() { - return code; - } - - public static SnomedVersion getFromCode(String code) { - return lookup.get(code); - } - - private static final Map lookup = new HashMap<>(); - - static { - for (SnomedVersion s : SnomedVersion.values()) { - lookup.put(s.getCode(), s); - } - } -} \ No newline at end of file