Merge branch 'master' of https://github.com/hapifhir/org.hl7.fhir.core into ConversionTypo

This commit is contained in:
Lloyd McKenzie 2022-09-10 12:32:36 -06:00
commit b71d5ceac2
25 changed files with 294 additions and 46 deletions

View File

@ -4,4 +4,4 @@
## Other code changes
* Rendering improvements for Patient and extension summary
* no changes

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.60</version>
<version>5.6.63-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -11,14 +11,21 @@ import org.hl7.fhir.exceptions.FHIRException;
public class BaseAdvisor_40_50 extends BaseAdvisor50<org.hl7.fhir.r4.model.Extension> {
private static final List<String> TestScriptIgnoredUrls = Arrays.asList("http://hl7.org/fhir/5.0/StructureDefinition/extension-TestScript.scope");
private boolean produceIllegalParameters = false;
public BaseAdvisor_40_50() {
}
public BaseAdvisor_40_50(Boolean failFast) {
this.failFast = failFast;
}
public BaseAdvisor_40_50(Boolean failFast, Boolean produceIllegalParameters) {
this.failFast = failFast;
this.produceIllegalParameters = produceIllegalParameters;
}
@Override
public boolean ignoreExtension(@Nonnull String path,
@ -30,4 +37,7 @@ public class BaseAdvisor_40_50 extends BaseAdvisor50<org.hl7.fhir.r4.model.Exten
return false;
}
public boolean produceIllegalParameters() {
return produceIllegalParameters;
}
}

View File

@ -2,6 +2,8 @@ package org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50;
import org.hl7.fhir.convertors.context.ConversionContext40_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.Type;
import org.hl7.fhir.r5.model.DataType;
public class Canonical40_50 {
public static org.hl7.fhir.r5.model.CanonicalType convertCanonical(org.hl7.fhir.r4.model.CanonicalType src) throws FHIRException {
@ -15,4 +17,31 @@ public class Canonical40_50 {
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
return tgt;
}
public static org.hl7.fhir.r5.model.UriType convertCanonicalToUri(org.hl7.fhir.r4.model.CanonicalType src) throws FHIRException {
org.hl7.fhir.r5.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.UriType(src.getValueAsString()) : new org.hl7.fhir.r5.model.UriType();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
return tgt;
}
public static org.hl7.fhir.r4.model.UriType convertCanonicalToUri(org.hl7.fhir.r5.model.CanonicalType src) throws FHIRException {
org.hl7.fhir.r4.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.UriType(src.getValueAsString()) : new org.hl7.fhir.r4.model.UriType();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
return tgt;
}
public static org.hl7.fhir.r5.model.CanonicalType convertUriToCanonical(org.hl7.fhir.r4.model.UriType src) throws FHIRException {
org.hl7.fhir.r5.model.CanonicalType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.CanonicalType(src.getValueAsString()) : new org.hl7.fhir.r5.model.CanonicalType();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
return tgt;
}
public static org.hl7.fhir.r4.model.CanonicalType convertUriToCanonical(org.hl7.fhir.r5.model.UriType src) throws FHIRException {
org.hl7.fhir.r4.model.CanonicalType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.CanonicalType(src.getValueAsString()) : new org.hl7.fhir.r4.model.CanonicalType();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
return tgt;
}
}

View File

@ -17,6 +17,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Url40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.ImplementationGuide;
import org.hl7.fhir.utilities.Utilities;
/*
@ -101,7 +102,7 @@ public class ImplementationGuide40_50 {
return tgt;
}
public static org.hl7.fhir.r4.model.ImplementationGuide convertImplementationGuide(org.hl7.fhir.r5.model.ImplementationGuide src) throws FHIRException {
public static org.hl7.fhir.r4.model.ImplementationGuide convertImplementationGuide(ImplementationGuide src, boolean produceIllegalParameters) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.ImplementationGuide tgt = new org.hl7.fhir.r4.model.ImplementationGuide();
@ -144,7 +145,7 @@ public class ImplementationGuide40_50 {
for (org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideGlobalComponent t : src.getGlobal())
tgt.addGlobal(convertImplementationGuideGlobalComponent(t));
if (src.hasDefinition())
tgt.setDefinition(convertImplementationGuideDefinitionComponent(src.getDefinition()));
tgt.setDefinition(convertImplementationGuideDefinitionComponent(src.getDefinition(), produceIllegalParameters));
if (src.hasManifest())
tgt.setManifest(convertImplementationGuideManifestComponent(src.getManifest()));
return tgt;
@ -2328,7 +2329,7 @@ public class ImplementationGuide40_50 {
return tgt;
}
public static org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionComponent convertImplementationGuideDefinitionComponent(org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionComponent src) throws FHIRException {
public static org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionComponent convertImplementationGuideDefinitionComponent(ImplementationGuide.ImplementationGuideDefinitionComponent src, boolean produceIllegalParameters) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionComponent();
@ -2340,16 +2341,16 @@ public class ImplementationGuide40_50 {
if (src.hasPage())
tgt.setPage(convertImplementationGuideDefinitionPageComponent(src.getPage()));
for (org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent t : src.getParameter()) {
// if (Utilities.existsInList(t.getCode().getCode(), "apply", "path-resource", "path-pages", "path-tx-cache", "expansion-parameter", "rule-broken-links", "generate-xml", "generate-json", "generate-turtle", "html-template"))
tgt.addParameter(convertImplementationGuideDefinitionParameterComponent(t));
// else {
// org.hl7.fhir.r4.model.Extension e = new org.hl7.fhir.r4.model.Extension(EXT_IG_DEFINITION_PARAMETER);
// org.hl7.fhir.r4.model.Extension eCode = new org.hl7.fhir.r4.model.Extension("code", new org.hl7.fhir.r4.model.StringType(t.getCode().getCode()));
// org.hl7.fhir.r4.model.Extension eValue = new org.hl7.fhir.r4.model.Extension("value", new org.hl7.fhir.r4.model.StringType(t.getValue()));
// e.addExtension(eCode);
// e.addExtension(eValue);
// tgt.addExtension(e);
// }
if (produceIllegalParameters || Utilities.existsInList(t.getCode().getCode(), "apply", "path-resource", "path-pages", "path-tx-cache", "expansion-parameter", "rule-broken-links", "generate-xml", "generate-json", "generate-turtle", "html-template")) {
tgt.addParameter(convertImplementationGuideDefinitionParameterComponent(t));
} else {
org.hl7.fhir.r4.model.Extension e = new org.hl7.fhir.r4.model.Extension(EXT_IG_DEFINITION_PARAMETER);
org.hl7.fhir.r4.model.Extension eCode = new org.hl7.fhir.r4.model.Extension("code", new org.hl7.fhir.r4.model.StringType(t.getCode().getCode()));
org.hl7.fhir.r4.model.Extension eValue = new org.hl7.fhir.r4.model.Extension("value", new org.hl7.fhir.r4.model.StringType(t.getValue()));
e.addExtension(eCode);
e.addExtension(eValue);
tgt.addExtension(e);
}
}
for (org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionTemplateComponent t : src.getTemplate())
tgt.addTemplate(convertImplementationGuideDefinitionTemplateComponent(t));

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv40_50.resources40_50;
import org.hl7.fhir.convertors.context.ConversionContext40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.CodeableConcept40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Coding40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.ContactPoint40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Canonical40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50;
@ -45,8 +46,11 @@ public class MessageHeader40_50 {
return null;
org.hl7.fhir.r5.model.MessageHeader tgt = new org.hl7.fhir.r5.model.MessageHeader();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt);
if (src.hasEvent())
tgt.setEvent(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getEvent()));
if (src.hasEventUriType())
tgt.setEvent(Canonical40_50.convertUriToCanonical(src.getEventUriType()));
if (src.hasEventCoding())
tgt.setEvent(Coding40_50.convertCoding(src.getEventCoding()));
for (org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent t : src.getDestination())
tgt.addDestination(convertMessageDestinationComponent(t));
if (src.hasSender())
@ -74,8 +78,10 @@ public class MessageHeader40_50 {
return null;
org.hl7.fhir.r4.model.MessageHeader tgt = new org.hl7.fhir.r4.model.MessageHeader();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt);
if (src.hasEvent())
tgt.setEvent(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getEvent()));
if (src.hasEventCanonicalType())
tgt.setEvent(Canonical40_50.convertCanonicalToUri(src.getEventCanonicalType()));
if (src.hasEventCoding())
tgt.setEvent(Coding40_50.convertCoding(src.getEventCoding()));
for (org.hl7.fhir.r5.model.MessageHeader.MessageDestinationComponent t : src.getDestination())
tgt.addDestination(convertMessageDestinationComponent(t));
if (src.hasSender())

View File

@ -385,7 +385,7 @@ public class Resource40_50 {
if (src instanceof org.hl7.fhir.r5.model.ImmunizationRecommendation)
return ImmunizationRecommendation40_50.convertImmunizationRecommendation((org.hl7.fhir.r5.model.ImmunizationRecommendation) src);
if (src instanceof org.hl7.fhir.r5.model.ImplementationGuide)
return ImplementationGuide40_50.convertImplementationGuide((org.hl7.fhir.r5.model.ImplementationGuide) src);
return ImplementationGuide40_50.convertImplementationGuide((org.hl7.fhir.r5.model.ImplementationGuide) src, advisor.produceIllegalParameters());
if (src instanceof org.hl7.fhir.r5.model.InsurancePlan)
return InsurancePlan40_50.convertInsurancePlan((org.hl7.fhir.r5.model.InsurancePlan) src);
if (src instanceof org.hl7.fhir.r5.model.Invoice)

View File

@ -0,0 +1,46 @@
package org.hl7.fhir.convertors.conv40_50;
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_40_50;
import org.hl7.fhir.convertors.conv40_50.resources40_50.ImplementationGuide40_50;
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_40_50;
import org.hl7.fhir.r5.model.ImplementationGuide;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.io.InputStream;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class ImplementationGuide40_50Test {
public void testProduceIllegalParameters() throws IOException {
ImplementationGuide r5_actual = getR5ImplementationGuide();
org.hl7.fhir.r4.model.ImplementationGuide converted = (org.hl7.fhir.r4.model.ImplementationGuide) VersionConvertorFactory_40_50.convertResource(
r5_actual,
new BaseAdvisor_40_50(true, true));
assertEquals(2, converted.getDefinition().getParameter().size());
assertEquals("copyrightyear", converted.getDefinition().getParameter().get(1).getCode());
assertEquals("2020+", converted.getDefinition().getParameter().get(1).getValue());
}
@Test
public void testDefaultParameters() throws IOException {
ImplementationGuide r5_actual = getR5ImplementationGuide();
org.hl7.fhir.r4.model.ImplementationGuide converted = (org.hl7.fhir.r4.model.ImplementationGuide) VersionConvertorFactory_40_50.convertResource(r5_actual);
assertEquals(1, converted.getDefinition().getParameter().size());
assertEquals("copyrightyear", converted.getDefinition().getExtension().get(0).getExtension().get(0).getValue().primitiveValue());
assertEquals("2020+", converted.getDefinition().getExtension().get(0).getExtension().get(1).getValue().primitiveValue());
}
private ImplementationGuide getR5ImplementationGuide() throws IOException {
ImplementationGuide r5_actual;
InputStream r5_stream = this.getClass().getResourceAsStream("/implementation_guide_50.json");
r5_actual = (ImplementationGuide) new org.hl7.fhir.r5.formats.JsonParser().parse(r5_stream);
return r5_actual;
}
}

View File

@ -0,0 +1,142 @@
{
"resourceType": "ImplementationGuide",
"id": "example",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: ImplementationGuide</b><a name=\"example\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource ImplementationGuide &quot;example&quot; </p></div><p><b>url</b>: <code>http://hl7.org/fhir/us/daf</code></p><p><b>version</b>: 0</p><p><b>name</b>: Data Access Framework (DAF)</p><p><b>status</b>: draft</p><p><b>experimental</b>: false</p><p><b>date</b>: 2015-01-01</p><p><b>publisher</b>: ONC / HL7 Joint project</p><p><b>contact</b>: ONC: <a href=\"http://www.healthit.gov\">http://www.healthit.gov</a>, HL7: <a href=\"http://hl7.org/fhir\">http://hl7.org/fhir</a></p><p><b>description</b>: The Data Access Framework (DAF) Initiative leverages the HL7 FHIR standards to standardize access to Meaningful Use Stage 2 structured information both within the organization and from external organizations</p><p><b>jurisdiction</b>: United States of America <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (unknown#US)</span></p><p><b>copyright</b>: Published by ONC under the standard FHIR license (CC0)</p><p><b>packageId</b>: hl7.fhir.us.daf</p><p><b>license</b>: CC0-1.0</p><p><b>fhirVersion</b>: 5.0.0</p><h3>DependsOns</h3><table class=\"grid\"><tr><td>-</td><td><b>Uri</b></td></tr><tr><td>*</td><td><a href=\"http://hl7.org/fhir/ImplementationGuide/uscore\">http://hl7.org/fhir/ImplementationGuide/uscore</a></td></tr></table><h3>Globals</h3><table class=\"grid\"><tr><td>-</td><td><b>Type</b></td><td><b>Profile</b></td></tr><tr><td>*</td><td>Patient</td><td><a href=\"http://hl7.org/fhir/us/core/StructureDefinition/patient\">http://hl7.org/fhir/us/core/StructureDefinition/patient</a></td></tr></table><blockquote><p><b>definition</b></p><h3>Groupings</h3><table class=\"grid\"><tr><td>-</td><td><b>Name</b></td><td><b>Description</b></td></tr><tr><td>*</td><td>test</td><td>Base package (not broken up into multiple packages)</td></tr></table><h3>Resources</h3><table class=\"grid\"><tr><td>-</td><td><b>Reference</b></td><td><b>Name</b></td><td><b>Description</b></td><td><b>Profile</b></td></tr><tr><td>*</td><td><a href=\"broken-link.html\">Patient/test</a></td><td>Test Example</td><td>A test example to show how an implementation guide works</td><td><a href=\"http://hl7.org/fhir/us/core/StructureDefinition/patient\">http://hl7.org/fhir/us/core/StructureDefinition/patient</a></td></tr></table><blockquote><p><b>page</b></p><p><b>name</b>: <code>patient-example.html</code></p><p><b>title</b>: Example Patient Page</p><p><b>generation</b>: html</p><h3>Pages</h3><table class=\"grid\"><tr><td>-</td><td><b>Name</b></td><td><b>Title</b></td><td><b>Generation</b></td></tr><tr><td>*</td><td><code>list.html</code></td><td>Value Set Page</td><td>html</td></tr></table></blockquote><h3>Parameters</h3><table class=\"grid\"><tr><td>-</td><td><b>Code</b></td><td><b>Value</b></td></tr><tr><td>*</td><td>Apply Metadata Value (Details: http://hl7.org/fhir/guide-parameter-code code apply = 'Apply Metadata Value', stated as 'null')</td><td>version</td></tr></table></blockquote><blockquote><p><b>manifest</b></p><p><b>rendering</b>: <a href=\"http://hl7.org/fhir/us/daf\">http://hl7.org/fhir/us/daf</a></p><h3>Resources</h3><table class=\"grid\"><tr><td>-</td><td><b>Reference</b></td><td><b>Profile</b></td><td><b>RelativePath</b></td></tr><tr><td>*</td><td><a href=\"broken-link.html\">Patient/test</a></td><td><a href=\"http://hl7.org/fhir/us/core/StructureDefinition/patient\">http://hl7.org/fhir/us/core/StructureDefinition/patient</a></td><td><code>patient-test.html#patient-test</code></td></tr></table><h3>Pages</h3><table class=\"grid\"><tr><td>-</td><td><b>Name</b></td><td><b>Title</b></td><td><b>Anchor</b></td></tr><tr><td>*</td><td>patient-test.html</td><td>Test Patient Example</td><td>patient-test, tx, uml</td></tr></table><p><b>image</b>: fhir.png</p><p><b>other</b>: fhir.css</p></blockquote></div>"
},
"url": "http://hl7.org/fhir/us/daf",
"version": "0",
"name": "Data Access Framework (DAF)",
"status": "draft",
"experimental": false,
"date": "2015-01-01",
"publisher": "ONC / HL7 Joint project",
"contact": [
{
"name": "ONC",
"telecom": [
{
"system": "url",
"value": "http://www.healthit.gov"
}
]
},
{
"name": "HL7",
"telecom": [
{
"system": "url",
"value": "http://hl7.org/fhir"
}
]
}
],
"description": "The Data Access Framework (DAF) Initiative leverages the HL7 FHIR standards to standardize access to Meaningful Use Stage 2 structured information both within the organization and from external organizations",
"jurisdiction": [
{
"coding": [
{
"system": "urn:iso:std:iso:3166",
"code": "US"
}
]
}
],
"copyright": "Published by ONC under the standard FHIR license (CC0)",
"packageId": "hl7.fhir.us.daf",
"license": "CC0-1.0",
"fhirVersion": [
"5.0.0"
],
"dependsOn": [
{
"uri": "http://hl7.org/fhir/ImplementationGuide/uscore"
}
],
"global": [
{
"type": "Patient",
"profile": "http://hl7.org/fhir/us/core/StructureDefinition/patient"
}
],
"definition": {
"grouping": [
{
"name": "test",
"description": "Base package (not broken up into multiple packages)"
}
],
"resource": [
{
"reference": {
"reference": "Patient/test"
},
"name": "Test Example",
"description": "A test example to show how an implementation guide works",
"profile": [
"http://hl7.org/fhir/us/core/StructureDefinition/patient"
]
}
],
"page": {
"name": "patient-example.html",
"title": "Example Patient Page",
"generation": "html",
"page": [
{
"name": "list.html",
"title": "Value Set Page",
"generation": "html"
}
]
},
"parameter": [
{
"code": {
"system": "http://hl7.org/fhir/guide-parameter-code",
"code": "apply"
},
"value": "version"
},
{
"code" : {
"system": "http://hl7.org/fhir/guide-parameter-code",
"code": "copyrightyear"
},
"value": "2020+"
}
]
},
"manifest": {
"rendering": "http://hl7.org/fhir/us/daf",
"resource": [
{
"reference": {
"reference": "Patient/test"
},
"profile": [
"http://hl7.org/fhir/us/core/StructureDefinition/patient"
],
"relativePath": "patient-test.html#patient-test"
}
],
"page": [
{
"name": "patient-test.html",
"title": "Test Patient Example",
"anchor": [
"patient-test",
"tx",
"uml"
]
}
],
"image": [
"fhir.png"
],
"other": [
"fhir.css"
]
}
}

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.60</version>
<version>5.6.63-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.60</version>
<version>5.6.63-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.60</version>
<version>5.6.63-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.60</version>
<version>5.6.63-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.60</version>
<version>5.6.63-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.60</version>
<version>5.6.63-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -115,7 +115,11 @@ public abstract class TerminologyRenderer extends ResourceRenderer {
for (UsedConceptMap m : maps) {
XhtmlNode td = tr.td();
XhtmlNode b = td.b();
XhtmlNode a = b.ah(getContext().getSpecificationLink()+m.getLink());
String link = m.getLink();
if (!Utilities.isAbsoluteUrl(link)) {
link = getContext().getSpecificationLink()+link;
}
XhtmlNode a = b.ah(link);
a.addText(m.getDetails().getName());
if (m.getDetails().isDoDescription() && m.getMap().hasDescription())
addMarkdown(td, m.getMap().getDescription());

View File

@ -844,14 +844,15 @@ public class ValueSetRenderer extends TerminologyRenderer {
}
private void addRefToCode(XhtmlNode td, String target, String vslink, String code) {
CodeSystem cs = getContext().getWorker().fetchCodeSystem(target);
String cslink = getCsRef(cs);
XhtmlNode a = null;
if (cslink != null)
a = td.ah(getContext().getSpecificationLink()+cslink+"#"+cs.getId()+"-"+code);
else
a = td.ah(getContext().getSpecificationLink()+vslink+"#"+code);
a.addText(code);
addCodeToTable(false, target, code, null, td);
// CodeSystem cs = getContext().getWorker().fetchCodeSystem(target);
// String cslink = getCsRef(cs);
// String link = cslink != null ? cslink+"#"+cs.getId()+"-"+code : vslink+"#"+code;
// if (!Utilities.isAbsoluteUrl(link)) {
// link = getContext().getSpecificationLink()+link;
// }
// XhtmlNode a = td.ah(link);
// a.addText(code);
}
private boolean generateComposition(XhtmlNode x, ValueSet vs, boolean header, List<UsedConceptMap> maps) throws FHIRException, IOException {

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.60</version>
<version>5.6.63-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.60</version>
<version>5.6.63-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -384,7 +384,7 @@ public class Turtle {
public String asHtml() throws Exception {
StringBuilder b = new StringBuilder();
b.append("<pre class=\"rdf\"><code class=\"language-turtle\">\r\n");
b.append("<pre class=\"rdf\" style=\"white-space: pre; overflow: hidden\"><code class=\"language-turtle\">\r\n");
commitPrefixes(b);
for (Section s : sections) {
commitSection(b, s);

View File

@ -53,7 +53,7 @@ import org.w3c.dom.Text;
public class XhtmlGenerator {
private static final int LINE_LIMIT = 85;
private static final int LINE_LIMIT = 78;
private XhtmlGeneratorAdorner adorner;
public XhtmlGenerator(XhtmlGeneratorAdorner adorner) {
@ -66,7 +66,7 @@ public class XhtmlGenerator {
out.write("<div class=\"example\">\r\n");
out.write("<p>Example Instance \""+name+"\""+(desc == null ? "" : ": "+Utilities.escapeXml(desc))+"</p>\r\n");
out.write("<pre class=\"xml\">\r\n");
out.write("<pre class=\"xml\" style=\"white-space: pre; overflow: hidden\">\r\n");
XhtmlGeneratorAdornerState state = null; // adorner == null ? new XhtmlGeneratorAdornerState("", "") : adorner.getState(this, null, null);
for (int i = 0; i < doc.getChildNodes().getLength(); i++)
@ -86,7 +86,7 @@ public class XhtmlGenerator {
out.write("<div class=\"example\">\r\n");
out.write("<p>"+Utilities.escapeXml(desc)+"</p>\r\n");
if (adorn) {
out.write("<pre class=\"xml\">\r\n");
out.write("<pre class=\"xml\" style=\"white-space: pre; overflow: hidden\">\r\n");
out.write("&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n");
out.write("\r\n");
@ -95,7 +95,7 @@ public class XhtmlGenerator {
writeNode(out, doc.getChildNodes().item(i), state, level);
out.write("</pre>\r\n");
} else {
out.write("<code class=\"xml\">\r\n");
out.write("<code class=\"xml\" style=\"white-space: pre; overflow: hidden\">\r\n");
for (int i = 0; i < doc.getChildNodes().getLength(); i++)
writeNodePlain(out, doc.getChildNodes().item(i), level);

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.60</version>
<version>5.6.63-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.60</version>
<version>5.6.63-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -288,6 +288,15 @@ public class StructureDefinitionValidator extends BaseValidator {
case "Extension" :return addCharacteristicsForType(set, "can-bind");
case "Narrative" :return addCharacteristicsForType(set);
case "Element" :return addCharacteristicsForType(set);
case "MoneyQuantity" :return addCharacteristicsForType(set);
case "SimpleQuantity" :return addCharacteristicsForType(set);
case "MarketingStatus" :return addCharacteristicsForType(set);
case "ExtendedContactDetail" :return addCharacteristicsForType(set);
case "VirtualServiceDetail" :return addCharacteristicsForType(set);
case "Availability" :return addCharacteristicsForType(set);
case "MonetaryComponent" :return addCharacteristicsForType(set);
case "ElementDefinition" :return addCharacteristicsForType(set);
case "BackboneElement" :return addCharacteristicsForType(set);
default:
if (context.getResourceNames().contains(tc))

View File

@ -14,7 +14,7 @@
HAPI FHIR
-->
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.60</version>
<version>5.6.63-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>