0

Resolving codings like currency symbols (e.g. urn:iso:std:iso:4217) requires that HAPI have access to the Internet (in order to contact tx.fhir.org), which means that these codings cannot be validated when working completely offline, as is often necessary in the health care system. For Firely the situation is pretty much the same, as regards offline use.

Furthermore, many specifications for German health care are still incomplete and are missing some value sets.

That is why I decided to work around both problems by constructing conformance resource stubs for the value sets in question. For example, for the foreseeable future only one the code EUR will have to be validated against urn:iso:std:iso:4217, and the missing value sets for electronic prescriptions are similarly small.

How would one go about constructing a fake value set resource for e.g. the EUR code? How should the fake resource be constructed in order to work well with both the HAPI and Firely validators?

DarthGizka
  • 4,347
  • 1
  • 24
  • 36
  • When you say, "The HAPI validator", do you mean, the validator as a standalone entity, or do you mean, the validator as embedded in a HAPI server? – Grahame Grieve May 20 '21 at 19:42
  • @Grahame: primarily the standalone validator(`validator_cli.jar`), secondarily the HAPI *library*, not the server. The electronic prescription infrastructure in Germany is based on FHIR *resources* but FHIR *APIs* are used only in a few places. There are no FHIR APIs in the parts that our company has to deal with, only resources. P.S.: the fake value set is strictly for local/internal consumption, not to be published on simplifier.net or any public-facing servers. – DarthGizka May 21 '21 at 04:57

1 Answers1

0

You don't need a fake value set resource, you can simply put a pre-constructed expansion in your value set. If terminology services are unavailable, the validator will use the expansion already present in the value set.

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • Thanks for the tip, I shall study [4.9.8 Value Set Expansion](https://www.hl7.org/fhir/valueset.html#expansion) @ hl7.org to see if I can get something working. Note: 'fake resource' was meant in a wider sense, like *any* resource stub (including a value set expansion, as I just learnt from you ;-). Sorry for being so imprecise in my question. – DarthGizka May 21 '21 at 05:12
  • Lloyd, the standard package [`hl7.fhir.r4.examples#4.0.1`](https://simplifier.net/packages/hl7.fhir.r4.examples/4.0.1) contains a value set expansion for `urn:iso:std:iso:4217` (in `Bundle-valueset-expansions.json`). However, Firely doesn't pick up the expansion when the file (or the whole package) is added to the Firely package stash, regardless of the presence of `ValueSet-currencies.json`. Any advice on making these standard expansions work with Firely? – DarthGizka May 23 '21 at 09:00
  • 1
    I've asked Firely to respond – Lloyd McKenzie May 23 '21 at 13:48
  • That could be right.... we currently don't use the published packages directly, but compile a distribution of them ourselves - and I don't think we'd include stuff from a package called "examples". Our stack uses a fixed compiled set delivered within the NuGet package called "specification.zip". It's easy to add other valuesets by configuring the validator to use additional `IResourceResolver` instances, e.g. create a `DirectorySource` that points to a directory with the additional valuesets you need. There's an example here (https://github.com/FirelyTeam/Furore.Fhir.ValidationDemo). – Ewout Kramer May 26 '21 at 15:34