Add support for R4B
This commit is contained in:
parent
9862f0a390
commit
54f085545d
|
@ -71,6 +71,11 @@ public class VersionUtilities {
|
||||||
if (isR4Ver(v)) {
|
if (isR4Ver(v)) {
|
||||||
return "hl7.fhir.r4.core";
|
return "hl7.fhir.r4.core";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isR4BVer(v)) {
|
||||||
|
return "hl7.fhir.r4b.core";
|
||||||
|
}
|
||||||
|
|
||||||
if ("current".equals(v)) {
|
if ("current".equals(v)) {
|
||||||
return "hl7.fhir.r5.core";
|
return "hl7.fhir.r5.core";
|
||||||
}
|
}
|
||||||
|
@ -122,17 +127,21 @@ public class VersionUtilities {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isSupportedVersion(String version) {
|
public static boolean isSupportedVersion(String version) {
|
||||||
return Utilities.existsInList(version, "1.0.2", "1.4.0", "3.0.2", "4.0.1", CURRENT_FULL_VERSION);
|
return Utilities.existsInList(version, "1.0.2", "1.4.0", "3.0.2", "4.0.1", "4.1.0", CURRENT_FULL_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String listSupportedVersions() {
|
public static String listSupportedVersions() {
|
||||||
return "1.0.2, 1.4.0, 3.0.2, 4.0.1, "+CURRENT_FULL_VERSION;
|
return "1.0.2, 1.4.0, 3.0.2, 4.0.1, 4.1.0, "+CURRENT_FULL_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isR5Ver(String ver) {
|
public static boolean isR5Ver(String ver) {
|
||||||
return ver != null && ver.startsWith(CURRENT_VERSION);
|
return ver != null && ver.startsWith(CURRENT_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isR4BVer(String ver) {
|
||||||
|
return ver != null && ver.startsWith("4.1");
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isR4Ver(String ver) {
|
public static boolean isR4Ver(String ver) {
|
||||||
return ver != null && ver.startsWith("4.0");
|
return ver != null && ver.startsWith("4.0");
|
||||||
}
|
}
|
||||||
|
|
|
@ -719,7 +719,8 @@ public class NpmPackage {
|
||||||
public String fhirVersion() {
|
public String fhirVersion() {
|
||||||
if ("hl7.fhir.core".equals(JSONUtil.str(npm, "name")))
|
if ("hl7.fhir.core".equals(JSONUtil.str(npm, "name")))
|
||||||
return JSONUtil.str(npm, "version");
|
return JSONUtil.str(npm, "version");
|
||||||
else if (JSONUtil.str(npm, "name").startsWith("hl7.fhir.r2.") || JSONUtil.str(npm, "name").startsWith("hl7.fhir.r2b.") || JSONUtil.str(npm, "name").startsWith("hl7.fhir.r3.") || JSONUtil.str(npm, "name").startsWith("hl7.fhir.r4.") || JSONUtil.str(npm, "name").startsWith("hl7.fhir.r5."))
|
else if (JSONUtil.str(npm, "name").startsWith("hl7.fhir.r2.") || JSONUtil.str(npm, "name").startsWith("hl7.fhir.r2b.") || JSONUtil.str(npm, "name").startsWith("hl7.fhir.r3.") ||
|
||||||
|
JSONUtil.str(npm, "name").startsWith("hl7.fhir.r4.") || JSONUtil.str(npm, "name").startsWith("hl7.fhir.r4b.") || JSONUtil.str(npm, "name").startsWith("hl7.fhir.r5."))
|
||||||
return JSONUtil.str(npm, "version");
|
return JSONUtil.str(npm, "version");
|
||||||
else {
|
else {
|
||||||
JsonObject dep = npm.getAsJsonObject("dependencies");
|
JsonObject dep = npm.getAsJsonObject("dependencies");
|
||||||
|
|
Loading…
Reference in New Issue