* fix error setting up mapping log

* fix rendering of definitions in CodeSystems
* fix error rendering bundles in bundles
This commit is contained in:
Grahame Grieve 2020-10-01 12:39:10 +10:00
parent eda851f67f
commit e89da42514
5 changed files with 26 additions and 12 deletions

View File

@ -2,9 +2,12 @@ Validator:
* Add date addition/subtraction to FHIRPath + add parsing comments
* Fix questionnaire mode parameter support for validator
* add extra debugging when valdiator can't fetch content to validate
* fix error setting up mapping log
Other code changes:
* rename org.hl7.fhir.utilities.cache to org.hl7.fhir.utilities.npm
* report error locations for run time FHIRPath errors
* add search on IG registry to PackageClient
* add focus to FHIRPath function extensions
* add focus to FHIRPath function extensions
* fix rendering of definitions in CodeSystems
* fix error rendering bundles in bundles

View File

@ -43,7 +43,9 @@ public class BundleRenderer extends ResourceRenderer {
@Override
public boolean render(XhtmlNode x, Resource r) throws FHIRFormatError, DefinitionException, IOException, FHIRException, EOperationOutcome {
return render(x, (Bundle) r);
XhtmlNode n = render((Bundle) r);
x.addChildren(n.getChildNodes());
return false;
}
@Override

View File

@ -78,6 +78,9 @@ public class RendererFactory {
if ("Parameters".equals(resourceName)) {
return new ParametersRenderer(context);
}
if ("Bundle".equals(resourceName)) {
return new BundleRenderer(context);
}
return new ProfileDrivenRenderer(context);
}

View File

@ -829,7 +829,8 @@ public class ValueSetRenderer extends TerminologyRenderer {
boolean hasDefinition = false;
for (ConceptReferenceComponent c : inc.getConcept()) {
hasComments = hasComments || ExtensionHelper.hasExtension(c, ToolingExtensions.EXT_VS_COMMENT);
hasDefinition = hasDefinition || ExtensionHelper.hasExtension(c, ToolingExtensions.EXT_DEFINITION);
ConceptDefinitionComponent cc = definitions.get(c.getCode());
hasDefinition = hasDefinition || ((cc != null && cc.hasDefinition()) || ExtensionHelper.hasExtension(c, ToolingExtensions.EXT_DEFINITION));
}
if (hasComments || hasDefinition)
hasExtensions = true;
@ -846,16 +847,19 @@ public class ValueSetRenderer extends TerminologyRenderer {
else if (cc != null && !Utilities.noString(cc.getDisplay()))
td.addText(cc.getDisplay());
if (ExtensionHelper.hasExtension(c, ToolingExtensions.EXT_DEFINITION)) {
if (hasDefinition) {
td = tr.td();
smartAddText(td, ToolingExtensions.readStringExtension(c, ToolingExtensions.EXT_DEFINITION));
} else if (cc != null && !Utilities.noString(cc.getDefinition())) {
td = tr.td();
smartAddText(td, cc.getDefinition());
if (ExtensionHelper.hasExtension(c, ToolingExtensions.EXT_DEFINITION)) {
smartAddText(td, ToolingExtensions.readStringExtension(c, ToolingExtensions.EXT_DEFINITION));
} else if (cc != null && !Utilities.noString(cc.getDefinition())) {
smartAddText(td, cc.getDefinition());
}
}
if (ExtensionHelper.hasExtension(c, ToolingExtensions.EXT_VS_COMMENT)) {
smartAddText(tr.td(), "Note: "+ToolingExtensions.readStringExtension(c, ToolingExtensions.EXT_VS_COMMENT));
if (hasComments) {
td = tr.td();
if (ExtensionHelper.hasExtension(c, ToolingExtensions.EXT_VS_COMMENT)) {
smartAddText(td, "Note: "+ToolingExtensions.readStringExtension(c, ToolingExtensions.EXT_VS_COMMENT));
}
}
if (doLangs) {
addLangaugesToRow(c, langs, tr);

View File

@ -1635,7 +1635,9 @@ public class ValidationEngine implements IValidatorResourceFetcher, IPackageInst
}
public void setMapLog(String mapLog) throws FileNotFoundException {
this.mapLog = new PrintWriter(mapLog);
if (mapLog != null) {
this.mapLog = new PrintWriter(mapLog);
}
}
public void prepare() {