FHIR icon indicating copy to clipboard operation
FHIR copied to clipboard

Specify list of include / exclude resources for the IBM FHIR Server schema

Open smhgit opened this issue 4 years ago • 5 comments

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.)

smhgit avatar Mar 19 '20 15:03 smhgit

The persistence tool already supports it. What we need is a way to drive that from the cli, good documentation for that, and testing.

lmsurpre avatar Jan 19 '21 16:01 lmsurpre

Note: this could inhibit our ability to handle the :contained search parameter modifier where an unsupported resource type is contained within a supported one.

lmsurpre avatar Jan 19 '21 16:01 lmsurpre

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.

punktilious avatar Mar 15 '21 19:03 punktilious

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?

lmsurpre avatar Jun 25 '21 17:06 lmsurpre

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.

lmsurpre avatar Dec 16 '21 16:12 lmsurpre