Because of data protection regulations we need to run the HAPI validator (validator_cli.jar
) off-line, and we also need to complement the FHIR Package Cache by adding conformance resources that are not available online at all (they tend to get distributed via mounted courier, carrier pigeon and similar technologies).
Transplanting a well-filled package cache (e.g. %userprofile%\.fhir
) from a connected computer to an offline computer takes care of all things that HAPI can download. From that point on HAPI finds these conformance resources without requiring any switches or other TLC.
Referencing directories with conformance resources that came in a push-cart can be done via the implementation guide switch (-ig /foo/bar
). However, adding several dozen directories in this way is tedious and error-prone; it also makes it somewhat impractical to use the HAPI validator from the command line or in a context like Yannick Lagger's VSCode FHIR plugin.
Workarounds like creating a wrapper batch file with the umpteen -ig switches have limited reach; they do not work on HAPI as a whole, and they do not help with things like the VSCode plugin.
Lastly, for various reasons it is necessary to put the whole FHIR cache (minus the official HL7 packages) into the build process, with version control, test suites etc. pp. The reason is that the specifications for German health care are still very much in flux, only partly available online, incomplete, and owned by about half a dozen different organisations. Using a carefully constructed FHIR cache with controlled contents is the only option in this situation, especially if you consider that our automated billing system spits out invoices for up to 7 digits a pop.
Are there any tools that can assist with turning an -ig style tree with (predominantly) XML conformance resources into a package that can be shoved into the FHIR Package Cache?
HL7.org has some documentation about the NPM Package Format as far as it pertains to FHIR packages. This indicates, among other things, that all resources must be converted to JSON. Is there a reliable command line tool that can be used to automate at least this part of the process, even if it doesn't spit out a complete NPM package?