fix bug in tests
This commit is contained in:
parent
d3db571294
commit
54f280437f
|
@ -138,10 +138,10 @@ public class NarrativeGenerationTests {
|
|||
|
||||
|
||||
Resource source;
|
||||
if (TestingUtilities.findTestResource("r5", "narrative", test.getId() + ".json")) {
|
||||
source = (Resource) new JsonParser().parse(TestingUtilities.loadTestResourceStream("r5", "narrative", test.getId() + ".json"));
|
||||
if (TestingUtilities.findTestResource("r4b", "narrative", test.getId() + ".json")) {
|
||||
source = (Resource) new JsonParser().parse(TestingUtilities.loadTestResourceStream("r4b", "narrative", test.getId() + ".json"));
|
||||
} else {
|
||||
source = (Resource) new XmlParser().parse(TestingUtilities.loadTestResourceStream("r5", "narrative", test.getId() + ".xml"));
|
||||
source = (Resource) new XmlParser().parse(TestingUtilities.loadTestResourceStream("r4b", "narrative", test.getId() + ".xml"));
|
||||
}
|
||||
|
||||
XhtmlNode x = RendererFactory.factory(source, rc).build(source);
|
||||
|
@ -158,7 +158,7 @@ public class NarrativeGenerationTests {
|
|||
org.hl7.fhir.r4b.elementmodel.Element e = Manager.parseSingle(context, TestingUtilities.loadTestResourceStream("r5", "narrative", test.getId() + ".xml"), FhirFormat.XML);
|
||||
x = RendererFactory.factory(source, rc).render(new ElementWrappers.ResourceWrapperMetaElement(rc, e));
|
||||
|
||||
target = TextFile.streamToString(TestingUtilities.loadTestResourceStream("r5", "narrative", test.getId() + "-meta.html"));
|
||||
target = TextFile.streamToString(TestingUtilities.loadTestResourceStream("r4b", "narrative", test.getId() + "-meta.html"));
|
||||
output = HEADER+new XhtmlComposer(true, true).compose(x)+FOOTER;
|
||||
ofn = TestingUtilities.tempFile("narrative", test.getId() + "-meta.output.html");
|
||||
TextFile.stringToFile(output, ofn);
|
||||
|
|
|
@ -10,3 +10,14 @@ v: {
|
|||
"system" : "http://loinc.org"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"code" : {
|
||||
"system" : "http://loinc.org",
|
||||
"code" : "3141-9",
|
||||
"display" : "Weight Measured"
|
||||
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||
v: {
|
||||
"display" : "Body weight Measured",
|
||||
"code" : "3141-9",
|
||||
"system" : "http://loinc.org"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
|
|
|
@ -10,3 +10,14 @@ v: {
|
|||
"system" : "http://snomed.info/sct"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"code" : {
|
||||
"system" : "http://snomed.info/sct",
|
||||
"code" : "27113001",
|
||||
"display" : "Body weight"
|
||||
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||
v: {
|
||||
"display" : "Body weight",
|
||||
"code" : "27113001",
|
||||
"system" : "http://snomed.info/sct"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
|
|
|
@ -9,3 +9,13 @@ v: {
|
|||
"system" : "http://unitsofmeasure.org"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"code" : {
|
||||
"system" : "http://unitsofmeasure.org",
|
||||
"code" : "[lb_av]"
|
||||
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||
v: {
|
||||
"display" : "[lb_av]",
|
||||
"code" : "[lb_av]",
|
||||
"system" : "http://unitsofmeasure.org"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
|
|
|
@ -307,3 +307,25 @@ v: {
|
|||
"system" : "http://loinc.org"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"code" : {
|
||||
"system" : "http://loinc.org",
|
||||
"code" : "29463-7",
|
||||
"display" : "Body Weight"
|
||||
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||
v: {
|
||||
"display" : "Body weight",
|
||||
"code" : "29463-7",
|
||||
"system" : "http://loinc.org"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"code" : {
|
||||
"system" : "http://loinc.org",
|
||||
"code" : "3141-9",
|
||||
"display" : "Body weight Measured"
|
||||
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||
v: {
|
||||
"display" : "Body weight Measured",
|
||||
"code" : "3141-9",
|
||||
"system" : "http://loinc.org"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
|
|
|
@ -332,3 +332,14 @@ v: {
|
|||
"system" : "http://snomed.info/sct"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"code" : {
|
||||
"system" : "http://snomed.info/sct",
|
||||
"code" : "27113001",
|
||||
"display" : "Body weight"
|
||||
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||
v: {
|
||||
"display" : "Body weight",
|
||||
"code" : "27113001",
|
||||
"system" : "http://snomed.info/sct"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
|
|
|
@ -37,3 +37,13 @@ v: {
|
|||
"system" : "http://unitsofmeasure.org"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"code" : {
|
||||
"system" : "http://unitsofmeasure.org",
|
||||
"code" : "[lb_av]"
|
||||
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||
v: {
|
||||
"display" : "[lb_av]",
|
||||
"code" : "[lb_av]",
|
||||
"system" : "http://unitsofmeasure.org"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
-------------------------------------------------------------------------------------
|
||||
{"hierarchical" : false, "valueSet" :{
|
||||
"resourceType" : "ValueSet",
|
||||
"compose" : {
|
||||
"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"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
|
@ -0,0 +1,11 @@
|
|||
-------------------------------------------------------------------------------------
|
||||
{"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"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
|
@ -0,0 +1,18 @@
|
|||
-------------------------------------------------------------------------------------
|
||||
{"hierarchical" : false, "valueSet" :{
|
||||
"resourceType" : "ValueSet",
|
||||
"compose" : {
|
||||
"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"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"resourceType" : "CapabilityStatement",
|
||||
"id" : "FhirServer",
|
||||
"meta" : {
|
||||
"tag" : [{
|
||||
"system" : "http://hl7.org/fhir/v3/ObservationValue",
|
||||
"code" : "SUBSETTED",
|
||||
"display" : "Subsetted"
|
||||
}]
|
||||
},
|
||||
"url" : "http://fhir.healthintersections.com.au/open/metadata",
|
||||
"version" : "4.0.1-2.0.12-SNAPSHOT",
|
||||
"name" : "FHIR Reference Server Conformance Statement",
|
||||
"status" : "active",
|
||||
"date" : "2022-01-10T11:07:19.254Z",
|
||||
"contact" : [{
|
||||
"telecom" : [{
|
||||
"system" : "other",
|
||||
"value" : "http://healthintersections.com.au/"
|
||||
}]
|
||||
}],
|
||||
"kind" : "instance",
|
||||
"instantiates" : ["http://hl7.org/fhir/CapabilityStatement/terminology-server"],
|
||||
"software" : {
|
||||
"name" : "Reference Server",
|
||||
"version" : "2.0.12-SNAPSHOT",
|
||||
"releaseDate" : "2021-12-20T02:28:03.769Z"
|
||||
},
|
||||
"fhirVersion" : "4.0.1",
|
||||
"format" : ["application/fhir+xml",
|
||||
"application/fhir+json"],
|
||||
"rest" : [{
|
||||
"mode" : "server",
|
||||
"security" : {
|
||||
"cors" : true
|
||||
},
|
||||
"operation" : [{
|
||||
"name" : "expand",
|
||||
"definition" : "http://hl7.org/fhir/OperationDefinition/ValueSet-expand"
|
||||
},
|
||||
{
|
||||
"name" : "lookup",
|
||||
"definition" : "http://hl7.org/fhir/OperationDefinition/ValueSet-lookup"
|
||||
},
|
||||
{
|
||||
"name" : "validate-code",
|
||||
"definition" : "http://hl7.org/fhir/OperationDefinition/Resource-validate"
|
||||
},
|
||||
{
|
||||
"name" : "translate",
|
||||
"definition" : "http://hl7.org/fhir/OperationDefinition/ConceptMap-translate"
|
||||
},
|
||||
{
|
||||
"name" : "closure",
|
||||
"definition" : "http://hl7.org/fhir/OperationDefinition/ConceptMap-closure"
|
||||
},
|
||||
{
|
||||
"name" : "versions",
|
||||
"definition" : "/OperationDefinition/fso-versions"
|
||||
}]
|
||||
}]
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,102 @@
|
|||
-------------------------------------------------------------------------------------
|
||||
{"hierarchical" : false, "valueSet" :{
|
||||
"resourceType" : "ValueSet",
|
||||
"compose" : {
|
||||
"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"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"resourceType" : "CapabilityStatement",
|
||||
"id" : "FhirServer",
|
||||
"meta" : {
|
||||
"tag" : [{
|
||||
"system" : "http://hl7.org/fhir/v3/ObservationValue",
|
||||
"code" : "SUBSETTED",
|
||||
"display" : "Subsetted"
|
||||
}]
|
||||
},
|
||||
"url" : "http://fhir.healthintersections.com.au/open/metadata",
|
||||
"version" : "4.0.1-2.0.12-SNAPSHOT",
|
||||
"name" : "FHIR Reference Server Conformance Statement",
|
||||
"status" : "active",
|
||||
"date" : "2022-01-10T11:07:19.254Z",
|
||||
"contact" : [{
|
||||
"telecom" : [{
|
||||
"system" : "other",
|
||||
"value" : "http://healthintersections.com.au/"
|
||||
}]
|
||||
}],
|
||||
"kind" : "instance",
|
||||
"instantiates" : ["http://hl7.org/fhir/CapabilityStatement/terminology-server"],
|
||||
"software" : {
|
||||
"name" : "Reference Server",
|
||||
"version" : "2.0.12-SNAPSHOT",
|
||||
"releaseDate" : "2021-12-20T02:28:03.769Z"
|
||||
},
|
||||
"fhirVersion" : "4.0.1",
|
||||
"format" : ["application/fhir+xml",
|
||||
"application/fhir+json"],
|
||||
"rest" : [{
|
||||
"mode" : "server",
|
||||
"security" : {
|
||||
"cors" : true
|
||||
},
|
||||
"operation" : [{
|
||||
"name" : "expand",
|
||||
"definition" : "http://hl7.org/fhir/OperationDefinition/ValueSet-expand"
|
||||
},
|
||||
{
|
||||
"name" : "lookup",
|
||||
"definition" : "http://hl7.org/fhir/OperationDefinition/ValueSet-lookup"
|
||||
},
|
||||
{
|
||||
"name" : "validate-code",
|
||||
"definition" : "http://hl7.org/fhir/OperationDefinition/Resource-validate"
|
||||
},
|
||||
{
|
||||
"name" : "translate",
|
||||
"definition" : "http://hl7.org/fhir/OperationDefinition/ConceptMap-translate"
|
||||
},
|
||||
{
|
||||
"name" : "closure",
|
||||
"definition" : "http://hl7.org/fhir/OperationDefinition/ConceptMap-closure"
|
||||
},
|
||||
{
|
||||
"name" : "versions",
|
||||
"definition" : "/OperationDefinition/fso-versions"
|
||||
}]
|
||||
}]
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue