diff --git a/extensions/default/src/DicomWebDataSource/index.js b/extensions/default/src/DicomWebDataSource/index.js index 3410d772b9..eeff59d698 100644 --- a/extensions/default/src/DicomWebDataSource/index.js +++ b/extensions/default/src/DicomWebDataSource/index.js @@ -54,7 +54,7 @@ const metadataProvider = classes.MetadataProvider; * @param {boolean} dicomWebConfig.bulkDataURI - Whether to enable bulkDataURI * @param {function} dicomWebConfig.onConfiguration - Function that is called after the configuration is initialized * @param {boolean} dicomWebConfig.staticWado - Whether to use the static WADO client - * @param {boolean} dicomWebConfig.caseSensitive - Whether to use case sensitive filtering on results (default: true) + * @param {object} dicomWebConfig.caseSensitive - Whether to use case sensitive filtering on results * @param {object} userAuthenticationService - User authentication service * @param {object} userAuthenticationService.getAuthorizationHeader - Function that returns the authorization header * @returns {object} - DICOM Web API object @@ -108,7 +108,7 @@ function createDicomWebApi(dicomWebConfig, servicesManager) { url: dicomWebConfig.qidoRoot, staticWado: dicomWebConfig.staticWado, singlepart: dicomWebConfig.singlepart, - caseSensitive: dicomWebConfig.caseSensitive, + caseSensitive: dicomWebConfig.caseSensitive || {}, headers: userAuthenticationService.getAuthorizationHeader(), errorInterceptor: errorHandler.getHTTPErrorHandler(), }; @@ -117,7 +117,7 @@ function createDicomWebApi(dicomWebConfig, servicesManager) { url: dicomWebConfig.wadoRoot, staticWado: dicomWebConfig.staticWado, singlepart: dicomWebConfig.singlepart, - caseSensitive: dicomWebConfig.caseSensitive, + caseSensitive: dicomWebConfig.caseSensitive || {}, headers: userAuthenticationService.getAuthorizationHeader(), errorInterceptor: errorHandler.getHTTPErrorHandler(), }; diff --git a/extensions/default/src/DicomWebDataSource/utils/StaticWadoClient.ts b/extensions/default/src/DicomWebDataSource/utils/StaticWadoClient.ts index c59c410b2b..0fc1cb3d77 100644 --- a/extensions/default/src/DicomWebDataSource/utils/StaticWadoClient.ts +++ b/extensions/default/src/DicomWebDataSource/utils/StaticWadoClient.ts @@ -111,11 +111,16 @@ export default class StaticWadoClient extends api.DICOMwebClient { } const lowerParams = this.toLowerParams(queryParams); - const caseSensitive = this.config.caseSensitive; const filtered = searchResult.filter(study => { for (const key of Object.keys(StaticWadoClient.studyFilterKeys)) { if ( - !this.filterItem(key, lowerParams, study, StaticWadoClient.studyFilterKeys, caseSensitive) + !this.filterItem( + key, + lowerParams, + study, + StaticWadoClient.studyFilterKeys, + this.config.caseSensitive[key] + ) ) { return false; } diff --git a/platform/app/public/config/default.js b/platform/app/public/config/default.js index 8761ed3c1e..7149f7337e 100644 --- a/platform/app/public/config/default.js +++ b/platform/app/public/config/default.js @@ -52,7 +52,9 @@ window.config = { supportsFuzzyMatching: false, supportsWildcard: true, staticWado: true, - caseSensitive: false, + caseSensitive: { + patientname: false, + }, singlepart: 'bulkdata,video', // whether the data source should use retrieveBulkData to grab metadata, // and in case of relative path, what would it be relative to, options diff --git a/platform/docs/docs/configuration/configurationFiles.md b/platform/docs/docs/configuration/configurationFiles.md index 8f35c93d39..f7bdc85eeb 100644 --- a/platform/docs/docs/configuration/configurationFiles.md +++ b/platform/docs/docs/configuration/configurationFiles.md @@ -193,7 +193,12 @@ if auth headers are used, a preflight request is required. - `activateViewportBeforeInteraction`: (default to true), if set to false, tools can be used directly without the need to click and activate the viewport. - `autoPlayCine`: (default to false), if set to true, data sets with the DICOM frame time tag (i.e. (0018,1063)) will auto play when displayed - `addWindowLevelActionMenu`: (default to true), if set to false, the window level action menu item is NOT added to the viewport action corners -- `caseSensitive`: (default to true), if set to false, it will allow static wado servers to have case in-sensitive matching for queries. please set this as the dataSources configuration, not in the main configuration. +- `caseSensitive`: an object with filter keys that should be case sensitive. By default, all filters are case sensitive. If you want to set a filter to be case insensitive, you can set it to false. Example: + ```js + caseSensitive: { + patientname: false, + } + ``` - `dangerouslyUseDynamicConfig`: Dynamic config allows user to pass `configUrl` query string. This allows to load config without recompiling application. If the `configUrl` query string is passed, the worklist and modes will load from the referenced json rather than the default .env config. If there is no `configUrl` path provided, the default behaviour is used and there should not be any deviation from current user experience.
Points to consider while using `dangerouslyUseDynamicConfig`:
- User have to enable this feature by setting `dangerouslyUseDynamicConfig.enabled:true`. By default it is `false`.