LT-327: Added functionality to disassociate timepoints from studies
This commit is contained in:
1 parent
e957968494
commit
01d22aa3c5
9 files changed
+106
-63
No files matched your search
@@ -20,13 +20,13 @@ class TimepointApi {
|
||||
if (currentTimepointId) {
|
||||
this.currentTimepointId = currentTimepointId;
|
||||
}
|
||||
}
|
||||
|
||||
retrieveTimepoints(filter) {
|
||||
this.timepoints = new Mongo.Collection(null);
|
||||
this.timepoints.attachSchema(TimepointSchema);
|
||||
this.timepoints._debugName = 'Timepoints';
|
||||
}
|
||||
|
||||
retrieveTimepoints(filter) {
|
||||
const retrievalFn = configuration.dataExchange.retrieve;
|
||||
if (!_.isFunction(retrievalFn)) {
|
||||
return;
|
||||
@@ -59,6 +59,16 @@ class TimepointApi {
|
||||
storeFn(timepointData).then(() => OHIF.log.info('Timepoint storage completed'));
|
||||
}
|
||||
|
||||
disassociateStudy(timepointIds, studyInstanceUid) {
|
||||
const disassociateFn = configuration.dataExchange.disassociate;
|
||||
disassociateFn(timepointIds, studyInstanceUid).then(() => {
|
||||
OHIF.log.info('Disassociation completed')
|
||||
|
||||
this.timepoints.remove({});
|
||||
this.retrieveTimepoints();
|
||||
});
|
||||
}
|
||||
|
||||
removeTimepoint(timepointId) {
|
||||
const removeFn = configuration.dataExchange.remove;
|
||||
if (!_.isFunction(removeFn)) {
|
||||
|
||||
Reference in new issue
Block a user