We take in millions upon millions of HL7v4 documents of various authorships. We are not authorities over the quality of those documents. All we do is index them. We use HAPI FHIR to analyze them and produce a sort of summary of the things that interest us in an index.
What we're thinking...
Sometimes, less frequent in FHIR as compared to nigh utter chaos in HL7v2 and HL7v3, we encounter errant construction. For example,
1230 [pool-1-thread-1] WARN c.u.f.p.LenientErrorHandler.containedResourceWithNoId:69 - Resource has contained child resource with no ID
1232 [pool-1-thread-1] WARN c.u.f.p.LenientErrorHandler.unknownElement:150 - Unknown element 'title' found while parsing
might show up. These don't kill the parser (I think only bad XML will do that), but they end up in our log which, under certain circumstances we do want to happen, but normally, this would tend to fill up the disk with notices of things not covered. So, in production, until trouble begins, we would rather suppress such entries.
What we thought the doc was telling us...
It's hard for me to make a convincing case for a cogent solution at this point. We're at the beginning of ingesting FHIR in earnest though we've flirted with it for years. For many years, we've ingested HL7v2, -v3, X12 and other formats. Here, I'm referring to documentation like
https://hapifhir.io/hapi-fhir/docs/validation/parser_error_handler.htmlTalong my queue from that page, when I try to modify the error handler in use as suggested, set it to false, it does nothing that I can see.
I would like to substitute my own error handler if only to set breakpoints and begin understanding what trips what in situations like this. Ultimately, I probably don't wish to replace Lenient or Strict, but maybe I will and, despite what my brain reads in the documentation, that's not a real possibility. (Yet, why is it documented? What is my brain getting wrong?)
We're coding using JDK 11, creating Java 8-only code, consuming HAPI FHIR version 5.1.0 - Rev 6718826665.
Thanks for any thoughts.