diff --git a/ehr/resources/schemas/dbscripts/postgresql/ehr-25.000-25.001.sql b/ehr/resources/schemas/dbscripts/postgresql/ehr-25.000-25.001.sql new file mode 100644 index 000000000..7b2ed3190 --- /dev/null +++ b/ehr/resources/schemas/dbscripts/postgresql/ehr-25.000-25.001.sql @@ -0,0 +1 @@ +ALTER TABLE ehr.tasks ADD caseid ENTITYID null; \ No newline at end of file diff --git a/ehr/resources/schemas/dbscripts/sqlserver/ehr-25.000-25.001.sql b/ehr/resources/schemas/dbscripts/sqlserver/ehr-25.000-25.001.sql new file mode 100644 index 000000000..7b2ed3190 --- /dev/null +++ b/ehr/resources/schemas/dbscripts/sqlserver/ehr-25.000-25.001.sql @@ -0,0 +1 @@ +ALTER TABLE ehr.tasks ADD caseid ENTITYID null; \ No newline at end of file diff --git a/ehr/resources/schemas/ehr.xml b/ehr/resources/schemas/ehr.xml index 1f5971573..6f0d07262 100644 --- a/ehr/resources/schemas/ehr.xml +++ b/ehr/resources/schemas/ehr.xml @@ -212,6 +212,9 @@ true + + true + diff --git a/ehr/resources/web/ehr/DataEntryUtils.js b/ehr/resources/web/ehr/DataEntryUtils.js index 7c323b203..99ff5eea7 100644 --- a/ehr/resources/web/ehr/DataEntryUtils.js +++ b/ehr/resources/web/ehr/DataEntryUtils.js @@ -885,7 +885,7 @@ EHR.DataEntryUtils = new function(){ var vol; if (!fixedAmount){ if (valMap.concentration && valMap.dosage && valMap.weight){ - if (valMap.dosage_units === 'ml/kg') { + if (valMap.dosage_units?.toLowerCase() === 'ml/kg') { // Some drugs are in ml/kg instead of mg/kg. In those cases, concentration is irrelevant. vol = valMap.dosage * valMap.weight; diff --git a/ehr/resources/web/ehr/panel/SnapshotPanel.js b/ehr/resources/web/ehr/panel/SnapshotPanel.js index 10719b30e..9f435158f 100644 --- a/ehr/resources/web/ehr/panel/SnapshotPanel.js +++ b/ehr/resources/web/ehr/panel/SnapshotPanel.js @@ -39,24 +39,6 @@ Ext4.define('EHR.panel.SnapshotPanel', { this.setLoading(true); this.loadData(); } - - this.on('afterrender', function() { - - var displayField = this.down('#flags'); - if (displayField && displayField.getEl()) { - - var anchor = displayField.getEl('flagsLink'); - - if (anchor) { - Ext4.get(anchor).on('click', function(e) { - e.preventDefault(); - if (anmId) { - EHR.Utils.showFlagPopup(anmId, this); - } - }); - } - } - }, this); }, getBaseItems: function(){ @@ -145,7 +127,23 @@ Ext4.define('EHR.panel.SnapshotPanel', { xtype: 'displayfield', fieldLabel: 'Flags', name: 'flags', - itemId: 'flags' + itemId: 'flags', + listeners: { + change: function(field, newValue, oldValue){ + let anchor = field.getEl('flagsLink'); + if (this?.up('panel')?.up('panel')) { + let anmId = this.up('panel').up('panel').subjectId; + if (anchor) { + Ext4.get(anchor).on('click', function(e) { + e.preventDefault(); + if (anmId) { + EHR.Utils.showFlagPopup(anmId, this); + } + }); + } + } + } + } },{ xtype: 'displayfield', fieldLabel: 'Last TB Date', @@ -723,7 +721,7 @@ Ext4.define('EHR.panel.SnapshotPanel', { } } - toSet['flags'] = values.length ? '' + values.join('
') + '' : null; + toSet['flags'] = values.length ? '
' + values.join('
') + '' : null; }, getFlagDisplayValue: function(row) { diff --git a/ehr/src/org/labkey/ehr/EHRModule.java b/ehr/src/org/labkey/ehr/EHRModule.java index 9bbb864f2..9c6b00561 100644 --- a/ehr/src/org/labkey/ehr/EHRModule.java +++ b/ehr/src/org/labkey/ehr/EHRModule.java @@ -133,7 +133,7 @@ public String getName() @Override public @Nullable Double getSchemaVersion() { - return 25.000; + return 25.001; } @Override