Allowing follow-up number to be controlled by configuration
This commit is contained in:
parent
e7cd285f9c
commit
710d7c9a02
@ -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);
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -12,8 +12,8 @@ import { OHIF } from 'meteor/ohif:core';
|
|||||||
export class LayoutManager {
|
export class LayoutManager {
|
||||||
/**
|
/**
|
||||||
* Constructor: initializes a Layout Manager object.
|
* Constructor: initializes a Layout Manager object.
|
||||||
* @param {DOM element} parentNode DOM element representing the parent node, which wraps the Layout Manager content
|
* @param {DOM element} parentNode DOM element representing the parent node, which wraps the Layout Manager content
|
||||||
* @param {Array} studies Array of studies objects that will be rendered in the Viewer. Each object will be rendered in a div.imageViewerViewport
|
* @param {Array} studies Array of studies objects that will be rendered in the Viewer. Each object will be rendered in a div.imageViewerViewport
|
||||||
*/
|
*/
|
||||||
constructor(parentNode, studies) {
|
constructor(parentNode, studies) {
|
||||||
OHIF.log.info('LayoutManager constructor');
|
OHIF.log.info('LayoutManager constructor');
|
||||||
@ -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
|
||||||
@ -176,7 +174,7 @@ export class LayoutManager {
|
|||||||
viewportData: []
|
viewportData: []
|
||||||
}, layoutProps);
|
}, layoutProps);
|
||||||
|
|
||||||
this.viewportData.forEach( viewportData => {
|
this.viewportData.forEach(viewportData => {
|
||||||
const viewportDataAndLayoutProps = $.extend(viewportData, layoutProps);
|
const viewportDataAndLayoutProps = $.extend(viewportData, layoutProps);
|
||||||
data.viewportData.push(viewportDataAndLayoutProps);
|
data.viewportData.push(viewportDataAndLayoutProps);
|
||||||
});
|
});
|
||||||
@ -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) {
|
||||||
@ -464,7 +461,7 @@ export class LayoutManager {
|
|||||||
// Check if the begin was reached
|
// Check if the begin was reached
|
||||||
let beginReached = true;
|
let beginReached = true;
|
||||||
|
|
||||||
if(activeViewportIndex >= 0) {
|
if (activeViewportIndex >= 0) {
|
||||||
sequenceMap.forEach((studyViewports, study) => {
|
sequenceMap.forEach((studyViewports, study) => {
|
||||||
// Get active viewport index if isMultiple is false ortherwise get first
|
// Get active viewport index if isMultiple is false ortherwise get first
|
||||||
const studyViewport = studyViewports[activeViewportIndex !== null ? activeViewportIndex : 0];
|
const studyViewport = studyViewports[activeViewportIndex !== null ? activeViewportIndex : 0];
|
||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user