Merge pull request #374 from hapifhir/gg-v5120

new release
This commit is contained in:
Grahame Grieve 2020-11-05 15:28:15 +11:00 committed by GitHub
commit 91f641fd05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 113 additions and 50 deletions

View File

@ -0,0 +1,11 @@
Validator changes:
* (none)
other code changes:
* fix bug when converting positiveInt between versions
* fix bug raising error when processing bundles
* don't use prism for big binaries when rendering library
* fix parameters renderer to create proper anchors
* Don't render id/base/other properties of Resource itself in auto-narrative generator
* fix bug where extension values not generated for simple extensions
* fix bug rendering content references in profiles

View File

@ -2479,8 +2479,6 @@ public class VersionConvertor_10_40 {
return convertId((org.hl7.fhir.dstu2.model.IdType) src);
if (src instanceof org.hl7.fhir.dstu2.model.InstantType)
return convertInstant((org.hl7.fhir.dstu2.model.InstantType) src);
if (src instanceof org.hl7.fhir.dstu2.model.IntegerType)
return convertInteger((org.hl7.fhir.dstu2.model.IntegerType) src);
if (src instanceof org.hl7.fhir.dstu2.model.MarkdownType)
return convertMarkdown((org.hl7.fhir.dstu2.model.MarkdownType) src);
if (src instanceof org.hl7.fhir.dstu2.model.OidType)
@ -2493,6 +2491,8 @@ public class VersionConvertor_10_40 {
return convertTime((org.hl7.fhir.dstu2.model.TimeType) src);
if (src instanceof org.hl7.fhir.dstu2.model.UnsignedIntType)
return convertUnsignedInt((org.hl7.fhir.dstu2.model.UnsignedIntType) src);
if (src instanceof org.hl7.fhir.dstu2.model.IntegerType)
return convertInteger((org.hl7.fhir.dstu2.model.IntegerType) src);
if (src instanceof org.hl7.fhir.dstu2.model.UriType)
return convertUri((org.hl7.fhir.dstu2.model.UriType) src);
if (src instanceof org.hl7.fhir.dstu2.model.UuidType)
@ -2569,8 +2569,6 @@ public class VersionConvertor_10_40 {
return convertId((org.hl7.fhir.r4.model.IdType) src);
if (src instanceof org.hl7.fhir.r4.model.InstantType)
return convertInstant((org.hl7.fhir.r4.model.InstantType) src);
if (src instanceof org.hl7.fhir.r4.model.IntegerType)
return convertInteger((org.hl7.fhir.r4.model.IntegerType) src);
if (src instanceof org.hl7.fhir.r4.model.MarkdownType)
return convertMarkdown((org.hl7.fhir.r4.model.MarkdownType) src);
if (src instanceof org.hl7.fhir.r4.model.OidType)
@ -2583,6 +2581,8 @@ public class VersionConvertor_10_40 {
return convertTime((org.hl7.fhir.r4.model.TimeType) src);
if (src instanceof org.hl7.fhir.r4.model.UnsignedIntType)
return convertUnsignedInt((org.hl7.fhir.r4.model.UnsignedIntType) src);
if (src instanceof org.hl7.fhir.r4.model.IntegerType)
return convertInteger((org.hl7.fhir.r4.model.IntegerType) src);
if (src instanceof org.hl7.fhir.r4.model.UriType)
return convertUri((org.hl7.fhir.r4.model.UriType) src);
if (src instanceof org.hl7.fhir.r4.model.UuidType)

View File

@ -2503,8 +2503,6 @@ public class VersionConvertor_10_50 {
return convertId((org.hl7.fhir.dstu2.model.IdType) src);
if (src instanceof org.hl7.fhir.dstu2.model.InstantType)
return convertInstant((org.hl7.fhir.dstu2.model.InstantType) src);
if (src instanceof org.hl7.fhir.dstu2.model.IntegerType)
return convertInteger((org.hl7.fhir.dstu2.model.IntegerType) src);
if (src instanceof org.hl7.fhir.dstu2.model.MarkdownType)
return convertMarkdown((org.hl7.fhir.dstu2.model.MarkdownType) src);
if (src instanceof org.hl7.fhir.dstu2.model.OidType)
@ -2517,6 +2515,8 @@ public class VersionConvertor_10_50 {
return convertTime((org.hl7.fhir.dstu2.model.TimeType) src);
if (src instanceof org.hl7.fhir.dstu2.model.UnsignedIntType)
return convertUnsignedInt((org.hl7.fhir.dstu2.model.UnsignedIntType) src);
if (src instanceof org.hl7.fhir.dstu2.model.IntegerType)
return convertInteger((org.hl7.fhir.dstu2.model.IntegerType) src);
if (src instanceof org.hl7.fhir.dstu2.model.UriType)
return convertUri((org.hl7.fhir.dstu2.model.UriType) src);
if (src instanceof org.hl7.fhir.dstu2.model.UuidType)
@ -2593,8 +2593,6 @@ public class VersionConvertor_10_50 {
return convertId((org.hl7.fhir.r5.model.IdType) src);
if (src instanceof org.hl7.fhir.r5.model.InstantType)
return convertInstant((org.hl7.fhir.r5.model.InstantType) src);
if (src instanceof org.hl7.fhir.r5.model.IntegerType)
return convertInteger((org.hl7.fhir.r5.model.IntegerType) src);
if (src instanceof org.hl7.fhir.r5.model.MarkdownType)
return convertMarkdown((org.hl7.fhir.r5.model.MarkdownType) src);
if (src instanceof org.hl7.fhir.r5.model.OidType)
@ -2607,6 +2605,8 @@ public class VersionConvertor_10_50 {
return convertTime((org.hl7.fhir.r5.model.TimeType) src);
if (src instanceof org.hl7.fhir.r5.model.UnsignedIntType)
return convertUnsignedInt((org.hl7.fhir.r5.model.UnsignedIntType) src);
if (src instanceof org.hl7.fhir.r5.model.IntegerType)
return convertInteger((org.hl7.fhir.r5.model.IntegerType) src);
if (src instanceof org.hl7.fhir.r5.model.UriType)
return convertUri((org.hl7.fhir.r5.model.UriType) src);
if (src instanceof org.hl7.fhir.r5.model.UuidType)

View File

@ -2454,8 +2454,6 @@ public class VersionConvertor_14_30 {
return convertId((org.hl7.fhir.dstu2016may.model.IdType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.InstantType)
return convertInstant((org.hl7.fhir.dstu2016may.model.InstantType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.IntegerType)
return convertInteger((org.hl7.fhir.dstu2016may.model.IntegerType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.MarkdownType)
return convertMarkdown((org.hl7.fhir.dstu2016may.model.MarkdownType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.OidType)
@ -2468,6 +2466,8 @@ public class VersionConvertor_14_30 {
return convertTime((org.hl7.fhir.dstu2016may.model.TimeType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.UnsignedIntType)
return convertUnsignedInt((org.hl7.fhir.dstu2016may.model.UnsignedIntType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.IntegerType)
return convertInteger((org.hl7.fhir.dstu2016may.model.IntegerType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.UriType)
return convertUri((org.hl7.fhir.dstu2016may.model.UriType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.UuidType)
@ -2544,8 +2544,6 @@ public class VersionConvertor_14_30 {
return convertId((org.hl7.fhir.dstu3.model.IdType) src);
if (src instanceof org.hl7.fhir.dstu3.model.InstantType)
return convertInstant((org.hl7.fhir.dstu3.model.InstantType) src);
if (src instanceof org.hl7.fhir.dstu3.model.IntegerType)
return convertInteger((org.hl7.fhir.dstu3.model.IntegerType) src);
if (src instanceof org.hl7.fhir.dstu3.model.MarkdownType)
return convertMarkdown((org.hl7.fhir.dstu3.model.MarkdownType) src);
if (src instanceof org.hl7.fhir.dstu3.model.OidType)
@ -2558,6 +2556,8 @@ public class VersionConvertor_14_30 {
return convertTime((org.hl7.fhir.dstu3.model.TimeType) src);
if (src instanceof org.hl7.fhir.dstu3.model.UnsignedIntType)
return convertUnsignedInt((org.hl7.fhir.dstu3.model.UnsignedIntType) src);
if (src instanceof org.hl7.fhir.dstu3.model.IntegerType)
return convertInteger((org.hl7.fhir.dstu3.model.IntegerType) src);
if (src instanceof org.hl7.fhir.dstu3.model.UriType)
return convertUri((org.hl7.fhir.dstu3.model.UriType) src);
if (src instanceof org.hl7.fhir.dstu3.model.UuidType)

View File

@ -2607,8 +2607,6 @@ public class VersionConvertor_14_40 {
return convertId((org.hl7.fhir.dstu2016may.model.IdType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.InstantType)
return convertInstant((org.hl7.fhir.dstu2016may.model.InstantType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.IntegerType)
return convertInteger((org.hl7.fhir.dstu2016may.model.IntegerType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.MarkdownType)
return convertMarkdown((org.hl7.fhir.dstu2016may.model.MarkdownType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.OidType)
@ -2621,6 +2619,8 @@ public class VersionConvertor_14_40 {
return convertTime((org.hl7.fhir.dstu2016may.model.TimeType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.UnsignedIntType)
return convertUnsignedInt((org.hl7.fhir.dstu2016may.model.UnsignedIntType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.IntegerType)
return convertInteger((org.hl7.fhir.dstu2016may.model.IntegerType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.UriType)
return convertUri((org.hl7.fhir.dstu2016may.model.UriType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.UuidType)
@ -2695,8 +2695,6 @@ public class VersionConvertor_14_40 {
return convertId((org.hl7.fhir.r4.model.IdType) src);
if (src instanceof org.hl7.fhir.r4.model.InstantType)
return convertInstant((org.hl7.fhir.r4.model.InstantType) src);
if (src instanceof org.hl7.fhir.r4.model.IntegerType)
return convertInteger((org.hl7.fhir.r4.model.IntegerType) src);
if (src instanceof org.hl7.fhir.r4.model.MarkdownType)
return convertMarkdown((org.hl7.fhir.r4.model.MarkdownType) src);
if (src instanceof org.hl7.fhir.r4.model.OidType)
@ -2709,6 +2707,8 @@ public class VersionConvertor_14_40 {
return convertTime((org.hl7.fhir.r4.model.TimeType) src);
if (src instanceof org.hl7.fhir.r4.model.UnsignedIntType)
return convertUnsignedInt((org.hl7.fhir.r4.model.UnsignedIntType) src);
if (src instanceof org.hl7.fhir.r4.model.IntegerType)
return convertInteger((org.hl7.fhir.r4.model.IntegerType) src);
if (src instanceof org.hl7.fhir.r4.model.UriType)
return convertUri((org.hl7.fhir.r4.model.UriType) src);
if (src instanceof org.hl7.fhir.r4.model.UuidType)

View File

@ -2614,8 +2614,6 @@ public class VersionConvertor_14_50 {
return convertId((org.hl7.fhir.dstu2016may.model.IdType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.InstantType)
return convertInstant((org.hl7.fhir.dstu2016may.model.InstantType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.IntegerType)
return convertInteger((org.hl7.fhir.dstu2016may.model.IntegerType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.MarkdownType)
return convertMarkdown((org.hl7.fhir.dstu2016may.model.MarkdownType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.OidType)
@ -2628,6 +2626,8 @@ public class VersionConvertor_14_50 {
return convertTime((org.hl7.fhir.dstu2016may.model.TimeType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.UnsignedIntType)
return convertUnsignedInt((org.hl7.fhir.dstu2016may.model.UnsignedIntType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.IntegerType)
return convertInteger((org.hl7.fhir.dstu2016may.model.IntegerType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.UriType)
return convertUri((org.hl7.fhir.dstu2016may.model.UriType) src);
if (src instanceof org.hl7.fhir.dstu2016may.model.UuidType)
@ -2702,8 +2702,6 @@ public class VersionConvertor_14_50 {
return convertId((org.hl7.fhir.r5.model.IdType) src);
if (src instanceof org.hl7.fhir.r5.model.InstantType)
return convertInstant((org.hl7.fhir.r5.model.InstantType) src);
if (src instanceof org.hl7.fhir.r5.model.IntegerType)
return convertInteger((org.hl7.fhir.r5.model.IntegerType) src);
if (src instanceof org.hl7.fhir.r5.model.MarkdownType)
return convertMarkdown((org.hl7.fhir.r5.model.MarkdownType) src);
if (src instanceof org.hl7.fhir.r5.model.OidType)
@ -2716,6 +2714,8 @@ public class VersionConvertor_14_50 {
return convertTime((org.hl7.fhir.r5.model.TimeType) src);
if (src instanceof org.hl7.fhir.r5.model.UnsignedIntType)
return convertUnsignedInt((org.hl7.fhir.r5.model.UnsignedIntType) src);
if (src instanceof org.hl7.fhir.r5.model.IntegerType)
return convertInteger((org.hl7.fhir.r5.model.IntegerType) src);
if (src instanceof org.hl7.fhir.r5.model.UriType)
return convertUri((org.hl7.fhir.r5.model.UriType) src);
if (src instanceof org.hl7.fhir.r5.model.UuidType)

View File

@ -3498,20 +3498,20 @@ public class VersionConvertor_30_50 {
return convertId((org.hl7.fhir.dstu3.model.IdType) src);
if (src instanceof org.hl7.fhir.dstu3.model.InstantType)
return convertInstant((org.hl7.fhir.dstu3.model.InstantType) src);
if (src instanceof org.hl7.fhir.dstu3.model.PositiveIntType)
return convertPositiveInt((org.hl7.fhir.dstu3.model.PositiveIntType) src);
if (src instanceof org.hl7.fhir.dstu3.model.UnsignedIntType)
return convertUnsignedInt((org.hl7.fhir.dstu3.model.UnsignedIntType) src);
if (src instanceof org.hl7.fhir.dstu3.model.IntegerType)
return convertInteger((org.hl7.fhir.dstu3.model.IntegerType) src);
if (src instanceof org.hl7.fhir.dstu3.model.MarkdownType)
return convertMarkdown((org.hl7.fhir.dstu3.model.MarkdownType) src);
if (src instanceof org.hl7.fhir.dstu3.model.OidType)
return convertOid((org.hl7.fhir.dstu3.model.OidType) src);
if (src instanceof org.hl7.fhir.dstu3.model.PositiveIntType)
return convertPositiveInt((org.hl7.fhir.dstu3.model.PositiveIntType) src);
if (src instanceof org.hl7.fhir.dstu3.model.StringType)
return convertString((org.hl7.fhir.dstu3.model.StringType) src);
if (src instanceof org.hl7.fhir.dstu3.model.TimeType)
return convertTime((org.hl7.fhir.dstu3.model.TimeType) src);
if (src instanceof org.hl7.fhir.dstu3.model.UnsignedIntType)
return convertUnsignedInt((org.hl7.fhir.dstu3.model.UnsignedIntType) src);
if (src instanceof org.hl7.fhir.dstu3.model.UriType)
return convertUri((org.hl7.fhir.dstu3.model.UriType) src);
if (src instanceof org.hl7.fhir.dstu3.model.UuidType)
@ -3604,22 +3604,22 @@ public class VersionConvertor_30_50 {
return convertId((org.hl7.fhir.r5.model.IdType) src);
if (src instanceof org.hl7.fhir.r5.model.InstantType)
return convertInstant((org.hl7.fhir.r5.model.InstantType) src);
if (src instanceof org.hl7.fhir.r5.model.IntegerType)
return convertInteger((org.hl7.fhir.r5.model.IntegerType) src);
if (src instanceof org.hl7.fhir.r5.model.PositiveIntType)
return convertPositiveInt((org.hl7.fhir.r5.model.PositiveIntType) src);
if (src instanceof org.hl7.fhir.r5.model.UnsignedIntType)
return convertUnsignedInt((org.hl7.fhir.r5.model.UnsignedIntType) src);
if (src instanceof org.hl7.fhir.r5.model.Integer64Type)
return convertInteger64((org.hl7.fhir.r5.model.Integer64Type) src);
if (src instanceof org.hl7.fhir.r5.model.IntegerType)
return convertInteger((org.hl7.fhir.r5.model.IntegerType) src);
if (src instanceof org.hl7.fhir.r5.model.MarkdownType)
return convertMarkdown((org.hl7.fhir.r5.model.MarkdownType) src);
if (src instanceof org.hl7.fhir.r5.model.OidType)
return convertOid((org.hl7.fhir.r5.model.OidType) src);
if (src instanceof org.hl7.fhir.r5.model.PositiveIntType)
return convertPositiveInt((org.hl7.fhir.r5.model.PositiveIntType) src);
if (src instanceof org.hl7.fhir.r5.model.StringType)
return convertString((org.hl7.fhir.r5.model.StringType) src);
if (src instanceof org.hl7.fhir.r5.model.TimeType)
return convertTime((org.hl7.fhir.r5.model.TimeType) src);
if (src instanceof org.hl7.fhir.r5.model.UnsignedIntType)
return convertUnsignedInt((org.hl7.fhir.r5.model.UnsignedIntType) src);
if (src instanceof org.hl7.fhir.r5.model.UriType)
return convertUri((org.hl7.fhir.r5.model.UriType) src);
if (src instanceof org.hl7.fhir.r5.model.UuidType)

View File

@ -3219,12 +3219,17 @@ public class ProfileUtilities extends TranslatingUtilities {
Cell c = gen.new Cell();
r.getCells().add(c);
if (e.hasContentReference()) {
ElementDefinition ed = getElementByName(profile.getSnapshot().getElement(), e.getContentReference());
ElementInStructure ed = getElementByName(profile.getSnapshot().getElement(), e.getContentReference(), profile);
if (ed == null)
c.getPieces().add(gen.new Piece(null, translate("sd.table", "Unknown reference to %s", e.getContentReference()), null));
else {
c.getPieces().add(gen.new Piece(null, translate("sd.table", "See ", ed.getPath()), null));
c.getPieces().add(gen.new Piece("#"+ed.getPath(), tail(ed.getPath()), ed.getPath()));
if (ed.getSource() == profile) {
c.getPieces().add(gen.new Piece(null, translate("sd.table", "See ", ed.getElement().getPath()), null));
c.getPieces().add(gen.new Piece("#"+ed.getElement().getPath(), tail(ed.getElement().getPath()), ed.getElement().getPath()));
} else {
c.getPieces().add(gen.new Piece(null, translate("sd.table", "See ", ed.getElement().getPath()), null));
c.getPieces().add(gen.new Piece(ed.getSource().getUserString("path")+"#"+ed.getElement().getPath(), tail(ed.getElement().getPath())+" ("+ed.getSource().getType()+")", ed.getElement().getPath()));
}
}
return c;
}
@ -3409,16 +3414,46 @@ public class ProfileUtilities extends TranslatingUtilities {
}
private ElementDefinition getElementByName(List<ElementDefinition> elements, String contentReference) {
private class ElementInStructure {
private StructureDefinition source;
private ElementDefinition element;
public ElementInStructure(StructureDefinition source, ElementDefinition ed) {
this.source = source;
this.element = ed;
}
public StructureDefinition getSource() {
return source;
}
public ElementDefinition getElement() {
return element;
}
}
private ElementInStructure getElementByName(List<ElementDefinition> elements, String contentReference, StructureDefinition source) {
if (contentReference.contains("#")) {
String url = contentReference.substring(0, contentReference.indexOf("#"));
contentReference = contentReference.substring(contentReference.indexOf("#"));
if (!url.equals(source.getUrl())) {
source = context.fetchResource(StructureDefinition.class, url);
if (source == null) {
throw new FHIRException("Unable to resolve StructureDefinition "+url+" resolving content reference "+contentReference);
}
elements = source.getSnapshot().getElement();
}
}
for (ElementDefinition ed : elements) {
if (("#"+ed.getPath()).equals(contentReference)) {
return ed;
return new ElementInStructure(source, ed);
}
if (("#"+ed.getId()).equals(contentReference)) {
return ed;
return new ElementInStructure(source, ed);
}
}
throw new Error("getElementByName: can't find "+contentReference+"in "+elements.toString());
throw new Error("getElementByName: can't find "+contentReference+" in "+elements.toString()+" from "+source.getUrl());
// return null;
}
@ -4575,11 +4610,16 @@ public class ProfileUtilities extends TranslatingUtilities {
if (used) {
if (definition.hasContentReference()) {
ElementDefinition ed = getElementByName(profile.getSnapshot().getElement(), definition.getContentReference());
ElementInStructure ed = getElementByName(profile.getSnapshot().getElement(), definition.getContentReference(), profile);
if (ed == null)
c.getPieces().add(gen.new Piece(null, "Unknown reference to "+definition.getContentReference(), null));
else
c.getPieces().add(gen.new Piece("#"+ed.getPath(), "See "+ed.getPath(), null));
else {
if (ed.getSource() == profile) {
c.getPieces().add(gen.new Piece("#"+ed.getElement().getPath(), "See "+ed.getElement().getPath(), null));
} else {
c.getPieces().add(gen.new Piece(ed.getSource().getUserData("path")+"#"+ed.getElement().getPath(), "See "+ed.getSource().getType()+"."+ed.getElement().getPath(), null));
}
}
}
if (definition.getPath().endsWith("url") && definition.hasFixed()) {
c.getPieces().add(checkForNoChange(definition.getFixed(), gen.new Piece(null, "\""+buildJson(definition.getFixed())+"\"", null).addStyle("color: darkgreen")));

View File

@ -75,15 +75,15 @@ public class Element extends Base {
CONTAINED, BUNDLE_ENTRY, BUNDLE_OUTCOME, PARAMETER;
public static SpecialElement fromProperty(Property property) {
if (property.getStructure().getIdElement().getIdPart().equals("Parameters"))
if (property.getStructure().getType().equals("Parameters"))
return PARAMETER;
if (property.getStructure().getIdElement().getIdPart().equals("Bundle") && property.getName().equals("resource"))
if (property.getStructure().getType().equals("Bundle") && property.getName().equals("resource"))
return BUNDLE_ENTRY;
if (property.getStructure().getIdElement().getIdPart().equals("Bundle") && property.getName().equals("outcome"))
if (property.getStructure().getType().equals("Bundle") && property.getName().equals("outcome"))
return BUNDLE_OUTCOME;
if (property.getName().equals("contained"))
return CONTAINED;
throw new Error("Unknown resource containing a native resource: "+property.getDefinition().getId());
throw new FHIRException("Unknown resource containing a native resource: "+property.getDefinition().getId());
}
}

View File

@ -401,7 +401,7 @@ public class LibraryRenderer extends ResourceRenderer {
p.code().tx(att.getContentType()+lang(att));
}
String prismCode = determinePrismCode(att);
if (prismCode != null) {
if (prismCode != null && !tooBig(txt)) {
x.pre().code().setAttribute("class", "language-"+prismCode).tx(txt);
} else {
x.pre().code().tx(txt);
@ -420,6 +420,10 @@ public class LibraryRenderer extends ResourceRenderer {
}
}
private boolean tooBig(String txt) {
return txt.length() > 16384;
}
private String imgExtension(String contentType) {
if (contentType != null && contentType.startsWith("image/")) {
if (contentType.startsWith("image/png")) {

View File

@ -118,8 +118,13 @@ public class ParametersRenderer extends ResourceRenderer {
if (p.hasValue()) {
render(tr.td(), p.getValue());
} else if (p.hasResource()) {
ResourceRenderer rr = RendererFactory.factory(p.getResource(), context);
rr.render(tr.td(), p.getResource());
Resource r = p.getResource();
td = tr.td();
XhtmlNode para = td.para();
para.tx(r.fhirType()+"/"+r.getId());
para.an(r.fhirType()+"_"+r.getId()).tx(" ");
ResourceRenderer rr = RendererFactory.factory(r, context);
rr.render(td, r);
} else if (p.hasPart()) {
tr.td();
params(tbl, p.getPart(), 1);

View File

@ -651,7 +651,9 @@ public class ProfileDrivenRenderer extends ResourceRenderer {
child = p.getElementDefinition();
}
if (child != null) {
generateElementByProfile(res, profile, allElements, x, path, showCodeDetails, indent, p, child);
if (!child.getBase().hasPath() || !child.getBase().getPath().startsWith("Resource.")) {
generateElementByProfile(res, profile, allElements, x, path, showCodeDetails, indent, p, child);
}
}
}
}
@ -721,7 +723,7 @@ public class ProfileDrivenRenderer extends ResourceRenderer {
XhtmlNode para = x.para();
para.b().addText(p.getStructure().present());
para.tx(": ");
renderLeaf(res, v, child, x, para, false, showCodeDetails, displayHints, path, indent);
renderLeaf(res, vv, child, x, para, false, showCodeDetails, displayHints, path, indent);
} else if (ev.hasValues()) {
XhtmlNode bq = x.addTag("blockquote");
bq.para().b().addText(isExtension(p) ? p.getStructure().present() : p.getName());

View File

@ -351,6 +351,7 @@ public class FilesystemPackageCacheManager extends BasePackageCacheManager imple
System.out.println();
System.out.print(" Installing: ");
}
if (npm.name() == null || id == null || !id.equals(npm.name())) {
if (!id.equals("hl7.fhir.r5.core")) {// temporary work around
throw new IOException("Attempt to import a mis-identified package. Expected " + id + ", got " + npm.name());

View File

@ -19,7 +19,7 @@
<properties>
<hapi_fhir_version>5.1.0</hapi_fhir_version>
<validator_test_case_version>1.1.47</validator_test_case_version>
<validator_test_case_version>1.1.48-SNAPSHOT</validator_test_case_version>
<junit_jupiter_version>5.6.2</junit_jupiter_version>
<maven_surefire_version>3.0.0-M4</maven_surefire_version>
<jacoco_version>0.8.5</jacoco_version>