LinuxForHealth / FHIR

The LinuxForHealth FHIR® Server and related projects

Home Page:https://linuxforhealth.github.io/FHIR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FhirRegistry: dynamic resource CodeSystem,ValueSet loading

gdecagna opened this issue · comments

Describe the bug
dynamic resource CodeSystem, ValueSet loading

Environment
5.1.1

To Reproduce
Steps to reproduce the behavior:

Expected behavior
dynamic reloading of resources

Additional context
FhirRegistry: I used the PackageRegistryResourceProvider procedure to register a set of CodeSystem and ValueSet resources.
This procedure, inserted in a jar located in the userLib, correctly loads the resources present in the .index.json file at start Up.
Is it possible to reload this procedure via URL command or other without restarting the server?
The goal is to edit the jar, copy it into the userLib and reload it without restarting the whole system.

The RegistryResourceProviders are discovered during startup (using the java ServiceLoader pattern) and so registering new providers is not supported at runtime.

That said, it should be possible to implement a provider that can change what it provides dynamically. At one point, our ExtensionSearchParametersResourceProvider worked liked that (prior to https://github.com/LinuxForHealth/FHIR/pull/2942/files).

It might also be possible to invent a new way to register a new provider at runtime (e.g. via FHIRRegistry#addProvider()) but that is not exposed at the server level at this time.