FHIR
FHIR copied to clipboard
Specify list of include / exclude resources for the IBM FHIR Server schema
It will be very helpful to have the ability to define which resources to include / exclude. Schema will be generated only for the included resources.
Hopefully this feature will help to reduce the database resources (storage / performance etc.)
The persistence tool already supports it. What we need is a way to drive that from the cli, good documentation for that, and testing.
Note: this could inhibit our ability to handle the :contained
search parameter modifier where an unsupported resource type is contained within a supported one.
Also worth looking at catalog tuning (for Db2 and PostgreSQL) as the schema is pretty big, and this could cause cache pressure if there are multiple instances of our schema inside one database.
As part of this one we should also revisit JDBCIdentityCache.getResourceTypeNames and its callers. Currently I think it returns Resource and DomainResource but it probably shouldn't?
The persistence tool already supports it. What we need is a way to drive that from the cli, good documentation for that, and testing.
I added that as an experimental/undocumented feature some time ago (e.g. see https://github.com/IBM/FHIR/blob/main/demo/docker-compose.yml#L61 for usage), but unfortunately its still frustratingly easy to shoot yourself in the foot with this feature.
For example, an _include
or _revinclude
search will still try looking in all of the potential resource tables that could be referenced. So a search like GET [base]/Obseration?_include=Observation:subject
can fail with an SQL error like
[INFO] Table/View 'PROCEDURE_LOGICAL_RESOURCES' does not exist.
We probably need to make our server aware of which resource tables are in the db to make this foolproof. Til then, I think we'll just keep it experimental/undocumented.