Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions nbri_ehr/resources/domain-templates/ehr_lookups.template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
<dat:column columnName="indoor_outdoor">
<dat:rangeURI>string</dat:rangeURI>
</dat:column>
<dat:column columnName="perDiem">
<dat:rangeURI>string</dat:rangeURI>
<dat:scale>10</dat:scale>
</dat:column>
<dat:column columnName="dateDisabled">
<dat:rangeURI>dateTime</dat:rangeURI>
</dat:column>
Expand Down
2 changes: 1 addition & 1 deletion nbri_ehr/resources/queries/ehr/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function onInit(event, helper){
function onUpsert(helper, scriptErrors, row, oldRow) {
if (!helper.isETL()) {
if (!row.project) {
row.project = nextProjectNum;
row.project = nextProjectNum++;
}
}
}
3 changes: 3 additions & 0 deletions nbri_ehr/resources/queries/ehr/project.query.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
</column>
<column columnName="project">
<columnTitle>Project Id</columnTitle>
<!-- project.js assigns the id; a blank required field would block the Ext form's submit -->
<shownInInsertView>false</shownInInsertView>
<shownInUpdateView>false</shownInUpdateView>
</column>
<column columnName="account" />
<column columnName="title" />
Expand Down
3 changes: 3 additions & 0 deletions nbri_ehr/resources/queries/ehr_lookups/cage.query.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
<fkColumnName>value</fkColumnName>
</fk>
</column>
<column columnName="perDiem">
<columnTitle>Per Diem</columnTitle>
</column>
</columns>
</table>
</tables>
Expand Down
1 change: 1 addition & 0 deletions nbri_ehr/resources/queries/ehr_lookups/cage/.qview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<column name="cage"/>
<column name="room"/>
<column name="indoor_outdoor"/>
<column name="perDiem"/>
<column name="cage_type"/>
<column name="divider"/>
<column name="length"/>
Expand Down
2 changes: 1 addition & 1 deletion nbri_ehr/resources/queries/ehr_lookups/roomUtilization.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ SELECT
r.area,
FROM ehr_lookups.rooms r
LEFT JOIN study.housing h
ON r.room = h.room
ON r.room = h.room AND h.isActive = true AND h.qcstate.publicdata = true

GROUP BY r.room, r.building, r.area
14 changes: 9 additions & 5 deletions nbri_ehr/resources/web/nbri_ehr/field/EditCase.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@ Ext4.define('NBRI_EHR.form.EditCases', {
fieldEnableChange: function(disable){
var panel = this.up('panel');
panel.items.each(function(item){
if (item.name != 'objectid'){
this.disableItem(item, disable);
this.disabledDisplay(item, disable);
}
if (item.name === 'objectid')
return;

// A saved case stays bound to its animal, so Edit must never reopen the Id.
var itemDisable = disable || (this.editing && item.name === 'Id');

this.disableItem(item, itemDisable);
this.disabledDisplay(item, itemDisable);
}, this);
},

Expand All @@ -93,11 +97,11 @@ Ext4.define('NBRI_EHR.form.EditCases', {
},

onCaseSelect: function(){
this.editing = true;
this.fieldEnableChange(true);
if (this.readonly) {
return;
}
this.editing = true;
this.disabled = true;
this.editBtn.show();
},
Expand Down
Loading