From af7fd1566713c51583b495907296b1d1a2b9cb27 Mon Sep 17 00:00:00 2001 From: dotasek Date: Fri, 17 Jun 2022 18:15:48 -0400 Subject: [PATCH] Rebuild caches + fix parse of JSON in FHIRRequestBuilder --- .../client/network/FhirRequestBuilder.java | 2 +- .../1.0.2/.capabilityStatement.cache | 2 +- .../1.4.0/.capabilityStatement.cache | 2 +- .../3.0.2/.capabilityStatement.cache | 2 +- .../4.0.1/.capabilityStatement.cache | 2 +- .../4.0.1/.terminologyCapabilities.cache | 2 +- .../4.3.0/.capabilityStatement.cache | 2 +- .../4.3.0/.terminologyCapabilities.cache | 2 +- .../4.5.0/.capabilityStatement.cache | 2 +- .../4.5.0/.terminologyCapabilities.cache | 2 +- src/test/resources/txCache/iso4217.cache | 19 ---- src/test/resources/txCache/lang.cache | 11 -- src/test/resources/txCache/loinc.cache | 90 --------------- src/test/resources/txCache/mimetypes.cache | 19 ---- src/test/resources/txCache/ucum.cache | 103 ------------------ 15 files changed, 10 insertions(+), 252 deletions(-) delete mode 100644 src/test/resources/txCache/iso4217.cache delete mode 100644 src/test/resources/txCache/lang.cache delete mode 100644 src/test/resources/txCache/loinc.cache delete mode 100644 src/test/resources/txCache/mimetypes.cache delete mode 100644 src/test/resources/txCache/ucum.cache diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/client/network/FhirRequestBuilder.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/client/network/FhirRequestBuilder.java index 87e6d57ee..d3425d5f6 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/client/network/FhirRequestBuilder.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/client/network/FhirRequestBuilder.java @@ -255,7 +255,7 @@ public class FhirRequestBuilder { byte[] body = response.body().bytes(); String contentType = response.header("Content-Type"); if (body != null) { - if (contentType.contains(ResourceFormat.RESOURCE_XML.getHeader()) || contentType.contains("text/xml+fhir")) { + if (contentType.contains(ResourceFormat.RESOURCE_XML.getHeader()) || contentType.contains(ResourceFormat.RESOURCE_JSON.getHeader()) || contentType.contains("text/xml+fhir")) { Resource rf = getParser(format).parse(body); if (rf instanceof Bundle) feed = (Bundle) rf; diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/1.0.2/.capabilityStatement.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/1.0.2/.capabilityStatement.cache index a6c3776e2..a3159b550 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/1.0.2/.capabilityStatement.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/1.0.2/.capabilityStatement.cache @@ -16,7 +16,7 @@ "version" : "1.0.2-2.0.14", "name" : "FHIR Reference Server Conformance Statement", "status" : "active", - "date" : "2022-06-09T21:15:44.743Z", + "date" : "2022-06-17T22:07:09.897Z", "contact" : [{ "telecom" : [{ "system" : "other", diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/1.4.0/.capabilityStatement.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/1.4.0/.capabilityStatement.cache index 53de873c9..686dd509d 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/1.4.0/.capabilityStatement.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/1.4.0/.capabilityStatement.cache @@ -16,7 +16,7 @@ "version" : "3.0.2-2.0.14", "name" : "FHIR Reference Server Conformance Statement", "status" : "active", - "date" : "2022-06-09T21:14:05.196Z", + "date" : "2022-06-15T16:31:15.631Z", "contact" : [{ "telecom" : [{ "system" : "other", diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/3.0.2/.capabilityStatement.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/3.0.2/.capabilityStatement.cache index 333a0267c..686dd509d 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/3.0.2/.capabilityStatement.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/3.0.2/.capabilityStatement.cache @@ -16,7 +16,7 @@ "version" : "3.0.2-2.0.14", "name" : "FHIR Reference Server Conformance Statement", "status" : "active", - "date" : "2022-06-09T21:13:00.228Z", + "date" : "2022-06-15T16:31:15.631Z", "contact" : [{ "telecom" : [{ "system" : "other", diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.0.1/.capabilityStatement.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.0.1/.capabilityStatement.cache index c49c788e1..f2a8b0787 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.0.1/.capabilityStatement.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.0.1/.capabilityStatement.cache @@ -12,7 +12,7 @@ "version" : "4.0.1-2.0.14", "name" : "FHIR Reference Server Conformance Statement", "status" : "active", - "date" : "2022-06-09T21:09:34.321Z", + "date" : "2022-06-17T22:02:53.771Z", "contact" : [{ "telecom" : [{ "system" : "other", diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.0.1/.terminologyCapabilities.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.0.1/.terminologyCapabilities.cache index a29ea26b8..2538dfc2c 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.0.1/.terminologyCapabilities.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.0.1/.terminologyCapabilities.cache @@ -5,7 +5,7 @@ "version" : "1.0.0", "name" : "FHIR Reference Server Teminology Capability Statement", "status" : "active", - "date" : "2022-06-09T11:12:53.805Z", + "date" : "2022-06-17T22:02:55.131Z", "contact" : [{ "telecom" : [{ "system" : "other", diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.3.0/.capabilityStatement.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.3.0/.capabilityStatement.cache index 1a3a1aa7b..433ddb184 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.3.0/.capabilityStatement.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.3.0/.capabilityStatement.cache @@ -12,7 +12,7 @@ "version" : "4.0.1-2.0.14", "name" : "FHIR Reference Server Conformance Statement", "status" : "active", - "date" : "2022-06-09T21:16:00.478Z", + "date" : "2022-06-17T22:07:43.178Z", "contact" : [{ "telecom" : [{ "system" : "other", diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.3.0/.terminologyCapabilities.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.3.0/.terminologyCapabilities.cache index a29ea26b8..42c364c4d 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.3.0/.terminologyCapabilities.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.3.0/.terminologyCapabilities.cache @@ -5,7 +5,7 @@ "version" : "1.0.0", "name" : "FHIR Reference Server Teminology Capability Statement", "status" : "active", - "date" : "2022-06-09T11:12:53.805Z", + "date" : "2022-06-17T22:07:43.413Z", "contact" : [{ "telecom" : [{ "system" : "other", diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.5.0/.capabilityStatement.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.5.0/.capabilityStatement.cache index 3f9c6d073..d8124af61 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.5.0/.capabilityStatement.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.5.0/.capabilityStatement.cache @@ -12,7 +12,7 @@ "version" : "4.0.1-2.0.14", "name" : "FHIR Reference Server Conformance Statement", "status" : "active", - "date" : "2022-06-09T21:12:46.775Z", + "date" : "2022-06-17T22:03:23.787Z", "contact" : [{ "telecom" : [{ "system" : "other", diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.5.0/.terminologyCapabilities.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.5.0/.terminologyCapabilities.cache index a29ea26b8..c00ed0a48 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.5.0/.terminologyCapabilities.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/4.5.0/.terminologyCapabilities.cache @@ -5,7 +5,7 @@ "version" : "1.0.0", "name" : "FHIR Reference Server Teminology Capability Statement", "status" : "active", - "date" : "2022-06-09T11:12:53.805Z", + "date" : "2022-06-17T22:03:23.912Z", "contact" : [{ "telecom" : [{ "system" : "other", diff --git a/src/test/resources/txCache/iso4217.cache b/src/test/resources/txCache/iso4217.cache deleted file mode 100644 index 7fc3768bc..000000000 --- a/src/test/resources/txCache/iso4217.cache +++ /dev/null @@ -1,19 +0,0 @@ -------------------------------------------------------------------------------------- -{"hierarchical" : false, "valueSet" :{ - "resourceType" : "ValueSet", - "compose" : { - "inactive" : true, - "include" : [{ - "system" : "urn:iso:std:iso:4217" - }] - } -}}#### -e: { - "error" : "java.lang.NullPointerException" -} -------------------------------------------------------------------------------------- -{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/currencies", "version": "4.0.1"}#### -e: { - "error" : "java.lang.NullPointerException" -} -------------------------------------------------------------------------------------- diff --git a/src/test/resources/txCache/lang.cache b/src/test/resources/txCache/lang.cache deleted file mode 100644 index 9eff9c452..000000000 --- a/src/test/resources/txCache/lang.cache +++ /dev/null @@ -1,11 +0,0 @@ -------------------------------------------------------------------------------------- -{"code" : { - "system" : "urn:ietf:bcp:47", - "code" : "fr-CA" -}, "valueSet" :null, "lang":"en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}#### -v: { - "severity" : "error", - "error" : "Attempt to use Terminology server when no Terminology server is available", - "class" : "SERVER_ERROR" -} -------------------------------------------------------------------------------------- diff --git a/src/test/resources/txCache/loinc.cache b/src/test/resources/txCache/loinc.cache deleted file mode 100644 index 0eff5d126..000000000 --- a/src/test/resources/txCache/loinc.cache +++ /dev/null @@ -1,90 +0,0 @@ -------------------------------------------------------------------------------------- -{"hierarchical" : false, "valueSet" :{ - "resourceType" : "ValueSet", - "compose" : { - "inactive" : true, - "include" : [{ - "system" : "http://loinc.org", - "concept" : [{ - "extension" : [{ - "url" : "http://hl7.org/fhir/StructureDefinition/valueset-label", - "valueString" : "A." - }], - "code" : "LA20752-4", - "display" : "Within 24 hours" - }, - { - "extension" : [{ - "url" : "http://hl7.org/fhir/StructureDefinition/valueset-label", - "valueString" : "B." - }], - "code" : "LA20753-2", - "display" : "After 24 hours but before 3 days" - }, - { - "extension" : [{ - "url" : "http://hl7.org/fhir/StructureDefinition/valueset-label", - "valueString" : "C." - }], - "code" : "LA20754-0", - "display" : "Three days or later" - }, - { - "extension" : [{ - "url" : "http://hl7.org/fhir/StructureDefinition/valueset-label", - "valueString" : "D." - }], - "code" : "LA4489-6", - "display" : "Unknown" - }] - }] - } -}}#### -e: { - "error" : "java.lang.NullPointerException" -} -------------------------------------------------------------------------------------- -{"hierarchical" : false, "valueSet" :{ - "resourceType" : "ValueSet", - "compose" : { - "include" : [{ - "system" : "http://loinc.org", - "concept" : [{ - "extension" : [{ - "url" : "http://hl7.org/fhir/StructureDefinition/valueset-label", - "valueString" : "A." - }], - "code" : "LA20752-4", - "display" : "Within 24 hours" - }, - { - "extension" : [{ - "url" : "http://hl7.org/fhir/StructureDefinition/valueset-label", - "valueString" : "B." - }], - "code" : "LA20753-2", - "display" : "After 24 hours but before 3 days" - }, - { - "extension" : [{ - "url" : "http://hl7.org/fhir/StructureDefinition/valueset-label", - "valueString" : "C." - }], - "code" : "LA20754-0", - "display" : "Three days or later" - }, - { - "extension" : [{ - "url" : "http://hl7.org/fhir/StructureDefinition/valueset-label", - "valueString" : "D." - }], - "code" : "LA4489-6", - "display" : "Unknown" - }] - }] - } -}}#### -e: { - "error" : "java.lang.NullPointerException" -} -------------------------------------------------------------------------------------- diff --git a/src/test/resources/txCache/mimetypes.cache b/src/test/resources/txCache/mimetypes.cache deleted file mode 100644 index a55ea4fc6..000000000 --- a/src/test/resources/txCache/mimetypes.cache +++ /dev/null @@ -1,19 +0,0 @@ -------------------------------------------------------------------------------------- -{"hierarchical" : false, "valueSet" :{ - "resourceType" : "ValueSet", - "compose" : { - "inactive" : true, - "include" : [{ - "system" : "urn:ietf:bcp:13" - }] - } -}}#### -e: { - "error" : "java.lang.NullPointerException" -} -------------------------------------------------------------------------------------- -{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/mimetypes", "version": "4.0.1"}#### -e: { - "error" : "java.lang.NullPointerException" -} -------------------------------------------------------------------------------------- diff --git a/src/test/resources/txCache/ucum.cache b/src/test/resources/txCache/ucum.cache deleted file mode 100644 index f6e1ac4e5..000000000 --- a/src/test/resources/txCache/ucum.cache +++ /dev/null @@ -1,103 +0,0 @@ -------------------------------------------------------------------------------------- -{"hierarchical" : false, "valueSet" :{ - "resourceType" : "ValueSet", - "compose" : { - "inactive" : true, - "include" : [{ - "system" : "http://unitsofmeasure.org", - "concept" : [{ - "extension" : [{ - "url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition", - "valueString" : "second" - }], - "code" : "s", - "display" : "second", - "designation" : [{ - "language" : "zh", - "value" : "秒" - }] - }, - { - "extension" : [{ - "url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition", - "valueString" : "minute" - }], - "code" : "min", - "display" : "minute", - "designation" : [{ - "language" : "zh", - "value" : "分钟" - }] - }, - { - "extension" : [{ - "url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition", - "valueString" : "hour" - }], - "code" : "h", - "display" : "hour", - "designation" : [{ - "language" : "zh", - "value" : "小时" - }] - }, - { - "extension" : [{ - "url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition", - "valueString" : "day" - }], - "code" : "d", - "display" : "day", - "designation" : [{ - "language" : "zh", - "value" : "天" - }] - }, - { - "extension" : [{ - "url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition", - "valueString" : "week" - }], - "code" : "wk", - "display" : "week", - "designation" : [{ - "language" : "zh", - "value" : "星期" - }] - }, - { - "extension" : [{ - "url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition", - "valueString" : "month" - }], - "code" : "mo", - "display" : "month", - "designation" : [{ - "language" : "zh", - "value" : "月" - }] - }, - { - "extension" : [{ - "url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition", - "valueString" : "year" - }], - "code" : "a", - "display" : "year", - "designation" : [{ - "language" : "zh", - "value" : "年" - }] - }] - }] - } -}}#### -e: { - "error" : "java.lang.NullPointerException" -} -------------------------------------------------------------------------------------- -{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/units-of-time", "version": "4.0.1"}#### -e: { - "error" : "java.lang.NullPointerException" -} --------------------------------------------------------------------------------------