Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transformation: Not parseable input provokes cutoff #14

Open
oliveregger opened this issue Sep 22, 2021 · 0 comments
Open

Transformation: Not parseable input provokes cutoff #14

oliveregger opened this issue Sep 22, 2021 · 0 comments

Comments

@oliveregger
Copy link
Member

For FHIR to CDA transformation we have an issued that the xml output ist cutoff:

<substanceAdministration classCode="SBADM" moodCode="INT">
              <templateId root="2.16.756.5.30.1.1.10.4.34"/>
              <templateId root="1.3.6.1.4

the server throws internally an exception with:

Caused by: org.hl7.fhir.exceptions.FHIRException: Unknown element div
at org.hl7.fhir.utilities.xhtml.CDANarrativeFormat.processChildNode(CDANarrativeFormat.java:405)
at org.hl7.fhir.utilities.xhtml.CDANarrativeFormat.processChildren(CDANarrativeFormat.java:346)
at org.hl7.fhir.utilities.xhtml.CDANarrativeFormat.convert(CDANarrativeFormat.java:340)
at ch.ahdis.matchbox.mappinglanguage.XmlParser.composeElement(XmlParser.java:678)
at ch.ahdis.matchbox.mappinglanguage.XmlParser.composeElement(XmlParser.java:731)
at ch.ahdis.matchbox.mappinglanguage.XmlParser.composeElement(XmlParser.java:731)
at ch.ahdis.matchbox.mappinglanguage.XmlParser.composeElement(XmlParser.java:731)
at ch.ahdis.matchbox.mappinglanguage.XmlParser.composeElement(XmlParser.java:731)
at ch.ahdis.matchbox.mappinglanguage.XmlParser.composeElement(XmlParser.java:731)
at ch.ahdis.matchbox.mappinglanguage.XmlParser.compose(XmlParser.java:599)
at ch.ahdis.matchbox.mappinglanguage.StructureMapTransformProvider.transfrom(StructureMapTransformProvider.java:202)
at ch.ahdis.matchbox.mappinglanguage.StructureMapTransformProvider.manualInputAndOutput(StructureMapTransformProvider.java:158)
... 39 common frames omitted
2021-09-22 08:59:13.068 [http-nio-8080-exec-6] ERROR o.a.c.c.C.[.[.[.[jpaRestfulServer] [DirectJDKLog.java:175] Servlet.service() for servlet [jpaRestfulServer] in context with path [/matchbox] threw exception
java.lang.IllegalStateException: getOutputStream() has already been called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:584)
at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:227)
at ca.uhn.fhir.rest.server.servlet.ServletRestfulResponse.getResponseWriter(ServletRestfulResponse.java:76)
at ca.uhn.fhir.rest.server.RestfulServerUtils.streamResponseAsResource(RestfulServerUtils.java:1004)
at ca.uhn.fhir.rest.server.RestfulResponse.streamResponseAsResource(RestfulResponse.java:87)
at ca.uhn.fhir.rest.server.interceptor.ExceptionHandlingInterceptor.handleException(Exception

it is due that in the input we have two div elements:

                    "text": {
                        "status": "generated",
                        "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div xmlns=\"http://www.w3.org/1999/xhtml\">

instead of cutting of the response it would be helpful if an OperationOutcome error would generated with the exception.

http://localhost:8080/matchbox/fhir/StructureMap/$transform?source=http://fhir.ch/ig/cda-fhir-maps/StructureMap/BundleToCdaChEmedMedicationCardDocument

testFhir2Cda.txt

oliveregger added a commit that referenced this issue Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant