Meteor.settings.enableDebug?log.debug(`deleteClient() => get relationshipCount of deleted item`,relationShipCount,Meteor.user().username):'';
if(relationShipCount>0){
if(relationShipCount>0){
Meteor.settings.enableDebug?log.debug(`deleteClient() => relationShipCount is greater than zero and selected client can not be deleted`,{relationShipCount,...item},Meteor.user().username):'';
Meteor.settings.enableDebug?log.debug(`deleteHisLink() => get relationshipCount of deleted item`,relationShipCount,Meteor.user().username):'';
if(relationShipCount>0){
if(relationShipCount>0){
Meteor.settings.enableDebug?log.debug(`deleteHisLink() => relationShipCount is greater than zero and selected hislink can not be deleted`,{relationShipCount,...item},Meteor.user().username):'';
// Send to server in batch of 1000 insert operations
// Send to server in batch of 1000 insert operations
if(counter%1000==0){
if(counter%1000==0){
// Execute per 1000 operations and re-initialize every 1000 update statements
// Execute per 1000 operations and re-initialize every 1000 update statements
bulkOp.execute(function(e,rresult){
bulkOp.execute(function(e,result){
// do something with result
// Meteor.settings.enableDebug ? log.debug(`sqlite2mongo() => ${counter} records have been inserted into mongodb`, counter, Meteor.user().username) : '';
// Meteor.settings.enableDebug ? log.debug(`sqlite2mongo() => ${counter} records have been inserted into mongodb`, counter, Meteor.user().username) : '';
});
});
}
}
Meteor.settings.enableDebug?log.debug(`sqlite2mongo() => insertion into mongodb have done`,counter,Meteor.user().username):'';
returntrue;
returntrue;
}).catch((e)=>{
}).catch((e)=>{
log.error(`sqlite2mongo() => error in fetching records from sqlite db`,e,Meteor.user().username);
Meteor.settings.enableDebug?log.debug(`Fetchworklist() => worklist for user and devicemap have been removed`,devicemap,Meteor.user().username):'';
Meteor.settings.enableDebug?log.debug(`Fetchworklist() => start inserting worklist for user and devicemap into tempcollection `,devicemap,Meteor.user().username):'';
worklistHttp.WorkListItems.forEach((patient)=>{
worklistHttp.WorkListItems.forEach((patient)=>{
deletepatient._id;
deletepatient._id;
Worklist.insert({
Worklist.insert({
...
@@ -38,10 +55,11 @@ Meteor.methods({
...
@@ -38,10 +55,11 @@ Meteor.methods({
});
});
});
});
Meteor.settings.enableDebug?log.debug(`Fetchworklist() => worklist for user and devicemap have been inserted into tempcollection `,devicemap,Meteor.user().username):'';
returntrue
returntrue
}catch(e){
}catch(e){
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
Meteor.settings.enableDebug?log.debug(`EditworklistItem() => updating temp collection for edited item in worklist have been done`,update,Meteor.user().username):'';