diff --git a/OHIFViewer/client/components/flexboxLayout/flexboxLayout.styl b/OHIFViewer/client/components/flexboxLayout/flexboxLayout.styl index 1fa946856..39dbec75d 100644 --- a/OHIFViewer/client/components/flexboxLayout/flexboxLayout.styl +++ b/OHIFViewer/client/components/flexboxLayout/flexboxLayout.styl @@ -7,7 +7,7 @@ $lesionsSidebarMenuWidth = 450px flex: 1 flex-flow: row nowrap align-items: stretch - height: 'calc(100% - %s)' %toolbarHeight; + height: 'calc(100% - %s)' % $toolbarHeight; width: 100% .sidebarMenu diff --git a/OHIFViewer/client/components/ohifViewer/ohifViewer.js b/OHIFViewer/client/components/ohifViewer/ohifViewer.js index 61d38691a..8519fbea7 100644 --- a/OHIFViewer/client/components/ohifViewer/ohifViewer.js +++ b/OHIFViewer/client/components/ohifViewer/ohifViewer.js @@ -8,21 +8,6 @@ Template.ohifViewer.onCreated(() => { ViewerData = Session.get('ViewerData') || {}; }); -Template.ohifViewer.onRendered(() => { - const templateData = Template.currentData(); - if (templateData && templateData.studyInstanceUid) { - const studyInstanceUid = templateData.studyInstanceUid; - openNewTab(studyInstanceUid, studyInstanceUid); - } else { - // If there is a tab set as active in the Session, - // switch to that now. - const contentId = Session.get('activeContentId'); - - // TODO: Fix this it seems to be forcing two switches - switchToTab(contentId); - } -}); - Template.ohifViewer.events({ 'click .js-toggle-studyList'() { const contentId = Session.get('activeContentId'); @@ -52,6 +37,7 @@ Template.ohifViewer.helpers({ return 'Study list'; } }, + onStudyList() { return (Session.get('activeContentId') === 'worklistTab'); } diff --git a/OHIFViewer/client/components/viewer/viewer.html b/OHIFViewer/client/components/viewer/viewer.html index a294e370d..e1d7a79b5 100644 --- a/OHIFViewer/client/components/viewer/viewer.html +++ b/OHIFViewer/client/components/viewer/viewer.html @@ -3,6 +3,11 @@
{{> cineDialog}} {{> layoutChooser }} + + + {{ >ruleEntryDialog }} + {{ >settingEntryDialog }} + {{ >textEntryDialog }}
{{> toolbarSection (clone this)}} diff --git a/Packages/design/styles/imports/mixins.styl b/Packages/design/styles/imports/mixins.styl index 0a9dbc7a8..9acc6972a 100644 --- a/Packages/design/styles/imports/mixins.styl +++ b/Packages/design/styles/imports/mixins.styl @@ -53,4 +53,4 @@ placeholder-color(c) &::-moz-placeholder color: c &:-ms-input-placeholder - color: c + color: c \ No newline at end of file diff --git a/Packages/design/styles/imports/theme-tide.styl b/Packages/design/styles/imports/theme-tide.styl index 4433bcffd..7aa395feb 100644 --- a/Packages/design/styles/imports/theme-tide.styl +++ b/Packages/design/styles/imports/theme-tide.styl @@ -14,13 +14,13 @@ $hoverColor = #ffffff $activeColor = #00a4d9 $uiBorderColor = #436270 $uiBorderColorDark = #3C5D80 -$uiBorderColorActive = #3C8074 +$uiBorderColorActive = #00a4d9 $primaryBackgroundColor = #000000 $boxBackgroundColor = #344a61 $boxBackgroundColorDark = #22374D // Text Colors -$textColorActive = #89bae5 +$textColorActive = black //#89bae5 $textPrimaryColor = #ffffff $textSecondaryColor = #6a8fb1 diff --git a/Packages/design/styles/imports/variables.styl b/Packages/design/styles/imports/variables.styl index f657e4bc9..621d56a85 100644 --- a/Packages/design/styles/imports/variables.styl +++ b/Packages/design/styles/imports/variables.styl @@ -1,2 +1,2 @@ -@import "./theme-tigerlilly.styl" -//@import "./theme-tide.styl" \ No newline at end of file +//@import "./theme-tigerlilly.styl" +@import "./theme-tide.styl" \ No newline at end of file diff --git a/Packages/hangingprotocols/client/components/protocolEditor/protocolEditor.html b/Packages/hangingprotocols/client/components/protocolEditor/protocolEditor.html index 21a51f498..c42317d55 100644 --- a/Packages/hangingprotocols/client/components/protocolEditor/protocolEditor.html +++ b/Packages/hangingprotocols/client/components/protocolEditor/protocolEditor.html @@ -1,7 +1,4 @@ \ No newline at end of file diff --git a/Packages/worklist/client/components/worklistResult/worklistResult.js b/Packages/worklist/client/components/worklistResult/worklistResult.js index 15de0a20f..5edb2c79c 100644 --- a/Packages/worklist/client/components/worklistResult/worklistResult.js +++ b/Packages/worklist/client/components/worklistResult/worklistResult.js @@ -1,7 +1,4 @@ -Session.setDefault('searchResults', { - showLoadingText: true, - showNotFoundMessage: false -}); +Session.setDefault('showLoadingText', true); Template.worklistResult.helpers({ /** @@ -28,14 +25,6 @@ Template.worklistResult.helpers({ return WorklistStudies.find().count(); }, - showLoadingText() { - return Session.get('searchResults').showLoadingText; - }, - - showNotFoundMessage() { - return Session.get('searchResults').showNotFoundMessage; - }, - sortingColumnsIcons() { const instance = Template.instance(); @@ -116,18 +105,19 @@ function convertStringToStudyDate(dateStr) { * Inserts the identified studies into the WorklistStudies Collection */ function search() { + console.log('search()'); + // Show loading message - let searchResults = Session.get('searchResults'); - searchResults.showLoadingText = true; - searchResults.showNotFoundMessage = false; - Session.set('searchResults', searchResults); + Session.set('showLoadingText', true); // Create the filters to be used for the Worklist Search filter = { patientName: getFilter($('input#patientName').val()), patientId: getFilter($('input#patientId').val()), accessionNumber: getFilter($('input#accessionNumber').val()), - studyDescription: getFilter($('input#studyDescription').val()) + studyDescription: getFilter($('input#studyDescription').val()), + studyDateFrom: studyDateFrom, + studyDateTo: studyDateTo }; // Make sure that modality has a reasonable value, since it is occasionally @@ -138,14 +128,14 @@ function search() { WorklistStudies.remove({}); Meteor.call('WorklistSearch', filter, (error, studies) => { + console.log('WorklistSearch'); if (error) { log.warn(error); return; } // Hide loading text - searchResults.showLoadingText = false; - Session.set('searchResults', searchResults); + Session.set('showLoadingText', false); if (!studies) { return; @@ -165,13 +155,6 @@ function search() { WorklistStudies.insert(study); } }); - - if (WorklistStudies.find().count() === 0) { - // Show studyNotFound text - searchResults.showNotFoundMessage = true; - Session.set('searchResults', searchResults); - } - }); } @@ -180,9 +163,6 @@ Template.worklistResult.onCreated(() => { instance.sortOption = new ReactiveVar(); instance.sortingColumns = new ReactiveDict(); - // Retrieve all studies - search(); - // Set sortOption const sortOptionSession = Session.get('sortOption'); if (sortOptionSession) { @@ -217,6 +197,9 @@ Template.worklistResult.onRendered(() => { 'Last 30 Days': [moment().subtract(29, 'days'), moment()] } }); + + // Retrieve all studies + search(); }); function resetSortingColumns(instance, sortingColumn) { diff --git a/Packages/worklist/client/components/worklistResult/worklistResult.styl b/Packages/worklist/client/components/worklistResult/worklistResult.styl index 68de969c8..f6671e5f3 100644 --- a/Packages/worklist/client/components/worklistResult/worklistResult.styl +++ b/Packages/worklist/client/components/worklistResult/worklistResult.styl @@ -50,6 +50,7 @@ $bodyCellHeight = 40px width: 100% padding: 0 $tablePadding position: absolute + overflow: hidden z-index: 2 .loadingTextDiv @@ -117,6 +118,7 @@ $bodyCellHeight = 40px box-sizing: border-box transition(all 0.15s ease) + placeholder-color($inputPlaceholderColor) &.invisible visibility: hidden @@ -124,20 +126,6 @@ $bodyCellHeight = 40px &:active, &:hover background-color: $inputBackgroundColor - &::-webkit-input-placeholder /* WebKit, Blink, Edge */ - color: $inputPlaceholderColor - - &:-moz-placeholder /* Mozilla Firefox 4 to 18 */ - color: $inputPlaceholderColor - opacity: 1 - - &::-moz-placeholder /* Mozilla Firefox 19+ */ - color: $inputPlaceholderColor - opacity: 1 - - &:-ms-input-placeholder /* Internet Explorer 10-11 */ - color: $inputPlaceholderColor - ::-webkit-datetime-edit-year-field:not([aria-valuenow]), ::-webkit-datetime-edit-month-field:not([aria-valuenow]), ::-webkit-datetime-edit-day-field:not([aria-valuenow]) @@ -176,3 +164,29 @@ $bodyCellHeight = 40px border-top: 1px solid #436270 border-bottom: 1px solid #436270 background-color: $hoverColor + + +@media only screen and (max-width: 1000px) + $tablePaddingMediumScreen = 10px + #studyListContainer + padding: 0 + + table#tblStudyList + thead > tr > th + &:first-child + padding-left: $tablePaddingMediumScreen + + &:last-child + padding-right: $tablePaddingMediumScreen + + tbody > tr > td + &:first-child + padding-left: $tablePaddingMediumScreen + + &:last-child + padding-right: $tablePaddingMediumScreen + + th.accessionNumber, td.accessionNumber, + th.modalities, td.modalities, + th.numberOfStudyRelatedInstances, td.numberOfStudyRelatedInstances + display: none \ No newline at end of file diff --git a/Packages/worklist/client/components/worklistStudy/worklistStudy.html b/Packages/worklist/client/components/worklistStudy/worklistStudy.html index cf79d4324..bda1d9ba7 100644 --- a/Packages/worklist/client/components/worklistStudy/worklistStudy.html +++ b/Packages/worklist/client/components/worklistStudy/worklistStudy.html @@ -1,31 +1,25 @@ \ No newline at end of file diff --git a/Packages/worklist/client/lib/openNewTab.js b/Packages/worklist/client/lib/openNewTab.js index 05b9b11e2..a6847fc01 100644 --- a/Packages/worklist/client/lib/openNewTab.js +++ b/Packages/worklist/client/lib/openNewTab.js @@ -6,6 +6,8 @@ * @param title The title to be used for the tab heading */ openNewTab = function(studyInstanceUid, title) { + console.log('openNewTab'); + // Generate a unique ID to represent this tab // We can't just use the Mongo entry ID because // then it will change after hot-reloading. diff --git a/Packages/worklist/package.js b/Packages/worklist/package.js index f3719da64..10a2b62a2 100644 --- a/Packages/worklist/package.js +++ b/Packages/worklist/package.js @@ -22,6 +22,7 @@ Package.onUse(function (api) { api.use('gilbertwat:bootstrap3-daterangepicker'); // Our custom packages + api.use('ohif:core'); api.use('design'); api.use('dicomweb'); api.use('dimseservice'); diff --git a/Packages/worklist/server/services/qido/studies.js b/Packages/worklist/server/services/qido/studies.js index b00bc7dac..13e42ed5f 100644 --- a/Packages/worklist/server/services/qido/studies.js +++ b/Packages/worklist/server/services/qido/studies.js @@ -1,3 +1,21 @@ +/** + * Creates a QIDO date string for a date range query + * Assumes the year is positive, at most 4 digits long. + * + * @param date The Date object to be formatted + * @returns {string} The formatted date string + */ +function dateToString(date) { + if(!date) return ""; + var year = date.getFullYear().toString(); + var month = (date.getMonth() + 1).toString(); + var day = date.getDate().toString(); + year = "0".repeat(4-year.length).concat(year); + month= "0".repeat(2-month.length).concat(month); + day = "0".repeat(2-day.length).concat(day); + return "".concat(year,month,day); +} + /** * Produces a QIDO URL given server details and a set of specified search filter * items @@ -19,8 +37,15 @@ function filterToQIDOURL(server, filter) { AccessionNumber: filter.accessionNumber, StudyDescription: filter.studyDescription, limit: filter.limit || 20, - includefield: server.qidoSupportsIncludeField ? 'all' : commaSeparatedFields + includefield: server.qidoSupportsIncludeField ? commaSeparatedFields : 'all' }; + + // build the StudyDate range parameter + if (filter.studyDateFrom || filter.sutydDateTo) { + var date = "".concat(dateToString(new Date(filter.studyDateFrom)), "-", dateToString(new Date(filter.studyDateTo))); + parameters.StudyDate = date; + } + return server.qidoRoot + '/studies?' + encodeQueryData(parameters); } @@ -33,6 +58,10 @@ function filterToQIDOURL(server, filter) { function resultDataToStudies(resultData) { var studies = []; + if (!resultData || !resultData.length) { + return; + } + resultData.forEach(function(study) { studies.push({ studyInstanceUid: DICOMWeb.getString(study['0020000D']), @@ -55,6 +84,7 @@ function resultDataToStudies(resultData) { modalities: DICOMWeb.getString(DICOMWeb.getModalities(study['00080060'], study['00080061'])) }); }); + return studies; }