Add referenceStudyUID to measurement schema

This commit is contained in:
dannyrb committed 2020-05-27 22:20:40 -04:00
1 parent 0a4af79b44
commit df95db6d15
2 files changed
+4 -50

No files matched your search

@@ -33,6 +33,7 @@ const MEASUREMENT_SCHEMA_KEYS = [
'id',
'SOPInstanceUID',
'FrameOfReferenceUID',
'referenceStudyUID',
'referenceSeriesUID',
'label',
'description',
@@ -263,7 +264,6 @@ class MeasurementService {
const sourceInfo = this._getSourceInfo(source);
if (!definition) {
console.log('TEST');
log.warn('No source definition provided. Exiting early.');
return;
}
@@ -338,33 +338,6 @@ class MeasurementService {
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) {
const measurement = this.getMeasurement(measurementId);
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.
*