-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
onprc_ehr/resources/web/onprc_ehr/panel/TreatmentOrdersDataEntryPanel.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright (c) 2014 LabKey Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 | ||
*/ | ||
|
||
// Created: 3-12-2024 by Kollil and Raymond | ||
/* | ||
This java 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; | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters