LT-368: Disassociating previous baselines/follow-ups on new baseline association
This commit is contained in:
parent
47e149b648
commit
4a3b01a4f6
@ -4,6 +4,7 @@ import { Blaze } from 'meteor/blaze';
|
|||||||
import { Random } from 'meteor/random';
|
import { Random } from 'meteor/random';
|
||||||
import { moment } from 'meteor/momentjs:moment';
|
import { moment } from 'meteor/momentjs:moment';
|
||||||
import { OHIF } from 'meteor/ohif:core';
|
import { OHIF } from 'meteor/ohif:core';
|
||||||
|
import { _ } from 'meteor/underscore';
|
||||||
|
|
||||||
Template.dialogStudyAssociation.onCreated(() => {
|
Template.dialogStudyAssociation.onCreated(() => {
|
||||||
const instance = Template.instance();
|
const instance = Template.instance();
|
||||||
@ -50,8 +51,11 @@ Template.dialogStudyAssociation.onCreated(() => {
|
|||||||
const studiesKeys = Object.keys(studies);
|
const studiesKeys = Object.keys(studies);
|
||||||
|
|
||||||
// TODO: REMOVE - Temporary for RSNA
|
// TODO: REMOVE - Temporary for RSNA
|
||||||
const patientId = studies[studiesKeys[0]][0].patientId;
|
const hasBaseline = _.contains(studiesKeys, 'baseline');
|
||||||
Timepoints.remove({ patientId });
|
if (hasBaseline) {
|
||||||
|
const patientId = studies[studiesKeys[0]][0].patientId;
|
||||||
|
Timepoints.remove({ patientId });
|
||||||
|
}
|
||||||
|
|
||||||
studiesKeys.forEach(timepointType => {
|
studiesKeys.forEach(timepointType => {
|
||||||
// Get the studies associated with this timepoint
|
// Get the studies associated with this timepoint
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user