Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
IbrahimCSAE committed Dec 13, 2024
1 parent f5d206c commit 52378b6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
6 changes: 3 additions & 3 deletions extensions/default/src/DicomWebDataSource/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(),
};
Expand All @@ -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(),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 3 additions & 1 deletion platform/app/public/config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion platform/docs/docs/configuration/configurationFiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br/>
Points to consider while using `dangerouslyUseDynamicConfig`:<br/>
- User have to enable this feature by setting `dangerouslyUseDynamicConfig.enabled:true`. By default it is `false`.
Expand Down

0 comments on commit 52378b6

Please sign in to comment.