Fix the issues with modality filter in study list

This commit is contained in:
Evren Ozkan 2018-10-25 19:28:54 -04:00
parent 68e2619199
commit 6ad7586d25

View File

@ -130,22 +130,22 @@ function search() {
OHIF.studies.searchStudies(filter).then((studies) => { OHIF.studies.searchStudies(filter).then((studies) => {
OHIF.log.info('StudyListSearch'); OHIF.log.info('StudyListSearch');
// Hide loading text
// Hide loading text
Session.set('showLoadingText', false); Session.set('showLoadingText', false);
// Clear all current studies
OHIF.studylist.collections.Studies.remove({});
if (!studies) { if (!studies) {
OHIF.log.warn('No studies found'); OHIF.log.warn('No studies found');
return; return;
} }
// Clear all current studies
OHIF.studylist.collections.Studies.remove({});
// Loop through all identified studies // Loop through all identified studies
studies.forEach(study => { studies.forEach(study => {
// TODO: Why is this Modality filter different from QIDO? // TODO: Why is this Modality filter different from QIDO?
if (modality !== "" && study.modalities.includes(modality)) { if (!modality && !study.modalities.includes(modality)) {
return; return;
} }