From 40bf1a2efd42a22f89648cc332132f46e390e9b3 Mon Sep 17 00:00:00 2001
From: Egor Lezhnin <878990+pavertomato@users.noreply.github.com>
Date: Mon, 29 Jul 2019 16:56:07 +0300
Subject: [PATCH] feat(fuzzyMatching): fuzzymatching for query parameters if
server config indicates support
---
package.json | 2 +-
src/googleCloud/DicomStorePickerModal.js | 1 +
src/studylist/StudyListWithData.js | 31 +++++++++++++++---------
yarn.lock | 8 +++---
4 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/package.json b/package.json
index 6cab63e07..732fd61ac 100644
--- a/package.json
+++ b/package.json
@@ -94,7 +94,7 @@
"i18next-browser-languagedetector": "^3.0.1",
"lodash.isequal": "4.5.0",
"moment": "^2.24.0",
- "ohif-core": "0.10.6",
+ "ohif-core": "0.11.0",
"oidc-client": "1.8.x",
"prop-types": "^15.7.2",
"react": "^16.8.6",
diff --git a/src/googleCloud/DicomStorePickerModal.js b/src/googleCloud/DicomStorePickerModal.js
index c5b7e35e3..b6a4b310b 100644
--- a/src/googleCloud/DicomStorePickerModal.js
+++ b/src/googleCloud/DicomStorePickerModal.js
@@ -30,6 +30,7 @@ class DicomStorePickerModal extends Component {
wadoRoot: data.wadoRoot,
wadoUriRoot: data.wadoUriRoot,
active: true,
+ supportsFuzzyMatching: false,
},
];
diff --git a/src/studylist/StudyListWithData.js b/src/studylist/StudyListWithData.js
index 2a51709cc..705c694c2 100644
--- a/src/studylist/StudyListWithData.js
+++ b/src/studylist/StudyListWithData.js
@@ -27,11 +27,11 @@ class StudyListWithData extends Component {
server: PropTypes.object,
user: PropTypes.object,
history: PropTypes.object,
- studyListFunctionsEnabled: PropTypes.bool
+ studyListFunctionsEnabled: PropTypes.bool,
};
static defaultProps = {
- studyListFunctionsEnabled: true
+ studyListFunctionsEnabled: true,
};
static rowsPerPage = 25;
@@ -92,6 +92,10 @@ class StudyListWithData extends Component {
offset: searchData.currentPage * searchData.rowsPerPage,
};
+ if (server.supportsFuzzyMatching) {
+ filter.fuzzymatching = true;
+ }
+
// TODO: add sorting
const promise = OHIF.studies.searchStudies(server, filter);
@@ -152,7 +156,7 @@ class StudyListWithData extends Component {
};
onImport = () => {
- this.openModal('DicomFilesUploader')
+ this.openModal('DicomFilesUploader');
};
openModal = modalComponentId => {
@@ -238,10 +242,12 @@ class StudyListWithData extends Component {
}
onSearch={this.onSearch}
>
- {this.props.studyListFunctionsEnabled ? : null}
+ {this.props.studyListFunctionsEnabled ? (
+
+ ) : null}
{healthCareApiButtons}
{healthCareApiWindows}
@@ -269,12 +275,15 @@ class StudyListWithData extends Component {
{whiteLabelling => (
- { userManager => (
-
+ {userManager => (
+
{whiteLabelling.logoComponent}
- )
- }
+ )}
)}
diff --git a/yarn.lock b/yarn.lock
index de17dc14b..8a38296ce 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -10501,10 +10501,10 @@ octokit-pagination-methods@^1.1.0:
resolved "https://registry.yarnpkg.com/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz#cf472edc9d551055f9ef73f6e42b4dbb4c80bea4"
integrity sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ==
-ohif-core@0.10.6:
- version "0.10.6"
- resolved "https://registry.yarnpkg.com/ohif-core/-/ohif-core-0.10.6.tgz#5dc08ae5986fd56caca4401cd8b2d8ee0740fab0"
- integrity sha512-u0otTi6jJ+rhxKCEltrhg23kzD5YYQaLgcXp89SFh8o4bQeWR13gVUFSPGuVEQUVeRXXQnR/SZx5eqaaGAav9Q==
+ohif-core@0.11.0:
+ version "0.11.0"
+ resolved "https://registry.yarnpkg.com/ohif-core/-/ohif-core-0.11.0.tgz#7abd1e62c037209f3029aa8fc7cc5ecd5788dada"
+ integrity sha512-SeJ/w+j2CIsv7dbFsnZXtdshbR6AZM13MJKv7nFtrSUnYX6O8nG5TBFm/61Qj4fN/uZ3Nq0I45NB7GD0slOZ4A==
dependencies:
"@babel/runtime" "^7.2.0"
ajv "^6.10.0"