feat(fuzzyMatching): fuzzymatching for query parameters if server config indicates support
This commit is contained in:
1 parent
02c732aa15
commit
40bf1a2efd
4 files changed
+26
-16
No files matched your search
@@ -30,6 +30,7 @@ class DicomStorePickerModal extends Component {
|
||||
wadoRoot: data.wadoRoot,
|
||||
wadoUriRoot: data.wadoUriRoot,
|
||||
active: true,
|
||||
supportsFuzzyMatching: false,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -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 ? <ConnectedDicomFilesUploader
|
||||
isOpen={this.state.modalComponentId === 'DicomFilesUploader'}
|
||||
onClose={this.closeModals}
|
||||
/> : null}
|
||||
{this.props.studyListFunctionsEnabled ? (
|
||||
<ConnectedDicomFilesUploader
|
||||
isOpen={this.state.modalComponentId === 'DicomFilesUploader'}
|
||||
onClose={this.closeModals}
|
||||
/>
|
||||
) : null}
|
||||
{healthCareApiButtons}
|
||||
{healthCareApiWindows}
|
||||
</StudyList>
|
||||
@@ -269,12 +275,15 @@ class StudyListWithData extends Component {
|
||||
<WhiteLabellingContext.Consumer>
|
||||
{whiteLabelling => (
|
||||
<UserManagerContext.Consumer>
|
||||
{ userManager => (
|
||||
<ConnectedHeader home={true} user={this.props.user} userManager={userManager}>
|
||||
{userManager => (
|
||||
<ConnectedHeader
|
||||
home={true}
|
||||
user={this.props.user}
|
||||
userManager={userManager}
|
||||
>
|
||||
{whiteLabelling.logoComponent}
|
||||
</ConnectedHeader>
|
||||
)
|
||||
}
|
||||
)}
|
||||
</UserManagerContext.Consumer>
|
||||
)}
|
||||
</WhiteLabellingContext.Consumer>
|
||||
|
||||
Reference in new issue
Block a user