Add referenceStudyUID to measurement schema
This commit is contained in:
parent
0a4af79b44
commit
df95db6d15
@ -65,6 +65,7 @@ const measurementServiceMappingsFactory = measurementService => {
|
|||||||
SOPInstanceUID,
|
SOPInstanceUID,
|
||||||
FrameOfReferenceUID,
|
FrameOfReferenceUID,
|
||||||
SeriesInstanceUID,
|
SeriesInstanceUID,
|
||||||
|
StudyInstanceUID,
|
||||||
} = _getAttributes(element);
|
} = _getAttributes(element);
|
||||||
|
|
||||||
const points = [];
|
const points = [];
|
||||||
@ -75,6 +76,7 @@ const measurementServiceMappingsFactory = measurementService => {
|
|||||||
SOPInstanceUID: SOPInstanceUID,
|
SOPInstanceUID: SOPInstanceUID,
|
||||||
FrameOfReferenceUID,
|
FrameOfReferenceUID,
|
||||||
referenceSeriesUID: SeriesInstanceUID,
|
referenceSeriesUID: SeriesInstanceUID,
|
||||||
|
referenceStudyUID: StudyInstanceUID,
|
||||||
label: measurementData.text,
|
label: measurementData.text,
|
||||||
description: measurementData.description,
|
description: measurementData.description,
|
||||||
unit: measurementData.unit,
|
unit: measurementData.unit,
|
||||||
@ -96,6 +98,7 @@ const measurementServiceMappingsFactory = measurementService => {
|
|||||||
SOPInstanceUID: instance.SOPInstanceUID,
|
SOPInstanceUID: instance.SOPInstanceUID,
|
||||||
FrameOfReferenceUID: instance.FrameOfReferenceUID,
|
FrameOfReferenceUID: instance.FrameOfReferenceUID,
|
||||||
SeriesInstanceUID: instance.SeriesInstanceUID,
|
SeriesInstanceUID: instance.SeriesInstanceUID,
|
||||||
|
StudyInstanceUID: instance.StudyInstanceUID,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -33,6 +33,7 @@ const MEASUREMENT_SCHEMA_KEYS = [
|
|||||||
'id',
|
'id',
|
||||||
'SOPInstanceUID',
|
'SOPInstanceUID',
|
||||||
'FrameOfReferenceUID',
|
'FrameOfReferenceUID',
|
||||||
|
'referenceStudyUID',
|
||||||
'referenceSeriesUID',
|
'referenceSeriesUID',
|
||||||
'label',
|
'label',
|
||||||
'description',
|
'description',
|
||||||
@ -263,7 +264,6 @@ class MeasurementService {
|
|||||||
const sourceInfo = this._getSourceInfo(source);
|
const sourceInfo = this._getSourceInfo(source);
|
||||||
|
|
||||||
if (!definition) {
|
if (!definition) {
|
||||||
console.log('TEST');
|
|
||||||
log.warn('No source definition provided. Exiting early.');
|
log.warn('No source definition provided. Exiting early.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -338,33 +338,6 @@ class MeasurementService {
|
|||||||
return newMeasurement.id;
|
return newMeasurement.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Subscribe to measurement updates.
|
|
||||||
*
|
|
||||||
* @param {string} eventName The name of the event
|
|
||||||
* @param {Function} callback Events callback
|
|
||||||
* @return {Object} Observable object with actions
|
|
||||||
// */
|
|
||||||
// subscribe(eventName, callback) {
|
|
||||||
// if (this._isValidEvent(eventName)) {
|
|
||||||
// const listenerId = guid();
|
|
||||||
// const subscription = { id: listenerId, callback };
|
|
||||||
|
|
||||||
// console.info(`Subscribing to '${eventName}'.`);
|
|
||||||
// if (Array.isArray(this.listeners[eventName])) {
|
|
||||||
// this.listeners[eventName].push(subscription);
|
|
||||||
// } else {
|
|
||||||
// this.listeners[eventName] = [subscription];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// return {
|
|
||||||
// unsubscribe: () => this._unsubscribe(eventName, listenerId),
|
|
||||||
// };
|
|
||||||
// } else {
|
|
||||||
// throw new Error(`Event ${eventName} not supported.`);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
_getMappingByMeasurementSource(measurementId, definition) {
|
_getMappingByMeasurementSource(measurementId, definition) {
|
||||||
const measurement = this.getMeasurement(measurementId);
|
const measurement = this.getMeasurement(measurementId);
|
||||||
if (this._isValidSource(measurement.source)) {
|
if (this._isValidSource(measurement.source)) {
|
||||||
@ -449,28 +422,6 @@ class MeasurementService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Unsubscribe to measurement updates.
|
|
||||||
*
|
|
||||||
* @param {string} eventName The name of the event
|
|
||||||
// * @param {string} listenerId The listeners id
|
|
||||||
// * @return void
|
|
||||||
// */
|
|
||||||
// _unsubscribe(eventName, listenerId) {
|
|
||||||
// if (!this.listeners[eventName]) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const listeners = this.listeners[eventName];
|
|
||||||
// if (Array.isArray(listeners)) {
|
|
||||||
// this.listeners[eventName] = listeners.filter(
|
|
||||||
// ({ id }) => id !== listenerId
|
|
||||||
// );
|
|
||||||
// } else {
|
|
||||||
// this.listeners[eventName] = undefined;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a given measurement data is valid.
|
* Check if a given measurement data is valid.
|
||||||
*
|
*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user