Fixing issues on exportPdf and adding extensibility to location labels
This commit is contained in:
parent
96a747a2ef
commit
ffc32fb214
@ -41,6 +41,5 @@ Package.onUse(function(api) {
|
||||
api.export('TrialCriteriaTypes', 'client');
|
||||
|
||||
// Export collections spanning both client and server
|
||||
api.export('AdditionalFindings', [ 'client', 'server' ]);
|
||||
api.export('Configuration', ['client', 'server']);
|
||||
});
|
||||
|
||||
@ -32,16 +32,6 @@ Meteor.publish('singlePatientImageMeasurements', function(patientId) {
|
||||
});
|
||||
});
|
||||
|
||||
Meteor.publish('additionalFindings', function() {
|
||||
return AdditionalFindings.find();
|
||||
});
|
||||
|
||||
Meteor.publish('singlePatientAdditionalFindings', function(patientId) {
|
||||
return AdditionalFindings.find({
|
||||
patientId: patientId
|
||||
});
|
||||
});
|
||||
|
||||
Meteor.publish('reviewers', function() {
|
||||
return Reviewers.find();
|
||||
});
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
<div class="measurementDetails">
|
||||
<div class='location'>
|
||||
{{#if rowItem.location}}
|
||||
{{rowItem.location}}
|
||||
{{getLocationLabel rowItem.location}}
|
||||
{{else}}
|
||||
(No description)
|
||||
{{/if}}
|
||||
|
||||
@ -7,3 +7,8 @@ import { OHIF } from 'meteor/ohif:core';
|
||||
Template.registerHelper('measurementConfiguration', () => {
|
||||
return OHIF.measurements.MeasurementApi.getConfiguration();
|
||||
});
|
||||
|
||||
// Translates the location and return a string containing its label
|
||||
Template.registerHelper('getLocationLabel', label => {
|
||||
return OHIF.measurements.getLocationLabel(label);
|
||||
});
|
||||
|
||||
@ -10,7 +10,7 @@ OHIF.measurements.exportPdf = (measurementApi, timepointApi) => {
|
||||
const report = new MeasurementReport({
|
||||
header: {
|
||||
trial: 'RECIST 1.1',
|
||||
patientName: formatPN(study.patientName),
|
||||
patientName: OHIF.viewerbase.helpers.formatPN(study.patientName),
|
||||
mrn: study.patientId,
|
||||
timepoint: timepointApi.name(currentTimepoint)
|
||||
}
|
||||
@ -69,7 +69,7 @@ OHIF.measurements.exportPdf = (measurementApi, timepointApi) => {
|
||||
report.printMeasurement({
|
||||
type,
|
||||
number: measurement.measurementNumber,
|
||||
location: measurement.location || '',
|
||||
location: OHIF.measurements.getLocationLabel(measurement.location) || '',
|
||||
info,
|
||||
image: enabledElement.canvas.toDataURL('image/jpeg', 0.85)
|
||||
});
|
||||
|
||||
11
Packages/ohif-measurements/client/lib/getLocationLabel.js
Normal file
11
Packages/ohif-measurements/client/lib/getLocationLabel.js
Normal file
@ -0,0 +1,11 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
/**
|
||||
* Extensible method to translate the location and return a string containing its label
|
||||
*
|
||||
* @param location
|
||||
* @returns string - label for the given location
|
||||
*/
|
||||
OHIF.measurements.getLocationLabel = location => {
|
||||
return location;
|
||||
};
|
||||
@ -1,11 +1,12 @@
|
||||
import './jumpToRowItem.js';
|
||||
import './activateMeasurements.js';
|
||||
import './deactivateAllToolData.js';
|
||||
import './exportPdf.js';
|
||||
import './getMeasurementsGroupedByNumber.js';
|
||||
import './getTimepointName.js';
|
||||
import './hangingProtocolCustomizations.js';
|
||||
import './MeasurementHandlers.js';
|
||||
import './MeasurementManager.js';
|
||||
import './syncMeasurementAndToolData.js';
|
||||
import './toggleLabelButton.js';
|
||||
import './jumpToRowItem';
|
||||
import './activateMeasurements';
|
||||
import './deactivateAllToolData';
|
||||
import './exportPdf';
|
||||
import './getMeasurementsGroupedByNumber';
|
||||
import './getLocationLabel';
|
||||
import './getTimepointName';
|
||||
import './hangingProtocolCustomizations';
|
||||
import './MeasurementHandlers';
|
||||
import './MeasurementManager';
|
||||
import './syncMeasurementAndToolData';
|
||||
import './toggleLabelButton';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user