Remove some subscription / reactivity / caching bugs and the unnecessary PatientLocations collection
This commit is contained in:
1 parent
7d42456f57
commit
9cde04bcfe
43 files changed
+321
-234
No files matched your search
+1
-17
@@ -205,20 +205,6 @@ Template.lesionLocationDialog.events({
|
||||
_id: selectedOptionId
|
||||
});
|
||||
|
||||
var id;
|
||||
var existingLocation = PatientLocations.findOne({
|
||||
location: locationObj.location
|
||||
});
|
||||
if (existingLocation) {
|
||||
id = existingLocation._id;
|
||||
} else {
|
||||
// Adds location data to PatientLocation and retrieve the location ID
|
||||
id = PatientLocations.insert({
|
||||
location: locationObj.location,
|
||||
locationId: locationObj._id
|
||||
});
|
||||
}
|
||||
|
||||
// Add an ID value to the tool data to link it to the Measurements collection
|
||||
if (!measurementData.id) {
|
||||
measurementData.id = 'notready';
|
||||
@@ -226,7 +212,6 @@ Template.lesionLocationDialog.events({
|
||||
// Link locationUID with active lesion measurementData
|
||||
measurementData.location = locationObj.location;
|
||||
measurementData.locationId = locationObj.id;
|
||||
measurementData.locationUID = id;
|
||||
|
||||
/// Set the isTarget value to true, since this is the target-lesion dialog callback
|
||||
measurementData.isTarget = true;
|
||||
@@ -241,8 +226,7 @@ Template.lesionLocationDialog.events({
|
||||
$set: {
|
||||
location: locationObj.location,
|
||||
locationId: locationObj.id,
|
||||
isNodal: locationObj.isNodal,
|
||||
locationUID: id
|
||||
isNodal: locationObj.isNodal
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user