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
2 changes: 1 addition & 1 deletion nirc_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++;
}
}
}
2 changes: 1 addition & 1 deletion nirc_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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<customView xmlns="http://labkey.org/data/xml/queryCustomView">
<customView xmlns="http://labkey.org/data/xml/queryCustomView" canOverride="true">
<columns>
<column name="viewNecropsy"/>
<column name="enterNecropsyData"/>
Expand Down
1 change: 0 additions & 1 deletion nirc_ehr/resources/queries/study/arrival.query.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
</fk>
</column>
<column columnName="attachmentFile">
<isHidden>true</isHidden>
</column>
<column columnName="cage">
<displayWidth>80</displayWidth>
Expand Down
14 changes: 9 additions & 5 deletions nirc_ehr/resources/web/nirc_ehr/field/EditCase.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@ Ext4.define('NIRC_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('NIRC_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
10 changes: 9 additions & 1 deletion nirc_ehr/resources/web/nirc_ehr/model/sources/Arrival.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ EHR.model.DataModelManager.registerMetadata('Arrival', {
allowBlank: false
},
'Id/demographics/birth': {
allowBlank: false
allowBlank: false,
columnConfig: {
width: 150
}
},
'Id/demographics/gender': {
allowBlank: false
Expand Down Expand Up @@ -107,6 +110,11 @@ EHR.model.DataModelManager.registerMetadata('Arrival', {
allowBlank: true,
hidden: true,
showInGrid: false
},
attachmentFile: {
columnConfig: {
width: 150
}
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/web/nirc_ehr/model/sources/Rearrival.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ EHR.model.DataModelManager.registerMetadata('Rearrival', {
columns: 'protocol,title'
},
},
attachmentFile: {
columnConfig: {
width: 150
}
},
}
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ protected List<FieldKey> getFieldKeys(TableInfo ti)
keys.add(10, FieldKey.fromString("Id/demographics/gender"));
keys.add(12, FieldKey.fromString("Id/demographics/geographic_origin"));

FieldKey attachmentFile = FieldKey.fromString("attachmentFile");
if (keys.remove(attachmentFile))
keys.add(attachmentFile);

return keys;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
package org.labkey.nirc_ehr.dataentry.section;

import org.json.JSONObject;
import org.labkey.api.data.TableInfo;
import org.labkey.api.ehr.dataentry.DataEntryFormContext;
import org.labkey.api.query.FieldKey;

import java.util.List;

public class NIRCRearrivalFormSection extends BaseFormSection
{
Expand All @@ -32,4 +36,16 @@ public JSONObject toJSON(DataEntryFormContext ctx, boolean includeFormElements)
json.put("dataDependentCollapseHeader", true);
return json;
}

@Override
protected List<FieldKey> getFieldKeys(TableInfo ti)
{
List<FieldKey> keys = super.getFieldKeys(ti);

FieldKey attachmentFile = FieldKey.fromString("attachmentFile");
if (keys.remove(attachmentFile))
keys.add(attachmentFile);

return keys;
}
}
Loading