enhance API for external use

This commit is contained in:
Grahame Grieve 2020-05-20 21:43:39 +10:00
parent 4e6c8ba232
commit 028d1a6ce9
1 changed files with 6 additions and 0 deletions

View File

@ -48,6 +48,12 @@ public abstract class ResourceRenderer extends DataRenderer {
this.rcontext = rcontext;
}
public XhtmlNode build(DomainResource dr) throws FHIRFormatError, DefinitionException, FHIRException, IOException, EOperationOutcome {
XhtmlNode x = new XhtmlNode(NodeType.Element, "div");
render(x, dr);
return x;
}
/**
* given a resource, update it's narrative with the best rendering available
*