-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* issues #1625 and #1596 - apply search parameter filters on init This is a big, end-user-visible change to the way we load search parameters and apply filtering from fhir-server-config. Previously, we loaded the built-in search parameters from the registry, but then applied tenant-specific extension-search-parameters on top of that. Now, we have a new ExtensionSearchParametersResourceProvider that reads the same tenant-specific extension-search-parameters (for backwards compatibility) and provides those resources to the registry in a tenant-aware manner. This is #1596. Additionally, we used to apply search filtering on each and every request. Now, the ParametersUtil will loop through all configured tenants and load their search parameters from the registry during initialization. This tenant-aware search parameter map will then be consulted anytime we need a search parameter or set of search parameters in the context of a particular request (for a particular tenant). Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com> * JDBC test cleanup LocationParmBehaviorUtilTest wasn't restoring the FHIRRequestContext after running. Additionally, I removed the 'static' modifier from the before and after methods...its not needed for TestNG and, in fact, TestNG warns against using static methods for this. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com> * Handle missing config more gracefully The CQL SearchParameterResolverTest was calling SearchUtil.getSearchParameters without any fhir-server-config files in the home directory. This was causing a NullPointerException while initializing ParametersUtil. The updated logic will now load all parameters in such cases...just as if fhir-server-config was there but without a `resources` PropertyGroup. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com> * updated documentation to reflect new behavior Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com> * General cleanup Extracted private helpers from ParametersUtil.computeTenantSPs and added some comments. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com> * Update SearchUtil.getSearchParameters method sig This one now returns a map from code to SearchParameter instead of just a the list of SearchParameter. This way, we can support cases where the explicitly-configured code differs from the code in the SearchParameter. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com> * Update ParametersMap to store disambiguated results Previously, ParametersMap had to store all the built-in parameters and make those available to SearchUtil for filtering/disambiguation. Now that we apply filtering before populating ParametersMap, we can select a "winner" in cases where there are multiple parameter with the same code (or multiple parameters with the same url / canonical). For now, I chose a "last insert wins" approach...which means that the order we load the map in will matter. Note: this change uncovered an issue in our fhir-persistence search tests where we defined a parameter with code "code" that conflicts with a base spec parameter. The fix was to disambiguate via fhir-server-config. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com> * minor updates per review feedback mostly copyright dates... Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
- Loading branch information
Showing
51 changed files
with
996 additions
and
1,115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.