Fixing console errors related to cornerstone

This commit is contained in:
Bruno Alves de Faria committed 2018-03-26 08:36:48 -03:00
1 parent 04da9310d1
commit af611109c0
5 files changed
+36 -7

No files matched your search

@@ -66,14 +66,14 @@ Template[defaultTemplate].helpers({
const date = moment(patientBirthDate, 'YYYYMMDD');
const yearDiff = moment().diff(date, 'years');
if (yearDiff) {
values.push(yearDiff + 'Y').padStart(4, '0');
values.push((yearDiff + 'Y').padStart(4, '0'));
} else {
const monthDiff = moment().diff(date, 'months');
if (monthDiff) {
values.push(monthDiff + 'M').padStart(4, '0');
values.push((monthDiff + 'M').padStart(4, '0'));
} else {
const dayDiff = moment().diff(date, 'days') || 0;
values.push(dayDiff + 'D').padStart(4, '0');
values.push((dayDiff + 'D').padStart(4, '0'));
}
}
}