Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pop-up message for MPA #948

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/* Created: 3-12-2024 by Kollil and Raymond
This script is added to create a pop-up message box when a MPA injection is selected in the medication order form.
Refer to the ticket #9669
*/
Ext4.define('ONPRC_EHR.panel.TreatmentOrdersDataEntryPanel', {
extend: 'EHR.panel.TaskDataEntryPanel',

onBeforeSubmit: function(btn){
if (!btn || !btn.targetQC || ['Completed'].indexOf(btn.targetQC) == -1){
return;
}
var store = this.storeCollection.getClientStoreByName('Treatment Orders');
LDK.Assert.assertNotEmpty('Unable to find Treatment Orders store', store);

var ids = [];
store.each(function(r){
if (r.get('Id')&& r.get('code')=='E-85760' && r.get('category') == 'Clinical' )
ids.push(r.get('Id'))
}, this);
ids = Ext4.unique(ids);

if (!ids.length)
return;

if (ids.length){
Ext4.Msg.confirm('Medication Question', 'Have you confirmed start date on CMU Calendar?', function(val){
if (val == 'yes'){
this.onSubmit(btn, true);
}
else {

}
}, this);
}
else {
this.onSubmit(btn, true);
}
return false;
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,18 @@ public TreatmentsFormType(DataEntryFormContext ctx, Module owner)
}
addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/model/sources/TreatmentDrugsClinical.js"));

//Added by Kollil, 3/12/24
//This script was added to show a pop-up question box when the user selects MPA medication on the Medication order form.
addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/panel/TreatmentOrdersDataEntryPanel.js"));
setJavascriptClass("ONPRC_EHR.panel.TreatmentOrdersDataEntryPanel");

if (ctx.getContainer().getActiveModules().contains(ModuleLoader.getInstance().getModule("onprc_billing")))
{
addSection(new MiscChargesFormSection(EHRService.FORM_SECTION_LOCATION.Body));
}

}



@Override
protected boolean canInsert()
{
Expand Down