Add support for search with SearchParameter resources stored in DB
Is your feature request related to a problem? Please describe. We'd like to support a configurable way of adding custom search parameters in our application, that could be fetched from the server. The current implementation only allows defining custom SearchParameters during initialization of the FhirEngine
Describe the solution you'd like The enhancement I'd like to suggest is the support for use of SearchParameter resources saved to the resources DB during indexing and search for resources, such that any new SearchParameters defined after initialization of the FhirEngine would also be considered. The SearchParameters may or may not be synced back to the server
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
Would you like to work on the issue? Yes
If I understand it correctly, you need support for custom search parameters being added dynamically to the database while the application is live, right ? Because one can add more custom search params (the newly synced ones) if you close and restart the app as the FhirEngine will be re-initialized and the indexing will be added too.
If I understand it correctly, you need support for custom search parameters being added dynamically to the database while the application is live, right ?
Yeah, exactly. We wanted it to support adding search parameters dynamically when an application is running.
Because one can add more custom search params (the newly synced ones) if you close and restart the app as the FhirEngine will be re-initialized and the indexing will be added too.
Yeah, the current implementation supports passing list of custom search params when initializing FhirEngine. The challenge that we have with this is that we can't persist the search params to DB because we require the FhirEngine to access the DB, and the FhirEngine only allows for passing of the search params during it's initialization.
I guess the suggestion I had was for a similar implementation to this whereby indexing on a resource would be pick up a SearchParameter resource stored in the DB
Yeah, the current implementation supports passing list of custom search params when initializing FhirEngine. The challenge that we have with this is that we can't persist the search params to DB because we require the FhirEngine to access the DB, and the FhirEngine only allows for passing of the search params during it's initialization.
One way is to store them in sharedpreferences and provide them when reinitializing fhir engine ? Is this the workaround you'll are doing ? What is the priority of this issue ?
One way is to store them in sharedpreferences and provide them when reinitializing fhir engine ? Is this the workaround you'll are doing ?
Yeah, but we opted for internal storage instead.
What is the priority of this issue ?
I'd say medium, for having to reinitialize fhir engine