From 4a05ed8e48d2653dd60c445f38ee76fa743ba4c5 Mon Sep 17 00:00:00 2001 From: Oliver Egger Date: Wed, 13 Nov 2019 23:37:49 +0100 Subject: [PATCH] cda narrative support tfoot --- .../fhir/utilities/xhtml/CDANarrativeFormat.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/CDANarrativeFormat.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/CDANarrativeFormat.java index 6615abd20..6b43bfb1a 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/CDANarrativeFormat.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/CDANarrativeFormat.java @@ -152,7 +152,9 @@ public class CDANarrativeFormat { } private void processFootNote(Element e, XhtmlNode xn) { - throw new Error("element "+e.getNodeName()+" not handled yet"); + XhtmlNode xc = xn.addTag("tfoot"); + processAttributes(e, xc, "ID", "language", "styleCode", "align", "char", "charoff", "valign"); + processChildren(e, xc); } private void processFootNodeRef(Element e, XhtmlNode xn) { @@ -221,7 +223,9 @@ public class CDANarrativeFormat { } private void processTFoot(Element e, XhtmlNode xn) { - throw new Error("element "+e.getNodeName()+" not handled yet"); + XhtmlNode xc = xn.addTag("tfoot"); + processAttributes(e, xc, "ID", "language", "styleCode", "align", "char", "charoff", "valign"); + processChildren(e, xc); } private void processTh(Element e, XhtmlNode xn) throws FHIRException { @@ -450,8 +454,11 @@ public class CDANarrativeFormat { xml.exit("td"); } - private void processTFoot(IXMLWriter xml, XhtmlNode n) { - throw new Error("element "+n.getName()+" not handled yet"); + private void processTFoot(IXMLWriter xml, XhtmlNode n) throws IOException, FHIRException { + processAttributes(n, xml, "id", "language", "styleCode", "align", "char", "charoff", "valign"); + xml.enter("tfoot"); + processChildren(xml, n); + xml.exit("tfoot"); } private void processTh(IXMLWriter xml, XhtmlNode n) throws IOException, FHIRException {