Allowing follow-up number to be controlled by configuration

This commit is contained in:
Bruno Alves de Faria 2017-02-23 14:01:16 -03:00
parent e7cd285f9c
commit 710d7c9a02
5 changed files with 25 additions and 19 deletions

View File

@ -642,7 +642,7 @@ HP.ProtocolEngine = class ProtocolEngine {
} }
if (!currentViewportData.displaySetInstanceUid) { if (!currentViewportData.displaySetInstanceUid) {
throw 'No matching display set found?'; throw new Meteor.Error('No matching display set found?');
} }
viewportData.push(currentViewportData); viewportData.push(currentViewportData);

View File

@ -220,6 +220,8 @@ class TimepointApi {
// Check if this is a Baseline timepoint, if it is, return 'Baseline' // Check if this is a Baseline timepoint, if it is, return 'Baseline'
if (timepoint.timepointType === 'baseline') { if (timepoint.timepointType === 'baseline') {
return 'Baseline'; return 'Baseline';
} else if (timepoint.visitNumber) {
return 'Follow-up ' + timepoint.visitNumber;
} }
// Retrieve all of the relevant follow-up timepoints for this patient // Retrieve all of the relevant follow-up timepoints for this patient

View File

@ -27,5 +27,10 @@ export const schema = new SimpleSchema({
latestDate: { latestDate: {
type: Date, type: Date,
label: 'Most recent Study Date from associated studies', label: 'Most recent Study Date from associated studies',
},
visitNumber: {
type: Number,
label: 'Number of patient\'s visit',
optional: true
} }
}); });

View File

@ -12,6 +12,8 @@ OHIF.measurements.getTimepointName = timepoint => {
// Check if this is a Baseline timepoint, if it is, return 'Baseline' // Check if this is a Baseline timepoint, if it is, return 'Baseline'
if (timepoint.timepointType === 'baseline') { if (timepoint.timepointType === 'baseline') {
return 'Baseline'; return 'Baseline';
} else if (timepoint.visitNumber) {
return 'Follow-up ' + timepoint.visitNumber;
} }
// Retrieve all of the relevant follow-up timepoints for this patient // Retrieve all of the relevant follow-up timepoints for this patient

View File

@ -80,9 +80,7 @@ export class LayoutManager {
// Get all the display sets for the viewer studies // Get all the display sets for the viewer studies
let displaySets = []; let displaySets = [];
this.studies.forEach(study => { this.studies.forEach(study => {
study.displaySets.forEach(displaySet => { study.displaySets.forEach(dSet => dSet.images.length && displaySets.push(dSet));
displaySet.images.length && displaySets.push(displaySet);
});
}); });
// Get the display sets that will be appended to the current ones // Get the display sets that will be appended to the current ones
@ -266,7 +264,7 @@ export class LayoutManager {
columns: 1 columns: 1
}; };
const layoutTemplate = Template['gridLayout']; const layoutTemplate = Template.gridLayout;
$(this.parentNode).html(''); $(this.parentNode).html('');
Blaze.renderWithData(layoutTemplate, data, this.parentNode); Blaze.renderWithData(layoutTemplate, data, this.parentNode);
@ -305,8 +303,7 @@ export class LayoutManager {
if (this.isZoomed) { if (this.isZoomed) {
this.resetPreviousLayout(); this.resetPreviousLayout();
} } else {
else {
// Don't enlarge the viewport if we only have one Viewport // Don't enlarge the viewport if we only have one Viewport
// to begin with // to begin with
if (this.getNumberOfViewports() > 1) { if (this.getNumberOfViewports() > 1) {
@ -682,4 +679,4 @@ export class LayoutManager {
return this.layoutProps.row !== 1 && this.layoutProps.columns !== 1; return this.layoutProps.row !== 1 && this.layoutProps.columns !== 1;
} }
}; }