Make the persistence method of hanging protocols configurable
- Implement ProtocolStore interface to allow persisting hanging protocols using different strategies - Implement and set default strategy to persist hanging protocols in the MongoDB collection “HangingProtocols” in the application server
This commit is contained in:
1 parent
06412b51bf
commit
77182d1916
17 files changed
+282
-183
No files matched your search
@@ -2,14 +2,3 @@ Meteor.publish('hangingprotocols', function() {
|
||||
// TODO: filter by availableTo user
|
||||
return HangingProtocols.find();
|
||||
});
|
||||
|
||||
Meteor.startup(function() {
|
||||
// Uncomment this next line to reset all your Protocols on every server reset
|
||||
// HangingProtocols.remove({});
|
||||
|
||||
if (HangingProtocols.find().count() === 0) {
|
||||
console.log('Inserting default protocols');
|
||||
HangingProtocols.insert(HP.defaultProtocol);
|
||||
HangingProtocols.insert(HP.testProtocol);
|
||||
}
|
||||
});
|
||||
@@ -1,43 +0,0 @@
|
||||
/*DICOMTags = new Meteor.Collection(null);
|
||||
|
||||
Object.keys(HP.tagDescriptions).forEach(function(key) {
|
||||
var value = HP.tagDescriptions[key];
|
||||
DICOMTags.insert({
|
||||
id: key,
|
||||
name: '(' + key + ') ' + value
|
||||
});
|
||||
});
|
||||
|
||||
Meteor.methods({
|
||||
dicomTagSearch: function(partialName) {
|
||||
check(partialName, String);
|
||||
|
||||
var results = DICOMTags.find({
|
||||
name: {
|
||||
$regex: partialName,
|
||||
$options: 'i'
|
||||
}
|
||||
}, {
|
||||
limit: 20,
|
||||
fields: {
|
||||
id: 1,
|
||||
name: 1
|
||||
}
|
||||
}).fetch();
|
||||
|
||||
return {
|
||||
results: results
|
||||
};
|
||||
}
|
||||
}); */
|
||||
|
||||
Meteor.methods({
|
||||
removeHangingProtocol: function(id) {
|
||||
HangingProtocols.remove(id);
|
||||
},
|
||||
removeHangingProtocolByID: function(id) {
|
||||
HangingProtocols.remove({
|
||||
id: id
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user