fix failing tests
This commit is contained in:
parent
c9416e9a56
commit
48e86fa905
|
@ -4,6 +4,7 @@ import java.net.URISyntaxException;
|
|||
|
||||
import org.hl7.fhir.r5.terminologies.TerminologyClient;
|
||||
import org.hl7.fhir.utilities.FhirPublication;
|
||||
import org.hl7.fhir.utilities.Servers;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.VersionUtilities;
|
||||
|
||||
|
@ -60,10 +61,9 @@ public class TerminologyClientFactory {
|
|||
private static String checkEndsWith(String term, String url) {
|
||||
if (url.endsWith(term))
|
||||
return url;
|
||||
if (url.startsWith("http://tx.fhir.org") || url.startsWith("https://tx.fhir.org"))
|
||||
return Utilities.pathURL(url, term);
|
||||
if (url.equals("http://local.fhir.org"))
|
||||
if (Servers.isTxFhirOrg(url)) {
|
||||
return Utilities.pathURL(url, term);
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,5 +6,8 @@ public class Servers {
|
|||
public static final String TX_SERVER_DEV = "http://tx-dev.fhir.org";
|
||||
public static final String TX_SERVER_LOCAL = "http://local.fhir.org";
|
||||
|
||||
public static boolean isTxFhirOrg(String s) {
|
||||
return Utilities.existsInList(s.replace("https://", "http://"), TX_SERVER_PROD, TX_SERVER_DEV, TX_SERVER_LOCAL);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
|
||||
public class ValidationEngineTests {
|
||||
|
||||
private static final String DEF_TX = Servers.TX_SERVER_DEV;
|
||||
// private static final String DEF_TX = Servers.TX_SERVER_LOCAL;
|
||||
// private static final String DEF_TX = Servers.TX_SERVER_DEV;
|
||||
private static final String DEF_TX = Servers.TX_SERVER_LOCAL;
|
||||
|
||||
public static boolean inbuild;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"version" : "1.0.2-2.0.14",
|
||||
"name" : "FHIR Reference Server Conformance Statement",
|
||||
"status" : "active",
|
||||
"date" : "2023-04-14T06:49:56.234Z",
|
||||
"date" : "2023-04-14T12:38:49.075Z",
|
||||
"contact" : [{
|
||||
"telecom" : [{
|
||||
"system" : "other",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"system" : "http://loinc.org",
|
||||
"code" : "3141-9",
|
||||
"display" : "Weight Measured"
|
||||
}, "valueSet" :null, "langs":"[en]", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
|
||||
}, "valueSet" :null, "langs":"[en]", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||
v: {
|
||||
"display" : "Body weight Measured",
|
||||
"code" : "3141-9",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"system" : "http://snomed.info/sct",
|
||||
"code" : "27113001",
|
||||
"display" : "Body weight"
|
||||
}, "valueSet" :null, "langs":"[en]", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
|
||||
}, "valueSet" :null, "langs":"[en]", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||
v: {
|
||||
"display" : "Body weight",
|
||||
"code" : "27113001",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{"code" : {
|
||||
"system" : "http://unitsofmeasure.org",
|
||||
"code" : "[lb_av]"
|
||||
}, "valueSet" :null, "langs":"[en]", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
|
||||
}, "valueSet" :null, "langs":"[en]", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||
v: {
|
||||
"display" : "[lb_av]",
|
||||
"code" : "[lb_av]",
|
||||
|
|
|
@ -307,3 +307,25 @@ v: {
|
|||
"system" : "http://loinc.org"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"code" : {
|
||||
"system" : "http://loinc.org",
|
||||
"code" : "29463-7",
|
||||
"display" : "Body Weight"
|
||||
}, "valueSet" :null, "langs":"[en]", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||
v: {
|
||||
"severity" : "error",
|
||||
"error" : "Error parsing response message: only whitespace content allowed before start tag and not D (position: START_DOCUMENT seen D... @1:1)",
|
||||
"class" : "SERVER_ERROR"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"code" : {
|
||||
"system" : "http://loinc.org",
|
||||
"code" : "3141-9",
|
||||
"display" : "Body weight Measured"
|
||||
}, "valueSet" :null, "langs":"[en]", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||
v: {
|
||||
"severity" : "error",
|
||||
"error" : "Error parsing response message: only whitespace content allowed before start tag and not D (position: START_DOCUMENT seen D... @1:1)",
|
||||
"class" : "SERVER_ERROR"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
|
|
|
@ -357,3 +357,14 @@ v: {
|
|||
"class" : "UNKNOWN"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"code" : {
|
||||
"system" : "http://snomed.info/sct",
|
||||
"code" : "27113001",
|
||||
"display" : "Body weight"
|
||||
}, "valueSet" :null, "langs":"[en]", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||
v: {
|
||||
"severity" : "error",
|
||||
"error" : "Error parsing response message: only whitespace content allowed before start tag and not D (position: START_DOCUMENT seen D... @1:1)",
|
||||
"class" : "SERVER_ERROR"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
|
|
|
@ -39,3 +39,13 @@ v: {
|
|||
"system" : "http://unitsofmeasure.org"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"code" : {
|
||||
"system" : "http://unitsofmeasure.org",
|
||||
"code" : "[lb_av]"
|
||||
}, "valueSet" :null, "langs":"[en]", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||
v: {
|
||||
"severity" : "error",
|
||||
"error" : "Error parsing response message: only whitespace content allowed before start tag and not D (position: START_DOCUMENT seen D... @1:1)",
|
||||
"class" : "SERVER_ERROR"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue