Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion ehr/resources/web/ehr/window/OpenSurgeryCasesWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,16 @@ Ext4.define('EHR.window.OpenSurgeryCasesWindow', {
console.log('updating procedure with caseid');
rec.set('caseid', row.objectid);
}, this);

this.caseUpdateStores.forEach(function(store){
if (store.getFields().get('caseid') && store.getFields().get('Id')){
store.each((rec) => {
if (rec.get('Id') == row.Id){
rec.set('caseid', row.objectid);
}
}, this);
}
}, this);
}
}, this);
}
Expand All @@ -293,6 +303,16 @@ Ext4.define('EHR.window.OpenSurgeryCasesWindow', {
console.log('updating procedure with caseid')
rec.set('caseid', row.objectid);
}, this);

this.caseUpdateStores.forEach(function(store){
if (store.getFields().get('caseid') && store.getFields().get('Id')){
store.each((rec) => {
if (rec.get('Id') == row.Id){
rec.set('caseid', row.objectid);
}
}, this);
}
}, this);
}
}, this);
}
Expand Down Expand Up @@ -336,7 +356,8 @@ EHR.DataEntryUtils.registerDataEntryFormButton('OPENSURGERYCASES', {
}

Ext4.create('EHR.window.OpenSurgeryCasesWindow', {
sourceStore: clientStore
sourceStore: clientStore,
caseUpdateStores: panel.storeCollection.clientStores.items,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is picky, but wouldnt it be a little more normal to make a pointer to the StoreCollection, rather than 'items', which is more like an internal field of that class? Either accomplishes your goal, obviously.

}).show();
}
});
Loading