Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release23.3-SNAPSHOT' into relea…
Browse files Browse the repository at this point in the history
…se23.3-SNAPSHOT
  • Loading branch information
jonesgaohsu committed Dec 19, 2023
2 parents 7ea188f + 7e2e6e9 commit dbb3005
Show file tree
Hide file tree
Showing 5 changed files with 152 additions and 17 deletions.
32 changes: 18 additions & 14 deletions onprc_ehr/resources/scripts/onprc_ehr/onprc_triggers.js
Original file line number Diff line number Diff line change
Expand Up @@ -1044,20 +1044,24 @@ exports.init = function(EHR){
}
}

/* Added by Kollil, 11/17/2023. Tkt #10159
Added extra validation: 1. If volume is not null, must enter vol units
2. If amount is not null, must enter amount units
*/
if (!row.vol_units) {
if (row.volume) {
EHR.Server.Utils.addError(scriptErrors, 'vol_units', 'Must enter Vol Units if Volume is entered', 'WARN');
}
}
if (!row.amount_units ) {
if (row.amount) {
EHR.Server.Utils.addError(scriptErrors, 'amount_units', 'Must enter Amount Units if Amount is entered', 'WARN');
}
}

// Removing this validation check from the "Meds Given" data entry panel as some forms like BSU exam entry doesn't need amount_units
// Please refer to the tkt # 10285

// /* Added by Kollil, 11/17/2023. Tkt #10159
// Added extra validation: 1. If volume is not null, must enter vol units
// 2. If amount is not null, must enter amount units
// */
// if (!row.vol_units) {
// if (row.volume) {
// EHR.Server.Utils.addError(scriptErrors, 'vol_units', 'Must enter Vol Units if Volume is entered', 'WARN');
// }
// }
// if (!row.amount_units ) {
// if (row.amount) {
// EHR.Server.Utils.addError(scriptErrors, 'amount_units', 'Must enter Amount Units if Amount is entered', 'WARN');
// }
// }

if (row.frequency){
if (!triggerHelper.isTreatmentFrequencyActive(row.frequency)){
Expand Down
125 changes: 125 additions & 0 deletions onprc_ehr/resources/web/onprc_ehr/model/sources/BehaviorDefaults.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
/*
* Copyright (c) 2014-2019 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*
* Added by Kollil on 12/18/23. Please refer to tke # 10285 for details
*/
EHR.model.DataModelManager.registerMetadata('BehaviorDefaults', {
allQueries: {

},
byQuery: {
'study.clinremarks': {
category: {
defaultValue: 'Behavior',
hidden: true
},
hx: {
hidden: true
},
s: {
hidden: false
},
o: {
hidden: false
},
a: {
hidden: false
},
p: {
hidden: false
},
p2: {
hidden: true
},
remark: {
columnConfg: {
width: 350
}
}
},
'study.drug': {
category: {
defaultValue: 'Behavior'
},
code: {
editorConfig: {
xtype: 'ehr-snomedcombo',
defaultSubset: 'Behavior'
}
},
concentration: {
hidden: true
},
conc_units: {
hidden: true
},
dosage: {
hidden: true
},
dosage_units: {
hidden: true
},
volume: {
hidden: true
},
vol_units: {
hidden: true
},
amount: {
//hidden: true,
defaultValue: 1
},
amount_units: { //Changed by Kolli: 12/18/2023.
hidden: true,
defaultValue:'units'
},
lot: {
hidden: true
},
outcome: {
hidden: true
},
route: {
hidden: true,
allowBlank: true
},
reason: {
hidden: true
},
qualifier: {
hidden: true
},
enddate: {
hidden: true
},
project: {
getInitialValue: function(v, rec){
//return a default value only if this field is visible
var shouldReturn = false;
if (rec){
var meta = rec.fields.get('project');
if (meta){
shouldReturn = meta.hidden == false
}
}
return v ? v : shouldReturn ? EHR.DataEntryUtils.getDefaultClinicalProject() : null;
}
},
chargetype: {
defaultValue: 'No Charge'
}
},
'study.clinical_observations': {
area: {
hidden: true
},
category: {
lookup: {
filterArray: [LABKEY.Filter.create('category', 'Behavior')]
}
}
}
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public BehaviorExamFormType(DataEntryFormContext ctx, Module owner)
}
}

addClientDependency(ClientDependency.supplierFromPath("ehr/model/sources/BehaviorDefaults.js"));
// addClientDependency(ClientDependency.supplierFromPath("ehr/model/sources/BehaviorDefaults.js"));
addClientDependency(ClientDependency.supplierFromPath("onprc_ehr/model/sources/BehaviorDefaults.js"));
setStoreCollectionClass("EHR.data.ClinicalReportStoreCollection");
addClientDependency(ClientDependency.supplierFromPath("ehr/data/ClinicalReportStoreCollection.js"));
addClientDependency(ClientDependency.supplierFromPath("ehr/model/sources/ClinicalDefaults.js"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ public String getMessageBodyHTML(Container c, User u)
groupProblemSummary(c, u, msg, 30, 10);
roomProblemSummary(c, u, msg, 7, 5);
roomProblemSummary(c, u, msg, 30, 10);
duplicateCases(c, u, msg);

//Edited by Kollil: 12/18/23
//Removing this warning per request. Please check tkt # 10276 for details.
//duplicateCases(c, u, msg);

return msg.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ public String getMessageBodyHTML(Container c, User u)
{
StringBuilder msg = new StringBuilder();

duplicateCases(c, u, msg);
//Edited by Kollil: 12/18/23
//Removing this warning per request. Please check tkt # 10276 for details.
//duplicateCases(c, u, msg);
animalsWithoutRounds(c, u, msg);
//animalsWithoutVetReview(c, u, msg);

Expand Down

0 comments on commit dbb3005

Please sign in to comment.