Skip to content

Commit

Permalink
Merge branch 'release23.11-SNAPSHOT' into 23.11_fb_ComplianceProcedur…
Browse files Browse the repository at this point in the history
…eTestTranslation
  • Loading branch information
Ohsudev committed Sep 24, 2024
2 parents d2eb071 + 2f11c32 commit 88cb807
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
11 changes: 11 additions & 0 deletions onprc_ehr/resources/scripts/onprc_ehr/onprc_triggers.js
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,17 @@ exports.init = function(EHR){
EHR.Server.Utils.addError(scriptErrors, 'amount', 'When entering Omnipaque, must enter amount and amount_units must be in mg', 'WARN');
}

//Added by Kollil, 8/1/24
/*User can bypass the enddate for these two medications, as per ticket #11016
Validation code on the Prime side to bypass the following two medications without entering the end dates.
1. E-85760 - Medroxyprogesterone injectable (150mg/ml)
2. E-Y7735 - Diet - Weekly Multivitamin
*/
if (row.code != 'E-85760' && row.code != 'E-Y7735'){
if (!row.enddate) {
EHR.Server.Utils.addError(scriptErrors, 'enddate', 'Must enter enddate', 'WARN');
}
}
});

EHR.Server.TriggerManager.registerHandlerForQuery(EHR.Server.TriggerManager.Events.AFTER_UPSERT, 'study', 'treatment_order', function(helper, errors, row, oldRow){
Expand Down
17 changes: 16 additions & 1 deletion onprc_ehr/resources/web/onprc_ehr/data/sources/ONPRCDefaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@ EHR.model.DataModelManager.registerMetadata('Default', {
}
},

//Added by Kolli, 8/14/2024. Make the enddate not required globally,
// but added the validation code to force the enddate for all meds except Medroxyprojesterone and Dite - Multivitamins
// Refer tkt #
'study.treatment_order': {
enddate: {
xtype: 'xdatetime',
allowBlank: true,
extFormat: LABKEY.extDefaultDateTimeFormat,
editorConfig: {
defaultHour: 23,
defaultMinutes: 59
}
}
},

'study.blood' : {
tube_vol: {
hidden: true
Expand All @@ -42,7 +57,7 @@ EHR.model.DataModelManager.registerMetadata('Default', {

},

// Added: 10-6-2022 R.Blasa
//Added: 10-6-2022 R.Blasa
'ehr.tasks': {
assignedto: {
useNull: true,
Expand Down

0 comments on commit 88cb807

Please sign in to comment.