diff --git a/onprc_billing/resources/views/invoiceEstimate.html b/onprc_billing/resources/views/invoiceEstimate.html index 8c61b2787..d816dd684 100644 --- a/onprc_billing/resources/views/invoiceEstimate.html +++ b/onprc_billing/resources/views/invoiceEstimate.html @@ -142,8 +142,8 @@ ], parameters: { numDays: interval, - startDate: startDate.format('Y-m-d'), - endDate: endDate.format('Y-m-d') + startDate: Ext4.Date.format(startDate, 'Y-m-d'), + endDate: Ext4.Date.format(endDate, 'Y-m-d') }, aggregates: [ {column: 'totalCost', type: LABKEY.AggregateTypes.SUM, label: 'Total'} @@ -163,8 +163,8 @@ LABKEY.Filter.create('project', project, LABKEY.Filter.Types.EQUAL) ], parameters: { - startDate: startDate.format('Y-m-d'), - endDate: endDate.format('Y-m-d') + startDate: Ext4.Date.format(startDate, 'Y-m-d'), + endDate: Ext4.Date.format(endDate, 'Y-m-d') }, aggregates: [ {column: 'totalCost', type: LABKEY.AggregateTypes.SUM, label: 'Total'} @@ -184,8 +184,8 @@ LABKEY.Filter.create('project', project, LABKEY.Filter.Types.EQUAL) ], parameters: { - startDate: startDate.format('Y-m-d'), - endDate: endDate.format('Y-m-d') + startDate: Ext4.Date.format(startDate, 'Y-m-d'), + endDate: Ext4.Date.format(endDate, 'Y-m-d') }, aggregates: [ {column: 'totalCost', type: LABKEY.AggregateTypes.SUM, label: 'Total'} @@ -205,8 +205,8 @@ LABKEY.Filter.create('project', project, LABKEY.Filter.Types.EQUAL) ], parameters: { - startDate: startDate.format('Y-m-d'), - endDate: endDate.format('Y-m-d') + startDate: Ext4.Date.format(startDate, 'Y-m-d'), + endDate: Ext4.Date.format(endDate, 'Y-m-d') }, aggregates: [ {column: 'totalCost', type: LABKEY.AggregateTypes.SUM, label: 'Total'} @@ -227,8 +227,8 @@ ], parameters: { numDays: interval, - startDate: startDate.format('Y-m-d'), - endDate: endDate.format('Y-m-d') + startDate: Ext4.Date.format(startDate, 'Y-m-d'), + endDate: Ext4.Date.format(endDate, 'Y-m-d') }, aggregates: [ {column: 'totalCost', type: LABKEY.AggregateTypes.SUM, label: 'Total'} @@ -248,8 +248,8 @@ LABKEY.Filter.create('project', project, LABKEY.Filter.Types.EQUAL) ], parameters: { - startDate: startDate.format('Y-m-d'), - endDate: endDate.format('Y-m-d') + startDate: Ext4.Date.format(startDate, 'Y-m-d'), + endDate: Ext4.Date.format(endDate, 'Y-m-d') }, aggregates: [ {column: 'totalCost', type: LABKEY.AggregateTypes.SUM, label: 'Total'} diff --git a/onprc_billing/resources/views/invoiceRunDetails.html b/onprc_billing/resources/views/invoiceRunDetails.html index 5c3346bdb..a7b9e5919 100644 --- a/onprc_billing/resources/views/invoiceRunDetails.html +++ b/onprc_billing/resources/views/invoiceRunDetails.html @@ -63,8 +63,8 @@ var startDate = rec.get('billingPeriodStart') ? rec.get('billingPeriodStart').clearTime() : null; var endDate = rec.get('billingPeriodEnd') ? rec.get('billingPeriodEnd').clearTime() : null; - var startDateString = startDate ? startDate.format('Y-m-d') : ''; - var endDateString = endDate ? endDate.format('Y-m-d') : ''; + var startDateString = startDate ? Ext4.Date.format(startDate, 'Y-m-d') : ''; + var endDateString = endDate ? Ext4.Date.format(endDate, 'Y-m-d') : ''; var interval = 0; if (startDate && endDate){ diff --git a/onprc_billing/resources/web/onprc_billing/window/ChangeBillDateWindow.js b/onprc_billing/resources/web/onprc_billing/window/ChangeBillDateWindow.js index 7f2a23762..89b46cb27 100644 --- a/onprc_billing/resources/web/onprc_billing/window/ChangeBillDateWindow.js +++ b/onprc_billing/resources/web/onprc_billing/window/ChangeBillDateWindow.js @@ -135,7 +135,7 @@ Ext4.define('ONPRC_Billing.window.ChangeBillDateWindow', { } if (this.lastInvoiceDate && date.getTime() < this.lastInvoiceDate.getTime()){ - Ext4.Msg.alert('Error', 'Must supply a date that is after the last invoice date of: ' + this.lastInvoiceDate.format('Y-m-d')); + Ext4.Msg.alert('Error', 'Must supply a date that is after the last invoice date of: ' + Ext4.Date.format(this.lastInvoiceDate, 'Y-m-d')); return; } diff --git a/onprc_ehr/resources/views/historyExport.html b/onprc_ehr/resources/views/historyExport.html index 2489d8fdb..29e3354d2 100644 --- a/onprc_ehr/resources/views/historyExport.html +++ b/onprc_ehr/resources/views/historyExport.html @@ -85,8 +85,8 @@ 'rs:ClearSession': true, Redacted: redacted ? 'true' : 'false', AnimalId: val, - minDate: mindate1.format('Y-m-d'), //Added: 11-18-2016 R.Blasa - maxDate: maxdate1.format('Y-m-d') + minDate: Ext4.Date.format(mindate1, 'Y-m-d'), //Added: 11-18-2016 R.Blasa + maxDate: Ext4.Date.format(maxdate1, 'Y-m-d') }); //url += '&rs:Format=PDF' diff --git a/onprc_ehr/resources/views/printableReports.html b/onprc_ehr/resources/views/printableReports.html index b881c919f..00eb3e928 100644 --- a/onprc_ehr/resources/views/printableReports.html +++ b/onprc_ehr/resources/views/printableReports.html @@ -293,7 +293,7 @@ return; } - params['TreatmentDate'] = date.format(LABKEY.extDefaultDateFormat); + params['TreatmentDate'] = Ext4.Date.format(date, ABKEY.extDefaultDateFormat); params['NumDays'] = 1; params['Category'] = 'Clinical'; @@ -384,7 +384,7 @@ return; } - params['TreatmentDate'] = date.format(LABKEY.extDefaultDateFormat); + params['TreatmentDate'] = Ext4.Date.format(date, LABKEY.extDefaultDateFormat); params['NumDays'] = 1; params['Category'] = 'Diet'; @@ -542,7 +542,7 @@ return; } - params['TreatmentDate'] = date.format(LABKEY.extDefaultDateFormat); + params['TreatmentDate'] = Ext4.Date.format(date, LABKEY.extDefaultDateFormat); params['NumDays'] = 1; params['Category'] = 'Surgical'; diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/AddScheduledTreatmentPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/AddScheduledTreatmentPanel.js index 25ef595c9..2df5758fc 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/AddScheduledTreatmentPanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/AddScheduledTreatmentPanel.js @@ -100,7 +100,7 @@ Ext4.define('onprc_ehr.panel.AddScheduledTreatmentPanel', { var filterArray = []; - filterArray.push(LABKEY.Filter.create('date', date.format(LABKEY.extDefaultDateFormat), LABKEY.Filter.Types.DATE_EQUAL)); + filterArray.push(LABKEY.Filter.create('date', Ext4.Date.format(date, LABKEY.extDefaultDateFormat), LABKEY.Filter.Types.DATE_EQUAL)); filterArray.push(LABKEY.Filter.create('taskid', null, LABKEY.Filter.Types.ISBLANK)); filterArray.push(LABKEY.Filter.create('treatmentStatus', null, LABKEY.Filter.Types.ISBLANK)); @@ -135,7 +135,7 @@ Ext4.define('onprc_ehr.panel.AddScheduledTreatmentPanel', { queryName: 'treatmentSchedule', parameters: { NumDays: 1, - StartDate: date.format(LABKEY.extDefaultDateFormat) + StartDate: Ext4.Date.format(date, LABKEY.extDefaultDateFormat) }, sort: 'date,Id/curlocation/room_sortValue,Id/curlocation/cage_sortValue,Id', columns: 'primaryKey,lsid,treatmentid,Id,date,project,meaning,code,qualifier,route,concentration,conc_units,amount,amount_units,dosage,dosage_units,volume,vol_units,remark,category,chargetype', diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsCasePanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsCasePanel.js index 1d331d0f1..4d17e285c 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsCasePanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsCasePanel.js @@ -235,7 +235,7 @@ Ext4.define('onprc_ehr.panel.AnimalDetailsCasePanel', { interval = interval + ' days ago'; } - text = row.weight + ' kg, ' + date.format('Y-m-d') + (!Ext4.isEmpty(interval) ? ' (' + interval + ')' : ''); + text = row.weight + ' kg, ' + Ext4.Date.format(date, 'Y-m-d') + (!Ext4.isEmpty(interval) ? ' (' + interval + ')' : ''); } toSet['weights'] = text; @@ -279,12 +279,12 @@ Ext4.define('onprc_ehr.panel.AnimalDetailsCasePanel', { if (date && (!enddate || enddate.getTime() > (new Date()).getTime())){ var reviewdate = row.reviewdate ? LDK.ConvertUtils.parseDate(row.reviewdate) : null; if (!reviewdate || Ext4.Date.clearTime(reviewdate).getTime() <= Ext4.Date.clearTime(new Date()).getTime()){ - text = text + ' (' + date.format('Y-m-d') + ')'; + text = text + ' (' + Ext4.Date.format(date, 'Y-m-d') + ')'; values.push(text); } else if (reviewdate && Ext4.Date.clearTime(reviewdate).getTime() > Ext4.Date.clearTime(new Date()).getTime()){ - text = text + ' - None (Reopens: ' + reviewdate.format('Y-m-d') + ')'; + text = text + ' - None (Reopens: ' + Ext4.Date.format(reviewdate, 'Y-m-d') + ')'; values.push(text); } } diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/BloodSummaryPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/BloodSummaryPanel.js index c9e1b0d9c..7b841e406 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/BloodSummaryPanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/BloodSummaryPanel.js @@ -171,7 +171,7 @@ Ext4.define('ONPRC.panel.BloodSummaryPanel', { Ext4.each(results.rows, function(row, idx){ //capture the current day's amount var rowDate = new Date(row.date.value); - if (rowDate && rowDate.format(LABKEY.extDefaultDateFormat) == (new Date()).format(LABKEY.extDefaultDateFormat)){ + if (rowDate && Ext4.Date.format(rowDate, LABKEY.extDefaultDateFormat) == Ext4.Date.format(new Date(), LABKEY.extDefaultDateFormat)){ currentRow = row; } @@ -198,7 +198,7 @@ Ext4.define('ONPRC.panel.BloodSummaryPanel', { newRow.isHidden = {value: true}; var date = LDK.ConvertUtils.parseDate(row.date.value); date = Ext4.Date.add(date, Ext4.Date.DAY, 1); - newRow.date.value = date.format('Y/m/d H:i:s'); + newRow.date.value = Ext4.Date.format(date, 'Y/m/d H:i:s'); newRows.push(newRow); } }, this); @@ -233,11 +233,11 @@ Ext4.define('ONPRC.panel.BloodSummaryPanel', { hoverText: function(row){ var lines = []; - lines.push('Date: ' + row.date.format(LABKEY.extDefaultDateFormat)); + lines.push('Date: ' + Ext4.Date.format(row.date, LABKEY.extDefaultDateFormat)); lines.push('Drawn on this Date: ' + row.quantity); lines.push('Volume Available on this Date: ' + LABKEY.Utils.roundNumber(row.allowableDisplay, 1) + ' mL'); - lines.push('Current Weight: ' + row.mostRecentWeight + ' kg (' + row.mostRecentWeightDate.format(LABKEY.extDefaultDateFormat) + ')'); + lines.push('Current Weight: ' + row.mostRecentWeight + ' kg (' + Ext4.Date.format(row.mostRecentWeightDate, LABKEY.extDefaultDateFormat) + ')'); lines.push('Drawn in Previous ' + row.blood_draw_interval + ' days: ' + LABKEY.Utils.roundNumber(row.bloodPrevious, 1)); lines.push('Drawn in Next ' + row.blood_draw_interval + ' days: ' + LABKEY.Utils.roundNumber(row.bloodFuture, 1)); diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/NarrowSnapshotPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/NarrowSnapshotPanel.js index 9a41f9b65..759dedb3c 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/NarrowSnapshotPanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/NarrowSnapshotPanel.js @@ -25,7 +25,11 @@ Ext4.define('onprc_ehr.panel.NarrowSnapshotPanel', { var firstCol = items[0].items[1].items[0]; var secondCol = items[0].items[1].items[1]; var thirdCol = items[0].items[1].items[2]; - items[0].items[1].items.remove(secondCol); + + var index = items[0].items[1].items.indexOf(secondCol); + if (index !== -1) { + items[0].items[1].items = items[0].items[1].items.splice(index, 1); + } firstCol.columnWidth = 0.45; thirdCol.columnWidth = 0.55; diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/SnapshotPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/SnapshotPanel.js index 20f290f1a..fbf17cbff 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/SnapshotPanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/SnapshotPanel.js @@ -279,12 +279,12 @@ Ext4.define('onprc_ehr.panel.SnapshotPanel', { if (date && (!enddate || enddate.getTime() > (new Date()).getTime())){ var reviewdate = row.reviewdate ? LDK.ConvertUtils.parseDate(row.reviewdate) : null; if (!reviewdate || Ext4.Date.clearTime(reviewdate).getTime() <= Ext4.Date.clearTime(new Date()).getTime()){ - text = text + ' (' + date.format('Y-m-d') + ')'; + text = text + ' (' + Ext4.Date.format(date, 'Y-m-d') + ')'; values.push(text); } else if (reviewdate && Ext4.Date.clearTime(reviewdate).getTime() > Ext4.Date.clearTime(new Date()).getTime()){ - text = text + ' - None (Reopens: ' + reviewdate.format('Y-m-d') + ')'; + text = text + ' - None (Reopens: ' + Ext4.Date.format(reviewdate, 'Y-m-d') + ')'; values.push(text); } } @@ -313,7 +313,7 @@ Ext4.define('onprc_ehr.panel.SnapshotPanel', { if (results) { var sDate = LDK.ConvertUtils.parseDate(results[0].ExpectedDelivery); - toSet['pregnancyInfo'] = sDate.format('Y-m-d'); + toSet['pregnancyInfo'] = Ext4.Date.format(sDate, 'Y-m-d'); } else { @@ -378,7 +378,7 @@ Ext4.define('onprc_ehr.panel.SnapshotPanel', { }, this); //Modified: 8-29-2016 R.Blasa Include time within the date field Ext4.each(rows, function(r){ - text.push('