From 8ed67eec72fd090f1d8f1c38c3b9e4c54ae45feb Mon Sep 17 00:00:00 2001 From: Bogdan Alexandru Marginean Date: Wed, 25 Jan 2017 18:27:16 +0200 Subject: [PATCH 01/18] Added a calendar that displays appointments (WIP) (#823) * Add stubs for the calendar view * Added FullCalendar * Show this week's appointments in calendar To confirm basic appointment -> event conversion works. * Can now navigate to appointments from calendar * Stubs for filtering in-calendar appointments * Calendar uses query params as prototype * Make linter happy * Calendar now separate component * Added filtering support * Make linter happy yet again * Hardcoded zeroes should not have been there * Extra date checks in route not necessary * Using visual config instead of just dates --- app/appointments/calendar/controller.js | 75 +++++++++++++++++ app/appointments/calendar/route.js | 81 +++++++++++++++++++ app/appointments/calendar/template.hbs | 40 +++++++++ app/components/calendar-control.js | 41 ++++++++++ app/locales/en/translations.js | 3 + app/mixins/navigation.js | 6 ++ app/router.js | 1 + app/templates/components/calendar-control.hbs | 5 ++ bower.json | 4 +- package.json | 2 + .../components/calendar-control-test.js | 24 ++++++ 11 files changed, 281 insertions(+), 1 deletion(-) create mode 100644 app/appointments/calendar/controller.js create mode 100644 app/appointments/calendar/route.js create mode 100644 app/appointments/calendar/template.hbs create mode 100644 app/components/calendar-control.js create mode 100644 app/templates/components/calendar-control.hbs create mode 100644 tests/integration/components/calendar-control-test.js diff --git a/app/appointments/calendar/controller.js b/app/appointments/calendar/controller.js new file mode 100644 index 0000000000..110717e34a --- /dev/null +++ b/app/appointments/calendar/controller.js @@ -0,0 +1,75 @@ +import AppointmentIndexController from 'hospitalrun/appointments/index/controller'; +import AppointmentStatuses from 'hospitalrun/mixins/appointment-statuses'; +import VisitTypes from 'hospitalrun/mixins/visit-types'; +import SelectValues from 'hospitalrun/utils/select-values'; +import Ember from 'ember'; + +export default AppointmentIndexController.extend(AppointmentStatuses, VisitTypes, { + appointmentsController: Ember.inject.controller('appointments'), + startKey: [], + + queryParams: ['appointmentType', 'provider', 'status', 'location'], + appointmentType: null, + provider: null, + status: null, + location: null, + + physicians: Ember.computed.alias('appointmentsController.physicianList.value'), + physicianList: function() { + return SelectValues.selectValues(this.get('physicians'), true); + }.property('physicians'), + + locations: Ember.computed.alias('appointmentsController.locationList.value'), + locationList: function() { + return SelectValues.selectValues(this.get('locations'), true); + }.property('locations'), + + getSelectedFilteringCriteria() { + let rawCriteria = { + status: this.get('model.selectedStatus'), + type: this.get('model.selectedAppointmentType'), + provider: this.get('model.selectedProvider'), + location: this.get('model.selectedLocation') + }; + + return { + status: Ember.isEmpty(rawCriteria.status) ? null : rawCriteria.status, + type: Ember.isEmpty(rawCriteria.type) ? null : rawCriteria.type, + provider: Ember.isEmpty(rawCriteria.provider) ? null : rawCriteria.provider, + location: Ember.isEmpty(rawCriteria.location) ? null : rawCriteria.location + }; + }, + + actions: { + navigateToAppointment(calendarEvent) { + this.send('editAppointment', calendarEvent.referencedAppointment); + }, + + handleVisualConfigurationChanged(newConfiguration) { + let { dateIntervalStart, dateIntervalEnd } = newConfiguration; + this.send('updateDateInterval', dateIntervalStart, dateIntervalEnd); + }, + + filter() { + let criteria = this.getSelectedFilteringCriteria(); + this.setProperties({ + startKey: [], + previousStartKey: null, + previousStartKeys: [], + + appointmentType: criteria.type, + provider: criteria.provider, + status: criteria.status, + location: criteria.location + }); + }, + + clearFilteringCriteria() { + this.set('model.selectedStatus', null); + this.set('model.selectedAppointmentType', null); + this.set('model.selectedProvider', null); + this.set('model.selectedLocation', null); + this.send('filter'); + } + } +}); diff --git a/app/appointments/calendar/route.js b/app/appointments/calendar/route.js new file mode 100644 index 0000000000..ad8e2f514d --- /dev/null +++ b/app/appointments/calendar/route.js @@ -0,0 +1,81 @@ +import AppointmentIndexRoute from 'hospitalrun/appointments/index/route'; +import { translationMacro as t } from 'ember-i18n'; + +export default AppointmentIndexRoute.extend({ + editReturn: 'appointments.calendar', + modelName: 'appointment', + pageTitle: t('appointments.calendarTitle'), + + filterParams: ['appointmentType', 'provider', 'status', 'location'], + + queryParams: { + appointmentType: { refreshModel: true }, + provider: { refreshModel: true }, + status: { refreshModel: true }, + location: { refreshModel: true } + }, + + dateIntervalStart: null, + dateIntervalEnd: null, + + _modelQueryParams(params) { + let dateIntervalStart = this.get('dateIntervalStart'); + let dateIntervalEnd = this.get('dateIntervalEnd'); + + if (dateIntervalStart === null || dateIntervalEnd === null) { + return this._super(params); + } + + let maxValue = this.get('maxValue'); + + // To cater for times like 0:00 - investigate. + let adjustedStart = moment(dateIntervalStart).subtract(1, 'days').startOf('day').toDate().getTime(); + let adjustedEnd = moment(dateIntervalEnd).add(1, 'days').endOf('day').toDate().getTime(); + + let searchOptions = { + startkey: [adjustedStart, null, 'appointment_'], + endkey: [adjustedEnd, maxValue, `appointment_${maxValue}`] + }; + + return { + options: searchOptions, + mapReduce: 'appointments_by_date' + }; + }, + + model(params) { + function createCalendarEvent(appointment) { + return { + title: `${appointment.get('patient').get('displayName')}\n${appointment.get('provider')}`, + start: appointment.get('startDate'), + end: appointment.get('endDate'), + referencedAppointment: appointment + }; + } + + function createCalendarEvents(appointments) { + return appointments.map(createCalendarEvent); + } + + return this._super(params) + .then(createCalendarEvents) + .then(function(calendarEvents) { + return { + events: calendarEvents, + + selectedAppointmentType: params.appointmentType, + selectedProvider: params.provider, + selectedStatus: params.status, + selectedLocation: params.location + }; + }); + }, + + actions: { + updateDateInterval(start, end) { + this.set('dateIntervalStart', start); + this.set('dateIntervalEnd', end); + this.refresh(); + } + } +}); diff --git a/app/appointments/calendar/template.hbs b/app/appointments/calendar/template.hbs new file mode 100644 index 0000000000..ffffb82c1a --- /dev/null +++ b/app/appointments/calendar/template.hbs @@ -0,0 +1,40 @@ +
+
+ {{#em-form model=model submitButton=false}} +
+ {{em-select class="col-sm-3" + label=(t "labels.status") + property="selectedStatus" + content=appointmentStatusesWithEmpty + }} + {{em-select class="col-sm-3" + label=(t "labels.type") + property="selectedAppointmentType" + content=visitTypesWithEmpty + }} +
+
+ {{em-select class="col-sm-3" + label=(t 'labels.with') + property="selectedProvider" + content=physicianList + }} + {{em-select class="col-sm-3" + label=(t 'labels.location') + property="selectedLocation" + content=locationList + }} +
+ {{/em-form}} +
+ +
+ {{calendar-control events=model.events + onEventClick=(action "navigateToAppointment") + onVisualConfigurationChanged=(action "handleVisualConfigurationChanged") + }} +
+
\ No newline at end of file diff --git a/app/components/calendar-control.js b/app/components/calendar-control.js new file mode 100644 index 0000000000..a5d52c100a --- /dev/null +++ b/app/components/calendar-control.js @@ -0,0 +1,41 @@ +import Ember from 'ember'; + +export default Ember.Component.extend({ + visibleDateIntervalStart: null, + visibleDateIntervalEnd: null, + + visualConfiguration: { + dateIntervalStart: null, + dateIntervalEnd: null, + viewType: null + }, + + calendarHeader: { + left: 'title', + center: 'agendaDay,agendaWeek,month', + right: 'today prev,next' + }, + + actions: { + handleRenderingComplete(view) { + function configurationsDiffer(firstConfig, secondConfig) { + return firstConfig.dateIntervalStart !== secondConfig.dateIntervalStart + || firstConfig.dateIntervalEnd !== secondConfig.dateIntervalEnd + || firstConfig.viewType !== secondConfig.viewType; + } + + let currentConfiguration = this.get('visualConfiguration'); + + let newConfiguration = { + dateIntervalStart: moment(view.intervalStart).startOf('day').toDate().getTime(), + dateIntervalEnd: moment(view.intervalEnd).endOf('day').toDate().getTime(), + viewType: view.name + }; + + if (configurationsDiffer(currentConfiguration, newConfiguration)) { + this.set('visualConfiguration', newConfiguration); + this.get('onVisualConfigurationChanged')(newConfiguration); + } + } + } +}); diff --git a/app/locales/en/translations.js b/app/locales/en/translations.js index 1e8750266f..a5824a4db0 100644 --- a/app/locales/en/translations.js +++ b/app/locales/en/translations.js @@ -474,6 +474,8 @@ export default { newRequestPlus: '+ new request', addVisit: 'Add Visit', search: 'Search', + filter: 'Filter', + clear: 'Clear', edit: 'Edit', addLineItem: 'Add Line Item', showFewer: 'Show Fewer', @@ -764,6 +766,7 @@ export default { missed: 'Missed Appointments', searchTitle: 'Search Appointments', todayTitle: 'Today\'s Appointments', + calendarTitle: 'Calendar', messages: { deleteAppointmentMessage: 'Are you sure you wish to delete this appointment?', endTimeLaterThanStart: 'Please select an end time later than the start time.' diff --git a/app/mixins/navigation.js b/app/mixins/navigation.js index 1da69e266f..eec94b6162 100644 --- a/app/mixins/navigation.js +++ b/app/mixins/navigation.js @@ -106,6 +106,12 @@ export default Ember.Mixin.create({ route: 'appointments.search', capability: 'appointments' }, + { + title: 'Calendar', + iconClass: 'octicon-calendar', + route: 'appointments.calendar', + capability: 'appointments' + }, { title: 'Add Appointment', iconClass: 'octicon-plus', diff --git a/app/router.js b/app/router.js index b61d95cc36..05aa4be9c3 100755 --- a/app/router.js +++ b/app/router.js @@ -30,6 +30,7 @@ Router.map(function() { this.route('search'); this.route('today'); this.route('missed'); + this.route('calendar'); }); this.route('finishgauth', { path: '/finishgauth/:s1/:s2/:k/:t/:i/:p' }); diff --git a/app/templates/components/calendar-control.hbs b/app/templates/components/calendar-control.hbs new file mode 100644 index 0000000000..4050d026df --- /dev/null +++ b/app/templates/components/calendar-control.hbs @@ -0,0 +1,5 @@ +{{full-calendar events=events + header=calendarHeader + eventClick=onEventClick + eventAfterAllRender=(action "handleRenderingComplete") +}} \ No newline at end of file diff --git a/bower.json b/bower.json index 338be3d9b9..2a8fb6a41f 100644 --- a/bower.json +++ b/bower.json @@ -12,7 +12,9 @@ "pikaday": "https://github.com/owenmead/Pikaday.git#~1.3.3", "typeahead.js": "~0.11.1", "pouchdb-load": "^1.4.0", - "pretender": "~0.10.0" + "pretender": "~0.10.0", + "fullcalendar": "^3.0.0", + "fullcalendar-scheduler": "^1.4.0" }, "devDependencies": { "timekeeper": "^1.0.0" diff --git a/package.json b/package.json index 139e826b9c..752c28a367 100644 --- a/package.json +++ b/package.json @@ -62,9 +62,11 @@ "ember-cli-uglify": "^1.2.0", "ember-data": "^2.10.0", "ember-export-application-global": "^1.0.5", + "ember-fullcalendar": "1.0.0", "ember-i18n": "4.4.0", "ember-keyboard": "2.1.9", "ember-load-initializers": "^0.6.0", + "ember-moment": "7.3.0", "ember-pouch": "4.2.1", "ember-radio-buttons": "^4.0.1", "ember-rapid-forms": "GCorbel/ember-rapid-forms#26229804a2c430bbdf1ffb6bab8fb53af17bb3a4", diff --git a/tests/integration/components/calendar-control-test.js b/tests/integration/components/calendar-control-test.js new file mode 100644 index 0000000000..2d304d251f --- /dev/null +++ b/tests/integration/components/calendar-control-test.js @@ -0,0 +1,24 @@ +import { moduleForComponent, test } from 'ember-qunit'; +import hbs from 'htmlbars-inline-precompile'; + +moduleForComponent('calendar-control', 'Integration | Component | calendar control', { + integration: true +}); + +test('it renders', function(assert) { + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); + + this.render(hbs`{{calendar-control}}`); + + assert.equal(this.$().text().trim(), ''); + + // Template block usage: + this.render(hbs` + {{#calendar-control}} + template block text + {{/calendar-control}} + `); + + assert.equal(this.$().text().trim(), 'template block text'); +}); From d3948f84c993fdbae5ed959fa2f6b5c1bb87fe1d Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 25 Jan 2017 14:10:50 -0500 Subject: [PATCH 02/18] Use ember-cli-moment-shim for momentjs --- .eslintrc.js | 1 - app/appointments/calendar/route.js | 1 + app/appointments/index/route.js | 1 + app/appointments/search/route.js | 1 + app/appointments/today/route.js | 1 + app/components/calendar-control.js | 1 + app/components/date-time-picker.js | 1 + app/controllers/abstract-report-controller.js | 1 + app/helpers/date-format.js | 1 + app/imaging/edit/route.js | 1 + app/inventory/reports/controller.js | 1 + app/invoices/edit/controller.js | 1 + app/labs/edit/route.js | 1 + app/locales/en/translations.js | 3 ++- app/medication/edit/route.js | 1 + app/mixins/date-format.js | 1 + app/mixins/dob-days.js | 1 + app/models/appointment.js | 1 + app/models/visit.js | 1 + app/patients/notes/controller.js | 1 + app/patients/outpatient/route.js | 1 + app/patients/reports/controller.js | 1 + app/visits/edit/controller.js | 1 + bower.json | 1 - ember-cli-build.js | 1 - package.json | 4 ++-- tests/.eslintrc.js | 1 - tests/acceptance/appointments-test.js | 1 + tests/acceptance/inventory-test.js | 1 + tests/acceptance/operative-test.js | 1 + tests/acceptance/outpatient-test.js | 1 + tests/helpers/select-date.js | 1 + 32 files changed, 30 insertions(+), 7 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index ec04cf6980..cea8c1639f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -20,7 +20,6 @@ module.exports = { 'dymo': true, 'Filer': true, 'logDebug': true, - 'moment': true, 'Pikaday': true, 'PouchDB': true, 'Promise': true, diff --git a/app/appointments/calendar/route.js b/app/appointments/calendar/route.js index ad8e2f514d..bcbe37bb25 100644 --- a/app/appointments/calendar/route.js +++ b/app/appointments/calendar/route.js @@ -1,4 +1,5 @@ import AppointmentIndexRoute from 'hospitalrun/appointments/index/route'; +import moment from 'moment'; import { translationMacro as t } from 'ember-i18n'; export default AppointmentIndexRoute.extend({ diff --git a/app/appointments/index/route.js b/app/appointments/index/route.js index 29b5d3e612..7a06da640c 100644 --- a/app/appointments/index/route.js +++ b/app/appointments/index/route.js @@ -1,4 +1,5 @@ import AbstractIndexRoute from 'hospitalrun/routes/abstract-index-route'; +import moment from 'moment'; import { translationMacro as t } from 'ember-i18n'; export default AbstractIndexRoute.extend({ diff --git a/app/appointments/search/route.js b/app/appointments/search/route.js index 542b8ee2d7..cf3639e440 100644 --- a/app/appointments/search/route.js +++ b/app/appointments/search/route.js @@ -1,6 +1,7 @@ import AppointmentIndexRoute from 'hospitalrun/appointments/index/route'; import DateFormat from 'hospitalrun/mixins/date-format'; import Ember from 'ember'; +import moment from 'moment'; import { translationMacro as t } from 'ember-i18n'; export default AppointmentIndexRoute.extend(DateFormat, { diff --git a/app/appointments/today/route.js b/app/appointments/today/route.js index 99bf32d9a1..d49223a7a0 100644 --- a/app/appointments/today/route.js +++ b/app/appointments/today/route.js @@ -1,4 +1,5 @@ import AppointmentIndexRoute from 'hospitalrun/appointments/index/route'; +import moment from 'moment'; import { translationMacro as t } from 'ember-i18n'; export default AppointmentIndexRoute.extend({ editReturn: 'appointments.today', diff --git a/app/components/calendar-control.js b/app/components/calendar-control.js index a5d52c100a..d42a40cf5d 100644 --- a/app/components/calendar-control.js +++ b/app/components/calendar-control.js @@ -1,4 +1,5 @@ import Ember from 'ember'; +import moment from 'moment'; export default Ember.Component.extend({ visibleDateIntervalStart: null, diff --git a/app/components/date-time-picker.js b/app/components/date-time-picker.js index b6c47c0014..4271f4119f 100644 --- a/app/components/date-time-picker.js +++ b/app/components/date-time-picker.js @@ -1,4 +1,5 @@ import Ember from 'ember'; +import moment from 'moment'; const { computed, diff --git a/app/controllers/abstract-report-controller.js b/app/controllers/abstract-report-controller.js index ca2e0c2620..6b536eefb1 100644 --- a/app/controllers/abstract-report-controller.js +++ b/app/controllers/abstract-report-controller.js @@ -1,6 +1,7 @@ import Ember from 'ember'; import DateFormat from 'hospitalrun/mixins/date-format'; import ModalHelper from 'hospitalrun/mixins/modal-helper'; +import moment from 'moment'; import NumberFormat from 'hospitalrun/mixins/number-format'; import PaginationProps from 'hospitalrun/mixins/pagination-props'; import PouchDbMixin from 'hospitalrun/mixins/pouchdb'; diff --git a/app/helpers/date-format.js b/app/helpers/date-format.js index 0ea014d301..7f4ec8d0c3 100644 --- a/app/helpers/date-format.js +++ b/app/helpers/date-format.js @@ -1,4 +1,5 @@ import Ember from 'ember'; +import moment from 'moment'; export default Ember.Helper.helper(function(params, hash) { if (!Ember.isEmpty(params[0])) { let dateFormat = 'l'; diff --git a/app/imaging/edit/route.js b/app/imaging/edit/route.js index ce21fd1f7c..e84f3a243b 100644 --- a/app/imaging/edit/route.js +++ b/app/imaging/edit/route.js @@ -2,6 +2,7 @@ import { translationMacro as t } from 'ember-i18n'; import AbstractEditRoute from 'hospitalrun/routes/abstract-edit-route'; import ChargeRoute from 'hospitalrun/mixins/charge-route'; import Ember from 'ember'; +import moment from 'moment'; import PatientListRoute from 'hospitalrun/mixins/patient-list-route'; export default AbstractEditRoute.extend(ChargeRoute, PatientListRoute, { editTitle: t('imaging.titles.editTitle'), diff --git a/app/inventory/reports/controller.js b/app/inventory/reports/controller.js index 160afd95e1..0347b19346 100644 --- a/app/inventory/reports/controller.js +++ b/app/inventory/reports/controller.js @@ -3,6 +3,7 @@ import Ember from 'ember'; import InventoryAdjustmentTypes from 'hospitalrun/mixins/inventory-adjustment-types'; import LocationName from 'hospitalrun/mixins/location-name'; import ModalHelper from 'hospitalrun/mixins/modal-helper'; +import moment from 'moment'; import NumberFormat from 'hospitalrun/mixins/number-format'; import SelectValues from 'hospitalrun/utils/select-values'; export default AbstractReportController.extend(LocationName, ModalHelper, NumberFormat, InventoryAdjustmentTypes, { diff --git a/app/invoices/edit/controller.js b/app/invoices/edit/controller.js index 158d2645e2..139c7f711c 100644 --- a/app/invoices/edit/controller.js +++ b/app/invoices/edit/controller.js @@ -1,5 +1,6 @@ import AbstractEditController from 'hospitalrun/controllers/abstract-edit-controller'; import Ember from 'ember'; +import moment from 'moment'; import NumberFormat from 'hospitalrun/mixins/number-format'; import PatientSubmodule from 'hospitalrun/mixins/patient-submodule'; import PublishStatuses from 'hospitalrun/mixins/publish-statuses'; diff --git a/app/labs/edit/route.js b/app/labs/edit/route.js index 6484205461..9b654c7e37 100644 --- a/app/labs/edit/route.js +++ b/app/labs/edit/route.js @@ -1,6 +1,7 @@ import Ember from 'ember'; import AbstractEditRoute from 'hospitalrun/routes/abstract-edit-route'; import ChargeRoute from 'hospitalrun/mixins/charge-route'; +import moment from 'moment'; import PatientListRoute from 'hospitalrun/mixins/patient-list-route'; import { translationMacro as t } from 'ember-i18n'; diff --git a/app/locales/en/translations.js b/app/locales/en/translations.js index a5824a4db0..14905587c8 100644 --- a/app/locales/en/translations.js +++ b/app/locales/en/translations.js @@ -76,7 +76,8 @@ export default { userRoles: 'User Roles', workflow: 'Workflow', outpatient: 'Outpatient', - customForms: 'Custom Forms' + customForms: 'Custom Forms', + calendar: 'Calendar' }, actions: { logout: 'Logout', diff --git a/app/medication/edit/route.js b/app/medication/edit/route.js index 5adc466219..2f8c7f131a 100644 --- a/app/medication/edit/route.js +++ b/app/medication/edit/route.js @@ -3,6 +3,7 @@ import AbstractEditRoute from 'hospitalrun/routes/abstract-edit-route'; import Ember from 'ember'; import FulfillRequest from 'hospitalrun/mixins/fulfill-request'; import InventoryLocations from 'hospitalrun/mixins/inventory-locations'; // inventory-locations mixin is needed for fulfill-request mixin! +import moment from 'moment'; import PatientListRoute from 'hospitalrun/mixins/patient-list-route'; import uuid from 'npm:uuid'; export default AbstractEditRoute.extend(FulfillRequest, InventoryLocations, PatientListRoute, { diff --git a/app/mixins/date-format.js b/app/mixins/date-format.js index c08c6be0fb..0f9c889180 100644 --- a/app/mixins/date-format.js +++ b/app/mixins/date-format.js @@ -1,4 +1,5 @@ import Ember from 'ember'; +import moment from 'moment'; export default Ember.Mixin.create({ _dateFormat(value, dateFormat) { if (Ember.isEmpty(dateFormat)) { diff --git a/app/mixins/dob-days.js b/app/mixins/dob-days.js index 0547bc3b91..cf6e1d90ee 100644 --- a/app/mixins/dob-days.js +++ b/app/mixins/dob-days.js @@ -1,4 +1,5 @@ import Ember from 'ember'; +import moment from 'moment'; export default Ember.Mixin.create({ convertDOBToText(birthDate, shortFormat, omitDays) { let today = new Date(); diff --git a/app/models/appointment.js b/app/models/appointment.js index 19d683727b..15bac8a0a6 100644 --- a/app/models/appointment.js +++ b/app/models/appointment.js @@ -1,6 +1,7 @@ import AbstractModel from 'hospitalrun/models/abstract'; import DS from 'ember-data'; import Ember from 'ember'; +import moment from 'moment'; import PatientValidation from 'hospitalrun/utils/patient-validation'; export default AbstractModel.extend({ diff --git a/app/models/visit.js b/app/models/visit.js index 4fc207c9dd..e400cb4136 100644 --- a/app/models/visit.js +++ b/app/models/visit.js @@ -1,6 +1,7 @@ import AbstractModel from 'hospitalrun/models/abstract'; import DS from 'ember-data'; import Ember from 'ember'; +import moment from 'moment'; function dateAcceptance(object) { if (!object.get('hasDirtyAttributes')) { diff --git a/app/patients/notes/controller.js b/app/patients/notes/controller.js index bb37d024b5..34682e7fff 100644 --- a/app/patients/notes/controller.js +++ b/app/patients/notes/controller.js @@ -1,6 +1,7 @@ import AbstractEditController from 'hospitalrun/controllers/abstract-edit-controller'; import Ember from 'ember'; import IsUpdateDisabled from 'hospitalrun/mixins/is-update-disabled'; +import moment from 'moment'; import PatientSubmodule from 'hospitalrun/mixins/patient-submodule'; import PatientNotes from 'hospitalrun/mixins/patient-notes'; import UserSession from 'hospitalrun/mixins/user-session'; diff --git a/app/patients/outpatient/route.js b/app/patients/outpatient/route.js index de03b6b5e6..f349646198 100644 --- a/app/patients/outpatient/route.js +++ b/app/patients/outpatient/route.js @@ -1,6 +1,7 @@ import AbstractIndexRoute from 'hospitalrun/routes/abstract-index-route'; import DateFormat from 'hospitalrun/mixins/date-format'; import Ember from 'ember'; +import moment from 'moment'; import { translationMacro as t } from 'ember-i18n'; const { diff --git a/app/patients/reports/controller.js b/app/patients/reports/controller.js index 442e15c769..81be353ef6 100644 --- a/app/patients/reports/controller.js +++ b/app/patients/reports/controller.js @@ -1,5 +1,6 @@ import Ember from 'ember'; import AbstractReportController from 'hospitalrun/controllers/abstract-report-controller'; +import moment from 'moment'; import PatientDiagnosis from 'hospitalrun/mixins/patient-diagnosis'; import PatientVisits from 'hospitalrun/mixins/patient-visits'; import SelectValues from 'hospitalrun/utils/select-values'; diff --git a/app/visits/edit/controller.js b/app/visits/edit/controller.js index 434f217a2f..bc5f78ab32 100644 --- a/app/visits/edit/controller.js +++ b/app/visits/edit/controller.js @@ -3,6 +3,7 @@ import AddNewPatient from 'hospitalrun/mixins/add-new-patient'; import ChargeActions from 'hospitalrun/mixins/charge-actions'; import DiagnosisActions from 'hospitalrun/mixins/diagnosis-actions'; import Ember from 'ember'; +import moment from 'moment'; import PatientNotes from 'hospitalrun/mixins/patient-notes'; import PatientSubmodule from 'hospitalrun/mixins/patient-submodule'; import UserSession from 'hospitalrun/mixins/user-session'; diff --git a/bower.json b/bower.json index 2a8fb6a41f..8eda592c34 100644 --- a/bower.json +++ b/bower.json @@ -7,7 +7,6 @@ "ember-cli-shims": "0.1.3", "filer.js": "https://github.com/ebidel/filer.js.git#~0.4.3", "idb.filesystem": "https://github.com/ebidel/idb.filesystem.js.git#~0.0.6", - "moment": "~2.10.5", "octicons": "~2.4.1", "pikaday": "https://github.com/owenmead/Pikaday.git#~1.3.3", "typeahead.js": "~0.11.1", diff --git a/ember-cli-build.js b/ember-cli-build.js index db8412c400..5bbbe882a8 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -23,7 +23,6 @@ module.exports = function(defaults) { app.import('bower_components/JsBarcode/CODE128.js'); app.import('bower_components/JsBarcode/JsBarcode.js'); app.import('vendor/dymo/DYMO.Label.Framework.1.2.6.js'); - app.import('bower_components/moment/moment.js'); app.import('bower_components/typeahead.js/dist/typeahead.bundle.js'); app.import('bower_components/pikaday/pikaday.js'); app.import('bower_components/filer.js/src/filer.js'); diff --git a/package.json b/package.json index 752c28a367..b7bb5b753e 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "ember-cli-htmlbars": "^1.0.10", "ember-cli-htmlbars-inline-precompile": "^0.3.3", "ember-cli-inject-live-reload": "^1.4.1", + "ember-cli-moment-shim": "3.0.1", "ember-cli-qunit": "^3.0.1", "ember-cli-release": "^0.2.9", "ember-cli-sass": "^5.2.1", @@ -62,11 +63,10 @@ "ember-cli-uglify": "^1.2.0", "ember-data": "^2.10.0", "ember-export-application-global": "^1.0.5", - "ember-fullcalendar": "1.0.0", + "ember-fullcalendar": "1.1.0", "ember-i18n": "4.4.0", "ember-keyboard": "2.1.9", "ember-load-initializers": "^0.6.0", - "ember-moment": "7.3.0", "ember-pouch": "4.2.1", "ember-radio-buttons": "^4.0.1", "ember-rapid-forms": "GCorbel/ember-rapid-forms#26229804a2c430bbdf1ffb6bab8fb53af17bb3a4", diff --git a/tests/.eslintrc.js b/tests/.eslintrc.js index 9bb8e70bed..70836e1220 100644 --- a/tests/.eslintrc.js +++ b/tests/.eslintrc.js @@ -12,7 +12,6 @@ module.exports = { '$': true, 'authenticateUser': true, 'invalidateSession': true, - 'moment': true, 'require': true, 'runWithPouchDump': true, 'select': true, diff --git a/tests/acceptance/appointments-test.js b/tests/acceptance/appointments-test.js index 4397b18585..2f8e67f097 100644 --- a/tests/acceptance/appointments-test.js +++ b/tests/acceptance/appointments-test.js @@ -1,5 +1,6 @@ import Ember from 'ember'; import { module, test } from 'qunit'; +import moment from 'moment'; import startApp from 'hospitalrun/tests/helpers/start-app'; module('Acceptance | appointments', { diff --git a/tests/acceptance/inventory-test.js b/tests/acceptance/inventory-test.js index 93f81125a0..db3fea97fd 100644 --- a/tests/acceptance/inventory-test.js +++ b/tests/acceptance/inventory-test.js @@ -1,5 +1,6 @@ import Ember from 'ember'; import { module, test } from 'qunit'; +import moment from 'moment'; import startApp from 'hospitalrun/tests/helpers/start-app'; module('Acceptance | inventory', { diff --git a/tests/acceptance/operative-test.js b/tests/acceptance/operative-test.js index 10a34682ba..9c93483054 100644 --- a/tests/acceptance/operative-test.js +++ b/tests/acceptance/operative-test.js @@ -1,5 +1,6 @@ import Ember from 'ember'; import { module, test } from 'qunit'; +import moment from 'moment'; import startApp from 'hospitalrun/tests/helpers/start-app'; const ADDITIONAL_NOTES = 'Additional Notes here'; diff --git a/tests/acceptance/outpatient-test.js b/tests/acceptance/outpatient-test.js index b4f860862f..c7636281a9 100644 --- a/tests/acceptance/outpatient-test.js +++ b/tests/acceptance/outpatient-test.js @@ -1,5 +1,6 @@ import Ember from 'ember'; import { module, test } from 'qunit'; +import moment from 'moment'; import startApp from 'hospitalrun/tests/helpers/start-app'; module('Acceptance | outpatient', { diff --git a/tests/helpers/select-date.js b/tests/helpers/select-date.js index c63c4e9f80..a47896ed2e 100644 --- a/tests/helpers/select-date.js +++ b/tests/helpers/select-date.js @@ -1,5 +1,6 @@ // Derived from https://raw.githubusercontent.com/edgycircle/ember-pikaday/master/addon/helpers/pikaday.js import Ember from 'ember'; +import moment from 'moment'; function triggerNativeEvent(element, eventName) { if (document.createEvent) { From afa1b4513ec12587608affbaed13077e72ecc017 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 25 Jan 2017 15:15:12 -0500 Subject: [PATCH 03/18] Fixed double fetch of model --- app/components/calendar-control.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/components/calendar-control.js b/app/components/calendar-control.js index d42a40cf5d..07cf2fbee5 100644 --- a/app/components/calendar-control.js +++ b/app/components/calendar-control.js @@ -1,7 +1,10 @@ import Ember from 'ember'; import moment from 'moment'; +const { isEmpty } = Ember; + export default Ember.Component.extend({ + defaultView: 'agendaWeek', visibleDateIntervalStart: null, visibleDateIntervalEnd: null, @@ -33,7 +36,9 @@ export default Ember.Component.extend({ viewType: view.name }; - if (configurationsDiffer(currentConfiguration, newConfiguration)) { + if (isEmpty(currentConfiguration.dateIntervalStart) && isEmpty(currentConfiguration.dateIntervalEnd)) { + this.set('visualConfiguration', newConfiguration); + } else if (configurationsDiffer(currentConfiguration, newConfiguration)) { this.set('visualConfiguration', newConfiguration); this.get('onVisualConfigurationChanged')(newConfiguration); } From 5a2e400d4ca929c88c73007f426e0b49bea9dcc7 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 25 Jan 2017 15:16:53 -0500 Subject: [PATCH 04/18] Added default view and height --- app/components/calendar-control.js | 12 ++++++------ app/templates/components/calendar-control.hbs | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/components/calendar-control.js b/app/components/calendar-control.js index 07cf2fbee5..488928ca3b 100644 --- a/app/components/calendar-control.js +++ b/app/components/calendar-control.js @@ -4,7 +4,13 @@ import moment from 'moment'; const { isEmpty } = Ember; export default Ember.Component.extend({ + calendarHeader: { + left: 'title', + center: 'agendaDay,agendaWeek,month', + right: 'today prev,next' + }, defaultView: 'agendaWeek', + height: 500, visibleDateIntervalStart: null, visibleDateIntervalEnd: null, @@ -14,12 +20,6 @@ export default Ember.Component.extend({ viewType: null }, - calendarHeader: { - left: 'title', - center: 'agendaDay,agendaWeek,month', - right: 'today prev,next' - }, - actions: { handleRenderingComplete(view) { function configurationsDiffer(firstConfig, secondConfig) { diff --git a/app/templates/components/calendar-control.hbs b/app/templates/components/calendar-control.hbs index 4050d026df..7f512fd740 100644 --- a/app/templates/components/calendar-control.hbs +++ b/app/templates/components/calendar-control.hbs @@ -2,4 +2,6 @@ header=calendarHeader eventClick=onEventClick eventAfterAllRender=(action "handleRenderingComplete") -}} \ No newline at end of file + viewName=defaultView + height=height +}} From 2e10c7a51cdadf24b5dc36241d64bbc46b26a995 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 25 Jan 2017 15:17:11 -0500 Subject: [PATCH 05/18] Changed layout of filters Take up less space. --- app/appointments/calendar/template.hbs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/appointments/calendar/template.hbs b/app/appointments/calendar/template.hbs index ffffb82c1a..17fd788037 100644 --- a/app/appointments/calendar/template.hbs +++ b/app/appointments/calendar/template.hbs @@ -9,11 +9,9 @@ }} {{em-select class="col-sm-3" label=(t "labels.type") - property="selectedAppointmentType" + property="selectedAppointmentType" content=visitTypesWithEmpty }} - -
{{em-select class="col-sm-3" label=(t 'labels.with') property="selectedProvider" @@ -37,4 +35,4 @@ onVisualConfigurationChanged=(action "handleVisualConfigurationChanged") }}
- \ No newline at end of file + From 43fbdaab99f5d766538f67538d13766de4a7b3b1 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 25 Jan 2017 16:36:13 -0500 Subject: [PATCH 06/18] Fixed allDay and provider display --- app/appointments/calendar/route.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/appointments/calendar/route.js b/app/appointments/calendar/route.js index bcbe37bb25..9ee0e14fce 100644 --- a/app/appointments/calendar/route.js +++ b/app/appointments/calendar/route.js @@ -1,7 +1,10 @@ import AppointmentIndexRoute from 'hospitalrun/appointments/index/route'; +import Ember from 'ember'; import moment from 'moment'; import { translationMacro as t } from 'ember-i18n'; +const { isEmpty } = Ember; + export default AppointmentIndexRoute.extend({ editReturn: 'appointments.calendar', modelName: 'appointment', @@ -46,8 +49,14 @@ export default AppointmentIndexRoute.extend({ model(params) { function createCalendarEvent(appointment) { + let title = appointment.get('patient').get('displayName'); + let provider = appointment.get('provider'); + if (!isEmpty(provider)) { + title = `${title}\n${provider}`; + } return { - title: `${appointment.get('patient').get('displayName')}\n${appointment.get('provider')}`, + allDay: appointment.get('allDay'), + title, start: appointment.get('startDate'), end: appointment.get('endDate'), referencedAppointment: appointment From f70cb328f2081a1e14585508d375fb9e649099f1 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 25 Jan 2017 16:36:21 -0500 Subject: [PATCH 07/18] Changed title --- app/locales/en/translations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/locales/en/translations.js b/app/locales/en/translations.js index 14905587c8..5a46e410ee 100644 --- a/app/locales/en/translations.js +++ b/app/locales/en/translations.js @@ -767,7 +767,7 @@ export default { missed: 'Missed Appointments', searchTitle: 'Search Appointments', todayTitle: 'Today\'s Appointments', - calendarTitle: 'Calendar', + calendarTitle: 'Appointments Calendar', messages: { deleteAppointmentMessage: 'Are you sure you wish to delete this appointment?', endTimeLaterThanStart: 'Please select an end time later than the start time.' From a95047dec16662a5c0ddd5774ad8fbbbea97988d Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 25 Jan 2017 16:37:41 -0500 Subject: [PATCH 08/18] Allow editing/creation of events from calendar --- app/appointments/calendar/controller.js | 23 +++++++++++++++++++ app/appointments/calendar/template.hbs | 8 +++++-- app/components/calendar-control.js | 6 +++++ app/templates/components/calendar-control.hbs | 14 +++++++---- 4 files changed, 44 insertions(+), 7 deletions(-) diff --git a/app/appointments/calendar/controller.js b/app/appointments/calendar/controller.js index 110717e34a..11a5ceaa8e 100644 --- a/app/appointments/calendar/controller.js +++ b/app/appointments/calendar/controller.js @@ -4,6 +4,10 @@ import VisitTypes from 'hospitalrun/mixins/visit-types'; import SelectValues from 'hospitalrun/utils/select-values'; import Ember from 'ember'; +const { + set +} = Ember; + export default AppointmentIndexController.extend(AppointmentStatuses, VisitTypes, { appointmentsController: Ember.inject.controller('appointments'), startKey: [], @@ -41,6 +45,16 @@ export default AppointmentIndexController.extend(AppointmentStatuses, VisitTypes }, actions: { + createNewAppointment(dateClicked) { + let newAppointment = this.store.createRecord('appointment', { + appointmentType: 'Admission', + allDay: false, + selectPatient: true, + startDate: dateClicked.local().toDate() + }); + this.send('editAppointment', newAppointment); + }, + navigateToAppointment(calendarEvent) { this.send('editAppointment', calendarEvent.referencedAppointment); }, @@ -70,6 +84,15 @@ export default AppointmentIndexController.extend(AppointmentStatuses, VisitTypes this.set('model.selectedProvider', null); this.set('model.selectedLocation', null); this.send('filter'); + }, + + updateAppointment(calendarEvent) { + let appointmentToUpdate = calendarEvent.referencedAppointment; + let newEnd = calendarEvent.end.local().toDate(); + let newStart = calendarEvent.start.local().toDate(); + set(appointmentToUpdate, 'startDate', newStart); + set(appointmentToUpdate, 'endDate', newEnd); + this.send('editAppointment', appointmentToUpdate); } } }); diff --git a/app/appointments/calendar/template.hbs b/app/appointments/calendar/template.hbs index 17fd788037..3487901ffe 100644 --- a/app/appointments/calendar/template.hbs +++ b/app/appointments/calendar/template.hbs @@ -31,8 +31,12 @@
{{calendar-control events=model.events - onEventClick=(action "navigateToAppointment") - onVisualConfigurationChanged=(action "handleVisualConfigurationChanged") + onDayClick=(action "createNewAppointment") + onEventClick=(action "navigateToAppointment") + onEventDrop=(action "updateAppointment") + onEventResize=(action "updateAppointment") + onVisualConfigurationChanged=(action "handleVisualConfigurationChanged") + userCanEdit=canEdit }}
diff --git a/app/components/calendar-control.js b/app/components/calendar-control.js index 488928ca3b..a948b8b1e7 100644 --- a/app/components/calendar-control.js +++ b/app/components/calendar-control.js @@ -9,8 +9,14 @@ export default Ember.Component.extend({ center: 'agendaDay,agendaWeek,month', right: 'today prev,next' }, + defaultView: 'agendaWeek', height: 500, + onDayClick: null, + onEventClick: null, + onEventDrop: null, + onEventResize: null, + userCanEdit: false, visibleDateIntervalStart: null, visibleDateIntervalEnd: null, diff --git a/app/templates/components/calendar-control.hbs b/app/templates/components/calendar-control.hbs index 7f512fd740..b5bae78ba1 100644 --- a/app/templates/components/calendar-control.hbs +++ b/app/templates/components/calendar-control.hbs @@ -1,7 +1,11 @@ {{full-calendar events=events - header=calendarHeader - eventClick=onEventClick - eventAfterAllRender=(action "handleRenderingComplete") - viewName=defaultView - height=height + dayClick=onDayClick + editable=userCanEdit + eventAfterAllRender=(action "handleRenderingComplete") + eventClick=onEventClick + eventDrop=onEventDrop + eventResize=onEventResize + header=calendarHeader + height=height + viewName=defaultView }} From 61d0446a2fcedfe79fd6e05abb66166a3c80ffbd Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 25 Jan 2017 17:22:28 -0500 Subject: [PATCH 09/18] Updated to comply with styleguide --- app/appointments/calendar/controller.js | 83 ++++++++++++++----------- app/appointments/calendar/route.js | 80 ++++++++++++------------ app/components/calendar-control.js | 23 ++++--- 3 files changed, 100 insertions(+), 86 deletions(-) diff --git a/app/appointments/calendar/controller.js b/app/appointments/calendar/controller.js index 11a5ceaa8e..42a06b40ef 100644 --- a/app/appointments/calendar/controller.js +++ b/app/appointments/calendar/controller.js @@ -5,46 +5,61 @@ import SelectValues from 'hospitalrun/utils/select-values'; import Ember from 'ember'; const { + computed, + computed: { + alias + }, + get, + inject, + isEmpty, set } = Ember; export default AppointmentIndexController.extend(AppointmentStatuses, VisitTypes, { - appointmentsController: Ember.inject.controller('appointments'), - startKey: [], - - queryParams: ['appointmentType', 'provider', 'status', 'location'], appointmentType: null, + location: null, provider: null, + queryParams: ['appointmentType', 'provider', 'status', 'location'], + startKey: [], status: null, - location: null, - physicians: Ember.computed.alias('appointmentsController.physicianList.value'), - physicianList: function() { - return SelectValues.selectValues(this.get('physicians'), true); - }.property('physicians'), + appointmentsController: inject.controller('appointments'), + locations: alias('appointmentsController.locationList.value'), + physicians: alias('appointmentsController.physicianList.value'), - locations: Ember.computed.alias('appointmentsController.locationList.value'), - locationList: function() { - return SelectValues.selectValues(this.get('locations'), true); - }.property('locations'), + locationList: computed('locations', function() { + return SelectValues.selectValues(get(this, 'locations'), true); + }), - getSelectedFilteringCriteria() { + physicianList: computed('physicians', function() { + return SelectValues.selectValues(get(this, 'physicians'), true); + }), + + _getSelectedFilteringCriteria() { let rawCriteria = { - status: this.get('model.selectedStatus'), - type: this.get('model.selectedAppointmentType'), - provider: this.get('model.selectedProvider'), - location: this.get('model.selectedLocation') + status: get(this, 'model.selectedStatus'), + type: get(this, 'model.selectedAppointmentType'), + provider: get(this, 'model.selectedProvider'), + location: get(this, 'model.selectedLocation') }; return { - status: Ember.isEmpty(rawCriteria.status) ? null : rawCriteria.status, - type: Ember.isEmpty(rawCriteria.type) ? null : rawCriteria.type, - provider: Ember.isEmpty(rawCriteria.provider) ? null : rawCriteria.provider, - location: Ember.isEmpty(rawCriteria.location) ? null : rawCriteria.location + status: isEmpty(rawCriteria.status) ? null : rawCriteria.status, + type: isEmpty(rawCriteria.type) ? null : rawCriteria.type, + provider: isEmpty(rawCriteria.provider) ? null : rawCriteria.provider, + location: isEmpty(rawCriteria.location) ? null : rawCriteria.location }; }, actions: { + clearFilteringCriteria() { + set(this, 'model.selectedStatus', null); + set(this, 'model.selectedAppointmentType', null); + set(this, 'model.selectedProvider', null); + set(this, 'model.selectedLocation', null); + this.send('filter'); + }, + createNewAppointment(dateClicked) { let newAppointment = this.store.createRecord('appointment', { appointmentType: 'Admission', @@ -55,17 +70,8 @@ export default AppointmentIndexController.extend(AppointmentStatuses, VisitTypes this.send('editAppointment', newAppointment); }, - navigateToAppointment(calendarEvent) { - this.send('editAppointment', calendarEvent.referencedAppointment); - }, - - handleVisualConfigurationChanged(newConfiguration) { - let { dateIntervalStart, dateIntervalEnd } = newConfiguration; - this.send('updateDateInterval', dateIntervalStart, dateIntervalEnd); - }, - filter() { - let criteria = this.getSelectedFilteringCriteria(); + let criteria = this._getSelectedFilteringCriteria(); this.setProperties({ startKey: [], previousStartKey: null, @@ -78,12 +84,13 @@ export default AppointmentIndexController.extend(AppointmentStatuses, VisitTypes }); }, - clearFilteringCriteria() { - this.set('model.selectedStatus', null); - this.set('model.selectedAppointmentType', null); - this.set('model.selectedProvider', null); - this.set('model.selectedLocation', null); - this.send('filter'); + handleVisualConfigurationChanged(newConfiguration) { + let { dateIntervalStart, dateIntervalEnd } = newConfiguration; + this.send('updateDateInterval', dateIntervalStart, dateIntervalEnd); + }, + + navigateToAppointment(calendarEvent) { + this.send('editAppointment', calendarEvent.referencedAppointment); }, updateAppointment(calendarEvent) { diff --git a/app/appointments/calendar/route.js b/app/appointments/calendar/route.js index 9ee0e14fce..aac387e882 100644 --- a/app/appointments/calendar/route.js +++ b/app/appointments/calendar/route.js @@ -3,15 +3,21 @@ import Ember from 'ember'; import moment from 'moment'; import { translationMacro as t } from 'ember-i18n'; -const { isEmpty } = Ember; +const { + get, + isEmpty, + set +} = Ember; export default AppointmentIndexRoute.extend({ + + dateIntervalEnd: null, + dateIntervalStart: null, editReturn: 'appointments.calendar', + filterParams: ['appointmentType', 'provider', 'status', 'location'], modelName: 'appointment', pageTitle: t('appointments.calendarTitle'), - filterParams: ['appointmentType', 'provider', 'status', 'location'], - queryParams: { appointmentType: { refreshModel: true }, provider: { refreshModel: true }, @@ -19,46 +25,18 @@ export default AppointmentIndexRoute.extend({ location: { refreshModel: true } }, - dateIntervalStart: null, - dateIntervalEnd: null, - - _modelQueryParams(params) { - let dateIntervalStart = this.get('dateIntervalStart'); - let dateIntervalEnd = this.get('dateIntervalEnd'); - - if (dateIntervalStart === null || dateIntervalEnd === null) { - return this._super(params); - } - - let maxValue = this.get('maxValue'); - - // To cater for times like 0:00 - investigate. - let adjustedStart = moment(dateIntervalStart).subtract(1, 'days').startOf('day').toDate().getTime(); - let adjustedEnd = moment(dateIntervalEnd).add(1, 'days').endOf('day').toDate().getTime(); - - let searchOptions = { - startkey: [adjustedStart, null, 'appointment_'], - endkey: [adjustedEnd, maxValue, `appointment_${maxValue}`] - }; - - return { - options: searchOptions, - mapReduce: 'appointments_by_date' - }; - }, - model(params) { function createCalendarEvent(appointment) { - let title = appointment.get('patient').get('displayName'); - let provider = appointment.get('provider'); + let title = get(appointment, 'patient.displayName'); + let provider = get(appointment, 'provider'); if (!isEmpty(provider)) { title = `${title}\n${provider}`; } return { - allDay: appointment.get('allDay'), + allDay: get(appointment, 'allDay'), title, - start: appointment.get('startDate'), - end: appointment.get('endDate'), + start: get(appointment, 'startDate'), + end: get(appointment, 'endDate'), referencedAppointment: appointment }; } @@ -72,7 +50,6 @@ export default AppointmentIndexRoute.extend({ .then(function(calendarEvents) { return { events: calendarEvents, - selectedAppointmentType: params.appointmentType, selectedProvider: params.provider, selectedStatus: params.status, @@ -81,10 +58,35 @@ export default AppointmentIndexRoute.extend({ }); }, + _modelQueryParams(params) { + let dateIntervalStart = get(this, 'dateIntervalStart'); + let dateIntervalEnd = get(this, 'dateIntervalEnd'); + + if (dateIntervalStart === null || dateIntervalEnd === null) { + return this._super(params); + } + + let maxValue = get(this, 'maxValue'); + + // To cater for times like 0:00 - investigate. + let adjustedStart = moment(dateIntervalStart).subtract(1, 'days').startOf('day').toDate().getTime(); + let adjustedEnd = moment(dateIntervalEnd).add(1, 'days').endOf('day').toDate().getTime(); + + let searchOptions = { + startkey: [adjustedStart, null, this._getMinPouchId()], + endkey: [adjustedEnd, maxValue, this._getMaxPouchId()] + }; + + return { + options: searchOptions, + mapReduce: 'appointments_by_date' + }; + }, + actions: { updateDateInterval(start, end) { - this.set('dateIntervalStart', start); - this.set('dateIntervalEnd', end); + set(this, 'dateIntervalStart', start); + set(this, 'dateIntervalEnd', end); this.refresh(); } } diff --git a/app/components/calendar-control.js b/app/components/calendar-control.js index a948b8b1e7..c6253b5647 100644 --- a/app/components/calendar-control.js +++ b/app/components/calendar-control.js @@ -1,12 +1,16 @@ import Ember from 'ember'; import moment from 'moment'; -const { isEmpty } = Ember; +const { + get, + isEmpty, + set +} = Ember; export default Ember.Component.extend({ calendarHeader: { - left: 'title', center: 'agendaDay,agendaWeek,month', + left: 'title', right: 'today prev,next' }, @@ -17,15 +21,16 @@ export default Ember.Component.extend({ onEventDrop: null, onEventResize: null, userCanEdit: false, - visibleDateIntervalStart: null, - visibleDateIntervalEnd: null, visualConfiguration: { - dateIntervalStart: null, dateIntervalEnd: null, + dateIntervalStart: null, viewType: null }, + visibleDateIntervalEnd: null, + visibleDateIntervalStart: null, + actions: { handleRenderingComplete(view) { function configurationsDiffer(firstConfig, secondConfig) { @@ -34,7 +39,7 @@ export default Ember.Component.extend({ || firstConfig.viewType !== secondConfig.viewType; } - let currentConfiguration = this.get('visualConfiguration'); + let currentConfiguration = get(this, 'visualConfiguration'); let newConfiguration = { dateIntervalStart: moment(view.intervalStart).startOf('day').toDate().getTime(), @@ -43,10 +48,10 @@ export default Ember.Component.extend({ }; if (isEmpty(currentConfiguration.dateIntervalStart) && isEmpty(currentConfiguration.dateIntervalEnd)) { - this.set('visualConfiguration', newConfiguration); + set(this, 'visualConfiguration', newConfiguration); } else if (configurationsDiffer(currentConfiguration, newConfiguration)) { - this.set('visualConfiguration', newConfiguration); - this.get('onVisualConfigurationChanged')(newConfiguration); + set(this, 'visualConfiguration', newConfiguration); + get(this, 'onVisualConfigurationChanged')(newConfiguration); } } } From 8ae66000f9f24fa554cd2aa3afe3659611d53539 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Thu, 26 Jan 2017 14:07:05 -0500 Subject: [PATCH 10/18] New styles for appointment calendars --- app/styles/app.scss | 1 + app/styles/components/_calendar.scss | 10 ++++++++++ app/templates/components/calendar-control.hbs | 1 + 3 files changed, 12 insertions(+) create mode 100644 app/styles/components/_calendar.scss diff --git a/app/styles/app.scss b/app/styles/app.scss index c29da4666d..c87b15e72d 100644 --- a/app/styles/app.scss +++ b/app/styles/app.scss @@ -23,6 +23,7 @@ // Components @import 'components/alert'; @import 'components/buttons'; +@import 'components/calendar'; @import 'components/dropdown'; @import 'components/form_styles'; @import 'components/imaging'; diff --git a/app/styles/components/_calendar.scss b/app/styles/components/_calendar.scss new file mode 100644 index 0000000000..93d6ad70e5 --- /dev/null +++ b/app/styles/components/_calendar.scss @@ -0,0 +1,10 @@ +.fc-toolbar { + &.fc-header-toolbar { + h2 { + margin-top: .35em; + font-size: 18px; + } + + margin-bottom: 0; + } +} diff --git a/app/templates/components/calendar-control.hbs b/app/templates/components/calendar-control.hbs index b5bae78ba1..f71ba32c7f 100644 --- a/app/templates/components/calendar-control.hbs +++ b/app/templates/components/calendar-control.hbs @@ -1,5 +1,6 @@ {{full-calendar events=events dayClick=onDayClick + date=defaultDate editable=userCanEdit eventAfterAllRender=(action "handleRenderingComplete") eventClick=onEventClick From b0f9966808541ab6bb45082bf94c274e4817ea8e Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Thu, 26 Jan 2017 14:07:28 -0500 Subject: [PATCH 11/18] Match calendar filters layout --- app/appointments/search/template.hbs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/appointments/search/template.hbs b/app/appointments/search/template.hbs index ce674df356..aaa2ca7909 100644 --- a/app/appointments/search/template.hbs +++ b/app/appointments/search/template.hbs @@ -4,15 +4,13 @@ {{#em-form model=model submitButton=false }}
{{date-picker property="selectedStartingDate" label=(t "appointments.labels.selectedStartingDate")class="col-sm-3"}} - {{em-select class="col-sm-3" property="selectedStatus" + {{em-select class="col-sm-3 form-input-group" property="selectedStatus" label=(t "labels.status") content=appointmentStatusesWithEmpty }} -
-
- {{em-select class="col-sm-3" label=(t "labels.type") + {{em-select class="col-sm-3 form-input-group" label=(t "labels.type") property="selectedAppointmentType" content=visitTypesWithEmpty }} - {{em-select class="col-sm-3" property="selectedProvider" + {{em-select class="col-sm-3 form-input-group" property="selectedProvider" label=(t 'labels.with') content=physicianList }}
From c2d5dd0f0dc05241e8625c8c3edacd5ab73f1bab Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Thu, 26 Jan 2017 14:08:58 -0500 Subject: [PATCH 12/18] Make sure calendar options work on return Also fixed start date and end date on data retrieval of appointments --- app/appointments/calendar/controller.js | 21 +++++++++------ app/appointments/calendar/route.js | 32 +++++++---------------- app/appointments/calendar/template.hbs | 34 ++++++++++++------------- app/components/calendar-control.js | 32 +++++++++++++++-------- 4 files changed, 61 insertions(+), 58 deletions(-) diff --git a/app/appointments/calendar/controller.js b/app/appointments/calendar/controller.js index 42a06b40ef..0fe72f5071 100644 --- a/app/appointments/calendar/controller.js +++ b/app/appointments/calendar/controller.js @@ -1,5 +1,6 @@ import AppointmentIndexController from 'hospitalrun/appointments/index/controller'; import AppointmentStatuses from 'hospitalrun/mixins/appointment-statuses'; +import moment from 'moment'; import VisitTypes from 'hospitalrun/mixins/visit-types'; import SelectValues from 'hospitalrun/utils/select-values'; import Ember from 'ember'; @@ -17,16 +18,25 @@ const { export default AppointmentIndexController.extend(AppointmentStatuses, VisitTypes, { appointmentType: null, + endDate: null, location: null, provider: null, - queryParams: ['appointmentType', 'provider', 'status', 'location'], - startKey: [], + queryParams: ['appointmentType', 'endDate', 'provider', 'status', 'startDate', 'location', 'viewType'], + startDate: null, status: null, + viewType: 'agendaWeek', appointmentsController: inject.controller('appointments'), locations: alias('appointmentsController.locationList.value'), physicians: alias('appointmentsController.physicianList.value'), + calendarDate: computed('startDate', function() { + let startDate = get(this, 'startDate'); + if (!isEmpty(startDate)) { + return moment(parseInt(startDate)); + } + }), + locationList: computed('locations', function() { return SelectValues.selectValues(get(this, 'locations'), true); }), @@ -73,10 +83,6 @@ export default AppointmentIndexController.extend(AppointmentStatuses, VisitTypes filter() { let criteria = this._getSelectedFilteringCriteria(); this.setProperties({ - startKey: [], - previousStartKey: null, - previousStartKeys: [], - appointmentType: criteria.type, provider: criteria.provider, status: criteria.status, @@ -85,8 +91,7 @@ export default AppointmentIndexController.extend(AppointmentStatuses, VisitTypes }, handleVisualConfigurationChanged(newConfiguration) { - let { dateIntervalStart, dateIntervalEnd } = newConfiguration; - this.send('updateDateInterval', dateIntervalStart, dateIntervalEnd); + this.setProperties(newConfiguration); }, navigateToAppointment(calendarEvent) { diff --git a/app/appointments/calendar/route.js b/app/appointments/calendar/route.js index aac387e882..38303d26bd 100644 --- a/app/appointments/calendar/route.js +++ b/app/appointments/calendar/route.js @@ -1,12 +1,10 @@ import AppointmentIndexRoute from 'hospitalrun/appointments/index/route'; import Ember from 'ember'; -import moment from 'moment'; import { translationMacro as t } from 'ember-i18n'; const { get, - isEmpty, - set + isEmpty } = Ember; export default AppointmentIndexRoute.extend({ @@ -20,9 +18,12 @@ export default AppointmentIndexRoute.extend({ queryParams: { appointmentType: { refreshModel: true }, + endDate: { refreshModel: true }, provider: { refreshModel: true }, status: { refreshModel: true }, - location: { refreshModel: true } + startDate: { refreshModel: true }, + location: { refreshModel: true }, + viewType: { refreshModel: false } }, model(params) { @@ -59,35 +60,20 @@ export default AppointmentIndexRoute.extend({ }, _modelQueryParams(params) { - let dateIntervalStart = get(this, 'dateIntervalStart'); - let dateIntervalEnd = get(this, 'dateIntervalEnd'); + let { endDate, startDate } = params; - if (dateIntervalStart === null || dateIntervalEnd === null) { + if (endDate === null || startDate === null) { return this._super(params); } - let maxValue = get(this, 'maxValue'); - - // To cater for times like 0:00 - investigate. - let adjustedStart = moment(dateIntervalStart).subtract(1, 'days').startOf('day').toDate().getTime(); - let adjustedEnd = moment(dateIntervalEnd).add(1, 'days').endOf('day').toDate().getTime(); - let searchOptions = { - startkey: [adjustedStart, null, this._getMinPouchId()], - endkey: [adjustedEnd, maxValue, this._getMaxPouchId()] + startkey: [parseInt(startDate), null, this._getMinPouchId()], + endkey: [parseInt(endDate), maxValue, this._getMaxPouchId()] }; return { options: searchOptions, mapReduce: 'appointments_by_date' }; - }, - - actions: { - updateDateInterval(start, end) { - set(this, 'dateIntervalStart', start); - set(this, 'dateIntervalEnd', end); - this.refresh(); - } } }); diff --git a/app/appointments/calendar/template.hbs b/app/appointments/calendar/template.hbs index 3487901ffe..081002a286 100644 --- a/app/appointments/calendar/template.hbs +++ b/app/appointments/calendar/template.hbs @@ -1,36 +1,36 @@
{{#em-form model=model submitButton=false}} -
- {{em-select class="col-sm-3" +
+ {{em-select class="col-sm-3 form-input-group" label=(t "labels.status") property="selectedStatus" content=appointmentStatusesWithEmpty - }} - {{em-select class="col-sm-3" + }} + {{em-select class="col-sm-3 form-input-group" label=(t "labels.type") property="selectedAppointmentType" content=visitTypesWithEmpty - }} - {{em-select class="col-sm-3" + }} + {{em-select class="col-sm-3 form-input-group" label=(t 'labels.with') property="selectedProvider" content=physicianList - }} - {{em-select class="col-sm-3" + }} + {{em-select class="col-sm-3 form-input-group" label=(t 'labels.location') property="selectedLocation" content=locationList - }} -
+ }} +
{{/em-form}} -
- -
+ {{calendar-control events=model.events + defaultDate=calendarDate + defaultView=viewType onDayClick=(action "createNewAppointment") onEventClick=(action "navigateToAppointment") onEventDrop=(action "updateAppointment") @@ -38,5 +38,5 @@ onVisualConfigurationChanged=(action "handleVisualConfigurationChanged") userCanEdit=canEdit }} -
+
diff --git a/app/components/calendar-control.js b/app/components/calendar-control.js index c6253b5647..b8337fd15d 100644 --- a/app/components/calendar-control.js +++ b/app/components/calendar-control.js @@ -13,7 +13,7 @@ export default Ember.Component.extend({ left: 'title', right: 'today prev,next' }, - + defaultDate: null, defaultView: 'agendaWeek', height: 500, onDayClick: null, @@ -23,31 +23,43 @@ export default Ember.Component.extend({ userCanEdit: false, visualConfiguration: { - dateIntervalEnd: null, - dateIntervalStart: null, + endDate: null, + startDate: null, viewType: null }, - visibleDateIntervalEnd: null, - visibleDateIntervalStart: null, + /** + * FullCalendar gives the start and end timestamps based on UTC (eg start at + * midnight UTC and end at 11:59PM UTC), but for our purposes we want to show + * users events that start at midnight their timezone and end at 11:59PM in + * their timezone. This function takes a UTC timestamps from fullcalendar + * and returns the timestamp in the users timezone (eg midnight UTC is returned + * as midnight EST for EST users). + * @param timestamp A number representing the milliseconds elapsed between + * 1 January 1970 00:00:00 UTC and the given date. + * @return String timestamp in users timezone. + */ + _convertDateFromUTCToLocal(date) { + return moment(date.utc().format('YYYY-MM-DD HH:mm:ss')).valueOf(); + }, actions: { handleRenderingComplete(view) { function configurationsDiffer(firstConfig, secondConfig) { - return firstConfig.dateIntervalStart !== secondConfig.dateIntervalStart - || firstConfig.dateIntervalEnd !== secondConfig.dateIntervalEnd + return firstConfig.startDate !== secondConfig.startDate + || firstConfig.endDate !== secondConfig.endDate || firstConfig.viewType !== secondConfig.viewType; } let currentConfiguration = get(this, 'visualConfiguration'); let newConfiguration = { - dateIntervalStart: moment(view.intervalStart).startOf('day').toDate().getTime(), - dateIntervalEnd: moment(view.intervalEnd).endOf('day').toDate().getTime(), + startDate: this._convertDateFromUTCToLocal(view.intervalStart), + endDate: this._convertDateFromUTCToLocal(view.intervalEnd), viewType: view.name }; - if (isEmpty(currentConfiguration.dateIntervalStart) && isEmpty(currentConfiguration.dateIntervalEnd)) { + if (isEmpty(currentConfiguration.startDate) && isEmpty(currentConfiguration.endDate)) { set(this, 'visualConfiguration', newConfiguration); } else if (configurationsDiffer(currentConfiguration, newConfiguration)) { set(this, 'visualConfiguration', newConfiguration); From 59609722b143d9347d6b4473dbeb39a013090a94 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Thu, 26 Jan 2017 15:07:28 -0500 Subject: [PATCH 13/18] Fixed broken tests --- .../components/calendar-control-test.js | 14 +------ .../abstract-report-controller-test.js | 41 ++++++------------- 2 files changed, 13 insertions(+), 42 deletions(-) diff --git a/tests/integration/components/calendar-control-test.js b/tests/integration/components/calendar-control-test.js index 2d304d251f..d74a712837 100644 --- a/tests/integration/components/calendar-control-test.js +++ b/tests/integration/components/calendar-control-test.js @@ -6,19 +6,7 @@ moduleForComponent('calendar-control', 'Integration | Component | calendar contr }); test('it renders', function(assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.on('myAction', function(val) { ... }); - this.render(hbs`{{calendar-control}}`); - assert.equal(this.$().text().trim(), ''); - - // Template block usage: - this.render(hbs` - {{#calendar-control}} - template block text - {{/calendar-control}} - `); - - assert.equal(this.$().text().trim(), 'template block text'); + assert.equal(this.$('.ember-view.full-calendar').length, 1); }); diff --git a/tests/unit/controllers/abstract-report-controller-test.js b/tests/unit/controllers/abstract-report-controller-test.js index 33bac5db82..159c1597e5 100644 --- a/tests/unit/controllers/abstract-report-controller-test.js +++ b/tests/unit/controllers/abstract-report-controller-test.js @@ -1,8 +1,9 @@ -import { moduleFor, test } from 'ember-qunit'; -import sinonTest from 'ember-sinon-qunit/test-support/test'; import Ember from 'ember'; -import tHelper from 'ember-i18n/helper'; import localeConfig from 'ember-i18n/config/en'; +import moment from 'moment'; +import sinonTest from 'ember-sinon-qunit/test-support/test'; +import tHelper from 'ember-i18n/helper'; +import { moduleFor, test } from 'ember-qunit'; moduleFor('controller:abstract-report-controller', 'Unit | Controller | abstract-report-controller', { needs: [ @@ -50,9 +51,11 @@ sinonTest('_notifyReportError', function(assert) { }); sinonTest('_setReportTitle', function(assert) { + let endDate = new Date(1482269979422); + let startDate = new Date(1472269979422); let controller = this.subject({ - endDate: new Date(1482269979422), - startDate: new Date(1472269979422), + endDate, + startDate, reportTypes: [ Ember.Object.create({ value: 'one', @@ -65,35 +68,15 @@ sinonTest('_setReportTitle', function(assert) { ], reportType: 'two' }); - - this.stub(window, 'moment', (function() { - let count = 0; - return () => { - if (count < 1) { - count += 1; - return { - format() { - return 'April 1st, 1996'; - } - }; - } - - return { - format() { - return 'January 3rd, 1995'; - } - }; - }; - }())); - controller._setReportTitle(); - assert.equal(controller.get('reportTitle'), 'Number Two Report January 3rd, 1995 - April 1st, 1996'); + assert.equal(controller.get('reportTitle').toString(), `Number Two Report ${moment(startDate).format('l')} - ${moment(endDate).format('l')}`); }); sinonTest('_setReportTitle single date', function(assert) { + let endDate = new Date(1472269979422); let controller = this.subject({ - endDate: new Date(1472269979422), + endDate, reportTypes: [ Ember.Object.create({ value: 'one', @@ -117,7 +100,7 @@ sinonTest('_setReportTitle single date', function(assert) { controller._setReportTitle(); - assert.equal(controller.get('reportTitle'), 'Number One Report April 3rd, 2015'); + assert.equal(controller.get('reportTitle').toString(), `Number One Report ${moment(endDate).format('l')}`); }); test('actions.firstPage', function(assert) { From e053172373617ffefc37846c2056a3d44d0279e3 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 30 Jan 2017 13:23:17 -0500 Subject: [PATCH 14/18] Show dialog when user session has expired. --- app/adapters/application.js | 43 ++++++++++-- app/controllers/abstract-edit-controller.js | 9 ++- app/locales/en/translations.js | 8 +++ app/routes/application.js | 77 +++++++++++++++++---- app/utils/unauthorized-error.js | 11 +++ 5 files changed, 128 insertions(+), 20 deletions(-) create mode 100644 app/utils/unauthorized-error.js diff --git a/app/adapters/application.js b/app/adapters/application.js index d186eed259..72f55ae06f 100644 --- a/app/adapters/application.js +++ b/app/adapters/application.js @@ -1,5 +1,6 @@ import Ember from 'ember'; import { Adapter } from 'ember-pouch'; +import UnauthorizedError from 'hospitalrun/utils/unauthorized-error'; import PouchAdapterUtils from 'hospitalrun/mixins/pouch-adapter-utils'; import uuid from 'npm:uuid'; @@ -203,7 +204,7 @@ export default Adapter.extend(PouchAdapterUtils, { }; db.list(`${mapReduce}/sort/${mapReduce}`, listParams, (err, response) => { if (err) { - this._pouchError(reject)(err); + reject(this._handleErrorResponse(err)); } else { let responseJSON = JSON.parse(response.body); this._handleQueryResponse(responseJSON, store, type).then(resolve, reject); @@ -212,7 +213,7 @@ export default Adapter.extend(PouchAdapterUtils, { } else { db.query(mapReduce, queryParams, (err, response) => { if (err) { - this._pouchError(reject)(err); + reject(this._handleErrorResponse(err)); } else { this._handleQueryResponse(response, store, type).then(resolve, reject); } @@ -221,16 +222,50 @@ export default Adapter.extend(PouchAdapterUtils, { } else { db.allDocs(queryParams, (err, response) => { if (err) { - this._pouchError(reject)(err); + reject(this._handleErrorResponse(err)); } else { this._handleQueryResponse(response, store, type).then(resolve, reject); } }); } } catch(err) { - this._pouchError(reject)(err); + reject(this._handleErrorResponse(err)); } }, 'findQuery in application-pouchdb-adapter'); } + }, + + createRecord(store, type, record) { + return new Ember.RSVP.Promise((resolve, reject) => { + this._super(store, type, record).then(resolve, (err) => { + reject(this._handleErrorResponse(err)); + }); + }); + }, + + updateRecord(store, type, record) { + return new Ember.RSVP.Promise((resolve, reject) => { + this._super(store, type, record).then(resolve, (err) => { + reject(this._handleErrorResponse(err)); + }); + }); + }, + + deleteRecord(store, type, record) { + return new Ember.RSVP.Promise((resolve, reject) => { + this._super(store, type, record).then(resolve, (err) => { + reject(this._handleErrorResponse(err)); + }); + }); + }, + + _handleErrorResponse(err) { + if (err.status) { + let detailedMessage = JSON.stringify(err, null, 2); + return new UnauthorizedError(err, detailedMessage); + } else { + return err; + } } + }); diff --git a/app/controllers/abstract-edit-controller.js b/app/controllers/abstract-edit-controller.js index 20565f8355..e19dae079d 100644 --- a/app/controllers/abstract-edit-controller.js +++ b/app/controllers/abstract-edit-controller.js @@ -3,6 +3,9 @@ import EditPanelProps from 'hospitalrun/mixins/edit-panel-props'; import IsUpdateDisabled from 'hospitalrun/mixins/is-update-disabled'; import ModalHelper from 'hospitalrun/mixins/modal-helper'; import UserSession from 'hospitalrun/mixins/user-session'; + +const { get } = Ember; + export default Ember.Controller.extend(EditPanelProps, IsUpdateDisabled, ModalHelper, UserSession, { cancelAction: 'allItems', @@ -158,12 +161,14 @@ export default Ember.Controller.extend(EditPanelProps, IsUpdateDisabled, ModalHe * to skip the afterUpdate call. */ saveModel(skipAfterUpdate) { - this.get('model').save().then(function(record) { + get(this, 'model').save().then((record) => { this.updateLookupLists(); if (!skipAfterUpdate) { this.afterUpdate(record); } - }.bind(this)); + }).catch((error) => { + this.send('error', error); + }); }, /** diff --git a/app/locales/en/translations.js b/app/locales/en/translations.js index 5a46e410ee..cdef844248 100644 --- a/app/locales/en/translations.js +++ b/app/locales/en/translations.js @@ -1230,5 +1230,13 @@ export default { newTitle: 'New Operation Report', reportSaved: 'Report Saved' } + }, + application: { + messages: { + sessionExpired: 'Your session has expired. Please login to continue.' + }, + titles: { + sessionExpired: 'Session Expired' + } } }; diff --git a/app/routes/application.js b/app/routes/application.js index f38e117b05..4fd58034cc 100644 --- a/app/routes/application.js +++ b/app/routes/application.js @@ -1,10 +1,14 @@ import ApplicationRouteMixin from 'ember-simple-auth/mixins/application-route-mixin'; import Ember from 'ember'; +import ModalHelper from 'hospitalrun/mixins/modal-helper'; import SetupUserRole from 'hospitalrun/mixins/setup-user-role'; +import UnauthorizedError from 'hospitalrun/utils/unauthorized-error'; -const { inject, Route } = Ember; +const { get, inject, isEmpty, Route, set } = Ember; -let ApplicationRoute = Route.extend(ApplicationRouteMixin, SetupUserRole, { +const TRANSITION_AFTER_LOGIN = 'transitionAfterLogin'; + +let ApplicationRoute = Route.extend(ApplicationRouteMixin, ModalHelper, SetupUserRole, { database: inject.service(), config: inject.service(), session: inject.service(), @@ -17,6 +21,34 @@ let ApplicationRoute = Route.extend(ApplicationRouteMixin, SetupUserRole, { outlet: 'modal' }); }, + + error(reason, transition) { + if (reason instanceof UnauthorizedError) { + let i18n = this.get('i18n'); + let message = i18n.t('application.messages.sessionExpired'); + let session = get(this, 'session'); + let title = i18n.t('application.titles.sessionExpired'); + if (!isEmpty(transition)) { + let sessionStore = session.get('store'); + let sessionData = session.get('data'); + let transitionName; + if (transition.targetName) { + transitionName = transition.targetName; + } else { + transitionName = transition; + } + set(sessionData, TRANSITION_AFTER_LOGIN, transitionName); + sessionStore.persist(sessionData).then(() =>{ + this.displayAlert(title, message, 'unauthorizeSession'); + }); + } else { + this.displayAlert(title, message, 'unauthorizeSession'); + } + } else { + this._super(reason); + } + }, + /** * Render a modal using the specifed path and optionally set a model. * @param modalPath the path to use for the controller and template. @@ -24,42 +56,49 @@ let ApplicationRoute = Route.extend(ApplicationRouteMixin, SetupUserRole, { */ openModal(modalPath, model) { if (model) { - this.controllerFor(modalPath).set('model', model); + set(this.controllerFor(modalPath), 'model', model); } this.renderModal(modalPath); }, + unauthorizeSession() { + let session = get(this, 'session'); + if (get(session, 'isAuthenticated')) { + session.invalidate(); + } + }, + /** * Update an open modal using the specifed model. * @param modalPath the path to use for the controller and template. * @param model (optional) the model to set on the controller for the modal. */ updateModal(modalPath, model) { - this.controllerFor(modalPath).set('model', model); + set(this.controllerFor(modalPath), 'model', model); } }, model(params, transition) { - let session = this.get('session'); - let isAuthenticated = session && session.get('isAuthenticated'); - return this.get('config').setup().then(function(configs) { + let session = get(this, 'session'); + let isAuthenticated = session && get(session, 'isAuthenticated'); + return get(this, 'config').setup().then(function(configs) { if (transition.targetName !== 'finishgauth' && transition.targetName !== 'login') { - this.set('shouldSetupUserRole', true); + set(this, 'shouldSetupUserRole', true); if (isAuthenticated) { - return this.get('database').setup(configs) + return get(this, 'database').setup(configs) .catch(() => { // Error thrown indicates missing auth, so invalidate session. session.invalidate(); }); } } else if (transition.targetName === 'finishgauth') { - this.set('shouldSetupUserRole', false); + set(this, 'shouldSetupUserRole', false); } }.bind(this)); }, afterModel() { - this.controllerFor('navigation').set('allowSearch', false); + set(this.controllerFor('navigation'), 'allowSearch', false); $('#apploading').remove(); }, @@ -71,11 +110,21 @@ let ApplicationRoute = Route.extend(ApplicationRouteMixin, SetupUserRole, { }, sessionAuthenticated() { - if (this.get('shouldSetupUserRole') === true) { + if (get(this, 'shouldSetupUserRole') === true) { this.setupUserRole(); } - this._super(); + let session = get(this, 'session'); + let sessionData = session.get('data'); + let transitionAfterLogin = get(sessionData, TRANSITION_AFTER_LOGIN); + if (!isEmpty(transitionAfterLogin)) { + let sessionStore = session.get('store'); + set(sessionData, 'transitionAfterLogin', null); + sessionStore.persist(sessionData).then(() =>{ + this.transitionTo(transitionAfterLogin); + }); + } else { + this._super(); + } } - }); export default ApplicationRoute; diff --git a/app/utils/unauthorized-error.js b/app/utils/unauthorized-error.js new file mode 100644 index 0000000000..611a197fbe --- /dev/null +++ b/app/utils/unauthorized-error.js @@ -0,0 +1,11 @@ +import DS from 'ember-data'; + +const { AdapterError } = DS; + +let UnauthorizedError = function(errors, message = 'The adapter operation is unauthorized') { + AdapterError.call(this, errors, message); +}; + +UnauthorizedError.prototype = Object.create(AdapterError.prototype); + +export default UnauthorizedError; From 4f86031714a39b83c2ae1c1277581e28ae9ff3e7 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 30 Jan 2017 13:24:03 -0500 Subject: [PATCH 15/18] Automatically save appointment Save appointment automatically when dragged or resized on calendar view. --- app/appointments/calendar/controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/appointments/calendar/controller.js b/app/appointments/calendar/controller.js index 0fe72f5071..a9ba6ed23c 100644 --- a/app/appointments/calendar/controller.js +++ b/app/appointments/calendar/controller.js @@ -104,7 +104,9 @@ export default AppointmentIndexController.extend(AppointmentStatuses, VisitTypes let newStart = calendarEvent.start.local().toDate(); set(appointmentToUpdate, 'startDate', newStart); set(appointmentToUpdate, 'endDate', newEnd); - this.send('editAppointment', appointmentToUpdate); + appointmentToUpdate.save().catch((error) => { + this.send('error', error, 'appointments.calendar'); + }); } } }); From 535907402fcada5828da4e0a9af80bdfec94a6b9 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 30 Jan 2017 16:09:02 -0500 Subject: [PATCH 16/18] Added appointment test for calendar --- app/appointments/edit/template.hbs | 2 +- tests/acceptance/appointments-test.js | 50 ++++++++++++++++++++++----- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/app/appointments/edit/template.hbs b/app/appointments/edit/template.hbs index 355b72aff5..4c05523862 100644 --- a/app/appointments/edit/template.hbs +++ b/app/appointments/edit/template.hbs @@ -12,7 +12,7 @@ {{else}} {{date-time-picker datePickerClass="required test-appointment-date" label=(t 'labels.date') model=model}} {{/if}} - {{em-checkbox label=(t 'labels.allDay') property="allDay" class="col-sm-2"}} + {{em-checkbox label=(t 'labels.allDay') property="allDay" class="col-sm-2 appointment-all-day"}}
diff --git a/tests/acceptance/appointments-test.js b/tests/acceptance/appointments-test.js index 2f8e67f097..ca02aeb15e 100644 --- a/tests/acceptance/appointments-test.js +++ b/tests/acceptance/appointments-test.js @@ -3,6 +3,9 @@ import { module, test } from 'qunit'; import moment from 'moment'; import startApp from 'hospitalrun/tests/helpers/start-app'; +const DATE_TIME_FORMAT = 'l h:mm A'; +const TIME_FORMAT = 'h:mm'; + module('Acceptance | appointments', { beforeEach() { this.application = startApp(); @@ -33,7 +36,7 @@ test('visiting /appointments/missed', function(assert) { let today = moment(); let tomorrow = moment().add(1, 'days'); let status = 'Missed'; - createAppointment(today, tomorrow, status); + createAppointment(today, tomorrow, false, status); visit(url); andThen(function() { assert.equal(currentURL(), url); @@ -136,20 +139,51 @@ test('Delete an appointment', function(assert) { }); }); -function createAppointment(startDate = (new Date()), endDate = (moment().add(1, 'day').toDate()), status = 'Scheduled') { +test('Appointment calendar', function(assert) { + runWithPouchDump('appointments', function() { + authenticateUser(); + let later = moment().add(1, 'hours'); + let today = moment(); + let startTime = today.format(TIME_FORMAT); + let endTime = later.format(TIME_FORMAT); + let timeString = `${startTime} - ${endTime}`; + createAppointment(today, later, false); + + andThen(function() { + visit('/appointments/calendar'); + }); + + andThen(function() { + assert.equal(currentURL(), '/appointments/calendar'); + assert.equal(find('.view-current-title').text(), 'Appointments Calendar', 'Appoinment Calendar displays'); + assert.equal(find('.fc-content .fc-time').text(), timeString, 'Time appears in calendar'); + assert.equal(find('.fc-title').text(), 'Lennex ZinyandoDr Test', 'Appoinment displays in calendar'); + click('.fc-title'); + }); + + andThen(() => { + assert.equal(find('.view-current-title').text(), 'Edit Appointment', 'Edit Appointment displays'); + assert.equal(find('.test-appointment-start input').val(), today.format(DATE_TIME_FORMAT), 'Start date/time are correct'); + assert.equal(find('.test-appointment-end input').val(), later.format(DATE_TIME_FORMAT), 'End date/time are correct'); + }); + }); +}); + +function createAppointment(startDate = (new Date()), endDate = (moment().add(1, 'day').toDate()), allDay = true, status = 'Scheduled') { visit('/appointments/edit/new'); typeAheadFillIn('.test-patient-input', 'Lennex Zinyando - P00017'); select('.test-appointment-type', 'Admission'); select('.test-appointment-status', status); - waitToAppear('.test-appointment-start input'); - andThen(function() { + if (!allDay) { + click('.appointment-all-day input'); + fillIn('.test-appointment-start input', startDate.format(DATE_TIME_FORMAT)); + fillIn('.test-appointment-end input', endDate.format(DATE_TIME_FORMAT)); + } else { selectDate('.test-appointment-start input', startDate); - }); - andThen(function() { selectDate('.test-appointment-end input', endDate); - }); + } typeAheadFillIn('.test-appointment-location', 'Harare'); - fillIn('.test-appointment-with', 'Dr Test'); + typeAheadFillIn('.test-appointment-with', 'Dr Test'); click('button:contains(Add)'); waitToAppear('.table-header'); } From a7cffb2b4a6ca5b64778fe38381495c0d2471db9 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 30 Jan 2017 16:33:25 -0500 Subject: [PATCH 17/18] New build for testing - not ready for release --- ...lrun-137198a3580184ebded7ff16e29b1655.css} | 2 +- ...talrun-46e7b2466fc73d5406bd19252eed1865.js | 33 ----------- ...talrun-a0f93ae53bb6904aaa07ee0fe78a368b.js | 33 +++++++++++ ...endor-96c441829d74101d275b50c4f0792b13.css | 12 ++++ ...endor-ed8acd5f4063b4b83b5df16f6da9e8b0.css | 4 -- ...vendor-f370935dbd0f1d19b579a264273c07bc.js | 59 +++++++++++++++++++ ...vendor-fbb0a62b2ab75946f6a34fb066ad5d78.js | 51 ---------------- prod/index.html | 10 ++-- prod/manifest.appcache | 10 ++-- prod/service-worker.js | 10 ++-- 10 files changed, 120 insertions(+), 104 deletions(-) rename prod/assets/{hospitalrun-b0e09cdd6138878cb83c34961b0d81e0.css => hospitalrun-137198a3580184ebded7ff16e29b1655.css} (91%) delete mode 100644 prod/assets/hospitalrun-46e7b2466fc73d5406bd19252eed1865.js create mode 100644 prod/assets/hospitalrun-a0f93ae53bb6904aaa07ee0fe78a368b.js create mode 100644 prod/assets/vendor-96c441829d74101d275b50c4f0792b13.css delete mode 100644 prod/assets/vendor-ed8acd5f4063b4b83b5df16f6da9e8b0.css create mode 100644 prod/assets/vendor-f370935dbd0f1d19b579a264273c07bc.js delete mode 100644 prod/assets/vendor-fbb0a62b2ab75946f6a34fb066ad5d78.js diff --git a/prod/assets/hospitalrun-b0e09cdd6138878cb83c34961b0d81e0.css b/prod/assets/hospitalrun-137198a3580184ebded7ff16e29b1655.css similarity index 91% rename from prod/assets/hospitalrun-b0e09cdd6138878cb83c34961b0d81e0.css rename to prod/assets/hospitalrun-137198a3580184ebded7ff16e29b1655.css index b73019b67e..1020fd0318 100644 --- a/prod/assets/hospitalrun-b0e09cdd6138878cb83c34961b0d81e0.css +++ b/prod/assets/hospitalrun-137198a3580184ebded7ff16e29b1655.css @@ -3,4 +3,4 @@ * Bootstrap v3.1.1 (http://getbootstrap.com) * Copyright 2011-2014 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - *//*! normalize.css v3.0.0 | MIT License | git.io/normalize */button,select{text-transform:none}hr,img{border:0}a:focus,a:hover{color:#2a6496;text-decoration:underline}body,figure{margin:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.break-word,pre{word-wrap:break-word}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{color:#000;background:#ff0}sub{bottom:-.25em}sup{top:-.5em}img{vertical-align:middle}svg:not(:root){overflow:hidden}hr{height:0;-moz-box-sizing:content-box;box-sizing:content-box}.border-box,.col,.col-right{box-sizing:border-box}pre,textarea{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}.glyphicon,address,cite{font-style:normal}button{overflow:visible}.caps,.form-signin-heading,.form-signin-heading::first-letter,.initialism{text-transform:uppercase}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner{padding:0;border:0}input::-moz-focus-inner{padding:0;border:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}@media print{blockquote,img,pre,tr{page-break-inside:avoid}*{color:#000!important;text-shadow:none!important;background:0 0!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}.btn,.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-warning.active,.btn-warning:active,.btn.active,.btn:active,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover,.form-control,.navbar-toggle,.open .dropdown-toggle.btn-danger,.open .dropdown-toggle.btn-default,.open .dropdown-toggle.btn-info,.open .dropdown-toggle.btn-primary,.open .dropdown-toggle.btn-warning{background-image:none}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:transparent}body{font-family:lato-webfont,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#2f4358;background-color:#2e4359}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}select[multiple],select[size],textarea.form-control{height:auto}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#999}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}dt,label{font-weight:700}address,blockquote .small,blockquote footer,blockquote small,dd,dt,output,pre{line-height:1.42857143}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-muted{color:#999}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}pre code,table{background-color:transparent}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}dl,ol,ul{margin-top:0}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child,ol ol,ol ul,ul ol,ul ul{margin-bottom:0}address,dl{margin-bottom:20px}ol,ul{margin-bottom:10px}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.container{width:750px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;color:#999}legend,pre{display:block;color:#333}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}code,kbd{padding:2px 4px;font-size:90%}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}blockquote:after,blockquote:before{content:""}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{color:#c7254e;white-space:nowrap;background-color:#f9f2f4;border-radius:4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}pre{padding:9.5px;margin:0 0 10px;font-size:13px;word-break:break-all;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container,.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{max-width:100%}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th,.table>tr>td,.table>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th,.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:scroll;overflow-y:hidden;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset,legend{padding:0;border:0}fieldset{min-width:0;margin:0}legend{width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px}.checkbox,.form-control,.radio,input[type=file],output{display:block}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=range]{display:block;width:100%}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{padding-top:7px;font-size:14px;color:#555}.form-control{width:100%;padding:6px 12px;font-size:16px;line-height:2;color:#555;background-color:#fff;border-radius:3px;-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder,.form-control::-webkit-input-placeholder{color:#999}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .form-control-feedback,.has-success .help-block,.has-success .radio,.has-success .radio-inline{color:#3c763d}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}input[type=date]{line-height:34px}.form-group{margin-bottom:15px}.checkbox,.radio{min-height:20px;padding-left:20px;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{display:inline;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{float:left;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline[disabled],.checkbox[disabled],.radio-inline[disabled],.radio[disabled],fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.has-feedback .form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.collapsing,.dropdown,.glyphicon{position:relative}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .form-control-feedback,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .form-control-feedback,.has-error .help-block,.has-error .radio,.has-error .radio-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .checkbox,.form-inline .form-control,.form-inline .form-group,.form-inline .radio{display:inline-block;vertical-align:middle}.form-inline .control-label,.form-inline .form-group{margin-bottom:0;vertical-align:middle}.form-inline .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .checkbox,.form-inline .radio{padding-left:0;margin-top:0;margin-bottom:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{float:none;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{text-align:right}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.form-horizontal .form-control-static{padding-top:7px}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;border-radius:4px}.btn.active:focus,.btn:active:focus,.btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333}.btn-default.active,.btn-default:active,.btn-default:focus,.btn-default:hover,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;border:none}.btn-primary.active,.btn-primary:active,.btn-primary:focus,.btn-primary:hover{color:#fff}.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c}.btn-success.active,.btn-success:active,.btn-success:focus,.btn-success:hover,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success.active,.btn-success:active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de}.btn-info.active,.btn-info:active,.btn-info:focus,.btn-info:hover,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e}.btn-warning.active,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f}.btn-danger.active,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#428bca;cursor:pointer;border-radius:0;background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#999;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:3px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.caret,.glyphicon{display:inline-block}.collapsing{height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format("embedded-opentype"),url(../fonts/glyphicons-halflings-regular.woff) format("woff"),url(../fonts/glyphicons-halflings-regular.ttf) format("truetype"),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format("svg")}.glyphicon{top:1px;font-family:'Glyphicons Halflings';font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu-right,.dropdown-menu.pull-right{right:0;left:auto}.dropdown-header,.dropdown-menu>li>a{display:block;padding:3px 20px;line-height:1.42857143}.btn-group-vertical>.btn:not(:first-child):not(:last-child),.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{clear:both;font-weight:400;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#999}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-left{right:auto;left:0}.dropdown-header{font-size:12px;color:#999}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover,.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.nav-justified>.dropdown .dropdown-menu,.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn:focus,.btn-group>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn .caret,.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active{outline:0}.btn-group.open .dropdown-toggle{outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.pr0,.px0{padding-right:0}.btn-lg .caret{border-width:5px 5px 0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{display:block;width:100%;max-width:100%;float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group,.input-group-btn>.btn+.btn{margin-left:-1px}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle=buttons]>.btn>input[type=checkbox],[data-toggle=buttons]>.btn>input[type=radio]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.nav>li,.nav>li>a{display:block;position:relative}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none;font-size:16px}.nav>li>a{padding:10px 15px}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#999;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center;margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0;border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-justified>li,.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;margin-bottom:20px;border:1px solid transparent}.navbar-collapse{max-height:340px;padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar{border-radius:4px}.navbar-header{float:left}.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.carousel-inner,.hide,.media,.media-body,.modal-open,.overflow-hidden,.progress{overflow:hidden}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}.navbar-static-top{z-index:1000;border-width:0 0 1px}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.breadcrumb>li,.pagination{display:inline-block}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}.progress-striped .progress-bar,.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin:8px -15px}@media (min-width:768px){.navbar-form .checkbox,.navbar-form .form-control,.navbar-form .form-group,.navbar-form .radio{display:inline-block;vertical-align:middle}.navbar-form .control-label,.navbar-form .form-group{margin-bottom:0;vertical-align:middle}.navbar-form .input-group>.form-control{width:100%}.navbar-form .checkbox,.navbar-form .radio{padding-left:0;margin-top:0;margin-bottom:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{float:none;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.btn .badge,.btn .label{top:-1px;position:relative}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#999}.pagination{padding-left:0;margin:20px 0;border-radius:4px}.pager li,.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#428bca;text-decoration:none;background-color:#fff;border:1px solid #ddd}.badge,.label{font-weight:700;line-height:1;text-align:center;vertical-align:baseline;white-space:nowrap}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#999;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#999;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;color:#fff;border-radius:.25em}.label[href]:focus,.label[href]:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.label-default{background-color:#999}.label-default[href]:focus,.label-default[href]:hover{background-color:grey}.label-primary{background-color:#428bca}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;color:#fff;background-color:#999;border-radius:10px}.badge:empty{display:none}.media-object,.thumbnail{display:block}.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge{color:#428bca;background-color:#fff}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron{padding:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.alert,.thumbnail{margin-bottom:20px}.alert .alert-link,.close{font-weight:700}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert h4{margin-top:0;color:inherit}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.modal,.modal-backdrop{right:0;bottom:0;left:0}.alert-success{color:#3c763d;background-color:#dff0d8}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.close,.list-group-item>.badge{float:right}.progress-striped .progress-bar{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-striped .progress-bar-info,.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:focus,a.list-group-item.active:hover{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:focus .list-group-item-text,a.list-group-item.active:hover .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.panel-heading>.dropdown .dropdown-toggle,.panel-title,.panel-title>a{color:inherit}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.close{line-height:1}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px}.panel-title,.panel>.list-group,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel-body{padding:15px}.panel-heading{border-radius:3px}.panel-title{margin-top:0}.panel-footer{padding:10px 15px;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel-group .panel-heading,.panel>.list-group:last-child .list-group-item:last-child,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.list-group:last-child .list-group-item:last-child,.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel-group .panel-footer,.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;overflow:hidden;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{font-size:21px;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-content,.popover{background-clip:padding-box}.modal{position:fixed;top:0;z-index:1050;display:none;overflow:auto;overflow-y:scroll;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.carousel-control,.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.popover,.tooltip,.tooltip-arrow{position:absolute}.modal-footer{padding:19px 20px 20px;margin-top:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{z-index:1030;display:block;font-size:12px;line-height:1.4;visibility:visible;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow,.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;border-width:5px 5px 0;border-top-color:#000}.tooltip.top .tooltip-arrow{left:50%;margin-left:-5px}.tooltip.top-left .tooltip-arrow{left:5px}.tooltip.top-right .tooltip-arrow{right:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow,.tooltip.bottom-left .tooltip-arrow,.tooltip.bottom-right .tooltip-arrow{border-width:0 5px 5px;border-bottom-color:#000;top:0}.tooltip.bottom .tooltip-arrow{left:50%;margin-left:-5px}.tooltip.bottom-left .tooltip-arrow{left:5px}.tooltip.bottom-right .tooltip-arrow{right:5px}.popover{top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover-content{padding:9px 14px}.pl0,.px0{padding-left:0}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.carousel,.carousel-inner{position:relative}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.left>.arrow:after,.popover.right>.arrow:after{bottom:-10px;content:" "}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;border-right-width:0;border-left-color:#fff}.carousel-inner{width:100%}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5) 0),color-stop(rgba(0,0,0,.0001) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001) 0),color-stop(rgba(0,0,0,.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:transparent;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.alert-info,.carousel-caption .btn,.text-hide{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.hidden,.visible-lg,.visible-md,.visible-print,.visible-sm,.visible-xs{display:none!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;background-color:transparent;border:0}.hidden{visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}.hidden-lg{display:none!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}.hidden-print{display:none!important}}@font-face{font-family:lato-webfont;font-weight:400;font-style:normal;src:url(/fonts/lato-regular-webfont.eot);src:url(/fonts/lato-regular-webfont.eot?#iefix) format("embedded-opentype"),url(/fonts/lato-regular-webfont.woff) format("woff"),url(/fonts/lato-regular-webfont.ttf) format("truetype"),url(/fonts/lato-regular-webfont.svg#latoregular) format("svg")}@font-face{font-family:lato-webfont;font-weight:300;font-style:normal;src:url(/fonts/lato-light-webfont.eot);src:url(/fonts/lato-light-webfont.eot?#iefix) format("embedded-opentype"),url(/fonts/lato-light-webfont.woff) format("woff"),url(/fonts/lato-light-webfont.ttf) format("truetype"),url(/fonts/lato-light-webfont.svg#latolight) format("svg")}@font-face{font-family:lato-webfont;font-weight:100;font-style:normal;src:url(/fonts/lato-hairline-webfont.eot);src:url(/fonts/lato-hairline-webfont.eot?#iefix) format("embedded-opentype"),url(/fonts/lato-hairline-webfont.woff) format("woff"),url(/fonts/lato-hairline-webfont.ttf) format("truetype"),url(/fonts/lato-hairline-webfont.svg#latohairline) format("svg")}@font-face{font-family:lato-webfont;font-weight:700;font-style:normal;src:url(/fonts/lato-bold-webfont.eot);src:url(/fonts/lato-bold-webfont.eot?#iefix) format("embedded-opentype"),url(/fonts/lato-bold-webfont.woff) format("woff"),url(/fonts/lato-bold-webfont.ttf) format("truetype"),url(/fonts/lato-bold-webfont.svg#latobold) format("svg")}@font-face{font-family:lato-webfont;font-weight:900;font-style:normal;src:url(/fonts/lato-black-webfont.eot);src:url(/fonts/lato-black-webfont.eot?#iefix) format("embedded-opentype"),url(/fonts/lato-black-webfont.woff) format("woff"),url(/fonts/lato-black-webfont.ttf) format("truetype"),url(/fonts/lato-black-webfont.svg#latoblack) format("svg")}body{background:#eff2f5}body.ember-application{padding-left:275px}.clickable{cursor:pointer}.modal-dialog{color:#2e4359}.not-editable{opacity:.5;background-color:rgba(217,217,217,.5);cursor:default}.view-top-bar{margin:0;border-bottom:1px solid #d2dae3;background:#fff;padding:0 15px;height:55px}.view-current-title{float:left;margin:0;line-height:55px;letter-spacing:-1px;color:#2f4358;font-size:28px;font-weight:600}.panel-primary{position:relative;border:0;background-color:#fff;color:#2f4358}.panel-primary input,.panel-primary select,.panel-primary textarea{background:rgba(219,235,255,.2)}.panel-default{border:0;border-radius:0;background-color:transparent}.panel-default>.panel-heading{border:0;border-radius:0;background-color:transparent;padding:0;color:#2e4359}.panel-heading{background-color:#e9f3ff;padding:10px 15px;color:#2e4359}.detail-section-content{padding:15px 0}.pb0,.py0{padding-bottom:0}.detail-section-content .table{margin-top:-15px}.table-header>th{border-top:0;font-weight:300}.print-section{display:none}@media print{*{background-color:#fff;color:#000;font-size:14px}.panel-default,.panel-primary{position:absolute;left:0;margin:0 5%;width:90%}.print-section{display:block;text-align:center}.btn,.nav,.panel-footer,.view-current-title{display:none}.patient-history-heading{border-bottom:1px solid #000}}.ml0,.mx0{margin-left:0}.mr0,.mx0{margin-right:0}.mt0,.my0{margin-top:0}.mb0,.my0{margin-bottom:0}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.border{border-style:solid;border-width:var(--border-width)}.border-top{border-top-style:solid;border-top-width:var(--border-width)}.border-right{border-right-style:solid;border-right-width:var(--border-width)}.border-bottom{border-bottom-style:solid;border-bottom-width:var(--border-width)}.border-left{border-left-style:solid;border-left-width:var(--border-width)}.border-none{border:0}.rounded{border-radius:var(--border-radius)}.circle{border-radius:50%}.rounded-top{border-radius:var(--border-radius) var(--border-radius) 0 0}.rounded-right{border-radius:0 var(--border-radius) var(--border-radius) 0}.rounded-bottom{border-radius:0 0 var(--border-radius) var(--border-radius)}.rounded-left{border-radius:var(--border-radius) 0 0 var(--border-radius)}.not-rounded{border-radius:0}:root{--border-width:1px;--border-radius:3px;--width-1:24rem;--width-2:32rem;--width-3:48rem;--width-4:64rem;--space-1:.5rem;--space-2:1rem;--space-3:2rem;--space-4:4rem;--z1:1;--z2:2;--z3:3;--z4:4;--h1:2rem;--h2:1.5rem;--h3:1.25rem;--h4:1rem;--h5:.875rem;--h6:.75rem;--line-height-1:1;--line-height-2:1.125;--line-height-3:1.25;--line-height-4:1.5;--letter-spacing:1;--caps-letter-spacing:.2em;--bold-font-weight:bold}.flex{display:flex}.flex-column{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-baseline{align-self:baseline}.self-stretch{align-self:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-center{align-content:center}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-stretch{align-content:stretch}.flex-auto{flex:1 1 auto;min-width:0;min-height:0}.flex-none{flex:none}.order-0{order:0}.order-1{order:1}.order-2{order:2}.order-3{order:3}.order-last{order:99999}@custom-media --breakpoint-sm (min-width: 40em);@custom-media --breakpoint-md (min-width: 52em);@custom-media --breakpoint-lg (min-width: 64em);.col{float:left}.col-right{float:right}.col-1{width:calc(1/12 * 100%)}.col-2{width:calc(2/12 * 100%)}.col-3{width:calc(3/12 * 100%)}.col-4{width:calc(4/12 * 100%)}.col-5{width:calc(5/12 * 100%)}.col-6{width:calc(6/12 * 100%)}.col-7{width:calc(7/12 * 100%)}.col-8{width:calc(8/12 * 100%)}.col-9{width:calc(9/12 * 100%)}.col-10{width:calc(10/12 * 100%)}.col-11{width:calc(11/12 * 100%)}.col-12{width:100%}@media (--breakpoint-sm){.sm-flex{display:flex}.sm-col,.sm-col-right{box-sizing:border-box}.sm-col{float:left}.sm-col-right{float:right}.sm-col-1{width:calc(1/12 * 100%)}.sm-col-2{width:calc(2/12 * 100%)}.sm-col-3{width:calc(3/12 * 100%)}.sm-col-4{width:calc(4/12 * 100%)}.sm-col-5{width:calc(5/12 * 100%)}.sm-col-6{width:calc(6/12 * 100%)}.sm-col-7{width:calc(7/12 * 100%)}.sm-col-8{width:calc(8/12 * 100%)}.sm-col-9{width:calc(9/12 * 100%)}.sm-col-10{width:calc(10/12 * 100%)}.sm-col-11{width:calc(11/12 * 100%)}.sm-col-12{width:100%}}@media (--breakpoint-md){.md-flex{display:flex}.md-col,.md-col-right{box-sizing:border-box}.md-col{float:left}.md-col-right{float:right}.md-col-1{width:calc(1/12 * 100%)}.md-col-2{width:calc(2/12 * 100%)}.md-col-3{width:calc(3/12 * 100%)}.md-col-4{width:calc(4/12 * 100%)}.md-col-5{width:calc(5/12 * 100%)}.md-col-6{width:calc(6/12 * 100%)}.md-col-7{width:calc(7/12 * 100%)}.md-col-8{width:calc(8/12 * 100%)}.md-col-9{width:calc(9/12 * 100%)}.md-col-10{width:calc(10/12 * 100%)}.md-col-11{width:calc(11/12 * 100%)}.md-col-12{width:100%}}@media (--breakpoint-lg){.lg-flex{display:flex}.lg-col,.lg-col-right{box-sizing:border-box}.lg-col{float:left}.lg-col-right{float:right}.lg-col-1{width:calc(1/12 * 100%)}.lg-col-2{width:calc(2/12 * 100%)}.lg-col-3{width:calc(3/12 * 100%)}.lg-col-4{width:calc(4/12 * 100%)}.lg-col-5{width:calc(5/12 * 100%)}.lg-col-6{width:calc(6/12 * 100%)}.lg-col-7{width:calc(7/12 * 100%)}.lg-col-8{width:calc(8/12 * 100%)}.lg-col-9{width:calc(9/12 * 100%)}.lg-col-10{width:calc(10/12 * 100%)}.lg-col-11{width:calc(11/12 * 100%)}.lg-col-12{width:100%}.lg-hide{display:none!important}}@custom-media --breakpoint-sm (min-width: 40em);@custom-media --breakpoint-md (min-width: 52em);@custom-media --breakpoint-lg (min-width: 64em);.hide{position:absolute!important;height:1px;width:1px;clip:rect(1px,1px,1px,1px)}@media (--breakpoint-xs){.xs-hide{display:none!important}}@media (--breakpoint-sm-md){.sm-hide{display:none!important}}@media (--breakpoint-md-lg){.md-hide{display:none!important}}.display-none{display:none!important}@custom-media --breakpoint-xs (max-width: 40em);@custom-media --breakpoint-sm-md (min-width: 40em) and (max-width: 52em);@custom-media --breakpoint-md-lg (min-width: 52em) and (max-width: 64em);@custom-media --breakpoint-lg (min-width: 64em);.inline{display:inline}.block{display:block}.inline-block{display:inline-block}.table{display:table}.table-cell{display:table-cell}.overflow-scroll{overflow:scroll}.overflow-auto{overflow:auto}.clearfix:after,.clearfix:before{content:" ";display:table}.clearfix:after{clear:both}.left{float:left}.btn.align-right,.right{float:right}.fit{max-width:100%}.max-width-1{max-width:var(--width-1)}.max-width-2{max-width:var(--width-2)}.max-width-3{max-width:var(--width-3)}.max-width-4{max-width:var(--width-4)}.m0{margin:0}.ml1,.mx1{margin-left:var(--space-1)}.mr1,.mx1{margin-right:var(--space-1)}.mt1,.my1{margin-top:var(--space-1)}.mb1,.my1{margin-bottom:var(--space-1)}.m1{margin:var(--space-1)}.ml2,.mx2{margin-left:var(--space-2)}.mr2,.mx2{margin-right:var(--space-2)}.mt2,.my2{margin-top:var(--space-2)}.mb2,.my2{margin-bottom:var(--space-2)}.m2{margin:var(--space-2)}.ml3,.mx3{margin-left:var(--space-3)}.mr3,.mx3{margin-right:var(--space-3)}.mt3,.my3{margin-top:var(--space-3)}.mb3,.my3{margin-bottom:var(--space-3)}.m3{margin:var(--space-3)}.ml4,.mx4{margin-left:var(--space-4)}.mr4,.mx4{margin-right:var(--space-4)}.mt4,.my4{margin-top:var(--space-4)}.mb4,.my4{margin-bottom:var(--space-4)}.m4{margin:var(--space-4)}.mxn1{margin-left:-var(--space-1);margin-right:-var(--space-1)}.mxn2{margin-left:-var(--space-2);margin-right:-var(--space-2)}.mxn3{margin-left:-var(--space-3);margin-right:-var(--space-3)}.mxn4{margin-left:-var(--space-4);margin-right:-var(--space-4)}.ml-auto,.mx-auto{margin-left:auto}.mr-auto,.mx-auto{margin-right:auto}.p0{padding:0}.pt0{padding-top:0}.pl1,.px1{padding-left:var(--space-1)}.pr1,.px1{padding-right:var(--space-1)}.py0{padding-top:0}.pt1,.py1{padding-top:var(--space-1)}.pb1,.py1{padding-bottom:var(--space-1)}.p1{padding:var(--space-1)}.pt2,.py2{padding-top:var(--space-2)}.pb2,.py2{padding-bottom:var(--space-2)}.pl2,.px2{padding-left:var(--space-2)}.pr2,.px2{padding-right:var(--space-2)}.p2{padding:var(--space-2)}.pt3,.py3{padding-top:var(--space-3)}.pb3,.py3{padding-bottom:var(--space-3)}.pl3,.px3{padding-left:var(--space-3)}.pr3,.px3{padding-right:var(--space-3)}.p3{padding:var(--space-3)}.pt4,.py4{padding-top:var(--space-4)}.pb4,.py4{padding-bottom:var(--space-4)}.pl4,.px4{padding-left:var(--space-4)}.pr4,.px4{padding-right:var(--space-4)}.p4{padding:var(--space-4)}.relative{position:relative}.absolute{position:absolute}.fixed{position:fixed}.top-0{top:0}.right-0{right:0}.bottom-0{bottom:0}.left-0{left:0}.z1{z-index:var(--z1)}.z2{z-index:var(--z2)}.z3{z-index:var(--z3)}.z4{z-index:var(--z4)}.h1{font-size:var(--h1)}.h2{font-size:var(--h2)}.h3{font-size:var(--h3)}.h4{font-size:var(--h4)}.h5{font-size:var(--h5)}.h6{font-size:var(--h6)}.font-family-inherit{font-family:inherit}.font-size-inherit{font-size:inherit}.text-decoration-none{text-decoration:none}.bold{font-weight:var(--bold-font-weight,bold)}.regular{font-weight:400}.italic{font-style:italic}.caps{letter-spacing:var(--caps-letter-spacing)}.left-align{text-align:left}.center{text-align:center}.right-align{text-align:right}.justify{text-align:justify}.nowrap{white-space:nowrap}.line-height-1{line-height:var(--line-height-1)}.line-height-2{line-height:var(--line-height-2)}.line-height-3{line-height:var(--line-height-3)}.line-height-4{line-height:var(--line-height-4)}.list-style-none{list-style:none}.underline{text-decoration:underline}.truncate{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.list-reset{list-style:none;padding-left:0}.alert{border:0;border-radius:3px;padding:12px}.alert-success{border-color:#b2dba1;background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);background-repeat:repeat-x}.alert-info{border:0;box-shadow:none;background:#ffffe4;color:rgba(83,83,75,.7)}.alert-warning,.btn-danger,.btn-info,.btn-success,.btn-warning,.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-repeat:repeat-x}.alert-warning{border-color:#f5e79e;background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%)}.alert-danger{background-color:rgba(255,109,111,.3);color:#c3124e}.btn.on-white{background-color:#dbebff;color:#2e4359}.btn.warning{background-color:rgba(255,109,111,.3);color:#ff6d6f}.btn.warning:focus,.btn.warning:hover{background-color:#ff6d6f;color:#fff}.btn.neutral{background-color:#d9d9d9;color:rgba(46,67,89,.65)}.btn.neutral:focus,.btn.neutral:hover{opacity:.8}.btn.admit{width:103px}.btn .octicon{position:relative;left:-3px}.btn.align-left{float:left}.btn-default{border:0;border-radius:3px;background-color:#00bd9c}.btn-default:focus,.btn-default:hover{background-color:#13d8b6}.btn-primary{background-color:#00bd9c}.btn-primary:focus,.btn-primary:hover{background-color:#00c4a2}.btn-primary.active,.btn-primary:active{background-color:#00cca8}.btn-primary.disabled-btn,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover{opacity:.7;background-color:#00bd9c;color:#fff}.sidebar-nav-logo:focus,.sidebar-nav-logo:hover,.sidebar-nav-search .btn:hover{opacity:.8}.btn-success{border-color:#3e8f3e;background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%)}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{border-color:#3e8f3e;background-color:#419641}.btn-info{border-color:#28a4c9;background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%)}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{border-color:#28a4c9;background-color:#2aabd2}.btn-warning{border-color:#e38d13;background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%)}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{border-color:#e38d13;background-color:#eb9316}.btn-danger{border-color:#b92c28;background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%)}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{border-color:#b92c28;background-color:#c12e2a}.glyphicon-refresh-animate{-webkit-animation:spin2 .7s infinite linear;animation:spin .7s infinite linear}@-webkit-keyframes spin2{from{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(360deg)}}@keyframes spin{from{transform:scale(1) rotate(0)}to{transform:scale(1) rotate(360deg)}}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#357ebd;background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x}.form-input-group{display:block;margin-bottom:15px}.form-input-group select{height:44px}.checkbox-label-space{top:25px}.required .control-label::after{color:#ff6d6f;content:'*'}.input-group-addon{border:0;background-color:#fff}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{margin-left:-18px}.form-control{border:1px solid #dee2e7}.container label{font-weight:300}.notes{max-width:300px}.loading-notice{position:absolute;top:0;right:0;bottom:0;z-index:99;margin:0 auto;width:calc(100% - 275px);height:100%;text-align:center}.loading-notice .wrapper{position:relative;top:50%;transform:translateY(-50%);margin:0 auto;border-radius:10px;background-color:#dde5ee;padding:20px;width:140px}.loading-notice.apploading{left:0;width:100%}.loading-notice .loading-text{margin-bottom:0;text-transform:uppercase;letter-spacing:2px;color:#263648;font-weight:300}.loading-notice .spinner{margin:0 auto 10px;width:50px;height:40px;text-align:center;font-size:10px}.loading-notice .spinner>div{display:inline-block;-webkit-animation:stretchdelay 1.2s infinite ease-in-out;animation:stretchdelay 1.2s infinite ease-in-out;margin-left:3px;border-radius:50px;background-color:#00bd9c;width:6px;height:100%}.loading-notice .spinner>div:first-child{margin-left:0}.loading-notice .spinner .rect2{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.loading-notice .spinner .rect3{-webkit-animation-delay:-1s;animation-delay:-1s}.loading-notice .spinner .rect4{-webkit-animation-delay:-.9s;animation-delay:-.9s}.loading-notice .spinner .rect5{-webkit-animation-delay:-.8s;animation-delay:-.8s}@-webkit-keyframes stretchdelay{0%,100%,40%{-webkit-transform:scaleY(.4)}20%{-webkit-transform:scaleY(1)}}@keyframes stretchdelay{0%,100%,40%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}20%{-webkit-transform:scaleY(1);transform:scaleY(1)}}.paging-buttons{position:absolute;top:3px;right:3px}.panel-heading .view-sub-bar{padding:0 15px}.panel-heading .view-sub-nav{margin:0}.panel-heading .view-action-buttons{float:right}.panel-heading .view-action-buttons .btn{margin:10px 0 10px 15px;border:1px solid #00bd9c;background-color:transparent;color:#00bd9c;font-size:14px}.panel-heading .view-action-buttons .btn:focus,.panel-heading .view-action-buttons .btn:hover{background-color:#00bd9c;color:#fff}.panel-heading .nav-pills{margin:0}.panel-heading .nav-pills li{margin-left:40px;line-height:58px;font-size:18px}.panel-heading .nav-pills li:first-of-type{margin-left:0}.panel-heading .nav-pills li.active>a{background-color:transparent;color:#2f4358;font-weight:600}.panel-heading .nav-pills a{padding:0;color:#6784a2}.panel-heading .nav-pills a:hover{background-color:transparent!important;color:#2f4358}.panel-title{font-size:24px}.panel-footer{background-color:#fff;text-align:right}.patient-history-item{margin:15px 0;border-radius:5px;background:rgba(239,242,245,.5);padding:5px 15px 15px}.patient-history-item .ph-note-item{margin-top:15px;font-weight:300}.patient-history-item .ph-note-heading{font-size:16px;font-weight:600}.patient-history-heading{margin:-5px -15px 10px;border-radius:5px 5px 0 0;background:#eff2f5;padding:5px 15px;font-size:18px}.patient-history-heading .ph-visit-date{display:inline-block;margin:-5px 10px -5px -15px;border-radius:5px 0 0;background:#dee2e7;padding:5px 15px;line-height:26px;font-size:16px;font-weight:600}.patient-history-heading .ph-visit-type{display:inline-block;font-weight:300}.patient-summary{position:relative;border-bottom:2px solid #eff2f5;padding-bottom:15px}.patient-summary .ps-info-group{margin-bottom:5px}.patient-summary .ps-info-group.patient-id{position:absolute;top:-10px;right:-10px;border-radius:3px;background:rgba(239,242,245,.7);padding:10px 20px;text-align:center}.progress,.progress-bar,.progress-bar-danger,.progress-bar-info,.progress-bar-success,.progress-bar-warning{background-repeat:repeat-x}.patient-summary .ps-info-group.patient-id .ps-info-label{margin-right:5px;margin-bottom:0;width:auto;text-align:right}.patient-summary .ps-info-group.patient-id .ps-info-data{font-size:22px;font-weight:300}.patient-summary .ps-info-group.patient-name .ps-info-data{font-size:22px;font-weight:600}.patient-summary .ps-info-group.long-form{float:left;padding-right:15px;width:50%}.patient-summary .ps-info-label{margin-right:10px;width:40px;font-size:16px;font-weight:400}.patient-summary .ps-info-data-block,.sidebar-nav{font-weight:300}.patient-summary .ps-info-label.wide{width:auto}.patient-summary .ps-info-data{color:#2f4358;font-size:16px;font-weight:300}.progress{background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%)}.progress-bar{background-image:linear-gradient(to bottom,#428bca 0,#3071a9 100%)}.progress-bar-success{background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%)}.progress-bar-info{background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%)}.progress-bar-warning{background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%)}.progress-bar-danger{background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%)}.sidebar-nav{display:block;position:fixed;top:0;bottom:0;left:0;z-index:1;box-shadow:1px 0 0 #1e2c3a;background-color:#263648;width:275px;color:#fff}.sidebar-nav .mega-octicon{text-align:center;color:#92a7bc;font-size:16px}.scroll-container{position:absolute;top:55px;left:0;width:100%;height:calc(100% - 55px);overflow:auto}.sidebar-nav-header{position:absolute;top:0;left:0;border-bottom:1px solid #1e2c3a;background-color:#2f4358;width:100%;height:55px}.sidebar-nav-logo{transition:opacity .2s ease;display:inline-block;padding:0 15px;height:55px}.sidebar-nav-logo .logo-svg{position:relative;top:15px;width:150px}.settings-trigger{float:right;padding:15px}.settings-trigger.active .mega-octicon{color:#00bd9c}.settings-nav{position:absolute;top:48px;right:10px;z-index:10;border-radius:5px;background-color:#eff2f5;min-width:130px}.settings-nav::before{display:block;position:absolute;top:-7px;right:10px;border-right:5px solid transparent;border-bottom:7px solid #eff2f5;border-left:5px solid transparent;content:' '}.settings-nav>a{display:block;border-top:1px solid #dee2e7;padding:6px 10px;color:#3a4d63;font-size:14px;font-weight:400}.settings-nav>a:first-of-type{border-top:0}.sidebar-nav-search{border-bottom:1px solid #1e2c3a;padding:10px 15px;height:58px}.sidebar-nav-search .form-group{float:left;margin-bottom:0}.sidebar-nav-search input{border:0;border-radius:5px 0 0 5px;background-color:#546a83;padding:6px 12px;width:198px;height:38px;color:#2e4359;font-size:18px;font-weight:300}.sidebar-nav-search input::-webkit-input-placeholder{color:#92a7bc}.sidebar-nav-search input:focus{background-color:#fff}.sidebar-nav-search .btn{transition:opacity .2s ease;position:absolute;top:10px;right:15px;border-radius:0 5px 5px 0;background-color:#92a7bc;width:46px;height:38px;text-shadow:none;color:#d2dae3;font-size:18px}.sidebar-nav-search .btn .glyphicon{top:2px;right:1px}.primary-nav-item a:focus,.primary-nav-item a:hover,.primary-nav-item a:visited{text-decoration:none}.primary-nav-item .primary-section-link{transition:all .2s ease;display:block;border-bottom:1px solid #1e2c3a;background:#2f4358;padding:0 15px;height:48px;line-height:48px;color:#fff;font-size:18px}.primary-nav-item .primary-section-link .mega-octicon{transition:all .2s ease;float:left;margin-right:12px;width:16px;line-height:48px}.primary-nav-item .primary-section-link.active,.primary-nav-item .primary-section-link:hover{background:#546a83}.primary-nav-item .primary-section-link.active .mega-octicon,.primary-nav-item .primary-section-link:hover .mega-octicon{color:#fff}.primary-nav-item .category-sub-items{border-bottom:1px solid #1e2c3a;background:#3a4d63}.primary-nav-item .category-sub-item{transition:all .2s ease;display:block;background:#3a4d63;padding:0 15px;height:36px;line-height:36px;color:#c2d2e3;font-size:15px}.primary-nav-item .category-sub-item:hover{background:#546a83;color:#fff}.primary-nav-item .category-sub-item:hover .octicon{margin-right:2px;margin-left:10px;color:#fff}.primary-nav-item .category-sub-item .octicon{transition:all .2s ease;float:left;margin-right:6px;margin-left:6px;width:16px;line-height:36px}.tt-menu,.twitter-typeahead{width:100%}.primary-nav-item .nav-link{font-weight:300}.tab-pane .panel-heading{background-color:transparent;padding:10px 0}.tab-pane .panel-title{font-size:20px}.nav-pills{margin:0}.nav-pills li{margin-left:40px;line-height:58px;font-size:18px}.nav-pills li:first-of-type{margin-left:0}.nav-pills li.active>a{background-color:transparent;color:#2f4358;font-weight:600}.nav-pills a{padding:0;color:#6784a2}.nav-pills a:focus,.nav-pills a:hover{background-color:transparent;text-decoration:none;color:#2f4358}.nav-pills.tab-nav{border-bottom:2px solid #eff2f5}.nav-pills.tab-nav li{margin-left:0;line-height:26px;font-size:16px}.nav-pills.tab-nav li.active a,.nav-pills.tab-nav li:focus a,.nav-pills.tab-nav li:hover a{margin-bottom:-2px;border-bottom:2px solid #6784a2}.tt-menu .query-results,.twitter-typeahead .tt-hint,.twitter-typeahead .tt-query{margin-bottom:0}.table-header{background-color:#d2dae3;color:rgba(38,54,72,.7)}.table-header .sortable-column{cursor:pointer}.table-header .sortable-column .inactive{color:rgba(38,54,72,.3)}.tt-menu{border:1px solid rgba(0,0,0,.1);border-radius:0 0 3px 3px;box-shadow:0 3px 5px rgba(0,0,0,.1);background-clip:padding-box;background-color:#fff;padding:5px 0;min-width:160px;max-height:110px;overflow-y:scroll;overflow-x:none}.tt-suggestion{display:block;padding:3px 12px}.tt-suggestion.tt-is-under-cursor{background-color:#0081c2;background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;color:#fff}.tt-suggestion.tt-is-under-cursor a{color:#fff}.tt-suggestion p{margin:0}.scrollable-typeahead .tt-menu{max-height:200px;overflow-y:auto}.signin-logo{margin:40px auto;max-width:200px}.form-signin{position:absolute;top:0;left:50%;transform:translate(-50%,0);margin:0 auto;max-width:300px}.form-signin .alert{margin-bottom:15px}.form-signin input{background:#fff}.signin-contents{border-radius:10px;background:#dde5ee;padding:20px;width:300px}.form-signin-heading{margin:0 0 20px;text-align:center;letter-spacing:2px;color:#263648;font-size:24px;font-weight:300} \ No newline at end of file + *//*! normalize.css v3.0.0 | MIT License | git.io/normalize */button,select{text-transform:none}hr,img{border:0}a:focus,a:hover{color:#2a6496;text-decoration:underline}body,figure{margin:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.break-word,pre{word-wrap:break-word}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{color:#000;background:#ff0}sub{bottom:-.25em}sup{top:-.5em}img{vertical-align:middle}svg:not(:root){overflow:hidden}hr{height:0;-moz-box-sizing:content-box;box-sizing:content-box}.border-box,.col,.col-right{box-sizing:border-box}pre,textarea{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}.glyphicon,address,cite{font-style:normal}button{overflow:visible}.caps,.form-signin-heading,.form-signin-heading::first-letter,.initialism{text-transform:uppercase}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner{padding:0;border:0}input::-moz-focus-inner{padding:0;border:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}@media print{blockquote,img,pre,tr{page-break-inside:avoid}*{color:#000!important;text-shadow:none!important;background:0 0!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}.btn,.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-warning.active,.btn-warning:active,.btn.active,.btn:active,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover,.form-control,.navbar-toggle,.open .dropdown-toggle.btn-danger,.open .dropdown-toggle.btn-default,.open .dropdown-toggle.btn-info,.open .dropdown-toggle.btn-primary,.open .dropdown-toggle.btn-warning{background-image:none}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:transparent}body{font-family:lato-webfont,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#2f4358;background-color:#2e4359}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}select[multiple],select[size],textarea.form-control{height:auto}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#999}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}dt,label{font-weight:700}address,blockquote .small,blockquote footer,blockquote small,dd,dt,output,pre{line-height:1.42857143}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-muted{color:#999}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}pre code,table{background-color:transparent}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}dl,ol,ul{margin-top:0}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child,ol ol,ol ul,ul ol,ul ul{margin-bottom:0}address,dl{margin-bottom:20px}ol,ul{margin-bottom:10px}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.container{width:750px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;color:#999}legend,pre{display:block;color:#333}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}code,kbd{padding:2px 4px;font-size:90%}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}blockquote:after,blockquote:before{content:""}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{color:#c7254e;white-space:nowrap;background-color:#f9f2f4;border-radius:4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}pre{padding:9.5px;margin:0 0 10px;font-size:13px;word-break:break-all;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container,.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{max-width:100%}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th,.table>tr>td,.table>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th,.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:scroll;overflow-y:hidden;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset,legend{padding:0;border:0}fieldset{min-width:0;margin:0}legend{width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px}.checkbox,.form-control,.radio,input[type=file],output{display:block}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=range]{display:block;width:100%}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{padding-top:7px;font-size:14px;color:#555}.form-control{width:100%;padding:6px 12px;font-size:16px;line-height:2;color:#555;background-color:#fff;border-radius:3px;-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder,.form-control::-webkit-input-placeholder{color:#999}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .form-control-feedback,.has-success .help-block,.has-success .radio,.has-success .radio-inline{color:#3c763d}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}input[type=date]{line-height:34px}.form-group{margin-bottom:15px}.checkbox,.radio{min-height:20px;padding-left:20px;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{display:inline;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{float:left;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline[disabled],.checkbox[disabled],.radio-inline[disabled],.radio[disabled],fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.has-feedback .form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.collapsing,.dropdown,.glyphicon{position:relative}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .form-control-feedback,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .form-control-feedback,.has-error .help-block,.has-error .radio,.has-error .radio-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .checkbox,.form-inline .form-control,.form-inline .form-group,.form-inline .radio{display:inline-block;vertical-align:middle}.form-inline .control-label,.form-inline .form-group{margin-bottom:0;vertical-align:middle}.form-inline .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .checkbox,.form-inline .radio{padding-left:0;margin-top:0;margin-bottom:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{float:none;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{text-align:right}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.form-horizontal .form-control-static{padding-top:7px}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;border-radius:4px}.btn.active:focus,.btn:active:focus,.btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333}.btn-default.active,.btn-default:active,.btn-default:focus,.btn-default:hover,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;border:none}.btn-primary.active,.btn-primary:active,.btn-primary:focus,.btn-primary:hover{color:#fff}.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c}.btn-success.active,.btn-success:active,.btn-success:focus,.btn-success:hover,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success.active,.btn-success:active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de}.btn-info.active,.btn-info:active,.btn-info:focus,.btn-info:hover,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e}.btn-warning.active,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f}.btn-danger.active,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#428bca;cursor:pointer;border-radius:0;background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#999;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:3px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.caret,.glyphicon{display:inline-block}.collapsing{height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format("embedded-opentype"),url(../fonts/glyphicons-halflings-regular.woff) format("woff"),url(../fonts/glyphicons-halflings-regular.ttf) format("truetype"),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format("svg")}.glyphicon{top:1px;font-family:'Glyphicons Halflings';font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu-right,.dropdown-menu.pull-right{right:0;left:auto}.dropdown-header,.dropdown-menu>li>a{display:block;padding:3px 20px;line-height:1.42857143}.btn-group-vertical>.btn:not(:first-child):not(:last-child),.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{clear:both;font-weight:400;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#999}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-left{right:auto;left:0}.dropdown-header{font-size:12px;color:#999}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover,.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.nav-justified>.dropdown .dropdown-menu,.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn:focus,.btn-group>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn .caret,.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active{outline:0}.btn-group.open .dropdown-toggle{outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.pr0,.px0{padding-right:0}.btn-lg .caret{border-width:5px 5px 0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{display:block;width:100%;max-width:100%;float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group,.input-group-btn>.btn+.btn{margin-left:-1px}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle=buttons]>.btn>input[type=checkbox],[data-toggle=buttons]>.btn>input[type=radio]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.nav>li,.nav>li>a{display:block;position:relative}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none;font-size:16px}.nav>li>a{padding:10px 15px}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#999;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center;margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0;border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-justified>li,.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;margin-bottom:20px;border:1px solid transparent}.navbar-collapse{max-height:340px;padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar{border-radius:4px}.navbar-header{float:left}.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.carousel-inner,.hide,.media,.media-body,.modal-open,.overflow-hidden,.progress{overflow:hidden}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}.navbar-static-top{z-index:1000;border-width:0 0 1px}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.breadcrumb>li,.pagination{display:inline-block}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}.progress-striped .progress-bar,.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin:8px -15px}@media (min-width:768px){.navbar-form .checkbox,.navbar-form .form-control,.navbar-form .form-group,.navbar-form .radio{display:inline-block;vertical-align:middle}.navbar-form .control-label,.navbar-form .form-group{margin-bottom:0;vertical-align:middle}.navbar-form .input-group>.form-control{width:100%}.navbar-form .checkbox,.navbar-form .radio{padding-left:0;margin-top:0;margin-bottom:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{float:none;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.btn .badge,.btn .label{top:-1px;position:relative}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#999}.pagination{padding-left:0;margin:20px 0;border-radius:4px}.pager li,.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#428bca;text-decoration:none;background-color:#fff;border:1px solid #ddd}.badge,.label{font-weight:700;line-height:1;text-align:center;vertical-align:baseline;white-space:nowrap}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#999;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#999;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;color:#fff;border-radius:.25em}.label[href]:focus,.label[href]:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.label-default{background-color:#999}.label-default[href]:focus,.label-default[href]:hover{background-color:grey}.label-primary{background-color:#428bca}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;color:#fff;background-color:#999;border-radius:10px}.badge:empty{display:none}.media-object,.thumbnail{display:block}.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge{color:#428bca;background-color:#fff}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron{padding:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.alert,.thumbnail{margin-bottom:20px}.alert .alert-link,.close{font-weight:700}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert h4{margin-top:0;color:inherit}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.modal,.modal-backdrop{right:0;bottom:0;left:0}.alert-success{color:#3c763d;background-color:#dff0d8}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.close,.list-group-item>.badge{float:right}.progress-striped .progress-bar{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-striped .progress-bar-info,.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:focus,a.list-group-item.active:hover{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:focus .list-group-item-text,a.list-group-item.active:hover .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.panel-heading>.dropdown .dropdown-toggle,.panel-title,.panel-title>a{color:inherit}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.close{line-height:1}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px}.panel-title,.panel>.list-group,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel-body{padding:15px}.panel-heading{border-radius:3px}.panel-title{margin-top:0}.panel-footer{padding:10px 15px;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel-group .panel-heading,.panel>.list-group:last-child .list-group-item:last-child,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.list-group:last-child .list-group-item:last-child,.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel-group .panel-footer,.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;overflow:hidden;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{font-size:21px;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-content,.popover{background-clip:padding-box}.modal{position:fixed;top:0;z-index:1050;display:none;overflow:auto;overflow-y:scroll;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.carousel-control,.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.popover,.tooltip,.tooltip-arrow{position:absolute}.modal-footer{padding:19px 20px 20px;margin-top:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{z-index:1030;display:block;font-size:12px;line-height:1.4;visibility:visible;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow,.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;border-width:5px 5px 0;border-top-color:#000}.tooltip.top .tooltip-arrow{left:50%;margin-left:-5px}.tooltip.top-left .tooltip-arrow{left:5px}.tooltip.top-right .tooltip-arrow{right:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow,.tooltip.bottom-left .tooltip-arrow,.tooltip.bottom-right .tooltip-arrow{border-width:0 5px 5px;border-bottom-color:#000;top:0}.tooltip.bottom .tooltip-arrow{left:50%;margin-left:-5px}.tooltip.bottom-left .tooltip-arrow{left:5px}.tooltip.bottom-right .tooltip-arrow{right:5px}.popover{top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover-content{padding:9px 14px}.pl0,.px0{padding-left:0}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.carousel,.carousel-inner{position:relative}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.left>.arrow:after,.popover.right>.arrow:after{bottom:-10px;content:" "}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;border-right-width:0;border-left-color:#fff}.carousel-inner{width:100%}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5) 0),color-stop(rgba(0,0,0,.0001) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001) 0),color-stop(rgba(0,0,0,.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:transparent;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.alert-info,.carousel-caption .btn,.text-hide{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.hidden,.visible-lg,.visible-md,.visible-print,.visible-sm,.visible-xs{display:none!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;background-color:transparent;border:0}.hidden{visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}.hidden-lg{display:none!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}.hidden-print{display:none!important}}@font-face{font-family:lato-webfont;font-weight:400;font-style:normal;src:url(/fonts/lato-regular-webfont.eot);src:url(/fonts/lato-regular-webfont.eot?#iefix) format("embedded-opentype"),url(/fonts/lato-regular-webfont.woff) format("woff"),url(/fonts/lato-regular-webfont.ttf) format("truetype"),url(/fonts/lato-regular-webfont.svg#latoregular) format("svg")}@font-face{font-family:lato-webfont;font-weight:300;font-style:normal;src:url(/fonts/lato-light-webfont.eot);src:url(/fonts/lato-light-webfont.eot?#iefix) format("embedded-opentype"),url(/fonts/lato-light-webfont.woff) format("woff"),url(/fonts/lato-light-webfont.ttf) format("truetype"),url(/fonts/lato-light-webfont.svg#latolight) format("svg")}@font-face{font-family:lato-webfont;font-weight:100;font-style:normal;src:url(/fonts/lato-hairline-webfont.eot);src:url(/fonts/lato-hairline-webfont.eot?#iefix) format("embedded-opentype"),url(/fonts/lato-hairline-webfont.woff) format("woff"),url(/fonts/lato-hairline-webfont.ttf) format("truetype"),url(/fonts/lato-hairline-webfont.svg#latohairline) format("svg")}@font-face{font-family:lato-webfont;font-weight:700;font-style:normal;src:url(/fonts/lato-bold-webfont.eot);src:url(/fonts/lato-bold-webfont.eot?#iefix) format("embedded-opentype"),url(/fonts/lato-bold-webfont.woff) format("woff"),url(/fonts/lato-bold-webfont.ttf) format("truetype"),url(/fonts/lato-bold-webfont.svg#latobold) format("svg")}@font-face{font-family:lato-webfont;font-weight:900;font-style:normal;src:url(/fonts/lato-black-webfont.eot);src:url(/fonts/lato-black-webfont.eot?#iefix) format("embedded-opentype"),url(/fonts/lato-black-webfont.woff) format("woff"),url(/fonts/lato-black-webfont.ttf) format("truetype"),url(/fonts/lato-black-webfont.svg#latoblack) format("svg")}body{background:#eff2f5}body.ember-application{padding-left:275px}.clickable{cursor:pointer}.modal-dialog{color:#2e4359}.not-editable{opacity:.5;background-color:rgba(217,217,217,.5);cursor:default}.view-top-bar{margin:0;border-bottom:1px solid #d2dae3;background:#fff;padding:0 15px;height:55px}.view-current-title{float:left;margin:0;line-height:55px;letter-spacing:-1px;color:#2f4358;font-size:28px;font-weight:600}.panel-primary{position:relative;border:0;background-color:#fff;color:#2f4358}.panel-primary input,.panel-primary select,.panel-primary textarea{background:rgba(219,235,255,.2)}.panel-default{border:0;border-radius:0;background-color:transparent}.panel-default>.panel-heading{border:0;border-radius:0;background-color:transparent;padding:0;color:#2e4359}.panel-heading{background-color:#e9f3ff;padding:10px 15px;color:#2e4359}.detail-section-content{padding:15px 0}.pb0,.py0{padding-bottom:0}.detail-section-content .table{margin-top:-15px}.table-header>th{border-top:0;font-weight:300}.print-section{display:none}@media print{*{background-color:#fff;color:#000;font-size:14px}.panel-default,.panel-primary{position:absolute;left:0;margin:0 5%;width:90%}.print-section{display:block;text-align:center}.btn,.nav,.panel-footer,.view-current-title{display:none}.patient-history-heading{border-bottom:1px solid #000}}.ml0,.mx0{margin-left:0}.mr0,.mx0{margin-right:0}.mt0,.my0{margin-top:0}.mb0,.my0{margin-bottom:0}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.border{border-style:solid;border-width:var(--border-width)}.border-top{border-top-style:solid;border-top-width:var(--border-width)}.border-right{border-right-style:solid;border-right-width:var(--border-width)}.border-bottom{border-bottom-style:solid;border-bottom-width:var(--border-width)}.border-left{border-left-style:solid;border-left-width:var(--border-width)}.border-none{border:0}.rounded{border-radius:var(--border-radius)}.circle{border-radius:50%}.rounded-top{border-radius:var(--border-radius) var(--border-radius) 0 0}.rounded-right{border-radius:0 var(--border-radius) var(--border-radius) 0}.rounded-bottom{border-radius:0 0 var(--border-radius) var(--border-radius)}.rounded-left{border-radius:var(--border-radius) 0 0 var(--border-radius)}.not-rounded{border-radius:0}:root{--border-width:1px;--border-radius:3px;--width-1:24rem;--width-2:32rem;--width-3:48rem;--width-4:64rem;--space-1:.5rem;--space-2:1rem;--space-3:2rem;--space-4:4rem;--z1:1;--z2:2;--z3:3;--z4:4;--h1:2rem;--h2:1.5rem;--h3:1.25rem;--h4:1rem;--h5:.875rem;--h6:.75rem;--line-height-1:1;--line-height-2:1.125;--line-height-3:1.25;--line-height-4:1.5;--letter-spacing:1;--caps-letter-spacing:.2em;--bold-font-weight:bold}.flex{display:flex}.flex-column{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-baseline{align-self:baseline}.self-stretch{align-self:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-center{align-content:center}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-stretch{align-content:stretch}.flex-auto{flex:1 1 auto;min-width:0;min-height:0}.flex-none{flex:none}.order-0{order:0}.order-1{order:1}.order-2{order:2}.order-3{order:3}.order-last{order:99999}@custom-media --breakpoint-sm (min-width: 40em);@custom-media --breakpoint-md (min-width: 52em);@custom-media --breakpoint-lg (min-width: 64em);.col{float:left}.col-right{float:right}.col-1{width:calc(1/12 * 100%)}.col-2{width:calc(2/12 * 100%)}.col-3{width:calc(3/12 * 100%)}.col-4{width:calc(4/12 * 100%)}.col-5{width:calc(5/12 * 100%)}.col-6{width:calc(6/12 * 100%)}.col-7{width:calc(7/12 * 100%)}.col-8{width:calc(8/12 * 100%)}.col-9{width:calc(9/12 * 100%)}.col-10{width:calc(10/12 * 100%)}.col-11{width:calc(11/12 * 100%)}.col-12{width:100%}@media (--breakpoint-sm){.sm-flex{display:flex}.sm-col,.sm-col-right{box-sizing:border-box}.sm-col{float:left}.sm-col-right{float:right}.sm-col-1{width:calc(1/12 * 100%)}.sm-col-2{width:calc(2/12 * 100%)}.sm-col-3{width:calc(3/12 * 100%)}.sm-col-4{width:calc(4/12 * 100%)}.sm-col-5{width:calc(5/12 * 100%)}.sm-col-6{width:calc(6/12 * 100%)}.sm-col-7{width:calc(7/12 * 100%)}.sm-col-8{width:calc(8/12 * 100%)}.sm-col-9{width:calc(9/12 * 100%)}.sm-col-10{width:calc(10/12 * 100%)}.sm-col-11{width:calc(11/12 * 100%)}.sm-col-12{width:100%}}@media (--breakpoint-md){.md-flex{display:flex}.md-col,.md-col-right{box-sizing:border-box}.md-col{float:left}.md-col-right{float:right}.md-col-1{width:calc(1/12 * 100%)}.md-col-2{width:calc(2/12 * 100%)}.md-col-3{width:calc(3/12 * 100%)}.md-col-4{width:calc(4/12 * 100%)}.md-col-5{width:calc(5/12 * 100%)}.md-col-6{width:calc(6/12 * 100%)}.md-col-7{width:calc(7/12 * 100%)}.md-col-8{width:calc(8/12 * 100%)}.md-col-9{width:calc(9/12 * 100%)}.md-col-10{width:calc(10/12 * 100%)}.md-col-11{width:calc(11/12 * 100%)}.md-col-12{width:100%}}@media (--breakpoint-lg){.lg-flex{display:flex}.lg-col,.lg-col-right{box-sizing:border-box}.lg-col{float:left}.lg-col-right{float:right}.lg-col-1{width:calc(1/12 * 100%)}.lg-col-2{width:calc(2/12 * 100%)}.lg-col-3{width:calc(3/12 * 100%)}.lg-col-4{width:calc(4/12 * 100%)}.lg-col-5{width:calc(5/12 * 100%)}.lg-col-6{width:calc(6/12 * 100%)}.lg-col-7{width:calc(7/12 * 100%)}.lg-col-8{width:calc(8/12 * 100%)}.lg-col-9{width:calc(9/12 * 100%)}.lg-col-10{width:calc(10/12 * 100%)}.lg-col-11{width:calc(11/12 * 100%)}.lg-col-12{width:100%}.lg-hide{display:none!important}}@custom-media --breakpoint-sm (min-width: 40em);@custom-media --breakpoint-md (min-width: 52em);@custom-media --breakpoint-lg (min-width: 64em);.hide{position:absolute!important;height:1px;width:1px;clip:rect(1px,1px,1px,1px)}@media (--breakpoint-xs){.xs-hide{display:none!important}}@media (--breakpoint-sm-md){.sm-hide{display:none!important}}@media (--breakpoint-md-lg){.md-hide{display:none!important}}.display-none{display:none!important}@custom-media --breakpoint-xs (max-width: 40em);@custom-media --breakpoint-sm-md (min-width: 40em) and (max-width: 52em);@custom-media --breakpoint-md-lg (min-width: 52em) and (max-width: 64em);@custom-media --breakpoint-lg (min-width: 64em);.inline{display:inline}.block{display:block}.inline-block{display:inline-block}.table{display:table}.table-cell{display:table-cell}.overflow-scroll{overflow:scroll}.overflow-auto{overflow:auto}.clearfix:after,.clearfix:before{content:" ";display:table}.clearfix:after{clear:both}.left{float:left}.btn.align-right,.right{float:right}.fit{max-width:100%}.max-width-1{max-width:var(--width-1)}.max-width-2{max-width:var(--width-2)}.max-width-3{max-width:var(--width-3)}.max-width-4{max-width:var(--width-4)}.m0{margin:0}.ml1,.mx1{margin-left:var(--space-1)}.mr1,.mx1{margin-right:var(--space-1)}.mt1,.my1{margin-top:var(--space-1)}.mb1,.my1{margin-bottom:var(--space-1)}.m1{margin:var(--space-1)}.ml2,.mx2{margin-left:var(--space-2)}.mr2,.mx2{margin-right:var(--space-2)}.mt2,.my2{margin-top:var(--space-2)}.mb2,.my2{margin-bottom:var(--space-2)}.m2{margin:var(--space-2)}.ml3,.mx3{margin-left:var(--space-3)}.mr3,.mx3{margin-right:var(--space-3)}.mt3,.my3{margin-top:var(--space-3)}.mb3,.my3{margin-bottom:var(--space-3)}.m3{margin:var(--space-3)}.ml4,.mx4{margin-left:var(--space-4)}.mr4,.mx4{margin-right:var(--space-4)}.mt4,.my4{margin-top:var(--space-4)}.mb4,.my4{margin-bottom:var(--space-4)}.m4{margin:var(--space-4)}.mxn1{margin-left:-var(--space-1);margin-right:-var(--space-1)}.mxn2{margin-left:-var(--space-2);margin-right:-var(--space-2)}.mxn3{margin-left:-var(--space-3);margin-right:-var(--space-3)}.mxn4{margin-left:-var(--space-4);margin-right:-var(--space-4)}.ml-auto,.mx-auto{margin-left:auto}.mr-auto,.mx-auto{margin-right:auto}.p0{padding:0}.pt0{padding-top:0}.pl1,.px1{padding-left:var(--space-1)}.pr1,.px1{padding-right:var(--space-1)}.py0{padding-top:0}.pt1,.py1{padding-top:var(--space-1)}.pb1,.py1{padding-bottom:var(--space-1)}.p1{padding:var(--space-1)}.pt2,.py2{padding-top:var(--space-2)}.pb2,.py2{padding-bottom:var(--space-2)}.pl2,.px2{padding-left:var(--space-2)}.pr2,.px2{padding-right:var(--space-2)}.p2{padding:var(--space-2)}.pt3,.py3{padding-top:var(--space-3)}.pb3,.py3{padding-bottom:var(--space-3)}.pl3,.px3{padding-left:var(--space-3)}.pr3,.px3{padding-right:var(--space-3)}.p3{padding:var(--space-3)}.pt4,.py4{padding-top:var(--space-4)}.pb4,.py4{padding-bottom:var(--space-4)}.pl4,.px4{padding-left:var(--space-4)}.pr4,.px4{padding-right:var(--space-4)}.p4{padding:var(--space-4)}.relative{position:relative}.absolute{position:absolute}.fixed{position:fixed}.top-0{top:0}.right-0{right:0}.bottom-0{bottom:0}.left-0{left:0}.z1{z-index:var(--z1)}.z2{z-index:var(--z2)}.z3{z-index:var(--z3)}.z4{z-index:var(--z4)}.h1{font-size:var(--h1)}.h2{font-size:var(--h2)}.h3{font-size:var(--h3)}.h4{font-size:var(--h4)}.h5{font-size:var(--h5)}.h6{font-size:var(--h6)}.font-family-inherit{font-family:inherit}.font-size-inherit{font-size:inherit}.text-decoration-none{text-decoration:none}.bold{font-weight:var(--bold-font-weight,bold)}.regular{font-weight:400}.italic{font-style:italic}.caps{letter-spacing:var(--caps-letter-spacing)}.left-align{text-align:left}.center{text-align:center}.right-align{text-align:right}.justify{text-align:justify}.nowrap{white-space:nowrap}.line-height-1{line-height:var(--line-height-1)}.line-height-2{line-height:var(--line-height-2)}.line-height-3{line-height:var(--line-height-3)}.line-height-4{line-height:var(--line-height-4)}.list-style-none{list-style:none}.underline{text-decoration:underline}.truncate{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.list-reset{list-style:none;padding-left:0}.alert{border:0;border-radius:3px;padding:12px}.alert-success{border-color:#b2dba1;background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);background-repeat:repeat-x}.alert-info{border:0;box-shadow:none;background:#ffffe4;color:rgba(83,83,75,.7)}.alert-warning,.btn-danger,.btn-info,.btn-success,.btn-warning,.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-repeat:repeat-x}.alert-warning{border-color:#f5e79e;background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%)}.alert-danger{background-color:rgba(255,109,111,.3);color:#c3124e}.btn.on-white{background-color:#dbebff;color:#2e4359}.btn.warning{background-color:rgba(255,109,111,.3);color:#ff6d6f}.btn.warning:focus,.btn.warning:hover{background-color:#ff6d6f;color:#fff}.btn.neutral{background-color:#d9d9d9;color:rgba(46,67,89,.65)}.btn.neutral:focus,.btn.neutral:hover{opacity:.8}.btn.admit{width:103px}.btn .octicon{position:relative;left:-3px}.btn.align-left{float:left}.btn-default{border:0;border-radius:3px;background-color:#00bd9c}.btn-default:focus,.btn-default:hover{background-color:#13d8b6}.btn-primary{background-color:#00bd9c}.btn-primary:focus,.btn-primary:hover{background-color:#00c4a2}.btn-primary.active,.btn-primary:active{background-color:#00cca8}.btn-primary.disabled-btn,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover{opacity:.7;background-color:#00bd9c;color:#fff}.sidebar-nav-logo:focus,.sidebar-nav-logo:hover,.sidebar-nav-search .btn:hover{opacity:.8}.btn-success{border-color:#3e8f3e;background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%)}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{border-color:#3e8f3e;background-color:#419641}.btn-info{border-color:#28a4c9;background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%)}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{border-color:#28a4c9;background-color:#2aabd2}.btn-warning{border-color:#e38d13;background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%)}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{border-color:#e38d13;background-color:#eb9316}.btn-danger{border-color:#b92c28;background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%)}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{border-color:#b92c28;background-color:#c12e2a}.glyphicon-refresh-animate{-webkit-animation:spin2 .7s infinite linear;animation:spin .7s infinite linear}@-webkit-keyframes spin2{from{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(360deg)}}@keyframes spin{from{transform:scale(1) rotate(0)}to{transform:scale(1) rotate(360deg)}}.fc-toolbar.fc-header-toolbar{margin-bottom:0}.fc-toolbar.fc-header-toolbar h2{margin-top:.35em;font-size:18px}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#357ebd;background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x}.form-input-group{display:block;margin-bottom:15px}.form-input-group select{height:44px}.checkbox-label-space{top:25px}.required .control-label::after{color:#ff6d6f;content:'*'}.input-group-addon{border:0;background-color:#fff}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{margin-left:-18px}.form-control{border:1px solid #dee2e7}.container label{font-weight:300}.notes{max-width:300px}.loading-notice{position:absolute;top:0;right:0;bottom:0;z-index:99;margin:0 auto;width:calc(100% - 275px);height:100%;text-align:center}.loading-notice .wrapper{position:relative;top:50%;transform:translateY(-50%);margin:0 auto;border-radius:10px;background-color:#dde5ee;padding:20px;width:140px}.loading-notice.apploading{left:0;width:100%}.loading-notice .loading-text{margin-bottom:0;text-transform:uppercase;letter-spacing:2px;color:#263648;font-weight:300}.loading-notice .spinner{margin:0 auto 10px;width:50px;height:40px;text-align:center;font-size:10px}.loading-notice .spinner>div{display:inline-block;-webkit-animation:stretchdelay 1.2s infinite ease-in-out;animation:stretchdelay 1.2s infinite ease-in-out;margin-left:3px;border-radius:50px;background-color:#00bd9c;width:6px;height:100%}.loading-notice .spinner>div:first-child{margin-left:0}.loading-notice .spinner .rect2{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.loading-notice .spinner .rect3{-webkit-animation-delay:-1s;animation-delay:-1s}.loading-notice .spinner .rect4{-webkit-animation-delay:-.9s;animation-delay:-.9s}.loading-notice .spinner .rect5{-webkit-animation-delay:-.8s;animation-delay:-.8s}@-webkit-keyframes stretchdelay{0%,100%,40%{-webkit-transform:scaleY(.4)}20%{-webkit-transform:scaleY(1)}}@keyframes stretchdelay{0%,100%,40%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}20%{-webkit-transform:scaleY(1);transform:scaleY(1)}}.paging-buttons{position:absolute;top:3px;right:3px}.panel-heading .view-sub-bar{padding:0 15px}.panel-heading .view-sub-nav{margin:0}.panel-heading .view-action-buttons{float:right}.panel-heading .view-action-buttons .btn{margin:10px 0 10px 15px;border:1px solid #00bd9c;background-color:transparent;color:#00bd9c;font-size:14px}.panel-heading .view-action-buttons .btn:focus,.panel-heading .view-action-buttons .btn:hover{background-color:#00bd9c;color:#fff}.panel-heading .nav-pills{margin:0}.panel-heading .nav-pills li{margin-left:40px;line-height:58px;font-size:18px}.panel-heading .nav-pills li:first-of-type{margin-left:0}.panel-heading .nav-pills li.active>a{background-color:transparent;color:#2f4358;font-weight:600}.panel-heading .nav-pills a{padding:0;color:#6784a2}.panel-heading .nav-pills a:hover{background-color:transparent!important;color:#2f4358}.panel-title{font-size:24px}.panel-footer{background-color:#fff;text-align:right}.patient-history-item{margin:15px 0;border-radius:5px;background:rgba(239,242,245,.5);padding:5px 15px 15px}.patient-history-item .ph-note-item{margin-top:15px;font-weight:300}.patient-history-item .ph-note-heading{font-size:16px;font-weight:600}.patient-history-heading{margin:-5px -15px 10px;border-radius:5px 5px 0 0;background:#eff2f5;padding:5px 15px;font-size:18px}.patient-history-heading .ph-visit-date{display:inline-block;margin:-5px 10px -5px -15px;border-radius:5px 0 0;background:#dee2e7;padding:5px 15px;line-height:26px;font-size:16px;font-weight:600}.patient-history-heading .ph-visit-type{display:inline-block;font-weight:300}.patient-summary{position:relative;border-bottom:2px solid #eff2f5;padding-bottom:15px}.patient-summary .ps-info-group{margin-bottom:5px}.patient-summary .ps-info-group.patient-id{position:absolute;top:-10px;right:-10px;border-radius:3px;background:rgba(239,242,245,.7);padding:10px 20px;text-align:center}.progress,.progress-bar,.progress-bar-danger,.progress-bar-info,.progress-bar-success,.progress-bar-warning{background-repeat:repeat-x}.patient-summary .ps-info-group.patient-id .ps-info-label{margin-right:5px;margin-bottom:0;width:auto;text-align:right}.patient-summary .ps-info-group.patient-id .ps-info-data{font-size:22px;font-weight:300}.patient-summary .ps-info-group.patient-name .ps-info-data{font-size:22px;font-weight:600}.patient-summary .ps-info-group.long-form{float:left;padding-right:15px;width:50%}.patient-summary .ps-info-label{margin-right:10px;width:40px;font-size:16px;font-weight:400}.patient-summary .ps-info-data-block,.sidebar-nav{font-weight:300}.patient-summary .ps-info-label.wide{width:auto}.patient-summary .ps-info-data{color:#2f4358;font-size:16px;font-weight:300}.progress{background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%)}.progress-bar{background-image:linear-gradient(to bottom,#428bca 0,#3071a9 100%)}.progress-bar-success{background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%)}.progress-bar-info{background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%)}.progress-bar-warning{background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%)}.progress-bar-danger{background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%)}.sidebar-nav{display:block;position:fixed;top:0;bottom:0;left:0;z-index:1;box-shadow:1px 0 0 #1e2c3a;background-color:#263648;width:275px;color:#fff}.sidebar-nav .mega-octicon{text-align:center;color:#92a7bc;font-size:16px}.scroll-container{position:absolute;top:55px;left:0;width:100%;height:calc(100% - 55px);overflow:auto}.sidebar-nav-header{position:absolute;top:0;left:0;border-bottom:1px solid #1e2c3a;background-color:#2f4358;width:100%;height:55px}.sidebar-nav-logo{transition:opacity .2s ease;display:inline-block;padding:0 15px;height:55px}.sidebar-nav-logo .logo-svg{position:relative;top:15px;width:150px}.settings-trigger{float:right;padding:15px}.settings-trigger.active .mega-octicon{color:#00bd9c}.settings-nav{position:absolute;top:48px;right:10px;z-index:10;border-radius:5px;background-color:#eff2f5;min-width:130px}.settings-nav::before{display:block;position:absolute;top:-7px;right:10px;border-right:5px solid transparent;border-bottom:7px solid #eff2f5;border-left:5px solid transparent;content:' '}.settings-nav>a{display:block;border-top:1px solid #dee2e7;padding:6px 10px;color:#3a4d63;font-size:14px;font-weight:400}.settings-nav>a:first-of-type{border-top:0}.sidebar-nav-search{border-bottom:1px solid #1e2c3a;padding:10px 15px;height:58px}.sidebar-nav-search .form-group{float:left;margin-bottom:0}.sidebar-nav-search input{border:0;border-radius:5px 0 0 5px;background-color:#546a83;padding:6px 12px;width:198px;height:38px;color:#2e4359;font-size:18px;font-weight:300}.sidebar-nav-search input::-webkit-input-placeholder{color:#92a7bc}.sidebar-nav-search input:focus{background-color:#fff}.sidebar-nav-search .btn{transition:opacity .2s ease;position:absolute;top:10px;right:15px;border-radius:0 5px 5px 0;background-color:#92a7bc;width:46px;height:38px;text-shadow:none;color:#d2dae3;font-size:18px}.sidebar-nav-search .btn .glyphicon{top:2px;right:1px}.primary-nav-item a:focus,.primary-nav-item a:hover,.primary-nav-item a:visited{text-decoration:none}.primary-nav-item .primary-section-link{transition:all .2s ease;display:block;border-bottom:1px solid #1e2c3a;background:#2f4358;padding:0 15px;height:48px;line-height:48px;color:#fff;font-size:18px}.primary-nav-item .primary-section-link .mega-octicon{transition:all .2s ease;float:left;margin-right:12px;width:16px;line-height:48px}.primary-nav-item .primary-section-link.active,.primary-nav-item .primary-section-link:hover{background:#546a83}.primary-nav-item .primary-section-link.active .mega-octicon,.primary-nav-item .primary-section-link:hover .mega-octicon{color:#fff}.primary-nav-item .category-sub-items{border-bottom:1px solid #1e2c3a;background:#3a4d63}.primary-nav-item .category-sub-item{transition:all .2s ease;display:block;background:#3a4d63;padding:0 15px;height:36px;line-height:36px;color:#c2d2e3;font-size:15px}.primary-nav-item .category-sub-item:hover{background:#546a83;color:#fff}.primary-nav-item .category-sub-item:hover .octicon{margin-right:2px;margin-left:10px;color:#fff}.primary-nav-item .category-sub-item .octicon{transition:all .2s ease;float:left;margin-right:6px;margin-left:6px;width:16px;line-height:36px}.tt-menu,.twitter-typeahead{width:100%}.primary-nav-item .nav-link{font-weight:300}.tab-pane .panel-heading{background-color:transparent;padding:10px 0}.tab-pane .panel-title{font-size:20px}.nav-pills{margin:0}.nav-pills li{margin-left:40px;line-height:58px;font-size:18px}.nav-pills li:first-of-type{margin-left:0}.nav-pills li.active>a{background-color:transparent;color:#2f4358;font-weight:600}.nav-pills a{padding:0;color:#6784a2}.nav-pills a:focus,.nav-pills a:hover{background-color:transparent;text-decoration:none;color:#2f4358}.nav-pills.tab-nav{border-bottom:2px solid #eff2f5}.nav-pills.tab-nav li{margin-left:0;line-height:26px;font-size:16px}.nav-pills.tab-nav li.active a,.nav-pills.tab-nav li:focus a,.nav-pills.tab-nav li:hover a{margin-bottom:-2px;border-bottom:2px solid #6784a2}.tt-menu .query-results,.twitter-typeahead .tt-hint,.twitter-typeahead .tt-query{margin-bottom:0}.table-header{background-color:#d2dae3;color:rgba(38,54,72,.7)}.table-header .sortable-column{cursor:pointer}.table-header .sortable-column .inactive{color:rgba(38,54,72,.3)}.tt-menu{border:1px solid rgba(0,0,0,.1);border-radius:0 0 3px 3px;box-shadow:0 3px 5px rgba(0,0,0,.1);background-clip:padding-box;background-color:#fff;padding:5px 0;min-width:160px;max-height:110px;overflow-y:scroll;overflow-x:none}.tt-suggestion{display:block;padding:3px 12px}.tt-suggestion.tt-is-under-cursor{background-color:#0081c2;background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;color:#fff}.tt-suggestion.tt-is-under-cursor a{color:#fff}.tt-suggestion p{margin:0}.scrollable-typeahead .tt-menu{max-height:200px;overflow-y:auto}.signin-logo{margin:40px auto;max-width:200px}.form-signin{position:absolute;top:0;left:50%;transform:translate(-50%,0);margin:0 auto;max-width:300px}.form-signin .alert{margin-bottom:15px}.form-signin input{background:#fff}.signin-contents{border-radius:10px;background:#dde5ee;padding:20px;width:300px}.form-signin-heading{margin:0 0 20px;text-align:center;letter-spacing:2px;color:#263648;font-size:24px;font-weight:300} \ No newline at end of file diff --git a/prod/assets/hospitalrun-46e7b2466fc73d5406bd19252eed1865.js b/prod/assets/hospitalrun-46e7b2466fc73d5406bd19252eed1865.js deleted file mode 100644 index ff680ffab0..0000000000 --- a/prod/assets/hospitalrun-46e7b2466fc73d5406bd19252eed1865.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict";define("hospitalrun/adapters/application",["exports","ember","ember-pouch","hospitalrun/mixins/pouch-adapter-utils","npm:uuid"],function(e,t,n,a,l){var s=t.default.run.bind;e.default=n.Adapter.extend(a.default,{database:t.default.inject.service(),db:t.default.computed.reads("database.mainDB"),_specialQueries:["containsValue","mapReduce"],_esDefaultSize:25,_executeContainsSearch:function(e,n,a){var l=this;return new t.default.RSVP.Promise(function(s,i){var o=l.getRecordTypeName(n),r="/search/hrdb/"+o+"/_search";a.containsValue&&a.containsValue.value?!function(){var o="";a.containsValue.keys.forEach(function(e){t.default.isEmpty(o)||(o+=" OR ");var n=a.containsValue.value;switch(e.type){case"contains":n="*"+n+"*";break;case"fuzzy":n+="~"}o=o+"data."+e.name+":"+n});var d=function(a){if(a&&a.hits&&a.hits.hits){var o=t.default.A(a.hits.hits).map(function(e){var t=e._source;return t.id=t._id,t}),r={rows:o};l._handleQueryResponse(r,e,n).then(s,i)}else a.rows?l._handleQueryResponse(a,e,n).then(s,i):i("Search results are not valid")};t.default.isEmpty(a.size)&&(a.size=l.get("_esDefaultSize")),t.default.$.ajax(r,{dataType:"json",data:{q:o,size:l.get("_esDefaultSize")},success:d})}():i("invalid query")})},_handleQueryResponse:function(e,n,a){var l=this,s=this.get("database");return new t.default.RSVP.Promise(function(t,i){if(e.rows.length>0)!function(){var o=e.rows.map(function(e){return s.getEmberId(e.id)});l.findRecord(n,a,o).then(function(e){var n=a.modelName.camelize().pluralize(),l=[];o.forEach(function(t){var a=e[n].findBy("id",t);l.push(a)}),e[n]=l,t(e)},i)}();else{var o={};o[a.modelName]=[],t(o)}})},_doesStartKeyContainSpecialCharacters:function(e){var n=!1,a=this.get("maxValue");return!t.default.isEmpty(e)&&t.default.isArray(e)&&e.forEach(function(e){null!==e&&e!==a||(n=!0)}),n},_startChangesToStoreListener:function(){var e=this.get("db");e&&(this.changes=e.changes({since:"now",live:!0,returnDocs:!1}).on("change",s(this,"onChange")).on("error",t.default.K),e.changesListener=this.changes)},generateIdForRecord:function(){return l.default.v4()},query:function(e,n,a,l){for(var s=this,i=!1,o=0;o0}),_canModifyValue:function(e,t){switch(t){case"inventory_types":if("Medication"===e)return!1;break;case"lab_pricing_types":if("Lab Procedure"===e)return!1;break;case"imaging_pricing_types":if("Imaging Procedure"===e)return!1;break;case"visit_types":if("Admission"===e)return!1;if("Imaging"===e)return!1;if("Lab"===e)return!1;if("Pharmacy"===e)return!1}return!0},_sortValues:function(e,n){return t.default.compare(e.toLowerCase(),n.toLowerCase())},activateKeyboard:t.default.on("init",function(){this.set("keyboardActivated",!0)}),updateListKeyboard:t.default.on((0,o.keyDown)("ctrl+KeyS"),(0,o.keyDown)("cmd+KeyS"),function(e){this.send("updateList"),e.preventDefault()}),actions:{addValue:function(){this.send("openModal","admin.lookup.edit",t.default.Object.create({isNew:!0}))},confirmDeleteValue:function(e){var n=this.get("i18n"),a=n.t("admin.lookup.titles.deleteLookupValue"),l=n.t("admin.lookup.messages.deleteLookupValue",{value:e});this.displayConfirm(a,l,"deleteValue",t.default.Object.create({valueToDelete:e}))},deleteValue:function(e){var t=this.get("lookupTypeList"),n=t.get("value"),a=e.get("valueToDelete");n.removeObject(a.toString()),t.save()},editValue:function(e){t.default.isEmpty(e)||this.send("openModal","admin.lookup.edit",t.default.Object.create({isNew:!1,originalValue:e.toString(),value:e.toString()}))},importList:function(){var e=this.get("fileSystem"),t=this.get("importFile"),n=this.get("lookupTypeList");t&&t.type?e.fileToDataURL(t).then(function(e){var a=e.split(",");n.setProperties({_attachments:{file:{content_type:t.type,data:a[1]}},importFile:!0}),n.save().then(function(){this.displayAlert(this.get("i18n").t("admin.lookup.alertImportListSaveTitle"),this.get("i18n").t("admin.lookup.alertImportListSaveMessage"),"refreshLookupLists"),this.set("importFile"),this.set("model.importFileName")}.bind(this))}.bind(this)):this.displayAlert(this.get("i18n").t("admin.lookup.alertImportListTitle"),this.get("i18n").t("admin.lookup.alertImportListMessage"))},updateList:function(){var e=this.get("lookupTypeList");e.save().then(function(){this.displayAlert(this.get("i18n").t("admin.lookup.alertImportListUpdateTitle"),this.get("i18n").t("admin.lookup.alertImportListUpdateMessage"))}.bind(this))},updateValue:function(e){var t=!1,n=this.get("lookupTypeList"),a=n.get("value"),l=e.get("value");if(e.get("isNew"))t=!0;else{var s=e.get("originalValue");l!==s&&(a.removeObject(s),t=!0)}t&&(a.addObject(l),a=a.sort(this._sortValues),n.set("value",a),n.save())}}})}),define("hospitalrun/admin/lookup/edit/controller",["exports","ember","hospitalrun/mixins/is-update-disabled"],function(e,t,n){e.default=t.default.Controller.extend(n.default,{editController:t.default.inject.controller("admin/lookup"),showUpdateButton:!0,updateButtonAction:"update",updateButtonText:function(){var e=this.get("i18n");return this.get("model.isNew")?e.t("buttons.add"):e.t("buttons.update")}.property("model.isNew"),actions:{cancel:function(){this.send("closeModal")},update:function(){t.default.isEmpty(this.get("model.value"))||(this.get("editController").send("updateValue",this.get("model")),this.send("closeModal"))}}})}),define("hospitalrun/admin/lookup/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"2fhdRW7b",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["helper",["t"],[["helper",["if"],[["get",["model","isNew"]],"admin.lookup.edit.template.addTitle","admin.lookup.edit.template.editTitle"],null]],null],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["em-input"],null,[["label","property","class"],[["helper",["t"],["admin.lookup.edit.template.labelTitle"],null],"value","lookup-type-value"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton","action"],[["get",["model"]],false,"update"]],0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/admin/lookup/edit/template.hbs"}})}),define("hospitalrun/admin/lookup/route",["exports","hospitalrun/routes/abstract-index-route","ember-i18n"],function(e,t,n){e.default=t.default.extend({hideNewButton:!0,pageTitle:(0,n.translationMacro)("admin.lookup.pageTitle"),model:function(){return this.store.findAll("lookup")},afterModel:function(e){e.set("lookupType","anesthesia_types")},actions:{deleteValue:function(e){this.controller.send("deleteValue",e)},refreshLookupLists:function(){this.refresh()}}})}),define("hospitalrun/admin/lookup/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"Kwt+t5YD",block:'{"statements":[["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],6],["text"," "],["close-element"],["text","\\n"],["close-element"],["text","\\n"],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["append",["unknown",["lookupTitle"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["canEditValues"]]],null,5],["text"," "],["open-element","div",[]],["static-attr","class","panel-footer"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canEditValues"]]],null,2],["block",["em-form"],null,[["model","submitButton"],[["get",["lookupTypeList"]],false]],1],["text"," "],["close-element"],["text","\\n"],["close-element"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],["Organize Pricing By Type","organizeByType","col-sm-4"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","col-sm-4"],["flush-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["labels.userCanAddNewValue"],null],"userCanAdd"]]],false],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"updateList"]],["flush-element"],["append",["helper",["t"],["buttons.update"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["showOrganizeByType"]]],null,0],["text"," "],["open-element","div",[]],["static-attr","class","col-sm-4"],["flush-element"],["text","\\n "],["append",["helper",["file-upload"],null,[["label","property","selectedFile"],[["helper",["t"],["labels.importFile"],null],"importFileName",["get",["importFile"]]]]],false],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"importList"]],["flush-element"],["append",["helper",["t"],["buttons.import"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"addValue"]],["flush-element"],["append",["helper",["t"],["buttons.addValue"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editValue",["get",["lookupTypeValue","value"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["append",["helper",["t"],["labels.edit"],null],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"confirmDeleteValue",["get",["lookupTypeValue","value"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["labels.delete"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","lookup-type-value"],["flush-element"],["append",["unknown",["lookupTypeValue","value"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["lookupTypeValue","canModify"]]],null,3],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["lookupTypeValue"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.value"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["lookupTypeValues"]]],null,4],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content","optionValuePath","optionLabelPath","selected"],["col-xs-3 lookup-type form-input-group",["helper",["t"],["labels.lookupType"],null],"lookupType",["get",["lookupTypes"]],"value","name",["get",["model","lookupType"]]]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/admin/lookup/template.hbs"}})}),define("hospitalrun/admin/query/controller",["exports","ember","hospitalrun/mixins/edit-panel-props","hospitalrun/utils/select-values"],function(e,t,n,a){e.default=t.default.Controller.extend(n.default,{hideCancelButton:!0,showUpdateButton:!0,updateButtonAction:"query",updateButtonText:"Query",objectTypeList:["appointment","imaging","inv-location","inv-purchase","inv-request","inventory","invoice","lab","medication","patient","photo","procedure","visit","vital"],objectTypes:t.default.computed.map("objectTypeList",a.default.selectValuesMap),actions:{query:function e(){var n=this.get("fieldName"),a=this.get("objectType"),l=this.get("queryValue"),e={containsValue:{value:l,keys:[n]}};this.store.query(a,e).then(function(e){var n=this;t.default.isEmpty(e)?(this.set("errorMessage","Query returned no results."),this.set("haveError",!0),this.set("showQueryResults",!1)):!function(){var a=void 0,l=["id"],s=[];e.get("firstObject").eachAttribute(function(e){l.push(e)}),e.forEach(function(e){var n=[];l.forEach(function(l){a=e.get(l),t.default.isEmpty(a)||n.push({name:l,value:a})}),s.push(n)}),n.set("resultRows",s),n.set("haveError",!1),n.set("showQueryResults",!0)}()}.bind(this),function(e){this.set("errorMessage",e),this.set("haveError",!0),this.set("showQueryResults",!1)}.bind(this))}}})}),define("hospitalrun/admin/query/route",["exports","ember-simple-auth/mixins/authenticated-route-mixin","ember","hospitalrun/mixins/user-session"],function(e,t,n,a){e.default=n.default.Route.extend(a.default,t.default,{beforeModel:function(){this.currentUserCan("query_db")||this.transitionTo("application")}})}),define("hospitalrun/admin/query/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"jNp4d1tp",block:'{"statements":[["text","\\n"],["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],5]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["unknown",["name"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["value"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["result"]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["text","Field"],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["text","Value"],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["resultRow"]]],null,0],["text"," "],["close-element"],["text","\\n"]],"locals":["resultRow"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["text","Query Results"],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["each"],[["get",["resultRows"]]],null,1],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-danger"],["static-attr","role","alert"],["flush-element"],["append",["unknown",["errorMessage"]],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content","selected"],["col-xs-3","Object Type","objectType",["get",["objectTypes"]],["get",["objectType"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-input"],null,[["label","property"],["Field Name","fieldName"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["label","property"],["Query Value","queryValue"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",[null]],false]],4],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["haveError"]]],null,3],["block",["if"],[["get",["showQueryResults"]]],null,2]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/admin/query/template.hbs"}})}),define("hospitalrun/admin/roles/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/mixins/user-roles","hospitalrun/mixins/user-session"],function(e,t,n,a,l){e.default=t.default.extend(a.default,l.default,{currentRole:"",disabledAction:!1,hideCancelButton:!0,updateCapability:"define_user_roles",filteredRoles:n.default.computed.filter("userRoles",function(e){return"System Administrator"!==e.name}),availableCapabilities:[{name:"admin",capabilities:["admin","loadDb","updateConfig","defineUserRoles"]},{name:"appointments",capabilities:["appointments","addAppointment"]},{name:"billing",capabilities:["billing","addBillingDiagnosis","addCharge","addPricing","addPricingProfile","addInvoice","addPayment","deleteInvoice","deletePricing","deletePricingProfile","editInvoice","invoices","overrideInvoice","pricing"]},{name:"patients",capabilities:["patients","addAllergy","addDiagnosis","addNote","addOperativePlan","addOperationReport","addPhoto","addPatient","addProcedure","addSocialwork","addVisit","addVitals","admitPatient","deleteNote","deletePhoto","deletePatient","deleteAppointment","deleteDiagnosis","deleteProcedure","deleteSocialwork","deleteVitals","deleteVisit","dischargePatient","patientReports","visits"]},{name:"medication",capabilities:["medication","addMedication","deleteMedication","fulfillMedication"]},{name:"labs",capabilities:["labs","addLab","completeLab","deleteLab"]},{name:"imaging",capabilities:["imaging","addImaging","completeImaging","deleteImaging"]},{name:"inventory",capabilities:["inventory","addInventoryRequest","addInventoryItem","addInventoryPurchase","adjustInventoryLocation","deleteInventoryItem","fulfillInventory"]}],missingCapablities:n.default.computed("availableCapabilities","defaultCapabilities",function(){var e=this.get("availableCapabilities"),t=Object.keys(e),n=Object.keys(this.get("defaultCapabilities")),a=[];return n.forEach(function(n){var l=!1;t.forEach(function(t){var a=e[t];a.capabilities.includes(n.camelize())&&(l=!0)}),l||a.push(n+" - "+n.camelize())}),a}),capabilitySections:n.default.computed.map("availableCapabilities",function(e){var t=this,n=[];return e.capabilities.forEach(function(e){n.push({key:e,name:t.get("i18n").t("admin.roles.capability."+e)})}),{name:this.get("i18n").t("admin.roles.capability."+e.name),capabilities:n}}),actions:{selectRole:function(e){var t=this,n=this.get("model").findBy("id",e.dasherize());this.set("currentRole",e),this.set("roleToUpdate",n);try{n?!function(){var e=n.get("capabilities");t.get("availableCapabilities").forEach(function(n){n.capabilities.forEach(function(n){e.includes(n)?t.set(n,!0):t.set(n,!1)})})}():!function(){var n=t.get("defaultCapabilities");Object.keys(n).forEach(function(a){var l=n[a];l.includes(e)?t.set(a.camelize(),!0):t.set(a.camelize(),!1)})}()}catch(e){console.log("ex setting role:",e)}},update:function(){var e=this,t=this.get("currentRole"),a=this.get("roleToUpdate");n.default.isEmpty(a)&&(a=this.get("store").createRecord("user-role",{id:t.dasherize(),name:t}));var l=[];this.get("availableCapabilities").forEach(function(t){t.capabilities.forEach(function(t){e.get(t)===!0&&l.push(t)})}),a.set("capabilities",l),a.save().then(function(){e.displayAlert(e.get("i18n").t("admin.roles.titles.roleSaved"),e.get("i18n").t("admin.roles.messages.roleSaved",{roleName:t}))})}}})}),define("hospitalrun/admin/roles/route",["exports","hospitalrun/routes/abstract-edit-route","ember-i18n"],function(e,t,n){e.default=t.default.extend({hideNewButton:!0,newTitle:(0,n.translationMacro)("admin.userRoles"),editTitle:(0,n.translationMacro)("admin.userRoles"),model:function(){return this.get("store").findAll("user-role")}})}),define("hospitalrun/admin/roles/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"2aNV3BOq",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],4]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["capability","name"]],["get",["capability","key"]],["helper",["concat"],["checkbox"," checkbox-",["get",["capability","key"]]],null]]]],false],["text","\\n"]],"locals":["capability"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","detail-section"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["text","\\n "],["append",["unknown",["capabilitySection","name"]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","detail-section-content"],["flush-element"],["text","\\n"],["block",["each"],[["get",["capabilitySection","capabilities"]]],null,0],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["capabilitySection"]},{"statements":[["text"," "],["open-element","option",[]],["dynamic-attr","value",["concat",[["unknown",["userRole","name"]]]]],["dynamic-attr","selected",["helper",["eq"],[["get",["selectedRole"]],["get",["userRole","name"]]],null],null],["flush-element"],["text","\\n "],["append",["unknown",["userRole","name"]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":["userRole"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group has-success"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["labels.role"],null],false],["close-element"],["text","\\n "],["open-element","select",[]],["dynamic-attr","onchange",["helper",["action"],[["get",[null]],"selectRole"],[["value"],["target.value"]]],null],["static-attr","class","form-control role-select"],["flush-element"],["text","\\n "],["open-element","option",[]],["static-attr","disabled",""],["dynamic-attr","selected",["helper",["is-not"],[["get",["selectedRole"]]],null],null],["flush-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["filteredRoles"]]],null,2],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["capabilitySections"]]],null,1]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",[null]],false]],3],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}', -meta:{moduleName:"hospitalrun/admin/roles/template.hbs"}})}),define("hospitalrun/admin/route",["exports","hospitalrun/routes/abstract-module-route"],function(e,t){e.default=t.default.extend({addCapability:"add_user",allowSearch:!1,moduleName:"admin",sectionTitle:"Admin",editPath:function(){return"users.edit"}.property(),deletePath:function(){return"users.delete"}.property()})}),define("hospitalrun/admin/visit-forms/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/mixins/visit-types"],function(e,t,n,a){var l=n.default.computed;e.default=t.default.extend(a.default,{hideCancelButton:!0,updateCapability:"update_config",visitTypesList:l.alias("model.visitTypesList"),visitFormsForEditing:l("model.visitForms","visitTypes",function(){var e=this.get("model.visitForms"),t=this.get("visitTypes"),n=t.map(function(t){return e[t.value]||(e[t.value]="initial"),{type:t.value,form:e[t.value]}});return n}),visitTemplateIds:["initial","followup"],visitTemplates:l(function(){var e=this.get("i18n"),t=this.get("visitTemplateIds");return t.map(function(t){return{id:t,value:e.t("admin.visitForms.labels."+t)}})}),afterUpdate:function(){this.displayAlert(this.get("i18n").t("admin.address.titles.optionsSaved"),this.get("i18n").t("admin.address.messages.addressSaved"))},actions:{selectForm:function(e,t){var n=this.get("model.visitForms");n[e]=t.target.value}}})}),define("hospitalrun/admin/visit-forms/route",["exports","hospitalrun/routes/abstract-edit-route","ember","ember-i18n"],function(e,t,n,a){e.default=t.default.extend({hideNewButton:!0,editTitle:(0,a.translationMacro)("admin.visitForms.titles.visitForms"),newTitle:n.default.computed.alias("editTitle"),model:function(){var e=this.get("store"),t={visitFormsOption:e.find("option","visit_forms"),visitTypes:e.find("lookup","visit_types")};return new n.default.RSVP.Promise(function(e,a){n.default.RSVP.hashSettled(t).then(function(t){var a=n.default.Object.create();"fulfilled"===t.visitTypes.state&&a.set("visitTypesList",t.visitTypes.value),"fulfilled"===t.visitFormsOption.state?a.set("visitForms",t.visitFormsOption.value):a.set("visitForms",{}),e(a)},a)})}})}),define("hospitalrun/admin/visit-forms/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"Wi/FzQog",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],3]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","option",[]],["dynamic-attr","value",["concat",[["unknown",["visitTemplate","id"]]]]],["dynamic-attr","selected",["helper",["eq"],[["get",["visitForm","form"]],["get",["visitTemplate","id"]]],null],null],["flush-element"],["text","\\n "],["append",["unknown",["visitTemplate","value"]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":["visitTemplate"]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["visitForm","type"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","select",[]],["dynamic-attr","onchange",["helper",["action"],[["get",[null]],"selectForm",["get",["visitForm","type"]]],null],null],["static-attr","class","form-control role-select"],["flush-element"],["text","\\n"],["block",["each"],[["get",["visitTemplates"]]],null,1],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["visitForm"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["admin.visitForms.labels.visitType"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["admin.visitForms.labels.form"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["visitFormsForEditing"]]],null,2],["text"," "],["close-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",[null]],false]],0],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/admin/visit-forms/template.hbs"}})}),define("hospitalrun/admin/workflow/controller",["exports","hospitalrun/controllers/abstract-edit-controller"],function(e,t){e.default=t.default.extend({hideCancelButton:!0,updateCapability:"update_config",afterUpdate:function(){this.displayAlert(this.get("i18n").t("admin.workflow.titles.optionsSaved"),this.get("i18n").t("admin.workflow.messages.optionsSaved"))}})}),define("hospitalrun/admin/workflow/route",["exports","hospitalrun/routes/abstract-edit-route","ember-i18n"],function(e,t,n){e.default=t.default.extend({hideNewButton:!0,editTitle:(0,n.translationMacro)("admin.workflow.editTitle"),model:function(){var e=this.get("store");return e.find("option","workflow_options").catch(function(){return e.push(e.normalize("option",{id:"workflow_options",value:{admissionDeposit:!1,clinicPrepayment:!1,followupPrepayment:!1,outpatientLabPrepayment:!1,outpatientImagingPrepayment:!1,outpatientMedicationPrepayment:!1}}))})}})}),define("hospitalrun/admin/workflow/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"Mr+Jr99y",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["admin.workflow.admissionDepositLabel"],null],"value.admissionDeposit"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["admin.workflow.clinicPrepaymentLabel"],null],"value.clinicPrepayment"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["admin.workflow.followupPrepaymentLabel"],null],"value.followupPrepayment"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["admin.workflow.outpatientLabLabel"],null],"value.outpatientLabPrepayment"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["admin.workflow.outpatientImagingLabel"],null],"value.outpatientImagingPrepayment"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["admin.workflow.outpatientMedicationLabel"],null],"value.outpatientMedicationPrepayment"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/admin/workflow/template.hbs"}})}),define("hospitalrun/app",["exports","ember","hospitalrun/resolver","ember-load-initializers","hospitalrun/config/environment"],function(e,t,n,a,l){var s=void 0;t.default.MODEL_FACTORY_INJECTIONS=!0,s=t.default.Application.extend({modulePrefix:l.default.modulePrefix,podModulePrefix:l.default.podModulePrefix,Resolver:n.default}),(0,a.default)(s,l.default.modulePrefix),e.default=s}),define("hospitalrun/appointments/delete/controller",["exports","hospitalrun/controllers/abstract-delete-controller"],function(e,t){e.default=t.default.extend({title:"Delete Appointment",afterDeleteAction:function(){var e=this.get("model.deleteFromPatient");return e?"appointmentDeleted":"closeModal"}.property("model.deleteFromPatient")})}),define("hospitalrun/appointments/delete/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"k7CkZQLv",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-danger"],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-warning-sign"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["t"],["appointments.messages.deleteAppointmentMessage"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/appointments/delete/template.hbs"}})}),define("hospitalrun/appointments/edit/controller",["exports","hospitalrun/controllers/abstract-edit-controller","hospitalrun/mixins/appointment-statuses","ember","hospitalrun/mixins/patient-submodule","hospitalrun/mixins/visit-types"],function(e,t,n,a,l,s){e.default=t.default.extend(n.default,l.default,s.default,{appointmentsController:a.default.inject.controller("appointments"),findPatientVisits:!1,locationList:a.default.computed.alias("appointmentsController.locationList"),lookupListsToUpdate:[{name:"physicianList",property:"model.provider",id:"physician_list"},{name:"locationList",property:"model.location",id:"visit_location_list"}],physicianList:a.default.computed.alias("appointmentsController.physicianList"),showTime:function(){var e=this.get("model.allDay"),t=this.get("isAdmissionAppointment");return!e&&t}.property("model.allDay","isAdmissionAppointment"),visitTypesList:a.default.computed.alias("appointmentsController.visitTypesList"),cancelAction:function(){var e=this.get("model.returnTo");return a.default.isEmpty(e)?this._super():"returnTo"}.property("model.returnTo"),isAdmissionAppointment:function(){var e=this.get("model"),t=e.get("appointmentType"),n="Admission"===t;return n}.property("model.appointmentType"),updateCapability:"add_appointment",afterUpdate:function(){this.send(this.get("cancelAction"))},actions:{appointmentTypeChanged:function(e){var t=this.get("model");t.set("appointmentType",e);var n=this.get("isAdmissionAppointment");t.set("allDay",n)}}})}),define("hospitalrun/appointments/edit/route",["exports","hospitalrun/routes/abstract-edit-route","ember","hospitalrun/mixins/patient-list-route","ember-i18n"],function(e,t,n,a,l){e.default=t.default.extend(a.default,{editTitle:(0,l.translationMacro)("appointments.editTitle"),modelName:"appointment",newTitle:(0,l.translationMacro)("appointments.newTitle"),getNewData:function(){return n.default.RSVP.resolve({appointmentType:"Admission",allDay:!0,selectPatient:!0,startDate:new Date})}})}),define("hospitalrun/appointments/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"T3iCZyRj",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],5]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["date-time-picker"],null,[["datePickerClass","label","model"],["required test-appointment-date",["helper",["t"],["labels.date"],null],["get",["model"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["date-picker"],null,[["property","label","showTime","class"],["startDate",["helper",["t"],["labels.startDate"],null],["get",["showTime"]],"col-sm-4 required test-appointment-start"]]],false],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","showTime","class"],["endDate",["helper",["t"],["labels.endDate"],null],["get",["showTime"]],"col-sm-4 required test-appointment-end"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-summary"],null,[["patient","returnTo","returnToContext","disablePatientLink"],[["get",["model","patient"]],"appointments.edit",["get",["model","id"]],["get",["model","isNew"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-typeahead"],null,[["property","label","content","selection","class"],["patientTypeAhead",["helper",["t"],["labels.patient"],null],["get",["patientList"]],["get",["selectedPatient"]],"required test-patient-input"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model","selectPatient"]]],null,3,2],["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n"],["block",["if"],[["get",["isAdmissionAppointment"]]],null,1,0],["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["helper",["t"],["labels.allDay"],null],"allDay","col-sm-2"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-input-group col-sm-6 required test-appointment-type"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["static-attr","for","startTime"],["flush-element"],["append",["helper",["t"],["labels.type"],null],false],["close-element"],["text","\\n "],["append",["helper",["select-list"],null,[["content","optionLabelPath","optionValuePath","value","class","id","action"],[["get",["visitTypes"]],"value","id",["get",["model","appointmentType"]],"form-control","appointmentType",["helper",["action"],[["get",[null]],"appointmentTypeChanged"],null]]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["className","property","label","list","selection"],["col-sm-6 test-appointment-with","provider",["helper",["t"],["labels.with"],null],["get",["physicianList"]],["get",["model","provider"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["className","property","label","list","selection"],["col-sm-6 required test-appointment-location","location",["helper",["t"],["labels.location"],null],["get",["locationList"]],["get",["model","location"]]]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["class","property","label","content"],["form-input-group col-sm-3 test-appointment-status","status",["helper",["t"],["labels.status"],null],["get",["appointmentStatuses"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-text"],null,[["label","property","rows"],[["helper",["t"],["labels.notes"],null],"notes",3]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],4]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/appointments/edit/template.hbs"}})}),define("hospitalrun/appointments/index/controller",["exports","hospitalrun/controllers/abstract-paged-controller","hospitalrun/mixins/user-session"],function(e,t,n){e.default=t.default.extend(n.default,{startKey:[],canAddVisit:function(){return this.currentUserCan("add_visit")}.property(),canEdit:function(){return this.currentUserCan("add_appointment")}.property(),canDelete:function(){return this.currentUserCan("delete_appointment")}.property(),sortProperties:["startDate","endDate"],sortAscending:!0})}),define("hospitalrun/appointments/index/route",["exports","hospitalrun/routes/abstract-index-route","ember-i18n"],function(e,t,n){e.default=t.default.extend({editReturn:"appointments.index",modelName:"appointment",pageTitle:(0,n.translationMacro)("appointments.thisWeek"),_getStartKeyFromItem:function(e){var t=e.get("endDate"),n=this._getPouchIdFromItem(e),a=e.get("startDate");return t&&""!==t&&(t=new Date(t),t.getTime&&(t=t.getTime())),a&&""!==a&&(a=new Date(a),a.getTime&&(a=a.getTime())),[a,t,n]},_modelQueryParams:function(){var e=moment().endOf("week").toDate().getTime(),t=moment().startOf("week").toDate().getTime(),n=this._getMaxPouchId();return{options:{startkey:[t,null,null],endkey:[e,e,n]},mapReduce:"appointments_by_date"}},actions:{editAppointment:function(e){e.set("returnTo",this.get("editReturn")),this.send("editItem",e)}}})}),define("hospitalrun/appointments/index/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"om9IAHIz",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["partial","appointments/item"],["text","\\n"]],"locals":["appointment"]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.date"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.name"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.type"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.location"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.provider"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.status"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,0],["text"," "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":true}',meta:{moduleName:"hospitalrun/appointments/index/template.hbs"}})}),define("hospitalrun/appointments/item/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"tgFrtDZJ",block:'{"statements":[["open-element","tr",[]],["modifier",["action"],[["get",[null]],"editAppointment",["get",["appointment"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","appointment-date"],["flush-element"],["text","\\n "],["append",["unknown",["appointment","formattedAppointmentDate"]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","patient","displayName"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","appointmentType"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","location"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","provider"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","appointment-status"],["flush-element"],["append",["unknown",["appointment","displayStatus"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["canEdit"]]],null,3],["block",["if"],[["get",["canAddVisit"]]],null,2],["block",["if"],[["get",["canDelete"]]],null,0],["text"," "],["close-element"],["text","\\n"],["close-element"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"deleteItem",["get",["appointment"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["buttons.delete"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"checkIn",["get",["appointment"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-log-in"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["t"],["visits.buttons.checkIn"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["helper",["eq"],[["get",["appointment","displayStatus"]],"Scheduled"],null]],null,1]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editAppointment",["get",["appointment"]]],[["bubbles"],[false]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/appointments/item/template.hbs"}})}),define("hospitalrun/appointments/missed/controller",["exports","hospitalrun/appointments/index/controller"],function(e,t){e.default=t.default.extend({startKey:[]})}),define("hospitalrun/appointments/missed/route",["exports","hospitalrun/appointments/index/route","ember-i18n"],function(e,t,n){e.default=t.default.extend({editReturn:"appointments.missed",modelName:"appointment",pageTitle:(0,n.translationMacro)("appointments.missed"),_modelQueryParams:function(){var e=this._super.apply(this,arguments);return e.filterBy=[{name:"status",value:"Missed"}],e}})}),define("hospitalrun/appointments/missed/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"I2CynOk8",block:'{"statements":[["partial","appointments/index"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[],"hasPartials":true}',meta:{moduleName:"hospitalrun/appointments/missed/template.hbs"}})}),define("hospitalrun/appointments/route",["exports","hospitalrun/routes/abstract-module-route","hospitalrun/mixins/user-session","ember-i18n"],function(e,t,n,a){e.default=t.default.extend(n.default,{addCapability:"add_appointment",allowSearch:!1,currentScreenTitle:(0,a.translationMacro)("appointments.currentScreenTitle"),editTitle:(0,a.translationMacro)("appointments.editTitle"),newTitle:(0,a.translationMacro)("appointments.newTitle"),moduleName:"appointments",newButtonText:(0,a.translationMacro)("appointments.buttons.newButton"),sectionTitle:(0,a.translationMacro)("appointments.sectionTitle"),actions:{checkIn:function(e){var t=e.get("patient"),n=e.getProperties("startDate","endDate","location","patient");n.visitType=e.get("appointmentType"),n.examiner=e.get("provider"),n.appointment=e,n.hidePatientSelection=!0,n.patient=t,n.returnTo="appointments",this.transitionTo("visits.edit","checkin").then(function(e){e.currentModel.setProperties(n),e.controller.getPatientDiagnoses(t,e.currentModel)}.bind(this))}},additionalModels:[{name:"physicianList",findArgs:["lookup","physician_list"]},{name:"locationList",findArgs:["lookup","visit_location_list"]},{name:"visitTypesList",findArgs:["lookup","visit_types"]}]})}),define("hospitalrun/appointments/search/controller",["exports","hospitalrun/appointments/index/controller","hospitalrun/mixins/appointment-statuses","ember","hospitalrun/utils/select-values","hospitalrun/mixins/visit-types"],function(e,t,n,a,l,s){e.default=t.default.extend(n.default,s.default,{appointmentsController:a.default.inject.controller("appointments"),appointmentType:null,physicians:a.default.computed.alias("appointmentsController.physicianList.value"),physicianList:function(){return l.default.selectValues(this.get("physicians"),!0)}.property("physicians"),provider:null,queryParams:["appointmentType","provider","status","startKey","startDate"],selectedProvider:null,selectedStatus:null,sortProperties:null,startDate:null,startKey:[],status:null,visitTypesList:a.default.computed.alias("appointmentsController.visitTypesList"),actions:{search:function(){var e=this.get("model.selectedAppointmentType"),t={startKey:[],previousStartKey:null,previousStartKeys:[]},n=this.get("model.selectedProvider"),l=this.get("model.selectedStatus"),s=this.get("model.selectedStartingDate");a.default.isEmpty(e)?t.appointmentType=null:t.appointmentType=e,a.default.isEmpty(n)?t.provider=null:t.provider=n,a.default.isEmpty(l)?t.status=null:t.status=l,a.default.isEmpty(s)||(t.startDate=s.getTime()),a.default.isEmpty(t)||this.setProperties(t)}}})}),define("hospitalrun/appointments/search/route",["exports","hospitalrun/appointments/index/route","hospitalrun/mixins/date-format","ember","ember-i18n"],function(e,t,n,a,l){e.default=t.default.extend(n.default,{editReturn:"appointments.search",filterParams:["appointmentType","provider","status"],modelName:"appointment",pageTitle:(0,l.translationMacro)("appointments.searchTitle"),queryParams:{appointmentType:{refreshModel:!0},provider:{refreshModel:!0},status:{refreshModel:!0},startDate:{refreshModel:!0},startKey:{refreshModel:!0}},_modelQueryParams:function(e){var t=e.startDate,n=this.get("maxValue");t=a.default.isEmpty(t)?moment():moment(parseInt(t));var l=t.startOf("day").toDate().getTime(),s={startkey:[l,null,"appointment_"],endkey:[n,n,"appointment_"+n]};return{options:s,mapReduce:"appointments_by_date"}},model:function(e){return this._super(e).then(function(t){t.setProperties({selectedAppointmentType:e.appointmentType,selectedProvider:e.provider,selectedStatus:e.status});var n=e.startDate;return n=new Date,a.default.isEmpty(e.startDate)||n.setTime(e.startDate),t.set("selectedStartingDate",n),t.set("display_selectedStartingDate",this._dateFormat(n)),t}.bind(this))}})}),define("hospitalrun/appointments/search/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"jVMV4UgE",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],7]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["partial","appointments/item"],["text","\\n"]],"locals":["appointment"]},{"statements":[["append",["helper",["t"],["labels.status"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.with"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.location"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.type"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.date"],null],false]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["selectedStartingDate",["helper",["t"],["appointments.labels.selectedStartingDate"],null],"col-sm-3"]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["class","property","label","content"],["col-sm-3","selectedStatus",["helper",["t"],["labels.status"],null],["get",["appointmentStatusesWithEmpty"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content"],["col-sm-3",["helper",["t"],["labels.type"],null],"selectedAppointmentType",["get",["visitTypesWithEmpty"]]]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["class","property","label","content"],["col-sm-3","selectedProvider",["helper",["t"],["labels.with"],null],["get",["physicianList"]]]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-info"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],6],["text"," "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-footer"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"search"]],["flush-element"],["append",["helper",["t"],["buttons.search"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["date",["get",["sortDesc"]],["get",["sortKey"]]]],5],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.name"],null],false],["close-element"],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["appointmentType",["get",["sortDesc"]],["get",["sortKey"]]]],4],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["location",["get",["sortDesc"]],["get",["sortKey"]]]],3],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["provider",["get",["sortDesc"]],["get",["sortKey"]]]],2],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["status",["get",["sortDesc"]],["get",["sortKey"]]]],1],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,0],["text"," "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":true}',meta:{moduleName:"hospitalrun/appointments/search/template.hbs"}})}),define("hospitalrun/appointments/today/controller",["exports","hospitalrun/appointments/index/controller"],function(e,t){e.default=t.default.extend({startKey:[]})}),define("hospitalrun/appointments/today/route",["exports","hospitalrun/appointments/index/route","ember-i18n"],function(e,t,n){e.default=t.default.extend({editReturn:"appointments.today",modelName:"appointment",pageTitle:(0,n.translationMacro)("appointments.todayTitle"),_modelQueryParams:function(){var e=moment().endOf("day").toDate().getTime(),t=this.get("maxValue"),n=moment().startOf("day").toDate().getTime();return{options:{startkey:[n,null,"appointment_"],endkey:[e,e,"appointment_"+t]},mapReduce:"appointments_by_date"}}})}),define("hospitalrun/appointments/today/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"NpXWri4D",block:'{"statements":[["partial","appointments/index"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[],"hasPartials":true}',meta:{moduleName:"hospitalrun/appointments/today/template.hbs"}})}),define("hospitalrun/authenticators/custom",["exports","ember","ember-simple-auth/authenticators/base"],function(e,t,n){e.default=n.default.extend({config:t.default.inject.service(),database:t.default.inject.service(), -serverEndpoint:"/db/_session",useGoogleAuth:!1,_absolutizeExpirationTime:function(e){if(!t.default.isEmpty(e))return new Date((new Date).getTime()+1e3*(e-5)).getTime()},_checkUser:function(e){var n=this;return new t.default.RSVP.Promise(function(t,a){n._makeRequest("POST",{name:e.name},"/chkuser").then(function(n){n.error&&a(n),e.displayName=n.displayName,e.role=n.role,e.prefix=n.prefix,t(e)},function(){t(e)})})},_getPromise:function(e,n){return new t.default.RSVP.Promise(function(a,l){this._makeRequest(e,n).then(function(e){t.default.run(function(){a(e)})},function(e){t.default.run(function(){l(e.responseJSON||e.responseText)})})}.bind(this))},_makeRequest:function(e,n,a){return a||(a=this.serverEndpoint),t.default.$.ajax({url:a,type:e,data:n,dataType:"json",contentType:"application/x-www-form-urlencoded",xhrFields:{withCredentials:!0}})},authenticate:function(e){var n=this;if(e.google_auth){var a=function(){n.useGoogleAuth=!0;var a={google_auth:!0,consumer_key:e.params.k,consumer_secret:e.params.s1,token:e.params.t,token_secret:e.params.s2,name:e.params.i};return{v:new t.default.RSVP.Promise(function(e,t){n._checkUser(a).then(function(t){e(t),n.get("config").setCurrentUser(t.name)},t)})}}();if("object"==typeof a)return a.v}return new t.default.RSVP.Promise(function(t,a){var l={name:e.identification,password:e.password};n._makeRequest("POST",l).then(function(e){e.name=l.name,e.expires_at=n._absolutizeExpirationTime(600),n._checkUser(e).then(function(e){n.get("config").setCurrentUser(e.name);var l=n.get("database");l.setup({}).then(function(){t(e)},a)},a)},function(e){a(e.responseJSON||e.responseText)})})},invalidate:function(){return this.useGoogleAuth?t.default.RSVP.resolve():this._getPromise("DELETE")},restore:function(e){var n=this;return new t.default.RSVP.Promise(function(a,l){var s=(new Date).getTime();!t.default.isEmpty(e.expires_at)&&e.expires_at0;){var l=a.splice(0,t).map(this._mapCheckboxValues.bind(this));e.push(l)}return e}.property("content","checkboxesPerRow"),actions:{checkboxChanged:function(e,n){var a=this.get("property"),l="model."+a,s=this.get(l);t.default.isArray(s)||(s=[]),n&&!s.includes(e)?s.addObject(e):!n&&s.includes(e)&&s.removeObject(e),this.set(l,s),this.set("selection",s),this.get("model").validate().catch(t.default.K)}}})}),define("hospitalrun/components/control-within-label",["exports","ember-rapid-forms/components/control-within-label"],function(e,t){e.default=t.default}),define("hospitalrun/components/custom-form-manager",["exports","ember","hospitalrun/utils/select-values"],function(e,t,n){var a=t.default.computed,l=t.default.isEmpty;e.default=t.default.Component.extend(n.default,{customForms:t.default.inject.service(),formType:null,formsForType:null,model:null,openModalAction:"openModal",didReceiveAttrs:function(){var e=this;this._super.apply(this,arguments);var t=this.get("customForms"),n=this.get("formType");t.getCustomForms([n]).then(function(t){var n=e.get("isDestroyed");n||e.set("formsForType",t)})},formsForSelect:a("formsForType","usedForms",function(){var e=this.get("formsForType"),t=this.get("usedForms");if(!l(e)){var n=e.filter(function(e){return!t.includes(e.get("id"))});return n=n.map(function(e){return{id:e.get("id"),value:e.get("name")}})}}),formsToDisplay:a("formsForType","model.customForms",function(){var e=this.get("formsForType"),t=this.get("model.customForms");if(!l(t)&&!l(e))return Object.keys(t).map(function(t){return{form:e.findBy("id",t),propertyPrefix:"customForms."+t+"."}})}),usedForms:a("model.customForms",function(){var e=this.get("model.customForms");return l(e)?[]:Object.keys(e)}),showAddButton:a("formsForSelect",function(){var e=this.get("formsForSelect");return!l(e)}),actions:{addForm:function(){var e=this.get("model"),n=this.get("formsForSelect");this.sendAction("openModalAction","custom-form-add",t.default.Object.create({modelToAddTo:e,customForms:n}))}}})}),define("hospitalrun/components/custom-form",["exports","ember","hospitalrun/utils/select-values"],function(e,t,n){var a=t.default.computed,l=t.default.isEmpty;e.default=t.default.Component.extend(n.default,{classNames:"detail-section-content",propertyPrefix:"",fieldsByRow:a("form","form.fields.[]","form.columns",function(){var e=this,n=[],a=this.get("form"),s=this.get("form.fields");return l(a)||l(s)||!function(){var a=e.getWithDefault("form.columns",1),l=[],i=0,o=Math.floor(12/a);s.forEach(function(e){var s=e.get("classNames");s||(s="");var r=e.get("colSpan")||1;(i===a||i+r>a)&&(n.push(l.slice()),l=[],i=0),s+=" col-sm-"+o*r,e.set("displayClassNames",s),"radio"===e.get("type")&&e.set("mappedValues",e.get("values").map(function(e){return t.default.get(e,"label")})),l.push(e),i+=r}),i>0&&n.push(l)}(),n})})}),define("hospitalrun/components/date-input",["exports","ember","ember-rapid-forms/components/html-input"],function(e,t,n){e.default=n.default.extend({_picker:null,_shouldSetDate:function(e,n){return n&&(t.default.isEmpty(e)||t.default.isEmpty(n.getDate())||e.getTime&&n.getDate().getTime()!==e.getTime())},currentDateChangedValue:function(){var e=this.get("currentDate"),n=this.get("_picker");!t.default.isEmpty(e)&&this._shouldSetDate(e,n)&&n.setDate(e)},format:function(){var e=this.get("showTime");return e?"l h:mm A":"l"}.property("mainComponent.showTime"),showTimeChanged:function(){var e=this.get("_picker");e&&(e.destroy(),this.didInsertElement())}.observes("mainComponent.showTime"),dateSet:function(){var e=this.get("currentDate"),n=this.get("_picker");if(this._shouldSetDate(e,n)){var a=n.getDate(),l=this.get("mainComponent"),s=l.get("dateSetAction");this.set("currentDate",a),t.default.isEmpty(s)||l.sendAction("dateSetAction",a)}},didInsertElement:function(){var e=this.get("currentDate"),n=this.$("input"),a=null,l=this.getProperties("format","yearRange","showTime");l.onSelect=this.dateSet.bind(this),t.default.isEmpty(this.get("minDate"))||(l.minDate=this.get("minDate"),"now"===l.minDate&&(l.minDate=new Date)),t.default.isEmpty(this.get("maxDate"))||(l.maxDate=this.get("maxDate"),"now"===l.maxDate&&(l.maxDate=new Date)),l.field=n[0],a=new Pikaday(l),t.default.run.next(this,function(){a.setDate(e)}),this.set("_picker",a)},didReceiveAttrs:function(){this._super.apply(this,arguments);var e=this.get("mainComponent.originalPropery"),n="display_"+e;this.currentDate=t.default.computed.alias("mainComponent.model."+e),this.minDate=t.default.computed.alias("mainComponent.minDate"),this.maxDate=t.default.computed.alias("mainComponent.maxDate"),this.showTime=t.default.computed.alias("mainComponent.showTime"),this.yearRange=t.default.computed.alias("mainComponent.yearRange"),this.addObserver("mainComponent.model."+e,this,this.currentDateChangedValue),t.default.Binding.from("mainComponent.model.errors."+e).to("mainComponent.model.errors."+n).connect(this)},willDestroyElement:function(){var e=this.get("_picker");e&&e.destroy(),this.set("_picker",null)}})}),define("hospitalrun/components/date-picker",["exports","ember-rapid-forms/components/em-input"],function(e,t){e.default=t.default.extend({dateSetAction:null,htmlComponent:"date-input",minDate:null,maxDate:null,originalPropery:null,showTime:!1,yearRange:10,didReceiveAttrs:function(e){var t=this.get("property"),n="display_"+t;this.set("property",n),this.set("originalPropery",t),this._super(e)}})}),define("hospitalrun/components/date-time-picker",["exports","ember"],function(e,t){var n=t.default.computed,a=t.default.isEmpty;e.default=t.default.Component.extend({i18n:t.default.inject.service(),dateTimePickerDate:null,datePickerClass:"",endDate:t.default.computed.alias("model.endDate"),endHour:null,endMinute:null,label:"",startDate:t.default.computed.alias("model.startDate"),startHour:null,startMinute:null,didReceiveAttrs:function(){var e=moment(this.get("endDate")),t=moment(this.get("startDate"));a(e)&&(e=t),this.set("endHour",e.hour()),this.set("endMinute",e.minute()),this.set("startHour",t.hour()),this.set("startMinute",t.minute()),this.set("dateTimePickerDate",t.toDate()),this._updateDates()},hourList:n(function(){var e=void 0,t=[],n=this.get("i18n");for(e=0;e<24;e++){var a=void 0,l={hour:e%12};a=0===e?n.t("components.dateTimePicker.midnight"):12===e?n.t("components.dateTimePicker.noon"):e<12?n.t("components.dateTimePicker.amHour",l):n.t("components.dateTimePicker.pmHour",l),t.push({name:a,value:e})}return t}),isAllDay:n("model.allDay",function(){var e=this.get("model.allDay");return e&&(this.set("startHour",0),this.set("startMinute",0),this.set("endHour",23),this.set("endMinute",59),this._updateDates()),e}),minuteList:n(function(){var e=void 0,t=[];for(e=0;e<60;e++)t.push({name:String("00"+e).slice(-2),value:e});return t}),actions:{dateChanged:function(){this._updateDates()},endHourChanged:function(e){this.set("endHour",e),this._updateDates()},endMinuteChanged:function(e){this.set("endMinute",e),this._updateDates()},startHourChanged:function(e){this.set("startHour",e),this._updateDates()},startMinuteChanged:function(e){this.set("startMinute",e),this._updateDates()}},endTimeHasError:n("model.isValid",function(){var e=this.get("model.errors.endDate");return e.length>0}),_updateDates:function(){var e=this;t.default.run.once(this,function(){var n=["start","end"];n.forEach(function(n){var a=n+"Date",l=e.get(a),s=e.get("dateTimePickerDate"),i=e.get(n+"Hour"),o=e.get(n+"Minute");t.default.isEmpty(s)||(l=moment(s),l.hour(i),l.minute(o),e.set(a,l.toDate()))});var a=e.get("model");a.validate().catch(t.default.K)})}})}),define("hospitalrun/components/edit-panel",["exports","ember"],function(e,t){e.default=t.default.Component.extend({editPanelProps:null,cancelAction:"cancel",actions:{cancel:function(){this.sendAction("cancelAction")},disabledAction:function(){this.sendAction("editPanelProps.disabledAction")},fireButtonAction:function(e){this.set(e,e),this.sendAction(e)},updateButtonAction:function(){this.sendAction("editPanelProps.updateButtonAction")}}})}),define("hospitalrun/components/em-checkbox",["exports","ember-rapid-forms/components/em-checkbox"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-custom-input",["exports","ember-rapid-forms/components/em-custom-input"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-form-control-help",["exports","ember-rapid-forms/components/em-form-control-help"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-form-group",["exports","ember-rapid-forms/components/em-form-group"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-form-label",["exports","ember-rapid-forms/components/em-form-label"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-form-submit",["exports","ember-rapid-forms/components/em-form-submit"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-form",["exports","ember-rapid-forms/components/em-form"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-input",["exports","ember-rapid-forms/components/em-input"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-select",["exports","ember-rapid-forms/components/em-select"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-text",["exports","ember-rapid-forms/components/em-text"],function(e,t){e.default=t.default}),define("hospitalrun/components/erf-html-checkbox",["exports","ember-rapid-forms/components/html-checkbox"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/components/erf-html-custom-input",["exports","ember-rapid-forms/components/html-custom-input"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/components/erf-html-input",["exports","ember-rapid-forms/components/html-input"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/components/erf-html-select",["exports","ember-rapid-forms/components/html-select"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/components/erf-html-text",["exports","ember-rapid-forms/components/html-text"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/components/ext-radio",["exports","ember"],function(e,t){e.default=t.default.Component.extend({includeOtherOption:!1,otherOptionLabel:null,showInline:!1,haveLabel:function(){var e=this.get("content.firstObject");return!t.default.isEmpty(e.label)}.property("content"),radioClass:function(){return this.get("showInline")?"radio-inline":"radio"}.property("showInline")})}),define("hospitalrun/components/file-upload",["exports","hospitalrun/components/image-upload"],function(e,t){e.default=t.default.extend({resizeFile:!1})}),define("hospitalrun/components/form-group-control",["exports","ember-rapid-forms/components/form-group-control"],function(e,t){e.default=t.default}),define("hospitalrun/components/form-group",["exports","ember-rapid-forms/components/form-group"],function(e,t){e.default=t.default}),define("hospitalrun/components/icd10-pcs-typeahead",["exports","hospitalrun/components/icd10-typeahead"],function(e,t){e.default=t.default.extend()}),define("hospitalrun/components/icd10-typeahead",["exports","hospitalrun/components/type-ahead"],function(e,t){e.default=t.default.extend({class:"scrollable-typeahead",minlength:2,selectionKey:"id",setOnBlur:!0,templates:{header:''},_sourceQuery:function(e,t){this.bloodhound.get(e,function(n){t(n);var a=this.$(".query-results");a.html(""+e+" returned "+n.length+" results")}.bind(this))},_getSource:function(){return this._sourceQuery.bind(this)}})}),define("hospitalrun/components/image-upload",["exports","ember-rapid-forms/components/em-input"],function(e,t){e.default=t.default.extend({fileInputEl:null,resizeFile:!0,selectedFile:null,type:"file",_fileChanged:function(){var e=this,t=this.get("fileInputEl"),n=this.get("resizeFile");n?!function(){window.URL=window.URL||window.webkitURL;var n=window.URL.createObjectURL(t.files[0]),a=new Image;a.src=n,a.onload=function(){window.URL.revokeObjectURL(n),this.set("selectedFile",this._resizeImage(a))}.bind(e)}():this.set("selectedFile",t.files[0])},_resizeImage:function(e){var t=document.createElement("canvas"),n=e.height,a=e.width,l=1024,s=1024;a>n?a>s&&(n=Math.round(n*=s/a),a=s):n>l&&(a=Math.round(a*=l/n),n=l),t.width=a,t.height=n;var i=t.getContext("2d");i.drawImage(e,0,0,a,n);for(var o=t.toDataURL("image/png"),r=atob(o.split(",")[1]),d=[],c=0;c=l&&(s=a),o},0),s>-1?a.get("length")>s+1&&(a=a.slice(0,s+1),this.set("calculatedLocationPickers",a)):a.addObject(t.default.Object.create()),this._setupLocationPickers(a,n)),a.forEach(function(e){i.addObject(e.get("selectedLocation"))}),this.set("componentSelectedLocations",i)},_setup:function(){t.default.Binding.from("selectedLocations").to("componentSelectedLocations").connect(this)}.on("init"),_setupLocationPickers:function(e,a,l){e.reduce(function(e,t){var a=t.get("selectedLocation");return t.set("subLocationList",e.map(n.default.selectObjectMap)),e.includes(a)&&!l||t.set("selectedLocation",e.get("firstObject")),t.set("label","And"),e.filter(function(e){return t.get("selectedLocation.id")!==e.get("id")})},a);var s=e.get("firstObject");t.default.isEmpty(s)||s.set("label",this.get("label")),this.set("calculatedLocationPickers",e)},locationPickers:function(){var e=this.get("locationList"),n=[],a=this.get("quantityRequested");if(!t.default.isEmpty(e)&&!t.default.isEmpty(a))return this.set("doingSetup",!0),e.reduce(function(e,l){return e0)return"have-inventory-items"}.property("content"),mappedContent:function(){var e=this.get("content"),t=[];return e&&(t=e.map(this._mapInventoryItems.bind(this))),t}.property("content"),contentChanged:function(){var e=this.get("bloodhound"),t=this.get("content");e&&(e.clear(),e.add(t.map(this._mapInventoryItems.bind(this))))}.observes("content.[]"),itemSelected:function(e){var n=this;this._super();var a=this.get("store");t.default.isEmpty(e)||a.find("inventory",e.id).then(function(e){var a=n.get("model");a.set("inventoryItem",e),t.default.run.once(n,function(){a.validate().catch(t.default.K)})})}})}),define("hospitalrun/components/item-listing",["exports","ember","hospitalrun/mixins/paging-actions"],function(e,t,n){e.default=t.default.Component.extend(n.default,{classNames:["panel","panel-primary"]})}),define("hospitalrun/components/loading-message",["exports","ember","ember-i18n"],function(e,t,n){e.default=t.default.Component.extend({tagName:"span",showLoadingMessages:!1,loadingMessages:[(0,n.translationMacro)("loading.messages.0"),(0,n.translationMacro)("loading.messages.1"),(0,n.translationMacro)("loading.messages.2"),(0,n.translationMacro)("loading.messages.3"),(0,n.translationMacro)("loading.messages.4"),(0,n.translationMacro)("loading.messages.5"),(0,n.translationMacro)("loading.messages.6"),(0,n.translationMacro)("loading.messages.7"),(0,n.translationMacro)("loading.messages.8"),(0,n.translationMacro)("loading.messages.9"),(0,n.translationMacro)("loading.messages.10"),(0,n.translationMacro)("loading.messages.11")],_setRandomMessage:function(){var e=this.get("loadingMessages"),n=Math.floor(Math.random()*e.length);this.set("message",e[n]),this.set("timer",t.default.run.later(this,this._setRandomMessage,1e3))},didInsertElement:function(){this._setRandomMessage()},willDestroyElement:function(){var e=this.get("timer");t.default.isEmpty(e)||t.default.run.cancel(e)}})}),define("hospitalrun/components/location-select",["exports","ember"],function(e,t){e.default=t.default.Component.extend({locationPicker:null,_setup:function(){this.locationChange=this.currentLocationChanged.bind(this)}.on("init"),currentLocationChanged:function(e){this.get("locationPicker").set("selectedLocation",e),t.default.run.once(this,function(){this.get("parentView").locationChange()})}})}),define("hospitalrun/components/medication-allergy",["exports","ember"],function(e,t){var n=t.default.computed,a=t.default.get,l=t.default.isEmpty;e.default=t.default.Component.extend({classNames:"ps-info-group long-form",store:t.default.inject.service(),i18n:t.default.inject.service(),patient:null,displayModal:!1,currentAllergy:!1,buttonConfirmText:n("currentAllergy",function(){var e=this.get("i18n"),t=this.get("currentAllergy");return t?e.t("buttons.update"):e.t("buttons.add")}),additionalButtons:n("currentAllergy",function(){var e=this.get("currentAllergy"),t=this.get("i18n").t("buttons.delete");if(e)return[{class:"btn btn-default warning",buttonAction:"deleteAllergy",buttonIcon:"octicon octicon-x",buttonText:t}]}),showAllergies:n("canAddAllergy","patient.allergies.[]",{get:function(){var e=a(this,"canAddAllergy"),t=a(this,"patient.allergies");return e||!l(t)}}),modalTitle:t.default.computed("currentAllergy",function(){var e=this.get("currentAllergy"),t=this.get("i18n");return e?t.t("allergies.titles.editAllergy"):t.t("allergies.titles.addAllergy")}),closeAllergyModal:function(){this.set("currentAllergy",!1),this.set("displayModal",!1)},actions:{cancel:function(){this.closeAllergyModal()},closeModal:function(){this.closeAllergyModal()},editAllergy:function(e){this.set("currentAllergy",e),this.set("displayModal",!0)},createNewAllergy:function(){this.set("displayModal",!0)},updateAllergy:function(){var e=this,t=this.get("patient"),n=this.get("currentAllergy");n?n.save().then(function(){e.closeAllergyModal()}):(n=this.get("store").createRecord("allergy",{name:this.get("name")}),n.save().then(function(){t.get("allergies").pushObject(n),t.save().then(function(){e.set("name",""),e.closeAllergyModal()})}))},deleteAllergy:function(){var e=this,t=this.get("currentAllergy"),n=this.get("patient"),a=n.get("allergies");t.destroyRecord().then(function(){a.removeObject(t),n.save().then(function(){e.closeAllergyModal()})})}}})}),define("hospitalrun/components/modal-dialog",["exports","ember"],function(e,t){e.default=t.default.Component.extend({i18n:t.default.inject.service(),cancelAction:"cancel",closeModalAction:"closeModal",hideCancelButton:!1,hideUpdateButton:!1,isUpdateDisabled:!1,title:"",updateButtonAction:"",updateButtonClass:"",updateButtonText:"",cancelButtonText:"",cancelBtnText:function(){var e=this.get("cancelButtonText");return t.default.isEmpty(e)?this.get("i18n").t("buttons.cancel"):e}.property("cancelButtonText"),actions:{cancelAction:function(){this.sendAction("cancelAction")},fireButtonAction:function(e){this.set(e,e),this.sendAction(e)},updateAction:function(){this.sendAction("updateButtonAction")}},didInsertElement:function(){var e=this.$(".modal").modal();e.on("hidden.bs.modal",function(){this.sendAction("closeModalAction"),this.sendAction("cancelAction")}.bind(this))},willDestroyElement:function(){var e=this.$(".modal");e.off("hidden.bs.modal"),e.modal("hide"),$("body").removeClass("modal-open"),$(".modal-backdrop").remove()}})}),define("hospitalrun/components/nav-menu",["exports","ember","hospitalrun/mixins/user-session"],function(e,t,n){e.default=t.default.Component.extend(n.default,{tagName:"div",classNames:["primary-nav-item"],nav:null,show:function(){return this._setupSubNav(),this.currentUserCan(this.get("nav").capability)}.property("nav","session.data.authenticated.userCaps"),isShowing:!1,_setup:function(){var e=this.get("nav");e.closeSubnav=function(){this.set("isShowing",!1)}.bind(this),this._setupSubNav()}.on("init"),_setupSubNav:function(){var e=this,t=this.get("nav");t.subnav.forEach(function(t){t.show=e.currentUserCan(t.capability)})},callNavAction:"navAction",callCloseSettings:"closeSettings",actions:{toggleContent:function(){this.set("isShowing",!this.get("isShowing")),this.sendAction("callNavAction",this.nav)},resetNav:function(){this.sendAction("callCloseSettings")}}})}),define("hospitalrun/components/nav-paging",["exports","ember","hospitalrun/mixins/paging-actions"],function(e,t,n){e.default=t.default.Component.extend(n.default,{classNames:["paging-buttons"],paginationProps:null})}),define("hospitalrun/components/number-input",["exports","ember-rapid-forms/components/em-input"],function(e,t){e.default=t.default.extend({sanitizeFunction:function(e){return e.replace(new RegExp(/([^0-9|.]+)/g),"")},focusOut:function(){return this._sanitizeValue(),this._super()},keyUp:function(){return this._sanitizeValue(),this._super()},_sanitizeValue:function(){var e=this.get("model"),t=this.get("property"),n=e.get(t),a=this.get("sanitizeFunction")(n);e.set(t,a)}})}),define("hospitalrun/components/operative-procedures",["exports","ember"],function(e,t){function n(e){var t=s(e,"procedures"),n=s(e,"procedureDescription");l(n)||(t.addObject({description:n}),i(e,"procedureDescription",null))}e.addProcedure=n;var a=t.default.computed,l=t.default.isEmpty,s=t.default.get,i=t.default.set;e.default=t.default.Component.extend({model:null,procedureList:null,haveProcedures:a("model.procedures.[]",{get:function(){return!l(s(this,"model.procedures"))}}),actions:{addProcedure:function(){var e=s(this,"model");n(e)},deleteProcedure:function(e){var t=s(this,"model"),n=s(t,"procedures");n.removeObject(e),t.validate()}}})}),define("hospitalrun/components/patient-diagnosis",["exports","ember","hospitalrun/mixins/patient-diagnosis","ember-i18n","hospitalrun/mixins/user-session"],function(e,t,n,a,l){var s=t.default.computed,i=t.default.get,o=["diagnosisContainer","hideInActiveDiagnoses","diagnosisContainer.diagnoses.@each.active","diagnosisContainer.diagnoses.@each.secondaryDiagnosis"];e.default=t.default.Component.extend(n.default,l.default,{i18n:t.default.inject.service(),allowAddDiagnosis:!1,diagnosisContainer:null,diagnosisProperty:null,diagnosisList:null,editDiagnosisAction:"editDiagnosis",hideInActiveDiagnoses:!0,showAddDiagnosisAction:"showAddDiagnosis",primaryDiagnosisLabel:(0,a.translationMacro)("patients.labels.primaryDiagnosis"),secondaryDiagnosisLabel:(0,a.translationMacro)("patients.labels.secondaryDiagnosis"),canAddDiagnosis:s("allowAddDiagnosis",{get:function(){var e=i(this,"allowAddDiagnosis");return e&&this.currentUserCan("add_diagnosis")}}),havePrimaryDiagnoses:s("primaryDiagnoses.length",{get:function(){var e=this.get("primaryDiagnoses.length");return e>0}}),haveSecondaryDiagnoses:s("secondaryDiagnoses.length",{get:function(){var e=this.get("secondaryDiagnoses.length");return e>0}}),primaryDiagnoses:s.apply(void 0,o.concat([{get:function(){var e=this.get("diagnosisContainer"),t=this.get("hideInActiveDiagnoses");return this.getDiagnoses(e,t,!1)}}])),secondaryDiagnoses:s.apply(void 0,o.concat([{get:function(){var e=this.get("diagnosisContainer"),t=this.get("hideInActiveDiagnoses");return this.getDiagnoses(e,t,!0)}}])),showPrimaryDiagnoses:s("canAddDiagnosis","havePrimaryDiagnoses",{get:function(){return this.get("canAddDiagnosis")||this.get("havePrimaryDiagnoses")}}),actions:{editDiagnosis:function(e){this.sendAction("editDiagnosisAction",e)},showAddDiagnosis:function(){this.sendAction("showAddDiagnosisAction")}}})}),define("hospitalrun/components/patient-orders",["exports","ember","hospitalrun/mixins/filter-list","hospitalrun/mixins/user-session"],function(e,t,n,a){var l=t.default.computed;e.default=t.default.Component.extend(n.default,a.default,{editImagingAction:"editImaging",editLabAction:"editLab",editMedicationAction:"editMedication",filterBy:null,filterValue:null,newImagingAction:"newImaging",newLabAction:"newLab",newMedicationAction:"newMedication",showDeleteImagingAction:"showDeleteImaging",showDeleteLabAction:"showDeleteLab",showDeleteMedicationAction:"showDeleteMedication",sortKey:null,sortDesc:!1,orderTypeFilters:t.default.computed(function(){var e=this.get("i18n");return[e.t("components.patientOrders.labels.imagingOrderType").toString(),e.t("components.patientOrders.labels.labOrderType").toString(),e.t("components.patientOrders.labels.medicationOrderType").toString()]}),canAddImaging:t.default.computed(function(){return this.currentUserCan("add_imaging")}),canAddLab:t.default.computed(function(){return this.currentUserCan("add_lab")}),canAddMedication:t.default.computed(function(){return this.currentUserCan("add_medication")}),canDeleteImaging:t.default.computed(function(){return this.currentUserCan("delete_imaging")}),canDeleteLab:t.default.computed(function(){return this.currentUserCan("delete_lab")}),canDeleteMedication:t.default.computed(function(){return this.currentUserCan("delete_medication")}),filteredList:l("orderList.[]","filterBy","filterValue",function(){var e=this.get("filterBy"),t=this.get("filterValue"),n=this.get("orderList");return n=this.filterList(n,e,t)}),orderList:l("visit.imaging.[]","visit.labs.[]","visit.medication.[]",function(){var e=this,n=this.get("i18n"),a=this.get("visit.imaging"),l=this.get("visit.labs"),s=this.get("visit.medication"),i=new t.default.A;return i.addObjects(a.map(function(t){return t.set("orderType",n.t("components.patientOrders.labels.imagingOrderType")),t.set("name",t.get("imagingType.name")),t.set("dateProcessed",t.get("imagingDate")),e._setPermissions(t,"canAddImaging","canDeleteImaging"),t})),i.addObjects(l.map(function(t){return t.set("orderType",n.t("components.patientOrders.labels.labOrderType")),t.set("name",t.get("labType.name")),t.set("dateProcessed",t.get("labDate")),e._setPermissions(t,"canAddLab","canDeleteLab"),t})),i.addObjects(s.map(function(t){return t.set("orderType",n.t("components.patientOrders.labels.medicationOrderType")), -t.set("name",t.get("medicationName")),t.set("dateProcessed",t.get("prescriptionDate")),t.set("result",""),t.set("notes",t.get("prescription")),e._setPermissions(t,"canAddMedication","canDeleteMedication"),t})),i}),sortedOrders:t.default.computed("filteredList","sortKey","sortDesc",function(){var e=this.get("filteredList"),n=this.get("sortDesc"),a=this.get("sortKey");return t.default.isEmpty(e)||t.default.isEmpty(a)?e:e=e.sort(function(e,l){var s=e.get(a),i=l.get(a);return"orderType"===a&&(s=s.toString(),i=i.toString()),n?t.default.compare(i,s):t.default.compare(s,i)})}),i18n:t.default.inject.service(),visit:null,_setPermissions:function(e,t,n){e.get("canEdit")&&(this.get(t)&&e.set("canEdit",!0),this.get(n)&&e.set("canDelete",!0))},actions:{filter:function(e,t){this.setProperties({filterBy:e,filterValue:t})},newImaging:function(){this.sendAction("newImagingAction")},newLab:function(){this.sendAction("newLabAction")},newMedication:function(){this.sendAction("newMedicationAction")},editOrder:function(e){var t=e.get("constructor.modelName").capitalize();this.sendAction("edit"+t+"Action",e)},showDeleteOrder:function(e){var t=e.get("constructor.modelName").capitalize();this.sendAction("showDelete"+t+"Action",e)},sortByKey:function(e,t){this.setProperties({sortKey:e,sortDesc:t})}}})}),define("hospitalrun/components/patient-summary",["exports","ember","hospitalrun/mixins/user-session"],function(e,t,n){var a=t.default.computed,l=t.default.get,s=t.default.isEmpty,i=t.default.set;e.default=t.default.Component.extend(n.default,{allowAddAllergy:!1,allowAddDiagnosis:!1,allowAddOperativePlan:!1,classNames:["patient-summary"],diagnosisContainer:null,diagnosisList:null,disablePatientLink:!1,editDiagnosisAction:"editDiagnosis",editOperativePlanAction:"editOperativePlan",editOperationReportAction:"editOperationReport",editProcedureAction:"editProcedure",hideInActiveDiagnoses:!0,patient:null,patientProcedures:null,showAddDiagnosisAction:"showAddDiagnosis",showPatientAction:"showPatient",canAddAllergy:a("allowAddAllergy",{get:function(){var e=l(this,"allowAddAllergy");return e&&this.currentUserCan("add_allergy")}}),canAddOperativePlan:a("allowAddOperativePlan",{get:function(){var e=l(this,"allowAddOperativePlan");return e&&this.currentUserCan("add_operative_plan")}}),currentOperativePlan:a("patient.operativePlans.@each.status",{get:function(){var e=l(this,"patient.operativePlans");return e.findBy("isPlanned",!0)}}),haveProcedures:a("patientProcedures.length",function(){var e=this.get("patientProcedures.length");return e>0}),shouldLinkToPatient:a("disablePatientLink",function(){var e=this.get("disablePatientLink");return!e}),didReceiveAttrs:function(){this._super.apply(this,arguments);var e=l(this,"diagnosisContainer");s(e)&&i(this,"diagnosisContainer",l(this,"patient"))},actions:{addOperativePlan:function(){this.sendAction("editOperativePlanAction")},editOperativePlan:function(e){this.sendAction("editOperativePlanAction",e)},linkToPatient:function(){var e=this.get("shouldLinkToPatient");if(e){var t=this.get("patient"),n=this.get("returnTo"),a=this.get("returnToContext");t.set("returnTo",n),t.set("returnToContext",a),this.sendAction("showPatientAction",this.get("patient"))}},editDiagnosis:function(e){this.sendAction("editDiagnosisAction",e)},editProcedure:function(e){var t=l(e,"report");s(t)?this.sendAction("editProcedureAction",e):this.sendAction("editOperationReportAction",t)},showAddDiagnosis:function(){this.sendAction("showAddDiagnosisAction")}}})}),define("hospitalrun/components/patient-typeahead",["exports","ember","hospitalrun/mixins/patient-name","hospitalrun/components/type-ahead"],function(e,t,n,a){e.default=a.default.extend(n.default,{displayKey:"name",selectedAction:"selectedPatientChanged",setOnBlur:!0,_mapPatient:function(e){var t={};return t.name=this.getPatientDisplayName(e)+" - "+this.getPatientDisplayId(e),t[this.get("selectionKey")]=e,t},contentChanged:function(){var e=this.get("bloodhound"),n=this.get("content");e&&(e.clear(),t.default.isEmpty(n)||e.add(n.map(this._mapPatient.bind(this))))}.observes("content.[]"),mappedContent:function(){var e=this.get("content"),t=[];return e&&(t=e.map(this._mapPatient.bind(this))),t}.property("content")})}),define("hospitalrun/components/photo-display",["exports","ember"],function(e,t){e.default=t.default.Component.extend({computedPhotoUrl:null,filesystem:t.default.inject.service(),isFileSystemEnabled:t.default.computed.alias("filesystem.isFileSystemEnabled"),fileName:t.default.computed.alias("photo.fileName"),photo:null,url:t.default.computed.alias("photo.url"),photoUrl:function(){var e=this.get("computedPhotoUrl"),n=this.get("fileName"),a=this.get("filesystem"),l=this.get("isFileSystemEnabled"),s=this.get("url");return t.default.isEmpty(e)?(l&&a.pathToFileSystemURL(n).then(function(e){t.default.isEmpty(e)||this.set("computedPhotoUrl",e)}.bind(this)),s):e}.property("computedPhotoUrl","fileName","url")})}),define("hospitalrun/components/price-list",["exports","ember","hospitalrun/mixins/charge-actions"],function(e,t,n){e.default=t.default.Component.extend(n.default,{attributeBindings:["tabId:id","role"],charges:t.default.computed.alias("model.charges"),classNameBindings:["active"],classNames:["tab-pane"],index:null,model:null,pricingList:null,pricingType:null,role:"tab",setChargeQuantityAction:"setChargeQuantity",active:function(){var e=this.get("index");return 0===e}.property(),pricingListByType:function(){var e=this.get("pricingList"),n=this.get("pricingType"),a=[];if(!t.default.isEmpty(e)){e=e.filterBy("pricingType",n),e=e.map(function(e){var t=this.findChargeForPricingItem(e,this.get("charges"));return t&&this.sendAction("setChargeQuantityAction",e.id,t.get("quantity")),e}.bind(this));for(var l=0,s=e,i=s.length;l1&&!t.default.isEmpty(e)&&!isNaN(e)}.property("calculated"),currentQuantityGroups:function(){var e=void 0,n=this.get("quantityGroups"),a=this.get("targetUnit");if(e=n.get("firstObject"),!t.default.isEmpty(e)){var l=e.unit;t.default.isEmpty(l)?this.set("quantityGroups.firstObject.unit",a):this.updateCurrentUnit(l,0)}return n}.property("quantityGroups","targetUnit"),calculateTotal:function(){var e=this.get("quantityGroups"),n=!1,a=e.get("lastObject"),l=this.get("targetUnit");if(n=e.every(function(e){var n=e.quantity,a=e.unit;return!t.default.isEmpty(n)&&!t.default.isEmpty(a)&&!isNaN(n)}),n&&a.unit===l){var s=e.reduce(function(e,t){return e*parseInt(t.quantity)},1);this.set("calculated",s)}else this.set("calculated")},updateCurrentUnit:function(e,n){var a=this.get("targetUnit"),l=this.get("quantityGroups"),s=l.length;t.default.isEmpty(a)||(e===a?n0&&(this.set("selectedCamera",a[0].id),this.cameraChange(a[0].id))},_gotStream:function(e){if(this.isDestroyed)this._stopStream(e);else{var t=this.get("video");this.set("stream",e),t.src=window.URL.createObjectURL(e),t.play()}},_photoSourceChanged:function(e){var t=this.$(".camera"),n=this.$(".fileupload"),a=this.get("setupCamera");if(this.set("photoSource",e),e===l)n.show(),t.hide();else if(n.hide(),t.show(),!a){var s=this.$("canvas").get(0),i=this.$("img").get(0),o=this.$("video").get(0);this.setProperties({canvas:s,photo:i,video:o}),"undefined"==typeof MediaStreamTrack||"undefined"===MediaStreamTrack.getSources?navigator.getUserMedia&&(navigator.getUserMedia({audio:!1,video:!0},this._gotStream.bind(this),this._errorCallback),this._setupCanPlayListener(o)):(MediaStreamTrack.getSources(this._gotSources.bind(this)),this._setupCanPlayListener(o)),this.set("setupCamera",!0)}},_setupCanPlayListener:function(e){e.removeEventListener("canplay",this._setupVideo.bind(this),!1),e.addEventListener("canplay",this._setupVideo.bind(this),!1)},_setupVideo:function(){var e=this.get("canvas"),t=this.get("height"),n=this.get("video"),a=this.get("width");t=n.videoHeight/(n.videoWidth/a),n.setAttribute("width",a),n.setAttribute("height",t),e.setAttribute("width",a),e.setAttribute("height",t),this.setProperties({height:t,width:a})},_setup:function(){this.cameraChange=this._cameraChange.bind(this),this.photoSourceChange=this._photoSourceChanged.bind(this);var e=a;this.get("canCaptureVideo")||(e=l),this.set("photoSource",e)}.on("init"),_stopStream:function(e){var a=e||this.get("stream");if(!t.default.isEmpty(a))if("undefined"==typeof a.active)a.stop();else{var l=a.getTracks(),s=n(l,1),i=s[0];i.stop()}},actions:{takePhoto:function(){var e=this.get("canvas"),t=this.get("height"),n=this.get("video"),a=this.get("width");e.width=a,e.height=t,e.getContext("2d").drawImage(n,0,0,a,t);for(var l=e.toDataURL("image/png"),s=atob(l.split(",")[1]),i=[],o=0;o1}.property("photoSource","videoSources"),willDestroyElement:function(){this._stopStream()}})}),define("hospitalrun/components/text-search",["exports","ember"],function(e,t){e.default=t.default.TextField.extend(t.default.TargetActionSupport,{change:function(){this.triggerAction({action:"search"})},didInsertElement:function(){this.$().focus()}})}),define("hospitalrun/components/type-ahead",["exports","ember-rapid-forms/components/em-input","hospitalrun/mixins/typeahead"],function(e,t,n){e.default=t.default.extend(n.default)}),define("hospitalrun/components/typeahead-filter",["exports","ember","hospitalrun/mixins/typeahead"],function(e,t,n){e.default=t.default.Component.extend(n.default,{classNames:["input-group"],selectedAction:"filter",setOnBlur:!1,actions:{clearFilter:function(){var e=this.$(".tt-input");e.val(""),this.sendAction("selectedAction")}}})}),define("hospitalrun/controllers/abstract-delete-controller",["exports","ember"],function(e,t){e.default=t.default.Controller.extend({afterDeleteAction:"closeModal",showUpdateButton:!0,updateButtonText:"Delete",updateButtonAction:"delete",isUpdateDisabled:!1,actions:{cancel:function(){this.send("closeModal")},delete:function(){var e=this.get("model");e.set("archived",!0),e.save().then(function(){e.unloadRecord(),this.send(this.get("afterDeleteAction"),e)}.bind(this))}}})}),define("hospitalrun/controllers/abstract-edit-controller",["exports","ember","hospitalrun/mixins/edit-panel-props","hospitalrun/mixins/is-update-disabled","hospitalrun/mixins/modal-helper","hospitalrun/mixins/user-session"],function(e,t,n,a,l,s){e.default=t.default.Controller.extend(n.default,a.default,l.default,s.default,{cancelAction:"allItems",cancelButtonText:function(){var e=this.get("i18n"),t=this.get("model.hasDirtyAttributes");return t?e.t("buttons.cancel"):e.t("buttons.returnButton")}.property("model.hasDirtyAttributes"),disabledAction:function(){var e=this.get("model");e.validate&&e.validate().catch(t.default.K);var n=e.get("isValid");if(!n)return"showDisabledDialog"}.property("model.isValid"),isNewOrDeleted:function(){return this.get("model.isNew")||this.get("model.isDeleted")}.property("model.isNew","model.isDeleted"),lookupListsToUpdate:null,showUpdateButton:function(){var e=this.get("updateCapability");return this.currentUserCan(e)}.property("updateCapability"),updateButtonAction:"update",updateButtonText:function(){var e=this.get("i18n");return this.get("model.isNew")?e.t("buttons.add"):e.t("buttons.update")}.property("model.isNew"),updateCapability:null,_addValueToLookupList:function(e,n,a,l){var s=e.get("value");t.default.isArray(s)||(s=[]),s.includes(n)||(s.push(n),s.sort(),e.set("value",s),a.includes(e)||a.push(e),this.set(l,e))},_cancelUpdate:function(){var e=this.get("model");e.rollbackAttributes()},actions:{cancel:function(){this._cancelUpdate(),this.send(this.get("cancelAction"))},returnTo:function e(){this._cancelUpdate();var e=this.get("model.returnTo"),n=this.get("model.returnToContext");t.default.isEmpty(n)?this.transitionToRoute(e):this.transitionToRoute(e,n)},showDisabledDialog:function(){var e=this.get("i18n");this.displayAlert(e.t("alerts.warningExclamation"),e.t("messages.requiredFieldsCorrectErrors"))},update:function(e){var t=this;try{this.beforeUpdate().then(function(){t.saveModel(e)}).catch(function(e){if(!e.ignore){var n=t.get("i18n");t.displayAlert(n.t("alerts.errorExclamation"),n.t("messages.saveActionException",{message:JSON.stringify(e)}))}})}catch(e){var n=this.get("i18n");this.displayAlert(n.t("alerts.errorExclamation"),n.t("messages.saveActionException",{message:JSON.stringify(e)}))}}},afterUpdate:function(){},beforeUpdate:function(){return t.default.RSVP.Promise.resolve()},saveModel:function(e){this.get("model").save().then(function(t){this.updateLookupLists(),e||this.afterUpdate(t)}.bind(this))},updateLookupLists:function(){var e=this.get("lookupListsToUpdate"),n=t.default.A();t.default.isEmpty(e)||(e.forEach(function(e){var a=this.get(e.property),l=this.get(e.name),s=this.get("store");t.default.isEmpty(a)||(l||(l=s.push(s.normalize("lookup",{id:e.id,value:[],userCanAdd:!0}))),t.default.isArray(a)?a.forEach(function(t){this._addValueToLookupList(l,t,n,e.name)}.bind(this)):this._addValueToLookupList(l,a,n,e.name))}.bind(this)),n.forEach(function(e){e.save()}))}})}),define("hospitalrun/controllers/abstract-paged-controller",["exports","ember","hospitalrun/mixins/pagination-props","hospitalrun/mixins/progress-dialog","hospitalrun/mixins/user-session"],function(e,t,n,a,l){e.default=t.default.Controller.extend(n.default,a.default,l.default,{addPermission:null,deletePermission:null,nextStartKey:null,previousStartKey:null,previousStartKeys:[],progressMessage:"Loading Records. Please wait...",progressTitle:"Loading",queryParams:["startKey","sortKey","sortDesc"],sortDesc:!1,sortKey:null,canAdd:function(){return this.currentUserCan(this.get("addPermission"))}.property(),canDelete:function(){return this.currentUserCan(this.get("deletePermission"))}.property(),canEdit:function(){return this.currentUserCan(this.get("addPermission"))}.property(),showActions:function(){return this.get("canAdd")||this.get("canEdit")||this.get("canDelete")}.property("canAdd","canEdit","canDelete"),disablePreviousPage:function(){return t.default.isEmpty(this.get("previousStartKey"))}.property("previousStartKey"),disableNextPage:function(){return t.default.isEmpty(this.get("nextStartKey"))}.property("nextStartKey"),showPagination:function(){return!t.default.isEmpty(this.get("previousStartKey"))||!t.default.isEmpty(this.get("nextStartKey"))}.property("nextStartKey","previousStartKey"),hasRecords:t.default.computed("model.length",{get:function(){var e=this.get("model");return!t.default.isEmpty(e)&&e.get("length")>0}}),actions:{nextPage:function(){var e=this.get("nextStartKey"),t=this.get("previousStartKeys"),n=this.get("firstKey");this.set("previousStartKey",n),t.push(n),this.set("startKey",e),this.showProgressModal()},previousPage:function(){var e=this.get("previousStartKey"),t=this.get("previousStartKeys");t.pop(),this.set("startKey",e),this.set("previousStartKey",t.pop()),this.set("previousStartKeys",t),this.showProgressModal()},sortByKey:function(e,t){this.setProperties({previousStartKey:null,previousStartKeys:[],nextStartKey:null,sortDesc:t,sortKey:e,startKey:null,firstKey:null}),this.showProgressModal()}}})}),define("hospitalrun/controllers/abstract-report-controller",["exports","ember","hospitalrun/mixins/date-format","hospitalrun/mixins/modal-helper","hospitalrun/mixins/number-format","hospitalrun/mixins/pagination-props","hospitalrun/mixins/pouchdb","hospitalrun/mixins/progress-dialog"],function(e,t,n,a,l,s,i,o){e.default=t.default.Controller.extend(n.default,a.default,l.default,s.default,i.default,o.default,{defaultErrorMessage:"An error was encountered while generating the requested report. Please let your system administrator know that you have encountered an error.",offset:0,limit:25,progressMessage:"Please wait while your report is generated.",progressTitle:"Generating Report",reportColumns:null,reportHeaders:null,reportRows:[],reportTitle:null,reportType:null,reportTypes:null,showFirstPageButton:!0,showLastPageButton:!0,showReportResults:!1,_addReportRow:function(e,n,a,l){var s=void 0,i=this.get("reportRows"),o=[];t.default.isEmpty(a)&&(a=this.get("reportColumns"));for(var r in a)a[r].include&&(s=t.default.get(e,a[r].property),t.default.isEmpty(s)?o.push(""):"_numberFormat"===a[r].format?n?o.push(s):o.push(this._numberFormat(s)):!n&&a[r].format?o.push(this[a[r].format](s)):o.push(s));l?i.addObject({rowAction:l,row:o}):i.addObject(o)},_finishReport:function(e){this.set("showReportResults",!0),this.set("offset",0),this._setReportHeaders(e),this._setReportTitle(),this._generateExport(),this.closeProgressModal()},_generateExport:function(){var e=[],t=this.get("reportHeaders"),n=[t];n.addObjects(this.get("reportRows")),n.forEach(function(t){var n=void 0;n=t.row?t.row:t,n=n.map(function(e){return e?e.replace?e.replace('"','""'):e:""}),e.push('"'+n.join('","')+'"')});var a=e.join("\r\n"),l="data:application/csv;charset=utf-8,"+encodeURIComponent(a);this.set("csvExport",l)},_notifyReportError:function(e){var t=this.get("i18n");throw this.closeProgressModal(),this.displayAlert(t.t("alerts.reportError"),t.t("messages.reportError")),new Error(e)},_setReportHeaders:function(e){var n=[];t.default.isEmpty(e)&&(e=this.get("reportColumns"));for(var a in e)e[a].include&&n.push(e[a].label);this.set("reportHeaders",n)},_setReportTitle:function(){var e=this.get("endDate"),n="",a="",l=this.get("reportType"),s=this.get("reportTypes"),i=this.get("startDate");t.default.isEmpty(e)||(n=moment(e).format("l"));var o=s.findBy("value",l);t.default.isEmpty(i)?this.set("reportTitle",this.get("i18n").t("inventory.reports.titleSingleDate",{name:o.name,date:n})):(a=moment(i).format("l"),this.set("reportTitle",this.get("i18n").t("inventory.reports.titleDateRange",{name:o.name,startDate:a,endDate:n})))},actions:{firstPage:function(){this.set("offset",0)},nextPage:function(){var e=this.get("limit");this.incrementProperty("offset",e)},previousPage:function(){var e=this.get("limit");this.decrementProperty("offset",e)},lastPage:function(){var e=this.get("reportRows.length"),t=this.get("limit"),n=parseInt(e/t);this.set("offset",n*t)}},currentReportRows:function(){var e=this.get("limit"),t=this.get("offset"),n=this.get("reportRows");return n.slice(t,t+e)}.property("reportRows.[]","offset","limit"),disablePreviousPage:function(){return 0===this.get("offset")}.property("offset"),disableNextPage:function(){var e=this.get("limit"),t=this.get("reportRows.length"),n=this.get("offset");return n+e>=t}.property("offset","limit","reportRows.length"),showPagination:function(){var e=this.get("reportRows.length"),t=this.get("limit");return e>t}.property("reportRows.length")})}),define("hospitalrun/controllers/application",["exports","ember"],function(e,t){e.default=t.default.Controller.extend({filesystem:t.default.inject.service(),session:t.default.inject.service(),_setup:function(){var e=this.get("filesystem");e.setup()}.on("init")})}),define("hospitalrun/controllers/index",["exports","ember","hospitalrun/mixins/user-session"],function(e,t,n){e.default=t.default.Controller.extend(n.default,{indexLinks:["Appointments","Labs","Imaging","Inventory","Medication","Patients","Users"],setupPermissions:t.default.on("init",function(){var e=this.get("defaultCapabilities");for(var t in e)this.currentUserCan(t)&&this.set("userCan_"+t,!0)}),activeLinks:t.default.computed("indexLinks",function(){var e=[],t=this.get("indexLinks");return t.forEach(function(t){var n=t.toLowerCase();this.currentUserCan(n)&&e.push({action:n,text:t})}.bind(this)),e})})}),define("hospitalrun/controllers/login",["exports","ember"],function(e,t){var n=t.default.Controller.extend({session:t.default.inject.service(),errorMessage:null,identification:null,password:null,actions:{authenticate:function(){var e=this,t=this.getProperties("identification","password"),n=t.identification,a=t.password;this.get("session").authenticate("authenticator:custom",{identification:n,password:a}).catch(function(t){e.set("errorMessage",t.reason)})}}});e.default=n}),define("hospitalrun/controllers/navigation",["exports","ember","hospitalrun/mixins/hospitalrun-version","hospitalrun/mixins/modal-helper","hospitalrun/mixins/progress-dialog","hospitalrun/mixins/user-session","hospitalrun/mixins/navigation"],function(e,t,n,a,l,s,i){e.default=t.default.Controller.extend(n.default,a.default,l.default,s.default,i.default,{ajax:t.default.inject.service(),application:t.default.inject.controller(),allowSearch:!1,config:t.default.inject.service(),currentSearchText:null,currentRouteName:t.default.computed.alias("application.currentRouteName"),progressTitle:"Searching",searchRoute:null,session:t.default.inject.service(),syncStatus:"",currentOpenNav:null,actions:{about:function(){var e=this,n=this.get("version");this.get("ajax").request("/serverinfo").then(function(a){var l="Version: "+n;t.default.isEmpty(a)||(l+=" Site Info: "+a),e.displayAlert(e.get("i18n").t("navigation.about"),l)})},invalidateSession:function(){var e=this.get("session");e.get("isAuthenticated")&&e.invalidate()},search:function(){if(this.allowSearch&&this.searchRoute){var e=this.get("currentRouteName"),t=this.get("currentSearchText"),n=this.get("searchText");t===n&&e.indexOf(".search")!==-1||(this.set("searchText",""),this.set("progressMessage","Searching for "+n+". Please wait..."),this.showProgressModal(),this.transitionToRoute(this.searchRoute+"/"+n))}},navAction:function(e){this.currentOpenNav&&this.currentOpenNav.route!==e.route&&this.currentOpenNav.closeSubnav(),this.currentOpenNav=e,this.transitionToRoute(e.route),this.set("isShowingSettings",!1)},toggleSettings:function(){this.toggleProperty("isShowingSettings")},closeSettings:function(){this.set("isShowingSettings",!1)}}})}),define("hospitalrun/custom-form-add/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember"],function(e,t,n){var a=n.default.computed,l=n.default.isEmpty;e.default=t.default.extend({updateAction:"addForm",actions:{addForm:function(){var e=this.get("model.modelToAddTo"),t=e.get("customForms"),a=this.get("model.selectedForm");l(t)&&(t=n.default.Object.create(),e.set("customForms",t)),t.set(a,n.default.Object.create()),e.notifyPropertyChange("customForms"),this.send("closeModal")}},isUpdateDisabled:a("model.selectedForm",function(){return l(this.get("model.selectedForm"))})})}),define("hospitalrun/custom-form-add/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"jaecxfpb",block:'{"statements":[["block",["modal-dialog"],null,[["cancelAction","isUpdateDisabled","title","updateButtonAction","updateButtonText"],["closeModal",["get",["isUpdateDisabled"]],["helper",["t"],["customForms.titles.addCustomForm"],null],"addForm",["helper",["t"],["customForms.buttons.addForm"],null]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["em-select"],null,[["label","property","content","prompt"],[["helper",["t"],["customForms.labels.formToAdd"],null],"selectedForm",["get",["model","customForms"]]," "]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/custom-form-add/template.hbs"}})}),define("hospitalrun/diagnosis/edit/controller",["exports","ember","hospitalrun/controllers/abstract-edit-controller"],function(e,t,n){var a=t.default.computed;e.default=n.default.extend({updateCapability:"add_diagnosis",editController:t.default.computed.alias("model.editController"),diagnosisList:t.default.computed.alias("editController.diagnosisList"),newDiagnosis:!1,lookupListsToUpdate:[{name:"diagnosisList",property:"model.diagnosis",id:"diagnosis_list"}],additionalButtons:a("model.isNew",function(){var e=this.get("i18n"),t=this.get("model.isNew");if(!t)return[{class:"btn btn-default warning",buttonAction:"deleteDiagnosis",buttonIcon:"octicon octicon-x",buttonText:e.t("buttons.delete")}]}),canDeleteDiagnosis:a(function(){return this.currentUserCan("delete_diagnosis")}),title:a("model.isNew",function(){var e=this.get("i18n"),t=this.get("model.isNew");return t?e.t("diagnosis.titles.addDiagnosis"):e.t("diagnosis.titles.editDiagnosis")}),afterUpdate:function(e){var t=this.get("newDiagnosis");t?this.get("editController").send("addDiagnosis",e):this.send("closeModal")},beforeUpdate:function(){var e=this.get("model");return this.set("newDiagnosis",e.get("isNew")),t.default.RSVP.Promise.resolve()},actions:{cancel:function(){this.send("closeModal")},deleteDiagnosis:function(){var e=this.get("model");this.get("editController").send("deleteDiagnosis",e)}}})}),define("hospitalrun/diagnosis/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"i1WyGKMG",block:'{"statements":[["block",["modal-dialog"],null,[["additionalButtons","hideCancelButton","isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["additionalButtons"]],["get",["hideCancelButton"]],["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],4]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["helper",["t"],["diagnosis.labels.activeDiagnosis"],null],"active","col-sm-4"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["diagnosis.labels.diagnosis"],null],false],["close-element"],["text","\\n "],["open-element","div",[]],["flush-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","diagnosis"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","hint","class"],["diagnosis",["helper",["t"],["diagnosis.labels.diagnosis"],null],["get",["diagnosisList"]],false,"diagnosis-text required"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model","isNew"]]],null,2,1],["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["date",["helper",["t"],["diagnosis.labels.date"],null],"col-sm-4 required"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["helper",["t"],["diagnosis.labels.secondaryDiagnosis"],null],"secondaryDiagnosis","col-sm-4 secondary-diagnosis"]]],false],["text","\\n"],["block",["unless"],[["get",["model","isNew"]]],null,0],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],3]],"locals":[]}],"hasPartials":false}', -meta:{moduleName:"hospitalrun/diagnosis/edit/template.hbs"}})}),define("hospitalrun/dialog/controller",["exports","ember"],function(e,t){var n=t.default.computed,a=t.default.get,l=t.default.isEmpty;e.default=t.default.Controller.extend({showUpdateButton:!0,isUpdateDisabled:!1,cancelAction:n("model.cancelAction",function(){var e=a(this,"model.cancelAction");return l(e)&&(e="cancel"),e}),actions:{cancel:function(){this.send("closeModal")},confirm:function(){var e=this.getWithDefault("model.confirmAction","model.confirm");this.send(e,a(this,"model")),this.send("closeModal")},ok:function(){var e=a(this,"model.okAction"),t=a(this,"model.okContext");l(t)&&(t=a(this,"model")),l(e)||this.send(e,t),this.send("closeModal")}}})}),define("hospitalrun/dialog/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"CVjH3ZEN",block:'{"statements":[["block",["modal-dialog"],null,[["cancelAction","hideCancelButton","hideUpdateButton","isUpdateDisabled","title","updateButtonAction","updateButtonText","cancelButtonText"],[["get",["cancelAction"]],["get",["model","hideCancelButton"]],["get",["model","hideUpdateButton"]],["get",["model","isUpdateDisabled"]],["get",["model","title"]],["get",["model","updateButtonAction"]],["get",["model","updateButtonText"]],["get",["model","cancelButtonText"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","progress"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","progress-bar progress-bar-striped active"],["static-attr","role","progressbar"],["dynamic-attr","aria-valuenow",["unknown",["model","progressBarValue"]],null],["static-attr","aria-valuemin","0"],["static-attr","aria-valuemax","100"],["dynamic-attr","style",["unknown",["model","progressBarStyle"]],null],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","sr-only"],["flush-element"],["append",["helper",["t"],["loading.progressBar.progress"],[["progressBarValue"],[["get",["model","progressBarValue"]]]]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model","showProgress"]]],null,0],["text"," "],["append",["unknown",["model","message"]],false],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/dialog/template.hbs"}})}),define("hospitalrun/finishgauth/route",["exports","ember","hospitalrun/mixins/setup-user-role"],function(e,t,n){e.default=t.default.Route.extend(n.default,{config:t.default.inject.service(),database:t.default.inject.service(),session:t.default.inject.service(),model:function(e){var t=this;if(e.k&&e.s1&&e.s2&&e.t){var n=function(){t.get("session").authenticate("authenticator:custom",{google_auth:!0,params:e});var n={config_consumer_key:e.k,config_consumer_secret:e.s1,config_oauth_token:e.t,config_token_secret:e.s2};return{v:t.get("config").saveOauthConfigs(n).then(function(){var e=this;return n.config_use_google_auth=!0,this.get("database").setup(n).then(function(){return e.setupUserRole()})}.bind(t))}}();if("object"==typeof n)return n.v}}})}),define("hospitalrun/helpers/and",["exports","ember","ember-truth-helpers/helpers/and"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.andHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.andHelper)),e.default=a}),define("hospitalrun/helpers/app-version",["exports","ember","hospitalrun/config/environment"],function(e,t,n){function a(){return l}e.appVersion=a;var l=n.default.APP.version;e.default=t.default.Helper.helper(a)}),define("hospitalrun/helpers/date-format",["exports","ember"],function(e,t){var n=function(){function e(e,t){var n=[],a=!0,l=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,s=e}finally{try{!a&&o.return&&o.return()}finally{if(l)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=t.default.Helper.helper(function(e,a){if(!t.default.isEmpty(e[0])){var l="l",s=n(e,1),i=s[0];return a&&a.format&&(l=a.format),moment(i).format(l)}})}),define("hospitalrun/helpers/eq",["exports","ember","ember-truth-helpers/helpers/equal"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.equalHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.equalHelper)),e.default=a}),define("hospitalrun/helpers/gt",["exports","ember","ember-truth-helpers/helpers/gt"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.gtHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.gtHelper)),e.default=a}),define("hospitalrun/helpers/gte",["exports","ember","ember-truth-helpers/helpers/gte"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.gteHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.gteHelper)),e.default=a}),define("hospitalrun/helpers/html-line-break",["exports","ember"],function(e,t){var n=function(){function e(e,t){var n=[],a=!0,l=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,s=e}finally{try{!a&&o.return&&o.return()}finally{if(l)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=t.default.Helper.helper(function(e){var a=n(e,1),l=a[0];return null!==l&&"undefined"!=typeof l?t.default.String.htmlSafe(l.replace(/\n/g,"
")):null})}),define("hospitalrun/helpers/is-array",["exports","ember","ember-truth-helpers/helpers/is-array"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.isArrayHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.isArrayHelper)),e.default=a}),define("hospitalrun/helpers/is-equal-array",["exports","ember"],function(e,t){var n=function(){function e(e,t){var n=[],a=!0,l=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,s=e}finally{try{!a&&o.return&&o.return()}finally{if(l)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=t.default.Helper.helper(function(e){var a=n(e,2),l=a[0],s=a[1];return!(!t.default.isArray(l)||!t.default.isArray(s)||l.get("length")!==s.get("length"))&&l.every(function(e){return s.includes(e)})})}),define("hospitalrun/helpers/is-equal-by-path",["exports","ember"],function(e,t){var n=function(){function e(e,t){var n=[],a=!0,l=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,s=e}finally{try{!a&&o.return&&o.return()}finally{if(l)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=t.default.Helper.helper(function(e){var a=n(e,3),l=a[0],s=a[1],i=a[2];return i?t.default.get(l,i)===s:l===s})}),define("hospitalrun/helpers/is-equal",["exports","ember"],function(e,t){var n=function(){function e(e,t){var n=[],a=!0,l=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,s=e}finally{try{!a&&o.return&&o.return()}finally{if(l)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=t.default.Helper.helper(function(e){var t=n(e,2),a=t[0],l=t[1];return a===l})}),define("hospitalrun/helpers/is-not",["exports","ember"],function(e,t){var n=function(){function e(e,t){var n=[],a=!0,l=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,s=e}finally{try{!a&&o.return&&o.return()}finally{if(l)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=t.default.Helper.helper(function(e){var t=n(e,1),a=t[0];return!a})}),define("hospitalrun/helpers/lt",["exports","ember","ember-truth-helpers/helpers/lt"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.ltHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.ltHelper)),e.default=a}),define("hospitalrun/helpers/lte",["exports","ember","ember-truth-helpers/helpers/lte"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.lteHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.lteHelper)),e.default=a}),define("hospitalrun/helpers/not-eq",["exports","ember","ember-truth-helpers/helpers/not-equal"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.notEqualHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.notEqualHelper)),e.default=a}),define("hospitalrun/helpers/not",["exports","ember","ember-truth-helpers/helpers/not"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.notHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.notHelper)),e.default=a}),define("hospitalrun/helpers/number-format",["exports","ember","hospitalrun/mixins/number-format"],function(e,t,n){var a=function(){function e(e,t){var n=[],a=!0,l=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,s=e}finally{try{!a&&o.return&&o.return()}finally{if(l)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=t.default.Object.extend(n.default);e.default=t.default.Helper.helper(function(e){var t=a(e,1),n=t[0],s=new l;return s._numberFormat(n)})}),define("hospitalrun/helpers/or",["exports","ember","ember-truth-helpers/helpers/or"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.orHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.orHelper)),e.default=a}),define("hospitalrun/helpers/pluralize",["exports","ember-inflector/lib/helpers/pluralize"],function(e,t){e.default=t.default}),define("hospitalrun/helpers/read-path",["exports","ember"],function(e,t){var n=function(){function e(e,t){var n=[],a=!0,l=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,s=e}finally{try{!a&&o.return&&o.return()}finally{if(l)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=t.default.Helper.helper(function(e){var a=n(e,2),l=a[0],s=a[1];return t.default.isEmpty(s)?l:t.default.get(l,s)})}),define("hospitalrun/helpers/singularize",["exports","ember-inflector/lib/helpers/singularize"],function(e,t){e.default=t.default}),define("hospitalrun/helpers/t",["exports","ember-i18n/helper"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/helpers/xor",["exports","ember","ember-truth-helpers/helpers/xor"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.xorHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.xorHelper)),e.default=a}),define("hospitalrun/imaging/charge/controller",["exports","hospitalrun/procedures/charge/controller","ember"],function(e,t,n){e.default=t.default.extend({cancelAction:"closeModal",newPricingItem:!1,requestingController:n.default.inject.controllers("imaging/edit"),pricingList:n.default.computed.alias("requestingController.chargesPricingList")})}),define("hospitalrun/imaging/charge/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"bkPMKXlR",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["partial","procedures/charge"],["text","\\n"]],"locals":[]}],"hasPartials":true}',meta:{moduleName:"hospitalrun/imaging/charge/template.hbs"}})}),define("hospitalrun/imaging/completed/completed-list-item/component",["exports","ember"],function(e,t){e.default=t.default.Component.extend({tagName:"tr"})}),define("hospitalrun/imaging/completed/completed-list-item/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"mAPPy+fo",block:'{"statements":[["open-element","td",[]],["static-attr","class","requested-date"],["flush-element"],["append",["helper",["date-format"],[["get",["imaging","requestedDate"]]],null],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","imaging-date"],["flush-element"],["append",["helper",["date-format"],[["get",["imaging","imagingDate"]]],null],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","requested-by"],["flush-element"],["append",["unknown",["imaging","requestedBy"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","display-name"],["flush-element"],["append",["unknown",["imaging","patient","displayName"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","type"],["flush-element"],["append",["unknown",["imaging","imagingType","name"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","results"],["flush-element"],["append",["unknown",["imaging","result"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","notes"],["flush-element"],["append",["unknown",["imaging","notes"]],false],["close-element"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[],"hasPartials":false}',meta:{moduleName:"hospitalrun/imaging/completed/completed-list-item/template.hbs"}})}),define("hospitalrun/imaging/completed/controller",["exports","hospitalrun/controllers/abstract-paged-controller"],function(e,t){e.default=t.default.extend({startKey:[],showActions:!1})}),define("hospitalrun/imaging/completed/route",["exports","ember-i18n","hospitalrun/imaging/index/route"],function(e,t,n){e.default=n.default.extend({pageTitle:(0,t.translationMacro)("imaging.titles.completedImaging"),searchStatus:"Completed"})}),define("hospitalrun/imaging/completed/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"Rfh3vstr",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],3]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["imaging.messages.noCompleted"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["imaging/completed/completed-list-item"],null,[["imaging"],[["get",["imaging"]]]]],false],["text","\\n"]],"locals":["imaging"]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table imaging-completed-table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.dateRequested"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.dateCompleted"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.patient"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.imagingType"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.results"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.notes"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,1],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model"]]],null,2,0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/imaging/completed/template.hbs"}})}),define("hospitalrun/imaging/delete/controller",["exports","hospitalrun/controllers/abstract-delete-controller","hospitalrun/mixins/patient-submodule"],function(e,t,n){e.default=t.default.extend(n.default,{title:"Delete Request",actions:{delete:function(){this.deleteChildFromVisit("imaging")}}})}),define("hospitalrun/imaging/delete/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"9b0/J8uA",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-danger"],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-warning-sign"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["t"],["imaging.messages.delete"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/imaging/delete/template.hbs"}})}),define("hospitalrun/imaging/edit/controller",["exports","hospitalrun/controllers/abstract-edit-controller","hospitalrun/mixins/charge-actions","ember","hospitalrun/mixins/patient-submodule"],function(e,t,n,a,l){e.default=t.default.extend(n.default,l.default,{imagingController:a.default.inject.controller("imaging"),chargePricingCategory:"Imaging",chargeRoute:"imaging.charge",selectedImagingType:null,canComplete:function(){var e=this.get("model.isNew"),t=this.get("model.imagingTypeName"),n=this.get("selectedImagingType");return(!e||!(a.default.isEmpty(t)||a.default.isArray(n)&&n.length>1))&&this.currentUserCan("complete_imaging")}.property("selectedImagingType.[]","model.imagingTypeName"),actions:{completeImaging:function(){this.set("model.status","Completed"),this.get("model").validate().then(function(){this.get("model.isValid")&&(this.set("model.imagingDate",new Date),this.send("update"))}.bind(this)).catch(a.default.K)},update:function(){var e=this;this.get("model.isNew")?!function(){var t=e.get("model"),n=e.get("selectedImagingType");a.default.isEmpty(e.get("model.status"))&&e.set("model.status","Requested"),e.set("model.requestedBy",t.getUserName()),e.set("model.requestedDate",new Date),a.default.isEmpty(n)?e.saveNewPricing(e.get("model.imagingTypeName"),"Imaging","model.imagingType").then(function(){this.addChildToVisit(t,"imaging","Imaging").then(function(){this.saveModel()}.bind(this))}.bind(e)):e.getSelectedPricing("selectedImagingType").then(function(e){a.default.isArray(e)?this.createMultipleRequests(e,"imagingType","imaging","Imaging"):(this.set("model.imagingType",e),this.addChildToVisit(t,"imaging","Imaging").then(function(){this.saveModel()}.bind(this)))}.bind(e))}():this.saveModel()}},additionalButtons:function(){var e=this.get("i18n"),t=this.get("canComplete"),n=this.get("model.isValid");if(n&&t)return[{buttonAction:"completeImaging",buttonIcon:"glyphicon glyphicon-ok",class:"btn btn-primary on-white",buttonText:e.t("buttons.complete")}]}.property("canComplete","model.isValid"),lookupListsToUpdate:[{name:"radiologistList",property:"model.radiologist",id:"radiologists"}],pricingTypeForObjectType:"Imaging Procedure",pricingTypes:a.default.computed.alias("imagingController.imagingPricingTypes"),pricingList:null,radiologistList:a.default.computed.alias("imagingController.radiologistList"),updateCapability:"add_imaging",afterUpdate:function(e,t){var n=this.get("i18n");this.updateLookupLists();var a=void 0,l=void 0,s=void 0;"Completed"===this.get("model.status")?(l=n.t("imaging.alerts.completedTitle"),s=n.t("imaging.alerts.completedMessage")):(l=n.t("imaging.alerts.savedTitle"),s=n.t("imaging.alerts.savedMessage")),t&&(a=this.get("cancelAction")),this.saveVisitIfNeeded(l,s,a),this.set("model.selectPatient",!1)}})}),define("hospitalrun/imaging/edit/route",["exports","ember-i18n","hospitalrun/routes/abstract-edit-route","hospitalrun/mixins/charge-route","ember","hospitalrun/mixins/patient-list-route"],function(e,t,n,a,l,s){e.default=n.default.extend(a.default,s.default,{editTitle:(0,t.translationMacro)("imaging.titles.editTitle"),modelName:"imaging",newTitle:(0,t.translationMacro)("imaging.titles.editTitle"),pricingCategory:"Imaging",actions:{returnToAllItems:function(){this.controller.send("returnToAllItems")}},getNewData:function(){return l.default.RSVP.resolve({selectPatient:!0,requestDate:moment().startOf("day").toDate()})}})}),define("hospitalrun/imaging/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"FpG92j1s",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],6]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","prompt","class"],["radiologist",["helper",["t"],["imaging.labels.radiologist"],null],["get",["radiologistList"]]," ","radiologist-input"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["result",["helper",["t"],["labels.result"],null],"result-input"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-xs-3"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.visit"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","visit","visitDate"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-xs-9"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.imagingType"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","imagingType","name"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-xs-12"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","requestedBy"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content","optionValuePath","optionLabelPath","prompt","selected"],["col-xs-3 required",["helper",["t"],["labels.visit"],null],"visit",["get",["patientVisitsForSelect"]],"selectObject","selectObject.visitDescription",["helper",["t"],["imaging.labels.addNewVisit"],null],["get",["model","visit"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["checkbox-or-typeahead"],null,[["property","label","list","selection","optionLabelPath","typeAheadType","className","prompt","model","class"],["imagingTypeName",["helper",["t"],["labels.imagingType"],null],["get",["objectTypeList"]],["get",["selectedImagingType"]],"name","pricing","required"," ",["get",["model"]],"imaging-type-input"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-summary"],null,[["patient","returnTo","returnToContext","disablePatientLink"],[["get",["model","patient"]],"imaging.edit",["get",["model","id"]],["get",["model","isNew"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-typeahead"],null,[["property","label","content","selection","class"],["patientTypeAhead",["helper",["t"],["labels.patient"],null],["get",["patientList"]],["get",["selectedPatient"]],"required patient-input"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model","selectPatient"]]],null,4,3],["block",["if"],[["get",["model","isNew"]]],null,2,1],["block",["if"],[["get",["canComplete"]]],null,0],["text"," "],["append",["helper",["em-text"],null,[["property","label","rows"],["notes",["helper",["t"],["labels.notes"],null],3]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],5]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/imaging/edit/template.hbs"}})}),define("hospitalrun/imaging/index/controller",["exports","hospitalrun/controllers/abstract-paged-controller","hospitalrun/mixins/user-session"],function(e,t,n){e.default=t.default.extend(n.default,{startKey:[],addPermission:"add_imaging"})}),define("hospitalrun/imaging/index/imaging-edit-button/component",["exports","ember"],function(e,t){e.default=t.default.Component.extend({tagName:"button",classNames:["btn","btn-default","neutral"]})}),define("hospitalrun/imaging/index/imaging-edit-button/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"fgj2GO/M",block:'{"statements":[["block",["link-to"],["imaging.edit",["get",["imaging"]]],null,0],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["append",["helper",["t"],["labels.edit"],null],false]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/imaging/index/imaging-edit-button/template.hbs"}})}),define("hospitalrun/imaging/index/requested-list-item/component",["exports","ember"],function(e,t){e.default=t.default.Component.extend({tagName:"tr",classNames:["clickable"],click:function(){this.sendAction("action",this.imaging)}})}),define("hospitalrun/imaging/index/requested-list-item/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"JWG9328s",block:'{"statements":[["open-element","td",[]],["static-attr","class","date"],["flush-element"],["append",["helper",["date-format"],[["get",["imaging","requestedDate"]]],[["format"],["l h:mm A"]]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","requested-by"],["flush-element"],["append",["unknown",["imaging","requestedBy"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","patient"],["flush-element"],["append",["unknown",["imaging","patient","displayName"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","type"],["flush-element"],["append",["unknown",["imaging","imagingType","name"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","notes"],["flush-element"],["append",["unknown",["imaging","notes"]],false],["close-element"],["text","\\n\\n"],["block",["if"],[["get",["showActions"]]],null,1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["imaging/index/imaging-edit-button"],null,[["imaging"],[["get",["imaging"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["canEdit"]]],null,0],["text"," "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/imaging/index/requested-list-item/template.hbs"}})}),define("hospitalrun/imaging/index/route",["exports","ember-i18n","hospitalrun/routes/abstract-index-route"],function(e,t,n){e.default=n.default.extend({modelName:"imaging",pageTitle:(0,t.translationMacro)("imaging.pageTitle"),searchStatus:"Requested",_getStartKeyFromItem:function(e){var t=e.get("imagingDateAsTime"),n=this._getPouchIdFromItem(e),a=e.get("requestedDateAsTime"),l=this.get("searchStatus");return[l,a,t,n]},_modelQueryParams:function(){var e=this._getMaxPouchId(),t=this.get("maxValue"),n=this._getMinPouchId(),a=this.get("searchStatus");return{options:{startkey:[a,null,null,n],endkey:[a,t,t,e]},mapReduce:"imaging_by_status"}}})}),define("hospitalrun/imaging/index/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"bA1O68vE",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],5]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","a",[]],["static-attr","href","#"],["modifier",["action"],[["get",[null]],"newItem"]],["flush-element"],["append",["helper",["t"],["messages.createNewRecord"],null],false],["close-element"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["messages.noItemsFound"],null],false],["text"," "],["block",["if"],[["get",["canAdd"]]],null,0],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["imaging/index/requested-list-item"],null,[["imaging","action","showActions","canEdit"],[["get",["imaging"]],"editItem",["get",["showActions"]],["get",["canEdit"]]]]],false],["text","\\n"]],"locals":["imaging"]},{"statements":[["text"," "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.dateRequested"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.patient"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.imagingType"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.notes"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["showActions"]]],null,3],["text"," "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,2],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["hasRecords"]]],null,4,1]],"locals":[]}],"hasPartials":false}', -meta:{moduleName:"hospitalrun/imaging/index/template.hbs"}})}),define("hospitalrun/imaging/route",["exports","ember-i18n","hospitalrun/routes/abstract-module-route"],function(e,t,n){e.default=n.default.extend({addCapability:"add_imaging",additionalModels:[{name:"imagingPricingTypes",findArgs:["lookup","imaging_pricing_types"]},{name:"radiologistList",findArgs:["lookup","radiologists"]}],allowSearch:!1,moduleName:"imaging",newButtonText:(0,t.translationMacro)("imaging.buttons.newButton"),sectionTitle:(0,t.translationMacro)("imaging.sectionTitle")})}),define("hospitalrun/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","hospitalrun/config/environment"],function(e,t,n){var a=n.default.APP,l=a.name,s=a.version;e.default={name:"App Version",initialize:(0,t.default)(l,s)}}),define("hospitalrun/initializers/container-debug-adapter",["exports","ember-resolver/container-debug-adapter"],function(e,t){e.default={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0];e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("hospitalrun/initializers/data-adapter",["exports","ember"],function(e,t){e.default={name:"data-adapter",before:"store",initialize:function(){}}}),define("hospitalrun/initializers/ember-data",["exports","ember-data/setup-container","ember-data/-private/core"],function(e,t,n){e.default={name:"ember-data",initialize:t.default}}),define("hospitalrun/initializers/ember-i18n",["exports","ember-i18n/initializers/ember-i18n"],function(e,t){e.default=t.default}),define("hospitalrun/initializers/ember-keyboard-first-responder-inputs",["exports","ember-keyboard/initializers/ember-keyboard-first-responder-inputs"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"initialize",{enumerable:!0,get:function(){return t.initialize}})}),define("hospitalrun/initializers/ember-simple-auth",["exports","ember","hospitalrun/config/environment","ember-simple-auth/configuration","ember-simple-auth/initializers/setup-session","ember-simple-auth/initializers/setup-session-service"],function(e,t,n,a,l,s){e.default={name:"ember-simple-auth",initialize:function(e){var t=n.default["ember-simple-auth"]||{};t.baseURL=n.default.baseURL,a.default.load(t),(0,l.default)(e),(0,s.default)(e)}}}),define("hospitalrun/initializers/export-application-global",["exports","ember","hospitalrun/config/environment"],function(e,t,n){function a(){var e=arguments[1]||arguments[0];if(n.default.exportApplicationGlobal!==!1){var a;if("undefined"!=typeof window)a=window;else if("undefined"!=typeof global)a=global;else{if("undefined"==typeof self)return;a=self}var l,s=n.default.exportApplicationGlobal;l="string"==typeof s?s:t.default.String.classify(n.default.modulePrefix),a[l]||(a[l]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete a[l]}}))}}e.initialize=a,e.default={name:"export-application-global",initialize:a}}),define("hospitalrun/initializers/i18n",["exports"],function(e){e.default={name:"i18n",after:"ember-i18n",initialize:function(e){e.inject("route","i18n","service:i18n"),e.inject("controller","i18n","service:i18n"),e.inject("mixin","i18n","service:i18n"),e.inject("model","i18n","service:i18n")}}}),define("hospitalrun/initializers/injectStore",["exports","ember"],function(e,t){e.default={name:"injectStore",before:"store",initialize:function(){}}}),define("hospitalrun/initializers/store",["exports","ember"],function(e,t){e.default={name:"store",after:"ember-data",initialize:function(){}}}),define("hospitalrun/initializers/transforms",["exports","ember"],function(e,t){e.default={name:"transforms",before:"store",initialize:function(){}}}),define("hospitalrun/initializers/truth-helpers",["exports","ember","ember-truth-helpers/utils/register-helper","ember-truth-helpers/helpers/and","ember-truth-helpers/helpers/or","ember-truth-helpers/helpers/equal","ember-truth-helpers/helpers/not","ember-truth-helpers/helpers/is-array","ember-truth-helpers/helpers/not-equal","ember-truth-helpers/helpers/gt","ember-truth-helpers/helpers/gte","ember-truth-helpers/helpers/lt","ember-truth-helpers/helpers/lte"],function(e,t,n,a,l,s,i,o,r,d,c,u,p){function m(){t.default.Helper||((0,n.registerHelper)("and",a.andHelper),(0,n.registerHelper)("or",l.orHelper),(0,n.registerHelper)("eq",s.equalHelper),(0,n.registerHelper)("not",i.notHelper),(0,n.registerHelper)("is-array",o.isArrayHelper),(0,n.registerHelper)("not-eq",r.notEqualHelper),(0,n.registerHelper)("gt",d.gtHelper),(0,n.registerHelper)("gte",c.gteHelper),(0,n.registerHelper)("lt",u.ltHelper),(0,n.registerHelper)("lte",p.lteHelper))}e.initialize=m,e.default={name:"truth-helpers",initialize:m}}),define("hospitalrun/instance-initializers/ember-data",["exports","ember-data/-private/instance-initializers/initialize-store-service"],function(e,t){e.default={name:"ember-data",initialize:t.default}}),define("hospitalrun/instance-initializers/ember-i18n",["exports","ember-i18n/instance-initializers/ember-i18n"],function(e,t){e.default=t.default}),define("hospitalrun/instance-initializers/ember-simple-auth",["exports","ember-simple-auth/instance-initializers/setup-session-restoration"],function(e,t){e.default={name:"ember-simple-auth",initialize:function(e){(0,t.default)(e)}}}),define("hospitalrun/inventory/adjust/controller",["exports","hospitalrun/controllers/abstract-edit-controller","hospitalrun/mixins/inventory-adjustment-types","ember","ember-i18n"],function(e,t,n,a,l){e.default=t.default.extend(n.default,{inventoryController:a.default.inject.controller("inventory"),expenseAccountList:a.default.computed.alias("inventoryController.expenseAccountList"),title:(0,l.translationMacro)("inventory.titles.adjustment"),transactionTypeChanged:function(){a.default.run.once(this,function(){this.get("model").validate().catch(a.default.K)})}.observes("transactionType"),updateButtonText:function(){return this.get("model.transactionType")}.property("model.transactionType"),updateButtonAction:"adjust",updateCapability:"adjust_inventory_location",actions:{cancel:function(){this.send("closeModal")},adjust:function(){this.send("adjustItems",this.get("model"),!0)}}})}),define("hospitalrun/inventory/adjust/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"9dBN/TFf",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.item"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","adjustmentItem","name"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.adjustmentFor"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","locationName"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.currentQuantity"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","quantity"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content","optionValuePath","optionLabelPath"],["col-sm-4",["helper",["t"],["inventory.labels.adjustmentType"],null],"transactionType",["get",["adjustmentTypes"]],"type","name"]]],false],["text","\\n "],["append",["helper",["number-input"],null,[["property","label","class"],["adjustmentQuantity",["helper",["t"],["labels.quantity"],null],"col-sm-3 required"]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-text"],null,[["label","property","rows"],[["helper",["t"],["inventory.labels.reason"],null],"reason",3]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["dateCompleted",["helper",["t"],["inventory.labels.adjustmentDate"],null],"col-sm-4 required"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","class"],["expenseAccount",["helper",["t"],["inventory.labels.expense"],null],["get",["expenseAccountList"]],["get",["model","expenseAccount"]],"col-sm-8"]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/inventory/adjust/template.hbs"}})}),define("hospitalrun/inventory/barcode/controller",["exports","ember"],function(e,t){e.default=t.default.Controller.extend({selectedPrinter:null,barcodeUri:function(){var e=this.get("model.id"),n=this.get("model.name");return t.default.$(document).JsBarcode(e,{width:1,height:20,fontSize:10,displayValue:n,returnUri:!0})}.property("model.id","model.name"),printers:function(){return dymo.label.framework.getTapePrinters()}.property(),havePrinters:function(){var e=this.get("printers");return e.length>0}.property("printers"),singlePrinter:function(){var e=this.get("printers");return 1===e.length}.property("printers"),actions:{print:function(){var e=this.get("barcodeUri"),n=this.get("selectedPrinter");n||(n=this.get("printers")[0].name),t.default.$.get("/dymo/BarcodeAsImage.label",function(t){var a=dymo.label.framework.openLabelXml(t),l=e.substr("data:image/png;base64,".length);a.setObjectText("Image",l),a.print(n)},"text")}}})}),define("hospitalrun/inventory/barcode/route",["exports","ember"],function(e,t){e.default=t.default.Route.extend({model:function(e){return this.store.find("inventory",e.inventory_id)}})});define("hospitalrun/inventory/barcode/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"PD6MlfyD",block:'{"statements":[["open-element","div",[]],["static-attr","class","panel panel-default"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n "],["open-element","img",[]],["dynamic-attr","src",["unknown",["barcodeUri"]],null],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["close-element"],["text","\\n\\n"],["block",["if"],[["get",["havePrinters"]]],null,1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","label",[]],["static-attr","for","printerSelect"],["flush-element"],["append",["helper",["t"],["inventory.labels.printer"],null],false],["close-element"],["text","\\n "],["append",["helper",["select-list"],null,[["content","optionLabelPath","optionValuePath","value","class","action","id"],[["get",["printers"]],"name","name",["get",["selectedPrinter"]],"form-control",["helper",["action"],[["get",[null]],["helper",["mut"],[["get",["selectedPrinter"]]],null]],null],"printerSelect"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["append",["helper",["t"],["inventory.labels.printBarcode"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n"],["block",["unless"],[["get",["singlePrinter"]]],null,0],["text"," "],["close-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-primary"],["modifier",["action"],[["get",[null]],"print"]],["flush-element"],["open-element","span",[]],["static-attr","class"," glyphicon glyphicon-print"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["inventory.labels.print"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/inventory/barcode/template.hbs"}})});define("hospitalrun/inventory/batch/controller",["exports","hospitalrun/controllers/abstract-edit-controller","hospitalrun/mixins/inventory-id","hospitalrun/mixins/inventory-locations","ember","ember-i18n"],function(e,t,n,a,l,s){e.default=t.default.extend(n.default,a.default,{doingUpdate:!1,inventoryController:l.default.inject.controller("inventory"),inventoryItems:null,warehouseList:l.default.computed.alias("inventoryController.warehouseList"),aisleLocationList:l.default.computed.alias("inventoryController.aisleLocationList"),vendorList:l.default.computed.alias("inventoryController.vendorList"),purchaseAttributes:["expirationDate","inventoryItem","lotNumber","purchaseCost","quantity","vendorItemNo"],inventoryList:function(){var e=this.get("inventoryItems");if(!l.default.isEmpty(e)){var t=e.map(function(e){return e.doc});return t}}.property("inventoryItems.[]"),lookupListsToUpdate:[{name:"aisleLocationList",property:"model.aisleLocation",id:"aisle_location_list"},{name:"vendorList",property:"model.vendor",id:"vendor_list"},{name:"warehouseList",property:"model.location",id:"warehouse_list"}],showDistributionUnit:function(){return this._haveValidInventoryItem()}.property("model.inventoryItemTypeAhead","model.inventoryItem"),showInvoiceItems:function(){var e=this.get("model.invoiceItems");return!l.default.isEmpty(e)}.property("model.invoiceItems.[]"),totalReceived:function(){var e=this.get("model.invoiceItems"),t=0;l.default.isEmpty("invoiceItems")||(t=e.reduce(function(e,t){return e+Number(t.get("purchaseCost"))},t));var n=this.get("model.purchaseCost");return this.get("model.isValid")&&!l.default.isEmpty(n)&&(t+=Number(n)),t}.property("model.invoiceItems.[].purchaseCost","model.isValid","model.purchaseCost"),updateButtonText:(0,s.translationMacro)("inventory.labels.save"),updateCapability:"add_inventory_item",_addNewInventoryItem:function(){this.generateId().then(function(e){var t=this.store.createRecord("inventory",{id:e,name:this.get("model.inventoryItemTypeAhead"),quantity:0,skipSavePurchase:!0});this.send("openModal","inventory.quick-add",t)}.bind(this))},_addInventoryItem:function(){var e=this.get("model"),t=this.get("model.inventoryItemTypeAhead"),n=this.get("model.purchaseCost"),a=this.get("model.quantity");return e.validate().then(function(){if(!this.get("model.isValid")||l.default.isEmpty(t)||l.default.isEmpty(a)||l.default.isEmpty(n))throw Error("invalid");return this._haveValidInventoryItem()?void this._addInvoiceItem():(this._addNewInventoryItem(),!0)}.bind(this)).catch(function(){this.displayAlert(this.get("i18n").t("inventory.titles.warning"),this.get("i18n").t("inventory.messages.warning"))}.bind(this))},_addInvoiceItem:function(){var e=this.get("model"),t=e.get("invoiceItems"),n=e.getProperties(this.get("purchaseAttributes")),a=l.default.Object.create(n);t.addObject(a),e.set("expirationDate"),e.set("inventoryItem"),e.set("inventoryItemTypeAhead"),e.set("lotNumber"),e.set("purchaseCost"),e.set("quantity"),e.set("selectedInventoryItem"),e.set("vendorItemNo")},_findInventoryItem:function(e){var t=this.get("model.invoiceItems"),n=e.get("inventoryItem");if(!l.default.isEmpty(n)){var a=t.find(function(e){return e.get("inventoryItem.id")===n},this);if(!l.default.isEmpty(a))return a.get("inventoryItem")}},_haveValidInventoryItem:function(){var e=this.get("model.inventoryItemTypeAhead"),t=this.get("model.inventoryItem");if(l.default.isEmpty(e)||l.default.isEmpty(t))return!1;var n=t.get("name"),a=e.substr(0,n.length);return a===n},_savePurchases:function(){var e=this.get("model"),t=e.getProperties(["dateReceived","vendor","invoiceNo","location","aisleLocation","giftInKind"]),n=e.get("invoiceItems"),a=void 0,s=[];n.forEach(function(e){var n=e.get("inventoryItem"),l=e.get("quantity");a=this.store.createRecord("inv-purchase",t),a.setProperties(e.getProperties(this.get("purchaseAttributes"))),a.setProperties({distributionUnit:n.get("distributionUnit"),currentQuantity:l,originalQuantity:l,inventoryItem:n.get("id")}),s.push(a.save())}.bind(this)),l.default.RSVP.all(s).then(function(e){var t=[],n=[];e.forEach(function(e){var t=this._findInventoryItem(e),a=t.get("purchases");a.addObject(e),n.push(this.newPurchaseAdded(t,e))}.bind(this)),l.default.RSVP.all(t).then(function(){e.forEach(function(e){var n=this._findInventoryItem(e);n.updateQuantity(),t.push(n.save())}.bind(this)),l.default.RSVP.all(t).then(function(){this.updateLookupLists(),this.displayAlert(this.get("i18n").t("inventory.titles.purchaseSaved"),this.get("i18n").t("inventory.messages.purchaseSaved"),"allItems")}.bind(this))}.bind(this))}.bind(this))},actions:{addInventoryItem:function(){this._addInventoryItem()},addedNewInventoryItem:function(e){this.set("model.inventoryItem",e),this._addInvoiceItem(),this.send("closeModal"),this.get("doingUpdate")&&this._savePurchases()},removeItem:function(e){var t=this.get("model.invoiceItems"),n=e.itemToRemove;t.removeObject(n),this.send("closeModal")},showRemoveItem:function(e){var t=this.get("i18n").t("inventory.messages.removeItem"),n=l.default.Object.create({itemToRemove:e}),a=this.get("i18n").t("inventory.titles.removeItem");this.displayConfirm(a,t,"removeItem",n)},update:function(){this.set("doingUpdate",!0),this._addInventoryItem().then(function(e){e||this._savePurchases()}.bind(this))}}})}),define("hospitalrun/inventory/batch/route",["exports","hospitalrun/inventory/request/route","ember","ember-i18n"],function(e,t,n,a){e.default=t.default.extend({editTitle:(0,a.translationMacro)("navigation.subnav.inventoryReceived"),modelName:"inventory-batch",newTitle:(0,a.translationMacro)("navigation.subnav.inventoryReceived"),getNewData:function(){return n.default.RSVP.resolve({invoiceItems:[],dateReceived:new Date})},actions:{addedNewInventoryItem:function(e){this.controller.send("addedNewInventoryItem",e)}}})}),define("hospitalrun/inventory/batch/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"9T4fAteu",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],4]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-sm-2"],["flush-element"],["text","\\n "],["append",["unknown",["invoiceItem","inventoryItem","name"]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-sm-2"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","input-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["invoiceItem","quantity"]]]]],false],["text","\\n "],["open-element","span",[]],["static-attr","class","input-group-addon"],["flush-element"],["text","\\n "],["append",["unknown",["invoiceItem","inventoryItem","distributionUnit"]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-sm-2"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["invoiceItem","purchaseCost"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-sm-2"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["invoiceItem","vendorItemNo"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-sm-2"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["invoiceItem","lotNumber"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-sm-2"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","minDate","model"],["expirationDate","now",["get",["invoiceItem"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-sm-1"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showRemoveItem",["get",["invoiceItem"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["inventory.labels.remove"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["invoiceItem"]},{"statements":[["text"," "],["open-element","h3",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.invoiceItems"],null],false],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.name"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.quantity"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.cost"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.itemNumber"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.serialNumber"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.expirationDate"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.action"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","invoiceItems"]]],null,0],["text"," "],["close-element"],["text","\\n "],["open-element","h4",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.totalReceived"],[["total"],[["get",["totalReceived"]]]]],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","p",[]],["static-attr","class","form-control-static inventory-distribution-unit"],["flush-element"],["append",["unknown",["model","inventoryItem","distributionUnit"]],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["dateReceived",["helper",["t"],["inventory.labels.dateReceived"],null],"col-sm-4 required"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","className"],["vendor",["helper",["t"],["inventory.labels.vendor"],null],["get",["vendorList"]],["get",["model","vendor"]],"col-sm-4 required test-vendor"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["invoiceNo",["helper",["t"],["inventory.labels.invoiceNumber"],null],"col-sm-4 test-invoice-number"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group row"],["flush-element"],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","className"],["location",["helper",["t"],["inventory.labels.location"],null],["get",["warehouseList"]],["get",["model","location"]],"col-sm-5"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","className"],["aisleLocation",["helper",["t"],["inventory.labels.aisleLocation"],null],["get",["aisleLocationList"]],["get",["model","aisleLocation"]],"col-sm-5"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","col-sm-2 checkbox-label-space"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-check"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label sr-only"],["flush-element"],["append",["helper",["t"],["inventory.labels.gift"],null],false],["close-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["inventory.labels.gift"],null],"giftInKind"]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["append",["helper",["t"],["inventory.labels.invoiceLineItem"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["inventory-typeahead"],null,[["class","property","label","content","selection","showQuantity"],["col-sm-7 required test-inv-item","inventoryItemTypeAhead",["helper",["t"],["inventory.labels.inventoryItem"],null],["get",["inventoryList"]],["get",["selectedInventoryItem"]],false]]],false],["text","\\n "],["append",["helper",["number-input"],null,[["property","label","class"],["quantity",["helper",["t"],["labels.quantity"],null],"col-sm-2 required test-inv-quantity"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-sm-1"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.unit"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["showDistributionUnit"]]],null,2],["text"," "],["close-element"],["text","\\n "],["append",["helper",["number-input"],null,[["property","label","class"],["purchaseCost",["helper",["t"],["inventory.labels.purchaseCost"],null],"col-sm-2 required test-inv-cost"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["vendorItemNo",["helper",["t"],["inventory.labels.vendorItemNumber"],null],"col-sm-4"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["lotNumber",["helper",["t"],["inventory.labels.serialNumber"],null],"col-sm-4"]]],false],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","minDate","class"],["expirationDate",["helper",["t"],["inventory.labels.expirationDate"],null],"now","col-sm-2"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-sm-2"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["text"," "],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-primary"],["modifier",["action"],[["get",[null]],"addInventoryItem"]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["inventory.labels.add"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["model","invoiceItems"]]],null,1]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],3]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/inventory/batch/template.hbs"}})}),define("hospitalrun/inventory/delete/controller",["exports","ember-i18n","hospitalrun/controllers/abstract-delete-controller"],function(e,t,n){e.default=n.default.extend({title:(0,t.translationMacro)("inventory.labels.deleteItem")})}),define("hospitalrun/inventory/delete/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"sUGbE9jt",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-danger"],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-warning-sign"],["flush-element"],["close-element"],["text"," \\n "],["append",["helper",["t"],["inventory.messages.delete"],[["name"],[["get",["model","name"]]]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}', -meta:{moduleName:"hospitalrun/inventory/delete/template.hbs"}})}),define("hospitalrun/inventory/edit/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/mixins/inventory-locations","hospitalrun/mixins/inventory-type-list","hospitalrun/mixins/return-to","hospitalrun/mixins/unit-types","hospitalrun/mixins/user-session"],function(e,t,n,a,l,s,i,o){e.default=t.default.extend(a.default,l.default,s.default,i.default,o.default,{inventory:n.default.inject.controller(),savingNewItem:!1,canAddPurchase:function(){return this.currentUserCan("add_inventory_purchase")}.property(),canAdjustLocation:function(){return this.currentUserCan("adjust_inventory_location")},warehouseList:n.default.computed.alias("inventory.warehouseList"),aisleLocationList:n.default.computed.alias("inventory.aisleLocationList"),inventoryTypeList:n.default.computed.alias("inventory.inventoryTypeList.value"),inventoryUnitList:n.default.computed.alias("inventory.inventoryUnitList.value"),vendorList:n.default.computed.alias("inventory.vendorList"),database:n.default.inject.service(),lookupListsToUpdate:[{name:"aisleLocationList",property:"model.aisleLocation",id:"aisle_location_list"},{name:"vendorList",property:"model.vendor",id:"vendor_list"},{name:"warehouseList",property:"model.location",id:"warehouse_list"}],canEditQuantity:function(){return this.get("model.isNew")}.property("model.isNew"),haveTransactions:function(){var e=this.get("transactions");return null!==e}.property("transactions.[]"),locationQuantityTotal:function(){var e=this.get("model.locations"),t=e.reduce(function(e,t){return e+parseInt(t.get("quantity"))},0);return t}.property("model.locations"),quantityDiscrepency:function(){var e=this.get("locationQuantityTotal"),t=this.get("model.quantity");return!n.default.isEmpty(e)&&!n.default.isEmpty(t)&&e!==t}.property("locationQuantityTotal","model.quantity"),quantityDifferential:function(){var e=this.get("locationQuantityTotal"),t=this.get("model.quantity");return Math.abs(e-t)}.property("locationQuantityTotal","model.quantity"),originalQuantityUpdated:function(){var e=this.get("model.isNew"),t=this.get("model.originalQuantity");e&&!n.default.isEmpty(t)&&this.set("model.quantity",t)}.observes("model.isNew","model.originalQuantity"),showTransactions:function(){var e=this.get("transactions");return!n.default.isEmpty(e)}.property("transactions.[]"),transactions:null,updateCapability:"add_inventory_item",actions:{adjustItems:function(e){var t=parseInt(e.get("adjustmentQuantity")),n=this.get("model"),a=e.get("transactionType"),l=this.get("store").createRecord("inv-request",{adjustPurchases:!0,dateCompleted:e.get("dateCompleted"),expenseAccount:e.get("expenseAccount"),inventoryItem:n,quantity:t,transactionType:a,reason:e.get("reason"),deliveryAisle:e.get("aisleLocation"),deliveryLocation:e.get("location")});l.set("inventoryLocations",[e]);var s=!1;"Adjustment (Add)"!==a&&"Return"!==a||(s=!0),l.set("markAsConsumed",!0),l.get("inventoryItem").then(function(){this.send("fulfillRequest",l,!0,s,!0)}.bind(this))},editNewItem:function(){this.send("editItem",this.get("model.id"))},showAdjustment:function(e){e.setProperties({dateCompleted:new Date,adjustmentItem:this.get("model"),adjustmentQuantity:"",reason:"",transferItem:null,transactionType:"Adjustment (Add)"}),this.send("openModal","inventory.adjust",e)},showTransfer:function(e){e.set("adjustmentQuantity"),e.set("transferItem",this.get("model")),e.set("dateCompleted",new Date),this.send("openModal","inventory.transfer",e)},transferItems:function(e){var t=this.get("model"),n=this.get("store").createRecord("inv-request",{adjustPurchases:!1,dateCompleted:e.get("dateCompleted"),inventoryItem:t,quantity:e.get("adjustmentQuantity"),deliveryAisle:e.get("transferAisleLocation"),deliveryLocation:e.get("transferLocation"),transactionType:"Transfer"});this.transferToLocation(t,e).then(function(){e.setProperties({transferItem:null,transferLocation:null,transferAisleLocation:null,adjustmentQuantity:null}),n.set("locationsAffected",[{name:e.get("locationName"),quantity:n.get("quantity")}]),n.get("inventoryItem").then(function(){this._saveRequest(n)}.bind(this))}.bind(this))},updatePurchase:function(e,t){t&&(this.get("model").updateQuantity(),this.send("update",!0)),this.send("closeModal")}},_completeBeforeUpdate:function(e,t,a){var l=null,s=e.get("prefix"),i=[],o=this.get("model"),r=o.getProperties("aisleLocation","dateReceived","purchaseCost","lotNumber","expirationDate","giftInKind","invoiceNo","location","originalQuantity","quantityGroups","vendor","vendorItemNo"),d=this.get("model.originalQuantity");if(!n.default.isEmpty(d)){r.currentQuantity=d,r.inventoryItem=this.get("model.id");var c=this.get("store").createRecord("inv-purchase",r);i.push(c.save()),this.get("model.purchases").addObject(c),i.push(this.newPurchaseAdded(this.get("model"),c))}e.incrementProperty("value",1),l=e.get("value"),s+=l<1e5?String("00000"+l).slice(-5):l,o.set("friendlyId",s),i.push(e.save()),n.default.RSVP.all(i,"All before update done for inventory item").then(function(){t()},function(e){a(e)})},_findSequence:function(e,t,a){var l=new n.default.RSVP.Promise(function(t){this._checkNextSequence(t,e,0)}.bind(this));l.then(function(n){var l=this.get("store"),s=l.push(l.normalize("sequence",{id:"inventory_"+e,prefix:e.toLowerCase().substr(0,n),value:0}));this._completeBeforeUpdate(s,t,a)}.bind(this))},_findSequenceByPrefix:function(e,t){var n=this.get("database"),a={key:e.toLowerCase().substr(0,t)};return n.queryMainDB(a,"sequence_by_prefix")},_checkNextSequence:function(e,t,a){a++,this._findSequenceByPrefix(t,a).then(function(l){n.default.isEmpty(l.rows)?e(a):this._checkNextSequence(e,t,a)}.bind(this),function(){e(a)})},_saveRequest:function(e){e.set("status","Completed"),e.set("completedBy",e.getUserName()),e.save().then(function(){this.send("update",!0),this.send("closeModal"),this.getTransactions()}.bind(this))},getTransactions:function(){var e=this.get("model.id");this.set("transactions",null),this.store.query("inv-request",{options:{endkey:[e,"Completed",0],startkey:[e,"Completed",9999999999999],descending:!0},mapReduce:"inventory_request_by_item"}).then(function(e){this.set("transactions",e)}.bind(this))},beforeUpdate:function(){var e=this;if(!this.get("model.isNew"))return n.default.RSVP.Promise.resolve();var t=function(){var t=e.get("model"),a=t.get("inventoryType");return{v:new n.default.RSVP.Promise(function(e,n){t.validate().then(function(){t.get("isValid")?(this.set("savingNewItem",!0),this.store.find("sequence","inventory_"+a).then(function(t){this._completeBeforeUpdate(t,e,n)}.bind(this),function(){this._findSequence(a,e,n)}.bind(this))):(this.send("showDisabledDialog"),n("invalid model"))}.bind(this)).catch(function(){this.send("showDisabledDialog")}.bind(this))}.bind(e))}}();return"object"==typeof t?t.v:void 0},afterUpdate:function(){var e=null;this.get("savingNewItem")&&(e="editNewItem",this.set("savingNewItem",!1)),this.displayAlert("Inventory Item Saved","The inventory item has been saved.",e)}})}),define("hospitalrun/inventory/edit/route",["exports","hospitalrun/routes/abstract-edit-route","ember","ember-i18n","hospitalrun/mixins/inventory-id"],function(e,t,n,a,l){e.default=t.default.extend(l.default,{editTitle:(0,a.translationMacro)("inventory.labels.editItem"),modelName:"inventory",newTitle:(0,a.translationMacro)("inventory.labels.newItem"),actions:{adjustItems:function(e){this.controller.send("adjustItems",e)},doneFulfillRequest:function(){this.controller.getTransactions()},editNewItem:function(){this.controller.send("editNewItem")},transferItems:function(e){this.controller.send("transferItems",e)},updatePurchase:function(e,t){this.controller.send("updatePurchase",e,t)}},getNewData:function(){return n.default.RSVP.resolve({dateReceived:new Date,quantityGroups:[]})},setupController:function(e,t){this._super(e,t),e.getTransactions()}})}),define("hospitalrun/inventory/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"dewSrZbs",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],27]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","colspan","4"],["flush-element"],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-refresh glyphicon-refresh-animate"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["inventory.messages.loading"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["unknown",["location","name"]],false],["open-element","br",[]],["flush-element"],["close-element"],["text","\\n"]],"locals":["location"]},{"statements":[["text"," "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.transferredFrom"],null],false],["close-element"],["text","\\n"],["block",["each"],[["get",["transaction","locationsAffected"]]],null,1],["text"," "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.transferredTo"],null],false],["close-element"],["text"," "],["append",["unknown",["transaction","deliveryDetails"]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.delivered"],null],false],["close-element"],["text"," "],["append",["unknown",["transaction","deliveryDetails"]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.prescription"],null],false],["close-element"],["text"," "],["append",["unknown",["transaction","deliveryDetails"]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["unknown",["location","name"]],false],["open-element","br",[]],["flush-element"],["close-element"],["text","\\n"]],"locals":["location"]},{"statements":[["text"," "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.cost"],null],false],["close-element"],["text"," "],["append",["unknown",["transaction","costPerUnit"]],false],["open-element","br",[]],["flush-element"],["close-element"],["text","\\n "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.quantity"],null],false],["close-element"],["text"," "],["append",["unknown",["transaction","quantityAtCompletion"]],false],["open-element","br",[]],["flush-element"],["close-element"],["text","\\n "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.pulled"],null],false],["close-element"],["text","\\n"],["block",["each"],[["get",["transaction","locationsAffected"]]],null,5],["block",["if"],[["get",["transaction","patient"]]],null,4,3]],"locals":[]},{"statements":[["text"," "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.location"],null],false],["close-element"],["text"," "],["append",["unknown",["transaction","deliveryDetails"]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.returned"],null],false],["close-element"],["text"," "],["append",["unknown",["transaction","deliveryDetails"]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.reason"],null],false],["close-element"],["text"," "],["append",["unknown",["transaction","reason"]],false],["open-element","br",[]],["flush-element"],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["transaction","haveReason"]]],null,9],["block",["if"],[["get",["transaction","patient"]]],null,8,7]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["transaction","dateCompleted"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["transaction","quantity"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["transaction","transactionType"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["transaction","expenseAccount"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["transaction","isAdjustment"]]],null,10],["block",["if"],[["get",["transaction","isFulfillment"]]],null,6],["block",["if"],[["get",["transaction","isTransfer"]]],null,2],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["transaction"]},{"statements":[["block",["each"],[["get",["transactions"]]],null,11]],"locals":[]},{"statements":[["text"," "],["open-element","h3",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.transactions"],null],false],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.dateCompleted"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.quantity"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.transaction"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.expense"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.details"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["haveTransactions"]]],null,12,0],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-primary neutral"],["modifier",["action"],[["get",[null]],"showAdjustment",["get",["location"]]]],["flush-element"],["append",["helper",["t"],["inventory.labels.adjust"],null],false],["close-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-primary neutral"],["modifier",["action"],[["get",[null]],"showTransfer",["get",["location"]]]],["flush-element"],["append",["helper",["t"],["inventory.labels.transfer"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["location","location"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["location","aisleLocation"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["location","quantity"]],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canAdjustLocation"]]],null,14],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["location","quantity"]]],null,15]],"locals":["location"]},{"statements":[["text"," "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.action"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","h3",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.locations"],null],false],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.location"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.aisleLocation"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.quantity"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canAdjustLocation"]]],null,17],["text"," "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","locations"]]],null,16],["text"," "],["close-element"],["text","\\n"],["block",["if"],[["get",["showTransactions"]]],null,13]],"locals":[]},{"statements":[["text"," "],["append",["helper",["t"],["inventory.labels.giftInKindNo"],null],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["t"],["inventory.labels.giftInKindYes"],null],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["dynamic-attr","class",["helper",["if"],[["get",["purchase","expired"]],"warning"],null],null],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["purchase","dateReceived"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["purchase","purchaseCost"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["purchase","costPerUnit"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["purchase","originalQuantity"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["purchase","currentQuantity"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["purchase","giftInKind"]]],null,20,19],["text"," "],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["purchase","lotNumber"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["purchase","expirationDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["purchase","vendor"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["purchase","invoiceNo"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["purchase"]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"showAddPurchase",["get",["model"]]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["inventory.titles.addPurchase"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-danger alert-dismissible"],["static-attr","role","alert"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","close"],["static-attr","data-dismiss","alert"],["flush-element"],["open-element","span",[]],["static-attr","aria-hidden","true"],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["open-element","span",[]],["static-attr","class","sr-only"],["flush-element"],["append",["helper",["t"],["buttons.close"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-warning-sign"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["t"],["inventory.messages.quantity"],[["quantity","locationQuantity"],[["get",["model","quantity"]],["get",["locationQuantityTotal"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["inventory.messages.adjust"],[["difference"],[["get",["quantityDifferential"]]]]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["quantityDiscrepency"]]],null,23],["text"," "],["open-element","h3",[]],["flush-element"],["text","\\n "],["append",["helper",["t"],["inventory.labels.purchases"],null],false],["text","\\n"],["block",["if"],[["get",["canAddPurchase"]]],null,22],["text"," "],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.dateReceived"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.purchaseCost"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.costPerUnit"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.originalQuantity"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.currentQuantity"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.gift"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.serialNumber"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.expirationDate"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.vendor"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.invoiceNumber"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","purchases"]]],null,21],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","h3",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.purchaseInfo"],null],false],["close-element"],["text","\\n "],["partial","inv-purchase"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["partial","inventory-basic"],["text","\\n"],["block",["if"],[["get",["model","isNew"]]],null,25,24],["block",["unless"],[["get",["model","isNew"]]],null,18]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],26]],"locals":[]}],"hasPartials":true}',meta:{moduleName:"hospitalrun/inventory/edit/template.hbs"}})}),define("hospitalrun/inventory/index/controller",["exports","hospitalrun/controllers/abstract-paged-controller","hospitalrun/mixins/user-session"],function(e,t,n){e.default=t.default.extend(n.default,{startKey:[],canAdd:function(){return this.currentUserCan("add_inventory_request")}.property(),canFulfill:function(){return this.currentUserCan("fulfill_inventory")}.property()})}),define("hospitalrun/inventory/index/route",["exports","hospitalrun/routes/abstract-index-route","hospitalrun/mixins/user-session","ember-i18n"],function(e,t,n,a){e.default=t.default.extend(n.default,{modelName:"inv-request",newButtonAction:function(){return this.currentUserCan("add_inventory_request")?"newRequest":null}.property(),newButtonText:(0,a.translationMacro)("buttons.newRequestPlus"),pageTitle:(0,a.translationMacro)("navigation.subnav.requests"),_getStartKeyFromItem:function(e){var t=this._getPouchIdFromItem(e);return["Requested",null,t]},_modelQueryParams:function(){var e=this.get("maxValue");return{options:{startkey:["Requested",null,null],endkey:["Requested",e,e]},mapReduce:"inventory_request_by_status"}},actions:{fulfill:function(e){e.set("dateCompleted",new Date),this.transitionTo("inventory.request",e)}}})}),define("hospitalrun/inventory/index/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"kh9OXcNN",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],6]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["open-element","a",[]],["static-attr","href","#"],["modifier",["action"],[["get",[null]],"newRequest"]],["flush-element"],["text"," "],["append",["helper",["t"],["inventory.messages.createRequest"],null],false],["close-element"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["inventory.messages.noRequests"],null],false],["block",["if"],[["get",["canAdd"]]],null,0],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-primary"],["modifier",["action"],[["get",[null]],"fulfill",["get",["request"]]]],["flush-element"],["append",["helper",["t"],["labels.fulfill"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["request","inventoryItem","name"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["request","quantity"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["request","dateRequested"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["request","requestedBy"]],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canFulfill"]]],null,2],["text"," "],["close-element"],["text","\\n"]],"locals":["request"]},{"statements":[["text"," "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.name"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.quantity"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.requestedOn"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canFulfill"]]],null,4],["text"," "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,3],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["hasRecords"]]],null,5,1]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/inventory/index/template.hbs"}})}),define("hospitalrun/inventory/listing/controller",["exports","hospitalrun/controllers/abstract-paged-controller","hospitalrun/mixins/user-session"],function(e,t,n){e.default=t.default.extend(n.default,{canAddItem:function(){return this.currentUserCan("add_inventory_item")}.property(),canAddPurchase:function(){return this.currentUserCan("add_inventory_purchase")}.property(),canDeleteItem:function(){return this.currentUserCan("delete_inventory_item")}.property(),startKey:[]})}),define("hospitalrun/inventory/listing/route",["exports","hospitalrun/routes/abstract-index-route","hospitalrun/mixins/user-session","ember-i18n"],function(e,t,n,a){e.default=t.default.extend(n.default,{modelName:"inventory",newButtonAction:function(){return this.currentUserCan("add_inventory_item")?"newItem":null}.property(),newButtonText:(0,a.translationMacro)("buttons.newItem"),pageTitle:(0,a.translationMacro)("inventory.labels.items"),_modelQueryParams:function(){return{mapReduce:"inventory_by_name"}},_getStartKeyFromItem:function(e){var t=this._getPouchIdFromItem(e);return[e.get("name"),t]}})}),define("hospitalrun/inventory/listing/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"lA3sUJLz",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],14]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","a",[]],["static-attr","href","#"],["modifier",["action"],[["get",[null]],"newItem"]],["flush-element"],["append",["helper",["t"],["messages.createNewRecord"],null],false],["close-element"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["messages.noItemsFound"],null],false],["text"," "],["block",["if"],[["get",["canAddItem"]]],null,0],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["append",["helper",["t"],["buttons.barcode"],null],false]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"deleteItem",["get",["inventory"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["buttons.delete"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editItem",["get",["inventory"]]],[["bubbles"],[false]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"showAddPurchase",["get",["inventory"]]],[["bubbles"],[false]]],["flush-element"],["append",["helper",["t"],["buttons.add"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["static-attr","class","clickable"],["modifier",["action"],[["get",[null]],"editItem",["get",["inventory"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["inventory","friendlyId"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["inventory","name"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["inventory","inventoryType"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["inventory","quantity"]],false],["text"," "],["append",["unknown",["inventory","distributionUnit"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["inventory","displayLocations"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["inventory","crossReference"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddPurchase"]]],null,5],["block",["if"],[["get",["canAddItem"]]],null,4],["block",["if"],[["get",["canDeleteItem"]]],null,3],["text"," "],["block",["link-to"],["inventory.barcode",["get",["inventory"]]],[["class","bubbles"],["btn btn-default neutral",false]],2],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["unless"],[["get",["inventory","isNew"]]],null,6]],"locals":["inventory"]},{"statements":[["append",["helper",["t"],["inventory.labels.xref"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.quantity"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.type"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.name"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.id"],null],false]],"locals":[]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["friendlyId",["get",["sortDesc"]],["get",["sortKey"]]]],12],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["name",["get",["sortDesc"]],["get",["sortKey"]]]],11],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["inventoryType",["get",["sortDesc"]],["get",["sortKey"]]]],10],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["quantity",["get",["sortDesc"]],["get",["sortKey"]]]],9],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.location"],null],false],["close-element"],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["crossReference",["get",["sortDesc"]],["get",["sortKey"]]]],8],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,7],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["hasRecords"]]],null,13,1]],"locals":[]}],"hasPartials":false}', -meta:{moduleName:"hospitalrun/inventory/listing/template.hbs"}})}),define("hospitalrun/inventory/purchase/edit/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/mixins/unit-types"],function(e,t,n,a){e.default=t.default.extend(a.default,{inventoryController:n.default.inject.controller("inventory"),cancelAction:"closeModal",canEditQuantity:function(){var e=this.get("model.originalQuantity"),t=this.get("model.currentQuantity");return!(t-1)return e.name.split(":")[1]})},_addLocationColumn:function(e){var t=this;if(!n.default.isEmpty(e)){var a=function(){var n=[];return e.forEach(function(e){var t=void 0;t=0===e.name.indexOf("From:")?e.name:this._getWarehouseLocationName(e.name),n.includes(t)||n.push(t)}.bind(t)),{v:n}}();if("object"==typeof a)return a.v}},_addReportRow:function(e,t,a,l){!n.default.isEmpty(l)||n.default.isEmpty(e.inventoryItem)||n.default.isEmpty(e.inventoryItem.id)||(l={action:"viewInventory",model:e.inventoryItem.id}),this._super(e,t,a,l)},_addTotalsRow:function(e,t,n){n>0&&this._addReportRow({totalCost:e+this._numberFormat(t),quantity:e+this._numberFormat(n),unitCost:e+this._numberFormat(t/n)},!0)},_adjustLocation:function(e,t,a,l){var s=e.findBy("name",t);n.default.isEmpty(s)&&(s={name:t,quantity:0},e.push(s)),l?s.quantity+=a:s.quantity-=a},_adjustPurchase:function(e,t,a,l){var s=e.findBy("id",t);if(!n.default.isEmpty(s)){var i=s.calculatedQuantity;l?i+=a:i-=a,s.calculatedQuantity=i}},_calculateCosts:function(e,t){return n.default.isEmpty(e)||e.forEach(function(e){var n=this._calculateCostPerUnit(e),a=e.calculatedQuantity;t.quantity+=e.calculatedQuantity,t.totalCost+=a*n}.bind(this)),0===t.totalCost||0===t.quantity?t.unitCost=0:t.unitCost=t.totalCost/t.quantity,t},_calculateUsage:function(e,t){return n.default.isEmpty(e)||e.forEach(function(e){var n=this._calculateCostPerUnit(e),a=e.calculatedQuantity;t.quantity-=e.calculatedQuantity,t.totalCost-=a*n}.bind(this)),0===t.totalCost||0===t.quantity?t.unitCost=0:t.unitCost=t.totalCost/t.quantity,t},_calculateCostPerUnit:function(e){var t=e.purchaseCost,a=parseInt(e.originalQuantity);return n.default.isEmpty(t)||n.default.isEmpty(a)?0:Number((t/a).toFixed(2))},_findInventoryItems:function(e,t,a,l){n.default.isEmpty(a)&&(a={});var s=this.get("database");return new n.default.RSVP.Promise(function(i,o){s.queryMainDB(e,t).then(function(e){var t=Object.keys(a),r=[];n.default.isEmpty(e.rows)||e.rows.forEach(function(e){e.doc.inventoryItem&&!t.includes(e.doc.inventoryItem)&&(r.push(s.getPouchId(e.doc.inventoryItem,"inventory")),t.push(e.doc.inventoryItem))}),this._getInventoryItems(r,a).then(function(t){e.rows.forEach(function(e){var a=t[e.doc.inventoryItem];if(!n.default.isEmpty(a)&&("purchaseObjects"!==l||a.purchases.includes(e.doc.id))){var s=a[l];n.default.isEmpty(s)&&(s=[]),s.push(e.doc),a[l]=s}}),i(t)},o)}.bind(this),o)}.bind(this))},_findInventoryItemsByPurchase:function(e,t){return this._findInventoryItems({startkey:[e.startTime,"invPurchase_"],endkey:[e.endTime,"invPurchase_￿"],include_docs:!0},"inventory_purchase_by_date_received",t,"purchaseObjects")},_findInventoryItemsByRequest:function(e,t){return this._findInventoryItems({startkey:["Completed",e.startTime,"invRequest_"],endkey:["Completed",e.endTime,"invRequest_￿"],include_docs:!0},"inventory_request_by_status",t,"requestObjects")},_finishExpenseReport:function(e){var t=this.get("expenseCategories"),a=this.get("expenseMap"),l=this.get("i18n");t.forEach(function(t){var s=0,i=void 0,o=void 0;this._addReportRow({inventoryItem:{name:l.t("inventory.reports.rows.expensesFor")+t}}),a[t].expenseAccounts.forEach(function(a){"detailedExpense"===e&&a.reportRows.forEach(function(e){this._addReportRow(e)}.bind(this)),i=n.default.isEmpty(a.name)?l.t("inventory.reports.rows.noAccount"):a.name,o=l.t("inventory.reports.rows.subtotalFor",{category:t,account:i}),this._addReportRow({totalCost:o+this._numberFormat(a.total)},!0),s+=a.total}.bind(this)),o=l.t("inventory.reports.rows.totalFor",{var:t}),this._addReportRow({totalCost:o+this._numberFormat(s)},!0),this.incrementProperty("grandCost",s)}.bind(this)),this._addReportRow({totalCost:l.t("inventory.reports.rows.total")+this._numberFormat(this.get("grandCost"))},!0)},_finishLocationReport:function(){var e="",t=0,n=this.get("locationSummary"),a="",l=0,s=this.get("i18n");n=n.sortBy("name"),n.forEach(function(n){a=this._getWarehouseLocationName(n.name);var i=s.t("inventory.reports.rows.totalFor",{var:e});if(e!==a&&(this._addTotalsRow(i,t,l),l=0,t=0,e=a),this._includeLocation(a))for(var o in n.items)n.items[o].quantity>0&&(this._addReportRow({giftInKind:n.items[o].giftInKind,inventoryItem:n.items[o].item,quantity:n.items[o].quantity,locations:[{name:n.name}],totalCost:n.items[o].totalCost,unitCost:n.items[o].unitCost}),l+=this._getValidNumber(n.items[o].quantity),t+=this._getValidNumber(n.items[o].totalCost),this.incrementProperty("grandCost",this._getValidNumber(n.items[o].totalCost)),this.incrementProperty("grandQuantity",this._getValidNumber(n.items[o].quantity)))}.bind(this)),l>0&&this._addTotalsRow(s.t("inventory.reports.rows.totalFor",{var:a}),t,l)},_generateExpirationReport:function(){var e=0,t=this.get("database"),a=this.get("reportRows"),l=this._getDateQueryParams();t.queryMainDB({startkey:[l.startTime,"invPurchase_"],endkey:[l.endTime,"invPurchase_￿"],include_docs:!0},"inventory_purchase_by_expiration_date").then(function(l){var s=[],i=[];l.rows.forEach(function(e){e.doc.currentQuantity>0&&!n.default.isEmpty(e.doc.expirationDate)&&(s.push(e.doc),i.push(t.getPouchId(e.doc.inventoryItem,"inventory")))}.bind(this)),this._getInventoryItems(i).then(function(t){var n=this.get("i18n");s.forEach(function(n){var l=n.currentQuantity,s=new Date(n.expirationDate),i=t[n.inventoryItem];i&&this._includeLocation(n.location)&&(a.addObject([i.friendlyId,i.name,l,i.distributionUnit,moment(s).format("l"),this.formatLocationName(n.location,n.aisleLocation)]),e+=l)}.bind(this)),a.addObject(["","",n.t("inventory.reports.rows.total")+e,"",""]),this.set("showReportResults",!0),this.set("reportHeaders",[n.t("labels.id"),n.t("labels.name"),n.t("inventory.labels.currentQuantity"),n.t("inventory.labels.distributionUnit"),n.t("inventory.labels.expirationDate"),n.t("inventory.labels.location")]),this._generateExport(),this._setReportTitle(),this.closeProgressModal()}.bind(this))}.bind(this))},_generateFinancialSummaryReport:function(){var e=this._getDateQueryParams();this._calculateBeginningBalance(e).then(function(t){this._generateSummaries(e).then(function(e){var n=this._numberFormat(t+e),a=this.get("i18n");t+e<0?this.get("reportRows").addObject([a.t("inventory.reports.rows.balanceEnd"),"","("+n+")"]):this.get("reportRows").addObject([a.t("inventory.reports.rows.balanceEnd"),"",n]),this.set("showReportResults",!0),this.set("reportHeaders",[a.t("inventory.reports.rows.category"),a.t("labels.type"),a.t("inventory.labels.total")]),this._generateExport(),this._setReportTitle(),this.closeProgressModal()}.bind(this),function(e){this._notifyReportError(this.get("i18n").t("inventory.reports.rows.errInFinSum")+e)}.bind(this))}.bind(this))},_generateSummaries:function(e){return new n.default.RSVP.Promise(function(t,a){var l=0,s=this.get("i18n");this._findInventoryItemsByRequest(e,{}).then(function(i){this._findInventoryItemsByPurchase(e,i).then(function(e){var a={},i={},o={},r={};if(this.adjustmentTypes.forEach(function(e){r[e.type]=[]}),Object.keys(e).forEach(function(t){if(!n.default.isEmpty(t)&&!n.default.isEmpty(e[t])){var l=e[t];n.default.isEmpty(l.purchaseObjects)||l.purchaseObjects.forEach(function(e){a[l.inventoryType]=this._getValidNumber(a[l.inventoryType])+this._getValidNumber(e.purchaseCost)}.bind(this)),n.default.isEmpty(l.requestObjects)||l.requestObjects.forEach(function(e){e.adjustPurchases&&("Fulfillment"===e.transactionType?e.giftInKind?o[l.inventoryType]=this._getValidNumber(o[l.inventoryType])+this._getValidNumber(e.quantity*e.costPerUnit):i[l.inventoryType]=this._getValidNumber(i[l.inventoryType])+this._getValidNumber(e.quantity*e.costPerUnit):r[e.transactionType][l.inventoryType]=this._getValidNumber(r[e.transactionType][l.inventoryType])+this._getValidNumber(e.quantity*e.costPerUnit))}.bind(this))}}.bind(this)),Object.keys(a).length>0){var d=0;this.get("reportRows").addObject([s.t("inventory.labels.purchases"),"",""]),Object.keys(a).forEach(function(e){var t=this._getValidNumber(a[e]);d+=t,this.get("reportRows").addObject(["",e,this._numberFormat(t)])}.bind(this)),this.get("reportRows").addObject([s.t("inventory.reports.rows.totalPurchases"),"",this._numberFormat(d)]),l+=d}if(Object.keys(i).length>0||Object.keys(o).length>0){this.get("reportRows").addObject([s.t("inventory.reports.rows.consumed"),"",""]);var c=0;if(Object.keys(i).length>0){this.get("reportRows").addObject([s.t("inventory.reports.rows.consumedPuchases"),"",""]);var u=0;Object.keys(i).forEach(function(e){var t=this._getValidNumber(i[e]);u+=t,this.get("reportRows").addObject(["",e,"("+this._numberFormat(t)+")"])}.bind(this)),c+=u,this.get("reportRows").addObject([s.t("inventory.reports.rows.consumedPurchasesTotal"),"","("+this._numberFormat(u)+")"])}if(Object.keys(o).length>0){this.get("reportRows").addObject([s.t("inventory.reports.rows.consumedGik"),"",""]);var p=0;Object.keys(o).forEach(function(e){var t=this._getValidNumber(o[e]);p+=t,this.get("reportRows").addObject(["",e,"("+this._numberFormat(t)+")"])}.bind(this)),c+=p,this.get("reportRows").addObject([s.t("inventory.reports.rows.consumedGikTotal"),"","("+this._numberFormat(p)+")"])}this.get("reportRows").addObject([s.t("inventory.reports.rows.consumedTotal"),"","("+this._numberFormat(c)+")"]),l-=c}var m=0;this.get("reportRows").addObject([s.t("inventory.reports.rows.adjustments"),"",""]),Object.keys(r).forEach(function(e){Object.keys(r[e]).length>0&&(this.get("reportRows").addObject([e,"",""]),Object.keys(r[e]).forEach(function(t){var n=this._getValidNumber(r[e][t]);"Adjustment (Add)"===e||"Return"===e?(m+=n,this.get("reportRows").addObject(["",t,this._numberFormat(n)])):(m-=n,this.get("reportRows").addObject(["",t,"("+this._numberFormat(n)+")"]))}.bind(this)))}.bind(this)),m<0?this.get("reportRows").addObject([s.t("inventory.reports.rows.adjustmentsTotal"),"","("+this._numberFormat(m)+")"]):this.get("reportRows").addObject([s.t("inventory.reports.rows.adjustmentsTotal"),"",this._numberFormat(m)]),l+=m,t(l)}.bind(this),a)}.bind(this),a)}.bind(this))},_calculateBeginningBalance:function(e){return new n.default.RSVP.Promise(function(t,a){var l={startTime:null,endTime:e.startTime},s=0,i=this.get("i18n");this._findInventoryItemsByRequest(l,{}).then(function(e){this._findInventoryItemsByPurchase(l,e).then(function(e){Object.keys(e).forEach(function(t){if(!n.default.isEmpty(t)&&!n.default.isEmpty(e[t])){var a=e[t],l=a.purchaseObjects,i=a.requestObjects,o={inventoryItem:a,quantity:0,unitCost:0,totalCost:0};n.default.isEmpty(l)||l.forEach(function(e){var t=e.originalQuantity;e.calculatedQuantity=t}),n.default.isEmpty(i)||i.forEach(function(e){var t=e.adjustPurchases,a=!1,s=e.purchasesAffected,i=e.transactionType;a="Adjustment (Add)"===i||"Return"===i,t&&(n.default.isEmpty(s)||n.default.isEmpty(l)||s.forEach(function(e){this._adjustPurchase(l,e.id,e.quantity,a)}.bind(this)))}.bind(this)),n.default.isEmpty(l)||(o=this._calculateCosts(l,o),s+=this._getValidNumber(o.totalCost))}}.bind(this)),s<0?this.get("reportRows").addObject([i.t("inventory.reports.rows.balanceBegin"),"","("+this._numberFormat(s)+")"]):this.get("reportRows").addObject([i.t("inventory.reports.rows.balanceBegin"),"",this._numberFormat(s)]),t(s)}.bind(this),a)}.bind(this),a)}.bind(this))},_generateInventoryReport:function(){this.set("grandCost",0),this.set("grandQuantity",0),this.set("locationSummary",[]);var e=void 0,t=this.get("locationSummary"),a=this.get("reportType"),l=this._getDateQueryParams(),s=this.get("i18n");if("daysLeft"===a){var i=this.get("endDate"),o=this.get("startDate");if(n.default.isEmpty(i)||n.default.isEmpty(o))return void this.closeProgressModal();e=moment(i).diff(o,"days")}this._findInventoryItemsByRequest(l,{}).then(function(i){this._findInventoryItemsByPurchase(l,i).then(function(l){switch(Object.keys(l).forEach(function(i){if(!n.default.isEmpty(l[i])){var o=l[i],r=o.purchaseObjects,d=o.requestObjects,c={giftInKind:"N",inventoryItem:o,quantity:0,unitCost:0,totalCost:0,locations:[],vendors:[]};n.default.isEmpty(r)||r.forEach(function(e){var t=this.getDisplayLocationName(e.location,e.aisleLocation),a=e.originalQuantity;e.calculatedQuantity=a,e.giftInKind===!0&&(c.giftInKind="Y"),n.default.isEmpty(e.vendor)||c.vendors.includes(e.vendor)||c.vendors.push(e.vendor),this._adjustLocation(c.locations,t,a,!0)}.bind(this)),n.default.isEmpty(d)||d.forEach(function(e){var t=e.adjustPurchases,a=e.transactionType,l=!1,s=e.locationsAffected,i=e.purchasesAffected;if(l="Adjustment (Add)"===a||"Return"===a,t)n.default.isEmpty(i)||n.default.isEmpty(r)||i.forEach(function(e){this._adjustPurchase(r,e.id,e.quantity,l)}.bind(this));else if("Transfer"===a){var o=this.getDisplayLocationName(e.deliveryLocation,e.deliveryAisle);this._adjustLocation(c.locations,o,e.quantity,!0)}s.forEach(function(e){this._adjustLocation(c.locations,e.name,e.quantity,l)}.bind(this))}.bind(this));var u=0,p=0;switch(a){case"byLocation":c.locations.forEach(function(e){var a=t.findBy("name",this._getWarehouseLocationName(e.name));n.default.isEmpty(a)?(a=n.default.copy(e),a.items={},t.push(a)):a.quantity+=this._getValidNumber(e.quantity);var l=this._calculateCosts(r,{quantity:0,totalCost:0});a.items[o.id]={item:o,quantity:this._getValidNumber(e.quantity),giftInKind:c.giftInKind,totalCost:this._getValidNumber(l.unitCost)*this._getValidNumber(e.quantity),unitCost:this._getValidNumber(l.unitCost)}}.bind(this));break;case"daysLeft":if(!n.default.isEmpty(d)&&this._hasIncludedLocation(c.locations)){var m=d.reduce(function(e,t){return"Fulfillment"===t.transactionType?e+=this._getValidNumber(t.quantity):e}.bind(this),0);c.quantity=this._getValidNumber(o.quantity),m>0?(c.consumedPerDay=this._numberFormat(m/e,!0),c.daysLeft=this._numberFormat(c.quantity/c.consumedPerDay)):(0===m?c.consumedPerDay="0":c.consumedPerDay="?"+m,c.daysLeft="?"),this._addReportRow(c)}break;case"detailedAdjustment":case"detailedTransfer":case"detailedUsage":case"detailedExpense":case"summaryExpense":n.default.isEmpty(d)||(d.forEach(function(e){var t=this;this._includeTransaction(a,e.transactionType)&&this._hasIncludedLocation(e.locationsAffected)&&!function(){var n=t.getDisplayLocationName(e.deliveryLocation,e.deliveryAisle),l=[],i=t._getValidNumber(e.quantity),o=t._getValidNumber(e.quantity)*t._getValidNumber(e.costPerUnit);l=e.locationsAffected.map(function(e){return"detailedTransfer"===a?{name:s.t("inventory.reports.rows.transfer2",{source:e.name,target:n}).toString()}:{name:s.t("inventory.reports.rows.transfer1",{quantity:i,location:e.name}).toString()}}.bind(t));var r={date:moment(new Date(e.dateCompleted)).format("l"),expenseAccount:e.expenseAccount,giftInKind:c.giftInKind,inventoryItem:c.inventoryItem,quantity:e.quantity,transactionType:e.transactionType,locations:l,unitCost:e.costPerUnit,totalCost:o};"detailedExpense"===a||"summaryExpense"===a?t._updateExpenseMap(e,r):(t._addReportRow(r),p+=t._getValidNumber(e.quantity),u+=t._getValidNumber(o))}()}.bind(this)),"detailedExpense"!==a&&"summaryExpense"!==a&&(this._addTotalsRow(s.t("inventory.reports.rows.subtotal"),u,p),this.incrementProperty("grandCost",u),this.incrementProperty("grandQuantity",p)));break;case"summaryTransfer":case"summaryUsage":!n.default.isEmpty(d)&&this._hasIncludedLocation(c.locations)&&(c.quantity=d.reduce(function(e,t){if(this._includeTransaction(a,t.transactionType)){var n=this._getValidNumber(t.quantity)*this._getValidNumber(t.costPerUnit);return u+=n,e+=this._getValidNumber(t.quantity)}return e}.bind(this),0),c.quantity>0&&(c.totalCost=u,c.unitCost=u/c.quantity,this._addReportRow(c),this.incrementProperty("grandCost",u),this.incrementProperty("grandQuantity",c.quantity)));break;case"detailedPurchase":n.default.isEmpty(r)||(r.forEach(function(e){if(this._includeLocation(e.location)){var t="N";e.giftInKind===!0&&(t="Y"),this._addReportRow({date:moment(new Date(e.dateReceived)).format("l"),giftInKind:t,inventoryItem:c.inventoryItem,quantity:e.originalQuantity,unitCost:e.costPerUnit,totalCost:e.purchaseCost,locations:[{name:this.getDisplayLocationName(e.location,e.aisleLocation)}]}),u+=this._getValidNumber(e.purchaseCost),p+=this._getValidNumber(e.originalQuantity)}}.bind(this)),this._addTotalsRow(s.t("inventory.reports.rows.subtotal"),u,p),this.incrementProperty("grandCost",u),this.incrementProperty("grandQuantity",p));break;case"summaryPurchase":n.default.isEmpty(r)||(c.locations=[],c.quantity=r.reduce(function(e,t){u+=this._getValidNumber(t.purchaseCost);var n=this.getDisplayLocationName(t.location,t.aisleLocation);return c.locations.findBy("name",n)||c.locations.push({name:this.getDisplayLocationName(t.location,t.aisleLocation)}),e+=this._getValidNumber(t.originalQuantity)}.bind(this),0),this._hasIncludedLocation(c.locations)&&(c.unitCost=u/c.quantity,c.totalCost=u,this._addReportRow(c),this.incrementProperty("grandCost",u),this.incrementProperty("grandQuantity",c.quantity)));break;case"valuation":!n.default.isEmpty(r)&&this._hasIncludedLocation(c.locations)&&(this._calculateCosts(r,c),this.incrementProperty("grandCost",this._getValidNumber(c.totalCost)),this.incrementProperty("grandQuantity",this._getValidNumber(c.quantity)),this._addReportRow(c))}}}.bind(this)),a){case"detailedExpense":case"summaryExpense":this._finishExpenseReport(a);break;case"byLocation":this._finishLocationReport(),this._addTotalsRow(s.t("inventory.reports.rows.total"),this.get("grandCost"),this.get("grandQuantity"));break;default:this._addTotalsRow(s.t("inventory.reports.rows.total"),this.get("grandCost"),this.get("grandQuantity"))}this._finishReport()}.bind(this),function(e){this._notifyReportError(s.t("inventory.reports.rows.errInFindPur")+e)}.bind(this))}.bind(this),function(e){this._notifyReportError(s.t("inventory.reports.rows.errInFindPur")+e)}.bind(this))},_getDateQueryParams:function(){var e=this.get("endDate"),t=this.get("maxValue"),a=this.get("startDate"),l=void 0;return n.default.isEmpty(e)||(t=moment(e).endOf("day").toDate().getTime()),n.default.isEmpty(a)||(l=moment(a).startOf("day").toDate().getTime()),{endTime:t,startTime:l}},_getInventoryItems:function(e,t){var a=this.get("database");return new n.default.RSVP.Promise(function(l,s){n.default.isEmpty(t)&&(t={}),a.queryMainDB({keys:e,include_docs:!0}).then(function(e){e.rows.forEach(function(e){e.doc&&e.doc.archived!==!0&&(t[e.doc.id]=e.doc)}),l(t)},s)})},_getWarehouseLocationName:function(e){var t="";return t=e.indexOf(":")>-1?e.split(":")[0].trim():e},_hasIncludedLocation:function(e){var t=!1;return e.forEach(function(e){var n=this._getWarehouseLocationName(e.name);this._includeLocation(n)&&(t=!0)}.bind(this)),t},_includeLocation:function(e){var t=this.get("filterLocation");return n.default.isEmpty(t)||e===t},_includeTransaction:function(e,t){var n=0===e.indexOf("detailed"),a=void 0;if("detailedExpense"===e||"summaryExpense"===e)return!0;switch(t){case"Fulfillment":a=n?"detailedUsage":"summaryUsage";break;case"Transfer":a=n?"detailedTransfer":"summaryTransfer";break;default:a=n?"detailedAdjustment":"summaryAdjustment"}return e===a},_updateExpenseMap:function(e,t){var a=void 0,l=this.get("expenseMap"),s="Y"===t.giftInKind,i=!0;switch(e.transactionType){case"Fulfillment":case"Return":a=s?l["Gift In Kind Usage"]:l["Inventory Consumed"],"Return"===e.transactionType&&(i=!1);break;case"Adjustment (Add)":case"Adjustment (Remove)":case"Return To Vendor":case"Write Off":a=l["Inventory Obsolence"],"Adjustment (Add)"===e.transactionType&&(i=!1)}if(!n.default.isEmpty(a)){var o=a.expenseAccounts.findBy("name",e.expenseAccount);n.default.isEmpty(o)&&(o={name:e.expenseAccount,total:0,reportRows:[]},a.expenseAccounts.push(o)),o.reportRows.push(t);var r=this._getValidNumber(e.quantity)*this._getValidNumber(e.costPerUnit);i?(a.total+=r,o.total+=r):(a.total=a.total-r,o.total=o.total-r,t.totalCost=t.totalCost*-1)}},actions:{generateReport:function(){var e=this,t=this.get("endDate"),a=this.get("reportRows"),l=this.get("reportType"),s=this.get("startDate");if(!n.default.isEmpty(s)||!n.default.isEmpty(t))switch(a.clear(),this.showProgressModal(),l){case"expiration":this._generateExpirationReport();break;case"summaryFinance":this._generateFinancialSummaryReport();break;case"detailedExpense":case"summaryExpense":var i=function(){var t=e.get("expenseCategories"),n={};return t.forEach(function(e){n[e]={total:0,expenseAccounts:[]}}),e.set("expenseMap",n),e._generateInventoryReport(),"break"}();if("break"===i)break;default:this._generateInventoryReport()}},viewInventory:function(e){this.store.find("inventory",e).then(function(e){e.set("returnTo","inventory.reports"),this.transitionToRoute("inventory.edit",e)}.bind(this))}}})}),define("hospitalrun/inventory/reports/route",["exports","hospitalrun/routes/abstract-index-route","ember","ember-i18n"],function(e,t,n,a){e.default=t.default.extend({pageTitle:(0,a.translationMacro)("inventory.titles.inventoryReport"),model:function(){return n.default.RSVP.resolve(n.default.Object.create({}))}})}),define("hospitalrun/inventory/reports/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"g8+aEF0m",block:'{"statements":[["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",[null]],false]],11],["text"," "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-footer"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"generateReport"]],["flush-element"],["append",["helper",["t"],["inventory.reports.generate"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["close-element"],["text","\\n"],["block",["if"],[["get",["showReportResults"]]],null,1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","th",[]],["flush-element"],["text","\\n "],["append",["get",["reportHeader"]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":["reportHeader"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["append",["unknown",["reportTitle"]],false],["append",["helper",["nav-paging"],null,[["paginationProps"],[["get",["paginationProps"]]]]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n"],["block",["each"],[["get",["reportHeaders"]]],null,0],["text"," "],["close-element"],["text","\\n "],["partial","report-rows"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-footer"],["flush-element"],["text","\\n "],["open-element","a",[]],["dynamic-attr","href",["unknown",["csvExport"]],null],["static-attr","target","_blank"],["dynamic-attr","download",["concat",[["unknown",["reportTitle"]],".csv"]]],["static-attr","class","btn btn-default"],["flush-element"],["append",["helper",["t"],["inventory.reports.export"],null],false],["close-element"],["text","\\n\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","transactionType","label"]],"reportColumns.transactionType.include","col-xs-2"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","expenseAccount","label"]],"reportColumns.expenseAccount.include","col-xs-2"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","consumedPerDay","label"]],"reportColumns.consumedPerDay.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","daysLeft","label"]],"reportColumns.daysLeft.include","col-xs-2"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","total","label"]],"reportColumns.total.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","unitcost","label"]],"reportColumns.unitcost.include","col-xs-2"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","date","label"]],"reportColumns.date.include","col-xs-2"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","h3",[]],["flush-element"],["append",["helper",["t"],["inventory.reports.fields"],null],false],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","col-xs-1"],["flush-element"],["close-element"],["text","\\n"],["block",["if"],[["get",["includeDate"]]],null,6],["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","id","label"]],"reportColumns.id.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","name","label"]],"reportColumns.name.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","description","label"]],"reportColumns.description.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","type","label"]],"reportColumns.type.include","col-xs-2"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","col-xs-1"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","quantity","label"]],"reportColumns.quantity.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","unit","label"]],"reportColumns.unit.include","col-xs-2"]]],false],["text","\\n"],["block",["if"],[["get",["includeCostFields"]]],null,5],["block",["if"],[["get",["includeDaysLeft"]]],null,4],["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","price","label"]],"reportColumns.price.include","col-xs-2"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","col-xs-1"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","reorder","label"]],"reportColumns.reorder.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","gift","label"]],"reportColumns.gift.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","locations","label"]],"reportColumns.locations.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","aisle","label"]],"reportColumns.aisle.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","xref","label"]],"reportColumns.xref.include","col-xs-2"]]],false],["text","\\n\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","col-xs-1"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","vendor","label"]],"reportColumns.vendor.include","col-xs-2"]]],false],["text","\\n"],["block",["if"],[["get",["includeExpenseAccount"]]],null,3],["block",["if"],[["get",["includeTransactionType"]]],null,2],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["date-picker"],null,[["property","label","class"],["startDate",["helper",["t"],["inventory.labels.dateStart"],null],"col-sm-4 test-start-date"]]],false],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["endDate",["helper",["t"],["inventory.labels.dateEnd"],null],"col-sm-4 test-end-date"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["date-picker"],null,[["property","label","class"],["endDate",["helper",["t"],["inventory.labels.dateEffective"],null],"col-sm-4"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-select"],null,[["class","label","property","content","prompt"],["col-xs-6",["helper",["t"],["inventory.labels.location"],null],"filterLocation",["get",["warehouseList"]]," "]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-xs-6"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["static-attr","for","report-type"],["flush-element"],["append",["helper",["t"],["inventory.reports.reportType"],null],false],["close-element"],["text","\\n "],["append",["helper",["select-list"],null,[["action","class","content","id","optionValuePath","optionLabelPath","value"],[["helper",["action"],[["get",[null]],["helper",["mut"],[["get",["reportType"]]],null]],null],"form-control",["get",["reportTypes"]],"report-type","value","name",["get",["reportType"]]]]],false],["text","\\n "],["close-element"],["text","\\n"],["block",["unless"],[["get",["hideLocationFilter"]]],null,10],["text"," "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n"],["block",["if"],[["get",["showEffectiveDate"]]],null,9,8],["text"," "],["close-element"],["text","\\n"],["block",["if"],[["get",["useFieldPicker"]]],null,7],["text","\\n"]],"locals":[]}],"hasPartials":true}', -meta:{moduleName:"hospitalrun/inventory/reports/template.hbs"}})}),define("hospitalrun/inventory/request/controller",["exports","hospitalrun/controllers/abstract-edit-controller","hospitalrun/mixins/fulfill-request","hospitalrun/mixins/inventory-locations","ember"],function(e,t,n,a,l){e.default=t.default.extend(n.default,a.default,{inventoryController:l.default.inject.controller("inventory"),inventoryItems:null,cancelAction:"allRequests",warehouseList:l.default.computed.alias("inventoryController.warehouseList"),aisleLocationList:l.default.computed.alias("inventoryController.aisleLocationList"),expenseAccountList:l.default.computed.alias("inventoryController.expenseAccountList"),inventoryList:function(){var e=this.get("inventoryItems");if(!l.default.isEmpty(e)){var t=e.map(function(e){return e.doc});return t}}.property("inventoryItems.[]"),lookupListsToUpdate:[{name:"expenseAccountList",property:"model.expenseAccount",id:"expense_account_list"},{name:"aisleLocationList",property:"model.deliveryAisle",id:"aisle_location_list"},{name:"warehouseList",property:"model.deliveryLocation",id:"warehouse_list"}],canFulfill:function(){var e=this.get("model.requestedItems");return l.default.isEmpty(e)&&this.currentUserCan("fulfill_inventory")}.property("model.requestedItems.[]"),isFulfilling:function(){var e=this.get("canFulfill"),t=this.get("isRequested"),n=this.get("model.shouldFulfillRequest"),a=e&&(t||n);return a?l.default.isEmpty(this.get("model.dateCompleted"))&&this.set("model.dateCompleted",new Date):this.set("model.dateCompleted"),a}.property("isRequested","model.shouldFulfillRequest"),isRequested:function(){var e=this.get("model.status");return"Requested"===e}.property("model.status"),quantityLabel:function(){var e=this.get("selectedInventoryItem");return l.default.isEmpty(e)?this.get("i18n").t("labels.quantity").toString():this.get("i18n").t("inventory.labels.quantity",{unit:e.distributionUnit}).toString()}.property("selectedInventoryItem"),showRequestedItems:function(){var e=this.get("model.requestedItems");return!l.default.isEmpty(e)}.property("model.requestedItems.[]"),updateViaFulfillRequest:!1,updateButtonText:function(){return this.get("isFulfilling")?this.get("i18n").t("buttons.fulfill"):this._super()}.property("model.isNew","isFulfilling"),updateCapability:"add_inventory_request",actions:{addInventoryItem:function(){var e=this.get("model"),t=e.get("inventoryItem"),n=e.get("requestedItems"),a=e.get("quantity");e.validate().then(function(){if(e.get("isValid")&&!l.default.isEmpty(t)&&!l.default.isEmpty(a)){var s=l.default.Object.create({item:t.get("content"),quantity:a});n.addObject(s),e.set("inventoryItem"),e.set("inventoryItemTypeAhead"),e.set("quantity"),this.set("selectedInventoryItem")}}.bind(this)).catch(l.default.K)},allRequests:function(){this.transitionToRoute("inventory.index")},removeItem:function(e){var t=this.get("model.requestedItems"),n=e.itemToRemove;t.removeObject(n),this.send("closeModal")},showRemoveItem:function(e){var t=this.get("i18n").t("inventory.messages.removeItemRequest"),n=l.default.Object.create({itemToRemove:e}),a=this.get("i18n").t("inventory.titles.removeItem");this.displayConfirm(a,t,"removeItem",n)},update:function(e){this.beforeUpdate().then(function(){var t=this,n=this.get("updateViaFulfillRequest");if(n)this.updateLookupLists(),this.performFulfillRequest(this.get("model"),!1,!1,!0).then(this.afterUpdate.bind(this));else{var a=this.get("model.isNew"),s=this.get("model.requestedItems");a&&!l.default.isEmpty(s)?!function(){var e=t.get("model"),n=e.getProperties(["dateRequested","deliveryAisle","deliveryLocation","expenseAccount","requestedBy","status"]),a=[],i=[],o=[];l.default.isEmpty(t.get("model.inventoryItem"))||l.default.isEmpty(t.get("model.quantity"))||o.push(e.save()),s.forEach(function(e){n.inventoryItem=e.get("item"),n.quantity=e.get("quantity");var t=this.get("store").createRecord("inv-request",n);a.push(t.get("inventoryItem")),i.push(t)}.bind(t)),l.default.RSVP.all(a,"Get inventory items for inventory requests").then(function(){i.forEach(function(e){o.push(e.save())}),l.default.RSVP.all(o,"Save batch inventory requests").then(function(){this.updateLookupLists(),this.afterUpdate()}.bind(this))}.bind(t))}():this.get("model").save().then(function(t){this.updateLookupLists(),e||this.afterUpdate(t)}.bind(this))}}.bind(this))}},afterUpdate:function(){var e=this.get("updateViaFulfillRequest");e?this.displayAlert(this.get("i18n").t("inventory.titles.requestFulfilled"),this.get("i18n").t("inventory.messages.requestFulfilled"),"allRequests"):this.displayAlert(this.get("i18n").t("inventory.titles.requestUpdated"),this.get("i18n").t("inventory.messages.requestUpdated"))},beforeUpdate:function(){return this.get("isFulfilling")?this.set("updateViaFulfillRequest",!0):this.set("updateViaFulfillRequest",!1),this.get("model.isNew")&&(this.set("model.dateRequested",new Date),this.set("model.requestedBy",this.get("model").getUserName()),this.get("isFulfilling")||this.set("model.status","Requested")),l.default.RSVP.resolve()}})}),define("hospitalrun/inventory/request/route",["exports","hospitalrun/routes/abstract-edit-route","ember","ember-i18n"],function(e,t,n,a){e.default=t.default.extend({editTitle:(0,a.translationMacro)("inventory.titles.editRequest"),modelName:"inv-request",newTitle:(0,a.translationMacro)("inventory.titles.addRequest"),database:n.default.inject.service(),getNewData:function(){return n.default.RSVP.resolve({transactionType:"Request",requestedItems:[]})},actions:{allRequests:function(e){this.controller.send("allRequests",e)},removeItem:function(e){this.controller.send("removeItem",e)}},setupController:function(e,t){this._super(e,t);var n={startkey:"inventory_",endkey:"inventory_￿",include_docs:!0};this.get("database").queryMainDB(n).then(function(t){e.set("inventoryItems",t.rows)})}})}),define("hospitalrun/inventory/request/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"qer6XY+A",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],7]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["dateCompleted",["helper",["t"],["labels.dateCompleted"],null],"col-sm-4"]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["inventory-location-picker"],null,[["label","quantityRequested","locationList","selectedLocations","class"],[["helper",["t"],["inventory.labels.pullFrom"],null],["get",["model","quantity"]],["get",["model","inventoryItem","availableLocations"]],["get",["model","inventoryLocations"]],"inventory-location"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label sr-only"],["flush-element"],["append",["helper",["t"],["inventory.labels.consumePurchases"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["inventory.labels.markAsConsumed"],null],"markAsConsumed"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label sr-only"],["flush-element"],["append",["helper",["t"],["inventory.labels.fulfillRequest"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["inventory.labels.fulfillRequest"],null],"shouldFulfillRequest"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["append",["unknown",["requestedItem","item","name"]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-2"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","input-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["requestedItem","quantity"]]]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","input-group-addon"],["flush-element"],["append",["unknown",["requestedItem","item","distributionUnit"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showRemoveItem",["get",["requestedItem"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["buttons.remove"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["requestedItem"]},{"statements":[["text"," "],["open-element","h3",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.requestedItems"],null],false],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.name"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.quantity"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.action"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","requestedItems"]]],null,2],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["inventory-typeahead"],null,[["class","property","label","content","selection"],["col-sm-8 test-inv-item","inventoryItemTypeAhead",["helper",["t"],["inventory.labels.inventoryItem"],null],["get",["inventoryList"]],["get",["selectedInventoryItem"]]]]],false],["text","\\n\\n "],["append",["helper",["number-input"],null,[["property","label","class"],["quantity",["get",["quantityLabel"]],"col-sm-3 test-inv-quantity"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-sm-1"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["close-element"],["text","\\n "],["open-element","h4",[]],["static-attr","class","form-control-static"],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-plus"],["modifier",["action"],[["get",[null]],"addInventoryItem"]],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["showRequestedItems"]]],null,3],["block",["if"],[["get",["canFulfill"]]],null,1]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.item"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","inventoryItem","name"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.quantityRequested"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","quantity"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.quantityOnHand"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","inventoryItem","quantity"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["isRequested"]]],null,5,4],["text"," "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","class"],["deliveryLocation",["helper",["t"],["inventory.labels.deliveryLocation"],null],["get",["warehouseList"]],["get",["model","deliveryLocation"]],"test-delivery-location"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","class"],["deliveryAisle",["helper",["t"],["inventory.labels.deliveryAisle"],null],["get",["aisleLocationList"]],["get",["model","deliveryAisle"]],"test-delivery-aisle"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","class"],["expenseAccount",["helper",["t"],["inventory.labels.billTo"],null],["get",["expenseAccountList"]],["get",["model","expenseAccount"]],"test-bill-to"]]],false],["text","\\n"],["block",["if"],[["get",["isFulfilling"]]],null,0]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],6]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/inventory/request/template.hbs"}})}),define("hospitalrun/inventory/route",["exports","hospitalrun/routes/abstract-module-route","hospitalrun/mixins/fulfill-request","hospitalrun/mixins/inventory-id","hospitalrun/mixins/inventory-locations"],function(e,t,n,a,l){e.default=t.default.extend(n.default,a.default,l.default,{addCapability:"add_inventory_item",additionalButtons:function(){if(this.currentUserCan(this.get("addCapability")))return[{buttonAction:"newInventoryBatch",buttonText:"+ inventory received",class:"btn btn-primary"}]}.property(),additionalModels:[{name:"aisleLocationList",findArgs:["lookup","aisle_location_list"]},{name:"expenseAccountList",findArgs:["lookup","expense_account_list"]},{name:"inventoryTypeList",findArgs:["lookup","inventory_types"]},{name:"inventoryUnitList",findArgs:["lookup","unit_types"]},{name:"warehouseList",findArgs:["lookup","warehouse_list"]},{name:"vendorList",findArgs:["lookup","vendor_list"]}],currentItem:null,moduleName:"inventory",newButtonText:"+ new request",sectionTitle:"Inventory",actions:{addPurchase:function(e){var t=this.get("currentItem"),n=t.get("purchases");n.addObject(e),this.newPurchaseAdded(t,e).then(function(){t.updateQuantity(),t.save().then(function(){this.send("closeModal")}.bind(this))}.bind(this))},newInventoryBatch:function(){this.currentUserCan(this.get("addCapability"))&&this.transitionTo("inventory.batch","new")},newRequest:function(){this.transitionTo("inventory.request","new")},allItems:function(){this.transitionTo("inventory.listing")},showAddPurchase:function(e){var t=this.get("store").createRecord("inv-purchase",{dateReceived:new Date,distributionUnit:e.get("distributionUnit"),inventoryItem:e.get("id")});this.set("currentItem",e),this.send("openModal","inventory.purchase.edit",t)}}})}),define("hospitalrun/inventory/search/controller",["exports","hospitalrun/inventory/listing/controller"],function(e,t){e.default=t.default.extend()}),define("hospitalrun/inventory/search/route",["exports","hospitalrun/routes/abstract-search-route"],function(e,t){e.default=t.default.extend({moduleName:"inventory",searchKeys:[{name:"crossReference",type:"contains"},{name:"description",type:"fuzzy"},{name:"friendlyId",type:"contains"},{name:"name",type:"fuzzy"}],searchModel:"inventory"})}),define("hospitalrun/inventory/search/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"MRgLDxZL",block:'{"statements":[["block",["search-listing"],null,[["newButtonText","allButtonText"],[["helper",["t"],["inventory.labels.newItem"],null],["helper",["t"],["inventory.labels.allInventory"],null]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["partial","inventory/listing"],["text","\\n"]],"locals":[]}],"hasPartials":true}',meta:{moduleName:"hospitalrun/inventory/search/template.hbs"}})}),define("hospitalrun/inventory/transfer/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","ember-i18n"],function(e,t,n,a){e.default=t.default.extend({inventoryController:n.default.inject.controller("inventory"),warehouseList:n.default.computed.alias("inventoryController.warehouseList"),aisleLocationList:n.default.computed.alias("inventoryController.aisleLocationList"),lookupListsToUpdate:[{name:"aisleLocationList",property:"model.transferAisleLocation",id:"aisle_location_list"},{name:"warehouseList",property:"model.transferLocation",id:"warehouse_list"}],title:(0,a.translationMacro)("inventory.titles.transfer"),updateButtonText:(0,a.translationMacro)("inventory.labels.transfer"),updateButtonAction:"transfer",updateCapability:"adjust_inventory_location",actions:{cancel:function(){this.send("closeModal")},transfer:function(){this.updateLookupLists(),this.send("transferItems",this.get("model"),!0)}}})}),define("hospitalrun/inventory/transfer/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"agZXzn11",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.item"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","transferItem","name"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.transferFrom"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","locationName"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.quantityAvailable"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","quantity"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["class","property","label","list","selection"],["required","transferLocation",["helper",["t"],["inventory.labels.transferTo"],null],["get",["warehouseList"]],["get",["model","transferLocation"]]]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection"],["transferAisleLocation",["helper",["t"],["inventory.labels.transferToAisle"],null],["get",["aisleLocationList"]],["get",["model","transferAisleLocation"]]]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["number-input"],null,[["property","label","class"],["adjustmentQuantity",["helper",["t"],["labels.quantity"],null],"col-sm-3 required"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["dateCompleted",["helper",["t"],["inventory.labels.dateTransferred"],null],"col-sm-4 required"]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/inventory/transfer/template.hbs"}})}),define("hospitalrun/invoices/add-line-item/controller",["exports","hospitalrun/mixins/billing-categories","ember","hospitalrun/mixins/is-update-disabled"],function(e,t,n,a){e.default=n.default.Controller.extend(t.default,a.default,{invoiceController:n.default.inject.controller("invoices"),billingCategoryList:n.default.computed.alias("invoiceController.billingCategoryList"),editController:n.default.inject.controller("invoices/edit"),title:"Add Line Item",updateButtonText:"Add",updateButtonAction:"add",showUpdateButton:!0,actions:{cancel:function(){this.send("closeModal")},add:function(){this.get("model").save().then(function(e){this.get("editController").send("addLineItem",e)}.bind(this))}},billingCategories:function(){var e=this.get("defaultBillingCategories"),t=this.get("billingCategoryList");return n.default.isEmpty(t)?n.default.Object.create({value:e}):t}.property("billingCategoryList","defaultBillingCategories")})}),define("hospitalrun/invoices/add-line-item/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"n6Aw1U4J",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["em-input"],null,[["property","label","class"],["name",["helper",["t"],["labels.name"],null],"required"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","className","label","list","selection"],["category","required",["helper",["t"],["labels.category"],null],["get",["billingCategories"]],["get",["model","category"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/invoices/add-line-item/template.hbs"}})}),define("hospitalrun/invoices/delete/controller",["exports","hospitalrun/controllers/abstract-delete-controller"],function(e,t){e.default=t.default.extend({title:"Delete Invoice"})}),define("hospitalrun/invoices/delete/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"eXEh2gJn",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[],"locals":[]},{"statements":[["text"," "],["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0],["text","\\n "],["open-element","div",[]],["static-attr","class","alert alert-danger"],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-warning-sign"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["t"],["billing.alerts.deleteItem"],[["item"],[["get",["model","displayInvoiceNumber"]]]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/invoices/delete/template.hbs"}})}),define("hospitalrun/invoices/edit/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/mixins/number-format","hospitalrun/mixins/patient-submodule","hospitalrun/mixins/publish-statuses","hospitalrun/utils/select-values","npm:uuid"],function(e,t,n,a,l,s,i,o){e.default=t.default.extend(a.default,l.default,s.default,{invoiceController:n.default.inject.controller("invoices"),expenseAccountList:n.default.computed.alias("invoiceController.expenseAccountList.value"),patientList:n.default.computed.alias("invoiceController.patientList"),pharmacyCharges:[],pricingProfiles:n.default.computed.map("invoiceController.pricingProfiles",i.default.selectObjectMap),supplyCharges:[],updateCapability:"add_invoice",wardCharges:[],additionalButtons:function(){var e=[],t=this.get("model.isValid"),n=this.get("model.status");return t&&"Draft"===n&&e.push({class:"btn btn-default default",buttonAction:"finalizeInvoice",buttonIcon:"glyphicon glyphicon-ok",buttonText:"Invoice Ready"}),e.push({class:"btn btn-default neutral",buttonAction:"printInvoice",buttonIcon:"glyphicon glyphicon-print",buttonText:"Print"}),e}.property("model.isValid","model.status"),canAddCharge:function(){return this.currentUserCan("add_charge")}.property(),canAddPayment:function(){return this.currentUserCan("add_payment")}.property(),pharmacyExpenseAccount:function(){var e=this.get("expenseAccountList");if(!n.default.isEmpty(e)){var t=e.find(function(e){if(e.toLowerCase().indexOf("pharmacy")>-1)return!0});return t}}.property("expenseAccountList.value"),actions:{addItemCharge:function(e){var t=e.get("details"),n=this.store.createRecord("line-item-detail",{id:o.default.v4()});t.addObject(n)},addLineItem:function(e){var t=this.get("model.lineItems");t.addObject(e),this.send("update",!0),this.send("closeModal")},deleteCharge:function(e){this._deleteObject(e.itemToDelete,e.deleteFrom)},deleteLineItem:function(e){this._deleteObject(e.itemToDelete,this.get("model.lineItems"))},finalizeInvoice:function(){var e=this.get("model"),t=e.get("payments"),a=[];e.get("patient.payments").then(function(l){l.forEach(function(l){var s=l.get("invoice");n.default.isEmpty(s)&&(l.set("invoice",e),a.push(l.save()),t.addObject(l))}.bind(this)),n.default.RSVP.all(a).then(function(){this.set("model.status","Billed"),this.send("update")}.bind(this))}.bind(this))},printInvoice:function(){this.transitionToRoute("print.invoice",this.get("model"))},removePayment:function(e){var t=this.get("model.payments"),n=e.itemToRemove;n.set("invoice"),t.removeObject(e.itemToRemove),this.send("update",!0),this.send("closeModal")},showAddLineItem:function(){var e=this.store.createRecord("billing-line-item",{id:o.default.v4()});this.send("openModal","invoices.add-line-item",e)},showDeleteItem:function(e,t){this.showDeleteModal(e,n.default.Object.create({confirmAction:"deleteCharge",deleteFrom:t,title:"Delete Charge"}))},showDeleteLineItem:function(e){this.showDeleteModal(e,n.default.Object.create({confirmAction:"deleteLineItem",title:"Delete Line Item"}))},showDeleteModal:function(e,t){t=n.default.merge(t,n.default.Object.create({message:"Are you sure you want to delete "+e.get("name")+"?",itemToDelete:e,updateButtonAction:"confirm",updateButtonText:this.get("i18n").t("buttons.ok")})),this.send("openModal","dialog",t)},showRemovePayment:function(e){var t="Are you sure you want to remove this payment from this invoice?",a=n.default.Object.create({itemToRemove:e}),l="Remove Payment";this.displayConfirm(l,t,"removePayment",a)},toggleDetails:function(e){e.toggleProperty("showDetails")}},changePaymentProfile:function(){var e=this.get("model.patient"),t=this.get("model.paymentProfile");!n.default.isEmpty(e)&&n.default.isEmpty(t)&&this.set("model.paymentProfile",e.get("paymentProfile"))}.observes("model.patient"),paymentProfileChanged:function(){var e=this._getValidNumber(this.get("model.paymentProfile.discountPercentage")),t=this.get("model.originalPaymentProfileId"),a=this.get("model.paymentProfile.id");if(a!==t){var l=this.get("model.lineItems");l.forEach(function(t){var l=t.get("details"),s=0;if(l.forEach(function(e){var t=e.get("pricingItem.pricingOverrides");if(!n.default.isEmpty(t)){var l=t.findBy("profile.id",a);n.default.isEmpty(l)||n.default.set(e,"price",l.get("price"))}}.bind(this)),e>0){var i=t.get("total");s=this._numberFormat(e/100*i,!0),t.set("discount",s)}}.bind(this)),this.set("model.originalPaymentProfileId",a)}}.observes("model.paymentProfile"),visitChanged:function(){var e=this.get("model.visit"),t=this.get("model.lineItems");if(!n.default.isEmpty(e)&&n.default.isEmpty(t)){this.set("model.originalPaymentProfileId");var a=this.resolveVisitChildren();n.default.RSVP.allSettled(a,"Resolved visit children before generating invoice").then(function(t){var a=this,l=this._resolveVisitDescendents(t,"charges");n.default.isEmpty(l)?(this._generateLineItems(e,t),this.paymentProfileChanged()):!function(){var s="Reloaded charges before generating invoice";n.default.RSVP.allSettled(l,s).then(function(a){var l=[];a.forEach(function(e){if(!n.default.isEmpty(e.value)){var t=e.value.get("pricingItem");n.default.isEmpty(t)||l.push(t.reload())}}),s="Reloaded pricing items before generating invoice",n.default.RSVP.allSettled(l,s).then(function(){this._generateLineItems(e,t),this.paymentProfileChanged()}.bind(this))}.bind(a))}()}.bind(this),function(e){console.log("Error resolving visit children",e)})}}.observes("model.visit"),_addPharmacyCharge:function(e,t){var n=this;return e.getMedicationDetails(t).then(function(t){var a=e.get("quantity"),l=n.get("pharmacyCharges"),s=n.get("pharmacyExpenseAccount"),i=n.store.createRecord("line-item-detail",{id:o.default.v4(),name:t.name,quantity:a,price:t.price,department:"Pharmacy",expenseAccount:s});l.addObject(i)})},_addSupplyCharge:function(e,t){var n=this.get("supplyCharges"),a=this._createChargeItem(e,t);n.addObject(a)},_createChargeItem:function(e,t){var n=this.store.createRecord("line-item-detail",{id:o.default.v4(),name:e.get("pricingItem.name"),expenseAccount:e.get("pricingItem.expenseAccount"),quantity:e.get("quantity"),price:e.get("pricingItem.price"),department:t,pricingItem:e.get("pricingItem")});return n},_deleteObject:function(e,t){t.removeObject(e),e.get("isNew")||e.destroyRecord(),this.send("update",!0),this.send("closeModal")},_mapWardCharge:function(e){return this._createChargeItem(e,"Ward")},_completeBeforeUpdate:function(e,t,n){var a="inv",l=void 0;e.incrementProperty("value",1),l=e.get("value"),a+=l<1e5?String("00000"+l).slice(-5):l,this.set("model.id",a),e.save().then(t,n)},_generateLineItems:function(e,t){var a=this,l=e.get("endDate"),s=t[0].value,i=t[1].value,r=void 0,d=void 0,c=this.get("model.lineItems"),u=t[2].value,p=t[3].value,m=e.get("startDate"),f=e.get("charges");if(this.setProperties({ -pharmacyCharges:[],supplyCharges:[],wardCharges:[]}),!n.default.isEmpty(l)&&!n.default.isEmpty(m)){l=moment(l),m=moment(m);var h=l.diff(m,"days");h>1&&(r=this.store.createRecord("line-item-detail",{id:o.default.v4(),name:"Days",quantity:h}),d=this.store.createRecord("billing-line-item",{id:o.default.v4(),category:"Hospital Charges",name:"Room/Accomodation"}),d.get("details").addObject(r),c.addObject(d))}var g=[];u.forEach(function(e){g.push(this._addPharmacyCharge(e,"inventoryItem"))}.bind(this)),this.set("wardCharges",f.map(this._mapWardCharge.bind(this))),p.forEach(function(e){var t=e.get("charges");t.forEach(function(e){e.get("medicationCharge")?g.push(this._addPharmacyCharge(e,"medication")):this._addSupplyCharge(e,"O.R.")}.bind(this))}.bind(this)),i.forEach(function(e){n.default.isEmpty(e.get("labType"))||this._addSupplyCharge(n.default.Object.create({pricingItem:e.get("labType"),quantity:1}),"Lab"),e.get("charges").forEach(function(e){this._addSupplyCharge(e,"Lab")}.bind(this))}.bind(this)),s.forEach(function(e){n.default.isEmpty(e.get("imagingType"))||this._addSupplyCharge(n.default.Object.create({pricingItem:e.get("imagingType"),quantity:1}),"Imaging"),e.get("charges").forEach(function(e){this._addSupplyCharge(e,"Imaging")}.bind(this))}.bind(this)),n.default.RSVP.all(g).then(function(){d=a.store.createRecord("billing-line-item",{id:o.default.v4(),name:"Pharmacy",category:"Hospital Charges"}),d.get("details").addObjects(a.get("pharmacyCharges")),c.addObject(d),d=a.store.createRecord("billing-line-item",{id:o.default.v4(),name:"X-ray/Lab/Supplies",category:"Hospital Charges"}),d.get("details").addObjects(a.get("supplyCharges")),c.addObject(d),d=a.store.createRecord("billing-line-item",{id:o.default.v4(),name:"Ward Items",category:"Hospital Charges"}),d.get("details").addObjects(a.get("wardCharges")),c.addObject(d),d=a.store.createRecord("billing-line-item",{id:o.default.v4(),name:"Physical Therapy",category:"Hospital Charges"}),c.addObject(d),d=a.store.createRecord("billing-line-item",{id:o.default.v4(),name:"Others/Misc",category:"Hospital Charges"}),c.addObject(d),a.send("update",!0)})},_resolveVisitDescendents:function(e,t){var a=[];return e.forEach(function(e){n.default.isEmpty(e.value)||e.value.forEach(function(e){var l=e.get(t);n.default.isEmpty(l)||l.forEach(function(e){a.push(e.reload())})})}),a},beforeUpdate:function(){return new n.default.RSVP.Promise(function(e,t){var a=this.get("model.lineItems"),l=[];a.forEach(function(e){e.get("details").forEach(function(e){l.push(e.save())}.bind(this)),l.push(e.save())}.bind(this)),n.default.RSVP.all(l,"Saved invoice children before saving invoice").then(function(){this.get("model.isNew")?this.store.find("sequence","invoice").then(function(n){this._completeBeforeUpdate(n,e,t)}.bind(this),function(){var n=this.get("store"),a=n.push(n.normalize("sequence",{id:"invoice",value:0}));this._completeBeforeUpdate(a,e,t)}.bind(this)):e()}.bind(this),t)}.bind(this))},afterUpdate:function(){var e="The invoice record has been saved.";this.displayAlert("Invoice Saved",e)}})}),define("hospitalrun/invoices/edit/route",["exports","hospitalrun/routes/abstract-edit-route","ember"],function(e,t,n){e.default=t.default.extend({editTitle:"Edit Invoice",modelName:"invoice",newTitle:"New Invoice",actions:{deleteCharge:function(e){this.controller.send("deleteCharge",e)},deleteLineItem:function(e){this.controller.send("deleteLineItem",e)},removePayment:function(e){this.controller.send("removePayment",e)}},afterModel:function(e){return new n.default.RSVP.Promise(function(t,a){var l=e.get("lineItems"),s=[];l.forEach(function(e){s.push(e.reload())}),n.default.RSVP.all(s,"Reload billing line items for invoice").then(function(e){var l=[];e.forEach(function(e){e.get("details").forEach(function(e){l.push(e.reload())})}),n.default.RSVP.all(l,"Reload billing line item details for invoice").then(t,a)},a)})},getNewData:function(){return n.default.RSVP.resolve({billDate:new Date,status:"Draft"})},setupController:function(e,t){t.set("originalPaymentProfileId",t.get("paymentProfile.id")),this._super(e,t);var a=t.get("lineItems"),l=[];a.forEach(function(e){e.get("details").forEach(function(e){var t=e.get("pricingItem");n.default.isEmpty(t)||l.push(t.reload())})})}})}),define("hospitalrun/invoices/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"HLQLw+RK",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],17]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showRemovePayment",["get",["payment"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.remove"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"showEditPayment",["get",["payment"]]],[["bubbles"],[false]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["payment","canRemovePayment"]]],null,0],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["modifier",["action"],[["get",[null]],"showEditPayment",["get",["payment"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["payment","datePaid"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["payment","amount"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["payment","paymentType"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["payment","notes"]],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canAddPayment"]]],null,1],["text"," "],["close-element"],["text","\\n"]],"locals":["payment"]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"showAddPayment",["get",["model"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["admin.roles.capability.addPayment"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteItem",["get",["detail"]],["get",["item","details"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.delete"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","colspan","2"],["static-attr","class","col-xs-6 input-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["detail","name"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["detail","quantity"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["detail","price"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["select-list"],null,[["class","content","value","action"],["form-control",["get",["expenseAccountList"]],["get",["detail","expenseAccount"]],["helper",["action"],[["get",[null]],["helper",["mut"],[["get",["detail","expenseAccount"]]],null]],null]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["text","\\n "],["append",["helper",["number-format"],[["get",["detail","amountOwed"]]],null],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-2"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddCharge"]]],null,4],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["detail"]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-primary"],["modifier",["action"],[["get",[null]],"addItemCharge",["get",["item"]]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["admin.roles.capability.addCharge"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","th",[]],["static-attr","colspan","2"],["static-attr","class","col-xs-6"],["flush-element"],["append",["helper",["t"],["labels.name"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["helper",["t"],["labels.quantity"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["helper",["t"],["labels.price"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["helper",["t"],["labels.expense_to"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["append",["helper",["t"],["labels.total"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddCharge"]]],null,6],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["item","details"]]],null,5]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteLineItem",["get",["item"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.delete"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-5"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","input-group"],["flush-element"],["text","\\n "],["open-element","span",[]],["dynamic-attr","class",["concat",["input-group-addon glyphicon\\n ",["helper",["if"],[["get",["item","showDetails"]],"glyphicon-minus","glyphicon-plus"],null]]]],["modifier",["action"],[["get",[null]],"toggleDetails",["get",["item"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","strong",[]],["flush-element"],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["item","name"]]]]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["text","\\n "],["append",["helper",["number-format"],[["get",["item","total"]]],null],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control text-right",["get",["item","discount"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control text-right",["get",["item","nationalInsurance"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control text-right",["get",["item","privateInsurance"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["item","amountOwed"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-2"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddCharge"]]],null,8],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["item","showDetails"]]],null,7]],"locals":["item"]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-12"],["flush-element"],["text","\\n "],["open-element","strong",[]],["flush-element"],["append",["unknown",["categoryGroup","category"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["categoryGroup","items"]]],null,9],["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["labels.total"],null],false],["text"," "],["append",["unknown",["categoryGroup","category"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["categoryGroup","total"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["categoryGroup","discount"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["categoryGroup","nationalInsurance"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["categoryGroup","privateInsurance"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["categoryGroup","amountOwed"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["categoryGroup"]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"showAddLineItem"],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.addLineItem"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group col-xs-3"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.visit"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","visit","visitDescription"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-typeahead"],null,[["property","label","content","selection","class"],["patientTypeAhead",["helper",["t"],["labels.patient"],null],["get",["patientList"]],["get",["selectedPatient"]],"col-xs-4 required invoice-patient"]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content","optionValuePath","optionLabelPath","selected","prompt"],["col-xs-4 required invoice-visit",["helper",["t"],["labels.visit"],null],"visit",["get",["patientVisitsForSelect"]],"selectObject","selectObject.visitDescription",["get",["model","visit"]],"Please select a visit"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group col-xs-2"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.invoiceId"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","id"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-summary"],null,[["patient","returnTo","returnToContext","disablePatientLink"],[["get",["model","patient"]],"invoices.edit",["get",["model","id"]],["get",["model","isNew"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["unless"],[["get",["model","isNew"]]],null,15],["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n"],["block",["unless"],[["get",["model","isNew"]]],null,14],["text"," "],["append",["helper",["date-picker"],null,[["property","label","class"],["billDate",["helper",["t"],["labels.billDate"],null],"col-xs-2"]]],false],["text","\\n"],["block",["if"],[["get",["model","isNew"]]],null,13,12],["text"," "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["externalInvoiceNumber",["helper",["t"],["billing.labels.externalInvoiceNumber"],null],"col-xs-3 external-invoice-no"]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["label","property","content","optionValuePath","optionLabelPath","class","prompt","selected"],[["helper",["t"],["billing.labels.paymentProfile"],null],"paymentProfile",["get",["pricingProfiles"]],"selectObject","selectObject.name","col-xs-3"," ",["get",["model","paymentProfile"]]]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],16],["text"," "],["open-element","form",[]],["static-attr","class","form-inline"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel detail-section"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["text","\\n "],["append",["helper",["t"],["labels.lineItems"],null],false],["text","\\n"],["block",["if"],[["get",["canAddCharge"]]],null,11],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-5"],["flush-element"],["append",["helper",["t"],["labels.description"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["append",["helper",["t"],["billing.labels.actualCharges"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["append",["helper",["t"],["labels.discount"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["append",["helper",["t"],["billing.labels.insurance"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["append",["helper",["t"],["billing.labels.hmoCom"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["append",["helper",["t"],["labels.excess"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2 text-right"],["flush-element"],["append",["helper",["t"],["labels.action"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","lineItemsByCategory"]]],null,10],["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["labels.total"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["model","total"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["model","discount"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["model","nationalInsurance"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["model","privateInsurance"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["model","patientResponsibility"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["billing.labels.paymentsDeposits"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","colspan","4"],["flush-element"],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["text","-"],["append",["helper",["number-format"],[["get",["model","paidTotal"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["labels.grandTotal"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","colspan","4"],["flush-element"],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["model","remainingBalance"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel detail-section"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["text","\\n "],["append",["helper",["t"],["labels.remarks"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["append",["helper",["textarea"],null,[["class","value"],["form-control",["get",["model","remarks"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel detail-section"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["text","\\n "],["append",["helper",["t"],["labels.payments"],null],false],["text","\\n"],["block",["if"],[["get",["canAddPayment"]]],null,3],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.date"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.amount"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.type"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.notes"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.action"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","payments"]]],null,2],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/invoices/edit/template.hbs"}})}),define("hospitalrun/invoices/index/controller",["exports","hospitalrun/controllers/abstract-paged-controller"],function(e,t){e.default=t.default.extend({addPermission:"add_invoice",deletePermission:"delete_invoice",canAddPayment:function(){return this.currentUserCan("add_payment")}.property(),startKey:[],queryParams:["startKey","status"]})}),define("hospitalrun/invoices/index/route",["exports","hospitalrun/routes/abstract-index-route","ember"],function(e,t,n){e.default=t.default.extend({modelName:"invoice",pageTitle:"Invoice Listing",_getStartKeyFromItem:function(e){var t=e.get("billDateAsTime"),n=this._getPouchIdFromItem(e),a=e.get("status");return[a,t,n]},_modelQueryParams:function(e){var t=void 0,a=this._getMaxPouchId(),l=this.get("maxValue"),s=this._getMinPouchId(),i=e.status;return n.default.isEmpty(i)&&(i="Billed"),this.set("pageTitle",i+" Invoices"),t={options:{startkey:[i,null,s],endkey:[i,l,a]},mapReduce:"invoice_by_status"},"All"===i&&(delete t.options.startkey,delete t.options.endkey),t},queryParams:{startKey:{refreshModel:!0},status:{refreshModel:!0}}})}),define("hospitalrun/invoices/index/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"+thqAl2P",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],9]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["billing.alerts.noInvoiceFound"],null],false],["text"," "],["open-element","a",[]],["static-attr","href","#"],["modifier",["action"],[["get",[null]],"newItem"]],["flush-element"],["append",["helper",["t"],["billing.buttons.createInvoice"],null],false],["close-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"deleteItem",["get",["invoice"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["buttons.delete"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editItem",["get",["invoice"]]],[["bubbles"],[false]]],["flush-element"],["append",["helper",["t"],["buttons.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"showAddPayment",["get",["invoice"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["admin.roles.capability.addPayment"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canAddPayment"]]],null,3],["block",["if"],[["get",["canAdd"]]],null,2],["block",["if"],[["get",["canDelete"]]],null,1]],"locals":[]},{"statements":[["block",["if"],[["get",["showActions"]]],null,4]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["static-attr","class","clickable"],["modifier",["action"],[["get",[null]],"editItem",["get",["invoice"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","invoice-number"],["flush-element"],["append",["unknown",["invoice","displayInvoiceNumber"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["invoice","billDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["invoice","status"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["invoice","patient","displayName"]],false],["text"," - "],["append",["unknown",["invoice","patient","displayPatientId"]],false],["text"," "],["open-element","br",[]],["flush-element"],["close-element"],["append",["unknown",["invoice","visit","primaryDiagnoses"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["invoice","total"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["invoice","remainingBalance"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["unless"],[["get",["invoice","paidFlag"]]],null,5],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["invoice"]},{"statements":[["text"," "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.number"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.billDate"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.status"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.patient"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.total"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.balanceDue"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["showActions"]]],null,7],["text"," "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,6],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["hasRecords"]]],null,8,0]],"locals":[]}],"hasPartials":false}', -meta:{moduleName:"hospitalrun/invoices/index/template.hbs"}})}),define("hospitalrun/invoices/payment/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/mixins/patient-submodule"],function(e,t,n,a){e.default=t.default.extend(a.default,{cancelAction:"closeModal",findPatientVisits:!1,invoiceController:n.default.inject.controller("invoices"),newPayment:!1,expenseAccountList:n.default.computed.alias("invoiceController.expenseAccountList"),patientList:n.default.computed.alias("invoiceController.patientList"),_finishUpdate:function(e,t){this.send("closeModal"),this.displayAlert(t,e)},currentPatient:function(){var e=this.get("model.paymentType");return"Deposit"===e?this.get("model.patient"):this.get("model.invoice.patient")}.property("model.patient","model.paymentType","model.invoice.patient"),title:function(){var e=this.get("model.isNew"),t=this.get("model.paymentType");return e?"Add "+t:"Edit "+t}.property("model.isNew","model.paymentType"),selectPatient:function(){var e=this.get("model.isNew"),t=this.get("model.paymentType");return e&&"Deposit"===t}.property("model.isNew","model.paymentType"),beforeUpdate:function(){this.get("model.isNew")?this.set("newPayment",!0):this.set("newPayment",!1);var e=this.get("currentPatient");return this.set("model.charityPatient","Charity"===e.get("patientType")),n.default.RSVP.resolve()},afterUpdate:function(){this.get("model").save().then(function(e){var t=this;this.get("newPayment")?!function(){var n=t.get("currentPatient");n.get("payments").then(function(t){t.addObject(e),n.save().then(function(){var t=this;if("Deposit"===e.get("paymentType")){var a="A deposit of "+e.get("amount")+" was added for patient "+n.get("displayName");this._finishUpdate(a,"Deposit Added")}else!function(){var n=t.get("model.invoice");n.addPayment(e),n.save().then(function(){var t="A payment of "+e.get("amount")+" was added to invoice "+n.get("id");this._finishUpdate(t,"Payment Added")}.bind(t))}()}.bind(this))}.bind(t))}():this.send("closeModal")}.bind(this))}})}),define("hospitalrun/invoices/payment/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"R4hTidw9",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText","updateButtonClass"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]],"update-payment-btn"]],4]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.patient"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","invoice","patient","displayName"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-typeahead"],null,[["property","label","content","selection","class"],["patientTypeAhead",["helper",["t"],["labels.patient"],null],["get",["patientList"]],["get",["selectedPatient"]],"required payment-patient"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["selectPatient"]]],null,1,0]],"locals":[]},{"statements":[["block",["if"],[["get",["model","isNew"]]],null,2],["text"," "],["append",["helper",["number-input"],null,[["property","label","class"],["amount",["helper",["t"],["labels.amount"],null],"required payment-amount"]]],false],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","maxDate","class"],["datePaid",["helper",["t"],["labels.datePaid"],null],"now","required"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection"],["expenseAccount",["helper",["t"],["labels.creditTo"],null],["get",["expenseAccountList"]],["get",["model","expenseAccount"]]]]],false],["text","\\n "],["append",["helper",["em-text"],null,[["property","label"],["notes",["helper",["t"],["labels.notes"],null]]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],3]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/invoices/payment/template.hbs"}})}),define("hospitalrun/invoices/route",["exports","hospitalrun/routes/abstract-module-route","hospitalrun/mixins/modal-helper","hospitalrun/mixins/patient-list-route"],function(e,t,n,a){e.default=t.default.extend(n.default,a.default,{addCapability:"add_invoice",currentScreenTitle:"Invoices",editTitle:"Edit Invoice",newTitle:"New Invoice",moduleName:"invoices",newButtonText:"+ new invoice",sectionTitle:"Invoices",additionalButtons:function(){if(this.currentUserCan("add_payment"))return[{class:"btn btn-default",buttonText:"+ add deposit",buttonAction:"showAddDeposit"}]}.property(),additionalModels:[{name:"billingCategoryList",findArgs:["lookup","billing_categories"]},{name:"expenseAccountList",findArgs:["lookup","expense_account_list"]},{name:"pricingProfiles",findArgs:["price-profile"]}],actions:{showAddDeposit:function(){var e=this.store.createRecord("payment",{paymentType:"Deposit",datePaid:new Date});this.send("openModal","invoices.payment",e)},showAddPayment:function(e){var t=this.store.createRecord("payment",{invoice:e,paymentType:"Payment",datePaid:new Date});this.send("openModal","invoices.payment",t)},showEditPayment:function(e){this.currentUserCan("add_payment")&&this.send("openModal","invoices.payment",e)}},subActions:function(){var e=[{text:"Billed",linkTo:"invoices.index",statusQuery:"Billed"}];return this.currentUserCan("add_invoice")&&(e.push({text:"Drafts",linkTo:"invoices.index",statusQuery:"Draft"}),e.push({text:"All Invoices",linkTo:"invoices.index",statusQuery:"All"})),e.push({text:"Paid",linkTo:"invoices.index",statusQuery:"Paid"}),e}.property()})}),define("hospitalrun/invoices/search/route",["exports","hospitalrun/routes/abstract-search-route"],function(e,t){e.default=t.default.extend({moduleName:"invoices",searchKeys:[{name:"externalInvoiceNumber",type:"contains"},{name:"patientInfo",type:"contains"}],searchModel:"invoice"})}),define("hospitalrun/invoices/search/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"7Stx2dsU",block:'{"statements":[["block",["search-listing"],null,[["newButtonText","allButtonText"],["New Invoice","All Invoices"]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["partial","invoices/index"],["text","\\n"]],"locals":[]}],"hasPartials":true}',meta:{moduleName:"hospitalrun/invoices/search/template.hbs"}})}),define("hospitalrun/labs/charge/controller",["exports","hospitalrun/procedures/charge/controller","ember"],function(e,t,n){e.default=t.default.extend({labsEdit:n.default.inject.controller("labs/edit"),cancelAction:"closeModal",newPricingItem:!1,requestingController:n.default.computed.alias("controllers.labs/edit"),pricingList:n.default.computed.alias("controllers.labs/edit.chargesPricingList")})}),define("hospitalrun/labs/charge/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"8qHLvc50",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["partial","procedures/charge"],["text","\\n"]],"locals":[]}],"hasPartials":true}',meta:{moduleName:"hospitalrun/labs/charge/template.hbs"}})}),define("hospitalrun/labs/completed/controller",["exports","hospitalrun/controllers/abstract-paged-controller"],function(e,t){e.default=t.default.extend({startKey:[],showActions:!1})}),define("hospitalrun/labs/completed/labs-completed-list-item/component",["exports","ember"],function(e,t){e.default=t.default.Component.extend({tagName:"tr"})}),define("hospitalrun/labs/completed/labs-completed-list-item/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"53/ixka0",block:'{"statements":[["open-element","td",[]],["static-attr","class","requested-date"],["flush-element"],["append",["helper",["date-format"],[["get",["lab","requestedDate"]]],null],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","lab-date"],["flush-element"],["append",["helper",["date-format"],[["get",["lab","labDate"]]],null],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","patient"],["flush-element"],["append",["unknown",["lab","patient","displayName"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","requested-by"],["flush-element"],["append",["unknown",["lab","requestedBy"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","lab-type"],["flush-element"],["append",["unknown",["lab","labType","name"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","result"],["flush-element"],["append",["unknown",["lab","result"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","notes"],["flush-element"],["append",["unknown",["lab","notes"]],false],["close-element"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[],"hasPartials":false}',meta:{moduleName:"hospitalrun/labs/completed/labs-completed-list-item/template.hbs"}})}),define("hospitalrun/labs/completed/route",["exports","hospitalrun/labs/index/route","ember-i18n"],function(e,t,n){e.default=t.default.extend({pageTitle:(0,n.translationMacro)("labs.completedTitle"),searchStatus:"Completed"})}),define("hospitalrun/labs/completed/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"hCs/6AmP",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],3]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["labs.messages.noCompleted"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["labs/completed/labs-completed-list-item"],null,[["lab"],[["get",["lab"]]]]],false],["text","\\n"]],"locals":["lab"]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.dateRequested"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.dateCompleted"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.patient"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labs.labels.labType"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.results"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.notes"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,1],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model"]]],null,2,0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/labs/completed/template.hbs"}})}),define("hospitalrun/labs/delete/controller",["exports","hospitalrun/controllers/abstract-delete-controller","hospitalrun/mixins/patient-submodule","ember-i18n"],function(e,t,n,a){e.default=t.default.extend(n.default,{title:(0,a.translationMacro)("labs.deleteTitle"),actions:{delete:function(){this.deleteChildFromVisit("labs")}}})}),define("hospitalrun/labs/delete/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"+OJQ5Cwg",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-danger"],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-warning-sign"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["t"],["labs.messages.confirmDeletion"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/labs/delete/template.hbs"}})}),define("hospitalrun/labs/edit/controller",["exports","hospitalrun/controllers/abstract-edit-controller","hospitalrun/mixins/charge-actions","ember","hospitalrun/mixins/patient-submodule"],function(e,t,n,a,l){e.default=t.default.extend(n.default,l.default,{labsController:a.default.inject.controller("labs"),chargePricingCategory:"Lab",chargeRoute:"labs.charge",selectedLabType:null,canComplete:function(){var e=this.get("model.isNew"),t=this.get("model.labTypeName"),n=this.get("selectedLabType");return(!e||!(a.default.isEmpty(t)||a.default.isArray(n)&&n.length>1))&&this.currentUserCan("complete_lab")}.property("selectedLabType.[]","model.labTypeName"),actions:{completeLab:function(){this.set("model.status","Completed"),this.get("model").validate().then(function(){this.get("model.isValid")&&(this.set("model.labDate",new Date),this.send("update"))}.bind(this)).catch(a.default.K)},update:function(){var e=this;this.get("model.isNew")?!function(){var t=e.get("model"),n=e.get("selectedLabType");a.default.isEmpty(e.get("model.status"))&&e.set("model.status","Requested"),e.set("model.requestedBy",t.getUserName()),e.set("model.requestedDate",new Date),a.default.isEmpty(n)?e.saveNewPricing(e.get("model.labTypeName"),"Lab","model.labType").then(function(){this.addChildToVisit(t,"labs","Lab").then(function(){this.saveModel()}.bind(this))}.bind(e)):e.getSelectedPricing("selectedLabType").then(function(e){a.default.isArray(e)?this.createMultipleRequests(e,"labType","labs","Lab"):(this.set("model.labType",e),this.addChildToVisit(t,"labs","Lab").then(function(){this.saveModel()}.bind(this)))}.bind(e))}():this.saveModel()}},additionalButtons:function(){var e=this.get("canComplete"),t=this.get("model.isValid"),n=this.get("i18n");if(t&&e)return[{buttonAction:"completeLab",buttonIcon:"glyphicon glyphicon-ok",class:"btn btn-primary on-white",buttonText:n.t("buttons.complete")}]}.property("canComplete","model.isValid"),pricingTypeForObjectType:"Lab Procedure",pricingTypes:a.default.computed.alias("labsController.labPricingTypes"),pricingList:null,updateCapability:"add_lab",afterUpdate:function(e,t){var n=this.get("i18n"),a=void 0,l=void 0,s=void 0;"Completed"===this.get("model.status")?(s=n.t("labs.alerts.requestCompletedTitle"),l=n.t("labs.alerts.requestCompletedMessage")):(s=n.t("labs.alerts.requestSavedTitle"),l=n.t("labs.alerts.requestSavedMessage")),t&&(a=this.get("cancelAction")),this.saveVisitIfNeeded(s,l,a),this.set("model.selectPatient",!1)}})}),define("hospitalrun/labs/edit/route",["exports","ember","hospitalrun/routes/abstract-edit-route","hospitalrun/mixins/charge-route","hospitalrun/mixins/patient-list-route","ember-i18n"],function(e,t,n,a,l,s){e.default=n.default.extend(a.default,l.default,{editTitle:(0,s.translationMacro)("labs.editTitle"),modelName:"lab",newTitle:(0,s.translationMacro)("labs.newTitle"),pricingCategory:"Lab",actions:{returnToAllItems:function(){this.controller.send("returnToAllItems")}},getNewData:function(){return t.default.RSVP.resolve({selectPatient:!0,requestDate:moment().startOf("day").toDate()})}})}),define("hospitalrun/labs/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"zksQIuZ7",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],6]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["em-input"],null,[["property","label","class"],["result",["helper",["t"],["labels.result"],null],"test-result-input"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-xs-3"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.visit"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","visit","visitDate"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-xs-6"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labs.labels.labType"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","labType","name"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-xs-9"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","requestedBy"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content","optionValuePath","optionLabelPath","prompt","selected"],["col-xs-3 required test-visit-type",["helper",["t"],["labels.visit"],null],"visit",["get",["patientVisitsForSelect"]],"selectObject","selectObject.visitDescription",["helper",["t"],["labs.labels.addNewVisit"],null],["get",["model","visit"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["checkbox-or-typeahead"],null,[["property","label","list","selection","optionLabelPath","typeAheadType","className","prompt","model"],["labTypeName",["helper",["t"],["labs.labels.labType"],null],["get",["objectTypeList"]],["get",["selectedLabType"]],"name","pricing","required test-lab-type"," ",["get",["model"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-summary"],null,[["patient","returnTo","returnToContext","disablePatientLink"],[["get",["model","patient"]],"labs.edit",["get",["model","id"]],["get",["model","isNew"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-typeahead"],null,[["property","label","content","selection","class"],["patientTypeAhead",["helper",["t"],["labels.patient"],null],["get",["patientList"]],["get",["selectedPatient"]],"required test-patient-name"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model","selectPatient"]]],null,4,3],["block",["if"],[["get",["model","isNew"]]],null,2,1],["block",["if"],[["get",["canComplete"]]],null,0],["text"," "],["append",["helper",["em-text"],null,[["property","label","rows"],["notes",["helper",["t"],["labels.notes"],null],3]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],5]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/labs/edit/template.hbs"}})}),define("hospitalrun/labs/index/controller",["exports","hospitalrun/controllers/abstract-paged-controller","hospitalrun/mixins/user-session"],function(e,t,n){e.default=t.default.extend(n.default,{startKey:[],addPermission:"add_lab"})}),define("hospitalrun/labs/index/labs-edit-button/component",["exports","ember"],function(e,t){e.default=t.default.Component.extend({tagName:"button",classNames:["btn","btn-default","neutral"]})}),define("hospitalrun/labs/index/labs-edit-button/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"D+D+/RzO",block:'{"statements":[["block",["link-to"],["labs.edit",["get",["lab"]]],null,0],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["append",["helper",["t"],["labels.edit"],null],false]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/labs/index/labs-edit-button/template.hbs"}})}),define("hospitalrun/labs/index/labs-list-item/component",["exports","ember"],function(e,t){e.default=t.default.Component.extend({tagName:"tr",classNames:["clickable"],click:function(){this.sendAction("action",this.lab)}})}),define("hospitalrun/labs/index/labs-list-item/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"lUoTUBbz",block:'{"statements":[["open-element","td",[]],["static-attr","class","requested-date"],["flush-element"],["append",["helper",["date-format"],[["get",["lab","requestedDate"]]],[["format"],["l h:mm A"]]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","patient"],["flush-element"],["append",["unknown",["lab","patient","displayName"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","requested-by"],["flush-element"],["append",["unknown",["lab","requestedBy"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","lab-type"],["flush-element"],["append",["unknown",["lab","labType","name"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","notes"],["flush-element"],["append",["unknown",["lab","notes"]],false],["close-element"],["text","\\n"],["block",["if"],[["get",["showActions"]]],null,1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["labs/index/labs-edit-button"],null,[["lab"],[["get",["lab"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["canEdit"]]],null,0],["text"," "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/labs/index/labs-list-item/template.hbs"}})}),define("hospitalrun/labs/index/route",["exports","hospitalrun/routes/abstract-index-route","ember-i18n"],function(e,t,n){e.default=t.default.extend({modelName:"lab",pageTitle:(0,n.translationMacro)("labs.requestsTitle"),searchStatus:"Requested",_getStartKeyFromItem:function(e){var t=e.get("labDateAsTime"),n=this._getPouchIdFromItem(e),a=e.get("requestedDateAsTime"),l=this.get("searchStatus");return[l,a,t,n]},_modelQueryParams:function(){var e=this._getMaxPouchId(),t=this.get("maxValue"),n=this._getMinPouchId(),a=this.get("searchStatus");return{options:{startkey:[a,null,null,n],endkey:[a,t,t,e]},mapReduce:"lab_by_status"}}})}),define("hospitalrun/labs/index/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"6Iu3UI4u",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],5]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["open-element","a",[]],["static-attr","href","#"],["modifier",["action"],[["get",[null]],"newItem"]],["flush-element"],["append",["helper",["t"],["labs.messages.createNewRecord"],null],false],["close-element"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["labs.messages.noItemsFound"],null],false],["text"," "],["block",["if"],[["get",["canAdd"]]],null,0],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["labs/index/labs-list-item"],null,[["lab","action","showActions","canEdit"],[["get",["lab"]],"editItem",["get",["showActions"]],["get",["canEdit"]]]]],false],["text","\\n"]],"locals":["lab"]},{"statements":[["text"," "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.dateRequested"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.patient"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labs.labels.labType"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.notes"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["showActions"]]],null,3],["text"," "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,2],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["hasRecords"]]],null,4,1]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/labs/index/template.hbs"}})}),define("hospitalrun/labs/route",["exports","hospitalrun/routes/abstract-module-route","ember-i18n"],function(e,t,n){e.default=t.default.extend({addCapability:"add_lab",additionalModels:[{name:"labPricingTypes",findArgs:["lookup","lab_pricing_types"]}],allowSearch:!1,moduleName:"labs",newButtonText:(0,n.translationMacro)("labs.buttons.newButton"),sectionTitle:(0,n.translationMacro)("labs.sectionTitle")})}),define("hospitalrun/locales/de/translations",["exports"],function(e){e.default={dashboard:{title:"Was möchten Sie tun?"},navigation:{imaging:"Bildgebung",inventory:"Inventar",patients:"Patienten",appointments:"Termine",medication:"Medikation",labs:"Labore",billing:"Abrechnung",administration:"Administration",subnav:{requests:"Anfragen",items:"Einheiten",completed:"Erledigt",newRequest:"Neue Anfrage",inventoryReceived:"Eingeganges Inventar",reports:"Berichte",patientListing:"Patietenliste",newPatient:"Neuer Patient",thisWeek:"Diese Woche",today:"Heute",search:"Suche",addAppointment:"Termin eintragen",dispense:"Verabreichen",returnMedication:"Medikamente zurückgeben",invoices:"Rechnungen",newInvoice:"Neue Rechnung",prices:"Kosten",priceProfiles:"Preisprofile",lookupLists:"Nachschlagelisten",addressFields:"Adressfelder",loadDb:"Datenbank laden",users:"Benutzer",newUser:"Neuer Benutzer"},actions:{logout:"Abmelden",login:"Anmelden"},about:"Über HospitalRun"},user:{plusNewUser:"+ Neuer Benutzer",usersPageTile:"Benutzerliste"},admin:{addressOptions:"Adressoptionen",lookupLists:"Nachschlagelisten",loadDb:"Datenbank laden",users:"Benutzer",address:{address1Label:"Adresse 1 Kennzeichen",address2Label:"Adresse 2 Kennzeichen",address3Label:"Adresse 3 Kennzeichen",address4Label:"Adresse 4 Kennzeichen",include1Label:"Einbezug 1 Kennzeichen",include2Label:"Einbezug 2 Kennzeichen",include3Label:"Einbezug 3 Kennzeichen",include4Label:"Einbezug 4 Kennzeichen",titles:{optionsSaved:"Optionen gespeichert"},messages:{addressSaved:"Die Adressoptionen wurden gespeichert"}},lookup:{anesthesiaTypes:"Anästhesiearten",anesthesiologists:"Anästhesiologe",billingCategories:"Abrechnungskategorien",clinicList:"Kliniken",countryList:"Länder",diagnosisList:"Diagnosen",cptCodeList:"CPT Codes",expenseAccountList:"Ausgabekonten",aisleLocationList:"Gänge-Verzeichnis",warehouseList:"Warenhaus",inventoryTypes:"Inventartypen",imagingPricingTypes:"Bildgebungs-Preiskategorien",labPricingTypes:"Labor-Preiskategorien",patientStatusList:"Patientenstatus",physicianList:"Ärzte",procedureList:"Abläufe",procedureLocations:"Ablaufs-Orte",procedurePricingTypes:"Ablaufs-Preiskategorien",radiologists:"Radiologen",unitTypes:"Einheiten",vendorList:"Anbieter",visitLocationList:"Einsatzorte",visitTypes:"Besuchsarten",wardPricingTypes:"Krankenstations-Preistypen"}},labels:{name:"Name",patient:"Patient",quantity:"Anzahl",requestedOn:"Angefragt am",dateRequested:"Anfragedatum",dateCompleted:"Abschlussdatum",requestedBy:"Angefragt von",fulfill:"Ausführen",actions:"Aktionen",action:"Aktion",notes:"Notizen",edit:"Bearbeiten",imagingType:"Bildgebungsart",result:"Ergebnis",results:"Ergebnisse",visit:"Besuch",requests:"Anfragen",completed:"Erledigt",id:"Id-Nr",sex:"Geschlecht",age:"Alter",username:"Username",email:"E-Mail",role:"Rolle",delete:"Entfernen",userCanAddNewValue:"Benutzer kann neue Werte hinzufügen",value:"Wert",lookupType:"Nachschlagebereich",importFile:"Datei importieren",fileLoadSuccessful:"Datei erfolgreich geladen",fileToLoad:"Datei laden",startTime:"Startzeit",endTime:"Endzeit",docRead:"Dokument gelesen",docWritten:"Dokument geschrieben",displayName:"Angezeigter Name",password:"Passwort",editUser:"Benutzer bearbeiten",newUser:"Neuer Benutzer",deleteUser:"Benutzer löschen"},messages:{noItemsFound:"Keine Einträge gefunden.",createNewRecord:"Neuen Eintrag erstellen?",createNewUser:"Neuen Benutzer hinzufügen?",noUsersFound:"Keine Benutzer gefunden.",areYouSureDelete:"Wollen Sie den Benutzer {{user}} sicher löschen?",userHasBeenSaved:"Der Benutzer wurde gespeichert.",userSaved:"Benutzer gespeichert",forAuthorizedPersons:"Dieser Bericht ist nur für autorisierte Personen."},buttons:{complete:"Abschließen",cancel:"Abbrechen",returnButton:"Zurück",add:"Hinzufügen",update:"Aktualisieren",ok:"Okay",delete:"Entfernen",newUser:"Neuer Benutzer",addValue:"Wert hinzufügen",import:"Importieren",loadFile:"Datei laden"},login:{messages:{signIn:"Bitte anmelden",error:"Benutzername oder Passwort falsch."},labels:{password:"Passwort",username:"Benutzername",signIn:"Anmelden"}},inventory:{messages:{noRequests:"Keine Anfragen gefunden.",createRequest:"Neue Anfrage erstellen?"}},imaging:{pageTitle:"Anfrage zur Bildgebung",sectionTitle:"Bildgebung",buttons:{newButton:"+ Neue Bildgebung"},labels:{radiologist:"Radiologe",addNewVisit:"--Neuen Besuch hinzufügen--"},messages:{noCompleted:"Keine erledigten Einträge gefunden."},titles:{completedImaging:"Erledigte Bildgebung",editTitle:"Bildgebungs-Anfrage bearbeiten",newTitle:"Neue Bildgebungs-Anfrage"},alerts:{completedTitle:"Bildgebungs-Anfrage gestellt",completedMessage:"Die Anfrage zur Bildgebung wurde abgeschlossen.",savedTitle:"Bildgebungs-Anfrage gespeichert",savedMessage:"Die Anfrage zur Bildgebung wurde gespeichert." -}}}}),define("hospitalrun/locales/en/config",["exports"],function(e){e.default={}}),define("hospitalrun/locales/en/translations",["exports"],function(e){e.default={dashboard:{title:"What would you like to do?"},errors:{inclusion:"is not included in the list",exclusion:"is reserved",invalid:"is invalid",confirmation:"doesn't match {{attribute}}",accepted:"must be accepted",empty:"can't be empty",blank:"can't be blank",present:"must be blank",tooLong:"is too long (maximum is {{count}} characters)",tooShort:"is too short (minimum is {{count}} characters)",wrongLength:"is the wrong length (should be {{count}} characters)",notANumber:"is not a number",notAnInteger:"must be an integer",greaterThan:"must be greater than {{count}}",greaterThanOrEqualTo:"must be greater than or equal to {{count}}",equalTo:"must be equal to {{count}}",lessThan:"must be less than {{count}}",lessThanOrEqualTo:"must be less than or equal to {{count}}",otherThan:"must be other than {{count}}",odd:"must be odd",even:"must be even",invalidNumber:"not a valid number",result:"Please enter a result before completing"},dates:{long:"{{years}} year {{months}} months {{days}} days",longPlural:"{{years}} years {{months}} months {{days}} days",longOmitYears:"{{months}} months {{days}} days",longOmitDays:"{{years}} year {{months}} months",longOmitDaysPlural:"{{years}} years {{months}} months",longOmitDaysYears:"{{months}} months",shortOmitYears:"{{months}}m {{days}}d",short:"{{years}}y {{months}}m {{days}}d"},navigation:{imaging:"Imaging",inventory:"Inventory",patients:"Patients",appointments:"Appointments",medication:"Medication",labs:"Labs",billing:"Billing",administration:"Administration",subnav:{actions:"Actions",requests:"Requests",items:"Items",completed:"Completed",newRequest:"New Request",inventoryReceived:"Inventory Received",reports:"Reports",patientListing:"Patient Listing",newPatient:"New Patient",thisWeek:"This Week",today:"Today",search:"Search",addAppointment:"Add Appointment",dispense:"Dispense",returnMedication:"Return Medication",invoices:"Invoices",newInvoice:"New Invoice",prices:"Prices",priceProfiles:"Price Profiles",lookupLists:"Lookup Lists",addressFields:"Address Fields",loadDB:"Load DB",users:"Users",newUser:"New User",admittedPatients:"Admitted Patients",missed:"Missed",userRoles:"User Roles",workflow:"Workflow",outpatient:"Outpatient",customForms:"Custom Forms"},actions:{logout:"Logout",login:"Login"},about:"About HospitalRun"},user:{plusNewUser:"+ new user",usersPageTile:"User Listing"},admin:{addressOptions:"Address Options",lookupLists:"Lookup Lists",loadDb:"Load DB",userRoles:"User Roles",users:"Users",address:{address1Label:"Address 1 Label",address2Label:"Address 2 Label",address3Label:"Address 3 Label",address4Label:"Address 4 Label",include1Label:"Include 1 Label",include2Label:"Include 2 Label",include3Label:"Include 3 Label",include4Label:"Include 4 Label",titles:{optionsSaved:"Options Saved"},messages:{addressSaved:"The address options have been saved"},newTitle:"Address Options",editTitle:"Address Options",addressLabel:"Address"},customForms:{buttons:{addField:"Add Field",moveDown:"Move Down",moveUp:"Move Up",newForm:"+ new form",preview:"Preview"},labels:{alwaysInclude:"Always Include",checkbox:"Checkbox",columns:"Columns",colSpan:"Number of Columns To Span",customForm:"Custom Form",formName:"Form Name",formType:"Form Type",includeOtherOption:"Include Other Option",label:"Label",newForm:"New Form",operativePlanFormType:"Operative Plan and Report",otherOptionLabel:"Other Option Label",patientFormType:"Patient",property:"Property",radio:"Radio",select:"Dropdown",socialworkFormType:"Social Work",text:"Text",textarea:"Large Text",visitFormType:"Visit"},messages:{deleteForm:"Are you sure you want to delete this custom form?",formSaved:"The {{name}} form has been saved."},titles:{customForms:"Custom Forms",deleteForm:"Delete Custom Form",editCustomForm:"Edit Custom Form",fields:"Fields",formSaved:"Form Saved",checkboxValues:"Checkbox Values",dropDownValues:"Dropdown Values",newCustomForm:"New Custom Form",radioValues:"Radio Values"}},loaddb:{progressMessage:"Please wait while your database is loaded.",progressTitle:"Loading Database",displayAlertTitle:"Select File To Load",displayAlertMessage:"Please select file to load.",errorDisplayAlertTitle:"Error Loading",errorDisplayAlertMessage:"The database could not be imported. The error was: {{error}}",editTitle:"Load DB"},lookup:{alertImportListTitle:"Select File To Import",alertImportListMessage:"Please select file to import.",alertImportListSaveTitle:"List Imported",alertImportListSaveMessage:"The lookup list has been imported.",alertImportListUpdateTitle:"List Saved",alertImportListUpdateMessage:"The lookup list has been saved.",pageTitle:"Lookup Lists",edit:{template:{addTitle:"Add Value",editTitle:"Edit Value",updateButtonTextAdd:"Add",updateButtonTextUpdate:"Update",labelTitle:"Value"}},anesthesiaTypes:"Anesthesia Types",anesthesiologists:"Anesthesiologists",billingCategories:"Billing Categories",clinicList:"Clinic Locations",countryList:"Countries",diagnosisList:"Diagnoses",cptCodeList:"CPT Codes",expenseAccountList:"Expense Accounts",aisleLocationList:"Inventory Aisle Locations",warehouseList:"Inventory Locations",inventoryTypes:"Inventory Types",imagingPricingTypes:"Imaging Pricing Types",labPricingTypes:"Lab Pricing Types",patientStatusList:"Patient Status List",physicianList:"Physicians",procedureList:"Procedures",procedureLocations:"Procedures Locations",procedurePricingTypes:"Procedure Pricing Types",radiologists:"Radiologists",unitTypes:"Unit Types",vendorList:"Vendor",visitLocationList:"Visit Locations",visitTypes:"Visit Types",wardPricingTypes:"Ward Pricing Types",messages:{deleteLookupValue:"Are you sure you want to delete the {{value}} value?"},titles:{deleteLookupValue:"Delete Value"}},roles:{capability:{admin:"Administration",loadDb:"Load Database",updateConfig:"Update Configurations",appointments:"Appointments",addAppointment:"Add Appointment",billing:"Billing",addCharge:"Add Charge",addPricing:"Add Pricing",addPricingProfile:"Add Pricing Profile",addInvoice:"Add Invoice",addPayment:"Add Payment",deleteInvoice:"Delete Invoice",deletePricing:"Delete Pricing",deletePricingProfile:"Delete Pricing Profile",editInvoice:"Edit Invoice",invoices:"Invoices",overrideInvoice:"Override Invoice",pricing:"Pricing",patients:"Patients",addDiagnosis:"Add Diagnosis",addPhoto:"Add Photo",addPatient:"Add Patient",addProcedure:"Add Procedure",addVisit:"Add Visit",addVitals:"Add Vitals",admitPatient:"Admit Patient",deletePhoto:"Delete Photo",deletePatient:"Delete Patient",deleteAppointment:"Delete Appointment",deleteDiagnosis:"Delete Diagnosis",deleteProcedure:"Delete Procedure",deleteSocialwork:"Delete Social Work",deleteVitals:"Delete Vitals",deleteVisit:"Delete Visit",dischargePatient:"Discharge Patient",patientReports:"Patient Reports",visits:"Visits",medication:"Medication",addMedication:"Add Medication",deleteMedication:"Delete Medication",fulfillMedication:"Fulfill Medication",labs:"Labs",addLab:"Add Lab",completeLab:"Complete Lab",deleteLab:"Delete Lab",imaging:"Imaging",addImaging:"Add Imaging",completeImaging:"Complete Imaging",deleteImaging:"Delete Imaging",inventory:"Inventory",addInventoryRequest:"Add Inventory Request",addInventoryItem:"Add Inventory Item",addInventoryPurchase:"Add Inventory Purchase",adjustInventoryLocation:"Adjust Inventory Location",deleteInventoryItem:"Delete Inventory Item",fulfillInventory:"Fulfill Inventory",defineUserRoles:"Define User Roles",addBillingDiagnosis:"Add Billing Diagnosis",addNote:"Add Note",addSocialwork:"Add Social Work",deleteNote:"Delete Note",addOperativePlan:"Add Operative Plan",addAllergy:"Add Allergy",addOperationReport:"Add Operation Report"},messages:{roleSaved:"The {{roleName}} role has been saved."},titles:{roleSaved:"Role Saved"}},visitForms:{labels:{followup:"Followup",form:"Form",initial:"Initial",visitType:"Visit Type"},titles:{visitForms:"Visit Forms"}},workflow:{admissionDepositLabel:"Admission deposit required",clinicPrepaymentLabel:"Clinic prepayment required",followupPrepaymentLabel:"Followup prepayment required",outpatientLabLabel:"Outpatient Lab prepayment required",outpatientImagingLabel:"Outpatient Imaging prepayment required",outpatientMedicationLabel:"Outpatient Medication prepayment required",titles:{optionsSaved:"Options Saved"},messages:{optionsSaved:"The workflow options have been saved"},newTitle:"Workflow Options",editTitle:"Workflow Options",workflowLabel:"Workflow"}},labels:{cptcode:"CPT Code",loading:"Loading",name:"Name",note:"Note",patient:"Patient",prescriber:"Prescriber",quantity:"Quantity",requestedOn:"Requested On",date:"Date",dateOfBirth:"Date of Birth",dateOfBirthShort:"DoB",dateRequested:"Date Requested",dateCompleted:"Date Completed",description:"Description",requestedBy:"Requested By",fulfill:"Fulfill",fulfillRequest:"Fulfill Request",fulfillRequestNow:"Fulfill Request Now",actions:"Actions",action:"Action",notes:"Notes",edit:"Edit",imageOrders:"Image Orders",labOrders:"Lab Orders",imagingType:"Imaging Type",result:"Result",results:"Results",visit:"Visit",requests:"Requests",completed:"Completed",id:"Id",on:"on",type:"Type",sex:"Sex",age:"Age",search:"Search",username:"Username",email:"Email",role:"Role",delete:"Delete",userCanAddNewValue:"User Can Add New Values",value:"Value",lookupType:"Lookup Type",importFile:"Import File",fileLoadSuccessful:"File To Load Successful",fileToLoad:"File Load",fileName:"File Name",startTime:"Start Time",startDate:"Start Date",endTime:"End Time",endDate:"End Date",docRead:"Docs Read",docWritten:"Docs Written",displayName:"Display Name",password:"Password",editUser:"Edit User",newUser:"New User",deleteUser:"Delete User",medication:"Medication",status:"Status",addNewOutpatientVisit:"--Add New Outpatient Visit--",prescription:"Prescription",prescriptionDate:"Prescription Date",billTo:"Bill To",pullFrom:"Pull From",fulfilled:"Fulfilled",deleteRequest:"Delete Request",location:"Location",provider:"Provider",with:"With",allDay:"All Day",physician:"Physician",assisting:"Assisting",anesthesia:"Anesthesia",procedures:"Procedures",number:"Number",billDate:"Bill Date",balanceDue:"Balance Due",amount:"Amount",datePaid:"Date Paid",creditTo:"Credit To",invoiceId:"Invoice ID",lineItems:"Line Items",discount:"Discount",excess:"Excess",price:"Price",total:"Total",expenseTo:"Expense To",grandTotal:"Grand Total",remarks:"Remarks",payments:"Payments",category:"Category",department:"Department",address:"Address",country:"Country"},messages:{noItemsFound:"No items found.",noHistoryAvailable:"No history available.",createNewRecord:"Create a new record?",createNewUser:"Create a new user?",noUsersFound:"No users found.",areYouSureDelete:"Are you sure you wish to delete the user {{user}}?",userHasBeenSaved:"The user has been saved.",userSaved:"User Saved",onBehalfOf:"on behalf of",newPatientHasToBeCreated:"A new patient needs to be created...Please wait..",noNotesAvailable:"No additional clinical notes are available for this visit.",sorry:"Sorry, something went wrong...",forAuthorizedPersons:"This report is for authorized persons only.",requiredFieldsCorrectErrors:"Please fill in required fields (marked with *) and correct the errors before saving.",saveActionException:"An error occurred while attempting to save: {{message}}",reportError:"An error was encountered while generating the requested report. Please let your system administrator know that you have encountered an error."},alerts:{pleaseWait:"Please Wait",warningExclamation:"Warning!!!!",errorExclamation:"Error!!!!",reportError:"Error Generating Report"},headings:{chargedItems:"Charged Items"},buttons:{addItem:"Add Item",complete:"Complete",cancel:"Cancel",close:"Close",returnButton:"Return",barcode:"Barcode",add:"Add",update:"Update",ok:"Ok",fulfill:"Fulfill",remove:"Remove",delete:"Delete",newUser:"New User",addValue:"Add Value",newNote:"New Note",import:"Import",loadFile:"Load File",newRequest:"New Request",allRequests:"All Requests",dispense:"Dispense",newItem:"+ new item",newRequestPlus:"+ new request",addVisit:"Add Visit",search:"Search",edit:"Edit",addLineItem:"Add Line Item",showFewer:"Show Fewer",showAll:"Show All"},login:{messages:{signIn:"please sign in",error:"Username or password is incorrect."},labels:{password:"Password",username:"Username",signIn:"Sign in"}},loading:{progressBar:{progress:"{{progressBarValue}}% Complete"},messages:{0:"The top butterfly flight speed is 12 miles per hour. Some moths can fly 25 miles per hour!",1:"Owls are the only birds that can see the color blue.",2:"Cats have over 100 vocal sounds; dogs only have 10.",3:"Humans use a total of 72 different muscles in speech.",4:"More than 1,000 different languages are spoken on the continent of Africa.",5:"An erythrophobe is someone who blushes easily.",6:"The most common phobia in the world is odynophobia which is the fear of pain.",7:"Your body uses 300 muscles to balance itself when you are standing still.",8:"Certain frogs can be frozen solid then thawed, and continue living.",9:"Our eyes are always the same size from birth, but our nose and ears never stop growing.",10:"Your tongue is the only muscle in your body that is attached at only one end.",11:"Camels have three eyelids to protect themselves from blowing sand."}},inventory:{edit:{cost:"Cost Per Unit:",delivered:"Delievered To:",location:"Location Adjusted:",prescription:"Prescription For:",pulled:"Pulled From:",quantity:"Quantity at Completion:",reason:"Reason:",returned:"Returned from Patient:",transferredFrom:"Transferred From:",transferredTo:"Transferred To:"},labels:{action:"Action",add:"Add",adjust:"Adjust",adjustmentDate:"Adjustment Date",adjustmentFor:"Adjustment For",adjustmentType:"Adjustment Type",aisle:"Aisle",aisleLocation:"Aisle Location",allInventory:"All Inventory",availableQuantity:"{{quantity}} available",billTo:"Bill To",consumePurchases:"Consume Purchases",consumptionRate:"Consumption Rate",cost:"Cost",costPerUnit:"Cost per Unit",crossReference:"Cross Reference",currentQuantity:"Current Quantity",dateCompleted:"Date Completed",dateEffective:"Effective Date",dateEnd:"End Date",dateStart:"Start Date",dateReceived:"Date Received",dateTransferred:"Date Transferred",daysLeft:"Days Left",deliveryAisle:"Delivery Aisle",deliveryLocation:"Delivery Location",distributionUnit:"Distribution Unit",deleteItem:"Delete Item",details:"Details",editItem:"Edit Item",expense:"Expense To",expirationDate:"Expiration Date",fulfillRequest:"Fulfill Request",fulfillRequestNow:"Fulfill Request Now",gift:"Gift in Kind",giftUsage:"Gift in Kind Usage",giftInKindNo:"N",giftInKindYes:"Y",inventoryConsumed:"Inventory Consumed",inventoryItem:"Inventory Item",inventoryObsolence:"Inventory Obsolence",invoiceItems:"Invoice Items",invoiceLineItem:"Invoice Line Item",invoiceNumber:"Invoice Number",item:"Item",items:"Items",itemNumber:"Item Number",location:"Location",locations:"Locations",name:"Name",markAsConsumed:"Mark as Consumed",newItem:"New Item",allItems:"All Items",originalQuantity:"Original Quantity",print:"Print",printBarcode:"Print Barcode",printer:"Printer",pullFrom:"Pull From",purchases:"Purchases",purchaseCost:"Purchase Cost",purchaseInfo:"Purchase Information",quantity:"Quantity ({{unit}})",quantityAvailable:"Quantity Available",quantityOnHand:"Quantity on Hand",quantityRequested:"Quantity Requested",rank:"Rank",reason:"Reason",remove:"Remove",reorderPoint:"Reorder Point",requestedItems:"Requested Items",salePricePerUnit:"Sale Price per Unit",save:"Save",serialNumber:"Serial/Lot Number",total:"Total",totalCost:"Total Cost",totalReceived:"Total Received: {{total}}",transaction:"Transaction",transactions:"Transactions",transfer:"Transfer",transferFrom:"Transfer From",transferTo:"Transfer To Location",transferToAisle:"Transfer to Aisle Location",unit:"Unit",unitCost:"Unit Cost",vendor:"Vendor",vendorItemNumber:"Vendor Item Number",xref:"XRef"},messages:{adjust:"Please adjust the quantities on the appropriate location(s) to account for the difference of {{difference}}.",createRequest:"Create a new request?",delete:"Are you sure you wish to delete {{name}}?",itemNotFound:"The inventory item {{item}} could not be found.
If you would like to create a new inventory item, fill in the information below.
Otherwise, press the Cancel button to return.",loading:"Loading transactions ...",purchaseSaved:"The inventory purchases have been successfully saved.",noRequests:"No requests found.",noItems:"No items found.",quantity:"The total quantity of ({{quantity}}) does not match the total quantity in the locations ({{locationQuantity}}).",removeItem:"Are you sure you want to remove this item from this invoice?",removeItemRequest:"Are you sure you want to remove this item from this request?",requestFulfilled:"The inventory request has been fulfilled.",requestUpdated:"The inventory request has been updated.",warning:"Please fill in required fields (marked with *) and correct the errors before adding."},reports:{rows:{adjustments:"Adjustments",adjustmentsTotal:"Total Adjustments",balanceBegin:"Beginning Balance",balanceEnd:"Ending Balance",category:"Category",consumed:"Consumed",consumedGik:"GiK Consumed",consumedGikTotal:"Total GiK Consumed",consumedPuchases:"Purchases Consumed",consumedPurchasesTotal:"Total Purchases Consumed",consumedTotal:"Total Consumed",errInFinSum:"Error in _generateFinancialSummaryReport: ",errInFindPur:"Error in _findInventoryItemsByPurchase: ",errInFindReq:"Error in _findInventoryItemsByRequest: ",expensesFor:"Expenses For: ",noAccount:"(No Account)",subtotal:"Subtotal: ",subtotalFor:"Subtotal for {{category}} - {{account}}: ",total:"Total: ",totalFor:"Total for {{var}}: ",totalPurchases:"Total Purchases",transfer1:"{{quantity}} from {{location}}",trasnfer2:"From: {{source}} To: {{target}}"},adjustment:"Detailed Adjustment",daysSupply:"Days Supply Left In Stock",expenseDetail:"Detailed Expenses",expenseSum:"Summary Expenses",expiration:"Expiration Date",export:"Export Report",fields:"Fields to Include",finance:"Finance Summary",generate:"Generate Report",invLocation:"Inventory By Location",invValuation:"Inventory Valuation",purchaseDetail:"Detailed Purchase",purchaseSum:"Summary Purchase",reportType:"Report Type",stockTransferDetail:"Detailed Stock Transfer",stockTransferSum:"Summary Stock Transfer",stockUsageDetail:"Detailed Stock Usage",stockUsageSum:"Summary Stock Usage",titleSingleDate:"{{name}} Report {{date}}",titleDateRange:"{{name}} Report {{startDate}} - {{endDate}}"},titles:{addPurchase:"Add Purchase",addRequest:"New Request",adjustment:"Adjustment",editPurchase:"Edit Purchase",editRequest:"Edit Request",inventoryItem:"New Inventory Item",inventoryReport:"Inventory Report",purchaseSaved:"Inventory Purchases Saved",quickAddTitle:"New Inventory Item",removeItem:"Remove Item",requestFulfilled:"Request Fulfilled",requestUpdated:"Request Updated",transfer:"Transfer Items",warning:"Warning!!!!!"}},imaging:{pageTitle:"Imaging Requests",sectionTitle:"Imaging",buttons:{newButton:"+ new imaging"},labels:{radiologist:"Radiologist",addNewVisit:"--Add New Visit--"},messages:{delete:"Are you sure you wish to delete this imaging request?",noCompleted:"No completed items found."},titles:{completedImaging:"Completed Imaging",editTitle:"Edit Imaging Request",newTitle:"New Imaging Request"},alerts:{completedTitle:"Imaging Request Completed",completedMessage:"The imaging request has been completed.",savedTitle:"Imaging Request Saved",savedMessage:"The imaging request has been saved."}},medication:{pageTitle:"Medication Requests",sectionTitle:"Medication",returnMedication:"Return Medication",buttons:{dispenseMedication:"dispense medication",newButton:"+ new request",returnMedication:"return medication"},titles:{completedMedication:"Completed Medication",editMedicationRequest:"Edit Medication Request",newMedicationRequest:"New Medication Request"},messages:{createNew:"Create a new medication request?",confirmDeletion:"Are you sure you wish to delete this medication request?"},labels:{refills:"Refills",quantityRequested:"Quantity Requested",quantityDispensed:"Quantity Dispensed",quantityDistributed:"Quantity Distributed",quantityToReturn:"Quantity To Return",returnLocation:"Return Location",returnAisle:"Return Aisle",returnReason:"Return Reason/Notes",adjustmentDate:"Adjustment Date",creditToAccount:"Credit To Account"},alerts:{returnedTitle:"Medication Returned",returnedMessage:"The medication has been marked as returned.",savedTitle:"Medication Request Saved",savedMessage:"The medication record has been saved.",fulfilledTitle:"Medication Request Fulfilled"}},appointments:{currentScreenTitle:"Appointment List",editTitle:"Edit Appointment",newTitle:"New Appointment",sectionTitle:"Appointments",thisWeek:"Appointments This Week",missed:"Missed Appointments",searchTitle:"Search Appointments",todayTitle:"Today's Appointments",messages:{deleteAppointmentMessage:"Are you sure you wish to delete this appointment?",endTimeLaterThanStart:"Please select an end time later than the start time."},buttons:{newButton:"+ new appointment"},labels:{selectedStartingDate:"Show Appointments On Or After"}},vitals:{messages:{delete:"Are you sure you wish to delete these vitals?"},labels:{dateRecorded:"Date Recorded",temperature:"Temperature",weight:"Weight",height:"Height",sbp:"SBP",dbp:"DBP",heartRate:"Heart Rate",respiratoryRate:"Respiratory Rate"}},visits:{titles:{additionalDiagnoses:"Additional Diagnoses",checkedIn:"Patient Checked In",checkOut:"Patient Check Out",checkedOut:"Patient Checked Out",discharged:"Patient Discharged",editVisit:"Edit Visit",newVisit:"New Visit",patientCheckIn:"Patient Check In",visitSaved:"Visit Saved"},messages:{delete:"Are you sure you wish to delete this visit?",checkOut:"Are you sure you wish to check out {{patientName}}?",checkedOut:"{{patientName}} has been checked out.",discharged:"{{patientName}} has been discharged.",patientCheckedIn:"{{patientName}} has been checked in.",patientCreatedAndCheckedIn:"{{patientName}} has been created and checked in.",visitAndPatientSaved:"The visit and patient records have been saved.",visitSaved:"The visit record has been saved."},buttons:{newProcedure:"New Procedure",newAppointment:"New Appointment",addDiagnosis:"Add Diagnosis",newVitals:"New Vitals",checkIn:"Check In",checkOut:"Check Out",discharge:"Discharge"},labels:{diagnosis:"Diagnosis",procedure:"Procedure",procedureDate:"Procedure Date",authoredBy:"Authored By",visitInformation:"Visit Information",examiner:"Examiner",status:"Visit Status",finalDiagnosis:"Final/Billing Diagnosis",visitDate:"Visit Date",visitType:"Visit Type",patientToCheckIn:"Patient To Check In",checkInTime:"Check In",checkOutTime:"Check Out",appointment:"Appointment",haveAppointment:"Y",noAppointment:"N",ordersDone:"Orders Done",haveDoneOrders:"Y",ordersNotDone:"N",reasonForVisit:"Reason For Visit",statusAdmitted:"Admitted",statusDischarged:"Discharged",statusCheckedIn:"Checked In",statusCheckedOut:"Checked Out",createNewPatient:"Create New Patient"},navigation:{charges:"Charges",notes:"Notes",orders:"Orders",procedures:"Procedures",vitals:"Vitals"}},labs:{sectionTitle:"Labs",requestsTitle:"Lab Requests",editTitle:"Edit Lab Request",newTitle:"New Lab Request",deleteTitle:"Delete Request",completedTitle:"Completed Labs",labels:{labType:"Lab Type",addNewVisit:"--Add New Visit--"},messages:{noItemsFound:"No labs found.",createNewRecord:"Create a new record?",confirmDeletion:"Are you sure you wish to delete this lab request?",noCompleted:"No completed items found."},buttons:{newButton:"+ new lab"},alerts:{requestCompletedTitle:"Lab Request Completed",requestCompletedMessage:"The lab request has been completed.",requestSavedTitle:"Lab Request Saved",requestSavedMessage:"The lab request has been saved."}},patients:{navigation:{photos:"Photos",general:"General",history:"History",appointments:"Appointments",visits:"Visits",medication:"Medication",imaging:"Imaging",labs:"Labs",socialWork:"Social Work"},titles:{addContact:"Add Contact",admittedPatients:"Admitted Patients",expenses:"Expenses",additionalContacts:"Additional Contacts",familyInformation:"Family Information",delete:"Delete Patient",new:"New Patient",edit:"Edit Patient",patient:"Patient Report",patientListing:"Patient Listing",patientReport:"Patient Report",addPhoto:"Add Photo",editPhoto:"Edit Photo",socialWork:"Expense",familyInfo:"Family Info",deleteFamilyMember:"Delete Family Member",deleteExpense:"Delete Expense",deletePhoto:"Delete Photo",deleteContact:"Delete Contact",savedPatient:"Patient Saved",todaysOutpatients:"Today's Outpatients",admissionsDetail:"Admissions Detail",admissionsSummary:"Admissions Summary",diagnosticTesting:"Diagnostic Testing",dischargesDetail:"Discharges Detail",dischargesSummary:"Discharges Summary",proceduresDetail:"Procedures Detail",proceduresSummary:"Procedures Summary",patientStatus:"Patient Status",totalPatientDays:"Total Patient Days",totalPatientDaysDetailed:"Total Patient Days (Detailed)",visit:"Visit",deletePatientRecord:"Delete Patient Record",outpatientsForDate:"Outpatients for {{visitDate}}"},messages:{areYouSureDelete:"Are you sure you want to delete this {{object}}?",deletePatient:"Are you sure you wish to delete {{firstName}} {{lastName}}?",noPatientsFound:"No patients found.",savedPatient:"The patient record for {{displayName}} has been saved.",notFoundQuickAdd:"The patient {{patientFullName}} could not be found. If you would like to create a new patient, fill in the information below. Otherwise press the Cancel button to return.",createNewPatient:"Create a new patient record?",deletingPatient:"Deleting patient and all associated records"},buttons:{addExpense:"Add Expense",addContact:"Add Contact",addOperativePlan:"Add Operative Plan",editOperativePlan:"Current Operative Plan",newLab:"New Lab",newVisit:"New Visit",newMedication:"New Medication",newImaging:"New Imaging",addFamilyMember:"Add Family Member",newPhoto:"New Photo",newAppointment:"New Appointment",backToPatients:"Back to Patient List",newPatient:"+ new patient",patientCheckIn:"Patient Check In"},labels:{primaryDiagnosis:"Primary Diagnoses",secondaryDiagnosis:"Secondary Diagnoses",monthlyCost:"Monthly Cost",totalMontlyExpense:"Total Monthly Expenses",patientType:"Patient Type",admissionDate:"Admission Date",patientDays:"Patient Days",dischargeDate:"Discharge Date",admit:"Admit",relationships:"Relationships",phone:"Phone",email:"Email",firstName:"First Name",middleName:"Middle Name",lastName:"Last Name",sex:"Sex",dob:"DOB",dateOfBirth:"Date Of Birth",placeOfBirth:"Place Of Birth",sources:"Sources",cost:"Cost",civilStatus:"Civil Status",relationship:"Relationship To Patient",education:"Education",occupation:"Occupation",income:"Income",insurance:"Insurance",dateProcessed:"Date Processed",status:"Patient Status",externalPatientId:"External Patient Id",bloodType:"Blood Type",clinic:"Clinic Site",referredBy:"Referred By",referredDate:"Referred Date",religion:"Religion",parent:"Parent/Guardian",contacts:"Contacts",sexNotEntered:"Sex Not Entered",operativePlan:"Operative Plan"},notes:{newNote:"New Note for",updateNote:"Updating Note from",onBehalfOfLabel:"On Behalf Of",onBehalfOfCopy:"on behalf of",pleaseSelectAVisit:"Please select a visit"}},billing:{alerts:{noInvoiceFound:"No invoices found",deleteItem:"Are you sure you wish to delete {{item}}?",noPricingItems:"No pricing items found.",noPricingProfiles:"No pricing profiles found."},buttons:{createInvoice:"Create an invoice?",addOverride:"Add Override"},labels:{externalInvoiceNumber:"External Invoice #",paymentProfile:"Payment Profile",actualCharges:"Actual Charges",insurance:"National Insurance",hmoCom:"HMO/COM",paymentsDeposits:"Payments/Deposits",pricingPanelOverrides:"Pricing profile overrides",pricingProfile:"Pricing Profile",discountAmount:"Discount Amount",discountPercentage:"Discount Percentage"}},print:{invoice:{labels:{patientName:"NAME OF PATIENT:",patientId:"PATIENT #:",patientAge:"AGE:",patientAddress:"ADDRESS:",dateAdmitted:"ADMITTED:",dateDischarged:"DISCHARGE:",dischargeNotes:"Discharge Notes:",remarks:"Remarks:",billedBy:"Billed by:",billedDate:"Bill Date:",spacer:"__________________________________________"},messages:{whereConducted:"were deducted during my confinement"},titles:{patientMember:"Patient-Member",relContact:"Relationship/Contact no.",patients:"PATIENT'S",billingStatement:"BILLING STATEMENT"}}},procedures:{titles:{addChargeItem:"Add Charge Item",deleteChargeItem:"Delete Charge Item",editChargeItem:"Edit Charge Item",medicationUsed:"Medication Used",deleteMedicationUsed:"Delete Medication Used",addMedicationUsed:"Add Medication Used",editMedicationUsed:"Edit Medication Used",edit:"Edit Procedure",saved:"Procedure Saved",new:"New Procedure"},labels:{medicationUsed:"Medication Used"},messages:{deleteMedication:"Are you sure you want to delete this medication?",delete:"Are you sure you wish to delete this procedure?",saved:"The procedure record has been saved."},buttons:{addMedication:"Add Medication"}},components:{chargesByTypeTab:{charges:"charges"},customFormManager:{buttons:{addForm:"Add Form"}},sortableColumn:{labels:{selectAll:"(Select All)"}},dateTimePicker:{amHour:"{{hour}} AM",midnight:"Midnight",noon:"Noon",pmHour:"{{hour}} PM"},takePhoto:{how:"How Do You Want To Add A Photo?",takePhoto:"Take photo",uploadPhoto:"Upload Photo",uploadFile:"Upload File",camera:"Camera",photo:"photo",preview:"preview"},quantityConv:{unit:"Unit",conversion:"What does 1 {{name}} contain?"},quantityCalc:{result:"{{targetUnit}} total: {{calculated}}"},patientOrders:{buttons:{newImaging:"New Imaging",newLab:"New Lab",newMedication:"New Medication"},labels:{imagingOrderType:"Imaging",labOrderType:"Lab",medicationOrderType:"Medication",orderType:"Order Type"}},priceList:{charges:"{{pricingType}} charges"},operativeProcedures:{buttons:{addProcedure:"Add Procedure"},labels:{procedure:"Procedure"},titles:{procedures:"Procedures"}}},customForms:{buttons:{addForm:"Add Form"},labels:{formToAdd:"Form To Add"},titles:{addCustomForm:"Add Custom Form"}},diagnosis:{labels:{activeDiagnosis:"Active Diagnosis",date:"Date",diagnosis:"Diagnosis",secondaryDiagnosis:"Secondary Diagnosis"},titles:{addDiagnosis:"Add Diagnosis",editDiagnosis:"Edit Diagnosis"}},allergies:{buttons:{addAllergy:"Add Allergy"},titles:{addAllergy:"Add Allergy",editAllergy:"Edit Allergy"},labels:{allergyName:"Name",patientAllergy:"Patient Allergies"}},operativePlan:{buttons:{completePlan:"Complete Plan"},labels:{additionalNotes:"Additional Notes",admissionInstructions:"Instructions Upon Admission",caseComplexity:"Case Complexity",completedStatus:"Completed",droppedStatus:"Dropped",operationDescription:"Operation Description",plannedStatus:"Planned",status:"Status",surgeon:"Surgeon",surgeryDate:"Surgery Date"},messages:{planSaved:"The operative plan has been saved.",planCompleted:"The operative plan has been completed. You will now be directed to the operation report."},titles:{editTitle:"Edit Operative Plan",newTitle:"New Operative Plan",planCompleted:"Plan Completed",planSaved:"Plan Saved"}},operationReport:{labels:{additionalNotes:"Additional Notes",assistant:"Assistant",caseComplexity:"Case Complexity",operationDescription:"Operation Description",preOpPrimaryDiagnosis:"Pre-op Primary Diagnosis",preOpSecondaryDiagnosis:"Pre-op Secondary Diagnosis",surgeon:"Surgeon",surgeryDate:"Surgery Date"},messages:{reportSaved:"The operation report has been saved."},titles:{editTitle:"Edit Operation Report",newTitle:"New Operation Report",reportSaved:"Report Saved"}}}}),define("hospitalrun/locales/es-CO/translations",["exports"],function(e){e.default={dashboard:{title:"Que deseas hacer?"},navigation:{imaging:"Radiografia",inventory:"Inventario",patients:"Pacientes",appointments:"Citas",medication:"Recetas medicas",labs:"Laboratorio",billing:"Facturas", -administration:"Administracion",subnav:{requests:"Pedidos",items:"Items",completed:"Completado",newRequest:"New pedido",inventoryReceived:"Inventario recibido",reports:"Reportes",patientListing:"Lista de pacientes",newPatient:"Nuevo paciente",thisWeek:"Esta semana",today:"Hoy",search:"Buscar",addAppointment:"Nueva cita",dispense:"Dispense",returnMedication:"Devolver medicamento",invoices:"Facturas",newInvoice:"Nueva factura",prices:"Precios",priceProfiles:"Perfil de precios",lookupLists:"Lista de busuedas",addressFields:"Campos de dirección",loadDb:"Cargar base de datos",users:"Usuarios",newUser:"Nuevo usuario",userRoles:"Roles"},actions:{logout:"Salir",login:"Ingresar"},about:"Información de HospitalRun"},user:{plusNewUser:"+ nuevo usuario",usersPageTile:"Listado de usuarios"},admin:{addressOptions:"Opciones de direcciones",lookupLists:"Lista de busqueda",loadDb:"Cargar Base de datos",userRoles:"Roles",users:"Usuarios",address:{address1Label:"Texto direccion 1",address2Label:"Texto direccion 2",address3Label:"Texto direccion 3",address4Label:"Texto direccion 4",include1Label:"Incluir 1",include2Label:"Incluir 2",include3Label:"Incluir 3",include4Label:"Incluir 4",titles:{optionsSaved:"Opciones guardadas"},messages:{addressSaved:"las opciones de dirección han sido guardadas"},newTitle:"Opciones de dirección",editTitle:"Opciones de dirección",addressLabel:"Direcciones"},loaddb:{progressMessage:"Por favor espere mientras la base de datos es cargada.",progressTitle:"Cargando ase de datos",displayAlertTitle:"Seleccione un archivo para cargar",displayAlertMessage:"Por favor seleccione un archivo para ser cargado.",errorDisplayAlertTitle:"Error cargando",errorDisplayAlertMessage:"La base de datos no fue cargada el error fue: {{error}}",editTitle:"Cargar bd"},lookup:{alertImportListTitle:"Seleccione un archivo para importar",alertImportListMessage:"Por favor seleccione un archivo para importar.",alertImportListSaveTitle:"Lista importada",alertImportListSaveMessage:"Lista de busqueda importada.",alertImportListUpdateTitle:"Lista salvada",alertImportListUpdateMessage:"La lista de busqueda ha sido salvada.",pageTitle:"Listas de busqueda",edit:{template:{addTitle:"Adicionar valor",editTitle:"Editar valor",updateButtonTextAdd:"Adicionar",updateButtonTextUpdate:"Actualizar",labelTitle:"Valor"}},anesthesiaTypes:"Tipos de anestesia",anesthesiologists:"Anestesiologo",billingCategories:"Categorias de facturacion",clinicList:"Ubicacion de las clinicas",countryList:"Paises",diagnosisList:"Diagnosticos",cptCodeList:"Codigos CPT",expenseAccountList:"Cuentas de gastos",aisleLocationList:"Ubicacion de inventario de pasillo",warehouseList:"Ubicacciones de inventarios",inventoryTypes:"Tipos de inventarios",imagingPricingTypes:"Tipos de precios de radiografias",labPricingTypes:"Precios de laboratorio",patientStatusList:"Lista de estado de pacientes",physicianList:"Medicos",procedureList:"Procedimientos",procedureLocations:"Ubicacion de los procedimientos",procedurePricingTypes:"Tipos de procedimientos y precios",radiologists:"Radiologo",unitTypes:"Tipos de unidad",vendorList:"Proveedor",visitLocationList:"Lugares de visista",visitTypes:"Tipos de visita",wardPricingTypes:"Tipos de las tarifas"},roles:{capability:{admin:"Administracion",loadDb:"Cargar base de datos",updateConfig:"Actualizar configuracion",appointments:"Citas",addAppointment:"Adicionar cita",billing:"Facturacion",addCharge:"Adicionar cargo (valor)",addPricing:"Adicionar precio",addPricingProfile:"Adicionar perfil de precios",addInvoice:"Adicionar factura",addPayment:"Adicionar pago",deleteInvoice:"Eliminar factura",deletePricing:"Eliminar precio",deletePricingProfile:"Eliminar perfil de precio",editInvoice:"Editar factura",invoices:"Facturas",overrideInvoice:"Sobreescribir factura",pricing:"Precio",patients:"Pacientes",addDiagnosis:"Adicionar diagnostico",addPhoto:"Adicionar foto",addPatient:"Adicionar paciente",addVisit:"Adicionar visita",addVitals:"Adicionar partes vitales",admitPatient:"Admitir paciente",deletePhoto:"Eliminar foto",deletePatient:"Eliminar paciente",deleteAppointment:"Eliminar cita",deleteDiagnosis:"Eliminar diagnostico",deleteProcedure:"Eliminar procedimiento",deleteSocialwork:"Eliminar trabajo social",deleteVitals:"Eliminar organo vital",deleteVisit:"Eliminar visita",dischargePatient:"Descartar paciente",patientReports:"Reportes por paciente",visits:"Visitas",medication:"Medicación",addMedication:"Adicionar medicación",deleteMedication:"Eliminar medicación",fulfillMedication:"Cumplir la medicación",labs:"Laboratorios",addLab:"Adicionar laboratorio",completeLab:"Completar laboratorio",deleteLab:"Eliminar laboratorio",imaging:"Radiografia",addImaging:"Adicionar radiografia",completeImaging:"Completar radiografia",deleteImaging:"Eliminar radiografia",inventory:"Inventario",addInventoryRequest:"Pedido de inventario",addInventoryItem:"Adicionar elemento al inventario",addInventoryPurchase:"Adicionar compra",adjustInventoryLocation:"Ajustar lugar elemento en el inventario",deleteInventoryItem:"Eliminar elemento del inventario",deleteInventoryPurchase:"Eliminar compra del inventario",fulfillInventory:"Cumplimiento de inventario",defineUserRoles:"Roles de usuario"},messages:{roleSaved:"El {{roleName}} rol ha sido salvado."},titles:{roleSaved:"Role salvado"}}},labels:{cptcode:"Codigo CPT",loading:"Cargando",name:"Nombre",patient:"Paciente",quantity:"Cantidada",requestedOn:"Pedido On",date:"Fecha",dateOfBirth:"Fecha de nacimiento",dateOfBirthShort:"FDN",dateRequested:"Fecha de pedido",dateCompleted:"Fecha completada",description:"Descripción",requestedBy:"Pedido por|",fulfill:"Cumplomiento",fulfillRequest:"Pedido de cumplimiento",fulfillRequestNow:"Pedido de cumplimiento ahora",actions:"Acciones",action:"Accion",notes:"Notas",edit:"Editar",imageOrders:"Ordenes de radiografias",labOrders:"Ordenes de laboratorio",imagingType:"Tipo de radiografia",result:"Resultado",results:"Resultados",visit:"Visita",requests:"Pedido",completed:"Completado",id:"Id",on:"on",type:"Tipo",sex:"Genero",age:"Edad",username:"Nombre de usuario",email:"Email",role:"Rol",delete:"Eliminar",userCanAddNewValue:"Los usuarios pueden agregar nuevos valores",value:"Valor",lookupType:"Tipo de busqueda",importFile:"Importar archivo",fileLoadSuccessful:"Archivo cargado exitosamente",fileToLoad:"Archivo cargado",startTime:"Hora de inicio",startDate:"Fecha de inicio",endTime:"Hora de finalización",endDate:"Fecha final",docRead:"Leer documento",docWritten:"Documento escrito",displayName:"Nombre para mostrar",password:"Contraseña",editUser:"Editar usuario",newUser:"Nuevo usuario",deleteUser:"Eliminar usuario",medication:"Medicación",status:"Estado",addNewOutpatientVisit:"--Nueva visita a paciente externo--",prescription:"Receta medica",prescriptionDate:"Fecha de la receta medica",billTo:"Facturar a",pullFrom:"Traer de",fulfilled:"Cumplido",deleteRequest:"Eliminar pedido",location:"Ubicacion",provider:"Proveedor",with:"con",allDay:"Todo el dia",physician:"Médico",assisting:"Asistencia",anesthesia:"Anestesia",procedures:"Procedimiento"},messages:{noItemsFound:"Elementos no encontrados.",noHistoryAvailable:"Historia no disponible.",createNewRecord:"Crear un nuevo registro?",createNewUser:"Crear un nuevo usuario?",noUsersFound:"Ningun usuario encontrado.",areYouSureDelete:"Estas seguro de eliminar este usuario {{user}}?",userHasBeenSaved:"El usuario ha sido salvado.",userSaved:"Usuario salvado",onBehalfOf:"a nombre de",newPatientHasToBeCreated:"Un nuevo paciente debe ser creado...Por favor espere..",noNotesAvailable:"No hay notas clínicas adicionales están disponibles para esta visita.",sorry:"Lo sentimos, un error ha ocurrido...",forAuthorizedPersons:"Este informe es sólo para personas autorizadas."},alerts:{pleaseWait:"Por favor espere"},buttons:{complete:"Completado",cancel:"Cancelar",close:"Cerrar",returnButton:"Regresar",barcode:"Codigo de barras",add:"Adicionar",update:"Actualizar",ok:"Ok",fulfill:"Cumplimiento",remove:"Remover",delete:"Eliminar",newUser:"Nuevo usuario",addValue:"Adicionar valor",newNote:"Nueva nota",import:"Importar",loadFile:"Cargar archivo",newRequest:"Nueva solicitud",allRequests:"Todas las solicitudes",dispense:"Repartir",newItem:"+ nuevo elemento",newRequestPlus:"+ nuevo pedido",addVisit:"Adicionar visita",search:"Buscar"},login:{messages:{signIn:"por favor ingrese",error:"Nombre de usuario o clave incorrectos."},labels:{password:"Clave",username:"Nombre de usuario",signIn:"Ingresar"}},inventory:{edit:{cost:"Costo por unidad:",delivered:"Enviado A:",location:"Cambio de ubicación:",prescription:"Recetado por:",pulled:"Pulled From:",quantity:"Quantity at Completion:",reason:"Razón:",returned:"Regresado al paciente:",transferredFrom:"Transferido a:",transferredTo:"Transferido a:"},labels:{action:"Acción",add:"Adicionar",adjust:"Adjustar",adjustmentDate:"Fecha de ajuste",adjustmentFor:"Ajustado para",adjustmentType:"Tipo de ajuste",aisle:"Pasillo",aisleLocation:"Ubicación pasillo",allInventory:"Todo el inventario",billTo:"Facturao a",consumePurchases:"Consume Purchases",consumptionRate:"Tasa de consumo",cost:"Costo",costPerUnit:"Costo por Unidad",crossReference:"Referencia cruzada",currentQuantity:"Cantidad actual",dateCompleted:"Fecha completado",dateEffective:"Gecha efectiva",dateEnd:"Fecha final",dateStart:"Fecha inicial",dateReceived:"Fecha recibido",dateTransferred:"Fecha transferencia",daysLeft:"Dias restantes",deliveryAisle:"Enviado a pasillo",deliveryLocation:"Ubicación del envio",distributionUnit:"Unidad de distribución",deleteItem:"Eliminar elemento",details:"Detalles",editItem:"Editar elemento",expense:"Gastos a",expirationDate:"Fecha de vencimiento",fulfillRequest:"Pedido de cumplimiento",fulfillRequestNow:"Pedido de incumplimiento para hoy",gift:"Regalo en especie",giftUsage:"Uso del regalo en especie",giftInKindNo:"N",giftInKindYes:"Y",inventoryConsumed:"Inventario consumido",inventoryItem:"Elemento del inventario",inventoryObsolence:"Obsolescencia de inventario",invoiceItems:"Articulos de factura",invoiceLineItem:"Elemento de la factura linea",invoiceNumber:"Factura numero",item:"Elemento",items:"Elementos",itemNumber:"Numero de elemento",location:"Ubicación",locations:"Ubicaciones",name:"Nombre",markAsConsumed:"Marcar como consumido",newItem:"Nuevo elemento",originalQuantity:"Cantidad original",print:"Imprimir",printBarcode:"Imprimir codigo de barras",printer:"Impresora",pullFrom:"Traido de",purchases:"Compras",purchaseCost:"Costo de compra",purchaseInfo:"Informacion de la compra",quantity:"Cantidad ({{unit}})",quantityAvailable:"Cantidad disponible",quantityOnHand:"Cantidad a la mano",quantityRequested:"Cantidad pedida",rank:"Ranking",reason:"Razón",remove:"Remover",reorderPoint:"Reordenar punto",requestedItems:"Elementos solicitados",salePricePerUnit:"Costo de venta por unidad",save:"Guardar",serialNumber:"Serial/Numero de lote",total:"Total",totalCost:"Costo total",totalReceived:"Total Recivido: {{total}}",transaction:"Transaccion",transactions:"Transacciones",transfer:"Translados",transferFrom:"Translado desde",transferTo:"Translado a ubicación",transferToAisle:"Translado a pasillo",unit:"Unidad",unitCost:"Unidad Costo",vendor:"Proveedor",vendorItemNumber:"Proveedor numero de elemento",xref:"XRef"},messages:{adjust:"Por favor ajust las cantidades en la ubicación adecuada(s) la diferencia de la cuenta es {{difference}}.",createRequest:"Crear un nuevo pedido?",delete:"Estas seguro de eliminar {{name}}?",itemNotFound:"El elemento del inventario {{item}} no se pudo encontrar.
Si desea crear un nuevo elemento, Ingrese la información abajo.
De lo contrario opria cancelar para volver.",loading:"Cargando transacciones ...",purchaseSaved:"La compra de inventario ha sido salvada.",noRequests:"No se encontraron pedidos.",noItems:"No se encontraron elementos.",quantity:"La cantidad total ({{quantity}}) no encaja con la cantidad total en las ubicaciones ({{locationQuantity}}).",removeItem:"Esta seguro de eliminar este elemento de la factura?",removeItemRequest:"Seguro que quiere eliminar este elemento del pedido?",requestFulfilled:"El pedido de inventario ha sido procesado.",requestUpdated:"El pedido de inventario ha sido actualizado.",warning:"Valide los campos requeridos (marcados con *) corrija los errores antes de adicionar."},reports:{rows:{adjustments:"Ajustes",adjustmentsTotal:"Ajustes totales",balanceBegin:"Balance inicial",balanceEnd:"Balance Final",category:"Categoria",consumed:"Consumado",consumedGik:"GiK Consumido",consumedGikTotal:"Total GiK Consumido",consumedPuchases:"Total de lo comprado consumido",consumedPurchasesTotal:"Total de lo comprado consumido",consumedTotal:"Total consumido",errInFinSum:"Error en _generateFinancialSummaryReport: ",errInFindPur:"Error en _findInventoryItemsByPurchase: ",errInFindReq:"Error en _findInventoryItemsByRequest: ",expensesFor:"Gatos para: ",noAccount:"(No Cuenta)",subtotal:"Subtotal: ",subtotalFor:"Subtotal para {{category}} - {{account}}: ",total:"Total: ",totalFor:"Total para {{var}}: ",totalPurchases:"Compras Totales",transfer1:"{{quantity}} de {{location}}",trasnfer2:"De: {{source}} A: {{target}}"},adjustment:"Ajuste detallado",daysSupply:"Dias de inventario restante",expenseDetail:"Gastos detallados",expenseSum:"Resumen de gastos",expiration:"Fecha de expiracion",export:"Exportar reporte",fields:"Campos a incluir",finance:"Resumen de finanzas",generate:"Generar reporte",invLocation:"Inventario por ubicacion",invValuation:"Inventario por valoracion",purchaseDetail:"Compras detalladas",purchaseSum:"Resumen de compras",reportType:"Tipo de reporte",stockTransferDetail:"Detalle de traslado de stock",stockTransferSum:"Resumen traslado de stock",stockUsageDetail:"Detalle de uso de stock",stockUsageSum:"Resumen uso de stock"},titles:{addPurchase:"Adicionar compra",addRequest:"Nuevo pedido",adjustment:"Ajuste",editPurchase:"Editar compra",editRequest:"Editar pedido",inventoryItem:"Nuevo elemento de inventario",inventoryReport:"Reporte de inventario",purchaseSaved:"Compras de inventario guardadas",quickAddTitle:"Nuevo elemento de inventario",removeItem:"Remover elemento",requestFulfilled:"Pedido cumplido",requestUpdated:"Pedido actualizado",transfer:"Trasladar elementos",warning:"Peligro!!!!!"}},imaging:{pageTitle:"Pedido de radriografia",sectionTitle:"Radiografias",buttons:{newButton:"+ new radiografia"},labels:{radiologist:"Radiologo",addNewVisit:"--Adicionar nueva visita--"},messages:{noCompleted:"No de items encontrados."},titles:{completedImaging:"Radiografia completada",editTitle:"Pedido de edicion de radiografia",newTitle:"Nuevo pedido de radiografia"},alerts:{completedTitle:"Pedido de radiografia completado",completedMessage:"El pedido de radiografia ha sido completado.",savedTitle:"Pedido de radiografia salvado",savedMessage:"El pedido de radiografia ha sido guardado."}},medication:{pageTitle:"Pedido de medicación",sectionTitle:"Medication",returnMedication:"Retorno de medicación",buttons:{dispenseMedication:"dispensar medicación",newButton:"+ nuevo pedido",returnMedication:"debolver medicacion"},titles:{completedMedication:"Medicacion completada",editMedicationRequest:"Editar pedido de medicacion",newMedicationRequest:"Nuevo pedido de medicacion"},messages:{createNew:"Crear un nuevo pedido de medicacion?",confirmDeletion:"Estas seguro de eliminar este pedido de medicación?"},labels:{refills:"Recargas",quantityRequested:"Cantidad solicitada",quantityDispensed:"Cantidad dispensada",quantityDistributed:"Cantidad distribuida",quantityToReturn:"Cantidad a devolver",returnLocation:"Retornar a ubicación",returnAisle:"Devolve a pasillo",returnReason:"Razon por la que se devuelve/Nota",adjustmentDate:"Fecha de ajuste",creditToAccount:"Credito a cuenta"},alerts:{returnedTitle:"Medicacion devuelta",returnedMessage:"La medicacion ha sido marcada para devolver.",savedTitle:"Pedido de medicacion guardado",savedMessage:"La elemento de medicación ha sido guardado.",fulfilledTitle:"Pedido de medicación cumplido"}},appointments:{currentScreenTitle:"Listado de citas",editTitle:"Editar cita",newTitle:"Nueva cita",sectionTitle:"Citas",thisWeek:"Citas esta semana",missed:"Citas perdidas",searchTitle:"Buscar citas",todayTitle:"Citas para hoy",messages:{deleteAppointmentMessage:"Esta seguro de eliminar esta cita?",endTimeLaterThanStart:"Seleccione una hora de finalizacion despues de la de inicio."},buttons:{newButton:"+ nueva cita"}},visits:{edit:{buttons:{newAppointment:"Nuevas citas",addDiagnosis:"Adicionar diagnostico",newProcedure:"Nuevo procedimiento",newLab:"New laboratorio",newMedication:"Nueva mediicación",newImaging:"Nueva radiografia"},labels:{diagnosis:"Diagnostico",procedure:"Procedimiento",authoredBy:"Escrito por",labs:"Laboratorios",imaging:"Radiografias",visitInformation:"Informacion de visita"}}},labs:{sectionTitle:"Laboratorios",requestsTitle:"Pedido de laboratorio",editTitle:"Editar pedido de laboratorio",newTitle:"Nuevo pedido de laboratorio",deleteTitle:"Eliminar pedido",completedTitle:"Completar laboratorio",labels:{labType:"Tipo de laboratorio",addNewVisit:"--Adicionar nueva visita--"},messages:{noItemsFound:"No boratorios encontrados.",createNewRecord:"Crear un registro?",confirmDeletion:"Esta seguro de eliminar esta solicitud de laboratorio?",noCompleted:"No elementos completados encontrados."},buttons:{newButton:"+ nuevo laboratorio"},alerts:{requestCompletedTitle:"Pedido de laboratorio competado",requestCompletedMessage:"El pedido de laboratorio ha sido completado.",requestSavedTitle:"Silicitud de laboratorio guardado",requestSavedMessage:"El pedido de laboratorio ha sido guardado."}},common:{actions:"Acciones"},patients:{notes:{onBehalfOfLabel:"A nombre de",onBehalfOfCopy:"a nombre de",pleaseSelectAVisit:"Por favor seleccione una visista",noteLabel:"Nota"}}}}),define("hospitalrun/locales/es/translations",["exports"],function(e){e.default={dashboard:{title:"Que deseas hacer?"},navigation:{imaging:"Radiografia",inventory:"Inventario",patients:"Pacientes",appointments:"Citas",medication:"Recetas medicas",labs:"Laboratorio",billing:"Facturas",administration:"Administracion",subnav:{requests:"Pedidos",items:"Items",completed:"Completado",newRequest:"New pedido",inventoryReceived:"Inventario recibido",reports:"Reportes",patientListing:"Lista de pacientes",newPatient:"Nuevo paciente",thisWeek:"Esta semana",today:"Hoy",search:"Buscar",addAppointment:"Nueva cita",dispense:"Dispense",returnMedication:"Devolver medicamento",invoices:"Facturas",newInvoice:"Nueva factura",prices:"Precios",priceProfiles:"Perfil de precios",lookupLists:"Lista de busuedas",addressFields:"Campos de dirección",loadDb:"Cargar base de datos",users:"Usuarios",newUser:"Nuevo usuario",userRoles:"Roles"},actions:{logout:"Salir",login:"Ingresar"},about:"Información de HospitalRun"},user:{plusNewUser:"+ nuevo usuario",usersPageTile:"Listado de usuarios"},admin:{addressOptions:"Opciones de direcciones",lookupLists:"Lista de busqueda",loadDb:"Cargar Base de datos",userRoles:"Roles",users:"Usuarios",address:{address1Label:"Texto direccion 1",address2Label:"Texto direccion 2",address3Label:"Texto direccion 3",address4Label:"Texto direccion 4",include1Label:"Incluir 1",include2Label:"Incluir 2",include3Label:"Incluir 3",include4Label:"Incluir 4",titles:{optionsSaved:"Opciones guardadas"},messages:{addressSaved:"las opciones de dirección han sido guardadas"},newTitle:"Opciones de dirección",editTitle:"Opciones de dirección",addressLabel:"Direcciones"},loaddb:{progressMessage:"Por favor espere mientras la base de datos es cargada.",progressTitle:"Cargando ase de datos",displayAlertTitle:"Seleccione un archivo para cargar",displayAlertMessage:"Por favor seleccione un archivo para ser cargado.",errorDisplayAlertTitle:"Error cargando",errorDisplayAlertMessage:"La base de datos no fue cargada el error fue: {{error}}",editTitle:"Cargar bd"},lookup:{alertImportListTitle:"Seleccione un archivo para importar",alertImportListMessage:"Por favor seleccione un archivo para importar.",alertImportListSaveTitle:"Lista importada",alertImportListSaveMessage:"Lista de busqueda importada.",alertImportListUpdateTitle:"Lista salvada",alertImportListUpdateMessage:"La lista de busqueda ha sido salvada.",pageTitle:"Listas de busqueda",edit:{template:{addTitle:"Adicionar valor",editTitle:"Editar valor",updateButtonTextAdd:"Adicionar",updateButtonTextUpdate:"Actualizar",labelTitle:"Valor"}},anesthesiaTypes:"Tipos de anestesia",anesthesiologists:"Anestesiologo",billingCategories:"Categorias de facturacion",clinicList:"Ubicacion de las clinicas",countryList:"Paises",diagnosisList:"Diagnosticos",cptCodeList:"Codigos CPT",expenseAccountList:"Cuentas de gastos",aisleLocationList:"Ubicacion de inventario de pasillo",warehouseList:"Ubicacciones de inventarios",inventoryTypes:"Tipos de inventarios",imagingPricingTypes:"Tipos de precios de radiografias",labPricingTypes:"Precios de laboratorio",patientStatusList:"Lista de estado de pacientes",physicianList:"Medicos",procedureList:"Procedimientos",procedureLocations:"Ubicacion de los procedimientos",procedurePricingTypes:"Tipos de procedimientos y precios",radiologists:"Radiologo",unitTypes:"Tipos de unidad",vendorList:"Proveedor",visitLocationList:"Lugares de visista",visitTypes:"Tipos de visita",wardPricingTypes:"Tipos de las tarifas"},roles:{capability:{admin:"Administracion",loadDb:"Cargar base de datos",updateConfig:"Actualizar configuracion",appointments:"Citas",addAppointment:"Adicionar cita",billing:"Facturacion",addCharge:"Adicionar cargo (valor)",addPricing:"Adicionar precio",addPricingProfile:"Adicionar perfil de precios",addInvoice:"Adicionar factura",addPayment:"Adicionar pago",deleteInvoice:"Eliminar factura",deletePricing:"Eliminar precio",deletePricingProfile:"Eliminar perfil de precio",editInvoice:"Editar factura",invoices:"Facturas",overrideInvoice:"Sobreescribir factura",pricing:"Precio",patients:"Pacientes",addDiagnosis:"Adicionar diagnostico",addPhoto:"Adicionar foto",addPatient:"Adicionar paciente",addVisit:"Adicionar visita",addVitals:"Adicionar partes vitales",admitPatient:"Admitir paciente",deletePhoto:"Eliminar foto",deletePatient:"Eliminar paciente",deleteAppointment:"Eliminar cita",deleteDiagnosis:"Eliminar diagnostico",deleteProcedure:"Eliminar procedimiento",deleteSocialwork:"Eliminar trabajo social",deleteVitals:"Eliminar organo vital",deleteVisit:"Eliminar visita",dischargePatient:"Descartar paciente",patientReports:"Reportes por paciente",visits:"Visitas",medication:"Medicación",addMedication:"Adicionar medicación",deleteMedication:"Eliminar medicación",fulfillMedication:"Cumplir la medicación",labs:"Laboratorios",addLab:"Adicionar laboratorio",completeLab:"Completar laboratorio",deleteLab:"Eliminar laboratorio",imaging:"Radiografia",addImaging:"Adicionar radiografia",completeImaging:"Completar radiografia",deleteImaging:"Eliminar radiografia",inventory:"Inventario",addInventoryRequest:"Pedido de inventario",addInventoryItem:"Adicionar elemento al inventario",addInventoryPurchase:"Adicionar compra",adjustInventoryLocation:"Ajustar lugar elemento en el inventario",deleteInventoryItem:"Eliminar elemento del inventario",deleteInventoryPurchase:"Eliminar compra del inventario",fulfillInventory:"Cumplimiento de inventario",defineUserRoles:"Roles de usuario"},messages:{roleSaved:"El {{roleName}} rol ha sido salvado."},titles:{roleSaved:"Role salvado"}}},labels:{cptcode:"Codigo CPT",loading:"Cargando",name:"Nombre",patient:"Paciente",quantity:"Cantidada",requestedOn:"Pedido On",date:"Fecha",dateOfBirth:"Fecha de nacimiento",dateOfBirthShort:"FDN",dateRequested:"Fecha de pedido",dateCompleted:"Fecha completada",description:"Descripción",requestedBy:"Pedido por|",fulfill:"Cumplomiento",fulfillRequest:"Pedido de cumplimiento",fulfillRequestNow:"Pedido de cumplimiento ahora",actions:"Acciones",action:"Accion",notes:"Notas",edit:"Editar",imageOrders:"Ordenes de radiografias",labOrders:"Ordenes de laboratorio",imagingType:"Tipo de radiografia",result:"Resultado",results:"Resultados",visit:"Visita",requests:"Pedido",completed:"Completado",id:"Id",on:"on",type:"Tipo",sex:"Genero",age:"Edad",username:"Nombre de usuario",email:"Email",role:"Rol",delete:"Eliminar",userCanAddNewValue:"Los usuarios pueden agregar nuevos valores",value:"Valor",lookupType:"Tipo de busqueda",importFile:"Importar archivo",fileLoadSuccessful:"Archivo cargado exitosamente",fileToLoad:"Archivo cargado",startTime:"Hora de inicio",startDate:"Fecha de inicio",endTime:"Hora de finalización",endDate:"Fecha final",docRead:"Leer documento",docWritten:"Documento escrito",displayName:"Nombre para mostrar",password:"Contraseña",editUser:"Editar usuario",newUser:"Nuevo usuario",deleteUser:"Eliminar usuario",medication:"Medicación",status:"Estado",addNewOutpatientVisit:"--Nueva visita a paciente externo--",prescription:"Receta medica",prescriptionDate:"Fecha de la receta medica",billTo:"Facturar a",pullFrom:"Traer de",fulfilled:"Cumplido",deleteRequest:"Eliminar pedido",location:"Ubicacion",provider:"Proveedor",with:"con",allDay:"Todo el dia",physician:"Médico",assisting:"Asistencia",anesthesia:"Anestesia",procedures:"Procedimiento"},messages:{noItemsFound:"Elementos no encontrados.",noHistoryAvailable:"Historia no disponible.",createNewRecord:"Crear un nuevo registro?",createNewUser:"Crear un nuevo usuario?",noUsersFound:"Ningun usuario encontrado.",areYouSureDelete:"Estas seguro de eliminar este usuario {{user}}?",userHasBeenSaved:"El usuario ha sido salvado.",userSaved:"Usuario salvado",onBehalfOf:"a nombre de",newPatientHasToBeCreated:"Un nuevo paciente debe ser creado...Por favor espere..",noNotesAvailable:"No hay notas clínicas adicionales están disponibles para esta visita.",sorry:"Lo sentimos, un error ha ocurrido...",forAuthorizedPersons:"Este informe es sólo para personas autorizadas."},alerts:{pleaseWait:"Por favor espere"},buttons:{complete:"Completado",cancel:"Cancelar",close:"Cerrar",returnButton:"Regresar",barcode:"Codigo de barras",add:"Adicionar",update:"Actualizar",ok:"Ok",fulfill:"Cumplimiento",remove:"Remover",delete:"Eliminar",newUser:"Nuevo usuario",addValue:"Adicionar valor",newNote:"Nueva nota",import:"Importar",loadFile:"Cargar archivo",newRequest:"Nueva solicitud",allRequests:"Todas las solicitudes",dispense:"Repartir",newItem:"+ nuevo elemento",newRequestPlus:"+ nuevo pedido",addVisit:"Adicionar visita",search:"Buscar"},login:{messages:{signIn:"por favor ingrese",error:"Nombre de usuario o clave incorrectos."},labels:{password:"Clave",username:"Nombre de usuario",signIn:"Ingresar"}},inventory:{edit:{cost:"Costo por unidad:",delivered:"Enviado A:",location:"Cambio de ubicación:",prescription:"Recetado por:",pulled:"Pulled From:",quantity:"Quantity at Completion:",reason:"Razón:",returned:"Regresado al paciente:",transferredFrom:"Transferido a:",transferredTo:"Transferido a:"},labels:{action:"Acción",add:"Adicionar",adjust:"Adjustar",adjustmentDate:"Fecha de ajuste",adjustmentFor:"Ajustado para",adjustmentType:"Tipo de ajuste",aisle:"Pasillo",aisleLocation:"Ubicación pasillo",allInventory:"Todo el inventario",billTo:"Facturao a",consumePurchases:"Consume Purchases",consumptionRate:"Tasa de consumo",cost:"Costo",costPerUnit:"Costo por Unidad",crossReference:"Referencia cruzada",currentQuantity:"Cantidad actual",dateCompleted:"Fecha completado",dateEffective:"Gecha efectiva",dateEnd:"Fecha final",dateStart:"Fecha inicial",dateReceived:"Fecha recibido",dateTranferred:"Fecha transferencia",daysLeft:"Dias restantes",deliveryAisle:"Enviado a pasillo",deliveryLocation:"Ubicación del envio",distributionUnit:"Unidad de distribución",deleteItem:"Eliminar elemento",details:"Detalles",editItem:"Editar elemento",expense:"Gastos a",expirationDate:"Fecha de vencimiento",fulfillRequest:"Pedido de cumplimiento",fulfillRequestNow:"Pedido de incumplimiento para hoy",gift:"Regalo en especie",giftUsage:"Uso del regalo en especie",giftInKindNo:"N",giftInKindYes:"Y",inventoryConsumed:"Inventario consumido",inventoryItem:"Elemento del inventario",inventoryObsolence:"Obsolescencia de inventario",invoiceItems:"Articulos de factura",invoiceLineItem:"Elemento de la factura linea",invoiceNumber:"Factura numero",item:"Elemento",items:"Elementos",itemNumber:"Numero de elemento",location:"Ubicación",locations:"Ubicaciones",name:"Nombre",markAsConsumed:"Marcar como consumido",newItem:"Nuevo elemento",originalQuantity:"Cantidad original",print:"Imprimir",printBarcode:"Imprimir codigo de barras",printer:"Impresora",pullFrom:"Traido de",purchases:"Compras",purchaseCost:"Costo de compra",purchaseInfo:"Informacion de la compra",quantity:"Cantidad ({{unit}})",quantityAvailable:"Cantidad disponible",quantityOnHand:"Cantidad a la mano",quantityRequested:"Cantidad pedida",rank:"Ranking",reason:"Razón",remove:"Remover",reorderPoint:"Reordenar punto",requestedItems:"Elementos solicitados",salePricePerUnit:"Costo de venta por unidad",save:"Guardar",serialNumber:"Serial/Numero de lote",total:"Total",totalCost:"Costo total",totalReceived:"Total Recivido: {{total}}",transaction:"Transaccion",transactions:"Transacciones",transfer:"Translados",transferFrom:"Translado desde",transferTo:"Translado a ubicación",transferToAisle:"Translado a pasillo",unit:"Unidad",unitCost:"Unidad Costo",vendor:"Proveedor",vendorItemNumber:"Proveedor numero de elemento",xref:"XRef"},messages:{adjust:"Por favor ajust las cantidades en la ubicación adecuada(s) la diferencia de la cuenta es {{difference}}.",createRequest:"Crear un nuevo pedido?",delete:"Estas seguro de eliminar {{name}}?",itemNotFound:"El elemento del inventario {{item}} no se pudo encontrar.
Si desea crear un nuevo elemento, Ingrese la información abajo.
De lo contrario opria cancelar para volver.",loading:"Cargando transacciones ...",purchaseSaved:"La compra de inventario ha sido salvada.",noRequests:"No se encontraron pedidos.",noItems:"No se encontraron elementos.",quantity:"La cantidad total ({{quantity}}) no encaja con la cantidad total en las ubicaciones ({{locationQuantity}}).",removeItem:"Esta seguro de eliminar este elemento de la factura?",removeItemRequest:"Seguro que quiere eliminar este elemento del pedido?",requestFulfilled:"El pedido de inventario ha sido procesado.",requestUpdated:"El pedido de inventario ha sido actualizado.",warning:"Valide los campos requeridos (marcados con *) corrija los errores antes de adicionar."},reports:{rows:{adjustments:"Ajustes",adjustmentsTotal:"Ajustes totales",balanceBegin:"Balance inicial",balanceEnd:"Balance Final",category:"Categoria",consumed:"Consumado",consumedGik:"GiK Consumido",consumedGikTotal:"Total GiK Consumido",consumedPuchases:"Total de lo comprado consumido",consumedPurchasesTotal:"Total de lo comprado consumido",consumedTotal:"Total consumido",errInFinSum:"Error en _generateFinancialSummaryReport: ",errInFindPur:"Error en _findInventoryItemsByPurchase: ",errInFindReq:"Error en _findInventoryItemsByRequest: ",expensesFor:"Gatos para: ",noAccount:"(No Cuenta)",subtotal:"Subtotal: ",subtotalFor:"Subtotal para {{category}} - {{account}}: ",total:"Total: ",totalFor:"Total para {{var}}: ",totalPurchases:"Compras Totales",transfer1:"{{quantity}} de {{location}}",trasnfer2:"De: {{source}} A: {{target}}"},adjustment:"Ajuste detallado",daysSupply:"Dias de inventario restante",expenseDetail:"Gastos detallados",expenseSum:"Resumen de gastos",expiration:"Fecha de expiracion",export:"Exportar reporte",fields:"Campos a incluir",finance:"Resumen de finanzas",generate:"Generar reporte",invLocation:"Inventario por ubicacion",invValuation:"Inventario por valoracion",purchaseDetail:"Compras detalladas",purchaseSum:"Resumen de compras",reportType:"Tipo de reporte",stockTransferDetail:"Detalle de traslado de stock",stockTransferSum:"Resumen traslado de stock",stockUsageDetail:"Detalle de uso de stock",stockUsageSum:"Resumen uso de stock"},titles:{addPurchase:"Adicionar compra", -addRequest:"Nuevo pedido",adjustment:"Ajuste",editPurchase:"Editar compra",editRequest:"Editar pedido",inventoryItem:"Nuevo elemento de inventario",inventoryReport:"Reporte de inventario",purchaseSaved:"Compras de inventario guardadas",quickAddTitle:"Nuevo elemento de inventario",removeItem:"Remover elemento",requestFulfilled:"Pedido cumplido",requestUpdated:"Pedido actualizado",transfer:"Trasladar elementos",warning:"Peligro!!!!!"}},imaging:{pageTitle:"Pedido de radriografia",sectionTitle:"Radiografias",buttons:{newButton:"+ new radiografia"},labels:{radiologist:"Radiologo",addNewVisit:"--Adicionar nueva visita--"},messages:{noCompleted:"No de items encontrados."},titles:{completedImaging:"Radiografia completada",editTitle:"Pedido de edicion de radiografia",newTitle:"Nuevo pedido de radiografia"},alerts:{completedTitle:"Pedido de radiografia completado",completedMessage:"El pedido de radiografia ha sido completado.",savedTitle:"Pedido de radiografia salvado",savedMessage:"El pedido de radiografia ha sido guardado."}},medication:{pageTitle:"Pedido de medicación",sectionTitle:"Medication",returnMedication:"Retorno de medicación",buttons:{dispenseMedication:"dispensar medicación",newButton:"+ nuevo pedido",returnMedication:"debolver medicacion"},titles:{completedMedication:"Medicacion completada",editMedicationRequest:"Editar pedido de medicacion",newMedicationRequest:"Nuevo pedido de medicacion"},messages:{createNew:"Crear un nuevo pedido de medicacion?",confirmDeletion:"Estas seguro de eliminar este pedido de medicación?"},labels:{refills:"Recargas",quantityRequested:"Cantidad solicitada",quantityDispensed:"Cantidad dispensada",quantityDistributed:"Cantidad distribuida",quantityToReturn:"Cantidad a devolver",returnLocation:"Retornar a ubicación",returnAisle:"Devolve a pasillo",returnReason:"Razon por la que se devuelve/Nota",adjustmentDate:"Fecha de ajuste",creditToAccount:"Credito a cuenta"},alerts:{returnedTitle:"Medicacion devuelta",returnedMessage:"La medicacion ha sido marcada para devolver.",savedTitle:"Pedido de medicacion guardado",savedMessage:"La elemento de medicación ha sido guardado.",fulfilledTitle:"Pedido de medicación cumplido"}},appointments:{currentScreenTitle:"Listado de citas",editTitle:"Editar cita",newTitle:"Nueva cita",sectionTitle:"Citas",thisWeek:"Citas esta semana",missed:"Citas perdidas",searchTitle:"Buscar citas",todayTitle:"Citas para hoy",messages:{deleteAppointmentMessage:"Esta seguro de eliminar esta cita?",endTimeLaterThanStart:"Seleccione una hora de finalizacion despues de la de inicio."},buttons:{newButton:"+ nueva cita"}},visits:{edit:{buttons:{newAppointment:"Nuevas citas",addDiagnosis:"Adicionar diagnostico",newProcedure:"Nuevo procedimiento",newLab:"New laboratorio",newMedication:"Nueva mediicación",newImaging:"Nueva radiografia"},labels:{diagnosis:"Diagnostico",procedure:"Procedimiento",authoredBy:"Escrito por",labs:"Laboratorios",imaging:"Radiografias",visitInformation:"Informacion de visita"}}},labs:{sectionTitle:"Laboratorios",requestsTitle:"Pedido de laboratorio",editTitle:"Editar pedido de laboratorio",newTitle:"Nuevo pedido de laboratorio",deleteTitle:"Eliminar pedido",completedTitle:"Completar laboratorio",labels:{labType:"Tipo de laboratorio",addNewVisit:"--Adicionar nueva visita--"},messages:{noItemsFound:"No boratorios encontrados.",createNewRecord:"Crear un registro?",confirmDeletion:"Esta seguro de eliminar esta solicitud de laboratorio?",noCompleted:"No elementos completados encontrados."},buttons:{newButton:"+ nuevo laboratorio"},alerts:{requestCompletedTitle:"Pedido de laboratorio competado",requestCompletedMessage:"El pedido de laboratorio ha sido completado.",requestSavedTitle:"Silicitud de laboratorio guardado",requestSavedMessage:"El pedido de laboratorio ha sido guardado."}},common:{actions:"Acciones"},patients:{notes:{onBehalfOfLabel:"A nombre de",onBehalfOfCopy:"a nombre de",pleaseSelectAVisit:"Por favor seleccione una visista",noteLabel:"Nota"}}}}),define("hospitalrun/locales/fr/translations",["exports"],function(e){e.default={dashboard:{title:"Que voulez-vous faire?"},navigation:{imaging:"Imagerie",inventory:"Inventaire",patients:"Patients",appointments:"Rendez-vous",medication:"Médicament",labs:"Labos",billing:"Facturation",administration:"Administration",subnav:{requests:"Demandes",items:"Articles",completed:"Traité",newRequest:"Nouvelle demande",inventoryReceived:"Inventaire reçu",reports:"Rapports",patientListing:"Liste des patients",newPatient:"Nouveau patient",thisWeek:"Cette semaine",today:"Aujourd'hui",search:"Rechercher",addAppointment:"Ajouter un rendez-vous",dispense:"Dispenser",returnMedication:"Retourner un Médicament",invoices:"Factures",newInvoice:"Nouvelle facture",prices:"Prix",priceProfiles:"Profils de prix",lookupLists:"Listes de référence",addressFields:"Champs d'adresse",loadDb:"Importer une BD",users:"Utilisateurs",newUser:"Nouvel utilisateur",admittedPatients:"patients admis",missed:"Manqué",userRoles:"Rôles de l'utilisateur"},actions:{logout:"Deconnexion",login:"Connexion"},about:"À propos de HospitalRun"},user:{plusNewUser:"+ nouvel utilisateur",usersPageTile:"Liste des Utilisateurs"},admin:{addressOptions:"Options d'adresse",lookupLists:"Listes de référence",loadDb:"Importer une BD",users:"Utilisateurs",address:{address1Label:"Label de l'adresse 1",address2Label:"Label de l'adresse 2",address3Label:"Label de l'adresse 3",address4Label:"Label de l'adresse 4",include1Label:"Label de l'include 1",include2Label:"Label de l'include 2",include3Label:"Label de l'include 3",include4Label:"Label de l'include 4",titles:{optionsSaved:"Options enregistrées"},messages:{addressSaved:"Les options d'adresse ont été enregistrées"},newTitle:"Options d'adresse",editTitle:"Options d'adresse",addressLabel:"Adresse"},loaddb:{progressMessage:"Veuillez patienter durant le chargement de la base de données.",progressTitle:"Chargement de la base de données en cours",displayAlertTitle:"Sélectionner le fichier à télécharger.",displayAlertMessage:"Veuillez sélectionner le fichier à télécharger.",errorDisplayAlertTitle:"Erreur de chargement",errorDisplayAlertMessage:"La base de données ne pouvait pas être importée. L'erreur etait: {{error}}",editTitle:"Importer une BD"},lookup:{alertImportListTitle:"Sélectionner le fichier à importer",alertImportListMessage:"Veuillez sélectionner le fichier à importer.",alertImportListSaveTitle:"Liste importée",alertImportListSaveMessage:"La liste de référence a été importée.",alertImportListUpdateTitle:"Liste enregistrée",alertImportListUpdateMessage:"La liste de référence a été enregistrée.",pageTitle:"Listes de référence",edit:{template:{addTitle:"Ajouter une valeur",editTitle:"Modifier la valeur",updateButtonTextAdd:"Ajouter",updateButtonTextUpdate:"Mettre à jour",labelTitle:"Valeur"}},anesthesiaTypes:"Types d'Anesthésie",anesthesiologists:"Anesthésiologistes",billingCategories:"Catégories de facturation",clinicList:"Emplacements de la clinique",countryList:"Pays",diagnosisList:"Diagnostics",cptCodeList:"Codes CPT",expenseAccountList:"Comptes de dépense",aisleLocationList:"Emplacements de rayon d'inventaire",warehouseList:"Emplacements d'inventaire",inventoryTypes:"Types d'inventaire",imagingPricingTypes:"Types de prix d'imagerie",labPricingTypes:"Types de prix de labo",patientStatusList:"Liste de statut de patient",physicianList:"Médécins",procedureList:"Procédures",procedureLocations:"Emplacements des procédures",procedurePricingTypes:"Types de prix de procédure",radiologists:"Radiologistes",unitTypes:"Types d'unité",vendorList:"Fournisseur",visitLocationList:"Emplacements de visite",visitTypes:"Types de visite",wardPricingTypes:"Types de prix de service"},roles:{capability:{admin:"Administration",loadDb:"Charger la Base de données",updateConfig:"Mettre à jour les Configurations",appointments:"Rendez-vous",addAppointment:"Ajouter un Rendez-vous",billing:"Facturation",addCharge:"Ajouter une charge",addPricing:"Ajouter un Prix",addPricingProfile:"Ajouter le profil de prix",addInvoice:"Ajouter une facture",addPayment:"Ajouter un paiement",deleteInvoice:"Supprimer une facture",deletePricing:"Supprimer un Prix",deletePricingProfile:"Supprimer le profil de prix",editInvoice:"Modifier la facture",invoices:"Factures",overrideInvoice:"Remplacer la facture",pricing:"Tarification",patients:"Patients",addDiagnosis:"Ajouter un diagnostic",addPhoto:"Ajouter une photo",addPatient:"Ajouter un patient",addVisit:"Ajouter une visite",addVitals:"Ajouter les signes vitaux",admitPatient:"Admettre un patient",deletePhoto:"Supprimer une photo",deletePatient:"Supprimer un patient",deleteAppointment:"Supprimer un rendez-vous",deleteDiagnosis:"Supprimer un diagnostic",deleteProcedure:"Supprimer une procédure",deleteSocialwork:"Supprimer un travail social",deleteVitals:"Supprimer des signes vitaux",deleteVisit:"Supprimer une Visite",dischargePatient:"Liberer un patient",patientReports:"Rapports des patients",visits:"Visites",medication:"Médicament",addMedication:"Ajouter un médicament",deleteMedication:"Supprimer un médicament",fulfillMedication:"Traiter une demande de médicaments",labs:"Test Labo",addLab:"Ajouter un test labo",completeLab:"Completer un test labo",deleteLab:"Supprimer un test labo",imaging:"Imagerie",addImaging:"Ajouter une imagerie",completeImaging:"Completer une imagerie",deleteImaging:"Supprimer une Imagerie",inventory:"Inventaire",addInventoryRequest:"Ajouter une demande d'inventaire",addInventoryItem:"Ajouter un article d'inventaire",addInventoryPurchase:"Ajouter un achat d'inventaire",adjustInventoryLocation:"Ajuster la localisation de l'inventaire",deleteInventoryItem:"Supprimer un article d'inventaire",deleteInventoryPurchase:"Supprimer un achat d'inventaire",fulfillInventory:"Traiter l'inventaire",defineUserRoles:"Rôles d'utilisateur"},messages:{roleSaved:"Le rôle {{roleName}} a été enregistré."},titles:{roleSaved:"Rôle enregistré"}}},labels:{cptcode:"Code CPT",loading:"Chargement",name:"Nom",patient:"Patient",prescriber:"prescripteur",quantity:"Quantité",requestedOn:"Demandé le",date:"Date",dateOfBirth:"Date de naissance",dateOfBirthShort:"DdN",dateRequested:"Date de demande",dateCompleted:"Date de traitement",description:"Description",requestedBy:"Demandé par",fulfill:"Traiter",fulfillRequest:"Traiter la demande",fulfillRequestNow:"Traiter la demande maintenant",actions:"Actions",action:"Action",notes:"Notes",edit:"Modifier",imageOrders:"Demandes d'imagerie",labOrders:"Demandes de labo",imagingType:"Type d'imagerie",result:"Resultat",results:"Resultats",visit:"Visite",requests:"Demandes",completed:"Traité",id:"Id",on:"sur",type:"Type",sex:"Sexe",age:"Age",username:"Nom d'utilisateur",email:"Email",role:"Rôle",delete:"Supprimer",userCanAddNewValue:"Utilisateur peut ajouter de nouvelles valeurs",value:"Valeur",lookupType:"Type de référence",importFile:"Importer un fichier",fileLoadSuccessful:"Téléchargement reussi",fileToLoad:"Téléchargement de fichier",startTime:"Heure de debut",startDate:"Date de debut",endTime:"Heure de fin",endDate:"Date de fin",docRead:"Documents lus",docWritten:"Documents écrits",displayName:"Nom à afficher",password:"Mot de passe",editUser:"Modifier un utilisateur",newUser:"Nouvel utilisateur",deleteUser:"Supprimer un utilisateur",medication:"Médicament",status:"Statut",addNewOutpatientVisit:"--Ajouter une nouvelle consultation externe--",prescription:"Ordonnance",prescriptionDate:"Date de prescription",billTo:"Facturer à",pullFrom:"Tirer de",fulfilled:"Traité",deleteRequest:"Supprimer la demande",location:"Emplacement",provider:"Fournisseur",with:"Avec",allDay:"Toute la journée",physician:"Médecin",assisting:"Assistant",anesthesia:"Anesthésie",procedures:"Procédures"},messages:{noItemsFound:"Aucun article retrouvé.",noHistoryAvailable:"Aucune historique disponible.",createNewRecord:"Créer un nouveau dossier?",createNewUser:"Créer un nouvel utilisateur?",noUsersFound:"Aucun utilisateur retrouvé.",areYouSureDelete:"Êtes-vous sûr de vouloir supprimer l'utilisateur {{user}}?",userHasBeenSaved:"L'utilisateur a été enregistré.",userSaved:"Utilisateur enregistré",onBehalfOf:"de la part de",newPatientHasToBeCreated:"Un nouveau patient doit être crée...Veuillez attendre...",noNotesAvailable:"Aucune note clinique supplémentaire disponible pour cette visite.",sorry:"Désolé, quelque chose a mal tourné ...",forAuthorizedPersons:"Ce rapport est destiné uniquement aux personnes autorisées."},alerts:{pleaseWait:"Veuillez attendre"},buttons:{complete:"Traiter",cancel:"Annuler",close:"Fermer",returnButton:"Retourner",barcode:"Code barre",add:"Ajouter",update:"Mettre à jour",ok:"Ok",fulfill:"Traiter",remove:"Retirer",delete:"Supprimer",newUser:"Nouvel utilisateur",addValue:"Ajouter une valeur",newNote:"Nouvelle note",import:"Importer",loadFile:"Télécharger le fichier",newRequest:"Nouvelle demande",allRequests:"Toutes les demandes",dispense:"Dispenser",newItem:"+ nouvel article",newRequestPlus:"+ nouvelle demande",addVisit:"Ajouter une visite",search:"Rechercher"},login:{messages:{signIn:"veuillez-vous connecter",error:"Nom d'utilisateur ou mot de passe est incorrect."},labels:{password:"Mot de passe",username:"Nom d'utilisateur",signIn:"Connexion"}},inventory:{edit:{cost:"Coût par unité:",delivered:"Livré à:",location:"Emplacement ajusté:",prescription:"Ordonnance pour:",pulled:"Tiré de:",quantity:"Quantité après traitement:",reason:"Motif:",returned:"Retourné par le patient:",transferredFrom:"Transféré de:",transferredTo:"Transféré à:"},labels:{action:"Action",add:"Ajouter",adjust:"Ajuster",adjustmentDate:"Date d'ajustement",adjustmentFor:"Ajustement pour",adjustmentType:"Type d'ajustement",aisle:"Rayon",aisleLocation:"Emplacement du rayon",allInventory:"Toute l'inventaire",billTo:"Facturer à",consumePurchases:"Utiliser les achats",consumptionRate:"Taux d'utilisation",cost:"Coût",costPerUnit:"Coût par unité",crossReference:"Reference",currentQuantity:"Quantité actuelle",dateCompleted:"Date de traitement",dateEffective:"Date d'effet",dateEnd:"Date de fin",dateStart:"Date de debut",dateReceived:"Date de réception",dateTransferred:"Date de transfert",daysLeft:"Nombre de jours restant",deliveryAisle:"Rayon de livraison",deliveryLocation:"Emplacement de livraison",distributionUnit:"Unité de distribution",deleteItem:"Supprimer l'article",details:"Détails",editItem:"Modifier l'article",expense:"Dépenses pour",expirationDate:"Date d'expiration",fulfillRequest:"Traiter la demande",fulfillRequestNow:"Traiter la demande maintenant",gift:"Don en nature",giftUsage:"Utilisation de don en nature",giftInKindNo:"N",giftInKindYes:"O",inventoryConsumed:"Inventaire utilisé",inventoryItem:"Article à inventorier",inventoryObsolence:"Inventory Obsolence",invoiceItems:"Articles de facture",invoiceLineItem:"Article de facture",invoiceNumber:"Numero de facture",item:"Article",items:"Articles",itemNumber:"Numero d'article",location:"Emplacement",locations:"Emplacements",name:"Nom",markAsConsumed:"Marqué comme utilisé",newItem:"Nouvel article",originalQuantity:"Quantité originale",print:"Imprimer",printBarcode:"Imprimer le code barre",printer:"Imprimante",pullFrom:"Tirer de",purchases:"Achats",purchaseCost:"Coût d'achat",purchaseInfo:"Détails de l'achat",quantity:"Quantité ({{unit}})",quantityAvailable:"Quantité disponible",quantityOnHand:"Quantité en main",quantityRequested:"Quantité demandée",rank:"Rang",reason:"Motif",remove:"Retirer",reorderPoint:"Point de commande",requestedItems:"Articles demandés",salePricePerUnit:"Prix de vente unitaire",save:"Enregistrer",serialNumber:"Numéro de série / lot",total:"Total",totalCost:"Coût total",totalReceived:"Total reçu: {{total}}",transaction:"Transaction",transactions:"Transactions",transfer:"Transférer",transferFrom:"Transféré de",transferTo:"Transférer à l'emplacement",transferToAisle:"Transférer à l'emplacement du rayon",unit:"Unité",unitCost:"Coût unitaire",vendor:"Fournisseur",vendorItemNumber:"Numéro d'article fournisseur",xref:"XRef"},messages:{adjust:"Veuillez ajuster les quantités sur le ou les emplacement(s) appropriée(s) pour tenir compte de la différence de {{difference}}.",createRequest:"Créer une nouvelle demande?",delete:"Etes-vous sûr que vous souhaitez supprimer {{name}}?",itemNotFound:"L'article d'inventaire {{item}} ne pouvait pas être retrouvé.
Si vous voulez créer un nouvel article d'inventaire, veuillez saisir les informations ci-dessous.
Sinon, appuyez sur le bouton Annuler pour retourner.",loading:"Chargement des transactions en cours…",purchaseSaved:"Les achats d'inventaire ont été enregistrés avec succès.",noRequests:"Aucune demande retrouvée.",noItems:"Aucun article retrouvé.",quantity:"La quantité totale de ({{quantity}}) ne correspond pas à la quantité totale dans les emplacements ({{locationQuantity}}).",removeItem:"Etes-vous sûr de vouloir retirer cet article de cette facture?",removeItemRequest:"Etes-vous sûr de vouloir supprimer cet article de cette demande?",requestFulfilled:"La demande d'inventaire a été traitée.",requestUpdated:"La demande d'inventaire a été mis à jour.",warning:"Veuillez remplir les champs obligatoires (marqués d'un *) et corriger les erreurs avant d'ajouter."},reports:{rows:{adjustments:"Ajustements",adjustmentsTotal:"Ajustements totaux",balanceBegin:"Solde d'ouverture",balanceEnd:"Solde de clôture",category:"Catégorie",consumed:"Utilisé",consumedGik:"GiK utilisé",consumedGikTotal:"GiK total utilisé",consumedPuchases:"Achats utilisés",consumedPurchasesTotal:"Achats totaux utilisés",consumedTotal:"Total utilisé",errInFinSum:"Erreur dans _generateFinancialSummaryReport: ",errInFindPur:"Erreur dans _findInventoryItemsByPurchase: ",errInFindReq:"Erreur dans _findInventoryItemsByRequest: ",expensesFor:"Dépenses pour: ",noAccount:"(Pas de compte)",subtotal:"Sous-total: ",subtotalFor:"Sous-total pour {{category}} - {{account}}: ",total:"Total: ",totalFor:"Total pour {{var}}: ",totalPurchases:"Achats totaux",transfer1:"{{quantity}} de {{location}}",trasnfer2:"De: {{source}} A: {{target}}"},adjustment:"Ajustement détaillée",daysSupply:"Stock restant (en nombre de jours)",expenseDetail:"Détails des dépenses",expenseSum:"Résumé des dépenses",expiration:"Date d'expiration",export:"Exporter un rapport",fields:"Champs à inclure",finance:"Résumé des finances",generate:"Créer un rapport",invLocation:"Inventaire par emplacement",invValuation:"Valorisation de l'inventaire",purchaseDetail:"Détails de l'achat",purchaseSum:"Résumé de l'achat",reportType:"Type de rapport",stockTransferDetail:"Transfert détaillé du stock",stockTransferSum:"Résumé du transfert du stock",stockUsageDetail:"Utilisation détaillée du stock",stockUsageSum:"Résumé de l'utilisation du stock"},titles:{addPurchase:"Ajouter un achat",addRequest:"Nouvelle demande",adjustment:"Ajustement",editPurchase:"Modifier l'achat",editRequest:"Modifier la demande",inventoryItem:"Nouvel article d'inventaire",inventoryReport:"Rapport d'inventaire",purchaseSaved:"Achats d'inventaire enregistrés",quickAddTitle:"Nouvel article d'inventaire",removeItem:"Retirer l'article",requestFulfilled:"Demande traitée",requestUpdated:"Demande mis à jour",transfer:"Transférer les articles",warning:"Attention!!!!!"}},imaging:{pageTitle:"Demandes d'imagerie",sectionTitle:"Imagerie",buttons:{newButton:"+ nouvelle imagerie"},labels:{radiologist:"Radiologiste",addNewVisit:"--Ajouter une nouvelle visite--"},messages:{noCompleted:"Aucun article traité retrouvé."},titles:{completedImaging:"Imagerie traitée",editTitle:"Modifier la demande d'imagerie",newTitle:"Nouvelle demande d'imagerie"},alerts:{completedTitle:"Demande d'imagerie traitée",completedMessage:"La demande d'imagerie a été traitée.",savedTitle:"Demande d'imagerie enregistrée",savedMessage:"La demande d'imagerie a été enregistrée."}},medication:{pageTitle:"Demandes de médicament",sectionTitle:"Médicament",returnMedication:"Retourner un médicament",buttons:{dispenseMedication:"dispenser un médicament",newButton:"+ nouvelle demande",returnMedication:"retourner un médicament"},titles:{completedMedication:"Médicament traitée",editMedicationRequest:"Modifier une demande de médicament",newMedicationRequest:"Nouvelle demande de médicament"},messages:{createNew:"Créer une nouvelle demande de médicament?",confirmDeletion:"Êtes-vous sûr de vouloir supprimer cette demande de médicaments?"},labels:{refills:"Renouvellements",quantityRequested:"Quantité demandé",quantityDispensed:"Quantité dispensé",quantityDistributed:"Quantité distribué",quantityToReturn:"Quantité à retourner",returnLocation:"Emplacement de retour",returnAisle:"Rayon de retour",returnReason:"Motif/notes du retour",adjustmentDate:"Date d'ajustement",creditToAccount:"Créditer le compte"},alerts:{returnedTitle:"Médicament retourné",returnedMessage:"Le médicament a été marqué comme retourné.",savedTitle:"Demande de médicament enregistrée",savedMessage:"Le dossier de médicament a été enregistré.",fulfilledTitle:"Demande de médicament traitée"}},appointments:{currentScreenTitle:"Liste des rendez-vous",editTitle:"Modifier le rendez-vous",newTitle:"Nouveau rendez-vous",sectionTitle:"Rendez-vous",thisWeek:"Rendez-vous de la semaine",missed:"Rendez-vous manqués",searchTitle:"Rechercher les rendez-vous",todayTitle:"Rendez-vous d'aujourd'hui",messages:{deleteAppointmentMessage:"Etes-vous sûr de vouloir supprimer ce rendez-vous?",endTimeLaterThanStart:"Veuillez sélectionnez une heure de fin plus tard que l'heure de début."},buttons:{newButton:"+ nouveau rendez-vous"}},visits:{edit:{buttons:{newAppointment:"Nouveau rendez-vous",addDiagnosis:"Ajoute un diagnostic",newProcedure:"Nouvelle procédure",newLab:"Nouveau labo",newImaging:"Nouvelle imagerie",newMedication:"Nouveau médicament"},labels:{diagnosis:"Diagnostic",procedure:"Procédure",authoredBy:"Crée par",labs:"Labos",imaging:"Imagerie",visitInformation:"Détails de la visite"}}},labs:{sectionTitle:"Labos",requestsTitle:"Demandes de labo",editTitle:"Modifier la demande de labo",newTitle:"Nouvelle demande de labo",deleteTitle:"Supprimer la demande",completedTitle:"Labos traités",labels:{labType:"Type de labo",addNewVisit:"--Ajouter une nouvelle visite--"},messages:{noItemsFound:"Aucun labo retrouvé.",createNewRecord:"Créer un nouveau dossier?",confirmDeletion:"Etes-vous sûr de vouloir supprimer cette demande de labo?",noCompleted:"Aucun article traité retrouvé."},buttons:{newButton:"+ nouveau labo"},alerts:{requestCompletedTitle:"Demande de labo traitée",requestCompletedMessage:"La demande de labo a été traitée.",requestSavedTitle:"Demande de labo enregistrée",requestSavedMessage:"La demande de labo a été enregistrée."}},common:{actions:"Actions"},patients:{notes:{onBehalfOfLabel:"De la part de",onBehalfOfCopy:"de la part de",pleaseSelectAVisit:"Veuillez sélectionner une visite",noteLabel:"Note"}}}}),define("hospitalrun/locales/pt-BR/translations",["exports"],function(e){e.default={dashboard:{title:"O que você gostaria de fazer?"},errors:{inclusion:"não está na lista",exclusion:"é reservado",invalid:"é inválido",confirmation:"{{attribute}} não corresponde",accepted:"deve ser aceito",empty:"não pode ser vazio",blank:"não pode ser branco",present:"pode ser branco",tooLong:"é muito longo (quantidade máxima de caracteres é {{count}} )",tooShort:"é muito curta (quantidade mínima de caracteres é {{count}})",wrongLength:"o tamanho está errado (são esperados {{count}} caracteres)",notANumber:"não é um número",notAnInteger:"deve ser um número inteiro",greaterThan:"deve ser maior do que {{count}}",greaterThanOrEqualTo:"deve ser maior ou igual à {{count}}",equalTo:"deve ser igual à {{count}}",lessThan:"deve ser menor do que {{count}}",lessThanOrEqualTo:"deve ser menor ou igual à {{count}}",otherThan:"deve ser diferente de {{count}}",odd:"deve ser ímpar",even:"deve ser até",invalidNumber:"número não é valido"},navigation:{imaging:"Imagem",inventory:"Inventário",patients:"Pacientes",appointments:"Compromisso",medication:"Medicação",labs:"Laboratórios",billing:"Faturamento",administration:"Administração",subnav:{actions:"Ações",requests:"Requisições",items:"Itens",completed:"Concluídos",newRequest:"Nova Requisição",inventoryReceived:"Inventário Recebido",reports:"Relatórios",patientListing:"Lista de Pacientes",newPatient:"Novo Paciente",thisWeek:"Essa Semana",today:"Hoje",search:"Pesquisa",addAppointment:"Adicionar Compromisso",dispense:"Dispensar",returnMedication:"Retorno de Medicação",invoices:"Faturas",newInvoice:"Nova Fatura",prices:"Preços",priceProfiles:"Perfis de Preços",lookupLists:"Listas de Pesquisa",addressFields:"Campos de Endereço",loadDB:"Carregar BD",users:"Usuários",newUser:"Novo Usuário",admittedPatients:"Pacientes Admitidos",missed:"Perdidos",userRoles:"Perfis de Usuário",workflow:"Workflow"},actions:{logout:"Sair",login:"Entrar"},about:"Sobre HospitalRun"},user:{plusNewUser:"+ novo usuário",usersPageTile:"Lista de Usuários"},admin:{addressOptions:"Opções de Endereço",lookupLists:"Lista de Pesquisas",loadDb:"Carregar DB",userRoles:"Perfis de Usuários",users:"Usuários",address:{address1Label:"Rótulo Endereço 1",address2Label:"Rótulo Endereço 2",address3Label:"Rótulo Endereço 3",address4Label:"Rótulo Endereço 4",include1Label:"Rótulo Include 1",include2Label:"Rótulo Include 2",include3Label:"Rótulo Include 3",include4Label:"Rótulo Include 4",titles:{optionsSaved:"Opções Salvas"},messages:{addressSaved:"As opções de endereço foram salvas"},newTitle:"Opções de Endereço",editTitle:"Opções de Endereço",addressLabel:"Endereço"},loaddb:{progressMessage:"Por favor aguarde enquanto o seu banco de dados é carregado.",progressTitle:"Carregando Banco de Dados",displayAlertTitle:"Selecione o Arquivo para Carregar",displayAlertMessage:"Por favor Selecione o Arquivo para Carregar.",errorDisplayAlertTitle:"Erro ao carregar",errorDisplayAlertMessage:"O banco de dados não foi carregado. O erro foi: {{error}}",editTitle:"Carregando BD"},lookup:{alertImportListTitle:"Selecione o arquivo para importação",alertImportListMessage:"Por favor Selecione o arquivo para importação.",alertImportListSaveTitle:"Lista Importdada",alertImportListSaveMessage:"A lista de pesquisa foi importada.",alertImportListUpdateTitle:"Lista Salva",alertImportListUpdateMessage:"A lista de pesquisa foi salva.",pageTitle:"Listas de Pesquisa",edit:{template:{addTitle:"Adicionar Valor",editTitle:"Editar Valor",updateButtonTextAdd:"Adicionar",updateButtonTextUpdate:"Atualizar",labelTitle:"Valor"}},anesthesiaTypes:"Tipos de Anestesia",anesthesiologists:"Anestesiologista",billingCategories:"Categorias de Faturamento",clinicList:"Localização de Clínicas",countryList:"Países",diagnosisList:"Diagnósticos",cptCodeList:"Códigos CPT",expenseAccountList:"Contas de Despesas",aisleLocationList:"Localização de Corredores no Inventário",warehouseList:"Locais de Inventário",inventoryTypes:"Tipos de Inventário",imagingPricingTypes:"Tipos de Preço Imagem",labPricingTypes:"Tipos de Preço Laboratório",patientStatusList:"Lista de Situação do Paciente",physicianList:"Médicos",procedureList:"Procedimentos",procedureLocations:"Localização de Procedimentos",procedurePricingTypes:"Tipos de Preço Procedimento",radiologists:"Radiologista",unitTypes:"Tipos de Unidade",vendorList:"Fornecedor",visitLocationList:"Localização dos Visitantes",visitTypes:"Tipos de Visita",wardPricingTypes:"Tipos de Preços Enfermaria"},roles:{capability:{admin:"Administração",loadDb:"Carregar Banco de Dados",updateConfig:"Atualizar Configurações",appointments:"Compromissos",addAppointment:"Adicionar Compromissos",billing:"Faturamentos",addCharge:"Adicionar Cobrança",addPricing:"Adicionar Preço",addPricingProfile:"Adicionar Perfil de Preço",addInvoice:"Adicionar Fatura",addPayment:"Adicionar Pagamentos",deleteInvoice:"Excluir Fatura",deletePricing:"Excluir Preço",deletePricingProfile:"Excluir Perfil de Preço",editInvoice:"Editar Fatura",invoices:"Faturas",overrideInvoice:"Substituir Fatura",pricing:"Preço",patients:"Pacientes",addDiagnosis:"Adicionar Diagnóstico",addPhoto:"Adicionar Foto",addPatient:"Adicionar Paciente",addProcedure:"Adicionar Procedimento",addVisit:"Adicionar Visita",addVitals:"Adicionar Sinais Vitais",admitPatient:"Admitir Paciente",deletePhoto:"Excluir Paciente",deletePatient:"Excluir Paciente",deleteAppointment:"Excluir Compromisso",deleteDiagnosis:"Excluir Diagnóstico",deleteProcedure:"Excluir Procedimento",deleteSocialwork:"Excluir Trabalho Social",deleteVitals:"Excluir Sinais Vitais",deleteVisit:"Excluir Visita",dischargePatient:"Alta do Paciente",patientReports:"Relatório do Paciente",visits:"Visita",medication:"Medicação",addMedication:"Adicionar Medicação",deleteMedication:"Excluir Medicação",fulfillMedication:"Preencher Medicação",labs:"Laboratório",addLab:"Adicionar Laboratório",completeLab:"Laboratório Concluído",deleteLab:"Excluir Laboratório",imaging:"Imagem",addImaging:"Adicionar Imagem",completeImaging:"Imagem Concluída",deleteImaging:"Excluir Imagem",inventory:"Inventário",addInventoryRequest:"Adicionar Requisição de Inventário",addInventoryItem:"Adicionar Item de Inventário",addInventoryPurchase:"Adicionar Compra de Inventário",adjustInventoryLocation:"Ajustar Localização de Inventário",deleteInventoryItem:"Excluir Item de Inventário",fulfillInventory:"Preencher Inventário",defineUserRoles:"Perfis de Usuários"},messages:{roleSaved:"O perfil {{roleName}} foi salvo."},titles:{roleSaved:"Perfil Salvo"}},workflow:{admissionDepositLabel:"Depósito de Admissão é exigido",clinicPrepaymentLabel:"Pagamento Antecipado da Clínica é exigido",followupPrepaymentLabel:"Pagamento Antecipado do Acompanhamento é exigido",outpatientLabLabel:"Pagamento Antecipado do Laboratório Ambulatorial é exigido",outpatientImagingLabel:"Pagamento Antecipado do Ambulatorio de Imagem é exigido",outpatientMedicationLabel:"Pagamento Antecipado do Ambulatorio de Medicação é exigido",titles:{optionsSaved:"Opções Salvas"},messages:{optionsSaved:"As opções de WorkFlow foram salvas"},newTitle:"Opções de Workflow",editTitle:"Opções de Workflow",workflowLabel:"Workflow"}},labels:{cptcode:"Código CPT*",loading:"Carregando",name:"Nome",note:"Note",patient:"Paciente",prescriber:"Médico Responsável pela Prescrição",quantity:"Quantidade",requestedOn:"Solicitado em",date:"Data",dateOfBirth:"Data de Nascimento",dateOfBirthShort:"DtNasc",dateRequested:"Data da Requisição",dateCompleted:"Data da Conclusão",description:"Descrição",requestedBy:"Requisitado por",fulfill:"Preencha",fulfillRequest:"Preencha a Requisição",fulfillRequestNow:"Preencha a Requisição Agora",actions:"Ações",action:"Ação",notes:"Notas",edit:"Editar",imageOrders:"Pedido de Imagem",labOrders:"Pedidos de Laboratório",imagingType:"Tipo de Imagem",result:"Resultado",results:"Resultados",visit:"Visita",requests:"Requisições",completed:"Completo",id:"Id",on:"ligado",type:"Tipo",sex:"Sexo",age:"Idade",search:"Pesquisa",username:"Usuário",email:"Email",role:"Papel",delete:"Excluir",userCanAddNewValue:"O usuário pode adicionar novos valores",value:"Valor",lookupType:"Tipo de Pesquisa",importFile:"Importar Arquivo",fileLoadSuccessful:"Arquivo Carregado com Sucesso",fileToLoad:"Carregar Arquivo",startTime:"Hora Início",startDate:"Data de Início",endTime:"Hora de Término",endDate:"Data de Término",docRead:"Documentos Lidos",docWritten:"Documentos Escritos",displayName:"Nome de Exibição",password:"Senha",editUser:"Editar Usuário",newUser:"Novo Usuário",deleteUser:"Excluir Usuário",medication:"Medicação",status:"Situação",addNewOutpatientVisit:"--Adicionar Nova Visita Ambulatorial--",prescription:"Prescrição",prescriptionDate:"Data da Prescrição",billTo:"Conta Para",pullFrom:"Puxar De",fulfilled:"Preenchido",deleteRequest:"Excluir Requisição",location:"Localização",provider:"Fornecedor",with:"Com",allDay:"Todo Dia",physician:"Médico",assisting:"Ajudante",anesthesia:"Anestesia",procedures:"Procedimentos",number:"Número",billDate:"Data da Conta",balanceDue:"Saldo Devedor",amount:"Quantidade",datePaid:"Data de Pagamento",creditTo:"Crédito Para",invoiceId:"ID da Fatura", -lineItems:"Itens de Linha",discount:"Desconto",excess:"Excesso",price:"Preço",total:"Total",expenseTo:"Despesa Para",grandTotal:"Total Geral",remarks:"Observações",payments:"Pagamentos",category:"Categoria",department:"Departamento",address:"Endereço",country:"País"},messages:{noItemsFound:"Nenhum item encontrado",noHistoryAvailable:"Histórico não disponível.",createNewRecord:"Criar uma nova gravação?",createNewUser:"Criar um novo usuário?",noUsersFound:"Nenhum usuário encontrado.",areYouSureDelete:"Você tem certeza que deseja excluir o usuário {{user}}?",userHasBeenSaved:"O usuário foi salvo.",userSaved:"Usuário Salvo",onBehalfOf:"em nome de",newPatientHasToBeCreated:"Um novo paciente precisa ser criado... Por favor aguarde...",noNotesAvailable:"Nenhuma nota clinica adicional está diponível para essa visita.",sorry:"Desculpe, algo deu errado...",forAuthorizedPersons:"Este relatório é somente para pessoas autorizadas."},alerts:{pleaseWait:"Por Favor Aguarde"},headings:{chargedItems:"Itens Carregados"},buttons:{addItem:"Adicionar Item",complete:"Completo",cancel:"Cancelar",close:"Fechar",returnButton:"Retornar",barcode:"Código de Barras",add:"Adicionar",update:"Atualizar",ok:"Ok",fulfill:"Preencher",remove:"Remover",delete:"Excluir",newUser:"Novo Usuário",addValue:"Adicionar Valor",newNote:"Nova Nota",import:"Importar",loadFile:"Carregar Arquivo",newRequest:"Nova Requisição",allRequests:"Todas as Requisições",dispense:"Dispensar",newItem:"+ novo item",newRequestPlus:"+ nova requisição",addVisit:"Adicionar Visita",search:"Pesquisa",edit:"Editar",addLineItem:"Adicionar Item de Linha"},login:{messages:{signIn:"inscreva-se",error:"Nome de usuário ou senha está incorreta."},labels:{password:"Senha",username:"Usuário",signIn:"Entrar"}},loading:{progressBar:{progress:"{{progressBarValue}}% concluído"},messages:{0:"A velocidade de vôo borboleta superior é de 12 milhas por hora. Alguns meses pode voar 25 milhas por hora!",1:"As corujas são os únicos pássaros que podem ver a cor azul.",2:"Os gatos têm mais de 100 sons vocais; cachorros têm apenas 10.",3:"Os Humanos usam um total de 72 músculos diferentes na fala.",4:"Mais de 1.000 idiomas diferentes são falados no continente africano",5:"Uma eritrofobo é alguém que fica vermelho facilmente.",6:"A fobia mais comum do mundo é a Odinofobia que é o medo da dor.",7:"Seu corpo utiliza 300 músculo para manter o equilíbrio quando você está parado.",8:"Alguns sapos podem ser congelados e depois de serem descongelados continuarem a viver.",9:"Nossos olhos estão sempre do mesmo tamanho de quando nascemos, mas nossas orelhas e nariz nunca param de crescer.",10:"Sua língua é o único músculo em seu corpo qu está ligado apenas em uma extremidade.",11:"Camelos tem três pálpebras para se protegerem das tempestades de areia."}},inventory:{edit:{cost:"Preço por Unidade:",delivered:"Entregue a:",location:"Localização Ajustada:",prescription:"Prescrição para:",pulled:"Retirado de:",quantity:"Quantidade na Conclusão:",reason:"Motivo:",returned:"Devolvido do Paciente:",transferredFrom:"Transferido de:",transferredTo:"Transferido para:"},labels:{action:"Ação",add:"Adicionar",adjust:"Ajustar",adjustmentDate:"Data de Ajuste",adjustmentFor:"Ajuste Para",adjustmentType:"Tipo de Ajuste",aisle:"Corredor",aisleLocation:"Localização do Corredor",allInventory:"Todo Inventário",billTo:"Conta Para",consumePurchases:"Compras para Consumo",consumptionRate:"Taxa de Consumo",cost:"Preço",costPerUnit:"Preço por Unidade",crossReference:"Referência Cruzada",currentQuantity:"Quantidade Atual",dateCompleted:"Data de Conclusao",dateEffective:"Data Efetiva",dateEnd:"Data de Término",dateStart:"Data de Início",dateReceived:"Data Recebida",dateTransferred:"Data Transferida",daysLeft:"Dias Restantes",deliveryAisle:"Corredor de Entrega",deliveryLocation:"Local de Entrega",distributionUnit:"Centro de Distribuição",deleteItem:"Deletar Item",details:"Detalhes",editItem:"Editar Item",expense:"Despesa para",expirationDate:"Data de Expiração",fulfillRequest:"Preencher Requisição",fulfillRequestNow:"Preencher Requisição Agora",gift:"Doação em Espécie",giftUsage:"Uso de Doação em Espécie",giftInKindNo:"N",giftInKindYes:"S",inventoryConsumed:"Inventário Consumido",inventoryItem:"Item de Inventário",inventoryObsolence:"Obsolescência de Inventário",invoiceItems:"Itens da Fatura",invoiceLineItem:"Item de Linha da Fatura",invoiceNumber:"Número da Fatura",item:"Item",items:"Itens",itemNumber:"Número de Item",location:"Localização",locations:"Localizações",name:"Nome",markAsConsumed:"Marcar como Consumido",newItem:"Novo Item",allItems:"Todos os Itens",originalQuantity:"Quantidade Original",print:"Imprimir",printBarcode:"Imprimir Código Barras",printer:"Impressora",pullFrom:"Retirar de",purchases:"Compras",purchaseCost:"Custo da Compra",purchaseInfo:"Informações da Compra",quantity:"Quantity ({{unit}})",quantityAvailable:"Quantity Available",quantityOnHand:"Quantidade on Hand",quantityRequested:"Quantidade Solicitada",rank:"Classificação",reason:"Motivo",remove:"Remover",reorderPoint:"Ponto de Reabastecimento",requestedItems:"Itens Solicitados",salePricePerUnit:"Preço de Venda por Unidade",save:"Salvar",serialNumber:"Lote/Número de Série",total:"Total",totalCost:"Preço Total",totalReceived:"Total Recebido: {{total}}",transaction:"Transação",transactions:"Transações",transfer:"Transferir",transferFrom:"Transferir de",transferTo:"Transferir para Localização",transferToAisle:"Transferir para Localização de Corredor",unit:"Unidade",unitCost:"Preço Unitário",vendor:"Fornecedor",vendorItemNumber:"Número de Item do Fornecedor",xref:"RefX"},messages:{adjust:"Por favor ajustar as quantidades no(s) local(is) apropriado(s) da conta para a diferença de {{difference}}.",createRequest:"Criar uma nova requisição?",delete:"Você tem certeza que deseja excluir {{name}}?",itemNotFound:"O item de inventário {{item}} não pode ser encontrado.
Se você quiser criar um novo item de inventário, preencha as informações abaixo.
Caso o contrário, pressione o botão Cancelar para voltar.",loading:"Carregando transações ...",purchaseSaved:"As compras de inventário foram salvas com sucesso.",noRequests:"Nenhuma requisição encontrada.",noItems:"Nenhum item encontrado.",quantity:"A quantidade total de ({{quantity}}) não corresponde com a quantidade total nas localizações({{locationQuantity}}).",removeItem:"Você tem certeza de que deseja remover este item desta fatura?",removeItemRequest:"Você tem certeza de que deseja remover este item desta requisição?",requestFulfilled:"A requisição de invenário foi preenchida.",requestUpdated:"A requisição de invenário foi atualizada.",warning:"Por favor preencher campos obrigatório (marcado(s) com *) e corrija os erros antes de adicionar."},reports:{rows:{adjustments:"Ajustes",adjustmentsTotal:"Total dos Ajustes",balanceBegin:"Balanço Inicial",balanceEnd:"Balanço Final",category:"Categoria",consumed:"Consumidos",consumedGik:"Doações Consumidas",consumedGikTotal:"Total Doações Consumidas",consumedPuchases:"Compras Consumidas",consumedPurchasesTotal:"Total Compras Consumidas",consumedTotal:"Total Consumido",errInFinSum:"Erro em _generateFinancialSummaryReport: ",errInFindPur:"Erro em _findInventoryItemsByPurchase: ",errInFindReq:"Erro em _findInventoryItemsByRequest: ",expensesFor:"Despesas para: ",noAccount:"(Sem Conta)",subtotal:"Subtotal: ",subtotalFor:"Subtotal para {{category}} - {{account}}: ",total:"Total: ",totalFor:"Total para {{var}}: ",totalPurchases:"Total de Compras",transfer1:"{{quantity}} de {{location}}",trasnfer2:"De: {{source}} Para: {{target}}"},adjustment:"Ajuste Detalhado",daysSupply:"Dias de Abastecimento Deixado no Estoque",expenseDetail:"Despesas Detalhadas",expenseSum:"Sumário de Despesas",expiration:"Data de Expiração",export:"Exportar Relatório",fields:"Campos para Incluir",finance:"Sumário Financeiro",generate:"Gerar Relatório",invLocation:"Inventário por Localização",invValuation:"Valorização do Inventário",purchaseDetail:"Compras Detalhadas",purchaseSum:"Sumário de Compras",reportType:"Tipo de Relatório",stockTransferDetail:"Tranferências de Estoque Detalhadas",stockTransferSum:"Sumário de Tranferências de Estoque",stockUsageDetail:"Uso de Estoque Detalhado",stockUsageSum:"Sumário de Uso de Estoque"},titles:{addPurchase:"Adicionar Compra",addRequest:"Nova Requisição",adjustment:"Ajuste",editPurchase:"Editar Compra",editRequest:"Editar Requisição",inventoryItem:"Novo Item de Inventário",inventoryReport:"Relatório de Inventário",purchaseSaved:"Compras de Invenários Salvas",quickAddTitle:"Novo Item de Inventário",removeItem:"Remover Item",requestFulfilled:"Requisição Preenchida",requestUpdated:"Requisição Atualizada",transfer:"Itens de Transferência",warning:"Atenção!!!!!"}},imaging:{pageTitle:"Requisição de imagens",sectionTitle:"Imagem",buttons:{newButton:"+ nova imagem"},labels:{radiologist:"Radiologista",addNewVisit:"--Adicionar novo visitante--"},messages:{delete:"Você tem certeza que deseja excluir essa requisição de imagem?",noCompleted:"Nenhum item completo encontrado."},titles:{completedImaging:"Imagem completa",editTitle:"Requisição de edição de imagem",newTitle:"Nova requisição de imagem"},alerts:{completedTitle:"Requisição de Imagem Completa",completedMessage:"A requisição de imagem esta completa.",savedTitle:"Requisição de imagem salva",savedMessage:"A requisição de imagem foi salva."}},medication:{pageTitle:"Requisição de Medicação",sectionTitle:"Medicação",returnMedication:"Retorno de Medicação",buttons:{dispenseMedication:"dispensar medicação",newButton:"+ nova requisição",returnMedication:"retorno de medicação"},titles:{completedMedication:"Medicação Concluída",editMedicationRequest:"Editar Requisição de Medicação",newMedicationRequest:"Nova Requisição de Medicação"},messages:{createNew:"Criar uma nova requisição de medicação?",confirmDeletion:"Você tem certeza que deseja excluir essa requisição de medicação?"},labels:{refills:"Recargas",quantityRequested:"Quantidade Requisitada",quantityDispensed:"Quantidade Dispensada",quantityDistributed:"Quantidade Distribuída",quantityToReturn:"Quantidade Retornada",returnLocation:"Localização de Retorno",returnAisle:"Corredor de Retorno",returnReason:"Razão/Notas de Retorno",adjustmentDate:"Data de Ajuste",creditToAccount:"Crédito na Conta"},alerts:{returnedTitle:"Medicação Retornada",returnedMessage:"A medicação foi marcada como retornada.",savedTitle:"Requisição de Medicação foi Salva",savedMessage:"O registro de medicação foi salvo.",fulfilledTitle:"Requisição de Medicação Preenchido"}},appointments:{currentScreenTitle:"Lista de Compromisso",editTitle:"Editar Compromisso",newTitle:"Novo Compromisso",sectionTitle:"Compromissos",thisWeek:"Compromissos dessa Semana",missed:"Compromissos Esquecidos",searchTitle:"Pesquisar Compromissos",todayTitle:"Compromissos de Hoje",messages:{deleteAppointmentMessage:"Você tem certeza que deseja excluir esse compromisso?",endTimeLaterThanStart:"Por favor, selecione um horário de término mais tarde do que a hora de início."},buttons:{newButton:"+ novo compromisso"},labels:{selectedStartingDate:"Mostrar Compromisso em ou após"}},vitals:{messages:{delete:"Você tem certeza que deseja excluir esses sinais vitais?"},labels:{dateRecorded:"Data de Gravação",temperature:"Temperatura",weight:"Peso",height:"Altura",sbp:"PAS",dbp:"PAD",heartRate:"Frequência Cardíaca",respiratoryRate:"Frequência Respiratória"}},visits:{titles:{additionalDiagnoses:"Diagnósticos Adicionais"},messages:{delete:"Você tem certeza que deseja excluir essa visita?"},buttons:{newProcedure:"Novo Procedimento",newLab:"Novo Laboratório",newAppointment:"Novo Compromisso",addDiagnosis:"Adicionar Diagnóstico",newImaging:"Nova Imagem",newMedication:"Nova Medicação",newVitals:"Novos Sinais Vitais"},labels:{diagnosis:"Diagnósticos",procedure:"Procedimentos",authoredBy:"Autorizado Por",labs:"Laboratório",imaging:"Imagem",visitInformation:"Imformação de Visita",examiner:"Examinador",medication:"Medicação",status:"Situação de Visita",admittingDiagnosis:"Diagnósticos de Admisão",finalDiagnosis:"Diagnósticos de Finais/Faturamento",visitType:"Tipo de Visita",vitals:"Sinais Vitais"}},labs:{sectionTitle:"Laboratório",requestsTitle:"Requisições de Laboratório",editTitle:"Editar Requisição de Laboratório",newTitle:"Nova Requisição de Laboratório",deleteTitle:"Excluir Requisição",completedTitle:"Laboratórios Concluídos",labels:{labType:"Tipo de Laboratório",addNewVisit:"--Adicionar Nova Visita--"},messages:{noItemsFound:"Nenhum laboratório encontrado.",createNewRecord:"Criar novo registro?",confirmDeletion:"VOcê tem certeza que deseja excluir essa requisição de laboratório?",noCompleted:"Items concluídos não econtrados."},buttons:{newButton:"+ novo laboratório"},alerts:{requestCompletedTitle:"Requisições de Laboratório Concluída",requestCompletedMessage:"Requisição de laboratório foi concluída.",requestSavedTitle:"Requisição de Laboratório Salva",requestSavedMessage:"A requisição de laboratório foi salva."}},patients:{navigation:{photos:"Fotos",general:"Geral",history:"Histórico",appointments:"Compromissos",visits:"Visitas",medication:"Medicação",imaging:"Imagem",labs:"Laboratórios",socialWork:"Assitência Social"},titles:{expenses:"Despesas",additionalContacts:"Contatos Adicionais",familyInformation:"Informação Familiar",delete:"Excluir Paciente",new:"Novo Paciente",edit:"Editar Paciente",patient:"Relatório de Paciente",patientListing:"Lista de Pacientes",addPhoto:"Adicionar Foto",editPhoto:"Editar Foto",socialWork:"Despesa",familyInfo:"Informação Familiar",deleteFamilyMember:"Excluir Membro Familiar",deleteExpense:"Excluir Despesa",deletePhoto:"Excluir Foto",deleteContact:"Excluir Contato",savedPatient:"Paciente Salvo"},messages:{areYouSureDelete:"Você tem certeza que deseja excluir este(a) {{object}}?",deletePatient:"Você tem certeza que deseja excluir {{firstName}} {{lastName}}?",noPatientsFound:"Nenhum paciente encontrado.",savedPatient:"O registro de paciente para {{displayName}} foi salvo.",notFoundQuickAdd:"O paciente {{patientFullName}} não pode ser encontrato. Se você deseja cadastras um novo paciente, preencha as informações abaixo. Caso contrário clique em Cancelar para voltar.",createNewPatient:"Criar novos registro de paciente?"},buttons:{addExpense:"Adicionar Despesa",addContact:"Adicionar Contato",newLab:"Novo Laboratório",newVisit:"Nova Visita",newMedication:"Nova Medicação",newImaging:"Nova Imagem",addFamilyMember:"Adicionar Membro Familiar",newPhoto:"Nova Foto",newAppointment:"Novo Compromisso",backToPatients:"Voltar para Lista de Pacientes",newPatient:"+ novo paciente"},labels:{primaryDiagnosis:"Diagnósticos Primários",secondaryDiagnosis:"Diagnósticos Secundários",monthlyCost:"Custo Mensal",totalMontlyExpense:"Total de Despesas Mensais",patientType:"Tipo de Paciente",admissionDate:"Data de Admissão",patientDays:"Dias do Paciente",dischargeDate:"Data de Pagamento",discharge:"Pagamento",admit:"Admitir",relationships:"Relação",phone:"Telefone",email:"Email",firstName:"Primeiro Nome",middleName:"Nome do meio",lastName:"Último Nome",sex:"Sexo",dob:"DatNasc",dateOfBirth:"Data de Nascimento",placeOfBirth:"Local de Nascimento",sources:"Fontes",cost:"Custo",civilStatus:"Estado Civil",relationship:"Relação com Paciente",education:"Educação",occupation:"Ocupação",income:"Renda",insurance:"Seguro",dateProcessed:"Data de Processamento",status:"Situação do Paciente",externalPatientId:"ID de Paciente Externo",bloodType:"Tipo Sanguíneo",clinic:"Site(Filial) da Clínica",referredBy:"Indicado Por",referredDate:"Data de Indicação",religion:"Religião",parent:"Responsável Legal"},notes:{newNote:"Nova Nota para",updateNote:"Atualizando Nota de",onBehalfOfLabel:"Em Nome de",onBehalfOfCopy:"em nome de",pleaseSelectAVisit:"Por favor selecione uma visita"}},billing:{alerts:{noInvoiceFound:"Nenhuma fatura encontrada",deleteItem:"Você tem certeza que deseja excluir {{item}}?",noPricingItems:"Nenhum item de preço encontrado.",noPricingProfiles:"Nenhum perfil de preço encontrado."},buttons:{createInvoice:"Criar nova fatura?",addOverride:"Adicionar Substituir"},labels:{externalInvoiceNumber:"Fatura Externa #",paymentProfile:"Perfil de Pagamento",actualCharges:"Cobranças Atuais",insurance:"Seguro Nacional",hmoCom:"HMO/COM",paymentsDeposits:"Pagamentos/Depositos",pricingPanelOverrides:"Substituição e Perfil de Preços",pricingProfile:"Perfil de Preços",discountAmount:"Quantidade de Desconto",discountPercentage:"Porcentagem de Desconto"}},print:{invoice:{labels:{patientName:"NOME DO PACIENTE:",patientId:"PACIENTE #:",patientAge:"IDADE:",patientAddress:"ENDEREÇO:",dateAdmitted:"ADMITIDO:",dateDischarged:"PAGAMENTO:",dischargeNotes:"Notas de Pagamento:",remarks:"Observações:",billedBy:"Faturado por:",billedDate:"Data de Faturamento:",spacer:"__________________________________________"},messages:{whereConducted:"foram deduzidos durante minha internação"},titles:{patientMember:"Paciente-Membro",relContact:"Relações/Contato",patients:"DO PACIENTE",billingStatement:"DECLARAÇÃO DO FATURAMENTO"}}},procedures:{titles:{addChargeItem:"Adicionar Item de Cobrança",deleteChargeItem:"Excluir Item de Cobrança",editChargeItem:"Editar Item de Cobrança",medicationUsed:"Medicação Usada",deleteMedicationUsed:"Excluir Medicação Usada",addMedicationUsed:"Adicionar Medicação Usada",editMedicationUsed:"Editar Medicação Usada",edit:"Editar Procedimento",saved:"Procedimento Salvo",new:"Novo Procedimento"},labels:{medicationUsed:"Medicação Usada"},messages:{deleteMedication:"Você tem certeza que deseja excluir esta medicação?",delete:"Você tem certeza que deseja excluir este procedimento?",saved:"O registro de procedimento foi salvo."},buttons:{addMedication:"Adicionar Medicação"}},components:{chargesByTypeTab:{charges:"cobranças"},takePhoto:{how:"Como você quer adicionar um Foto?",takePhoto:"Tirar um Foto",uploadPhoto:"Upload de Foto",uploadFile:"Upload de Arquivo",camera:"Câmera",photo:"foto",preview:"pré visualização"},quantityConv:{unit:"Unidade",conversion:"O que significa contém 1 {{name}}?"},quantityCalc:{result:"{{targetUnit}} total: {{calculated}}"},priceList:{charges:"cobranças de {{pricingType}}"}}}}),define("hospitalrun/locales/ru/translations",["exports"],function(e){e.default={dashboard:{title:"Что вы хотите сделать?"},labels:{name:"Имя",patient:"Пациент",quantity:"Количество",requestedOn:"Запрошен",dateRequested:"Дата Запроса",dateCompleted:"Дата Выполнения",requestedBy:"Запрошен",fulfill:"Отправить",actions:"Действия",action:"Действие",notes:"Заметки",edit:"Редактировать",imagingType:"Тип визуализации",result:"Результат",results:"Результаты",visit:"Осмотр",requests:"Ожидающие",completed:"Выполненые",id:"Номер",sex:"Пол",age:"Возраст"},messages:{noItemsFound:"Ничего не найдено.",createNewRecord:"Создать новую запись?",forAuthorizedPersons:"Этот отчет предназначен только для уполномоченных лиц."},buttons:{complete:"Готово",cancel:"Отметить",returnButton:"Вернутся",add:"Добавить",update:"Обновить",ok:"Ок"},login:{messages:{signIn:"войдите в систему",error:"Неверное имя пользователя или пароль."},labels:{password:"Пароль",username:"Имя пользователя",signIn:"Войти"}},inventory:{messages:{noRequests:"Запросов не найдено.",createRequest:"Создать новый запрос?"}},imaging:{pageTitle:"Запросы на визуализацию",sectionTitle:"Визуализация",buttons:{newButton:"+ новый запрос"},labels:{radiologist:"Радиолог",addNewVisit:"--Добавить новый тип осмотра--"},messages:{noCompleted:"Не найдено выполненых запросов."},titles:{completedImaging:"Выполненые запросы",editTitle:"Редактировать запрос на визуализацию",newTitle:"Новый запрос на визуализацию"},alerts:{completedTitle:"Визуализация выполнена",completedMessage:"Запрос на визуализацию удовлетворён.",savedTitle:"Запрос сохранён",savedMessage:"Запрос на визуализацию сохранён."}}}}),define("hospitalrun/locales/tr/translations",["exports"],function(e){e.default={dashboard:{title:"Ne yapmak istersiniz?"},labels:{name:"Ad",patient:"Hasta",quantity:"Miktar",requestedOn:"Açık Talep",dateRequested:"Talep Tarihi",dateCompleted:"Bitiş tarihi",requestedBy:"Talep sahibi",fulfill:"Fulfill",actions:"İşlemler",action:"İşlem",notes:"Notlar",edit:"Düzenle",imagingType:"Görüntüleme Tipi",result:"Sonuç",results:"Sonuçlar",visit:"Ziyaret",requests:"Talepler",completed:"Tamamlandı",id:"Id",sex:"Cinsiyet",age:"Yaş"},messages:{noItemsFound:"Hiçbir öğe bulunamadı.",createNewRecord:"Yeni bir kayıt oluştur?",forAuthorizedPersons:"Bu rapor yetkili kişiler içindir."},buttons:{complete:"Bitir",cancel:"Vazgeç",returnButton:"Geri Dön",add:"Ekle",update:"Güncelle",ok:"Tamam"},login:{messages:{signIn:"GİRİŞ YAPIN",error:"Kullanıcı adı veya parola hatalı."},labels:{password:"Parola",username:"Kullanıcı Adı",signIn:"Giriş yap"}},inventory:{messages:{noRequests:"Talep bulunamadı",createRequest:"Yeni talep oluştur?"}},imaging:{pageTitle:"Görüntüleme talepleri",sectionTitle:"Görüntüleme",buttons:{newButton:"+ yeni görüntüleme"},labels:{radiologist:"Radyolog",addNewVisit:"--Yeni Ziyaret Ekle--"},messages:{noCompleted:"Tamamlanmayan öğe bulunamadı."},titles:{completedImaging:"Görüntüleme Tamamlandı",editTitle:"Görüntüleme Talebini Düzenle",newTitle:"Yeni Görüntüleme Talebi"},alerts:{completedTitle:"Görüntüleme Talebi Tamamlandı",completedMessage:"Görüntüleme talebi başarıyla tamamlandı.",savedTitle:"Görüntüleme Talebi Kaydedildi",savedMessage:"Görüntüleme Talebi başarıyla kaydedildi."}}}}),define("hospitalrun/medication/completed/controller",["exports","hospitalrun/controllers/abstract-paged-controller"],function(e,t){e.default=t.default.extend({showActions:!1,startKey:[]})}),define("hospitalrun/medication/completed/route",["exports","ember-i18n","hospitalrun/medication/index/route"],function(e,t,n){e.default=n.default.extend({modelName:"medication",pageTitle:(0,t.translationMacro)("medication.titles.completedMedication"),searchStatus:"Fulfilled"})}),define("hospitalrun/medication/completed/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"wgSAKpsG",block:'{"statements":[["partial","medication/index"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[],"hasPartials":true}',meta:{moduleName:"hospitalrun/medication/completed/template.hbs"}})}),define("hospitalrun/medication/delete/controller",["exports","ember-i18n","hospitalrun/controllers/abstract-delete-controller","hospitalrun/mixins/patient-submodule"],function(e,t,n,a){e.default=n.default.extend(a.default,{title:(0,t.translationMacro)("labels.delete_request"),actions:{delete:function(){this.deleteChildFromVisit("medication")}}})}),define("hospitalrun/medication/delete/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"TYQrMXNj",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-danger"],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-warning-sign"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["t"],["medication.messages.confirmDeletion"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/medication/delete/template.hbs"}})}),define("hospitalrun/medication/edit/controller",["exports","hospitalrun/controllers/abstract-edit-controller","hospitalrun/mixins/add-new-patient","ember","hospitalrun/mixins/fulfill-request","hospitalrun/mixins/inventory-locations","hospitalrun/mixins/patient-submodule","hospitalrun/mixins/user-session"],function(e,t,n,a,l,s,i,o){e.default=t.default.extend(n.default,l.default,s.default,i.default,o.default,{medicationController:a.default.inject.controller("medication"),expenseAccountList:a.default.computed.alias("medicationController.expenseAccountList"),canFulfill:function(){return this.currentUserCan("fulfill_medication")}.property(),isFulfilled:function(){var e=this.get("model.status");return"Fulfilled"===e}.property("model.status"),isFulfilling:function(){var e=this.get("canFulfill"),t=this.get("model.isRequested"),n=this.get("model.shouldFulfillRequest"),a=e&&(t||n);return this.get("model").set("isFulfilling",a),a}.property("canFulfill","model.isRequested","model.shouldFulfillRequest"),isFulfilledOrRequested:function(){return this.get("isFulfilled")||this.get("model.isRequested")}.property("isFulfilled","model.isRequested"),prescriptionClass:function(){var e=this.get("model.quantity");if(a.default.isEmpty(e))return"required"}.property("model.quantity"),quantityClass:function(){var e=this.get("model.prescription"),t="col-xs-3",n=this.get("isFulfilling");return(n||a.default.isEmpty(e))&&(t+=" required"),t+" test-quantity-input"}.property("isFulfilling","model.prescription"),quantityLabel:function(){var e=this.get("i18n"),t=e.t("medication.labels.quantityRequested"),n=this.get("isFulfilled"),a=this.get("isFulfilling");return a?t=e.t("medication.labels.quantityDispensed"):n&&(t=e.t("medication.labels.quantityDistributed")),t}.property("isFulfilled"),medicationList:[],updateCapability:"add_medication",afterUpdate:function(){var e=this.get("i18n"),t=void 0,n=void 0,a=this.get("isFulfilled");a?(t=e.t("medication.alerts.fulfilledTitle"),n="The medication request has been fulfilled.",this.set("model.selectPatient",!1)):(t=e.t("medication.alerts.savedTitle"),n=e.t("medication.alerts.savedMessage")),this.saveVisitIfNeeded(t,n)},beforeUpdate:function(){var e=this.get("isFulfilling"),t=this.get("model.isNew");return t||e?new a.default.RSVP.Promise(function(n,l){var s=this.get("model");s.validate().then(function(){s.get("isValid")?t?a.default.isEmpty(s.get("patient"))?(this.addNewPatient(),l({ignore:!0,message:"creating new patient first"})):(s.set("medicationTitle",s.get("inventoryItem.name")),s.set("priceOfMedication",s.get("inventoryItem.price")),s.set("status","Requested"),s.set("requestedBy",s.getUserName()),s.set("requestedDate",new Date),this.addChildToVisit(s,"medication","Pharmacy").then(function(){this.finishBeforeUpdate(e,n)}.bind(this),l)):this.finishBeforeUpdate(e,n):(this.send("showDisabledDialog"),l("invalid model"))}.bind(this)).catch(function(){this.send("showDisabledDialog"),l("invalid model")}.bind(this))}.bind(this)):a.default.RSVP.resolve()},finishBeforeUpdate:function(e,t){if(e){var n=this.get("model.inventoryLocations"),a=this.get("store").createRecord("inv-request",{expenseAccount:this.get("model.expenseAccount"),dateCompleted:new Date,inventoryItem:this.get("model.inventoryItem"),inventoryLocations:n,quantity:this.get("model.quantity"),transactionType:"Fulfillment",patient:this.get("model.patient"),markAsConsumed:!0});this.performFulfillRequest(a,!1,!1,!0).then(function(){this.set("model.status","Fulfilled"),t()}.bind(this))}else t()},showUpdateButton:function(){var e=this.get("isFulfilled");return!e&&this._super()}.property("updateCapability","isFulfilled"),updateButtonText:function(){var e=this.get("i18n");return this.get("model.hideFulfillRequest")?e.t("buttons.dispense"):this.get("isFulfilling")?e.t("labels.fulfill"):this._super()}.property("model.isNew","isFulfilling","model.hideFulfillRequest")})}),define("hospitalrun/medication/edit/route",["exports","ember-i18n","hospitalrun/routes/abstract-edit-route","ember","hospitalrun/mixins/fulfill-request","hospitalrun/mixins/inventory-locations","hospitalrun/mixins/patient-list-route","npm:uuid"],function(e,t,n,a,l,s,i,o){e.default=n.default.extend(l.default,s.default,i.default,{editTitle:(0,t.translationMacro)("medication.titles.editMedicationRequest"),modelName:"medication",newTitle:(0,t.translationMacro)("medication.titles.newMedicationRequest"),database:a.default.inject.service(),getNewData:function(e){var t=this.get("idParam"),n={selectPatient:!0,prescriptionDate:moment().startOf("day").toDate()};return"dispense"===e[t]&&(n.shouldFulfillRequest=!0,n.hideFulfillRequest=!0),n.id=o.default.v4(),a.default.RSVP.resolve(n)},model:function(e){var t=this.get("idParam");return!a.default.isEmpty(t)&&"new"===e[t]||"dispense"===e[t]?this._createNewRecord(e):this._super(e)},setupController:function(e,t){this._super(e,t);var n={key:"Medication",include_docs:!0},l=t.get("inventoryItem.id"),s=t.get("patient");a.default.isEmpty(l)&&this.get("database").queryMainDB(n,"inventory_by_type").then(function(t){var n=t.rows.map(function(e){return e.doc});e.set("medicationList",n)}),a.default.isEmpty(s)&&this._fetchPatientList(e)}})}),define("hospitalrun/medication/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"Xm0JjdeG",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],15]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection"],["expenseAccount",["helper",["t"],["labels.billTo"],null],["get",["expenseAccountList"]],["get",["model","expenseAccount"]]]]],false],["text","\\n "],["append",["helper",["inventory-location-picker"],null,[["label","quantityRequested","locationList","selectedLocations","class"],[["helper",["t"],["labels.pullFrom"],null],["get",["model","quantity"]],["get",["model","inventoryItem","availableLocations"]],["get",["model","inventoryLocations"]],"inventory-location"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["labels.fulfillRequest"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["labels.fulfillRequestNow"],null],"shouldFulfillRequest"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canFulfill"]]],null,1]],"locals":[]},{"statements":[["block",["if"],[["get",["model","isNew"]]],null,2]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-text"],null,[["property","label","rows","class"],["prescription",["helper",["t"],["labels.prescription"],null],"3",["get",["prescriptionClass"]]]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["prescriptionDate",["helper",["t"],["labels.prescriptionDate"],null],"col-sm-4"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["number-input"],null,[["property","label","class"],["quantity",["get",["quantityLabel"]],["get",["quantityClass"]]]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["refills",["helper",["t"],["medication.labels.refills"],null],"col-xs-3"]]],false],["text","\\n "],["close-element"],["text","\\n"],["block",["unless"],[["get",["model","hideFulfillRequest"]]],null,3],["block",["if"],[["get",["isFulfilling"]]],null,0]],"locals":[]},{"statements":[["text"," "],["append",["helper",["date-format"],[["get",["model","prescriptionDate"]]],null],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["static-text"],null,[["label","value"],[["helper",["t"],["labels.prescription"],null],["get",["model","prescription"]]]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n"],["block",["static-text"],null,[["label","class"],[["helper",["t"],["labels.prescriptionDate"],null],"col-xs-4"]],5],["text"," "],["append",["helper",["static-text"],null,[["label","class","value"],[["get",["quantityLabel"]],"col-xs-3",["get",["model","quantity"]]]]],false],["text","\\n "],["append",["helper",["static-text"],null,[["label","class","value"],[["helper",["t"],["medication.labels.refills"],null],"col-xs-3",["get",["model","refills"]]]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["labels.prescriber"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","requestedBy"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["inventory-typeahead"],null,[["property","label","content","selection","class"],["inventoryItemTypeAhead",["helper",["t"],["labels.medication"],null],["get",["medicationList"]],["get",["selectedInventoryItem"]],"required test-medication-input"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["labels.medication"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","medicationName"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group col-xs-3"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.visit"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","visit","visitDescription"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-select"],null,[["class","label","property","content","optionValuePath","optionLabelPath","prompt","selected"],["col-xs-4 required test-add-visit",["helper",["t"],["labels.visit"],null],"visit",["get",["patientVisitsForSelect"]],"selectObject","selectObject.visitDescription",["helper",["t"],["labels.addNewOutpatientVisit"],null],["get",["model","visit"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-typeahead"],null,[["property","label","content","selection","class"],["patientTypeAhead",["helper",["t"],["labels.patient"],null],["get",["patientList"]],["get",["selectedPatient"]],"col-xs-6 required test-patient-input"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-summary"],null,[["patient","returnTo","returnToContext","disablePatientLink"],[["get",["model","patient"]],"medication.edit",["get",["model","id"]],["get",["model","isNew"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["unless"],[["get",["model","selectPatient"]]],null,13],["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n"],["block",["if"],[["get",["model","selectPatient"]]],null,12],["block",["if"],[["get",["model","isNew"]]],null,11,10],["text"," "],["close-element"],["text","\\n"],["block",["if"],[["get",["isFulfilledOrRequested"]]],null,9,8],["block",["if"],[["get",["isFulfilledOrRequested"]]],null,7],["block",["if"],[["get",["isFulfilled"]]],null,6,4]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],14]],"locals":[]}],"hasPartials":false}', -meta:{moduleName:"hospitalrun/medication/edit/template.hbs"}})}),define("hospitalrun/medication/index/controller",["exports","hospitalrun/controllers/abstract-paged-controller","hospitalrun/mixins/user-session"],function(e,t,n){e.default=t.default.extend(n.default,{startKey:[],canAdd:function(){return this.currentUserCan("add_medication")}.property(),showActions:function(){return this.currentUserCan("fulfill_medication")}.property()})}),define("hospitalrun/medication/index/route",["exports","ember-i18n","hospitalrun/routes/abstract-index-route"],function(e,t,n){e.default=n.default.extend({modelName:"medication",pageTitle:(0,t.translationMacro)("medication.pageTitle"),searchStatus:"Requested",_getStartKeyFromItem:function(e){var t=e.get("prescriptionDateAsTime"),n=this._getPouchIdFromItem(e),a=e.get("requestedDateAsTime"),l=this.get("searchStatus");return[l,a,t,n]},_modelQueryParams:function(){var e=this._getMaxPouchId(),t=this.get("maxValue"),n=this._getMinPouchId(),a=this.get("searchStatus");return{options:{startkey:[a,null,null,n],endkey:[a,t,t,e]},mapReduce:"medication_by_status"}}})}),define("hospitalrun/medication/index/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"xGEaoO6P",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],6]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["open-element","a",[]],["static-attr","href","#"],["modifier",["action"],[["get",[null]],"newItem"]],["flush-element"],["append",["helper",["t"],["medication.messages.createNew"],null],false],["close-element"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["messages.noItemsFound"],null],false],["text"," "],["block",["if"],[["get",["canAdd"]]],null,0],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"editItem",["get",["medicationRequest"]]],[["bubbles"],[false]]],["flush-element"],["append",["helper",["t"],["labels.fulfill"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["static-attr","class","clickable"],["modifier",["action"],[["get",[null]],"editItem",["get",["medicationRequest"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["medicationRequest","prescriptionDate"]]],[["format"],["l h:mm A"]]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medicationRequest","patient","displayName"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medicationRequest","requestedBy"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medicationRequest","medicationName"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medicationRequest","quantity"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medicationRequest","status"]],false],["close-element"],["text","\\n"],["block",["if"],[["get",["showActions"]]],null,2],["text"," "],["close-element"],["text","\\n"]],"locals":["medicationRequest"]},{"statements":[["text"," "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.date"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.patient"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.prescriber"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.medication"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.quantity"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.status"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["showActions"]]],null,4],["text"," "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,3],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model"]]],null,5,1]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/medication/index/template.hbs"}})}),define("hospitalrun/medication/return/controller",["exports","ember-i18n","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/mixins/fulfill-request","hospitalrun/mixins/inventory-locations","hospitalrun/mixins/patient-submodule","hospitalrun/utils/select-values"],function(e,t,n,a,l,s,i,o){e.default=n.default.extend(l.default,s.default,i.default,{medicationController:a.default.inject.controller("medication"),medicationList:[],lookupListsToUpdate:[{name:"aisleLocationList",property:"model.aisleLocation",id:"aisle_location_list"},{name:"expenseAccountList",property:"model.expenseAccount",id:"expense_account_list"},{name:"warehouseList",property:"model.location",id:"warehouse_list"}],patientMedicationList:[],setNewMedicationList:!1,aisleLocationList:a.default.computed.alias("medicationController.aisleLocationList"),expenseAccountList:a.default.computed.alias("medicationController.expenseAccountList"),warehouseList:a.default.computed.alias("medicationController.warehouseList"),updateCapability:"add_medication",medicationChanged:function(){var e=this.get("model.medication");if(a.default.isEmpty(e))this.set("model.inventoryItem");else{var t=e.get("inventoryItem");this.set("model.inventoryItemTypeAhead",t.get("name")+" - "+t.get("friendlyId")),this.set("model.inventoryItem",t)}a.default.run.later(function(){this.get("model").validate().catch(a.default.K)}.bind(this))}.observes("model.medication"),patientVisitsChanged:function(){var e=this.get("patientVisits");a.default.isEmpty(e)||this.set("model.visit",e.get("firstObject"))}.observes("patientVisits"),showPatientMedicationList:function(){var e=this.get("patientMedicationList");return this.get("patientMedication"),!a.default.isEmpty(e)}.property("patientMedicationList","model.patient","model.visit"),patientMedication:function(){var e=this.get("setNewMedicationList"),t=this.get("model.visit");return e?this.set("setNewMedicationList",!1):a.default.isEmpty(t)||t.get("medication").then(function(e){e=e.filterBy("status","Fulfilled"),this.set("model.medication",e.get("firstObject")),this.set("patientMedicationList",e.map(o.default.selectObjectMap)),this.set("setNewMedicationList",!0)}.bind(this)),this.get("patientMedicationList")}.property("setNewMedicationList","model.patient","model.visit"),_finishUpdate:function(){var e=this.get("model.deliveryAisle"),t=this.get("model.deliveryLocation"),n=this.get("model.inventoryItem");this._findOrCreateLocation(n,t,e).then(function(e){this.set("model.adjustPurchases",!0),this.set("model.inventoryLocations",[e]),this.set("model.markAsConsumed",!0),this.get("model.inventoryItem").then(function(){this.send("fulfillRequest",this.get("model"),!1,!0,!0)}.bind(this))}.bind(this))},actions:{doneFulfillRequest:function(){var e=this.get("i18n");this.updateLookupLists(),this.displayAlert(e.t("medication.alerts.returnedTitle"),e.t("medication.alerts.returnedMessage"),"allItems")},update:function(){var e=this.get("model.medication"),t=this.get("model.quantity");a.default.isEmpty(e)?this._finishUpdate():e.reload().then(function(){e.decrementProperty("quantity",t),e.get("quantity")<0&&e.set("quantity",0),e.save().then(this._finishUpdate.bind(this))}.bind(this))}},updateButtonText:(0,t.translationMacro)("medication.returnMedication")})}),define("hospitalrun/medication/return/route",["exports","ember-i18n","hospitalrun/medication/edit/route","ember"],function(e,t,n,a){e.default=n.default.extend({editTitle:(0,t.translationMacro)("medication.returnMedication"),modelName:"inv-request",newTitle:(0,t.translationMacro)("medication.returnMedication"),getNewData:function(){return a.default.RSVP.resolve({dateCompleted:new Date,selectPatient:!0,transactionType:"Return"})}})}),define("hospitalrun/medication/return/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"YZt6viXc",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],3]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["inventory-typeahead"],null,[["property","label","content","selection","class","showQuantity"],["inventoryItemTypeAhead",["helper",["t"],["labels.medication"],null],["get",["medicationList"]],["get",["selectedInventoryItem"]],"required test-medication-input",false]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-select"],null,[["class","label","property","content","optionValuePath","optionLabelPath","selected"],["required",["helper",["t"],["labels.medication"],null],"medication",["get",["patientMedication"]],"selectObject","selectObject.inventoryItem.name",["get",["model","medication"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["showPatientMedicationList"]]],null,1,0],["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["patient-typeahead"],null,[["property","label","content","selection","class"],["patientTypeAhead",["helper",["t"],["labels.patient"],null],["get",["patientList"]],["get",["selectedPatient"]],"col-xs-6"]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content","optionValuePath","optionLabelPath","selected"],["col-xs-6",["helper",["t"],["labels.visit"],null],"visit",["get",["patientVisitsForSelect"]],"selectObject","selectObject.visitDescription",["get",["model","visit"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["number-input"],null,[["property","label","class"],["quantity",["helper",["t"],["medication.labels.quantityToReturn"],null],"col-xs-3 required test-medication-quantity"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","className"],["deliveryLocation",["helper",["t"],["medication.labels.returnLocation"],null],["get",["warehouseList"]],["get",["model","location"]],"col-xs-4"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","className"],["deliveryAisle",["helper",["t"],["medication.labels.returnAisle"],null],["get",["aisleLocationList"]],["get",["model","aisleLocation"]],"col-xs-4"]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-text"],null,[["property","label","rows"],["reason",["helper",["t"],["medication.labels.returnReason"],null],"3"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["dateCompleted",["helper",["t"],["medication.labels.adjustmentDate"],null],"col-sm-4"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","className"],["expenseAccount",["helper",["t"],["medication.labels.creditToAccount"],null],["get",["expenseAccountList"]],["get",["model","expenseAccount"]],"col-sm-8"]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],2]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/medication/return/template.hbs"}})}),define("hospitalrun/medication/route",["exports","ember-i18n","hospitalrun/routes/abstract-module-route","ember"],function(e,t,n,a){e.default=n.default.extend({addCapability:"add_medication",moduleName:"medication",newButtonText:(0,t.translationMacro)("medication.buttons.newButton"),sectionTitle:(0,t.translationMacro)("medication.sectionTitle"),additionalButtons:function(){var e=this.get("i18n"),t=[];if(this.currentUserCan("fulfill_medication")&&t.push({buttonIcon:"octicon octicon-checklist",buttonAction:"dispenseMedication",buttonText:e.t("medication.buttons.dispenseMedication"),class:"btn btn-primary"}),this.currentUserCan(this.get("addCapability"))&&t.push({buttonIcon:"octicon octicon-mail-reply",buttonAction:"returnMedication",buttonText:e.t("medication.buttons.returnMedication"),class:"btn btn-primary"}),!a.default.isEmpty(t))return t}.property(),additionalModels:[{name:"aisleLocationList",findArgs:["lookup","aisle_location_list"]},{name:"expenseAccountList",findArgs:["lookup","expense_account_list"]},{name:"sexList",findArgs:["lookup","sex"]},{name:"warehouseList",findArgs:["lookup","warehouse_list"]}],actions:{dispenseMedication:function(){this.currentUserCan("fulfill_medication")&&this.transitionTo("medication.edit","dispense")},returnMedication:function(){this.currentUserCan(this.get("addCapability"))&&this.transitionTo("medication.return","new")}}})}),define("hospitalrun/medication/search/route",["exports","hospitalrun/routes/abstract-search-route"],function(e,t){e.default=t.default.extend({moduleName:"medication",searchKeys:[{name:"prescription",type:"contains"}],searchModel:"medication"})}),define("hospitalrun/medication/search/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"T9jkbT1t",block:'{"statements":[["block",["search-listing"],null,[["newButtonText","allButtonText"],[["helper",["t"],["buttons.newRequest"],null],["helper",["t"],["buttons.allRequests"],null]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["partial","medication/index"],["text","\\n"]],"locals":[]}],"hasPartials":true}',meta:{moduleName:"hospitalrun/medication/search/template.hbs"}})}),define("hospitalrun/mixins/active-link",["exports","ember-cli-active-link-wrapper/mixins/active-link"],function(e,t){e.default=t.default}),define("hospitalrun/mixins/add-new-patient",["exports","ember","hospitalrun/mixins/patient-id"],function(e,t,n){e.default=t.default.Mixin.create(n.default,{customForms:t.default.inject.service(),addedNewPatient:!1,newPatientId:null,actions:{addedNewPatient:function(e){this.send("closeModal"),this.set("addedNewPatient",!0),this.set("model.patient",e),this.set("newPatientId"),this.send("update")}},addNewPatient:function(){var e=this,n=this.get("i18n");this.displayAlert(n.t("alerts.pleaseWait"),n.t("messages.newPatientHasToBeCreated")),this._getNewPatientId().then(function(n){var a=e.get("model.patientTypeAhead"),l=a.split(" "),s={customForms:t.default.Object.create(),friendlyId:n,patientFullName:a,requestingController:e},i=e.get("customForms");return i.setDefaultCustomForms(["patient","socialwork"],s).then(function(){var t=void 0;l.length>=3?(s.firstName=l[0],s.middleName=l[1],s.lastName=l.splice(2,l.length).join(" ")):2===l.length?(s.firstName=l[0],s.lastName=l[1]):s.firstName=a,t=e.store.createRecord("patient",s),e.send("openModal","patients.quick-add",t)})})},_getNewPatientId:function(){var e=this.get("newPatientId");return t.default.isEmpty(e)?new t.default.RSVP.Promise(function(e,t){this.generateFriendlyId().then(function(t){this.set("newPatientId",t),e(t)}.bind(this),t)}.bind(this)):t.default.RSVP.resolve(e)}})}),define("hospitalrun/mixins/appointment-statuses",["exports","ember","hospitalrun/utils/select-values"],function(e,t,n){e.default=t.default.Mixin.create({appointmentStatusList:["Attended","Scheduled","Canceled","Missed"],appointmentStatuses:t.default.computed.map("appointmentStatusList",n.default.selectValuesMap),appointmentStatusesWithEmpty:function(){return n.default.selectValues(this.get("appointmentStatusList"),!0)}.property()})}),define("hospitalrun/mixins/billing-categories",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({defaultBillingCategories:["Hospital Charges"]})}),define("hospitalrun/mixins/blood-types",["exports","ember","hospitalrun/utils/select-values"],function(e,t,n){e.default=t.default.Mixin.create({bloodTypes:["A+","A-","AB-","AB+","B+","B-","O+","O-"].map(n.default.selectValuesMap)})}),define("hospitalrun/mixins/can-edit-requested",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({canEdit:function(){var e=this.get("status");return"Requested"===e}.property("status")})}),define("hospitalrun/mixins/charge-actions",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({chargePricingCategory:null,pricingList:null,pricingTypeForObjectType:null,pricingTypes:null,_createNewChargeRecord:function(e,n){return new t.default.RSVP.Promise(function(t,a){this.store.find("pricing",n).then(function(n){var l=this.store.createRecord("proc-charge",{dateCharged:new Date,quantity:e,pricingItem:n});l.save().then(function(e){var n=this.get("model.charges");n.addObject(e),t()}.bind(this),a)}.bind(this),a)}.bind(this),"_createNewChargeRecord with pricingId:"+n)},actions:{addCharge:function(e){var t=this.get("model.charges");t.addObject(e),this.send("update",!0),this.send("closeModal")},deleteCharge:function(e){var t=e.get("chargeToDelete"),n=this.get("model.charges");n.removeObject(t),t.destroyRecord(),this.send("update",!0),this.send("closeModal")},showAddCharge:function(){var e=this.get("store").createRecord("proc-charge",{dateCharged:new Date,quantity:1,pricingCategory:this.get("chargePricingCategory")});this.send("openModal",this.get("chargeRoute"),e)},showEditCharge:function(e){e.set("itemName",e.get("pricingItem.name")),e.set("pricingCategory",this.get("chargePricingCategory")),this.send("openModal",this.get("chargeRoute"),e)},showDeleteCharge:function(e){this.send("openModal","dialog",t.default.Object.create({confirmAction:"deleteCharge",title:"Delete Charge Item",message:"Are you sure you want to delete this charged item?",chargeToDelete:e,updateButtonAction:"confirm",updateButtonText:this.get("i18n").t("buttons.ok")}))},setChargeQuantity:function(e,t){var n=this.get("model");n.set(e,t)}},canAddCharge:function(){return this.currentUserCan("add_charge")}.property(),chargesPricingList:function(){var e=this.get("pricingList"),t=this.get("pricingTypeForObjectType");return e.filter(function(e){return e.type!==t})}.property("pricingList","pricingTypeForObjectType"),chargeRoute:null,findChargeForPricingItem:function(e,t){var n=t.find(function(t){var n=t.get("pricingItem.id");return e.id===n});return n},objectTypeList:function(){var e=this.get("pricingList"),n=this.get("pricingTypeForObjectType"),a=this.get("userCanAddPricingTypes"),l=t.default.Object.create({value:[],userCanAdd:a});return t.default.isEmpty(e)||l.set("value",e.filterBy("pricingType",n)),l}.property("pricingList","pricingTypeForObjectType","pricingTypeValues"),organizeByType:t.default.computed.alias("pricingTypes.organizeByType"),pricingTypeList:function(){var e=this.get("pricingList"),n=this.get("pricingTypeValues"),a=this.get("pricingTypeForObjectType");if(!t.default.isEmpty(n))return n=n.filter(function(n){var l=!1;return t.default.isEmpty(e)||(l=!t.default.isEmpty(e.findBy("pricingType",n))),l&&n!==a}),n=n.sortBy("name")}.property("pricingTypeValues","pricingTypeForObjectType","pricingList"),pricingTypeValues:t.default.computed.alias("pricingTypes.value"),createMultipleRequests:function(e,t,n,a){var l=e.get("firstObject"),s=this.get("model");s.set(t,l),this.addChildToVisit(s,n,a).then(function(l){s.save().then(function(){this._finishCreateMultipleRequests(e,t,n,a,l)}.bind(this))}.bind(this))},_finishCreateMultipleRequests:function(e,n,a,l,s){var i={},o=this.get("model"),r=void 0,d=[],c=this.get("model.patient"),u=[];o.eachAttribute(function(e){i[e]=o.get(e)}),e.forEach(function(e,t){t>0&&(r=this.store.createRecord(l.toLowerCase(),i),r.set(n,e),r.set("patient",c),r.set("visit",s),d.push(r),u.push(r.save()))}.bind(this)),t.default.RSVP.all(u).then(function(){var e=[];d.forEach(function(t){e.push(this.addChildToVisit(t,a,l))}.bind(this)),t.default.RSVP.all(e).then(function(e){this.afterUpdate(e,!0)}.bind(this))}.bind(this))},saveNewPricing:function(e,n,a){return new t.default.RSVP.Promise(function(t,l){var s=void 0,i=this.get("pricingTypeForObjectType");s=this.store.createRecord("pricing",{name:e,category:n,pricingType:i}),s.save().then(function(e){this.get("pricingList").addObject({id:e.get("id"),name:s.get("name")}),this.set(a,s),t()}.bind(this),l)}.bind(this),"saveNewPricing for: "+e)},getSelectedPricing:function(e){var n=this.get(e);return t.default.isEmpty(n)?t.default.RSVP.resolve():new t.default.RSVP.Promise(function(e,a){t.default.isArray(n)?this.store.findByIds("pricing",n).then(e,a):this.store.find("pricing",n.id).then(e,a)}.bind(this))},showAddCharge:function(){var e=this.get("canAddCharge"),t=this.get("organizeByType");return!!e&&!t}.property("canAddCharge","organizeByType"),showEditCharges:function(){var e=this.get("canAddCharge"),t=this.get("organizeByType");return!!e&&t}.property("canAddCharge","organizeByType"),showPricingTypeTabs:function(){var e=this.get("pricingTypeList");return!t.default.isEmpty(e)&&e.get("length")>1}.property("pricingTypeList"),userCanAddPricingTypes:function(){var e=this.get("pricingTypes");return!!t.default.isEmpty(e)||e.get("userCanAdd")}.property("pricingTypes"),updateCharges:function(){var e=this.get("model.charges"),n=this.get("organizeByType"),a=this.get("pricingList");return n?new t.default.RSVP.Promise(function(n,l){var s=[],i=this.get("model");a.forEach(function(n){var a=this.findChargeForPricingItem(n,i.get("charges")),l=i.get(n.id);t.default.isEmpty(l)?a&&(e.removeObject(a),s.push(a.destroyRecord())):a?a.get("quantity")!==l&&(a.set("quantity",l),s.push(a.save())):s.push(this._createNewChargeRecord(l,n.id))}.bind(this)),t.default.RSVP.all(s,"Charges updated for current record: "+this.get("model.id")).then(n,l)}.bind(this),"updateCharges for current record: "+this.get("model.id")):t.default.RSVP.resolve()}})}),define("hospitalrun/mixins/charge-route",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({database:t.default.inject.service(),actions:{deleteCharge:function(e){this.controller.send("deleteCharge",e)}},pricingList:null,afterModel:function(){return new t.default.RSVP.Promise(function(e,t){var n=this.get("database"),a=n.getMaxPouchId("pricing"),l=n.getMinPouchId("pricing"),s=this.get("pricingCategory"),i={startkey:[s,null,null,l],endkey:[s,{},{},a],include_docs:!0};n.queryMainDB(i,"pricing_by_category").then(function(t){var n=t.rows.map(function(e){return e.doc});this.set("pricingList",n),e()}.bind(this)).catch(t)}.bind(this))},setupController:function(e,t){this._super(e,t),e.set("pricingList",this.get("pricingList"))}})}),define("hospitalrun/mixins/custom-field-types",["exports","ember"],function(e,t){var n=t.default.computed;e.default=t.default.Mixin.create({fieldTypeValues:["checkbox","radio","select","text","textarea"],fieldTypes:n(function(){var e=this.get("i18n"),n=this.get("fieldTypeValues");return n.map(function(t){return{id:t,value:e.t("admin.customForms.labels."+t)}}).sort(function(e,n){return t.default.compare(e.value.toString(),n.value.toString())})})})}),define("hospitalrun/mixins/date-format",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({_dateFormat:function(e,n){if(t.default.isEmpty(n)&&(n="l"),!t.default.isEmpty(e))return moment(e).format(n)},dateToTime:function(e){if(!t.default.isEmpty(e)&&e.getTime)return e.getTime()}})}),define("hospitalrun/mixins/diagnosis-actions",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({editDiagnosis:function(e){e.set("editController",this),this.send("openModal","diagnosis.edit",e)},actions:{deleteDiagnosis:function(e){var t=this,n=this.get("model.diagnoses");n.removeObject(e),e.set("archived",!0),e.save().then(function(){t.send("closeModal"),t.send("update",!0)})},editDiagnosis:function(e){this.editDiagnosis(e)},showAddDiagnosis:function(){var e=this.get("store").createRecord("diagnosis",{date:new Date});this.editDiagnosis(e)}}})}),define("hospitalrun/mixins/dob-days",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({convertDOBToText:function(e,t,n){var a=new Date,l=0,s=0,i=0;e&&(void 0===e.getFullYear&&(e=moment(e,"l").toDate()),void 0!==e.getFullYear&&(l=a.getFullYear()-e.getFullYear(),(a.getMonth()0?d.t("dates.short",r):d.t("dates.shortOmitYears",r):n?l>1?d.t("dates.longOmitDaysPlural",r):1===l?d.t("dates.longOmitDays",r):d.t("dates.longOmitDaysYears",r):l>1?d.t("dates.longPlural",r):1===l?d.t("dates.long",r):d.t("dates.longOmitYears",r)}})}),define("hospitalrun/mixins/edit-panel-props",["exports","ember"],function(e,t){var n=t.default.computed,a=t.default.isEmpty,l=["actionForUpdateButton","additionalButtons","cancelButtonText","disabledAction","hideCancelButton","showUpdateButton","updateButtonAction","updateButtonIcon","updateButtonText"];e.default=t.default.Mixin.create({additionalButtons:null,cancelButtonText:null,disabledAction:null,hideCancelButton:null,showUpdateButton:null,updateButtonAction:null,updateButtonIcon:null,updateButtonText:null,actionForUpdateButton:n("disabledAction",function(){var e=this.get("disabledAction");return a(e)||e===!1?"updateButtonAction":"disabledAction"}),editPanelProps:n.apply(void 0,l.concat([function(){return this.getProperties(l)}]))})}),define("hospitalrun/mixins/filter-list",["exports","ember"],function(e,t){var n=t.default.isEmpty,a=t.default.String.isHTMLSafe;e.default=t.default.Mixin.create({filteredBy:new t.default.Map,filterList:function(e,t,l){var s=this.get("filteredBy");if(n(t)&&n(s))return e;n(t)||s.set(t,l),this.set("filteredBy",s);var i=e.filter(function(e){var t=!0;return s.forEach(function(l,s){var i=e.get(s);n(l)||(a(l)&&(l=l.toString()),a(i)&&(i=i.toString()),i!==l&&(t=!1))}),t});return i}})}),define("hospitalrun/mixins/fulfill-request",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({actions:{doneFulfillRequest:function(){},fulfillRequest:function(e,t,n,a){this.performFulfillRequest(e,t,n,a)}},performFulfillRequest:function(e,n,a,l){return new t.default.RSVP.Promise(function(s,i){var o=e.get("markAsConsumed"),r=e.get("transactionType");"Request"===r&&(r=null),e.get("inventoryItem").then(function(d){o?(e.set("adjustPurchases",!0),t.default.isEmpty(r)&&e.set("transactionType","Fulfillment"),this._performFulfillment(e,d,a).then(function(){this._finishFulfillRequest(e,d,n,a,l),s()}.bind(this),i)):(e.set("adjustPurchases",!1),t.default.isEmpty(r)&&e.set("transactionType","Transfer"),this._finishFulfillRequest(e,d,n,a,l),s())}.bind(this),i)}.bind(this))},_findQuantity:function(e,t,n,a){var l=void 0,s=[],i=n.get("quantity"),o=parseInt(e.get("quantity")),r=o,d=[],c=0;if(a){var u=t.get("lastObject");l=u.get("costPerUnit"),u.incrementProperty("currentQuantity",o),c+=l*r,d.push({id:u.get("id"),quantity:o}),s.addObject(u)}else{var p=t.any(function(e){var t=e.get("currentQuantity");return!(e.get("expired")||t<=0)&&(l=e.get("costPerUnit"),!!a||(r>t?(c+=l*t,r-=t,d.push({id:e.get("id"),quantity:parseInt(t)}),t=0):(c+=l*r,t-=r,d.push({id:e.get("id"),quantity:parseInt(r)}),r=0),e.set("currentQuantity",t),s.addObject(e),0===r))});if(!p)return"Could not find any purchases that had the required quantity: "+o}return e.set("costPerUnit",(c/o).toFixed(2)),e.set("quantityAtCompletion",i),e.set("purchasesAffected",d),e.set("purchases",s),n.updateQuantity(),!0},_finishFulfillRequest:function(e,n,a,l,s){var i=e.get("inventoryLocations"),o=[],r=e.get("markAsConsumed"),d=[],c=parseInt(e.get("quantity")),u=e.get("purchases");if(l){var p=i.get("firstObject");p.incrementProperty("quantity",c),d.push(p.save()),o.push({name:p.get("locationName"),quantity:c})}else i.reduce(function(t,a){var l=e.get("deliveryLocation"),s=e.get("deliveryAisle"),i=parseInt(a.get("quantity"));if(t>0)return r||(a.set("transferAisleLocation",s),a.set("transferLocation",l)),i>=t?(r?(a.decrementProperty("quantity",t),d.push(a.save())):(a.set("adjustmentQuantity",t),d.push(this.transferToLocation(n,a))),o.push({name:a.get("locationName"),quantity:t}),0):(r?(a.decrementProperty("quantity",i),d.push(a.save())):(a.set("adjustmentQuantity",i),d.push(this.transferToLocation(n,a))),o.push({name:a.get("locationName"),quantity:i}),t-i)}.bind(this),c);e.set("locationsAffected",o),r&&u.forEach(function(e){d.push(e.save())}),t.default.RSVP.all(d,"Preliminary saving done for inventory fulfillment").then(function(){var l=[];l.push(n.save()),e.set("status","Completed"),e.set("completedBy",e.getUserName()),l.push(e.save()),t.default.RSVP.all(l,"All saving done for inventory fulfillment").then(function(){this.send("doneFulfillRequest"),a&&this.send("closeModal"),s||this.transitionTo("inventory.index")}.bind(this))}.bind(this))},_performFulfillment:function(e,n,a){return new t.default.RSVP.Promise(function(t,l){var s=n.get("purchases"),i=n.get("quantity"),o=e.get("quantity");if(a||i>=o){var r=this._findQuantity(e,s,n,a);r===!0?t():l(r)}else l("The quantity on hand, "+i+" is less than the requested quantity of "+o+".")}.bind(this))}})}),define("hospitalrun/mixins/hospitalrun-version",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({version:"0.9.17"})}),define("hospitalrun/mixins/inventory-adjustment-types",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({adjustmentTypes:[{name:"Add",type:"Adjustment (Add)"},{name:"Remove",type:"Adjustment (Remove)"},{name:"Return To Vendor",type:"Return To Vendor"},{name:"Return",type:"Return"},{name:"Write Off",type:"Write Off"}]})}),define("hospitalrun/mixins/inventory-id",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({generateId:function(){var e=1,n=999,a=(new Date).getTime(),l=Math.floor(Math.random()*(n-e+1))+e;return t.default.RSVP.resolve(a.toString(36)+"_"+l.toString(36))}})}),define("hospitalrun/mixins/inventory-locations",["exports","ember","npm:uuid"],function(e,t,n){e.default=t.default.Mixin.create({aisleToFind:null,locationToFind:null,_addQuantityToLocation:function(e,n,a,l){return new t.default.RSVP.Promise(function(t,s){this._findOrCreateLocation(e,a,l).then(function(e){e.incrementProperty("quantity",n),e.save().then(t,s)})}.bind(this))},_findOrCreateLocation:function(e,a,l){return new t.default.RSVP.Promise(function(t,s){var i=this,o=!1,r=e.get("locations");this.set("aisleToFind",l),this.set("locationToFind",a),o=r.find(this.findLocation,this),o?t(o):!function(){var e=i.get("store").createRecord("inv-location",{id:n.default.v4(),aisleLocation:l,location:a,quantity:0});r.addObject(e),e.save().then(function(){t(e)},s)}()}.bind(this))},findLocation:function(e){ -var n=e.get("aisleLocation"),a=this.get("aisleToFind"),l=e.get("location"),s=this.get("locationToFind");if((t.default.isEmpty(n)&&t.default.isEmpty(a)||n===a)&&(t.default.isEmpty(l)&&t.default.isEmpty(s)||l===s))return!0},newPurchaseAdded:function(e,n){return new t.default.RSVP.Promise(function(t,a){var l=n.get("aisleLocation"),s=n.get("location"),i=parseInt(n.get("originalQuantity"));this._addQuantityToLocation(e,i,s,l).then(t,a)}.bind(this))},saveLocation:function(e,t){if(0===e.get("quantity")){var n=t.get("locations");return n.removeObject(e),e.destroyRecord()}return e.save()},transferToLocation:function(e,n){var a=n.get("transferAisleLocation"),l=n.get("transferLocation"),s=parseInt(n.get("adjustmentQuantity"));return new t.default.RSVP.Promise(function(t,i){this._addQuantityToLocation(e,s,l,a).then(function(){n.decrementProperty("quantity",s),n.save().then(t,i)},i)}.bind(this))}})}),define("hospitalrun/mixins/inventory-type-list",["exports","ember","hospitalrun/utils/select-values"],function(e,t,n){e.default=t.default.Mixin.create({defaultInventoryTypes:["Medication","Supply"],inventoryTypes:function(){var e=this.get("defaultInventoryTypes"),a=this.get("inventoryTypeList"),l=void 0;return l=t.default.isEmpty(a)?e:a,l=n.default.selectValues(l)}.property("inventoryTypeList","defaultInventoryTypes")})}),define("hospitalrun/mixins/is-update-disabled",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({isUpdateDisabled:function(){return!t.default.isNone(this.get("model.isValid"))&&!this.get("model.isValid")}.property("model.isValid")})}),define("hospitalrun/mixins/location-name",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({getDisplayLocationName:function(e,n){var a=this.formatLocationName(e,n);return t.default.isEmpty(a)&&(a="No Location"),a},formatLocationName:function(e,n){var a="";return t.default.isEmpty(e)||(a+=e,t.default.isEmpty(n)||(a+=" : ")),t.default.isEmpty(n)||(a+=n),a},locationName:function(){var e=this.get("aisleLocation"),t=this.get("location");return this.getDisplayLocationName(t,e)}.property("location","aisleLocation")})}),define("hospitalrun/mixins/medication-details",["exports","ember","ember-data"],function(e,t,n){e.default=t.default.Mixin.create({getMedicationName:function(e){var n=this,a=this.get("medicationTitle");if(!t.default.isEmpty(a))return a;var l=this.get(e);l.then?l.then(function(e){n.set("medicationTitle",e.get("name"))}):this.set("medicationTitle",l.get("name"))},getMedicationPrice:function(e){var n=this,a=this.get("priceOfMedication");if(!t.default.isEmpty(a))return a;var l=this.get(e);l.then?l.then(function(e){n.set("priceOfMedication",e.get("price"))}):this.set("priceOfMedication",l.get("price"))},getMedicationDetails:function(e){var n=this;return new t.default.RSVP.Promise(function(a){var l=n.get("medicationTitle"),s=n.get("priceOfMedication");if(t.default.isEmpty(l)||t.default.isEmpty(s)){var i=n.get(e);i.then?i.then(function(e){a({name:e.get("name"),price:e.get("price")})}):a({name:i.get("name"),price:i.get("price")})}else a({name:l,price:s})})},medicationTitle:n.default.attr("string"),priceOfMedication:n.default.attr("number"),rxNormIdentifier:n.default.attr("string")})}),define("hospitalrun/mixins/modal-helper",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({displayAlert:function(e,n,a,l,s){var i=this.get("i18n"),o=t.default.Object.extend({updateButtonText:i.t("buttons.ok")});this.send("openModal","dialog",o.create({cancelAction:s,hideCancelButton:!0,message:n,okAction:a,okContext:l,title:e,updateButtonAction:"ok"}))},displayConfirm:function(e,n,a,l){t.default.isEmpty(l)&&(l=t.default.Object.create()),l.set("confirmAction",a),l.set("title",e),l.set("message",n),l.set("updateButtonAction","confirm"),l.set("updateButtonText","Ok"),this.send("openModal","dialog",l)}})}),define("hospitalrun/mixins/navigation",["exports","ember"],function(e,t){var n=t.default.String.camelize;e.default=t.default.Mixin.create({navItems:[{title:"Inventory",iconClass:"octicon-package",route:"inventory",capability:"inventory",subnav:[{title:"Requests",iconClass:"octicon-chevron-right",route:"inventory.index",capability:"add_inventory_request"},{title:"Items",iconClass:"octicon-chevron-right",route:"inventory.listing",capability:"inventory"},{title:"Inventory Received",iconClass:"octicon-plus",route:"inventory.batch",subroute:"new",capability:"add_inventory_item"},{title:"Reports",iconClass:"octicon-chevron-right",route:"inventory.reports",capability:"inventory"}]},{title:"Patients",iconClass:"octicon-organization",route:"patients",capability:"patients",subnav:[{title:"Patient Listing",iconClass:"octicon-chevron-right",route:"patients",capability:"patients"},{title:"Admitted Patients",iconClass:"octicon-chevron-right",route:"patients.admitted",capability:"patients"},{title:"Outpatient",iconClass:"octicon-chevron-right",route:"patients.outpatient",capability:"patients"},{title:"New Patient",iconClass:"octicon-plus",route:"patients.edit",subroute:"new",capability:"add_patient"},{title:"Reports",iconClass:"octicon-chevron-right",route:"patients.reports",capability:"patients"}]},{title:"Appointments",iconClass:"octicon-calendar",route:"appointments.index",capability:"appointments",subnav:[{title:"This Week",iconClass:"octicon-chevron-right",route:"appointments.index",capability:"appointments"},{title:"Today",iconClass:"octicon-chevron-right",route:"appointments.today",capability:"appointments"},{title:"Missed",iconClass:"octicon-chevron-right",route:"appointments.missed",capability:"appointments"},{title:"Search",iconClass:"octicon-search",route:"appointments.search",capability:"appointments"},{title:"Add Appointment",iconClass:"octicon-plus",route:"appointments.edit",subroute:"new",capability:"add_appointment"}]},{title:"Imaging",iconClass:"octicon-device-camera",route:"imaging.index",capability:"imaging",subnav:[{title:"Requests",iconClass:"octicon-chevron-right",route:"imaging.index",capability:"imaging"},{title:"Completed",iconClass:"octicon-chevron-right",route:"imaging.completed",capability:"imaging"},{title:"New Request",iconClass:"octicon-plus",route:"imaging.edit",subroute:"new",capability:"add_imaging"}]},{title:"Medication",iconClass:"octicon-file-text",route:"medication.index",capability:"medication",subnav:[{title:"Requests",iconClass:"octicon-chevron-right",route:"medication.index",capability:"medication"},{title:"Completed",iconClass:"octicon-chevron-right",route:"medication.completed",capability:"medication"},{title:"New Request",iconClass:"octicon-plus",route:"medication.edit",subroute:"new",capability:"add_medication"},{title:"Dispense",iconClass:"octicon-checklist",route:"medication.edit",subroute:"dispense",capability:"fulfill_medication"},{title:"Return Medication",iconClass:"octicon-mail-reply",route:"medication.return",subroute:"new",capability:"add_medication"}]},{title:"Labs",iconClass:"octicon-microscope",route:"labs.index",capability:"labs",subnav:[{title:"Requests",iconClass:"octicon-chevron-right",route:"labs.index",capability:"labs"},{title:"Completed",iconClass:"octicon-chevron-right",route:"labs.completed",capability:"labs"},{title:"New Request",iconClass:"octicon-plus",route:"labs.edit",subroute:"new",capability:"add_lab"}]},{title:"Billing",iconClass:"octicon-credit-card",route:"invoices.index",capability:"invoices",subnav:[{title:"Invoices",iconClass:"octicon-chevron-right",route:"invoices.index",capability:"invoices"},{title:"New Invoice",iconClass:"octicon-plus",route:"invoices.edit",subroute:"new",capability:"invoices"},{title:"Prices",iconClass:"octicon-chevron-right",route:"pricing.index",capability:"invoices"},{title:"Price Profiles",iconClass:"octicon-chevron-right",route:"pricing.profiles",capability:"invoices"}]},{title:"Administration",iconClass:"octicon-person",route:"admin.lookup",capability:"admin",subnav:[{title:"Address Fields",iconClass:"octicon-chevron-right",route:"admin.address",capability:"update_config"},{title:"Custom Forms",iconClass:"octicon-chevron-right",route:"admin.custom-forms",capability:"update_config"},{title:"Load DB",iconClass:"octicon-plus",route:"admin.loaddb",capability:"load_db"},{title:"Lookup Lists",iconClass:"octicon-chevron-right",route:"admin.lookup",capability:"update_config"},{title:"Users",iconClass:"octicon-chevron-right",route:"users",capability:"users"},{title:"New User",iconClass:"octicon-plus",route:"users.edit",subroute:"new",capability:"add_user"},{title:"User Roles",iconClass:"octicon-chevron-right",route:"admin.roles",capability:"define_user_roles"},{title:"Workflow",iconClass:"octicon-chevron-right",route:"admin.workflow",capability:"update_config"}]}],localizedNavItems:t.default.computed("navItems.[]",function(){var e=this,a="navigation.",l=function(e,t){return"string"==typeof e?t:e};return this.get("navItems").map(function(s){var i=a+n(s.title).toLowerCase(),o=e.get("i18n").t(i);return t.default.set(s,"localizedTitle",l(o,s.title)),s.subnav=s.subnav.map(function(t){var s=a+"subnav."+n(t.title),i=e.get("i18n").t(s);return t.localizedTitle=l(i,t.title),t}),s})})})}),define("hospitalrun/mixins/number-format",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({_calculateTotal:function(e,n){var a=void 0,l=0;return a=t.default.isArray(e)?e:this.get(e),l=a.reduce(function(e,a){return e+=this._getValidNumber(t.default.get(a,n))}.bind(this),0),this._numberFormat(l,!0)},_getValidNumber:function(e){return t.default.isEmpty(e)||isNaN(e)?0:Number(e)},_numberFormat:function(e,n){var a=void 0;if(!t.default.isEmpty(e)){if(isNaN(e))return;return a=Math.round(e)===e?Number(e).toString():this._round100(e).toFixed(2),n?Number(a):a.replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,")}},_validNumber:function(e){return!t.default.isEmpty(e)&&!isNaN(e)&&e>0},_round100:function(e){var t=100*e;return Math.round(t)/100}})}),define("hospitalrun/mixins/operative-plan-statuses",["exports","ember"],function(e,t){var n=t.default.computed,a="completed";e.COMPLETED_STATUS=a;var l="dropped";e.DROPPED_STATUS=l;var s="planned";e.PLANNED_STATUS=s;var i=[a,l,s];e.default=t.default.Mixin.create({planStatuses:n(function(){var e=this.get("i18n");return i.map(function(t){return{id:t,value:e.t("operativePlan.labels."+t+"Status")}}).sort(function(e,n){return t.default.compare(e.value.toString(),n.value.toString())})})})}),define("hospitalrun/mixins/pagination-props",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({paginationProps:function(){var e=["disableNextPage","disablePreviousPage","showFirstPageButton","showLastPageButton","showPagination"];return this.getProperties(e)}.property("disableNextPage","disablePreviousPage","showFirstPageButton","showLastPageButton","showPagination")})}),define("hospitalrun/mixins/paging-actions",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({firstPage:"firstPage",lastPage:"lastPage",nextPage:"nextPage",previousPage:"previousPage",actions:{firstPage:function(){this.sendAction("firstPage")},lastPage:function(){this.sendAction("lastPage")},nextPage:function(){this.sendAction("nextPage")},previousPage:function(){this.sendAction("previousPage")}}})}),define("hospitalrun/mixins/patient-appointments",["exports","ember","hospitalrun/mixins/pouchdb"],function(e,t,n){e.default=t.default.Mixin.create(n.default,{getPatientAppointments:function(e){var t=e.get("id"),n=this.get("maxValue");return this.store.query("appointment",{options:{startkey:[t,null,null,"appointment_"],endkey:[t,n,n,n]},mapReduce:"appointments_by_patient"})}})}),define("hospitalrun/mixins/patient-diagnosis",["exports","ember"],function(e,t){var n=t.default.isEmpty;e.default=t.default.Mixin.create({_addDiagnosisToList:function(e,n){t.default.isEmpty(e)||t.default.isEmpty(n.findBy("description",e))&&n.addObject(e)},getDiagnoses:function(e,t,a){var l=this,s=arguments.length<=3||void 0===arguments[3]?"diagnoses":arguments[3],i=[];if(!n(e)){var o=e.get(s);return t&&(o=o.filterBy("active",!0)),a||(a=!1),o=o.filterBy("secondaryDiagnosis",a),o.forEach(function(e){l._addDiagnosisToList(e,i)}),i}}})}),define("hospitalrun/mixins/patient-id",["exports","ember"],function(e,t){function n(e,t){return t<1e5&&(t=("00000"+t).slice(-5)),""+e+t}e.sequenceId=n;var a=t.default.inject,l=t.default.isEmpty;e.default=t.default.Mixin.create({idPrefix:null,database:a.service(),config:a.service(),generateFriendlyId:function(){var e=this,t=this.get("config"),a=this.get("database"),s=a.getMaxPouchId("patient"),i=function e(i){var o=void 0,r=void 0;return t.getPatientPrefix().then(function(e){o=i.get("value"),r=n(e,o);var t={startkey:[r,null],endkey:[r,s]};return a.queryMainDB(t,"patient_by_display_id")}).then(function(t){return l(t.rows)?i.get("hasDirtyAttributes")?i.save().then(function(){return r}):r:(i.incrementProperty("value"),e(i))})};return this.store.find("sequence","patient").then(i).catch(function(){var t=e.get("store"),n=t.push(t.normalize("sequence",{id:"patient",value:1}));return i(n)})}})}),define("hospitalrun/mixins/patient-invoices",["exports","ember","hospitalrun/mixins/pouchdb"],function(e,t,n){e.default=t.default.Mixin.create(n.default,{getPatientInvoices:function(e){var t=e.get("id");return this.store.query("invoice",{options:{key:t},mapReduce:"invoice_by_patient"})}})}),define("hospitalrun/mixins/patient-list-route",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({database:t.default.inject.service(),_fetchPatientList:function(e){var t={startkey:"patient_",endkey:"patient_￿",include_docs:!0},n=this.get("database");n.queryMainDB(t).then(function(t){if(t.rows){var n=t.rows.map(function(e){return e.doc});e.set("patientList",n)}})},actions:{returnToPatient:function(){this.controller.send("returnToPatient"),this.controller.send("closeModal")},returnToVisit:function(){this.controller.send("returnToVisit")}},setupController:function(e,t){this._super(e,t),this._fetchPatientList(e)}})}),define("hospitalrun/mixins/patient-name",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({getPatientDisplayId:function(e){var n=t.default.get(e,"externalPatientId"),a=t.default.get(e,"friendlyId"),l=t.default.get(e,"id");return t.default.isEmpty(a)?t.default.isEmpty(n)?l:n:a},getPatientDisplayName:function(e,n){var a=t.default.get(e,"firstName"),l=t.default.get(e,"lastName"),s=t.default.get(e,"middleName"),i=[];return t.default.isEmpty(a)||i.push(a),t.default.isEmpty(s)||n||i.push(s),t.default.isEmpty(l)||i.push(l),i.join(" ")}})}),define("hospitalrun/mixins/patient-notes",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({canAddNote:function(){return this.currentUserCan("add_note")&&(!t.default.isEmpty(this.get("visits"))||!t.default.isEmpty(this.get("model.visits")))},canDeleteNote:function(){return this.currentUserCan("delete_note")},_computeNoteType:function(e){switch(e.get("visitType")){case"Admission":return t.default.isEmpty(e.get("procedures"))?"Pre-op":"Post-op";case"Clinic":case"Followup":return"General";default:return e.get("visitType")}},_setNoteType:function(){var e=this.get("model");null==e.get("noteType")&&e.set("noteType",this._computeNoteType(e.get("visit")))}})}),define("hospitalrun/mixins/patient-submodule",["exports","ember-data","ember","hospitalrun/mixins/patient-visits","hospitalrun/utils/select-values"],function(e,t,n,a,l){var s=n.default.get,i=n.default.isEmpty;e.default=n.default.Mixin.create(a.default,{findPatientVisits:!0,needToUpdateVisit:!1,patientList:null,selectedPatient:null,newVisitAdded:null,actions:{showPatient:function(e){this.transitionToRoute("patients.edit",e)},returnToAllItems:function(){this._cancelUpdate(),this.send("allItems")},returnToPatient:function(){this._cancelUpdate(),this.transitionToRoute("patients.edit",this.get("model.returnToPatient"))},returnToVisit:function(){this._cancelUpdate(),this.transitionToRoute("visits.edit",this.get("model.returnToVisit"))},selectedPatientChanged:function(e){var t=this;n.default.isEmpty(e)?(this.set("model.patient",null),this.patientSelected()):this.store.find("patient",e.id).then(function(e){t.set("model.patient",e),t.patientSelected(e),n.default.run.once(t,function(){this.get("model").validate().catch(n.default.K)})})}},addChildToVisit:function(e,t,a){return new n.default.RSVP.Promise(function(l,s){var i=this.get("model.visit");n.default.isEmpty(i)?i=this.createNewVisit(a).then(function(n){this._finishAddChildToVisit(e,t,n,l,s)}.bind(this),s):this._finishAddChildToVisit(e,t,i,l,s)}.bind(this))},addDiagnosisToModelAndPatient:function(e){var t=this,n=this.get("model.diagnoses");n.addObject(e);var a=this.get("model.patient.diagnoses"),l=a.any(function(t){return t.get("active")===!0&&t.get("diagnosis")===e.get("diagnosis")&&t.get("secondaryDiagnosis")===e.get("secondaryDiagnosis")});if(l)this.send("update",!0),this.send("closeModal");else{a.addObject(e);var s=this.get("model.patient");s.save().then(function(){t.send("update",!0),t.send("closeModal")})}},_finishAddChildToVisit:function(e,t,n,a,l){n.get(t).then(function(t){t.addObject(e),this.set("needToUpdateVisit",!0),a(n)}.bind(this),l)},cancelAction:function(){var e=this.get("model.returnToPatient"),t=this.get("model.returnToVisit");return i(t)?i(e)?"returnToAllItems":"returnToPatient":"returnToVisit"}.property("model.returnToPatient","model.returnToVisit"),createNewVisit:function(e){return new n.default.RSVP.Promise(function(t,n){var a=this.get("model"),l=a.get("patient"),s=this.get("store").createRecord("visit",{startDate:new Date,endDate:new Date,outPatient:!0,patient:l,visitType:e});a.set("visit",s),s.save().then(function(){s.reload().then(function(e){this.set("newVisitAdded",e),a.set("visit",e),t(e)}.bind(this),n)}.bind(this),n).catch(function(e){console.log("Error creating new visit"),n(e)}.bind(this))}.bind(this))},deleteChildFromVisit:function(e){var t=this,n=this.get("model");n.set("archived",!0),this.removeChildFromVisit(n,e).then(function(){n.save().then(function(){n.unloadRecord(),t.send("closeModal")})})},getPatientDiagnoses:function(e,t){var n=this,a=e.get("diagnoses"),l=void 0;i(a)||(l=a.filterBy("active",!0).map(function(e){var t=e.get("diagnosis"),a=e.getProperties("active","date","diagnosis","secondaryDiagnosis");return a.diagnosis=t,n.store.createRecord("diagnosis",a)}));var o=s(t,"diagnoses");o.clear(),i(l)||o.addObjects(l)},patientId:n.default.computed.alias("model.patient.id"),patientSelected:function(){},patientVisits:function(){var e=this.get("model.patient"),a=void 0;return a=!n.default.isEmpty(e)&&this.get("findPatientVisits")?this.getPatientVisits(e):n.default.RSVP.resolve([]),t.default.PromiseArray.create({promise:a})}.property("model.patient.id","newVisitAdded"),patientVisitsForSelect:function(){return t.default.PromiseArray.create({promise:this.get("patientVisits").then(function(e){return e.map(l.default.selectObjectMap)})})}.property("patientVisits.[]"),removeChildFromVisit:function(e,t){return new n.default.RSVP.Promise(function(a,l){var s=[],i=this.get("model.visit");s.addObjects(this.resolveVisitChildren()),n.default.RSVP.all(s,"Resolved visit children before removing "+t).then(function(){i.get(t).then(function(t){t.removeObject(e),i.save().then(a,l)}.bind(this),l)}.bind(this),l)}.bind(this))},resolveVisitChildren:function(){var e=[],t=this.get("model.visit");return n.default.isEmpty(t)||(e.push(t.get("imaging")),e.push(t.get("labs")),e.push(t.get("medication")),e.push(t.get("procedures")),e.push(t.get("vitals"))),e},saveNewDiagnoses:function(){var e=this.get("model.diagnoses");if(e=e.filterBy("isNew",!0),i(e))return n.default.RSVP.resolve();var t=e.map(function(e){return e.save()});return n.default.RSVP.all(t)},saveVisitIfNeeded:function(e,t,n){this.get("needToUpdateVisit")?this.get("model.visit").save().then(function(){this.set("needToUpdateVisit",!1),this.displayAlert(e,t,n)}.bind(this)):this.displayAlert(e,t,n)},visitId:n.default.computed.alias("model.visit.id"),visitsController:n.default.computed.alias("controllers.visits")})}),define("hospitalrun/mixins/patient-visits",["exports","ember","hospitalrun/mixins/pouchdb","hospitalrun/utils/visit-statuses"],function(e,t,n,a){var l=t.default.isEmpty;e.default=t.default.Mixin.create(n.default,{getPatientVisits:function(e){var t=this.get("maxValue"),n=e.get("id");return this.store.query("visit",{options:{startkey:[n,null,null,null,"visit_"],endkey:[n,t,t,t,t]},mapReduce:"visit_by_patient",debug:!0})},checkoutVisit:function(e,t){var n=this;return e.set("status",t),e.set("endDate",new Date),e.save().then(function(l){return n.updatePatientVisitFlags(l).then(function(){var l=n.get("i18n"),s={patientName:e.get("patient.displayName")},i=void 0,o=void 0;t===a.default.CHECKED_OUT?(i=l.t("visits.messages.checkedOut",s),o=l.t("visits.titles.checkedOut")):(i=l.t("visits.messages.discharged",s),o=l.t("visits.titles.discharged")),n.displayAlert(o,i)})})},updatePatientVisitFlags:function(e){var n=e.get("patient"),l=n.get("admitted"),s=n.get("checkedIn"),i=this.get("model.status");return i!==a.default.ADMITTED||l?i!==a.default.CHECKED_IN||s?i===a.default.CHECKED_OUT&&s?this._updateUnlessVisitStatusExists(n,a.default.CHECKED_IN,"checkedIn"):i===a.default.DISCHARGED&&l?this._updateUnlessVisitStatusExists(n,a.default.ADMITTED,"admitted"):t.default.RSVP.resolve():(n.set("checkedIn",!0),n.save()):(n.set("admitted",!0),n.save())},_updateUnlessVisitStatusExists:function(e,t,n){return this.getPatientVisits(e).then(function(a){if(l(a.findBy("status",t)))return e.set(n,!1),e.save()})}})}),define("hospitalrun/mixins/payment-profiles",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({paymentProfiles:["Private","Discounted","Free"]})}),define("hospitalrun/mixins/pouch-adapter-utils",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({session:t.default.inject.service(),_pouchError:function(e){return function(n){if(401===n.status){var a=this.get("session");!t.default.isEmpty(a)&&a.get("isAuthenticated")&&a.invalidate()}var l=[n.status,(n.name||n.error)+":",n.message||n.reason].join(" ");t.default.run(null,e,l)}.bind(this)}})}),define("hospitalrun/mixins/pouchdb",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({maxValue:"￿"})}),define("hospitalrun/mixins/progress-dialog",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({progressDialog:null,progressDialogDefaults:{showProgress:!0,hideCancelButton:!0,hideUpdateButton:!0,progressBarValue:0,progressBarStyle:"width: 0%;"},progressInterval:500,progressMessage:null,progressTimer:null,progressTitle:null,scheduleProgress:function(e){return t.default.run.later(this,function(){e.apply(this),this.set("progressTimer",this.scheduleProgress(e))},this.get("progressInterval"))},updateProgressBar:function(){var e=this.get("progressDialog"),n=e.get("progressBarValue");n+=10,n>100&&(n=0),e.set("progressBarValue",n);var a=t.default.String.htmlSafe("width: "+n+"%");e.set("progressBarStyle",a)},closeProgressModal:function(){t.default.run.cancel(this.get("progressTimer")),this.send("closeModal")},showProgressModal:function(){var e=t.default.Object.create(this.get("progressDialogDefaults"));e.progressBarStyle=t.default.String.htmlSafe(e.progressBarStyle),e.set("title",this.get("progressTitle")),e.set("message",this.get("progressMessage")),this.set("progressDialog",e),this.set("progressTimer",this.scheduleProgress(this.get("updateProgressBar"))),this.send("openModal","dialog",e)}})}),define("hospitalrun/mixins/publish-statuses",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({publishStatuses:["Draft","Published","Private","Archived"]})}),define("hospitalrun/mixins/result-validation",["exports","ember","ember-i18n"],function(e,t,n){e.default=t.default.Mixin.create({validations:{result:{acceptance:{accept:!0,if:function(e){if(!e.get("hasDirtyAttributes"))return!1;var n=e.get("status"),a=e.get("result");return!("Completed"!==n||!t.default.isEmpty(a))},message:(0,n.translationMacro)("errors.result")}}}})}),define("hospitalrun/mixins/return-to",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({cancelAction:function(){var e=this.get("model.returnTo");return t.default.isEmpty(e)?"allItems":"returnTo"}.property("returnTo")})}),define("hospitalrun/mixins/setup-user-role",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({setupUserRole:function(){var e=this.get("session"),n=e.get("data.authenticated.role");return this.get("store").find("user-role",n.dasherize()).then(function(t){e.set("data.authenticated.userCaps",t.get("capabilities"));var n=e.get("store"),a=e.get("data");return n.persist(a),!0}).catch(t.default.K)}})}),define("hospitalrun/mixins/typeahead",["exports","ember-data","ember"],function(e,t,n){var a=n.default.computed,l=n.default.observer;e.default=n.default.Mixin.create({_mapContentItems:function(){var e=this,a=this.get("content");if(a){var l=a.filter(function(e){return!n.default.isEmpty(e)});return l=a instanceof t.default.RecordArray?l.map(function(t){var n=t.getProperties(e.get("displayKey"));return n[e.get("selectionKey")]=t,n}):l.map(function(t){var n={};return n[e.get("displayKey")]=t,n})}return[]},mappedContent:a("content",function(){return this._mapContentItems()}),contentChanged:l("content.[]",function(){var e=this.get("bloodhound");e&&(e.clear(),e.add(this._mapContentItems()))}),bloodhound:null,displayKey:"value",selectionKey:"value",hint:!0,highlight:!0,lastHint:null,limit:500,minlength:1,selectedItem:!1,inputElement:null,typeAhead:null,setOnBlur:!0,templates:null,selectedAction:null,_getSource:function(){var e=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace(this.get("displayKey")),queryTokenizer:Bloodhound.tokenizers.whitespace,local:this.get("mappedContent")});return e.initialize(),this.set("bloodhound",e),e.ttAdapter()},didInsertElement:function(){var e=this,t=this.$("input");this.set("inputElement",t);var a=t.typeahead({autoselect:!0,hint:this.get("hint"),highlight:this.get("highlight"),minLength:this.get("minlength")},{displayKey:this.get("displayKey"),limit:this.get("limit"),source:this._getSource(),templates:this.get("templates")});this.set("typeAhead",a),a.on("typeahead:selected",function(t,n){e.itemSelected(n[e.get("selectionKey")])}),a.on("typeahead:autocompleted",function(t,n){e.itemSelected(n[e.get("selectionKey")])}),this.get("setOnBlur")&&(t.on("keyup",function(){var t=e.$(".tt-hint"),n=t.val();e.set("lastHint",n),e.set("selectedItem",!1)}),t.on("blur",function(t){var a=e.get("selection"),l=t.target.value.trim();n.default.isEmpty(a)||(a.trim&&(a=a.trim()),e.set("selection",a)),e.get("selectedItem")||!function(){var s=e.get("lastHint"),i=!1;n.default.isEmpty(s)&&(s=l,i=!0),n.default.isEmpty(l)||n.default.isEmpty(s)?n.default.isEmpty(l)&&e.itemSelected():e.get("bloodhound").search(s,function(n){n.length>0?i&&s.toLowerCase()!==n[0][e.get("displayKey")].toLowerCase()||(e.itemSelected(n[0][e.get("selectionKey")]),t.target.value=n[0][e.get("displayKey")],e.get("model").set(e.get("propertyName"),t.target.value)):l!==a&&e.itemSelected()})}()}))},itemSelected:function(e){this.set("selection",e),this.set("selectedItem",!0);var t=this.get("selectedAction");n.default.isEmpty(t)||this.sendAction("selectedAction",e)},willDestroyElement:function(){this.get("inputElement").typeahead("destroy")}})}),define("hospitalrun/mixins/unit-types",["exports","ember","hospitalrun/utils/select-values"],function(e,t,n){e.default=t.default.Mixin.create({defaultUnitList:["ampoule","bag","bottle","box","bundle","capsule","case","container","cream","each","gel","nebule","ointment","pack","pair","pallet","patch","pcs","pill","plastic","polyamp","roll","spray","suppository","suspension","set","syrup","tablet","tray","tube","vial"],unitList:function(){var e=this.get("defaultUnitList"),n=this.get("inventoryUnitList");return t.default.isEmpty(n)?e:n}.property("inventoryUnitList","defaultUnitList"),unitListForSelect:t.default.computed.map("unitList",n.default.selectValuesMap)})}),define("hospitalrun/mixins/user-roles",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({userRoles:[{name:"Data Entry",roles:["Data Entry","user"]},{name:"Doctor",roles:["Doctor","user"]},{name:"Finance",roles:["Finance","user"]},{name:"Finance Manager",roles:["Finance Manager","user"]},{name:"Hospital Administrator",roles:["Hospital Administrator","user"]},{name:"Inventory Manager",roles:["Inventory Manager","user"]},{name:"Imaging Technician",roles:["Imaging Technician","user"]},{name:"Lab Technician",roles:["Lab Technician","user"]},{name:"Medical Records Officer",roles:["Medical Records Officer","user"]},{name:"Nurse",roles:["Nurse","user"]},{name:"Nurse Manager",roles:["Nurse Manager","user"]},{name:"Patient Administration",roles:["Patient Administration","user"]},{name:"Pharmacist",roles:["Pharmacist","user"]},{name:"Social Worker",roles:["Social Worker","user"]},{name:"System Administrator",roles:["System Administrator","admin","user"]},{name:"User Administrator",roles:["User Administrator","admin","user"]}]})}),define("hospitalrun/mixins/user-session",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({session:t.default.inject.service(),defaultCapabilities:{admin:["User Administrator","System Administrator"],add_allergy:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Patient Administration","System Administrator"],appointments:["Data Entry","Finance","Hospital Administrator","Medical Records Officer","Patient Administration","Social Worker","System Administrator"],add_appointment:["Data Entry","Finance","Hospital Administrator","Medical Records Officer","Patient Administration","Social Worker","System Administrator"],add_charge:["Data Entry","Hospital Administrator","Medical Records Officer","System Administrator"],add_billing_diagnosis:["Data Entry","Hospital Administrator","Medical Records Officer","System Administrator"],add_diagnosis:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Patient Administration","System Administrator"],add_medication:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Pharmacist","System Administrator"],add_operative_plan:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Patient Administration","System Administrator"],add_operation_report:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Patient Administration","System Administrator"],add_photo:["Data Entry","Hospital Administrator","Medical Records Officer","Patient Administration","Social Worker","System Administrator"],add_patient:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Patient Administration","Social Worker","System Administrator"],add_pricing:["Data Entry","Finance","Hospital Administrator","Medical Records Officer","System Administrator"],add_pricing_profile:["Data Entry","Finance","Hospital Administrator","Medical Records Officer","System Administrator"],add_lab:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Lab Technician","System Administrator"],add_imaging:["Data Entry","Doctor","Hospital Administrator","Imaging Technician","Medical Records Officer","System Administrator"],add_inventory_request:["Data Entry","Hospital Administrator","Inventory Manager","Medical Records Officer","Nurse Manager","Pharmacist","System Administrator"],add_inventory_item:["Data Entry","Hospital Administrator","Inventory Manager","Medical Records Officer","System Administrator"],add_inventory_purchase:["Data Entry","Hospital Administrator","Inventory Manager","Medical Records Officer","System Administrator"],add_invoice:["Data Entry","Hospital Administrator","Medical Records Officer","System Administrator"],add_payment:["Hospital Administrator","Medical Records Officer","System Administrator"],add_procedure:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Nurse","Nurse Manager","Patient Administration","System Administrator"],add_socialwork:["Hospital Administrator","Medical Records Officer","Social Worker","System Administrator"], -add_user:["User Administrator","System Administrator"],add_visit:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Nurse","Nurse Manager","Patient Administration","Social Worker","System Administrator"],add_vitals:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Nurse","Nurse Manager","System Administrator"],admit_patient:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Nurse","Nurse Manager","Patient Administration","Social Worker","System Administrator"],adjust_inventory_location:["Hospital Administrator","Inventory Manager","Medical Records Officer","System Administrator"],billing:["Hospital Administrator","Finance","Finance Manager","System Administrator"],complete_imaging:["Imaging Technician","Medical Records Officer","System Administrator"],complete_lab:["Lab Technician","Medical Records Officer","System Administrator"],delete_appointment:["Hospital Administrator","Medical Records Officer","Patient Administration","Social Worker","System Administrator"],delete_diagnosis:["Doctor","Hospital Administrator","Medical Records Officer","Patient Administration","System Administrator"],delete_inventory_item:["Hospital Administrator","Inventory Manager","Medical Records Officer","System Administrator"],delete_imaging:["Doctor","Hospital Administrator","Medical Records Officer","System Administrator"],delete_invoice:["Hospital Administrator","System Administrator"],delete_lab:["Doctor","Hospital Administrator","Medical Records Officer","System Administrator"],delete_medication:["Doctor","Hospital Administrator","Medical Records Officer","System Administrator"],delete_photo:["Data Entry","Hospital Administrator","Medical Records Officer","Patient Administration","Social Worker","System Administrator"],delete_patient:["Hospital Administrator","Medical Records Officer","Patient Administration","System Administrator"],delete_pricing:["Finance","Data Entry","Hospital Administrator","Medical Records Officer","System Administrator"],delete_pricing_profile:["Finance","Data Entry","Hospital Administrator","Medical Records Officer","System Administrator"],delete_procedure:["Doctor","Hospital Administrator","Medical Records Officer","Nurse","Nurse Manager","Patient Administration","System Administrator"],delete_socialwork:["Hospital Administrator","Medical Records Officer","Social Worker","System Administrator"],delete_vitals:["Doctor","Hospital Administrator","Medical Records Officer","Nurse","Nurse Manager","System Administrator"],delete_visit:["Doctor","Hospital Administrator","Medical Records Officer","Nurse","Nurse Manager","Patient Administration","Social Worker","System Administrator"],delete_user:["User Administrator","System Administrator"],discharge_patient:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Nurse","Nurse Manager","Patient Administration","Social Worker","System Administrator"],edit_invoice:["Data Entry","Hospital Administrator","Medical Records Officer","System Administrator"],fulfill_inventory:["Hospital Administrator","Inventory Manager","Medical Records Officer","Pharmacist","System Administrator"],fulfill_medication:["Medical Records Officer","Pharmacist","System Administrator"],imaging:["Data Entry","Doctor","Hospital Administrator","Imaging Technician","Medical Records Officer","System Administrator"],invoices:["Hospital Administrator","Finance","Finance Manager","System Administrator"],labs:["Data Entry","Doctor","Hospital Administrator","Lab Technician","Medical Records Officer","System Administrator"],medication:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Pharmacist","System Administrator"],inventory:["Data Entry","Hospital Administrator","Inventory Manager","Medical Records Officer","Nurse Manager","Pharmacist","System Administrator"],load_db:["System Administrator"],override_invoice:["Hospital Administrator","System Administrator"],query_db:["System Administrator"],patients:["Data Entry","Doctor","Finance","Finance Manager","Hospital Administrator","Imaging Technician","Lab Technician","Medical Records Officer","Nurse","Nurse Manager","Patient Administration","Social Worker","System Administrator"],patient_reports:["Hospital Administrator","Patient Administration","System Administrator"],pricing:["Data Entry","Finance","Hospital Administrator","Medical Records Officer","System Administrator"],visits:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Nurse Manager","Nurse","Patient Administration","Social Worker","System Administrator"],update_config:["System Administrator"],users:["User Administrator","System Administrator"],add_note:["Doctor","Medical Records Officer","Nurse","Nurse Manager","Patient Administration","System Administrator"],delete_note:["Medical Records Officer","Nurse Manager","Patient Administration","System Administrator"],define_user_roles:["System Administrator"]},_getUserSessionVars:function(){var e=this.get("session");if(!t.default.isEmpty(e)&&e.get("isAuthenticated"))return e.get("data.authenticated")},currentUserCan:function(e){var n=this._getUserSessionVars();if(!t.default.isEmpty(n)&&!t.default.isEmpty(n.role)){var a=this.get("session").get("data.authenticated.userCaps");if(!t.default.isEmpty(a))return a.includes(e.camelize());var l=this.get("defaultCapabilities"),s=l[e];if(!t.default.isEmpty(s))return s.includes(n.role)}return!1},getUserName:function(e){var n=void 0,a=this._getUserSessionVars();return t.default.isEmpty(a)||(e?n=a.name:t.default.isEmpty(a.displayName)?t.default.isEmpty(a.name)||(n=a.name):n=a.displayName),n}})}),define("hospitalrun/mixins/visit-types",["exports","ember","hospitalrun/utils/select-values"],function(e,t,n){e.default=t.default.Mixin.create({defaultVisitTypes:["Admission","Clinic","Followup","Imaging","Lab","Pharmacy"],_getVisitTypes:function(e){var a=this.get("defaultVisitTypes"),l=this.get("visitTypesList"),s=void 0;return s=t.default.isEmpty(l)?a:l.get("value"),s=n.default.selectValues(s,e)},visitTypes:function(){return this._getVisitTypes()}.property("visitTypesList","defaultVisitTypes").volatile(),visitTypesWithEmpty:function(){return this._getVisitTypes(!0)}.property("visitTypesList","defaultVisitTypes").volatile()})}),define("hospitalrun/models/abstract",["exports","ember-data","ember","ember-validations","ember-pouch","hospitalrun/mixins/user-session"],function(e,t,n,a,l,s){var i=n.default.get,o=n.default.inject,r=n.default.isEmpty;e.default=l.Model.extend(s.default,a.default,{session:o.service(),archived:t.default.attr("boolean"),lastModified:t.default.attr("date"),modifiedBy:t.default.attr(),modifiedFields:t.default.attr(),loadedCustomForms:null,didLoad:function(){var e=this.get("customForms");r(e)||(e=JSON.parse(JSON.stringify(e))),this.set("loadedCustomForms",e)},changedAttributes:function e(){var e=this._super(),t=this.get("customForms"),n=this.get("loadedCustomForms");if(!r(t)){r(n)&&(n={});var a=Object.keys(t);a.forEach(function(a){var l=n[a],s="customForms."+a;r(l)&&(l={});var o=i(t,a),d=Object.keys(o);d.forEach(function(t){var n=i(l,t),a=i(o,t);n!=a&&(e[s+"."+t]=[n,a])})})}return e},save:function(e){var t=void 0,a=this.changedAttributes(),l=new Date,s=this.get("modifiedFields"),i=this.get("session");if(!i||!i.get("isAuthenticated"))return new n.default.RSVP.Promise(function(e,t){n.default.run(null,t,"ERROR you must be logged in to save")});if(this.get("hasDirtyAttributes")&&!this.get("isDeleted")){r(s)&&(s={}),this.set("lastModified",l);for(t in a)s[t]=l;this.set("modifiedFields",s),this.set("modifiedBy",this.getUserName())}return this._super(e).catch(function(t){if(!r(e)&&e.retry)throw t;if(t.name&&t.name.indexOf&&t.name.indexOf("conflict")>-1)return this.rollbackAttributes(),this.reload().then(function(t){for(var l in a)t.set(l,a[l][1]);return n.default.isEmpty(e)&&(e={}),e.retry=!0,t.save(e)});throw t}.bind(this))}})}),define("hospitalrun/models/add-diagnosis",["exports","ember-data","ember-validations","ember-pouch"],function(e,t,n,a){e.default=a.Model.extend(n.default,{diagnosis:t.default.attr("string"),validations:{diagnosis:{presence:!0}}})}),define("hospitalrun/models/allergy",["exports","hospitalrun/models/abstract","ember-data"],function(e,t,n){e.default=t.default.extend({name:n.default.attr("string"),icd9CMCode:n.default.attr("string"),icd10Code:n.default.attr("string"),patient:n.default.belongsTo("patient")})}),define("hospitalrun/models/appointment",["exports","hospitalrun/models/abstract","ember-data","ember","hospitalrun/utils/patient-validation"],function(e,t,n,a,l){e.default=t.default.extend({allDay:n.default.attr(),provider:n.default.attr("string"),location:n.default.attr("string"),appointmentType:n.default.attr("string"),startDate:n.default.attr("date"),endDate:n.default.attr("date"),notes:n.default.attr("string"),status:n.default.attr("string",{defaultValue:"Scheduled"}),patient:n.default.belongsTo("patient",{async:!1}),visits:n.default.hasMany("visit"),longDateFormat:"l h:mm A",shortDateFormat:"l",timeFormat:"h:mm A",_getDateSpan:function(e,t,n){var a=e.format(n),l=t.format(n);return a+" - "+l},appointmentDate:function(){var e=this.get("startDate");return e}.property("startDate"),displayStatus:function(){var e=this.get("status");return a.default.isEmpty(e)&&(e="Scheduled"),e}.property("status"),formattedAppointmentDate:function(){var e=this.get("allDay"),t=moment(this.get("endDate")),n="",a="",l=moment(this.get("startDate"));return l.isSame(t,"day")?(a=l.format(this.get("shortDateFormat")),e||(a+=" ",a+=this._getDateSpan(l,t,this.get("timeFormat")))):(n=e?this.get("shortDateFormat"):this.get("longDateFormat"),a=this._getDateSpan(l,t,n)),a}.property("startDate","endDate"),validations:{appointmentDate:{presence:{if:function(e){var t=e.get("appointmentType");return"Admission"!==t}}},patientTypeAhead:l.default.patientTypeAhead,patient:{presence:!0},appointmentType:{presence:!0},location:{presence:!0},startDate:{presence:!0},endDate:{acceptance:{accept:!0,if:function(e){if(!e.get("hasDirtyAttributes"))return!1;var t=e.get("allDay"),n=e.get("startDate"),l=e.get("endDate");if(a.default.isEmpty(l)||a.default.isEmpty(n))return!0;if(t){if(l.getTime()l},message:"Invalid quantity"}},dateCompleted:{presence:{message:"Please provide a date"}},transferLocation:{acceptance:{accept:!0,if:function(e){var t=e.get("transferLocation"),n=e.get("transferItem");return!(a.default.isEmpty(n)||!a.default.isEmpty(t))},message:"Please select a location to transfer to"}}}});e.default=s}),define("hospitalrun/models/inv-purchase",["exports","hospitalrun/models/abstract","ember-data","ember","hospitalrun/mixins/location-name","hospitalrun/mixins/number-format"],function(e,t,n,a,l,s){function i(){return[]}var o=t.default.extend(l.default,s.default,{purchaseCost:n.default.attr("number"),lotNumber:n.default.attr("string"),dateReceived:n.default.attr("date"),costPerUnit:function(){var e=this.get("purchaseCost"),t=parseInt(this.get("originalQuantity"));return a.default.isEmpty(e)||a.default.isEmpty(t)||0===e||0===t?0:this._numberFormat(e/t,!0)}.property("purchaseCost","originalQuantity"),originalQuantity:n.default.attr("number"),currentQuantity:n.default.attr("number"),expirationDate:n.default.attr("date"),expired:n.default.attr("boolean"),location:n.default.attr("string"),aisleLocation:n.default.attr("string"),giftInKind:n.default.attr("boolean"),inventoryItem:n.default.attr("string"),vendor:n.default.attr("string"),vendorItemNo:n.default.attr("string"),distributionUnit:n.default.attr("string"),invoiceNo:n.default.attr("string"),quantityGroups:n.default.attr({defaultValue:i}),validations:{purchaseCost:{numericality:!0},originalQuantity:{numericality:{greaterThanOrEqualTo:0}},vendor:{presence:!0}}});e.default=o}),define("hospitalrun/models/inv-request",["exports","hospitalrun/models/abstract","hospitalrun/mixins/inventory-adjustment-types","ember-data","ember","hospitalrun/mixins/location-name"],function(e,t,n,a,l,s){var i=t.default.extend(n.default,s.default,{adjustPurchases:a.default.attr("boolean"),completedBy:a.default.attr("string"),costPerUnit:a.default.attr("number"),dateCompleted:a.default.attr("date"),dateRequested:a.default.attr("date"),deliveryAisle:a.default.attr("string"),deliveryLocation:a.default.attr("string"),expenseAccount:a.default.attr("string"),inventoryItem:a.default.belongsTo("inventory",{async:!0}),locationsAffected:a.default.attr(),markAsConsumed:a.default.attr("boolean",{defaultValue:!0}),patient:a.default.belongsTo("patient",{async:!1}),purchasesAffected:a.default.attr(),quantity:a.default.attr("number"),quantityAtCompletion:a.default.attr("number"),reason:a.default.attr("string"),requestedBy:a.default.attr("string"),status:a.default.attr("string"),transactionType:a.default.attr("string"),visit:a.default.belongsTo("visit",{async:!1}),deliveryLocationName:function(){var e=this.get("deliveryAisle"),t=this.get("deliveryLocation");return this.formatLocationName(t,e)}.property("deliveryAisle","deliveryLocation"),deliveryDetails:function(){var e=this.get("deliveryLocationName"),t=this.get("patient");return l.default.isEmpty(t)?e:t.get("displayName")}.property("deliveryAisle","deliveryLocation","patient"),haveReason:function(){return!l.default.isEmpty(this.get("reason"))}.property("reason"),isAdjustment:function(){var e=this.get("adjustmentTypes"),t=this.get("transactionType"),n=e.findBy("type",t);return!l.default.isEmpty(n)}.property("transactionType"),isFulfillment:function(){return"Fulfillment"===this.get("transactionType")}.property("transactionType"),isTransfer:function(){return"Transfer"===this.get("transactionType")}.property("transactionType"),validations:{inventoryItemTypeAhead:{acceptance:{accept:!0,if:function(e){if(!e.get("hasDirtyAttributes"))return!1;var t=e.get("inventoryItem.name"),n=e.get("inventoryItemTypeAhead"),a=e.get("requestedItems"),s=e.get("status");if("Requested"===s)return!1;if(l.default.isEmpty(t)||l.default.isEmpty(n))return l.default.isEmpty(a);var i=n.substr(0,t.length);return t!==i},message:"Please select a valid inventory item"}},quantity:{numericality:{greaterThan:0,messages:{greaterThan:"must be greater than 0"},if:function(e){var t=e.get("requestedItems");return l.default.isEmpty(t)}},acceptance:{accept:!0,if:function(e){var t=e.get("isNew"),n=parseInt(e.get("quantity")),a=e.get("transactionType"),l=null;return"Return"!==a&&(l=t&&"Request"===a?e.get("inventoryItem.quantity"):e.get("inventoryLocation.quantity"),n>l)},message:"The quantity must be less than or equal to the number of available items."}}}});e.default=i}),define("hospitalrun/models/inventory-batch",["exports","hospitalrun/models/abstract","ember"],function(e,t,n){e.default=t.default.extend({haveInvoiceItems:function(){var e=this.get("invoiceItems");return!n.default.isEmpty(e)},validations:{dateReceived:{presence:!0},inventoryItemTypeAhead:{presence:{unless:function(e){return e.haveInvoiceItems()}}},purchaseCost:{numericality:{greaterThan:0,messages:{greaterThan:"must be greater than 0"},unless:function(e){return e.haveInvoiceItems()}}},quantity:{numericality:{greaterThan:0,messages:{greaterThan:"must be greater than 0"},unless:function(e){return e.haveInvoiceItems()}}},vendor:{presence:!0}}})}),define("hospitalrun/models/inventory",["exports","hospitalrun/models/abstract","ember-data","ember","ember-computed","hospitalrun/mixins/location-name","hospitalrun/utils/item-condition"],function(e,t,n,a,l,s,i){var o=a.default.get,r=a.default.set,d={if:function(e){var t=o(e,"skipSavePurchase");return!t&&o(e,"isNew")}};e.default=t.default.extend(s.default,{crossReference:n.default.attr("string"),description:n.default.attr("string"),distributionUnit:n.default.attr("string"),friendlyId:n.default.attr("string"),inventoryType:n.default.attr("string"),keywords:n.default.attr(),name:n.default.attr("string"),price:n.default.attr("number"),quantity:n.default.attr("number"),rank:n.default.attr("string"),reorderPoint:n.default.attr("number"),locations:n.default.hasMany("inv-location",{async:!1}),purchases:n.default.hasMany("inv-purchase",{async:!1}),estimatedDaysOfStock:14,availableLocations:(0,l.default)("locations.@each.quantity",function(){var e=o(this,"locations").filter(function(e){return o(e,"quantity")>0});return e}),displayLocations:(0,l.default)("availableLocations",function(){var e=this,t=o(this,"availableLocations"),n=[];return t.forEach(function(t){var l=o(t,"aisleLocation"),s=o(t,"location"),i=e.formatLocationName(s,l);a.default.isEmpty(i)||n.push(i)}),n.toString()}),condition:(0,l.default)("rank","estimatedDaysOfStock",function(){var e=o(this,"estimatedDaysOfStock"),t=(0,i.rankToMultiplier)(o(this,"rank"));return(0,i.getCondition)(e,t)}),validations:{distributionUnit:{presence:!0},purchaseCost:{numericality:d},name:{presence:!0},quantity:{numericality:{validateIfNewItem:d,greaterThanOrEqualTo:0}},price:{numericality:{allowBlank:!0}},originalQuantity:{presence:d},reorderPoint:{numericality:{allowBlank:!0}},inventoryType:{presence:!0},vendor:{presence:d}},updateQuantity:function(){var e=o(this,"purchases"),t=e.reduce(function(e,t){var n=0;return t.get("expired")||(n=t.get("currentQuantity")),e+n},0);r(this,"quantity",t)}})}),define("hospitalrun/models/invoice",["exports","hospitalrun/models/abstract","hospitalrun/mixins/date-format","ember-data","ember","hospitalrun/mixins/number-format","hospitalrun/utils/patient-validation"],function(e,t,n,a,l,s,i){var o=l.default.computed,r=l.default.get,d=l.default.set;e.default=t.default.extend(n.default,s.default,{billDate:a.default.attr("date"),externalInvoiceNumber:a.default.attr("string"),paidTotal:a.default.attr("number"),patientInfo:a.default.attr("string"),remarks:a.default.attr("string"),status:a.default.attr("string"),lineItems:a.default.hasMany("billing-line-item",{async:!1}),patient:a.default.belongsTo("patient",{async:!1}),paymentProfile:a.default.belongsTo("price-profile",{async:!1}),payments:a.default.hasMany("payment",{async:!1}),visit:a.default.belongsTo("visit",{async:!1}),addPayment:function(e){var t=r(this,"payments");t.addObject(e),this.paymentAmountChanged()},billDateAsTime:o("billDate",function(){return this.dateToTime(r(this,"billDate"))}),discountTotals:l.default.computed.mapBy("lineItemsByCategory","discount"),discount:l.default.computed.sum("discountTotals"),nationalInsuranceTotals:l.default.computed.mapBy("lineItemsByCategory","nationalInsurance"),nationalInsurance:l.default.computed.sum("nationalInsuranceTotals"),paidFlag:o("status",function(){return"Paid"===r(this,"status")}),remainingBalance:o("patientResponsibility","paidTotal",function(){var e=r(this,"patientResponsibility"),t=r(this,"paidTotal");return this._numberFormat(e-t,!0)}),privateInsuranceTotals:l.default.computed.mapBy("lineItemsByCategory","privateInsurance"),privateInsurance:l.default.computed.sum("privateInsuranceTotals"),lineTotals:l.default.computed.mapBy("lineItems","total"),total:l.default.computed.sum("lineTotals"),displayInvoiceNumber:o("externalInvoiceNumber","id",function(){var e=r(this,"externalInvoiceNumber"),t=r(this,"id");return l.default.isEmpty(e)?t:e}),lineItemsByCategory:o("lineItems.@each.amountOwed",function(){var e=r(this,"lineItems"),t=[];return e.forEach(function(e){var n=r(e,"category"),a=t.findBy("category",n);l.default.isEmpty(a)&&(a={category:n,items:[]},t.push(a)),a.items.push(e)}.bind(this)),t.forEach(function(e){e.amountOwed=this._calculateTotal(e.items,"amountOwed"),e.discount=this._calculateTotal(e.items,"discount"),e.nationalInsurance=this._calculateTotal(e.items,"nationalInsurance"),e.privateInsurance=this._calculateTotal(e.items,"privateInsurance"),e.total=this._calculateTotal(e.items,"total")}.bind(this)),t}),patientIdChanged:function(){if(!l.default.isEmpty(r(this,"patient"))){var e=r(this,"patient.displayName"),t=r(this,"patient.displayPatientId");d(this,"patientInfo",e+" - "+t)}}.observes("patient.displayName","patient.id","patient.displayPatientId"),patientResponsibilityTotals:l.default.computed.mapBy("lineItems","amountOwed"),patientResponsibility:l.default.computed.sum("patientResponsibilityTotals"),paymentAmountChanged:function(){var e=r(this,"payments").filter(function(e){return!r(e,"isNew")});if(0!==e.length){var t=e.reduce(function(e,t){return e+=this._getValidNumber(t.get("amount"))}.bind(this),0);d(this,"paidTotal",this._numberFormat(t,!0));var n=r(this,"remainingBalance");n<=0&&d(this,"status","Paid")}}.observes("payments.[]","payments.@each.amount"),validations:{patientTypeAhead:i.default.patientTypeAhead,patient:{presence:!0},visit:{presence:!0}}})}),define("hospitalrun/models/lab",["exports","hospitalrun/models/abstract","hospitalrun/mixins/can-edit-requested","hospitalrun/mixins/date-format","ember-data","ember","hospitalrun/utils/patient-validation","hospitalrun/mixins/result-validation"],function(e,t,n,a,l,s,i,o){var r=s.default.computed,d=s.default.get;e.default=t.default.extend(n.default,a.default,o.default,{labDate:l.default.attr("date"),notes:l.default.attr("string"),requestedBy:l.default.attr("string"),requestedDate:l.default.attr("date"),result:l.default.attr("string"),status:l.default.attr("string"),charges:l.default.hasMany("proc-charge",{async:!1}),labType:l.default.belongsTo("pricing",{async:!1}),patient:l.default.belongsTo("patient",{async:!1}),visit:l.default.belongsTo("visit",{async:!1}),labDateAsTime:r("labDate",function(){return this.dateToTime(d(this,"labDate"))}),requestedDateAsTime:r("requestedDate",function(){return this.dateToTime(d(this,"requestedDate"))}),validations:{labTypeName:{presence:{if:function(e){if(e.get("isNew"))return!0},message:"Please select a lab type"}},patientTypeAhead:i.default.patientTypeAhead,patient:{presence:!0}}})}),define("hospitalrun/models/line-item-detail",["exports","hospitalrun/models/abstract","ember-data","ember","hospitalrun/mixins/number-format"],function(e,t,n,a,l){var s=a.default.computed,i=a.default.get;e.default=t.default.extend(l.default,{department:n.default.attr("string"),expenseAccount:n.default.attr("string"),name:n.default.attr("string"),price:n.default.attr("number"),quantity:n.default.attr("number"),total:n.default.attr("number"),pricingItem:n.default.belongsTo("pricing",{async:!1}),amountOwed:s("price","quantity",function(){var e=i(this,"price"),t=i(this,"quantity"),n=0;return this._validNumber(e)&&this._validNumber(t)&&(n=this._numberFormat(e*t,!0)),n})})}),define("hospitalrun/models/lookup",["exports","ember-pouch","ember-data"],function(e,t,n){e.default=t.Model.extend({_attachments:n.default.attr(),importFile:n.default.attr("boolean",{defaultValue:!1}),value:n.default.attr(""),organizeByType:n.default.attr("boolean"),userCanAdd:n.default.attr("boolean")})}),define("hospitalrun/models/medication",["exports","hospitalrun/models/abstract","hospitalrun/mixins/can-edit-requested","ember-data","hospitalrun/mixins/date-format","ember","hospitalrun/mixins/medication-details"],function(e,t,n,a,l,s,i){e.default=t.default.extend(n.default,l.default,i.default,{inventoryItem:a.default.belongsTo("inventory",{async:!0}),notes:a.default.attr("string"),patient:a.default.belongsTo("patient",{async:!1}),prescription:a.default.attr("string"),prescriptionDate:a.default.attr("date"),quantity:a.default.attr("number"),refills:a.default.attr("number"),requestedDate:a.default.attr("date"),requestedBy:a.default.attr("string"),status:a.default.attr("string"),visit:a.default.belongsTo("visit",{async:!1}),isRequested:function(){var e=this.get("status");return"Requested"===e}.property("status"),medicationName:function(){return this.getMedicationName("inventoryItem")}.property("medicationTitle","inventoryItem"),medicationPrice:function(){return this.getMedicationPrice("inventoryItem")}.property("priceOfMedication","inventoryItem"),prescriptionDateAsTime:function(){return this.dateToTime(this.get("prescriptionDate"))}.property("prescriptionDate"),requestedDateAsTime:function(){return this.dateToTime(this.get("requestedDate"))}.property("requestedDate"),validations:{prescription:{acceptance:{accept:!0,if:function(e){if(!e.get("hasDirtyAttributes")||e.get("isFulfilling"))return!1;var t=e.get("prescription"),n=e.get("quantity");return!(!s.default.isEmpty(t)||!s.default.isEmpty(n))},message:"Please enter a prescription or a quantity"}},inventoryItemTypeAhead:{acceptance:{accept:!0,if:function(e){if(!e.get("hasDirtyAttributes")||!e.get("isNew"))return!1;var t=e.get("inventoryItem.name"),n=e.get("inventoryItemTypeAhead");if(s.default.isEmpty(t)||s.default.isEmpty(n))return!0;var a=n.substr(0,t.length);return t!==a},message:"Please select a valid medication"}},patientTypeAhead:{presence:{if:function(e){return e.get("selectPatient")}}},quantity:{numericality:{allowBlank:!0,greaterThan:0,messages:{greaterThan:"must be greater than 0"}},presence:{if:function(e){var t=e.get("isFulfilling");return t}},acceptance:{accept:!0,if:function(e){var t=e.get("isFulfilling"),n=parseInt(e.get("quantity")),a=null;return!!t&&(a=e.get("inventoryItem.quantity"),n>a)},message:"The quantity must be less than or equal to the number of available medication."}},refills:{numericality:{allowBlank:!0}}}})}),define("hospitalrun/models/operation-report",["exports","hospitalrun/models/abstract","ember-data","ember"],function(e,t,n,a){function l(){return[]}var s=a.default.get,i=a.default.isEmpty;e.default=t.default.extend({additionalNotes:n.default.attr("string"),caseComplexity:n.default.attr("number"),customForms:n.default.attr("custom-forms"),procedures:n.default.attr("operative-procedures",{defaultValue:l}),operationDescription:n.default.attr("string"),surgeon:n.default.attr("string"),surgeryDate:n.default.attr("date"),preOpDiagnoses:n.default.hasMany("diagnosis"),diagnoses:n.default.hasMany("diagnosis"),operativePlan:n.default.belongsTo("operative-plan",{async:!0}),patient:n.default.belongsTo("patient",{async:!1}),validations:{caseComplexity:{numericality:{allowBlank:!0,onlyInteger:!0}},procedureDescription:{presence:{if:function(e){return i(s(e,"procedures"))}}}}})}),define("hospitalrun/models/operative-plan",["exports","hospitalrun/models/abstract","ember-data","ember","hospitalrun/mixins/operative-plan-statuses"],function(e,t,n,a,l){function s(){return[]}var i=a.default.computed,o=a.default.get,r=a.default.isEmpty;e.default=t.default.extend({additionalNotes:n.default.attr("string"),admissionInstructions:n.default.attr("string"),caseComplexity:n.default.attr("number"),customForms:n.default.attr("custom-forms"),operationDescription:n.default.attr("string"),procedures:n.default.attr("operative-procedures",{ -defaultValue:s}),status:n.default.attr("string",{defaultValue:l.PLANNED_STATUS}),surgeon:n.default.attr("string"),surgeryDate:n.default.attr("date"),diagnoses:n.default.hasMany("diagnosis"),patient:n.default.belongsTo("patient",{async:!1}),isPlanned:i("status",{get:function(){var e=o(this,"status");return e===l.PLANNED_STATUS}}),validations:{caseComplexity:{numericality:{allowBlank:!0,onlyInteger:!0}},procedureDescription:{presence:{if:function(e){return r(o(e,"procedures"))}}}}})}),define("hospitalrun/models/option",["exports","ember-pouch","ember-data"],function(e,t,n){e.default=t.Model.extend({value:n.default.attr("")})}),define("hospitalrun/models/override-price",["exports","hospitalrun/models/abstract","ember-data"],function(e,t,n){e.default=t.default.extend({price:n.default.attr("number"),profile:n.default.belongsTo("price-profile",{async:!1}),validations:{profile:{presence:!0},price:{numericality:!0}}})}),define("hospitalrun/models/patient-note",["exports","hospitalrun/models/abstract","ember","ember-data"],function(e,t,n,a){var l=n.default.computed;e.default=t.default.extend({attribution:a.default.attr("string"),content:a.default.attr("string"),createdBy:a.default.attr("string"),date:a.default.attr("date"),noteType:a.default.attr(),patient:a.default.belongsTo("patient",{async:!1}),visit:a.default.belongsTo("visit",{async:!1}),authoredBy:l("attribution","createdBy",function(){if(n.default.isEmpty(this.get("attribution")))return this.get("createdBy");var e=this.get("i18n");return this.get("createdBy")+" "+e.t("patients.notes.onBehalfOfCopy")+" "+this.get("attribution")}),validations:{patient:{presence:!0},visit:{presence:!0},noteType:{presence:!0},content:{presence:!0}}})}),define("hospitalrun/models/patient",["exports","hospitalrun/models/abstract","hospitalrun/mixins/dob-days","hospitalrun/utils/email-validation","ember","ember-data","hospitalrun/mixins/patient-name"],function(e,t,n,a,l,s,i){var o=l.default.computed,r=l.default.get;e.default=t.default.extend(n.default,i.default,{admitted:s.default.attr("boolean",{defaultValue:!1}),additionalContacts:s.default.attr(),address:s.default.attr("string"),address2:s.default.attr("string"),address3:s.default.attr("string"),address4:s.default.attr("string"),bloodType:s.default.attr("string"),clinic:s.default.attr("string"),country:s.default.attr("string"),checkedIn:s.default.attr("boolean",{defaultValue:!1}),customForms:s.default.attr("custom-forms"),dateOfBirth:s.default.attr("date"),economicClassification:s.default.attr("string"),email:s.default.attr("string"),expenses:s.default.attr(),externalPatientId:s.default.attr("string"),familySupport1:s.default.attr("string"),familySupport2:s.default.attr("string"),familySupport3:s.default.attr("string"),familySupport4:s.default.attr("string"),familySupport5:s.default.attr("string"),friendlyId:s.default.attr("string"),familyInfo:s.default.attr(),firstName:s.default.attr("string"),sex:s.default.attr("string"),occupation:s.default.attr("string"),history:s.default.attr("string"),insurance:s.default.attr("string"),lastName:s.default.attr("string"),livingArrangement:s.default.attr("string"),middleName:s.default.attr("string"),notes:s.default.attr("string"),otherIncome:s.default.attr("string"),patientType:s.default.attr("string"),parent:s.default.attr("string"),phone:s.default.attr("string"),placeOfBirth:s.default.attr("string"),referredDate:s.default.attr("date"),referredBy:s.default.attr("string"),religion:s.default.attr("string"),socialActionTaken:s.default.attr("string"),socialRecommendation:s.default.attr("string"),status:s.default.attr("string"),allergies:s.default.hasMany("allergy",{async:!0}),diagnoses:s.default.hasMany("diagnosis",{async:!1}),operationReports:s.default.hasMany("operation-report",{async:!0}),operativePlans:s.default.hasMany("operative-plan",{async:!0}),payments:s.default.hasMany("payment",{async:!0}),paymentProfile:s.default.belongsTo("price-profile",{async:!1}),age:o("dateOfBirth",function(){var e=r(this,"dateOfBirth");return this.convertDOBToText(e)}),displayAddress:o("address","address2","address3","address4",function(){var e=this.getProperties("address","address2","address3","address4"),t="";for(var n in e)l.default.isEmpty(e[n])||(l.default.isEmpty(t)||(t+=", "),t+=e[n]);return t}),displayName:o("firstName","lastName","middleName",function(){return this.getPatientDisplayName(this)}),displayPatientId:o("id","externalPatientId","friendlyId",function(){return this.getPatientDisplayId(this)}),shortAge:o("dateOfBirth",function(){var e=r(this,"dateOfBirth");return this.convertDOBToText(e,!0)}),shortDisplayName:o("firstName","lastName",function(){return this.getPatientDisplayName(this,!0)}),validations:{email:{format:{with:a.default.emailRegex,allowBlank:!0,message:"please enter a valid email address"}},friendlyId:{presence:!0},firstName:{presence:!0},lastName:{presence:!0}}})}),define("hospitalrun/models/payment",["exports","hospitalrun/models/abstract","ember-data","ember"],function(e,t,n,a){var l=a.default.computed,s=a.default.get;e.default=t.default.extend({amount:n.default.attr("number"),charityPatient:n.default.attr("boolean"),datePaid:n.default.attr("date"),expenseAccount:n.default.attr("string"),notes:n.default.attr("string"),paymentType:n.default.attr("string"),invoice:n.default.belongsTo("invoice",{async:!1}),canRemovePayment:l("paymentType",function(){return"Deposit"===s(this,"paymentType")}),validations:{amount:{numericality:!0},datePaid:{presence:!0}}})}),define("hospitalrun/models/photo",["exports","hospitalrun/models/abstract","ember-data"],function(e,t,n){e.default=t.default.extend({_attachments:n.default.attr(),caption:n.default.attr("string"),coverImage:n.default.attr("boolean"),fileName:n.default.attr("string"),localFile:n.default.attr("boolean"),url:n.default.attr("string"),patient:n.default.belongsTo("patient",{async:!1})})}),define("hospitalrun/models/price-profile",["exports","hospitalrun/models/abstract","ember-data"],function(e,t,n){e.default=t.default.extend({name:n.default.attr("string"),discountAmount:n.default.attr("number"),discountPercentage:n.default.attr("number"),validations:{name:{presence:!0},discountAmount:{numericality:{allowBlank:!0}},discountPercentage:{numericality:{allowBlank:!0}}}})}),define("hospitalrun/models/pricing",["exports","hospitalrun/models/abstract","ember-data"],function(e,t,n){e.default=t.default.extend({category:n.default.attr("string"),expenseAccount:n.default.attr("string"),name:n.default.attr("string"),price:n.default.attr("number"),pricingType:n.default.attr("string"),pricingOverrides:n.default.hasMany("override-price",{async:!1}),validations:{category:{presence:!0},name:{presence:!0},price:{numericality:!0}}})}),define("hospitalrun/models/proc-charge",["exports","hospitalrun/models/abstract","ember-data","ember","hospitalrun/mixins/medication-details"],function(e,t,n,a,l){var s=a.default.computed,i=a.default.get;e.default=t.default.extend(l.default,{quantity:n.default.attr("number"),dateCharged:n.default.attr("date"),medication:n.default.belongsTo("inventory",{async:!1}),pricingItem:n.default.belongsTo("pricing",{async:!1}),medicationCharge:s("medication","newMedicationCharge",function(){var e=i(this,"medication"),t=i(this,"newMedicationCharge");return!a.default.isEmpty(e)||!a.default.isEmpty(t)}),medicationName:s("medication",function(){return this.get("medication.name")}),medicationPrice:s("medication",function(){return this.get("medication.price")}),validations:{itemName:{presence:!0,acceptance:{accept:!0,if:function(e){var t=i(e,"medicationCharge");if(!t||!i(e,"hasDirtyAttributes"))return!1;var n=i(e,"inventoryItem.name"),l=i(e,"itemName");if(a.default.isEmpty(n)||a.default.isEmpty(l))return!0;var s=l.substr(0,n.length);return n!==s},message:"Please select a valid medication"}},quantity:{numericality:{greaterThan:0,messages:{greaterThan:"must be greater than 0"}}}}})}),define("hospitalrun/models/procedure",["exports","hospitalrun/models/abstract","ember-data"],function(e,t,n){e.default=t.default.extend({anesthesiaType:n.default.attr("string"),anesthesiologist:n.default.attr("string"),assistant:n.default.attr("string"),description:n.default.attr("string"),cptCode:n.default.attr("string"),location:n.default.attr("string"),notes:n.default.attr("string"),physician:n.default.attr("string"),procedureDate:n.default.attr("date"),timeStarted:n.default.attr("string"),timeEnded:n.default.attr("string"),charges:n.default.hasMany("proc-charge",{async:!1}),visit:n.default.belongsTo("visit",{async:!1}),validations:{description:{presence:!0},oxygenHours:{numericality:{allowBlank:!0}},pacuHours:{numericality:{allowBlank:!0}},physician:{presence:!0},procedureDate:{presence:!0},display_procedureDate:{presence:{message:"Please select a valid date"}}}})}),define("hospitalrun/models/sequence",["exports","ember-pouch","ember-data"],function(e,t,n){e.default=t.Model.extend({prefix:n.default.attr("string"),value:n.default.attr("number")})}),define("hospitalrun/models/social-expense",["exports","ember-data","ember-validations","ember-pouch"],function(e,t,n,a){e.default=a.Model.extend(n.default,{category:t.default.attr("string"),sources:t.default.attr("string"),cost:t.default.attr(),validations:{category:{presence:!0},cost:{numericality:!0}}})}),define("hospitalrun/models/user-role",["exports","hospitalrun/models/abstract","ember-data"],function(e,t,n){e.default=t.default.extend({name:n.default.attr("string"),capabilities:n.default.attr()})}),define("hospitalrun/models/user",["exports","ember-data","hospitalrun/utils/email-validation","ember","ember-validations"],function(e,t,n,a,l){var s=a.default.computed,i=t.default.Model.extend(l.default,{derived_key:t.default.attr("string"),deleted:t.default.attr("boolean"),displayName:t.default.attr("string"),email:t.default.attr("string"),iterations:t.default.attr(),name:t.default.attr("string"),password:t.default.attr("string"),password_scheme:t.default.attr("string"),password_sha:t.default.attr("string"),rev:t.default.attr("string"),roles:t.default.attr(),salt:t.default.attr("string"),userPrefix:t.default.attr("string"),displayRole:s("roles",function(){var e=this.get("roles");if(!a.default.isEmpty(e))return e[0]}),validations:{email:{format:{with:n.default.emailRegex,message:"Please, enter a valid email address"}}}});e.default=i}),define("hospitalrun/models/visit",["exports","hospitalrun/models/abstract","ember-data","ember"],function(e,t,n,a){function l(e){if(!e.get("hasDirtyAttributes"))return!1;var t=e.get("startDate"),n=e.get("endDate");return!a.default.isEmpty(n)&&!a.default.isEmpty(t)&&n.getTime()n)return t.set("value",l),t.save()})})},beforeUpdate:function(){var e=this;if(!this.get("model.isNew"))return l.default.RSVP.resolve();var t=this.get("database"),n=this.get("model.friendlyId"),a=this.get("maxValue"),s={startkey:[n,null],endkey:[n,a]};return t.queryMainDB(s,"patient_by_display_id").then(function(t){return l.default.isEmpty(t.rows)?l.default.RSVP.resolve():e.generateFriendlyId().then(function(t){return e.model.set("friendlyId",t),l.default.RSVP.resolve()})})},afterUpdate:function(e){var t=this;this._updateSequence(e).then(function(){t.send("openModal","dialog",l.default.Object.create({title:t.get("i18n").t("patients.titles.savedPatient"),message:t.get("i18n").t("patients.messages.savedPatient",e),updateButtonAction:"returnToPatient",updateButtonText:t.get("i18n").t("patients.buttons.backToPatients"),cancelButtonText:t.get("i18n").t("buttons.close")}))})}})}),define("hospitalrun/patients/edit/route",["exports","hospitalrun/routes/abstract-edit-route","ember","hospitalrun/mixins/patient-id","hospitalrun/mixins/patient-visits","hospitalrun/mixins/patient-notes","hospitalrun/mixins/pouchdb","ember-i18n"],function(e,t,n,a,l,s,i,o){e.default=t.default.extend(a.default,l.default,i.default,s.default,{customForms:n.default.inject.service(),editTitle:(0,o.translationMacro)("patients.titles.edit"),modelName:"patient",newTitle:(0,o.translationMacro)("patients.titles.new"),photos:null,actions:{updateNote:function(e){e.get("visit").save().then(function(){})},appointmentDeleted:function(e){this.controller.send("appointmentDeleted",e)},returnToPatient:function(){this.controller.send("returnToPatient")},deleteContact:function(e){this.controller.send("deleteContact",e)},deleteExpense:function(e){this.controller.send("deleteExpense",e)},deleteFamily:function(e){this.controller.send("deleteFamily",e)},deletePhoto:function(e){this.controller.send("deletePhoto",e)},updateExpense:function(e){this.controller.send("updateExpense",e)},updateFamilyInfo:function(e){this.controller.send("updateFamilyInfo",e)},visitDeleted:function(e){this.controller.send("visitDeleted",e)}},getNewData:function(){var e=this,t=this.get("customForms"),a={customForms:n.default.Object.create()};return t.setDefaultCustomForms(["patient","socialwork"],a).then(function(){return e.generateFriendlyId().then(function(e){return a.friendlyId=e,a})})},setupController:function(e,t){var a=t.get("friendlyId"),l=t.get("externalPatientId"),s=this.get("maxValue"),i=t.get("id");n.default.isEmpty(a)&&!n.default.isEmpty(l)&&t.set("friendlyId",l),this._super(e,t),this.getPatientVisits(t).then(function(e){t.set("visits",e)}),this.store.query("appointment",{options:{startkey:[i,null,null,"appointment_"],endkey:[i,s,s,s]},mapReduce:"appointments_by_patient"}).then(function(e){t.set("appointments",e)}),this.store.query("photo",{options:{key:i},mapReduce:"photo_by_patient"}).then(function(e){var n=[];n.addObjects(e),t.set("photos",n)})}})}),define("hospitalrun/patients/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"u/yTHHia",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],52]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","colspan","2"],["flush-element"],["open-element","b",[]],["flush-element"],["append",["helper",["t"],["patients.labels.totalMontlyExpense"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["totalExpenses"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteExpense",["get",["expense"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.delete"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["expense","category"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["expense","sources"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["expense","cost"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"showEditExpense",["get",["expense"]]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canDeleteSocialWork"]]],null,1],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["expense"]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteFamily",["get",["info"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.delete"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["info","name"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["info","age"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["info","civilStatus"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["info","relationship"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["info","education"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["info","occupation"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["info","income"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["info","insurance"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"showEditFamily",["get",["info"]]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canDeleteSocialWork"]]],null,3],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["info"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","role","tabpanel"],["static-attr","class","tab-pane"],["static-attr","id","social"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["open-element","h4",[]],["flush-element"],["text","\\n "],["append",["helper",["t"],["patients.titles.familyInformation"],null],false],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"showEditFamily"],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["patients.buttons.addFamilyMember"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.name"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.age"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.civilStatus"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.relationship"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.education"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.occupation"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.income"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.insurance"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.action"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","familyInfo"]]],null,4],["text"," "],["close-element"],["text","\\n "],["open-element","h4",[]],["flush-element"],["text","\\n "],["append",["helper",["t"],["patients.titles.expenses"],null],false],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"showEditExpense"],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["patients.buttons.addExpense"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.category"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.sources"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.monthlyCost"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","expenses"]]],null,2],["block",["if"],[["get",["showExpenseTotal"]]],null,0],["text"," "],["close-element"],["text","\\n "],["append",["helper",["custom-form-manager"],null,[["model","formType"],[["get",["model"]],"socialwork"]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"newLab"],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["patients.buttons.newLab"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"newImaging"],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["patients.buttons.newImaging"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"newMedication"],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["patients.buttons.newMedication"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteVisit",["get",["visit"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["buttons.delete"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editVisit",["get",["visit"]]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["modifier",["action"],[["get",[null]],"editVisit",["get",["visit"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["visit","startDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["visit","endDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["visit","primaryDiagnoses"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["visit","examiner"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["visit","location"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["visit","visitType"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddVisit"]]],null,10],["block",["if"],[["get",["canDeleteVisit"]]],null,9],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["visit"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"newVisit"],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["patients.buttons.newVisit"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteAppointment",["get",["appointment"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["buttons.delete"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editAppointment",["get",["appointment"]]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["modifier",["action"],[["get",[null]],"editAppointment",["get",["appointment"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","formattedAppointmentDate"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","provider"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","location"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","appointmentType"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","displayStatus"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddAppointment"]]],null,14],["block",["if"],[["get",["canDeleteAppointment"]]],null,13],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["appointment"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"newAppointment"],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["patients.buttons.newAppointment"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeletePhoto",["get",["photo"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.delete"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editPhoto",["get",["photo"]]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","col-sm-4 col-md-3"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","thumbnail"],["modifier",["action"],[["get",[null]],"editPhoto",["get",["photo"]]]],["flush-element"],["text","\\n "],["append",["helper",["photo-display"],null,[["photo"],[["get",["photo"]]]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","caption"],["flush-element"],["text","\\n "],["append",["unknown",["photo","caption"]],false],["text","\\n "],["open-element","p",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddPhoto"]]],null,18],["block",["if"],[["get",["canDeletePhoto"]]],null,17],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["photo"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"showAddPhoto"],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["patients.buttons.newPhoto"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","role","tabpanel"],["static-attr","class","tab-pane"],["static-attr","id","photos"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddPhoto"]]],null,20],["text"," "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n"],["block",["each"],[["get",["model","photos"]]],null,19],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","role","tabpanel"],["static-attr","class","tab-pane"],["static-attr","id","appointments"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddAppointment"]]],null,16],["text"," "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.date"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["visits.labels.examiner"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.location"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.type"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.status"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","appointments"]]],null,15],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","role","tabpanel"],["static-attr","class","tab-pane"],["static-attr","id","visits"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddVisit"]]],null,12],["text"," "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.startDate"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.endDate"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["visits.labels.diagnosis"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.provider"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.location"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.type"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","visits"]]],null,11],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","role","tabpanel"],["static-attr","class","tab-pane"],["static-attr","id","medication"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddMedication"]]],null,8],["text"," "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["partial","patients/medication"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","role","tabpanel"],["static-attr","class","tab-pane"],["static-attr","id","imaging"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddImaging"]]],null,7],["text"," "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["partial","patients/imaging"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","role","tabpanel"],["static-attr","class","tab-pane"],["static-attr","id","labs"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddLab"]]],null,6],["text"," "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["partial","patients/labs"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["canAddSocialWork"]]],null,5]],"locals":[]},{"statements":[["text"," "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteContact",["get",["additionalContact"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.delete"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["additionalContact","name"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["additionalContact","phone"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["additionalContact","email"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["additionalContact","relationship"]],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canDeleteContact"]]],null,22],["text"," "],["close-element"],["text","\\n"]],"locals":["additionalContact"]},{"statements":[["text"," "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.action"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","h4",[]],["flush-element"],["append",["helper",["t"],["patients.titles.additionalContacts"],null],false],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.name"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.phone"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.email"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.relationship"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canDeleteContact"]]],null,24],["text"," "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","additionalContacts"]]],null,23],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-text"],null,[["label","property","rows","class"],[["helper",["t"],["labels.address"],null],"address",3,"col-xs-12 col-sm-6"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-input"],null,[["label","property","class"],[["get",["address4Label"]],"address4","col-xs-12 col-sm-6"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-input"],null,[["label","property","class"],[["get",["address3Label"]],"address3","col-xs-12 col-sm-6"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-input"],null,[["label","property","class"],[["get",["address2Label"]],"address2","col-xs-12 col-sm-6"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-text"],null,[["label","property","rows","class"],[["get",["address1Label"]],"address",3,"col-xs-12 col-sm-6"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["address1Include"]]],null,30],["block",["if"],[["get",["address2Include"]]],null,29],["block",["if"],[["get",["address3Include"]]],null,28],["block",["if"],[["get",["address4Include"]]],null,27]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"showAddContact"],[["bubbles","on"],[false,"click"]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["patients.buttons.addContact"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["t"],["messages.noHistoryAvailable"],null],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","h5",[]],["static-attr","class","ph-note-heading"],["flush-element"],["append",["helper",["date-format"],[["get",["medication","prescriptionDate"]]],null],false],["text",": "],["append",["unknown",["medication","medicationName"]],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["helper",["eq"],[["get",["medication","status"]],"Fulfilled"],null]],null,34]],"locals":["medication"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","ph-note-item"],["flush-element"],["text","\\n "],["open-element","h5",[]],["static-attr","class","ph-note-heading"],["flush-element"],["append",["helper",["t"],["labels.medication"],null],false],["close-element"],["text","\\n"],["block",["each"],[["get",["visit","medication"]]],null,35],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","h5",[]],["static-attr","class","ph-note-heading"],["flush-element"],["append",["helper",["date-format"],[["get",["lab","labDate"]]],null],false],["text",": "],["append",["unknown",["lab","labType","name"]],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["helper",["eq"],[["get",["lab","status"]],"Completed"],null]],null,37]],"locals":["lab"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","ph-note-item"],["flush-element"],["text","\\n "],["open-element","h5",[]],["static-attr","class","ph-note-heading"],["flush-element"],["append",["helper",["t"],["labels.labOrders"],null],false],["close-element"],["text","\\n"],["block",["each"],[["get",["visit","labs"]]],null,38],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","h5",[]],["static-attr","class","ph-note-heading"],["flush-element"],["append",["helper",["date-format"],[["get",["imaging","imagingDate"]]],null],false],["text",": "],["append",["unknown",["imaging","imagingType","name"]],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["helper",["eq"],[["get",["imaging","status"]],"Completed"],null]],null,40]],"locals":["imaging"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","ph-note-item"],["flush-element"],["text","\\n "],["open-element","h5",[]],["static-attr","class","ph-note-heading"],["flush-element"],["append",["helper",["t"],["labels.imageOrders"],null],false],["close-element"],["text","\\n"],["block",["each"],[["get",["visit","imaging"]]],null,41],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","clickable"],["modifier",["action"],[["get",[null]],"editProcedure",["get",["procedure"]]]],["flush-element"],["text","\\n "],["open-element","h5",[]],["static-attr","class","ph-note-heading"],["flush-element"],["text","\\n "],["append",["helper",["date-format"],[["get",["procedure","procedureDate"]]],null],false],["text",":\\n "],["append",["unknown",["procedure","description"]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["procedure"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","ph-note-item"],["flush-element"],["text","\\n "],["open-element","h5",[]],["static-attr","class","ph-note-heading"],["flush-element"],["append",["helper",["t"],["labels.procedures"],null],false],["close-element"],["text","\\n"],["block",["each"],[["get",["visit","procedures"]]],null,43],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","patient-history-item"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","patient-history-heading clickable"],["modifier",["action"],[["get",[null]],"editVisit",["get",["visit"]]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","ph-visit-date"],["flush-element"],["append",["unknown",["visit","visitDate"]],false],["close-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","ph-visit-type"],["flush-element"],["append",["unknown",["visit","visitType"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["visit","procedures"]]],null,44],["block",["if"],[["get",["visit","hasCompletedImaging"]]],null,42],["block",["if"],[["get",["visit","hasCompletedLabs"]]],null,39],["block",["if"],[["get",["visit","hasCompletedMedication"]]],null,36],["text","\\n "],["close-element"],["text","\\n"]],"locals":["visit"]},{"statements":[["block",["each"],[["get",["model","visits"]]],null,45]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-heading clearfix"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"showAddPatientNote"],[["bubbles","on"],[false,"click"]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.newNote"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","role","tabpanel"],["static-attr","class","tab-pane active"],["static-attr","id","history"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel detail-section"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddNote"]]],null,47],["text"," "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n"],["block",["if"],[["get",["model","visits"]]],null,46,33],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","li",[]],["static-attr","role","presentation"],["flush-element"],["open-element","a",[]],["static-attr","href","#social"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","social-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.socialWork"],null],false],["close-element"],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-summary"],null,[["patient","patientProcedures","disablePatientLink","store","allowAddAllergy","allowAddDiagnosis","allowAddOperativePlan","diagnosisList"],[["get",["model"]],["get",["patientProcedures"]],true,["get",["store"]],true,true,true,["get",["diagnosisList"]]]]],false],["text","\\n "],["open-element","ul",[]],["static-attr","class","nav nav-pills tab-nav"],["static-attr","role","tablist"],["flush-element"],["text","\\n "],["open-element","li",[]],["static-attr","role","presentation"],["static-attr","class","active"],["flush-element"],["open-element","a",[]],["static-attr","href","#history"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","history-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.history"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","li",[]],["static-attr","role","presentation"],["flush-element"],["open-element","a",[]],["static-attr","href","#general"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","general-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.general"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","li",[]],["static-attr","role","presentation"],["flush-element"],["open-element","a",[]],["static-attr","href","#photos"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","photos-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.photos"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","li",[]],["static-attr","role","presentation"],["flush-element"],["open-element","a",[]],["static-attr","href","#appointments"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","appointments-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.appointments"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","li",[]],["static-attr","role","presentation"],["flush-element"],["open-element","a",[]],["static-attr","href","#visits"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","visits-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.visits"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","li",[]],["static-attr","role","presentation"],["flush-element"],["open-element","a",[]],["static-attr","href","#medication"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","medication-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.medication"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","li",[]],["static-attr","role","presentation"],["flush-element"],["open-element","a",[]],["static-attr","href","#imaging"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","imaging-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.imaging"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","li",[]],["static-attr","role","presentation"],["flush-element"],["open-element","a",[]],["static-attr","href","#labs"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","labs-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.labs"],null],false],["close-element"],["close-element"],["text","\\n"],["block",["if"],[["get",["canAddSocialWork"]]],null,49],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["unless"],[["get",["isNewOrDeleted"]]],null,50],["text"," "],["open-element","div",[]],["static-attr","class","tab-content"],["flush-element"],["text","\\n"],["block",["unless"],[["get",["isNewOrDeleted"]]],null,48],["text"," "],["open-element","div",[]],["static-attr","role","tabpanel"],["dynamic-attr","class",["concat",["tab-pane ",["helper",["if"],[["get",["isNewOrDeleted"]],"active"],null]]]],["static-attr","id","general"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel detail-section"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","col-xs-12 col-sm-6"],["flush-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["firstName",["helper",["t"],["patients.labels.firstName"],null],"form-input-group required test-first-name"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["middleName",["helper",["t"],["patients.labels.middleName"],null],"form-input-group test-middle-name"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["lastName",["helper",["t"],["patients.labels.lastName"],null],"form-input-group required test-last-name"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","class","list","selection"],["sex",["helper",["t"],["patients.labels.sex"],null],"form-input-group",["get",["sexList"]],["get",["model","sex"]]]]],false],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class","maxDate"],["dateOfBirth",["helper",["t"],["patients.labels.dateOfBirth"],null],"form-input-group ","now"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","form-input-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["labels.age"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","age"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["placeOfBirth",["helper",["t"],["patients.labels.placeOfBirth"],null],"form-input-group"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["occupation",["helper",["t"],["patients.labels.occupation"],null],"form-input-group"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","form-input-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["patients.labels.patientType"],null],false],["close-element"],["text","\\n "],["open-element","div",[]],["flush-element"],["text","\\n "],["append",["helper",["ext-radio"],null,[["content","value","showInline"],[["get",["patientTypes"]],["get",["model","patientType"]],true]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","col-xs-12 col-sm-6"],["flush-element"],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","class"],["status",["helper",["t"],["patients.labels.status"],null],["get",["statusList"]],["get",["model","status"]],"form-input-group"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["externalPatientId",["helper",["t"],["patients.labels.externalPatientId"],null],"form-input-group"]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["prompt","label","property","content","class"],[" ",["helper",["t"],["patients.labels.bloodType"],null],"bloodType",["get",["bloodTypes"]],"form-input-group"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","class"],["clinic",["helper",["t"],["patients.labels.clinic"],null],["get",["clinicList"]],["get",["model","clinic"]],"form-input-group"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["referredBy",["helper",["t"],["patients.labels.referredBy"],null],"form-input-group"]]],false],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["referredDate",["helper",["t"],["patients.labels.referredDate"],null],"form-input-group"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["religion",["helper",["t"],["patients.labels.religion"],null],"form-input-group"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["parent",["helper",["t"],["patients.labels.parent"],null],"form-input-group"]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["label","property","content","optionValuePath","optionLabelPath","prompt","class"],[["helper",["t"],["billing.labels.paymentProfile"],null],"paymentProfile",["get",["pricingProfiles"]],"selectObject","selectObject.name"," ","form-input-group"]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel detail-section"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddContact"]]],null,32],["text"," "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["phone",["helper",["t"],["patients.labels.phone"],null],"col-xs-12 col-sm-6"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","type","label","class"],["email","email",["helper",["t"],["labels.email"],null],"col-xs-12 col-sm-6"]]],false],["text","\\n"],["block",["if"],[["get",["haveAddressOptions"]]],null,31,26],["text"," "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","className"],["country",["helper",["t"],["labels.country"],null],["get",["countryList"]],["get",["model","country"]],"col-xs-12 col-sm-6"]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["haveAdditionalContacts"]]],null,25],["text"," "],["close-element"],["text","\\n "],["append",["helper",["custom-form-manager"],null,[["model","formType"],[["get",["model"]],"patient"]]],false],["text","\\n "],["close-element"],["text","\\n"],["block",["unless"],[["get",["isNewOrDeleted"]]],null,21],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton","bubbles"],[["get",["model"]],false,false]],51]],"locals":[]}],"hasPartials":true}', -meta:{moduleName:"hospitalrun/patients/edit/template.hbs"}})}),define("hospitalrun/patients/imaging/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"b0VbAwnT",block:'{"statements":[["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.dateRequested"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.imagingType"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.status"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.dateProcessed"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.result"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.notes"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["patientImaging"]]],null,3],["close-element"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteImaging",["get",["imaging"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["labels.delete"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editImaging",["get",["imaging"]]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canAddImaging"]]],null,1],["block",["if"],[["get",["canDeleteImaging"]]],null,0]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["modifier",["action"],[["get",[null]],"editImaging",["get",["imaging"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["imaging","requestedDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["imaging","imagingType","name"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["imaging","status"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["imaging","imagingDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["imaging","result"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["imaging","notes"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["imaging","requestedBy"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["imaging","canEdit"]]],null,2],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["imaging"]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/imaging/template.hbs"}})}),define("hospitalrun/patients/index/controller",["exports","hospitalrun/controllers/abstract-paged-controller","hospitalrun/mixins/patient-visits","hospitalrun/utils/visit-statuses"],function(e,t,n,a){e.default=t.default.extend(n.default,{addPermission:"add_patient",deletePermission:"delete_patient",canAdmitPatient:function(){return this.currentUserCan("admit_patient")}.property(),canDischargePatient:function(){return this.currentUserCan("discharge_patient")}.property(),startKey:[],actions:{checkInPatient:function(e){this.send("createNewVisit",e)},checkoutPatient:function(e){this.editPatientVisitWithStatus(e,a.default.CHECKED_IN)},dischargePatient:function(e){this.editPatientVisitWithStatus(e,a.default.ADMITTED)}},editPatientVisitWithStatus:function(e,t){var n=this;this.getPatientVisits(e).then(function(e){var a=e.findBy("status",t);a&&(a.set("endDate",new Date),n.transitionToRoute("visits.edit",a))})}})}),define("hospitalrun/patients/index/route",["exports","hospitalrun/routes/abstract-index-route","ember","ember-i18n","hospitalrun/mixins/user-session"],function(e,t,n,a,l){var s=n.default.computed;e.default=t.default.extend(l.default,{modelName:"patient",newButtonAction:s(function(){return this.currentUserCan("add_patient")?"newItem":null}),newButtonText:(0,a.translationMacro)("patients.buttons.newPatient"),pageTitle:(0,a.translationMacro)("patients.titles.patientListing"),_getStartKeyFromItem:function(e){var t=e.get("displayPatientId"),n=this._getPouchIdFromItem(e);return[t,n]},_modelQueryParams:function(){return{mapReduce:"patient_by_display_id"}}})}),define("hospitalrun/patients/index/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"XNP6TQZC",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],21]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","a",[]],["static-attr","href","#"],["modifier",["action"],[["get",[null]],"newItem"]],["flush-element"],["append",["helper",["t"],["patients.messages.createNewPatient"],null],false],["close-element"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["static-attr","data-test-selector","no-patients-found"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["patients.messages.noPatientsFound"],null],false],["block",["if"],[["get",["canAdd"]]],null,0],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"deleteItem",["get",["patient"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["buttons.delete"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default success admit"],["modifier",["action"],[["get",[null]],"checkInPatient",["get",["patient"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-log-in"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["visits.buttons.checkIn"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canAdmitPatient"]]],null,3]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default info"],["modifier",["action"],[["get",[null]],"checkoutPatient",["get",["patient"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-log-out"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["visits.buttons.checkOut"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canDischargePatient"]]],null,5]],"locals":[]},{"statements":[["block",["if"],[["get",["patient","checkedIn"]]],null,6,4]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default info"],["modifier",["action"],[["get",[null]],"dischargePatient",["get",["patient"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-log-out"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["visits.buttons.discharge"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canDischargePatient"]]],null,8]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editItem",["get",["patient"]]],[["bubbles"],[false]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAdd"]]],null,10],["block",["if"],[["get",["patient","admitted"]]],null,9,7],["block",["if"],[["get",["canDelete"]]],null,2],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["static-attr","class","clickable"],["modifier",["action"],[["get",[null]],"editItem",["get",["patient"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["patient","displayPatientId"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["patient","firstName"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["patient","lastName"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["patient","sex"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["patient","dateOfBirth"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["patient","status"]],false],["close-element"],["text","\\n"],["block",["if"],[["get",["showActions"]]],null,11],["text"," "],["close-element"],["text","\\n"]],"locals":["patient"]},{"statements":[["text"," "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.status"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["patients.labels.dob"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["patients.labels.sex"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["patients.labels.lastName"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["patients.labels.firstName"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.id"],null],false]],"locals":[]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","thead",[]],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["id",["get",["sortDesc"]],["get",["sortKey"]]]],19],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["firstName",["get",["sortDesc"]],["get",["sortKey"]]]],18],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["lastName",["get",["sortDesc"]],["get",["sortKey"]]]],17],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["sex",["get",["sortDesc"]],["get",["sortKey"]]]],16],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["dateOfBirth",["get",["sortDesc"]],["get",["sortKey"]]]],15],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["status",["get",["sortDesc"]],["get",["sortKey"]]]],14],["text","\\n"],["block",["if"],[["get",["showActions"]]],null,13],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","tbody",[]],["flush-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,12],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["hasRecords"]]],null,20,1]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/index/template.hbs"}})}),define("hospitalrun/patients/labs/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"NZjGsEXR",block:'{"statements":[["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.dateRequested"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labs.labels.labType"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.status"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.dateProcessed"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.result"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.notes"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["patientLabs"]]],null,3],["close-element"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteLab",["get",["lab"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["labels.delete"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editLab",["get",["lab"]]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canAddLab"]]],null,1],["block",["if"],[["get",["canDeleteLab"]]],null,0]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["modifier",["action"],[["get",[null]],"editLab",["get",["lab"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["lab","requestedDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["lab","labType","name"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["lab","status"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["lab","labDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["lab","result"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["lab","notes"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["lab","requestedBy"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["lab","canEdit"]]],null,2],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["lab"]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/labs/template.hbs"}})}),define("hospitalrun/patients/medication/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"s3chlZL2",block:'{"statements":[["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.date"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.name"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.status"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.prescription"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["patientMedications"]]],null,3],["close-element"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteMedication",["get",["medication"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["labels.delete"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editMedication",["get",["medication"]]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canAddMedication"]]],null,1],["block",["if"],[["get",["canDeleteMedication"]]],null,0]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["modifier",["action"],[["get",[null]],"editMedication",["get",["medication"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["medication","prescriptionDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medication","medicationName"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medication","status"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medication","prescription"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medication","requestedBy"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["medication","canEdit"]]],null,2],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["medication"]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/medication/template.hbs"}})}),define("hospitalrun/patients/notes/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/mixins/is-update-disabled","hospitalrun/mixins/patient-submodule","hospitalrun/mixins/patient-notes","hospitalrun/mixins/user-session"],function(e,t,n,a,l,s,i){e.default=t.default.extend(a.default,i.default,l.default,s.default,{cancelAction:"closeModal",updateAction:"updateNote",moduleController:n.default.inject.controller("patients"),physicianList:n.default.computed.alias("moduleController.physicianList"),lookupListsToUpdate:[{name:"physicianList",property:"model.attribution",id:"physician_list"}],title:function(){return this.get("model.isNew")?this.get("i18n").t("patients.notes.newNote")+" "+this.get("model.patient.displayName"):this.get("i18n").t("patients.notes.newNote")+" "+moment(this.get("model.date")).format("MM/DD/YYYY")+" for "+this.get("model.patient.displayName")}.property("model.patient.displayName"),updateCapability:"add_note",beforeUpdate:function(){return this.set("model.date",new Date),this.set("model.createdBy",this.getUserName()),n.default.RSVP.Promise.resolve()},afterUpdate:function(){this.send(this.get("updateAction"),this.get("model")),this.send(this.get("cancelAction"))},actions:{changeVisit:function(){var e=$('select[name="note-visits"]').get(0),t=e.selectedIndex,n=this.get("patientVisitsForSelect"),a=t-1,l=n[a].selectObject;this.get("model").set("visit",l),this._setNoteType()}}})}),define("hospitalrun/patients/notes/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"lvlxvqfb",block:'{"statements":[["block",["modal-dialog"],null,[["hideCancelButton","hideUpdateButton","isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["hideCancelButton"]],["get",["hideUpdateButton"]],["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],2]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","option",[]],["dynamic-attr","value",["concat",[["unknown",["item","selectObject"]]]]],["dynamic-attr","selected",["helper",["is-equal"],[["get",["item","selectObject"]],["get",["model","visit"]]],null],null],["flush-element"],["text","\\n "],["append",["unknown",["item","selectObject","visitDescription"]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":["item"]},{"statements":[["text"," "],["append",["helper",["em-text"],null,[["label","property","rows","class"],[["helper",["t"],["labels.note"],null],"content",3,"test-note-content required form-input-group"]]],false],["text","\\n\\n "],["open-element","select",[]],["static-attr","name","note-visits"],["static-attr","class","form-control"],["modifier",["action"],[["get",[null]],"changeVisit"],[["on"],["change"]]],["flush-element"],["text","\\n "],["open-element","option",[]],["dynamic-attr","selected",["helper",["is-not"],[["get",["model","visit"]]],null],null],["flush-element"],["text","\\n "],["append",["helper",["t"],["patients.notes.pleaseSelectAVisit"],null],false],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["patientVisitsForSelect"]]],null,0],["text"," "],["close-element"],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","className"],["attribution",["helper",["t"],["patients.notes.onBehalfOfLabel"],null],["get",["physicianList"]],["get",["attribution"]],"form-input-group test-note-attribution"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],1]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/notes/template.hbs"}})});define("hospitalrun/patients/operation-report/controller",["exports","ember","hospitalrun/patients/operative-plan/controller"],function(e,t,n){var a=t.default.computed.alias,l=t.default.get;e.default=n.default.extend({additionalButtons:null,lookupListsToUpdate:[{name:"physicianList",property:"model.assistant",id:"physician_list"},{name:"physicianList",property:"model.surgeon",id:"physician_list"},{name:"procedureList",property:"modelProcedures",id:"procedure_list"}],updateCapability:"add_operation_report",diagnosisList:a("patientController.diagnosisList"),_finishAfterUpdate:function(){var e=l(this,"i18n"),t=e.t("operationReport.messages.reportSaved"),n=e.t("operationReport.titles.reportSaved");this.displayAlert(n,t)},actions:{addDiagnosis:function(e){this.addDiagnosisToModelAndPatient(e)}}})});define("hospitalrun/patients/operation-report/route",["exports","hospitalrun/routes/abstract-edit-route","ember","ember-i18n"],function(e,t,n,a){e.default=t.default.extend({customForms:n.default.inject.service(),editTitle:(0,a.translationMacro)("operationReport.titles.editTitle"),modelName:"operation-report",newTitle:(0,a.translationMacro)("operationReport.titles.newTitle"),getNewData:function(){var e=this.get("customForms"),t={customForms:n.default.Object.create()};return e.setDefaultCustomForms(["operativePlan"],t)}})}),define("hospitalrun/patients/operation-report/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"QUbhR2Eo",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["patient-summary"],null,[["allowAddDiagnosis","diagnosisContainer","diagnosisList","disablePatientLink","patient"],[true,["get",["model"]],["get",["diagnosisList"]],true,["get",["model","patient"]]]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","patient-summary"],["flush-element"],["text","\\n "],["append",["helper",["patient-diagnosis"],null,[["diagnosisContainer","diagnosisProperty","primaryDiagnosisLabel","secondaryDiagnosisLabel"],[["get",["model"]],"preOpDiagnoses",["helper",["t"],["operationReport.labels.preOpPrimaryDiagnosis"],null],["helper",["t"],["operationReport.labels.preOpSecondaryDiagnosis"],null]]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-text"],null,[["property","label","class"],["operationDescription",["helper",["t"],["operationReport.labels.operationDescription"],null],"operation-description"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["surgeryDate",["helper",["t"],["operationReport.labels.surgeryDate"],null],"form-input-group col-sm-4 surgery-date"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["className","property","label","list","selection","class"],["col-sm-3","surgeon",["helper",["t"],["operationReport.labels.surgeon"],null],["get",["physicianList"]],["get",["model","surgeon"]],"operation-surgeon"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["className","property","label","list","selection","class"],["col-sm-3","assistant",["helper",["t"],["operationReport.labels.assistant"],null],["get",["physicianList"]],["get",["model","assistant"]],"operation-assistant"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["caseComplexity",["helper",["t"],["operationReport.labels.caseComplexity"],null],"col-sm-2 case-complexity"]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["operative-procedures"],null,[["model","procedureList"],[["get",["model"]],["get",["procedureList"]]]]],false],["text","\\n "],["append",["helper",["em-text"],null,[["property","label"],["additionalNotes",["helper",["t"],["operationReport.labels.additionalNotes"],null]]]],false],["text","\\n "],["append",["helper",["custom-form-manager"],null,[["model","formType"],[["get",["model"]],"operativePlan"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/operation-report/template.hbs"}})}),define("hospitalrun/patients/operative-plan/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/components/operative-procedures","hospitalrun/mixins/operative-plan-statuses","hospitalrun/mixins/patient-submodule"],function(e,t,n,a,l,s){var i=n.default.computed,o=n.default.computed.alias,r=n.default.get,d=n.default.inject,c=n.default.RSVP,u=n.default.set,p=["additionalNotes","caseComplexity","customForms","patient","procedures","operationDescription","surgeon","surgeryDate"];e.default=t.default.extend(l.default,s.default,{completedPlan:!1,lookupListsToUpdate:[{name:"physicianList",property:"model.surgeon",id:"physician_list"},{name:"procedureList",property:"modelProcedures",id:"procedure_list"}],newPlan:!1,updateCapability:"add_operative_plan",patientsController:d.controller("patients"),physicianList:o("patientsController.physicianList"),procedureList:o("patientsController.procedureList"),additionalButtons:i("model.{isNew,status}",function(){var e=r(this,"i18n"),t=r(this,"model.isNew"),n=r(this,"model.status");if(!t&&n!==l.COMPLETED_STATUS)return[{class:"btn btn-primary on-white",buttonAction:"completePlan",buttonIcon:"octicon octicon-check",buttonText:e.t("operativePlan.buttons.completePlan")}]}),modelProcedures:i.map("model.procedures",function(e){return r(e,"description")}),afterUpdate:function(){var e=r(this,"newPlan");if(e){var t=r(this,"model.patient");t.save().then(this._finishAfterUpdate.bind(this))}else this._finishAfterUpdate()},beforeUpdate:function(){var e=r(this,"model"),t=r(e,"isNew"),n=r(e,"status");if((0,a.addProcedure)(e),u(this,"newPlan",t),n===l.COMPLETED_STATUS){var s=e.changedAttributes();s.status&&u(this,"completedPlan",!0)}else u(this,"completedPlan",!1);return t?this.saveNewDiagnoses():c.resolve()},_createOperationReport:function(){var e=this,t=r(this,"store"),n=r(this,"model"),a=n.getProperties.apply(n,p),l=r(n,"diagnoses"),s=r(n,"patient");u(a,"operativePlan",n),u(a,"preOpDiagnosis",l),u(a,"returnToPatient",r(s,"id"));var i=t.createRecord("operation-report",a);this.getPatientDiagnoses(s,i),i.save().then(function(t){s.save().then(function(){var n=r(e,"i18n"),a=n.t("operativePlan.messages.planCompleted"),l=n.t("operativePlan.titles.planCompleted");e.displayAlert(l,a,"showOperationReport",t,"ok")})})},_finishAfterUpdate:function(){var e=r(this,"completedPlan");if(e)this._createOperationReport();else{var t=r(this,"i18n"),n=t.t("operativePlan.messages.planSaved"),a=t.t("operativePlan.titles.planSaved");this.displayAlert(a,n)}},actions:{completePlan:function(){var e=r(this,"model");u(e,"status",l.COMPLETED_STATUS),this.send("update")}}})}),define("hospitalrun/patients/operative-plan/route",["exports","hospitalrun/routes/abstract-edit-route","ember","ember-i18n"],function(e,t,n,a){e.default=t.default.extend({customForms:n.default.inject.service(),editTitle:(0,a.translationMacro)("operativePlan.titles.editTitle"), -modelName:"operative-plan",newTitle:(0,a.translationMacro)("operativePlan.titles.newTitle"),getNewData:function(){var e=this.get("customForms"),t={customForms:n.default.Object.create()};return e.setDefaultCustomForms(["operativePlan"],t)},actions:{showOperationReport:function(e){this.transitionTo("patients.operation-report",e)}}})}),define("hospitalrun/patients/operative-plan/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"qKdB5zif",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["patient-summary"],null,[["patient","disablePatientLink","diagnosisContainer"],[["get",["model","patient"]],true,["get",["model"]]]]],false],["text","\\n "],["append",["helper",["em-text"],null,[["property","label","class"],["operationDescription",["helper",["t"],["operativePlan.labels.operationDescription"],null],"operation-description"]]],false],["text","\\n "],["append",["helper",["operative-procedures"],null,[["model","procedureList"],[["get",["model"]],["get",["procedureList"]]]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["surgeryDate",["helper",["t"],["operativePlan.labels.surgeryDate"],null],"form-input-group col-sm-4 surgery-date"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["className","property","label","list","selection","class"],["col-sm-4","surgeon",["helper",["t"],["operativePlan.labels.surgeon"],null],["get",["physicianList"]],["get",["model","surgeon"]],"plan-surgeon"]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["prompt","label","property","content","class"],[" ",["helper",["t"],["operativePlan.labels.status"],null],"status",["get",["planStatuses"]],"form-input-group col-sm-2 plan-status"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["caseComplexity",["helper",["t"],["operativePlan.labels.caseComplexity"],null],"col-sm-2 case-complexity"]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-text"],null,[["property","label","class"],["admissionInstructions",["helper",["t"],["operativePlan.labels.admissionInstructions"],null],"admission-instructions"]]],false],["text","\\n "],["append",["helper",["em-text"],null,[["property","label","class"],["additionalNotes",["helper",["t"],["operativePlan.labels.additionalNotes"],null],"additional-notes"]]],false],["text","\\n "],["append",["helper",["custom-form-manager"],null,[["model","formType"],[["get",["model"]],"operativePlan"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/operative-plan/template.hbs"}})}),define("hospitalrun/patients/outpatient/controller",["exports","ember","hospitalrun/mixins/filter-list","hospitalrun/mixins/modal-helper","hospitalrun/mixins/patient-visits","hospitalrun/utils/select-values","hospitalrun/mixins/user-session","hospitalrun/utils/visit-statuses","hospitalrun/mixins/visit-types"],function(e,t,n,a,l,s,i,o,r){var d=t.default.computed,c=t.default.isEmpty;e.default=t.default.Controller.extend(n.default,a.default,l.default,s.default,i.default,r.default,{addPermission:"add_patient",deletePermission:"delete_patient",filterValue:null,filterBy:null,queryParams:["visitDate","visitLocation"],sortByDesc:null,sortByKey:null,visitLocation:null,visitDate:null,canAddVisit:d(function(){return this.currentUserCan("add_visit")}),hasAppointmentLabels:d(function(){var e=this.get("i18n");return[e.t("visits.labels.haveAppointment"),e.t("visits.labels.noAppointment")]}),doneOrdersValues:d(function(){var e=this.get("i18n");return[e.t("visits.labels.ordersNotDone"),e.t("visits.labels.haveDoneOrders")]}),locationList:t.default.computed.map("patientController.locationList.value",s.default.selectValuesMap).volatile(),patientNames:d.map("model",function(e){return e.get("patient.shortDisplayName")}),patientController:t.default.inject.controller("patients"),sexList:d.alias("patientController.sexList.value"),visitTypesList:d.alias("patientController.visitTypesList"),visitTypesValues:d.map("visitTypes",function(e){return e.value}),checkedInVisits:d.filter("model.@each.status",function(e){return"Admission"!==e.get("visitType")&&e.get("status")===o.default.CHECKED_IN}),filteredVisits:d("checkedInVisits","filterBy","filterValue","visitLocation",function(){var e=this.get("filterBy"),t=this.get("filterValue"),n=this.get("filteredBy"),a=this.get("visitLocation"),l=this.get("checkedInVisits");return c(a)?n.delete("location"):n.set("location",a),this.filterList(l,e,t)}),sortedVisits:d("filteredVisits","sortByKey","sortByDesc",function(){var e=this.get("filteredVisits"),n=this.get("sortByDesc"),a=this.get("sortByKey");return t.default.isEmpty(e)||t.default.isEmpty(a)?e:e=e.toArray().sort(function(e,l){var s=e.get(a),i=l.get(a);return"orderType"===a&&(s=s.toString(),i=i.toString()),n?t.default.compare(i,s):t.default.compare(s,i)})}),startKey:[],actions:{checkOut:function(e){var t=this.get("i18n"),n={patientName:e.get("patient.displayName")},a=t.t("visits.messages.checkOut",n);this.displayConfirm(t.t("visits.titles.checkOut"),a,"finishCheckOut",e)},editVisit:function(e){this.get("canAddVisit")&&(e.set("returnTo","patients.outpatient"),this.transitionToRoute("visits.edit",e))},filter:function(e,t){this.set("filterBy",e),this.set("filterValue",t)},finishCheckOut:function(e){this.checkoutVisit(e,o.default.CHECKED_OUT)},search:function(){var e=this.get("model.selectedVisitDate"),t=this.get("model.selectedLocation");c(e)||this.set("visitDate",e.getTime()),c(t)?this.set("visitLocation",null):this.set("visitLocation",t)},sortByKey:function(e,t){this.setProperties({sortByDesc:t,sortByKey:e})},patientCheckIn:function(){this.transitionToRoute("visits.edit","checkin").then(function(e){var t={outPatient:!0,visitType:null,returnTo:"patients.outpatient"};e.currentModel.setProperties(t)})}}})}),define("hospitalrun/patients/outpatient/route",["exports","hospitalrun/routes/abstract-index-route","hospitalrun/mixins/date-format","ember","ember-i18n"],function(e,t,n,a,l){var s=a.default.computed,i=a.default.isEmpty;e.default=t.default.extend(n.default,{database:a.default.inject.service(),modelName:"visit",newButtonAction:"patientCheckIn",newButtonText:(0,l.translationMacro)("patients.buttons.patientCheckIn"),selectedVisitDate:null,showingTodaysPatients:!0,pageTitle:s("showingTodaysPatients","selectedVisitDate",function(){var e=this.get("i18n"),t=this.get("showingTodaysPatients");if(t)return e.t("patients.titles.todaysOutpatients");var n=this._dateFormat(this.get("selectedVisitDate"));return e.t("patients.titles.outpatientsForDate",{visitDate:n})}),queryParams:{visitDate:{refreshModel:!0},visitLocation:{refreshModel:!1}},_getStartKeyFromItem:function(e){var t=e.get("displayPatientId");return[t,"patient_"+e.get("id")]},_modelQueryParams:function(e){var t=this.get("database"),n=t.getMaxPouchId("visit"),a=t.getMinPouchId("visit"),l=e.visitDate;l=i(l)?moment():moment(parseInt(l)),l.isSame(moment(),"day")?this.set("showingTodaysPatients",!0):(this.set("showingTodaysPatients",!1),this.set("selectedVisitDate",l.toDate()));var s=l.endOf("day").valueOf(),o=l.startOf("day").valueOf();return{mapReduce:"visit_by_date",options:{endkey:[s,s,n],startkey:[o,null,a]}}},model:function(e){var t=this;return this._super(e).then(function(n){var a=new Date;return i(e.visitDate)||a.setTime(e.visitDate),n.set("selectedVisitDate",a),n.set("display_selectedVisitDate",t._dateFormat(a)),n.set("selectedLocation",e.visitLocation),n})},actions:{finishCheckOut:function(e){this.controller.send("finishCheckOut",e)},patientCheckIn:function(){this.controller.send("patientCheckIn")}}})}),define("hospitalrun/patients/outpatient/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"UnoRIh+j",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],11]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","tr",[]],["static-attr","class","clickable"],["modifier",["action"],[["get",[null]],"editVisit",["get",["visit"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["unknown",["visit","patient","displayPatientId"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["unknown",["visit","patient","shortDisplayName"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["unknown",["visit","patient","sex"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["unknown",["visit","patient","shortAge"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["unknown",["visit","visitType"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["helper",["date-format"],[["get",["visit","startDate"]]],[["format"],["h:mm A"]]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1 text-center"],["flush-element"],["append",["unknown",["visit","hasAppointmentLabel"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["unknown",["visit","examiner"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1 text-center"],["flush-element"],["append",["unknown",["visit","hasDoneOrders"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"checkOut",["get",["visit"]]],[["bubbles"],[false]]],["flush-element"],["append",["helper",["t"],["visits.buttons.checkOut"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["visit"]},{"statements":[["text"," "],["append",["helper",["t"],["visits.labels.ordersDone"],null],false],["text","\\n"]],"locals":[]},{"statements":[["append",["helper",["t"],["visits.labels.examiner"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["visits.labels.appointment"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["visits.labels.checkInTime"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["visits.labels.visitType"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.age"],null],false]],"locals":[]},{"statements":[["text"," "],["append",["helper",["t"],["patients.labels.sex"],null],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["t"],["labels.name"],null],false],["text","\\n"]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.id"],null],false]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["selectedVisitDate",["helper",["t"],["visits.labels.visitDate"],null],"col-sm-3 outpatient-date"]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["class","property","label","content","prompt"],["col-sm-3 form-input-group outpatient-location","selectedLocation",["helper",["t"],["labels.location"],null],["get",["locationList"]]," "]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-sm-3"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["close-element"],["text","\\n "],["open-element","div",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"search"]],["flush-element"],["append",["helper",["t"],["buttons.search"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-info"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],10],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table outpatient-list"],["flush-element"],["text","\\n "],["open-element","thead",[]],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["patient.displayPatientId",["get",["sortByDesc"]],["get",["sortByKey"]]]],9],["text","\\n"],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey","filterBy","filteredBy","filterType","filterValues"],["patient.shortDisplayName",["get",["sortByDesc"]],["get",["sortByKey"]],"patient.shortDisplayName",["get",["filteredBy"]],"typeahead",["get",["patientNames"]]]],8],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey","filterBy","filteredBy","filterValues"],["patient.sex",["get",["sortByDesc"]],["get",["sortByKey"]],"patient.sex",["get",["filteredBy"]],["get",["sexList"]]]],7],["text"," "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["patient.dateOfBirth",["get",["sortByDesc"]],["get",["sortByKey"]]]],6],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey","filterBy","filteredBy","filterValues"],["visitType",["get",["sortByDesc"]],["get",["sortByKey"]],"visitType",["get",["filteredBy"]],["get",["visitTypesValues"]]]],5],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["startDate",["get",["sortByDesc"]],["get",["sortByKey"]]]],4],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey","filterBy","filteredBy","filterValues"],["hasAppointmentLabel",["get",["sortByDesc"]],["get",["sortByKey"]],"hasAppointmentLabel",["get",["filteredBy"]],["get",["hasAppointmentLabels"]]]],3],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["examiner",["get",["sortByDesc"]],["get",["sortByKey"]]]],2],["text","\\n"],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey","filterBy","filteredBy","filterValues"],["hasDoneOrders",["get",["sortByDesc"]],["get",["sortByKey"]],"hasDoneOrders",["get",["filteredBy"]],["get",["doneOrdersValues"]]]],1],["text"," "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","tbody",[]],["flush-element"],["text","\\n"],["block",["each"],[["get",["sortedVisits"]]],null,0],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/outpatient/template.hbs"}})}),define("hospitalrun/patients/photo/controller",["exports","ember"],function(e,t){e.default=t.default.Controller.extend({patientsEdit:t.default.inject.controller("patients/edit"),title:function(){var e=this.get("model.isNew");return e?this.get("i18n").t("patients.titles.addPhoto"):this.get("i18n").t("patients.titles.editPhoto")}.property("model.isNew"),updateButtonText:function(){var e=this.get("model.isNew");return e?this.get("i18n").t("buttons.add"):this.get("i18n").t("buttons.update")}.property("model.isNew"),updateButtonAction:"update",showUpdateButton:!0,editController:t.default.computed.alias("patientsEdit"),actions:{cancel:function(){this.send("closeModal")},update:function(){var e=this.get("model.caption"),t=this.get("model.isNew"),n=this.get("model.photoFile");t?this.get("editController").send("addPhoto",n,e):this.get("editController").send("updatePhoto",this.get("model"))}}})}),define("hospitalrun/patients/photo/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"c+xb//yl",block:'{"statements":[["block",["modal-dialog"],null,[["hideCancelButton","hideUpdateButton","isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["hideCancelButton"]],["get",["hideUpdateButton"]],["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],3]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","thumbnail"],["flush-element"],["text","\\n "],["open-element","img",[]],["dynamic-attr","alt",["unknown",["model","caption"]],null],["dynamic-attr","src",["unknown",["model","url"]],null],["static-attr","class","img-responsive"],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["take-photo"],null,[["photoFile"],[["get",["model","photoFile"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model","isNew"]]],null,1,0],["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label"],["caption","Caption"]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],2]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/photo/template.hbs"}})}),define("hospitalrun/patients/quick-add/controller",["exports","ember","hospitalrun/controllers/abstract-edit-controller","ember-i18n"],function(e,t,n,a){e.default=n.default.extend({sexList:t.default.computed.alias("model.requestingController.sexList"),title:(0,a.translationMacro)("patients.titles.new"),updateCapability:"add_patient",actions:{cancel:function(){this.send("closeModal")}},afterUpdate:function(e){var t=this.get("model.requestingController");t.send("addedNewPatient",e)}})}),define("hospitalrun/patients/quick-add/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"CI80Vogk",block:'{"statements":[["block",["modal-dialog"],null,[["hideCancelButton","isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["hideCancelButton"]],["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["friendlyId","Id","required col-sm-6"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["firstName","First Name","required col-sm-6"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["middleName","Middle Name","col-sm-6"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["lastName","Last Name","required col-sm-6"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","class"],["sex","Sex",["get",["sexList"]],["get",["model","sex"]],"col-sm-6 form-input-group"]]],false],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","maxDate","class"],["dateOfBirth","Date of Birth","now","col-sm-6"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["phone",["helper",["t"],["patients.labels.phone"],null],"col-xs-12 col-sm-6"]]],false],["text","\\n "],["append",["helper",["em-text"],null,[["label","property","rows","class"],[["helper",["t"],["labels.address"],null],"address",3,"col-xs-12 col-sm-6"]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-warning"],["static-attr","role","alert"],["flush-element"],["text","\\n "],["append",["helper",["t"],["patients.messages.notFoundQuickAdd",["get",["model"]]],null],false],["text","\\n "],["close-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/quick-add/template.hbs"}})}),define("hospitalrun/patients/reports/controller",["exports","ember","hospitalrun/controllers/abstract-report-controller","hospitalrun/mixins/patient-diagnosis","hospitalrun/mixins/patient-visits","hospitalrun/utils/select-values","hospitalrun/mixins/visit-types"],function(e,t,n,a,l,s,i){e.default=n.default.extend(a.default,l.default,i.default,{patientsController:t.default.inject.controller("patients"),clinicList:t.default.computed.map("patientsController.clinicList.value",s.default.selectValuesMap),diagnosisList:t.default.computed.alias("patientsController.diagnosisList"),physicianList:t.default.computed.map("patientsController.physicianList.value",s.default.selectValuesMap),locationList:t.default.computed.map("patientsController.locationList.value",s.default.selectValuesMap),statusList:t.default.computed.map("patientsController.statusList.value",s.default.selectValuesMap),visitTypesList:t.default.computed.alias("patientsController.visitTypesList"),reportType:"detailedAdmissions",patientDetails:{},admissionReportColumns:t.default.computed(function(){var e=this.get("i18n");return{sex:{label:e.t("labels.sex"),include:!0,property:"sex"},total:{label:e.t("labels.total"),include:!0,property:"total",format:"_numberFormat"}}}),admissionDetailReportColumns:t.default.computed(function(){var e=this.get("i18n");return{id:{label:e.t("labels.id"),include:!0,property:"patientId"},name:{label:e.t("labels.name"),include:!0,property:"patientName"},admissionDate:{label:e.t("patients.labels.admissionDate"),include:!0,property:"admissionDate",format:"_dateTimeFormat"},dischargeDate:{label:e.t("patients.labels.dischargeDate"),include:!1,property:"dischargeDate",format:"_dateTimeFormat"},patientDays:{label:e.t("patients.labels.patientDays"),include:!1,property:"patientDays",format:"_numberFormat"}}}),diagnosticReportColumns:t.default.computed(function(){var e=this.get("i18n");return{type:{label:e.t("labels.type"),include:!0,property:"type"},total:{label:e.t("labels.total"),include:!0,property:"total",format:"_numberFormat"}}}),procedureDetailReportColumns:t.default.computed(function(){var e=this.get("i18n");return{id:{label:e.t("labels.id"),include:!0,property:"patient.displayPatientId"},name:{label:e.t("labels.name"),include:!0,property:"patient.displayName"},procedure:{label:e.t("visits.labels.procedure"),include:!0,property:"procedure"},procedureDate:{label:e.t("visits.labels.procedureDate"),include:!0,property:"procedureDate",format:"_dateTimeFormat"}}}),reportColumns:t.default.computed(function(){var e=this.get("i18n");return{visitDate:{label:e.t("visits.labels.visitDate"),include:!0,property:"visitDate"},visitType:{label:e.t("visits.labels.visitType"),include:!0,property:"visitType"},visitLocation:{label:e.t("labels.location"),include:!1,property:"location"},examiner:{label:e.t("visits.labels.examiner"),include:!0,property:"examiner"},name:{label:e.t("labels.name"),include:!0,property:"patient.displayName"},id:{label:e.t("labels.id"),include:!0,property:"patient.displayPatientId"},sex:{label:e.t("patients.labels.sex"),include:!0,property:"patient.sex"},dateOfBirth:{label:e.t("patients.labels.dateOfBirth"),include:!0,property:"patient.dateOfBirth",format:"_dateFormat"},age:{label:e.t("labels.age"),include:!1,property:"patient.age"},primaryDiagnosis:{label:e.t("patients.labels.primaryDiagnosis"),include:!1,property:"primaryDiagnosis"},secondaryDiagnoses:{label:e.t("patients.labels.secondaryDiagnosis"),include:!1,property:"additionalDiagnoses",format:"_diagnosisListToString"},procedures:{label:e.t("labels.procedures"),include:!1,property:"resolvedProcedures",format:"_procedureListToString"},contacts:{label:e.t("patients.labels.contacts"),include:!1,property:"patient",format:"_contactListToString"},referredBy:{label:e.t("patients.labels.referredBy"),include:!1,property:"patient.referredBy"},referredDate:{label:e.t("patients.labels.referredDate"),include:!1,property:"patient.referredDate",format:"_dateFormat"}}}),statusReportColumns:t.default.computed(function(){var e=this.get("i18n");return{id:{label:e.t("labels.id"),include:!0,property:"patient.displayPatientId"},name:{label:e.t("labels.name"),include:!0,property:"patient.displayName"},status:{label:e.t("labels.status"),include:!0,property:"patient.status"},primaryDiagnosis:{label:e.t("patients.labels.primaryDiagnosis"),include:!0,property:"patient",format:"_formatPrimaryDiagnosis"},secondaryDiagnoses:{label:e.t("patients.labels.secondaryDiagnosis"),include:!0,property:"patient",format:"_formatSecondaryDiagnosis"}}}),reportTypes:t.default.computed(function(){var e=this.get("i18n");return[{name:e.t("patients.titles.admissionsDetail"),value:"detailedAdmissions"},{name:e.t("patients.titles.admissionsSummary"),value:"admissions"},{name:e.t("patients.titles.diagnosticTesting"),value:"diagnostic"},{name:e.t("patients.titles.dischargesDetail"),value:"detailedDischarges"},{name:e.t("patients.titles.dischargesSummary"),value:"discharges"},{name:e.t("patients.titles.proceduresDetail"),value:"detailedProcedures"},{name:e.t("patients.titles.proceduresSummary"),value:"procedures"},{name:e.t("patients.titles.patientStatus"),value:"status"},{name:e.t("patients.titles.totalPatientDays"),value:"patientDays"},{name:e.t("patients.titles.totalPatientDaysDetailed"),value:"detailedPatientDays"},{name:e.t("patients.titles.visit"),value:"visit"}]}),isDischargeReport:function(){var e=this.get("reportType");return e.toLowerCase().indexOf("discharges")>-1}.property("reportType"),isStatusReport:function(){var e=this.get("reportType");return"status"===e}.property("reportType"),isVisitReport:function(){var e=this.get("reportType");return"visit"===e}.property("reportType"),_addContactToList:function(e,n,a,l){var s=[];t.default.isEmpty(n)&&t.default.isEmpty(e)||(t.default.isEmpty(e)||s.push(e),t.default.isEmpty(n)||s.push(n),l.push(a+s.join(", ")))},_addReportRow:function(e,n,a,l){if(t.default.isEmpty(l)&&!t.default.isEmpty(e.patient)){var s=null;s=e.get?e.get("patient.id"):e.patient.get("id"),t.default.isEmpty(s)||(l={action:"viewPatient",model:s})}this._super(e,n,a,l)},_addRowsByType:function(e,t,n,a){var l=this._totalByType(e,t,n);l.forEach(function(e){this._addReportRow(e,!0,a)}.bind(this))},_addPatientProcedureRows:function(e,n){e.forEach(function(e){t.default.isEmpty(e.records)?this._addReportRow({procedure:"Total for "+e.type+": "+e.total},!0,n):e.records.forEach(function(t,a){this._addReportRow({patient:t.get("patient"),procedure:t.get("description"),procedureDate:t.get("procedureDate")},!1,n),a+1===e.records.length&&this._addReportRow({procedure:"Total for "+e.type+": "+e.total},!0,n)}.bind(this))}.bind(this))},_contactListToString:function(e){var n=e.get("additionalContacts"),a=void 0,l=[],s=e.get("email"),i=e.get("phone");return this._addContactToList(i,s,"Primary: ",l),t.default.isEmpty(n)||n.forEach(function(e){a="",t.default.isEmpty(e.name)||t.default.isEmpty(e.relationship)||(t.default.isEmpty(e.name)||(a+=e.name),t.default.isEmpty(e.relationship)||(t.default.isEmpty(a)||(a+=" - "),a+=e.relationship),a+=": "),this._addContactToList(e.phone,e.email,a,l)}.bind(this)),l.join(";\n")},_dateTimeFormat:function(e){return this._dateFormat(e,"l h:mm A")},_diagnosisListToString:function(e){return this._listToString(e,"diagnosis","date")},_findDiagnosticsByDate:function(){var e=this.get("endDate"),n=this.get("startDate"),a={options:{},mapReduce:"imaging_by_status"},l=this.get("maxValue");return new t.default.RSVP.Promise(function(s,i){a.options.startkey=["Completed",null,n.getTime(),null],t.default.isEmpty(e)||(e=moment(e).endOf("day").toDate(),a.options.endkey=["Completed",l,e.getTime(),l]),this.store.query("imaging",a).then(function(e){var t={imaging:e};a.mapReduce="lab_by_status",this.store.query("lab",a).then(function(e){t.labs=e,s(t)},i)}.bind(this),i)}.bind(this))},_findPatientsByStatus:function(){var e=this.get("status"),n={options:{key:e},mapReduce:"patient_by_status"};return new t.default.RSVP.Promise(function(e,t){this.store.query("patient",n).then(e,t)}.bind(this))},_findProceduresByDate:function(){var e=this.get("endDate"),n=this.get("startDate"),a={options:{},mapReduce:"procedure_by_date"},l=this.get("maxValue");return new t.default.RSVP.Promise(function(s,i){a.options.startkey=[n.getTime(),null],t.default.isEmpty(e)||(e=moment(e).endOf("day").toDate(),a.options.endkey=[e.getTime(),l]),this.store.query("procedure",a).then(s,i)}.bind(this))},_findVisitsByDate:function(){var e=this.get("endDate"),n=this.get("startDate"),a={options:{},mapReduce:"visit_by_date"},l=this.get("isDischargeReport"),s=this.get("maxValue");return l&&(a.mapReduce="visit_by_discharge_date"),new t.default.RSVP.Promise(function(l,i){var o=this.get("isDischargeReport");a.options.startkey=[n.getTime(),null],t.default.isEmpty(e)||(e=moment(e).endOf("day").toDate(),o?a.options.endkey=[e.getTime(),s]:a.options.endkey=[e.getTime(),s,s]),this.store.query("visit",a).then(l,i)}.bind(this))},_filterByLike:function(e,n,a){return e.filter(function(e){var n=e.get("field");if(t.default.isEmpty(n))return!1;if(t.default.isArray(n)){var l=n.find(function(e){return this._haveLikeValue(e,a)}.bind(this));return!t.default.isEmpty(l)}return this._haveLikeValue(n,a)})},_filterInPatientVisit:function(e){var n=e.get("outPatient"),a=e.get("status");return!n&&!t.default.isEmpty(a)},_finishVisitReport:function(e){var t=this._totalByType(e,"visitType","total");t.forEach(function(e){"total"===e.type?this._addReportRow({visitDate:"Total visits: "+e.total}):(e.records.forEach(function(e){this._addReportRow(e)}.bind(this)),this._addReportRow({visitDate:"Total for "+e.type+": "+e.total}))}.bind(this)),this._finishReport()},_formatPrimaryDiagnosis:function(e){var t=this.getDiagnoses(e,!0,!1);return this._diagnosisListToString(t)},_formatSecondaryDiagnosis:function(e){var t=this.getDiagnoses(e,!0,!0);return this._diagnosisListToString(t)},_generateAdmissionOrDischargeReport:function(e,n){var a=this,l=!1,s=void 0,i={},o=this.get("i18n").t("patients.labels.sexNotEntered");n.indexOf("detailed")>-1?(l=!0,s=this.get("admissionDetailReportColumns"),s.patientDays.include=!1, -"detailedDischarges"===n?s.dischargeDate.include=!0:s.dischargeDate.include=!1):s=this.get("admissionReportColumns"),e=e.filter(this._filterInPatientVisit),e.forEach(function(e){if(!this.get("isDischargeReport")||!t.default.isEmpty(e.get("endDate"))){var n={patient:e.get("patient"),patientId:e.get("patient.displayPatientId"),patientName:e.get("patient.displayName"),admissionDate:e.get("startDate"),dischargeDate:e.get("endDate")},a=e.get("patient.sex");a||(a=o);var l=i[a];l||(l={count:0,rows:[]},i[a]=l),l.count++,l.rows.push(n)}}.bind(this));var r=0,d=function(e){a._addReportRow(e,!1,s)};for(var c in i)l?(i[c].rows.forEach(d),this._addReportRow({patientId:c+" Total: "+i[c].count},!0,s)):this._addReportRow({sex:c,total:i[c].count},!0,s),r+=i[c].count;this._addReportRow({patientId:"Grand Total: "+r},!0,s),this._finishReport(s)},_generateDiagnosticReport:function(){this._findDiagnosticsByDate().then(function(e){var t=this.get("diagnosticReportColumns");this._addRowsByType(e.imaging,"imagingType.name","Total for imaging: ",t),this._addRowsByType(e.labs,"labType.name","Total for labs: ",t),this._finishReport(t)}.bind(this),function(e){this._notifyReportError("Error in _generateDiagnosticReport: "+e)}.bind(this))},_generatePatientDaysReport:function(e,n){e=e.filter(this._filterInPatientVisit);var a=0===n.indexOf("detailed"),l=this.get("endDate"),s=void 0,i=moment(this.get("startDate")).startOf("day");a?(s=this.get("admissionDetailReportColumns"),s.patientDays.include=!0,s.dischargeDate.include=!0):s={total:{label:"Total",include:!0,property:"total",format:"_numberFormat"}},l=t.default.isEmpty(l)?moment().endOf("day"):moment(l).endOf("day");var o=e.reduce(function(e,n){var o=n.get("endDate"),r=moment(n.get("startDate")).startOf("day");o=t.default.isEmpty(o)?moment().endOf("day"):moment(o).endOf("day"),r.isBefore(i)&&(r=i),o.isAfter(l)&&(o=l);var d=o.diff(r,"days",!0);return a&&this._addReportRow({patient:n.get("patient"),patientId:n.get("patient.displayPatientId"),patientName:n.get("patient.displayName"),admissionDate:n.get("startDate"),dischargeDate:n.get("endDate"),patientDays:d},!1,s),e+=d}.bind(this),0);a?this._addReportRow({patientDays:"Total: "+this._numberFormat(o)},!0,s):this._addReportRow({total:o},!1,s),this._finishReport(s)},_generateProcedureReport:function(e){this._findProceduresByDate().then(function(n){var a=void 0;if(n=n.filter(function(e){var n=e.get("visit");return!t.default.isEmpty(n)&&!t.default.isEmpty(n.get("patient.id"))&&n.get("patient.archived")!==!0}),0===e.indexOf("detailed")){a=this.get("procedureDetailReportColumns"),n.forEach(function(e){e.set("patient",e.get("visit.patient"))});var l=this._totalByType(n,"description","all procedures");this._addPatientProcedureRows(l,a),this._finishReport(a)}else a=this.get("diagnosticReportColumns"),this._addRowsByType(n,"description","Total procedures: ",a),this._finishReport(a)}.bind(this),function(e){this._notifyReportError("Error in _generateProcedureReport: "+e)}.bind(this))},_generateStatusReport:function(){this._findPatientsByStatus().then(function(e){var t=this.get("statusReportColumns"),n=e.sortBy("lastName","firstName");this._getPatientVisits(n).then(function(e){e.forEach(function(e){this._addReportRow({patient:e},!1,t)}.bind(this)),this._finishReport(t)}.bind(this)).catch(function(e){this._notifyReportError("Error in _generateStatusReport: "+e)}.bind(this))}.bind(this)).catch(function(e){this._notifyReportError("Error in _generateStatusReport: "+e)}.bind(this))},_generateVisitReport:function(e){var n=this,a=this.get("reportColumns"),l=this.getProperties("examiner","visitDate","visitType","location","clinic","primaryDiagnosis","secondaryDiagnosis");for(var s in l)if(!t.default.isEmpty(l[s]))switch(s){case"diagnosis":e=this._filterByLike(e,"diagnosisList",l[s]);break;default:e=e.filterBy(s,l[s])}a.procedures.include?!function(){var a={};e.forEach(function(e){a[e.get("id")]=e.get("procedures")}),t.default.RSVP.hash(a).then(function(t){e.forEach(function(e){e.set("resolvedProcedures",t[e.get("id")])}),this._finishVisitReport(e)}.bind(n))}():this._finishVisitReport(e)},_getPatientVisits:function(e){return new t.default.RSVP.Promise(function(n,a){var l={};e.forEach(function(e){l[e.get("id")]=this.getPatientVisits(e)}.bind(this)),t.default.RSVP.hash(l).then(function(t){e.forEach(function(e){e.set("visits",t[e.get("id")])}),n(e)},a)}.bind(this))},_haveLikeValue:function(e,t){return e.toLowerCase().indexOf(t.toLowerCase())>-1},_listToString:function(e,n,a){var l=[];return t.default.isEmpty(e)||(l=e.map(function(e){return t.default.get(e,n)+" ( "+this._dateFormat(t.default.get(e,a))+")"}.bind(this))),l.join(",\n")},_totalByType:function(e,n,a){var l=0,s=[];return e.forEach(function(e){var a=e.get(n),i=void 0;t.default.isEmpty(a)||(i=s.find(function(e){var t=e.type;return t.trim().toLowerCase()===a.toLowerCase()}),t.default.isEmpty(i)&&(i={type:a.trim(),total:0,records:[]},s.push(i)),i.total++,i.records.push(e),l++)}),s=s.sortBy("type"),s.push({type:a,total:l}),s},_procedureListToString:function(e){return this._listToString(e,"description","procedureDate")},_validateDates:function(){var e=void 0,n=this.get("endDate"),a=!0,l=this.get("reportType"),s=this.get("startDate");return"status"===l||(t.default.isEmpty(s)?(e="Please enter a start date.",a=!1):!t.default.isEmpty(n)&&n.getTime()0&&this.set("firstKey",this._getStartKeyFromItem(e.get("firstObject"))),e.get("length")>i){var n=e.popObject();this.set("nextStartKey",this._getStartKeyFromItem(n))}else this.set("nextStartKey");t(e)}.bind(this),a)}.bind(this))},queryParams:{sortDesc:{refreshModel:!0},sortKey:{refreshModel:!0},startKey:{refreshModel:!0}},setupController:function(e,t){var a=this.getProperties("firstKey","nextStartKey");e.setProperties(a);var l={currentScreenTitle:this.get("pageTitle")};this.get("hideNewButton")?l.newButtonAction=null:n.default.isEmpty(this.get("newButtonAction"))||(l.newButtonAction=this.get("newButtonAction")),n.default.isEmpty(this.get("newButtonText"))||(l.newButtonText=this.get("newButtonText")),this.send("setSectionHeader",l),this.closeProgressModal(),this._super(e,t)}})}),define("hospitalrun/routes/abstract-module-route",["exports","ember-simple-auth/mixins/authenticated-route-mixin","ember","hospitalrun/mixins/user-session"],function(e,t,n,a){function l(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0),e.set("searchText",this.get("searchText")),this.controllerFor("navigation").closeProgressModal();var n=this.controllerFor(this.get("moduleName")),l="Search Results for "+a.default.Handlebars.Utils.escapeExpression(this.get("searchText"))+"";n.set("currentScreenTitle",l.htmlSafe())}})}),define("hospitalrun/routes/application",["exports","ember-simple-auth/mixins/application-route-mixin","ember","hospitalrun/mixins/setup-user-role"],function(e,t,n,a){var l=n.default.inject,s=n.default.Route,i=s.extend(t.default,a.default,{database:l.service(),config:l.service(),session:l.service(),shouldSetupUserRole:!0,actions:{closeModal:function(){this.disconnectOutlet({parentView:"application",outlet:"modal"})},openModal:function(e,t){t&&this.controllerFor(e).set("model",t),this.renderModal(e)},updateModal:function(e,t){this.controllerFor(e).set("model",t)}},model:function(e,t){var n=this.get("session"),a=n&&n.get("isAuthenticated");return this.get("config").setup().then(function(e){if("finishgauth"!==t.targetName&&"login"!==t.targetName){if(this.set("shouldSetupUserRole",!0),a)return this.get("database").setup(e).catch(function(){n.invalidate()})}else"finishgauth"===t.targetName&&this.set("shouldSetupUserRole",!1)}.bind(this))},afterModel:function(){this.controllerFor("navigation").set("allowSearch",!1),$("#apploading").remove()},renderModal:function(e){this.render(e,{into:"application",outlet:"modal"})},sessionAuthenticated:function(){this.get("shouldSetupUserRole")===!0&&this.setupUserRole(),this._super()}});e.default=i}),define("hospitalrun/routes/index",["exports","ember-simple-auth/mixins/authenticated-route-mixin","ember"],function(e,t,n){e.default=n.default.Route.extend(t.default,{afterModel:function(){this.controllerFor("navigation").set("allowSearch",!1)}})}),define("hospitalrun/routes/login",["exports","ember","ember-simple-auth/mixins/unauthenticated-route-mixin"],function(e,t,n){e.default=t.default.Route.extend(n.default,{config:t.default.inject.service(),beforeModel:function(e){return this.get("session").get("isAuthenticated")?void this._super(e):this.get("config").useGoogleAuth().then(function(e){e&&window.location.replace("/auth/google")})}})}),define("hospitalrun/serializers/application",["exports","ember-pouch"],function(e,t){e.default=t.Serializer.extend()}),define("hospitalrun/serializers/user",["exports","ember-data"],function(e,t){var n=t.default.JSONSerializer.extend({attrs:{rev:"_rev"},primaryKey:"_id",isNewSerializerAPI:!0,normalizeArrayResponse:function(e,t,n,a,l){var s=n.rows.map(function(e){return e.doc}.bind(this));return this._super(e,t,s,a,l)},normalizeSaveResponse:function(e,t,n){return{data:{id:n.id,type:"user",attrs:{rev:n.rev}}}}});e.default=n}),define("hospitalrun/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/services/config",["exports","ember"],function(e,t){var n=t.default.inject,a=t.default.run;e.default=t.default.Service.extend({configDB:null,database:n.service(),session:n.service(),sessionData:t.default.computed.alias("session.data"),setup:function(){var e=this.replicateConfigDB.bind(this),t=this.loadConfig.bind(this),n=this.createDB();return this.set("configDB",n),this.setCurrentUser(),e(n).then(t)},createDB:function(){return new PouchDB("config")},replicateConfigDB:function(e){var n=new t.default.RSVP.Promise(function(t){var n=document.location.protocol+"//"+document.location.host+"/db/config";e.replicate.from(n).then(t).catch(t)});return n},loadConfig:function(){var e=this.get("configDB"),n={include_docs:!0,keys:["config_consumer_key","config_consumer_secret","config_disable_offline_sync","config_oauth_token","config_token_secret","config_use_google_auth"]};return new t.default.RSVP.Promise(function(t,a){e.allDocs(n,function(e,n){e&&(console.log("Could not get configDB configs:",e),a(e));for(var l={},s=0;s-1){d=n;var u=n.split("/");r=u.pop(),n=u.join("/"),n+="/"}if(d.indexOf(".")===-1)if(e.type){var p=e.type.split("/");d+="."+p.pop()}else d+=".png";this.fileExists(d).then(function(u){if(u&&(d=n+i.getTime()+r),t.default.isEmpty(o)&&s("Local filesystem unavailable, please use Google Chrome browser"),t.default.isEmpty(r)&&!t.default.isEmpty(e.type)){var p=e.type.split("/");p.length>1&&(d+="."+p[1])}o.mkdir(n,!1,function(){o.write(d,{data:e,type:e.type},function(e){c.saveFileLink(d,a),l(e)},function(e){s(e)})},function(e){s(e)})}.bind(this))}.bind(this))},deleteFile:function(e,n){return new t.default.RSVP.Promise(function(t,a){var l=this.get("filer"),s=this.get("config");try{l.rm(e,function(){s.removeFileLink(n),t()},a)}catch(e){a(e)}}.bind(this))},downloadIfNeeded:function(e){var n=t.default.get(e,"fileName");this.fileExists(n).then(function(t){t||this._downloadFileFromServer(e)}.bind(this))},fileExists:function(e){return new t.default.RSVP.Promise(function(t){var n=this.get("filer");n.fs.root.getFile(e,{},function(){t(!0)},function(){t(!1)})}.bind(this))},fileToDataURL:function(e){return new t.default.RSVP.Promise(function(t){var n=new FileReader;n.onloadend=function(e){t(e.target.result)},n.readAsDataURL(e)})},fileToString:function(e){return new t.default.RSVP.Promise(function(t){var n=new FileReader;n.onloadend=function(e){t(e.target.result)},n.readAsText(e)})},isFileSystemEnabled:function(){var e=this.get("filer");return!t.default.isEmpty(e)}.property("filer"),pathToFileSystemURL:function(e){return new t.default.RSVP.Promise(function(t){var n=this.get("filer");n.fs.root.getFile(e,{},function(e){t(e.toURL())},function(){t()})}.bind(this))}})}),define("hospitalrun/services/i18n",["exports","ember-i18n/services/i18n"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/services/keyboard",["exports","ember-keyboard/services/keyboard"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/services/session",["exports","ember-simple-auth/services/session"],function(e,t){e.default=t.default}),define("hospitalrun/services/validations",["exports","ember"],function(e,t){var n=t.default.set;e.default=t.default.Service.extend({init:function(){n(this,"cache",{})}})}),define("hospitalrun/serviceworkers/pouchdb-sync",["exports"],function(e){function t(){if(!d&&r.config_disable_offline_sync!==!0){var e={ajax:{headers:{},timeout:3e4}};r.config_consumer_secret&&r.config_token_secret&&r.config_consumer_key&&r.config_oauth_token&&(e.ajax.headers["x-oauth-consumer-secret"]=r.config_consumer_secret,e.ajax.headers["x-oauth-consumer-key"]=r.config_consumer_key,e.ajax.headers["x-oauth-token-secret"]=r.config_token_secret,e.ajax.headers["x-oauth-token"]=r.config_oauth_token);var t=self.location.protocol+"//"+self.location.host+"/db/main",n=new PouchDB(t,e);d=u.sync(n,{live:!0,retry:!0}).on("change",function(e){logDebug("local sync change",e)}).on("paused",function(){logDebug("local sync paused")}).on("active",function(){logDebug("local sync active")}).on("denied",function(e){logDebug("local sync denied:",e)}).on("complete",function(e){logDebug("local sync complete:",e)}).on("error",function(e){logDebug("local sync error:",e)})}}function n(){return new Promise(function(e,t){r?e():c.allDocs({include_docs:!0}).then(function(t){r={},t.rows.forEach(function(e){r[e.id]=e.doc.value}),e()},t)})}function a(e,a,l,s){return n().then(t).catch(function(e){logDebug("Error setting up remote sync",JSON.stringify(e,null,2))}),logDebug("Looking for couchdb response for:",e.url),new Promise(function(t,n){var r=performance.now();toolbox.networkOnly(e,a,l).then(function(a){if(a){var l=performance.now()-r;t(a),i(l,e.url)}else logDebug("Network first returned no response, get data from local pouch db."),o(s,e,t,n)}).catch(function(a){logDebug("Network first returned err, get data from local pouch db:",a),o(s,e,t,n)})})}function l(e){return new Response(JSON.stringify(e),{status:200,statusText:"OK"})}function s(e){var t={};if(e.indexOf("?")>0)for(var n=e.split("?"),a=decodeURIComponent(n[1]).split("&"),l=0;l()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}}),define("hospitalrun/utils/get-cmd-key",["exports","ember-keyboard/utils/get-cmd-key"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/utils/i18n/compile-template",["exports","ember-i18n/utils/i18n/compile-template"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/utils/i18n/missing-message",["exports","ember-i18n/utils/i18n/missing-message"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/utils/item-condition",["exports","ember"],function(e,t){function n(){var e=arguments.length<=0||void 0===arguments[0]?"B":arguments[0],n=t.default.A(l).findBy("rank",e);return n.value}function a(e){var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1];return e*=t,e>=14?"good":e<7?"bad":"average"}e.rankToMultiplier=n,e.getCondition=a;var l=[{rank:"A",value:.5},{rank:"B",value:1},{rank:"C",value:2}]}),define("hospitalrun/utils/listener-name",["exports","ember-keyboard/utils/listener-name"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/utils/patient-validation",["exports","ember"],function(e,t){e.default={patientTypeAhead:{acceptance:{accept:!0,if:function(e){if(!e.get("selectPatient"))return!1;if(!e.get("hasDirtyAttributes"))return!1;var n=e.get("patient.displayName"),a=e.get("patientTypeAhead");if(t.default.isEmpty(n)||t.default.isEmpty(a))return!0;var l=a.substr(0,n.length).toLowerCase();return 0!==n.toLowerCase().indexOf(l)},message:"Please select a patient"}}}}),define("hospitalrun/utils/pouch-views",["exports","ember"],function(e,t){function n(e,t){return t.query(e,{limit:0}).catch(function(e){console.log("index error: "+JSON.stringify(e,null,2))})}function a(e,t){var n={_id:"_design/"+e.name,version:e.version,views:{}};return t&&(n._rev=t),n.views[e.name]={map:e.function.toString()},e.sort&&(n.lists={sort:e.sort}),n}function l(e,a,l,s){return a.get("_design/"+e.name).then(function(i){return i.version!==e.version?o(e,a,i._rev,l,s):l?n(e.name,a):t.default.RSVP.resolve()},function(){return o(e,a,null,l,s)})}function s(e,t,n){var a="function(head, req) {function keysEqual(keyA, keyB) {for (var i= 0; i < keyA.length; i++) {if (keyA[i] !== keyB[i]) {return false;}}return true;}";return t&&(a+='function getCompareDate(dateString) {if (!dateString || dateString === "") {return 0;}return new Date(dateString).getTime();}'),a+='function compareStrings(aString, bString) {if (!aString) {aString = "";}if (!bString) {bString = "";}if (aString < bString) {return -1;} else if (aString > bString) {return 1;} else {return 0;}}var row,rows=[],startingPosition = 0;while(row = getRow()) {rows.push(row);}',n&&(a+="rows = rows.filter("+n+");"),a+="rows.sort("+e+');if (req.query.sortDesc) {rows = rows.reverse();}if (req.query.sortStartKey) {var startKey = JSON.parse(req.query.sortStartKey);for (var i=0; i 0) {rows = rows.slice(startingPosition);}send(JSON.stringify({"rows" : rows}));}'}function i(e,t){return"function(doc) {\n var doctype, uidx;\n if (doc._id && (uidx = doc._id.indexOf('_')) > 0 && !doc.data.archived) {\n doctype = doc._id.substring(0, uidx);\n if (doctype === '"+e+"') {\n "+t+"\n }\n }\n }"}function o(e,t,l,s,i){var o=a(e,l);return s&&console.log("WARNING: The view "+e.name+" is out of date. Please update the pouch dump "+i+" to the latest version of "+e.name),t.put(o).then(function(){return n(e.name,t)},function(e){console.log("ERR updating design doc:",JSON.stringify(e,null,2))})}function r(e){return"var "+e+" = doc.data."+e+";\n if ("+e+" && "+e+' !== "") {\n '+e+" = new Date("+e+");\n if ("+e+".getTime) {\n "+e+" = "+e+".getTime();\n }\n }"}var d="if (doc.data.friendlyId) {\n emit([doc.data.friendlyId, doc._id]);\n } else if (doc.data.externalPatientId) {\n emit([doc.data.externalPatientId, doc._id]);\n } else {\n emit([doc._id, doc._id]);\n }",c=s(function(e,t){var n="";switch(req.query&&req.query.sortKey&&(n=req.query.sortKey),n){case"firstName":case"sex":case"lastName":case"status":return compareStrings(e.doc.data[n],t.doc.data[n]);case"dateOfBirth":return getCompareDate(e.doc.data.dateOfBirth)-getCompareDate(t.doc.data.dateOfBirth);default:return 0}}.toString(),!0),u=[{name:"appointments_by_date",function:i("appointment",r("endDate")+"\n "+r("startDate")+"\n emit([startDate, endDate, doc._id]);"),sort:s(function(e,t){function n(e){return e&&""!==e?e:"Scheduled"}var a="";switch(req.query&&req.query.sortKey&&(a=req.query.sortKey),a){case"appointmentType":case"location":case"provider":return compareStrings(e.doc.data[a],t.doc.data[a]);case"date":var l=getCompareDate(e.doc.data.startDate)-getCompareDate(t.doc.data.startDate);return 0===l?getCompareDate(e.doc.data.endDate)-getCompareDate(t.doc.data.endDate):l;case"status":var s=n(e.doc.data[a]),i=n(t.doc.data[a]);return compareStrings(s,i);default:return 0}}.toString(),!0,function(e){var t=null,n=!0;if(req.query&&req.query.filterBy&&(t=JSON.parse(req.query.filterBy)),!t)return!0;for(var a=0;a0)!function(){var o=e.rows.map(function(e){return s.getEmberId(e.id)});l.findRecord(n,a,o).then(function(e){var n=a.modelName.camelize().pluralize(),l=[];o.forEach(function(t){var a=e[n].findBy("id",t);l.push(a)}),e[n]=l,t(e)},i)}();else{var o={};o[a.modelName]=[],t(o)}})},_doesStartKeyContainSpecialCharacters:function(e){var n=!1,a=this.get("maxValue");return!t.default.isEmpty(e)&&t.default.isArray(e)&&e.forEach(function(e){null!==e&&e!==a||(n=!0)}),n},_startChangesToStoreListener:function(){var e=this.get("db");e&&(this.changes=e.changes({since:"now",live:!0,returnDocs:!1}).on("change",i(this,"onChange")).on("error",t.default.K),e.changesListener=this.changes)},generateIdForRecord:function(){return s.default.v4()},query:function(e,n,a,l){for(var s=this,i=!1,o=0;o0}),_canModifyValue:function(e,t){switch(t){case"inventory_types":if("Medication"===e)return!1;break;case"lab_pricing_types":if("Lab Procedure"===e)return!1;break;case"imaging_pricing_types":if("Imaging Procedure"===e)return!1;break;case"visit_types":if("Admission"===e)return!1;if("Imaging"===e)return!1;if("Lab"===e)return!1;if("Pharmacy"===e)return!1}return!0},_sortValues:function(e,n){return t.default.compare(e.toLowerCase(),n.toLowerCase())},activateKeyboard:t.default.on("init",function(){this.set("keyboardActivated",!0)}),updateListKeyboard:t.default.on((0,o.keyDown)("ctrl+KeyS"),(0,o.keyDown)("cmd+KeyS"),function(e){this.send("updateList"),e.preventDefault()}),actions:{addValue:function(){this.send("openModal","admin.lookup.edit",t.default.Object.create({isNew:!0}))},confirmDeleteValue:function(e){var n=this.get("i18n"),a=n.t("admin.lookup.titles.deleteLookupValue"),l=n.t("admin.lookup.messages.deleteLookupValue",{value:e});this.displayConfirm(a,l,"deleteValue",t.default.Object.create({valueToDelete:e}))},deleteValue:function(e){var t=this.get("lookupTypeList"),n=t.get("value"),a=e.get("valueToDelete");n.removeObject(a.toString()),t.save()},editValue:function(e){t.default.isEmpty(e)||this.send("openModal","admin.lookup.edit",t.default.Object.create({isNew:!1,originalValue:e.toString(),value:e.toString()}))},importList:function(){var e=this.get("fileSystem"),t=this.get("importFile"),n=this.get("lookupTypeList");t&&t.type?e.fileToDataURL(t).then(function(e){var a=e.split(",");n.setProperties({_attachments:{file:{content_type:t.type,data:a[1]}},importFile:!0}),n.save().then(function(){this.displayAlert(this.get("i18n").t("admin.lookup.alertImportListSaveTitle"),this.get("i18n").t("admin.lookup.alertImportListSaveMessage"),"refreshLookupLists"),this.set("importFile"),this.set("model.importFileName")}.bind(this))}.bind(this)):this.displayAlert(this.get("i18n").t("admin.lookup.alertImportListTitle"),this.get("i18n").t("admin.lookup.alertImportListMessage"))},updateList:function(){var e=this.get("lookupTypeList");e.save().then(function(){this.displayAlert(this.get("i18n").t("admin.lookup.alertImportListUpdateTitle"),this.get("i18n").t("admin.lookup.alertImportListUpdateMessage"))}.bind(this))},updateValue:function(e){var t=!1,n=this.get("lookupTypeList"),a=n.get("value"),l=e.get("value");if(e.get("isNew"))t=!0;else{var s=e.get("originalValue");l!==s&&(a.removeObject(s),t=!0)}t&&(a.addObject(l),a=a.sort(this._sortValues),n.set("value",a),n.save())}}})}),define("hospitalrun/admin/lookup/edit/controller",["exports","ember","hospitalrun/mixins/is-update-disabled"],function(e,t,n){e.default=t.default.Controller.extend(n.default,{editController:t.default.inject.controller("admin/lookup"),showUpdateButton:!0,updateButtonAction:"update",updateButtonText:function(){var e=this.get("i18n");return this.get("model.isNew")?e.t("buttons.add"):e.t("buttons.update")}.property("model.isNew"),actions:{cancel:function(){this.send("closeModal")},update:function(){t.default.isEmpty(this.get("model.value"))||(this.get("editController").send("updateValue",this.get("model")),this.send("closeModal"))}}})}),define("hospitalrun/admin/lookup/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"2fhdRW7b",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["helper",["t"],[["helper",["if"],[["get",["model","isNew"]],"admin.lookup.edit.template.addTitle","admin.lookup.edit.template.editTitle"],null]],null],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["em-input"],null,[["label","property","class"],[["helper",["t"],["admin.lookup.edit.template.labelTitle"],null],"value","lookup-type-value"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton","action"],[["get",["model"]],false,"update"]],0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/admin/lookup/edit/template.hbs"}})}),define("hospitalrun/admin/lookup/route",["exports","hospitalrun/routes/abstract-index-route","ember-i18n"],function(e,t,n){e.default=t.default.extend({hideNewButton:!0,pageTitle:(0,n.translationMacro)("admin.lookup.pageTitle"),model:function(){return this.store.findAll("lookup")},afterModel:function(e){e.set("lookupType","anesthesia_types")},actions:{deleteValue:function(e){this.controller.send("deleteValue",e)},refreshLookupLists:function(){this.refresh()}}})}),define("hospitalrun/admin/lookup/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"Kwt+t5YD",block:'{"statements":[["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],6],["text"," "],["close-element"],["text","\\n"],["close-element"],["text","\\n"],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["append",["unknown",["lookupTitle"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["canEditValues"]]],null,5],["text"," "],["open-element","div",[]],["static-attr","class","panel-footer"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canEditValues"]]],null,2],["block",["em-form"],null,[["model","submitButton"],[["get",["lookupTypeList"]],false]],1],["text"," "],["close-element"],["text","\\n"],["close-element"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],["Organize Pricing By Type","organizeByType","col-sm-4"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","col-sm-4"],["flush-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["labels.userCanAddNewValue"],null],"userCanAdd"]]],false],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"updateList"]],["flush-element"],["append",["helper",["t"],["buttons.update"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["showOrganizeByType"]]],null,0],["text"," "],["open-element","div",[]],["static-attr","class","col-sm-4"],["flush-element"],["text","\\n "],["append",["helper",["file-upload"],null,[["label","property","selectedFile"],[["helper",["t"],["labels.importFile"],null],"importFileName",["get",["importFile"]]]]],false],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"importList"]],["flush-element"],["append",["helper",["t"],["buttons.import"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"addValue"]],["flush-element"],["append",["helper",["t"],["buttons.addValue"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editValue",["get",["lookupTypeValue","value"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["append",["helper",["t"],["labels.edit"],null],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"confirmDeleteValue",["get",["lookupTypeValue","value"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["labels.delete"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","lookup-type-value"],["flush-element"],["append",["unknown",["lookupTypeValue","value"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["lookupTypeValue","canModify"]]],null,3],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["lookupTypeValue"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.value"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["lookupTypeValues"]]],null,4],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content","optionValuePath","optionLabelPath","selected"],["col-xs-3 lookup-type form-input-group",["helper",["t"],["labels.lookupType"],null],"lookupType",["get",["lookupTypes"]],"value","name",["get",["model","lookupType"]]]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/admin/lookup/template.hbs"}})}),define("hospitalrun/admin/query/controller",["exports","ember","hospitalrun/mixins/edit-panel-props","hospitalrun/utils/select-values"],function(e,t,n,a){e.default=t.default.Controller.extend(n.default,{hideCancelButton:!0,showUpdateButton:!0,updateButtonAction:"query",updateButtonText:"Query",objectTypeList:["appointment","imaging","inv-location","inv-purchase","inv-request","inventory","invoice","lab","medication","patient","photo","procedure","visit","vital"],objectTypes:t.default.computed.map("objectTypeList",a.default.selectValuesMap),actions:{query:function e(){var n=this.get("fieldName"),a=this.get("objectType"),l=this.get("queryValue"),e={containsValue:{value:l,keys:[n]}};this.store.query(a,e).then(function(e){var n=this;t.default.isEmpty(e)?(this.set("errorMessage","Query returned no results."),this.set("haveError",!0),this.set("showQueryResults",!1)):!function(){var a=void 0,l=["id"],s=[];e.get("firstObject").eachAttribute(function(e){l.push(e)}),e.forEach(function(e){var n=[];l.forEach(function(l){a=e.get(l),t.default.isEmpty(a)||n.push({name:l,value:a})}),s.push(n)}),n.set("resultRows",s),n.set("haveError",!1),n.set("showQueryResults",!0)}()}.bind(this),function(e){this.set("errorMessage",e),this.set("haveError",!0),this.set("showQueryResults",!1)}.bind(this))}}})}),define("hospitalrun/admin/query/route",["exports","ember-simple-auth/mixins/authenticated-route-mixin","ember","hospitalrun/mixins/user-session"],function(e,t,n,a){e.default=n.default.Route.extend(a.default,t.default,{beforeModel:function(){this.currentUserCan("query_db")||this.transitionTo("application")}})}),define("hospitalrun/admin/query/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"jNp4d1tp",block:'{"statements":[["text","\\n"],["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],5]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["unknown",["name"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["value"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["result"]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["text","Field"],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["text","Value"],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["resultRow"]]],null,0],["text"," "],["close-element"],["text","\\n"]],"locals":["resultRow"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["text","Query Results"],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["each"],[["get",["resultRows"]]],null,1],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-danger"],["static-attr","role","alert"],["flush-element"],["append",["unknown",["errorMessage"]],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content","selected"],["col-xs-3","Object Type","objectType",["get",["objectTypes"]],["get",["objectType"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-input"],null,[["label","property"],["Field Name","fieldName"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["label","property"],["Query Value","queryValue"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",[null]],false]],4],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["haveError"]]],null,3],["block",["if"],[["get",["showQueryResults"]]],null,2]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/admin/query/template.hbs"}})}),define("hospitalrun/admin/roles/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/mixins/user-roles","hospitalrun/mixins/user-session"],function(e,t,n,a,l){e.default=t.default.extend(a.default,l.default,{currentRole:"",disabledAction:!1,hideCancelButton:!0,updateCapability:"define_user_roles",filteredRoles:n.default.computed.filter("userRoles",function(e){return"System Administrator"!==e.name}),availableCapabilities:[{name:"admin",capabilities:["admin","loadDb","updateConfig","defineUserRoles"]},{name:"appointments",capabilities:["appointments","addAppointment"]},{name:"billing",capabilities:["billing","addBillingDiagnosis","addCharge","addPricing","addPricingProfile","addInvoice","addPayment","deleteInvoice","deletePricing","deletePricingProfile","editInvoice","invoices","overrideInvoice","pricing"]},{name:"patients",capabilities:["patients","addAllergy","addDiagnosis","addNote","addOperativePlan","addOperationReport","addPhoto","addPatient","addProcedure","addSocialwork","addVisit","addVitals","admitPatient","deleteNote","deletePhoto","deletePatient","deleteAppointment","deleteDiagnosis","deleteProcedure","deleteSocialwork","deleteVitals","deleteVisit","dischargePatient","patientReports","visits"]},{name:"medication",capabilities:["medication","addMedication","deleteMedication","fulfillMedication"]},{name:"labs",capabilities:["labs","addLab","completeLab","deleteLab"]},{name:"imaging",capabilities:["imaging","addImaging","completeImaging","deleteImaging"]},{name:"inventory",capabilities:["inventory","addInventoryRequest","addInventoryItem","addInventoryPurchase","adjustInventoryLocation","deleteInventoryItem","fulfillInventory"]}],missingCapablities:n.default.computed("availableCapabilities","defaultCapabilities",function(){var e=this.get("availableCapabilities"),t=Object.keys(e),n=Object.keys(this.get("defaultCapabilities")),a=[];return n.forEach(function(n){var l=!1;t.forEach(function(t){var a=e[t];a.capabilities.includes(n.camelize())&&(l=!0)}),l||a.push(n+" - "+n.camelize())}),a}),capabilitySections:n.default.computed.map("availableCapabilities",function(e){var t=this,n=[];return e.capabilities.forEach(function(e){n.push({key:e,name:t.get("i18n").t("admin.roles.capability."+e)})}),{name:this.get("i18n").t("admin.roles.capability."+e.name),capabilities:n}}),actions:{selectRole:function(e){var t=this,n=this.get("model").findBy("id",e.dasherize());this.set("currentRole",e),this.set("roleToUpdate",n);try{n?!function(){var e=n.get("capabilities");t.get("availableCapabilities").forEach(function(n){n.capabilities.forEach(function(n){e.includes(n)?t.set(n,!0):t.set(n,!1)})})}():!function(){var n=t.get("defaultCapabilities");Object.keys(n).forEach(function(a){var l=n[a];l.includes(e)?t.set(a.camelize(),!0):t.set(a.camelize(),!1)})}()}catch(e){console.log("ex setting role:",e)}},update:function(){var e=this,t=this.get("currentRole"),a=this.get("roleToUpdate");n.default.isEmpty(a)&&(a=this.get("store").createRecord("user-role",{id:t.dasherize(),name:t}));var l=[];this.get("availableCapabilities").forEach(function(t){t.capabilities.forEach(function(t){e.get(t)===!0&&l.push(t)})}),a.set("capabilities",l),a.save().then(function(){e.displayAlert(e.get("i18n").t("admin.roles.titles.roleSaved"),e.get("i18n").t("admin.roles.messages.roleSaved",{roleName:t}))})}}})}),define("hospitalrun/admin/roles/route",["exports","hospitalrun/routes/abstract-edit-route","ember-i18n"],function(e,t,n){e.default=t.default.extend({hideNewButton:!0,newTitle:(0,n.translationMacro)("admin.userRoles"),editTitle:(0,n.translationMacro)("admin.userRoles"),model:function(){return this.get("store").findAll("user-role")}})}),define("hospitalrun/admin/roles/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"2aNV3BOq",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],4]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["capability","name"]],["get",["capability","key"]],["helper",["concat"],["checkbox"," checkbox-",["get",["capability","key"]]],null]]]],false],["text","\\n"]],"locals":["capability"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","detail-section"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["text","\\n "],["append",["unknown",["capabilitySection","name"]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","detail-section-content"],["flush-element"],["text","\\n"],["block",["each"],[["get",["capabilitySection","capabilities"]]],null,0],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["capabilitySection"]},{"statements":[["text"," "],["open-element","option",[]],["dynamic-attr","value",["concat",[["unknown",["userRole","name"]]]]],["dynamic-attr","selected",["helper",["eq"],[["get",["selectedRole"]],["get",["userRole","name"]]],null],null],["flush-element"],["text","\\n "],["append",["unknown",["userRole","name"]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":["userRole"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group has-success"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["labels.role"],null],false],["close-element"],["text","\\n "],["open-element","select",[]],["dynamic-attr","onchange",["helper",["action"],[["get",[null]],"selectRole"],[["value"],["target.value"]]],null],["static-attr","class","form-control role-select"],["flush-element"],["text","\\n "],["open-element","option",[]],["static-attr","disabled",""],["dynamic-attr","selected",["helper",["is-not"],[["get",["selectedRole"]]],null],null],["flush-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["filteredRoles"]]],null,2],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["capabilitySections"]]],null,1]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",[null]],false]],3],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}', +meta:{moduleName:"hospitalrun/admin/roles/template.hbs"}})}),define("hospitalrun/admin/route",["exports","hospitalrun/routes/abstract-module-route"],function(e,t){e.default=t.default.extend({addCapability:"add_user",allowSearch:!1,moduleName:"admin",sectionTitle:"Admin",editPath:function(){return"users.edit"}.property(),deletePath:function(){return"users.delete"}.property()})}),define("hospitalrun/admin/visit-forms/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/mixins/visit-types"],function(e,t,n,a){var l=n.default.computed;e.default=t.default.extend(a.default,{hideCancelButton:!0,updateCapability:"update_config",visitTypesList:l.alias("model.visitTypesList"),visitFormsForEditing:l("model.visitForms","visitTypes",function(){var e=this.get("model.visitForms"),t=this.get("visitTypes"),n=t.map(function(t){return e[t.value]||(e[t.value]="initial"),{type:t.value,form:e[t.value]}});return n}),visitTemplateIds:["initial","followup"],visitTemplates:l(function(){var e=this.get("i18n"),t=this.get("visitTemplateIds");return t.map(function(t){return{id:t,value:e.t("admin.visitForms.labels."+t)}})}),afterUpdate:function(){this.displayAlert(this.get("i18n").t("admin.address.titles.optionsSaved"),this.get("i18n").t("admin.address.messages.addressSaved"))},actions:{selectForm:function(e,t){var n=this.get("model.visitForms");n[e]=t.target.value}}})}),define("hospitalrun/admin/visit-forms/route",["exports","hospitalrun/routes/abstract-edit-route","ember","ember-i18n"],function(e,t,n,a){e.default=t.default.extend({hideNewButton:!0,editTitle:(0,a.translationMacro)("admin.visitForms.titles.visitForms"),newTitle:n.default.computed.alias("editTitle"),model:function(){var e=this.get("store"),t={visitFormsOption:e.find("option","visit_forms"),visitTypes:e.find("lookup","visit_types")};return new n.default.RSVP.Promise(function(e,a){n.default.RSVP.hashSettled(t).then(function(t){var a=n.default.Object.create();"fulfilled"===t.visitTypes.state&&a.set("visitTypesList",t.visitTypes.value),"fulfilled"===t.visitFormsOption.state?a.set("visitForms",t.visitFormsOption.value):a.set("visitForms",{}),e(a)},a)})}})}),define("hospitalrun/admin/visit-forms/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"Wi/FzQog",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],3]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","option",[]],["dynamic-attr","value",["concat",[["unknown",["visitTemplate","id"]]]]],["dynamic-attr","selected",["helper",["eq"],[["get",["visitForm","form"]],["get",["visitTemplate","id"]]],null],null],["flush-element"],["text","\\n "],["append",["unknown",["visitTemplate","value"]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":["visitTemplate"]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["visitForm","type"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","select",[]],["dynamic-attr","onchange",["helper",["action"],[["get",[null]],"selectForm",["get",["visitForm","type"]]],null],null],["static-attr","class","form-control role-select"],["flush-element"],["text","\\n"],["block",["each"],[["get",["visitTemplates"]]],null,1],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["visitForm"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["admin.visitForms.labels.visitType"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["admin.visitForms.labels.form"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["visitFormsForEditing"]]],null,2],["text"," "],["close-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",[null]],false]],0],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/admin/visit-forms/template.hbs"}})}),define("hospitalrun/admin/workflow/controller",["exports","hospitalrun/controllers/abstract-edit-controller"],function(e,t){e.default=t.default.extend({hideCancelButton:!0,updateCapability:"update_config",afterUpdate:function(){this.displayAlert(this.get("i18n").t("admin.workflow.titles.optionsSaved"),this.get("i18n").t("admin.workflow.messages.optionsSaved"))}})}),define("hospitalrun/admin/workflow/route",["exports","hospitalrun/routes/abstract-edit-route","ember-i18n"],function(e,t,n){e.default=t.default.extend({hideNewButton:!0,editTitle:(0,n.translationMacro)("admin.workflow.editTitle"),model:function(){var e=this.get("store");return e.find("option","workflow_options").catch(function(){return e.push(e.normalize("option",{id:"workflow_options",value:{admissionDeposit:!1,clinicPrepayment:!1,followupPrepayment:!1,outpatientLabPrepayment:!1,outpatientImagingPrepayment:!1,outpatientMedicationPrepayment:!1}}))})}})}),define("hospitalrun/admin/workflow/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"Mr+Jr99y",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["admin.workflow.admissionDepositLabel"],null],"value.admissionDeposit"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["admin.workflow.clinicPrepaymentLabel"],null],"value.clinicPrepayment"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["admin.workflow.followupPrepaymentLabel"],null],"value.followupPrepayment"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["admin.workflow.outpatientLabLabel"],null],"value.outpatientLabPrepayment"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["admin.workflow.outpatientImagingLabel"],null],"value.outpatientImagingPrepayment"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["admin.workflow.outpatientMedicationLabel"],null],"value.outpatientMedicationPrepayment"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/admin/workflow/template.hbs"}})}),define("hospitalrun/app",["exports","ember","hospitalrun/resolver","ember-load-initializers","hospitalrun/config/environment"],function(e,t,n,a,l){var s=void 0;t.default.MODEL_FACTORY_INJECTIONS=!0,s=t.default.Application.extend({modulePrefix:l.default.modulePrefix,podModulePrefix:l.default.podModulePrefix,Resolver:n.default}),(0,a.default)(s,l.default.modulePrefix),e.default=s}),define("hospitalrun/appointments/calendar/controller",["exports","hospitalrun/appointments/index/controller","hospitalrun/mixins/appointment-statuses","moment","hospitalrun/mixins/visit-types","hospitalrun/utils/select-values","ember"],function(e,t,n,a,l,s,i){var o=i.default.computed,r=i.default.computed.alias,d=i.default.get,c=i.default.inject,u=i.default.isEmpty,p=i.default.set;e.default=t.default.extend(n.default,l.default,{appointmentType:null,endDate:null,location:null,provider:null,queryParams:["appointmentType","endDate","provider","status","startDate","location","viewType"],startDate:null,status:null,viewType:"agendaWeek",appointmentsController:c.controller("appointments"),locations:r("appointmentsController.locationList.value"),physicians:r("appointmentsController.physicianList.value"),calendarDate:o("startDate",function(){var e=d(this,"startDate");if(!u(e))return(0,a.default)(parseInt(e))}),locationList:o("locations",function(){return s.default.selectValues(d(this,"locations"),!0)}),physicianList:o("physicians",function(){return s.default.selectValues(d(this,"physicians"),!0)}),_getSelectedFilteringCriteria:function(){var e={status:d(this,"model.selectedStatus"),type:d(this,"model.selectedAppointmentType"),provider:d(this,"model.selectedProvider"),location:d(this,"model.selectedLocation")};return{status:u(e.status)?null:e.status,type:u(e.type)?null:e.type,provider:u(e.provider)?null:e.provider,location:u(e.location)?null:e.location}},actions:{clearFilteringCriteria:function(){p(this,"model.selectedStatus",null),p(this,"model.selectedAppointmentType",null),p(this,"model.selectedProvider",null),p(this,"model.selectedLocation",null),this.send("filter")},createNewAppointment:function(e){var t=this.store.createRecord("appointment",{appointmentType:"Admission",allDay:!1,selectPatient:!0,startDate:e.local().toDate()});this.send("editAppointment",t)},filter:function(){var e=this._getSelectedFilteringCriteria();this.setProperties({appointmentType:e.type,provider:e.provider,status:e.status,location:e.location})},handleVisualConfigurationChanged:function(e){this.setProperties(e)},navigateToAppointment:function(e){this.send("editAppointment",e.referencedAppointment)},updateAppointment:function(e){var t=this,n=e.referencedAppointment,a=e.end.local().toDate(),l=e.start.local().toDate();p(n,"startDate",l),p(n,"endDate",a),n.save().catch(function(e){t.send("error",e,"appointments.calendar")})}}})}),define("hospitalrun/appointments/calendar/route",["exports","hospitalrun/appointments/index/route","ember","ember-i18n"],function(e,t,n,a){var l=n.default.get,s=n.default.isEmpty;e.default=t.default.extend({dateIntervalEnd:null,dateIntervalStart:null,editReturn:"appointments.calendar",filterParams:["appointmentType","provider","status","location"],modelName:"appointment",pageTitle:(0,a.translationMacro)("appointments.calendarTitle"),queryParams:{appointmentType:{refreshModel:!0},endDate:{refreshModel:!0},provider:{refreshModel:!0},status:{refreshModel:!0},startDate:{refreshModel:!0},location:{refreshModel:!0},viewType:{refreshModel:!1}},model:function(e){function t(e){var t=l(e,"patient.displayName"),n=l(e,"provider");return s(n)||(t=t+"\n"+n),{allDay:l(e,"allDay"),title:t,start:l(e,"startDate"),end:l(e,"endDate"),referencedAppointment:e}}function n(e){return e.map(t)}return this._super(e).then(n).then(function(t){return{events:t,selectedAppointmentType:e.appointmentType,selectedProvider:e.provider,selectedStatus:e.status,selectedLocation:e.location}})},_modelQueryParams:function(e){var t=e.endDate,n=e.startDate;if(null===t||null===n)return this._super(e);var a=l(this,"maxValue"),s={startkey:[parseInt(n),null,this._getMinPouchId()],endkey:[parseInt(t),a,this._getMaxPouchId()]};return{options:s,mapReduce:"appointments_by_date"}}})}),define("hospitalrun/appointments/calendar/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"NXxlOD+r",block:'{"statements":[["open-element","div",[]],["static-attr","class","panel panel-info"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0],["text"," "],["open-element","div",[]],["static-attr","class","panel-footer"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"clearFilteringCriteria"]],["flush-element"],["append",["helper",["t"],["buttons.clear"],null],false],["close-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"filter"]],["flush-element"],["append",["helper",["t"],["buttons.filter"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["calendar-control"],null,[["events","defaultDate","defaultView","onDayClick","onEventClick","onEventDrop","onEventResize","onVisualConfigurationChanged","userCanEdit"],[["get",["model","events"]],["get",["calendarDate"]],["get",["viewType"]],["helper",["action"],[["get",[null]],"createNewAppointment"],null],["helper",["action"],[["get",[null]],"navigateToAppointment"],null],["helper",["action"],[["get",[null]],"updateAppointment"],null],["helper",["action"],[["get",[null]],"updateAppointment"],null],["helper",["action"],[["get",[null]],"handleVisualConfigurationChanged"],null],["get",["canEdit"]]]]],false],["text","\\n "],["close-element"],["text","\\n"],["close-element"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content"],["col-sm-3 form-input-group",["helper",["t"],["labels.status"],null],"selectedStatus",["get",["appointmentStatusesWithEmpty"]]]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content"],["col-sm-3 form-input-group",["helper",["t"],["labels.type"],null],"selectedAppointmentType",["get",["visitTypesWithEmpty"]]]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content"],["col-sm-3 form-input-group",["helper",["t"],["labels.with"],null],"selectedProvider",["get",["physicianList"]]]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content"],["col-sm-3 form-input-group",["helper",["t"],["labels.location"],null],"selectedLocation",["get",["locationList"]]]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/appointments/calendar/template.hbs"}})}),define("hospitalrun/appointments/delete/controller",["exports","hospitalrun/controllers/abstract-delete-controller"],function(e,t){e.default=t.default.extend({title:"Delete Appointment",afterDeleteAction:function(){var e=this.get("model.deleteFromPatient");return e?"appointmentDeleted":"closeModal"}.property("model.deleteFromPatient")})}),define("hospitalrun/appointments/delete/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"k7CkZQLv",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-danger"],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-warning-sign"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["t"],["appointments.messages.deleteAppointmentMessage"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/appointments/delete/template.hbs"}})}),define("hospitalrun/appointments/edit/controller",["exports","hospitalrun/controllers/abstract-edit-controller","hospitalrun/mixins/appointment-statuses","ember","hospitalrun/mixins/patient-submodule","hospitalrun/mixins/visit-types"],function(e,t,n,a,l,s){e.default=t.default.extend(n.default,l.default,s.default,{appointmentsController:a.default.inject.controller("appointments"),findPatientVisits:!1,locationList:a.default.computed.alias("appointmentsController.locationList"),lookupListsToUpdate:[{name:"physicianList",property:"model.provider",id:"physician_list"},{name:"locationList",property:"model.location",id:"visit_location_list"}],physicianList:a.default.computed.alias("appointmentsController.physicianList"),showTime:function(){var e=this.get("model.allDay"),t=this.get("isAdmissionAppointment");return!e&&t}.property("model.allDay","isAdmissionAppointment"),visitTypesList:a.default.computed.alias("appointmentsController.visitTypesList"),cancelAction:function(){var e=this.get("model.returnTo");return a.default.isEmpty(e)?this._super():"returnTo"}.property("model.returnTo"),isAdmissionAppointment:function(){var e=this.get("model"),t=e.get("appointmentType"),n="Admission"===t;return n}.property("model.appointmentType"),updateCapability:"add_appointment",afterUpdate:function(){this.send(this.get("cancelAction"))},actions:{appointmentTypeChanged:function(e){var t=this.get("model");t.set("appointmentType",e);var n=this.get("isAdmissionAppointment");t.set("allDay",n)}}})}),define("hospitalrun/appointments/edit/route",["exports","hospitalrun/routes/abstract-edit-route","ember","hospitalrun/mixins/patient-list-route","ember-i18n"],function(e,t,n,a,l){e.default=t.default.extend(a.default,{editTitle:(0,l.translationMacro)("appointments.editTitle"),modelName:"appointment",newTitle:(0,l.translationMacro)("appointments.newTitle"),getNewData:function(){return n.default.RSVP.resolve({appointmentType:"Admission",allDay:!0,selectPatient:!0,startDate:new Date})}})}),define("hospitalrun/appointments/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"jPnJEYNG",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],5]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["date-time-picker"],null,[["datePickerClass","label","model"],["required test-appointment-date",["helper",["t"],["labels.date"],null],["get",["model"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["date-picker"],null,[["property","label","showTime","class"],["startDate",["helper",["t"],["labels.startDate"],null],["get",["showTime"]],"col-sm-4 required test-appointment-start"]]],false],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","showTime","class"],["endDate",["helper",["t"],["labels.endDate"],null],["get",["showTime"]],"col-sm-4 required test-appointment-end"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-summary"],null,[["patient","returnTo","returnToContext","disablePatientLink"],[["get",["model","patient"]],"appointments.edit",["get",["model","id"]],["get",["model","isNew"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-typeahead"],null,[["property","label","content","selection","class"],["patientTypeAhead",["helper",["t"],["labels.patient"],null],["get",["patientList"]],["get",["selectedPatient"]],"required test-patient-input"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model","selectPatient"]]],null,3,2],["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n"],["block",["if"],[["get",["isAdmissionAppointment"]]],null,1,0],["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["helper",["t"],["labels.allDay"],null],"allDay","col-sm-2 appointment-all-day"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-input-group col-sm-6 required test-appointment-type"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["static-attr","for","startTime"],["flush-element"],["append",["helper",["t"],["labels.type"],null],false],["close-element"],["text","\\n "],["append",["helper",["select-list"],null,[["content","optionLabelPath","optionValuePath","value","class","id","action"],[["get",["visitTypes"]],"value","id",["get",["model","appointmentType"]],"form-control","appointmentType",["helper",["action"],[["get",[null]],"appointmentTypeChanged"],null]]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["className","property","label","list","selection"],["col-sm-6 test-appointment-with","provider",["helper",["t"],["labels.with"],null],["get",["physicianList"]],["get",["model","provider"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["className","property","label","list","selection"],["col-sm-6 required test-appointment-location","location",["helper",["t"],["labels.location"],null],["get",["locationList"]],["get",["model","location"]]]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["class","property","label","content"],["form-input-group col-sm-3 test-appointment-status","status",["helper",["t"],["labels.status"],null],["get",["appointmentStatuses"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-text"],null,[["label","property","rows"],[["helper",["t"],["labels.notes"],null],"notes",3]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],4]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/appointments/edit/template.hbs"}})}),define("hospitalrun/appointments/index/controller",["exports","hospitalrun/controllers/abstract-paged-controller","hospitalrun/mixins/user-session"],function(e,t,n){e.default=t.default.extend(n.default,{startKey:[],canAddVisit:function(){return this.currentUserCan("add_visit")}.property(),canEdit:function(){return this.currentUserCan("add_appointment")}.property(),canDelete:function(){return this.currentUserCan("delete_appointment")}.property(),sortProperties:["startDate","endDate"],sortAscending:!0})}),define("hospitalrun/appointments/index/route",["exports","hospitalrun/routes/abstract-index-route","moment","ember-i18n"],function(e,t,n,a){e.default=t.default.extend({editReturn:"appointments.index",modelName:"appointment",pageTitle:(0,a.translationMacro)("appointments.thisWeek"),_getStartKeyFromItem:function(e){var t=e.get("endDate"),n=this._getPouchIdFromItem(e),a=e.get("startDate");return t&&""!==t&&(t=new Date(t),t.getTime&&(t=t.getTime())),a&&""!==a&&(a=new Date(a),a.getTime&&(a=a.getTime())),[a,t,n]},_modelQueryParams:function(){var e=(0,n.default)().endOf("week").toDate().getTime(),t=(0,n.default)().startOf("week").toDate().getTime(),a=this._getMaxPouchId();return{options:{startkey:[t,null,null],endkey:[e,e,a]},mapReduce:"appointments_by_date"}},actions:{editAppointment:function(e){e.set("returnTo",this.get("editReturn")),this.send("editItem",e)}}})}),define("hospitalrun/appointments/index/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"om9IAHIz",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["partial","appointments/item"],["text","\\n"]],"locals":["appointment"]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.date"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.name"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.type"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.location"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.provider"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.status"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,0],["text"," "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":true}',meta:{moduleName:"hospitalrun/appointments/index/template.hbs"}})}),define("hospitalrun/appointments/item/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"tgFrtDZJ",block:'{"statements":[["open-element","tr",[]],["modifier",["action"],[["get",[null]],"editAppointment",["get",["appointment"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","appointment-date"],["flush-element"],["text","\\n "],["append",["unknown",["appointment","formattedAppointmentDate"]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","patient","displayName"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","appointmentType"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","location"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","provider"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","appointment-status"],["flush-element"],["append",["unknown",["appointment","displayStatus"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["canEdit"]]],null,3],["block",["if"],[["get",["canAddVisit"]]],null,2],["block",["if"],[["get",["canDelete"]]],null,0],["text"," "],["close-element"],["text","\\n"],["close-element"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"deleteItem",["get",["appointment"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["buttons.delete"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"checkIn",["get",["appointment"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-log-in"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["t"],["visits.buttons.checkIn"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["helper",["eq"],[["get",["appointment","displayStatus"]],"Scheduled"],null]],null,1]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editAppointment",["get",["appointment"]]],[["bubbles"],[false]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/appointments/item/template.hbs"}})}),define("hospitalrun/appointments/missed/controller",["exports","hospitalrun/appointments/index/controller"],function(e,t){e.default=t.default.extend({startKey:[]})}),define("hospitalrun/appointments/missed/route",["exports","hospitalrun/appointments/index/route","ember-i18n"],function(e,t,n){e.default=t.default.extend({editReturn:"appointments.missed",modelName:"appointment",pageTitle:(0,n.translationMacro)("appointments.missed"),_modelQueryParams:function(){var e=this._super.apply(this,arguments);return e.filterBy=[{name:"status",value:"Missed"}],e}})}),define("hospitalrun/appointments/missed/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"I2CynOk8",block:'{"statements":[["partial","appointments/index"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[],"hasPartials":true}',meta:{moduleName:"hospitalrun/appointments/missed/template.hbs"}})}),define("hospitalrun/appointments/route",["exports","hospitalrun/routes/abstract-module-route","hospitalrun/mixins/user-session","ember-i18n"],function(e,t,n,a){e.default=t.default.extend(n.default,{addCapability:"add_appointment",allowSearch:!1,currentScreenTitle:(0,a.translationMacro)("appointments.currentScreenTitle"),editTitle:(0,a.translationMacro)("appointments.editTitle"),newTitle:(0,a.translationMacro)("appointments.newTitle"),moduleName:"appointments",newButtonText:(0,a.translationMacro)("appointments.buttons.newButton"),sectionTitle:(0,a.translationMacro)("appointments.sectionTitle"),actions:{checkIn:function(e){var t=e.get("patient"),n=e.getProperties("startDate","endDate","location","patient");n.visitType=e.get("appointmentType"),n.examiner=e.get("provider"),n.appointment=e,n.hidePatientSelection=!0,n.patient=t,n.returnTo="appointments",this.transitionTo("visits.edit","checkin").then(function(e){e.currentModel.setProperties(n),e.controller.getPatientDiagnoses(t,e.currentModel)}.bind(this))}},additionalModels:[{name:"physicianList",findArgs:["lookup","physician_list"]},{name:"locationList",findArgs:["lookup","visit_location_list"]},{name:"visitTypesList",findArgs:["lookup","visit_types"]}]})}),define("hospitalrun/appointments/search/controller",["exports","hospitalrun/appointments/index/controller","hospitalrun/mixins/appointment-statuses","ember","hospitalrun/utils/select-values","hospitalrun/mixins/visit-types"],function(e,t,n,a,l,s){e.default=t.default.extend(n.default,s.default,{appointmentsController:a.default.inject.controller("appointments"),appointmentType:null,physicians:a.default.computed.alias("appointmentsController.physicianList.value"),physicianList:function(){return l.default.selectValues(this.get("physicians"),!0)}.property("physicians"),provider:null,queryParams:["appointmentType","provider","status","startKey","startDate"],selectedProvider:null,selectedStatus:null,sortProperties:null,startDate:null,startKey:[],status:null,visitTypesList:a.default.computed.alias("appointmentsController.visitTypesList"),actions:{search:function(){var e=this.get("model.selectedAppointmentType"),t={startKey:[],previousStartKey:null,previousStartKeys:[]},n=this.get("model.selectedProvider"),l=this.get("model.selectedStatus"),s=this.get("model.selectedStartingDate"); +a.default.isEmpty(e)?t.appointmentType=null:t.appointmentType=e,a.default.isEmpty(n)?t.provider=null:t.provider=n,a.default.isEmpty(l)?t.status=null:t.status=l,a.default.isEmpty(s)||(t.startDate=s.getTime()),a.default.isEmpty(t)||this.setProperties(t)}}})}),define("hospitalrun/appointments/search/route",["exports","hospitalrun/appointments/index/route","hospitalrun/mixins/date-format","ember","moment","ember-i18n"],function(e,t,n,a,l,s){e.default=t.default.extend(n.default,{editReturn:"appointments.search",filterParams:["appointmentType","provider","status"],modelName:"appointment",pageTitle:(0,s.translationMacro)("appointments.searchTitle"),queryParams:{appointmentType:{refreshModel:!0},provider:{refreshModel:!0},status:{refreshModel:!0},startDate:{refreshModel:!0},startKey:{refreshModel:!0}},_modelQueryParams:function(e){var t=e.startDate,n=this.get("maxValue");t=a.default.isEmpty(t)?(0,l.default)():(0,l.default)(parseInt(t));var s=t.startOf("day").toDate().getTime(),i={startkey:[s,null,"appointment_"],endkey:[n,n,"appointment_"+n]};return{options:i,mapReduce:"appointments_by_date"}},model:function(e){return this._super(e).then(function(t){t.setProperties({selectedAppointmentType:e.appointmentType,selectedProvider:e.provider,selectedStatus:e.status});var n=e.startDate;return n=new Date,a.default.isEmpty(e.startDate)||n.setTime(e.startDate),t.set("selectedStartingDate",n),t.set("display_selectedStartingDate",this._dateFormat(n)),t}.bind(this))}})}),define("hospitalrun/appointments/search/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"oWuFA4tI",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],7]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["partial","appointments/item"],["text","\\n"]],"locals":["appointment"]},{"statements":[["append",["helper",["t"],["labels.status"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.with"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.location"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.type"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.date"],null],false]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["selectedStartingDate",["helper",["t"],["appointments.labels.selectedStartingDate"],null],"col-sm-3"]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["class","property","label","content"],["col-sm-3 form-input-group","selectedStatus",["helper",["t"],["labels.status"],null],["get",["appointmentStatusesWithEmpty"]]]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content"],["col-sm-3 form-input-group",["helper",["t"],["labels.type"],null],"selectedAppointmentType",["get",["visitTypesWithEmpty"]]]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["class","property","label","content"],["col-sm-3 form-input-group","selectedProvider",["helper",["t"],["labels.with"],null],["get",["physicianList"]]]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-info"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],6],["text"," "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-footer"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"search"]],["flush-element"],["append",["helper",["t"],["buttons.search"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["date",["get",["sortDesc"]],["get",["sortKey"]]]],5],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.name"],null],false],["close-element"],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["appointmentType",["get",["sortDesc"]],["get",["sortKey"]]]],4],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["location",["get",["sortDesc"]],["get",["sortKey"]]]],3],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["provider",["get",["sortDesc"]],["get",["sortKey"]]]],2],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["status",["get",["sortDesc"]],["get",["sortKey"]]]],1],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,0],["text"," "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":true}',meta:{moduleName:"hospitalrun/appointments/search/template.hbs"}})}),define("hospitalrun/appointments/today/controller",["exports","hospitalrun/appointments/index/controller"],function(e,t){e.default=t.default.extend({startKey:[]})}),define("hospitalrun/appointments/today/route",["exports","hospitalrun/appointments/index/route","moment","ember-i18n"],function(e,t,n,a){e.default=t.default.extend({editReturn:"appointments.today",modelName:"appointment",pageTitle:(0,a.translationMacro)("appointments.todayTitle"),_modelQueryParams:function(){var e=(0,n.default)().endOf("day").toDate().getTime(),t=this.get("maxValue"),a=(0,n.default)().startOf("day").toDate().getTime();return{options:{startkey:[a,null,"appointment_"],endkey:[e,e,"appointment_"+t]},mapReduce:"appointments_by_date"}}})}),define("hospitalrun/appointments/today/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"NpXWri4D",block:'{"statements":[["partial","appointments/index"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[],"hasPartials":true}',meta:{moduleName:"hospitalrun/appointments/today/template.hbs"}})}),define("hospitalrun/authenticators/custom",["exports","ember","ember-simple-auth/authenticators/base"],function(e,t,n){e.default=n.default.extend({config:t.default.inject.service(),database:t.default.inject.service(),serverEndpoint:"/db/_session",useGoogleAuth:!1,_absolutizeExpirationTime:function(e){if(!t.default.isEmpty(e))return new Date((new Date).getTime()+1e3*(e-5)).getTime()},_checkUser:function(e){var n=this;return new t.default.RSVP.Promise(function(t,a){n._makeRequest("POST",{name:e.name},"/chkuser").then(function(n){n.error&&a(n),e.displayName=n.displayName,e.role=n.role,e.prefix=n.prefix,t(e)},function(){t(e)})})},_getPromise:function(e,n){return new t.default.RSVP.Promise(function(a,l){this._makeRequest(e,n).then(function(e){t.default.run(function(){a(e)})},function(e){t.default.run(function(){l(e.responseJSON||e.responseText)})})}.bind(this))},_makeRequest:function(e,n,a){return a||(a=this.serverEndpoint),t.default.$.ajax({url:a,type:e,data:n,dataType:"json",contentType:"application/x-www-form-urlencoded",xhrFields:{withCredentials:!0}})},authenticate:function(e){var n=this;if(e.google_auth){var a=function(){n.useGoogleAuth=!0;var a={google_auth:!0,consumer_key:e.params.k,consumer_secret:e.params.s1,token:e.params.t,token_secret:e.params.s2,name:e.params.i};return{v:new t.default.RSVP.Promise(function(e,t){n._checkUser(a).then(function(t){e(t),n.get("config").setCurrentUser(t.name)},t)})}}();if("object"==typeof a)return a.v}return new t.default.RSVP.Promise(function(t,a){var l={name:e.identification,password:e.password};n._makeRequest("POST",l).then(function(e){e.name=l.name,e.expires_at=n._absolutizeExpirationTime(600),n._checkUser(e).then(function(e){n.get("config").setCurrentUser(e.name);var l=n.get("database");l.setup({}).then(function(){t(e)},a)},a)},function(e){a(e.responseJSON||e.responseText)})})},invalidate:function(){return this.useGoogleAuth?t.default.RSVP.resolve():this._getPromise("DELETE")},restore:function(e){var n=this;return new t.default.RSVP.Promise(function(a,l){var s=(new Date).getTime();!t.default.isEmpty(e.expires_at)&&e.expires_at0;){var l=a.splice(0,t).map(this._mapCheckboxValues.bind(this));e.push(l)}return e}.property("content","checkboxesPerRow"),actions:{checkboxChanged:function(e,n){var a=this.get("property"),l="model."+a,s=this.get(l);t.default.isArray(s)||(s=[]),n&&!s.includes(e)?s.addObject(e):!n&&s.includes(e)&&s.removeObject(e),this.set(l,s),this.set("selection",s),this.get("model").validate().catch(t.default.K)}}})}),define("hospitalrun/components/control-within-label",["exports","ember-rapid-forms/components/control-within-label"],function(e,t){e.default=t.default}),define("hospitalrun/components/custom-form-manager",["exports","ember","hospitalrun/utils/select-values"],function(e,t,n){var a=t.default.computed,l=t.default.isEmpty;e.default=t.default.Component.extend(n.default,{customForms:t.default.inject.service(),formType:null,formsForType:null,model:null,openModalAction:"openModal",didReceiveAttrs:function(){var e=this;this._super.apply(this,arguments);var t=this.get("customForms"),n=this.get("formType");t.getCustomForms([n]).then(function(t){var n=e.get("isDestroyed");n||e.set("formsForType",t)})},formsForSelect:a("formsForType","usedForms",function(){var e=this.get("formsForType"),t=this.get("usedForms");if(!l(e)){var n=e.filter(function(e){return!t.includes(e.get("id"))});return n=n.map(function(e){return{id:e.get("id"),value:e.get("name")}})}}),formsToDisplay:a("formsForType","model.customForms",function(){var e=this.get("formsForType"),t=this.get("model.customForms");if(!l(t)&&!l(e))return Object.keys(t).map(function(t){return{form:e.findBy("id",t),propertyPrefix:"customForms."+t+"."}})}),usedForms:a("model.customForms",function(){var e=this.get("model.customForms");return l(e)?[]:Object.keys(e)}),showAddButton:a("formsForSelect",function(){var e=this.get("formsForSelect");return!l(e)}),actions:{addForm:function(){var e=this.get("model"),n=this.get("formsForSelect");this.sendAction("openModalAction","custom-form-add",t.default.Object.create({modelToAddTo:e,customForms:n}))}}})}),define("hospitalrun/components/custom-form",["exports","ember","hospitalrun/utils/select-values"],function(e,t,n){var a=t.default.computed,l=t.default.isEmpty;e.default=t.default.Component.extend(n.default,{classNames:"detail-section-content",propertyPrefix:"",fieldsByRow:a("form","form.fields.[]","form.columns",function(){var e=this,n=[],a=this.get("form"),s=this.get("form.fields");return l(a)||l(s)||!function(){var a=e.getWithDefault("form.columns",1),l=[],i=0,o=Math.floor(12/a);s.forEach(function(e){var s=e.get("classNames");s||(s="");var r=e.get("colSpan")||1;(i===a||i+r>a)&&(n.push(l.slice()),l=[],i=0),s+=" col-sm-"+o*r,e.set("displayClassNames",s),"radio"===e.get("type")&&e.set("mappedValues",e.get("values").map(function(e){return t.default.get(e,"label")})),l.push(e),i+=r}),i>0&&n.push(l)}(),n})})}),define("hospitalrun/components/date-input",["exports","ember","ember-rapid-forms/components/html-input"],function(e,t,n){e.default=n.default.extend({_picker:null,_shouldSetDate:function(e,n){return n&&(t.default.isEmpty(e)||t.default.isEmpty(n.getDate())||e.getTime&&n.getDate().getTime()!==e.getTime())},currentDateChangedValue:function(){var e=this.get("currentDate"),n=this.get("_picker");!t.default.isEmpty(e)&&this._shouldSetDate(e,n)&&n.setDate(e)},format:function(){var e=this.get("showTime");return e?"l h:mm A":"l"}.property("mainComponent.showTime"),showTimeChanged:function(){var e=this.get("_picker");e&&(e.destroy(),this.didInsertElement())}.observes("mainComponent.showTime"),dateSet:function(){var e=this.get("currentDate"),n=this.get("_picker");if(this._shouldSetDate(e,n)){var a=n.getDate(),l=this.get("mainComponent"),s=l.get("dateSetAction");this.set("currentDate",a),t.default.isEmpty(s)||l.sendAction("dateSetAction",a)}},didInsertElement:function(){var e=this.get("currentDate"),n=this.$("input"),a=null,l=this.getProperties("format","yearRange","showTime");l.onSelect=this.dateSet.bind(this),t.default.isEmpty(this.get("minDate"))||(l.minDate=this.get("minDate"),"now"===l.minDate&&(l.minDate=new Date)),t.default.isEmpty(this.get("maxDate"))||(l.maxDate=this.get("maxDate"),"now"===l.maxDate&&(l.maxDate=new Date)),l.field=n[0],a=new Pikaday(l),t.default.run.next(this,function(){a.setDate(e)}),this.set("_picker",a)},didReceiveAttrs:function(){this._super.apply(this,arguments);var e=this.get("mainComponent.originalPropery"),n="display_"+e;this.currentDate=t.default.computed.alias("mainComponent.model."+e),this.minDate=t.default.computed.alias("mainComponent.minDate"),this.maxDate=t.default.computed.alias("mainComponent.maxDate"),this.showTime=t.default.computed.alias("mainComponent.showTime"),this.yearRange=t.default.computed.alias("mainComponent.yearRange"),this.addObserver("mainComponent.model."+e,this,this.currentDateChangedValue),t.default.Binding.from("mainComponent.model.errors."+e).to("mainComponent.model.errors."+n).connect(this)},willDestroyElement:function(){var e=this.get("_picker");e&&e.destroy(),this.set("_picker",null)}})}),define("hospitalrun/components/date-picker",["exports","ember-rapid-forms/components/em-input"],function(e,t){e.default=t.default.extend({dateSetAction:null,htmlComponent:"date-input",minDate:null,maxDate:null,originalPropery:null,showTime:!1,yearRange:10,didReceiveAttrs:function(e){var t=this.get("property"),n="display_"+t;this.set("property",n),this.set("originalPropery",t),this._super(e)}})}),define("hospitalrun/components/date-time-picker",["exports","ember","moment"],function(e,t,n){var a=t.default.computed,l=t.default.isEmpty;e.default=t.default.Component.extend({i18n:t.default.inject.service(),dateTimePickerDate:null,datePickerClass:"",endDate:t.default.computed.alias("model.endDate"),endHour:null,endMinute:null,label:"",startDate:t.default.computed.alias("model.startDate"),startHour:null,startMinute:null,didReceiveAttrs:function(){var e=(0,n.default)(this.get("endDate")),t=(0,n.default)(this.get("startDate"));l(e)&&(e=t),this.set("endHour",e.hour()),this.set("endMinute",e.minute()),this.set("startHour",t.hour()),this.set("startMinute",t.minute()),this.set("dateTimePickerDate",t.toDate()),this._updateDates()},hourList:a(function(){var e=void 0,t=[],n=this.get("i18n");for(e=0;e<24;e++){var a=void 0,l={hour:e%12};a=0===e?n.t("components.dateTimePicker.midnight"):12===e?n.t("components.dateTimePicker.noon"):e<12?n.t("components.dateTimePicker.amHour",l):n.t("components.dateTimePicker.pmHour",l),t.push({name:a,value:e})}return t}),isAllDay:a("model.allDay",function(){var e=this.get("model.allDay");return e&&(this.set("startHour",0),this.set("startMinute",0),this.set("endHour",23),this.set("endMinute",59),this._updateDates()),e}),minuteList:a(function(){var e=void 0,t=[];for(e=0;e<60;e++)t.push({name:String("00"+e).slice(-2),value:e});return t}),actions:{dateChanged:function(){this._updateDates()},endHourChanged:function(e){this.set("endHour",e),this._updateDates()},endMinuteChanged:function(e){this.set("endMinute",e),this._updateDates()},startHourChanged:function(e){this.set("startHour",e),this._updateDates()},startMinuteChanged:function(e){this.set("startMinute",e),this._updateDates()}},endTimeHasError:a("model.isValid",function(){var e=this.get("model.errors.endDate");return e.length>0}),_updateDates:function(){var e=this;t.default.run.once(this,function(){var a=["start","end"];a.forEach(function(a){var l=a+"Date",s=e.get(l),i=e.get("dateTimePickerDate"),o=e.get(a+"Hour"),r=e.get(a+"Minute");t.default.isEmpty(i)||(s=(0,n.default)(i),s.hour(o),s.minute(r),e.set(l,s.toDate()))});var l=e.get("model");l.validate().catch(t.default.K)})}})}),define("hospitalrun/components/edit-panel",["exports","ember"],function(e,t){e.default=t.default.Component.extend({editPanelProps:null,cancelAction:"cancel",actions:{cancel:function(){this.sendAction("cancelAction")},disabledAction:function(){this.sendAction("editPanelProps.disabledAction")},fireButtonAction:function(e){this.set(e,e),this.sendAction(e)},updateButtonAction:function(){this.sendAction("editPanelProps.updateButtonAction")}}})}),define("hospitalrun/components/em-checkbox",["exports","ember-rapid-forms/components/em-checkbox"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-custom-input",["exports","ember-rapid-forms/components/em-custom-input"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-form-control-help",["exports","ember-rapid-forms/components/em-form-control-help"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-form-group",["exports","ember-rapid-forms/components/em-form-group"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-form-label",["exports","ember-rapid-forms/components/em-form-label"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-form-submit",["exports","ember-rapid-forms/components/em-form-submit"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-form",["exports","ember-rapid-forms/components/em-form"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-input",["exports","ember-rapid-forms/components/em-input"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-select",["exports","ember-rapid-forms/components/em-select"],function(e,t){e.default=t.default}),define("hospitalrun/components/em-text",["exports","ember-rapid-forms/components/em-text"],function(e,t){e.default=t.default}),define("hospitalrun/components/erf-html-checkbox",["exports","ember-rapid-forms/components/html-checkbox"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/components/erf-html-custom-input",["exports","ember-rapid-forms/components/html-custom-input"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/components/erf-html-input",["exports","ember-rapid-forms/components/html-input"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/components/erf-html-select",["exports","ember-rapid-forms/components/html-select"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/components/erf-html-text",["exports","ember-rapid-forms/components/html-text"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/components/ext-radio",["exports","ember"],function(e,t){e.default=t.default.Component.extend({includeOtherOption:!1,otherOptionLabel:null,showInline:!1,haveLabel:function(){var e=this.get("content.firstObject");return!t.default.isEmpty(e.label)}.property("content"),radioClass:function(){return this.get("showInline")?"radio-inline":"radio"}.property("showInline")})}),define("hospitalrun/components/file-upload",["exports","hospitalrun/components/image-upload"],function(e,t){e.default=t.default.extend({resizeFile:!1})}),define("hospitalrun/components/form-group-control",["exports","ember-rapid-forms/components/form-group-control"],function(e,t){e.default=t.default}),define("hospitalrun/components/form-group",["exports","ember-rapid-forms/components/form-group"],function(e,t){e.default=t.default}),define("hospitalrun/components/full-calendar",["exports","ember-fullcalendar/components/full-calendar"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/components/icd10-pcs-typeahead",["exports","hospitalrun/components/icd10-typeahead"],function(e,t){e.default=t.default.extend()}),define("hospitalrun/components/icd10-typeahead",["exports","hospitalrun/components/type-ahead"],function(e,t){e.default=t.default.extend({class:"scrollable-typeahead",minlength:2,selectionKey:"id",setOnBlur:!0,templates:{header:''},_sourceQuery:function(e,t){this.bloodhound.get(e,function(n){t(n);var a=this.$(".query-results");a.html(""+e+" returned "+n.length+" results")}.bind(this))},_getSource:function(){return this._sourceQuery.bind(this)}})}),define("hospitalrun/components/image-upload",["exports","ember-rapid-forms/components/em-input"],function(e,t){e.default=t.default.extend({fileInputEl:null,resizeFile:!0,selectedFile:null,type:"file",_fileChanged:function(){var e=this,t=this.get("fileInputEl"),n=this.get("resizeFile");n?!function(){window.URL=window.URL||window.webkitURL;var n=window.URL.createObjectURL(t.files[0]),a=new Image;a.src=n,a.onload=function(){window.URL.revokeObjectURL(n),this.set("selectedFile",this._resizeImage(a))}.bind(e)}():this.set("selectedFile",t.files[0])},_resizeImage:function(e){var t=document.createElement("canvas"),n=e.height,a=e.width,l=1024,s=1024;a>n?a>s&&(n=Math.round(n*=s/a),a=s):n>l&&(a=Math.round(a*=l/n),n=l),t.width=a,t.height=n;var i=t.getContext("2d");i.drawImage(e,0,0,a,n);for(var o=t.toDataURL("image/png"),r=atob(o.split(",")[1]),d=[],c=0;c=l&&(s=a),o},0),s>-1?a.get("length")>s+1&&(a=a.slice(0,s+1),this.set("calculatedLocationPickers",a)):a.addObject(t.default.Object.create()),this._setupLocationPickers(a,n)),a.forEach(function(e){i.addObject(e.get("selectedLocation"))}),this.set("componentSelectedLocations",i)},_setup:function(){t.default.Binding.from("selectedLocations").to("componentSelectedLocations").connect(this)}.on("init"),_setupLocationPickers:function(e,a,l){e.reduce(function(e,t){var a=t.get("selectedLocation");return t.set("subLocationList",e.map(n.default.selectObjectMap)),e.includes(a)&&!l||t.set("selectedLocation",e.get("firstObject")),t.set("label","And"),e.filter(function(e){return t.get("selectedLocation.id")!==e.get("id")})},a);var s=e.get("firstObject");t.default.isEmpty(s)||s.set("label",this.get("label")),this.set("calculatedLocationPickers",e)},locationPickers:function(){var e=this.get("locationList"),n=[],a=this.get("quantityRequested");if(!t.default.isEmpty(e)&&!t.default.isEmpty(a))return this.set("doingSetup",!0),e.reduce(function(e,l){return e0)return"have-inventory-items"}.property("content"),mappedContent:function(){var e=this.get("content"),t=[];return e&&(t=e.map(this._mapInventoryItems.bind(this))),t}.property("content"),contentChanged:function(){var e=this.get("bloodhound"),t=this.get("content");e&&(e.clear(),e.add(t.map(this._mapInventoryItems.bind(this))))}.observes("content.[]"),itemSelected:function(e){var n=this;this._super();var a=this.get("store");t.default.isEmpty(e)||a.find("inventory",e.id).then(function(e){var a=n.get("model");a.set("inventoryItem",e),t.default.run.once(n,function(){a.validate().catch(t.default.K)})})}})}),define("hospitalrun/components/item-listing",["exports","ember","hospitalrun/mixins/paging-actions"],function(e,t,n){e.default=t.default.Component.extend(n.default,{classNames:["panel","panel-primary"]})}),define("hospitalrun/components/loading-message",["exports","ember","ember-i18n"],function(e,t,n){e.default=t.default.Component.extend({tagName:"span",showLoadingMessages:!1,loadingMessages:[(0,n.translationMacro)("loading.messages.0"),(0,n.translationMacro)("loading.messages.1"),(0,n.translationMacro)("loading.messages.2"),(0,n.translationMacro)("loading.messages.3"),(0,n.translationMacro)("loading.messages.4"),(0,n.translationMacro)("loading.messages.5"),(0,n.translationMacro)("loading.messages.6"),(0,n.translationMacro)("loading.messages.7"),(0,n.translationMacro)("loading.messages.8"),(0,n.translationMacro)("loading.messages.9"),(0,n.translationMacro)("loading.messages.10"),(0,n.translationMacro)("loading.messages.11")],_setRandomMessage:function(){var e=this.get("loadingMessages"),n=Math.floor(Math.random()*e.length);this.set("message",e[n]),this.set("timer",t.default.run.later(this,this._setRandomMessage,1e3))},didInsertElement:function(){this._setRandomMessage()},willDestroyElement:function(){var e=this.get("timer");t.default.isEmpty(e)||t.default.run.cancel(e)}})}),define("hospitalrun/components/location-select",["exports","ember"],function(e,t){e.default=t.default.Component.extend({locationPicker:null,_setup:function(){this.locationChange=this.currentLocationChanged.bind(this)}.on("init"),currentLocationChanged:function(e){this.get("locationPicker").set("selectedLocation",e),t.default.run.once(this,function(){this.get("parentView").locationChange()})}})}),define("hospitalrun/components/medication-allergy",["exports","ember"],function(e,t){var n=t.default.computed,a=t.default.get,l=t.default.isEmpty;e.default=t.default.Component.extend({classNames:"ps-info-group long-form",store:t.default.inject.service(),i18n:t.default.inject.service(),patient:null,displayModal:!1,currentAllergy:!1,buttonConfirmText:n("currentAllergy",function(){var e=this.get("i18n"),t=this.get("currentAllergy");return t?e.t("buttons.update"):e.t("buttons.add")}),additionalButtons:n("currentAllergy",function(){var e=this.get("currentAllergy"),t=this.get("i18n").t("buttons.delete");if(e)return[{class:"btn btn-default warning",buttonAction:"deleteAllergy",buttonIcon:"octicon octicon-x",buttonText:t}]}),showAllergies:n("canAddAllergy","patient.allergies.[]",{get:function(){var e=a(this,"canAddAllergy"),t=a(this,"patient.allergies");return e||!l(t)}}),modalTitle:t.default.computed("currentAllergy",function(){var e=this.get("currentAllergy"),t=this.get("i18n");return e?t.t("allergies.titles.editAllergy"):t.t("allergies.titles.addAllergy")}),closeAllergyModal:function(){this.set("currentAllergy",!1),this.set("displayModal",!1)},actions:{cancel:function(){this.closeAllergyModal()},closeModal:function(){this.closeAllergyModal()},editAllergy:function(e){this.set("currentAllergy",e), +this.set("displayModal",!0)},createNewAllergy:function(){this.set("displayModal",!0)},updateAllergy:function(){var e=this,t=this.get("patient"),n=this.get("currentAllergy");n?n.save().then(function(){e.closeAllergyModal()}):(n=this.get("store").createRecord("allergy",{name:this.get("name")}),n.save().then(function(){t.get("allergies").pushObject(n),t.save().then(function(){e.set("name",""),e.closeAllergyModal()})}))},deleteAllergy:function(){var e=this,t=this.get("currentAllergy"),n=this.get("patient"),a=n.get("allergies");t.destroyRecord().then(function(){a.removeObject(t),n.save().then(function(){e.closeAllergyModal()})})}}})}),define("hospitalrun/components/modal-dialog",["exports","ember"],function(e,t){e.default=t.default.Component.extend({i18n:t.default.inject.service(),cancelAction:"cancel",closeModalAction:"closeModal",hideCancelButton:!1,hideUpdateButton:!1,isUpdateDisabled:!1,title:"",updateButtonAction:"",updateButtonClass:"",updateButtonText:"",cancelButtonText:"",cancelBtnText:function(){var e=this.get("cancelButtonText");return t.default.isEmpty(e)?this.get("i18n").t("buttons.cancel"):e}.property("cancelButtonText"),actions:{cancelAction:function(){this.sendAction("cancelAction")},fireButtonAction:function(e){this.set(e,e),this.sendAction(e)},updateAction:function(){this.sendAction("updateButtonAction")}},didInsertElement:function(){var e=this.$(".modal").modal();e.on("hidden.bs.modal",function(){this.sendAction("closeModalAction"),this.sendAction("cancelAction")}.bind(this))},willDestroyElement:function(){var e=this.$(".modal");e.off("hidden.bs.modal"),e.modal("hide"),$("body").removeClass("modal-open"),$(".modal-backdrop").remove()}})}),define("hospitalrun/components/nav-menu",["exports","ember","hospitalrun/mixins/user-session"],function(e,t,n){e.default=t.default.Component.extend(n.default,{tagName:"div",classNames:["primary-nav-item"],nav:null,show:function(){return this._setupSubNav(),this.currentUserCan(this.get("nav").capability)}.property("nav","session.data.authenticated.userCaps"),isShowing:!1,_setup:function(){var e=this.get("nav");e.closeSubnav=function(){this.set("isShowing",!1)}.bind(this),this._setupSubNav()}.on("init"),_setupSubNav:function(){var e=this,t=this.get("nav");t.subnav.forEach(function(t){t.show=e.currentUserCan(t.capability)})},callNavAction:"navAction",callCloseSettings:"closeSettings",actions:{toggleContent:function(){this.set("isShowing",!this.get("isShowing")),this.sendAction("callNavAction",this.nav)},resetNav:function(){this.sendAction("callCloseSettings")}}})}),define("hospitalrun/components/nav-paging",["exports","ember","hospitalrun/mixins/paging-actions"],function(e,t,n){e.default=t.default.Component.extend(n.default,{classNames:["paging-buttons"],paginationProps:null})}),define("hospitalrun/components/number-input",["exports","ember-rapid-forms/components/em-input"],function(e,t){e.default=t.default.extend({sanitizeFunction:function(e){return e.replace(new RegExp(/([^0-9|.]+)/g),"")},focusOut:function(){return this._sanitizeValue(),this._super()},keyUp:function(){return this._sanitizeValue(),this._super()},_sanitizeValue:function(){var e=this.get("model"),t=this.get("property"),n=e.get(t),a=this.get("sanitizeFunction")(n);e.set(t,a)}})}),define("hospitalrun/components/operative-procedures",["exports","ember"],function(e,t){function n(e){var t=s(e,"procedures"),n=s(e,"procedureDescription");l(n)||(t.addObject({description:n}),i(e,"procedureDescription",null))}e.addProcedure=n;var a=t.default.computed,l=t.default.isEmpty,s=t.default.get,i=t.default.set;e.default=t.default.Component.extend({model:null,procedureList:null,haveProcedures:a("model.procedures.[]",{get:function(){return!l(s(this,"model.procedures"))}}),actions:{addProcedure:function(){var e=s(this,"model");n(e)},deleteProcedure:function(e){var t=s(this,"model"),n=s(t,"procedures");n.removeObject(e),t.validate()}}})}),define("hospitalrun/components/patient-diagnosis",["exports","ember","hospitalrun/mixins/patient-diagnosis","ember-i18n","hospitalrun/mixins/user-session"],function(e,t,n,a,l){var s=t.default.computed,i=t.default.get,o=["diagnosisContainer","hideInActiveDiagnoses","diagnosisContainer.diagnoses.@each.active","diagnosisContainer.diagnoses.@each.secondaryDiagnosis"];e.default=t.default.Component.extend(n.default,l.default,{i18n:t.default.inject.service(),allowAddDiagnosis:!1,diagnosisContainer:null,diagnosisProperty:null,diagnosisList:null,editDiagnosisAction:"editDiagnosis",hideInActiveDiagnoses:!0,showAddDiagnosisAction:"showAddDiagnosis",primaryDiagnosisLabel:(0,a.translationMacro)("patients.labels.primaryDiagnosis"),secondaryDiagnosisLabel:(0,a.translationMacro)("patients.labels.secondaryDiagnosis"),canAddDiagnosis:s("allowAddDiagnosis",{get:function(){var e=i(this,"allowAddDiagnosis");return e&&this.currentUserCan("add_diagnosis")}}),havePrimaryDiagnoses:s("primaryDiagnoses.length",{get:function(){var e=this.get("primaryDiagnoses.length");return e>0}}),haveSecondaryDiagnoses:s("secondaryDiagnoses.length",{get:function(){var e=this.get("secondaryDiagnoses.length");return e>0}}),primaryDiagnoses:s.apply(void 0,o.concat([{get:function(){var e=this.get("diagnosisContainer"),t=this.get("hideInActiveDiagnoses");return this.getDiagnoses(e,t,!1)}}])),secondaryDiagnoses:s.apply(void 0,o.concat([{get:function(){var e=this.get("diagnosisContainer"),t=this.get("hideInActiveDiagnoses");return this.getDiagnoses(e,t,!0)}}])),showPrimaryDiagnoses:s("canAddDiagnosis","havePrimaryDiagnoses",{get:function(){return this.get("canAddDiagnosis")||this.get("havePrimaryDiagnoses")}}),actions:{editDiagnosis:function(e){this.sendAction("editDiagnosisAction",e)},showAddDiagnosis:function(){this.sendAction("showAddDiagnosisAction")}}})}),define("hospitalrun/components/patient-orders",["exports","ember","hospitalrun/mixins/filter-list","hospitalrun/mixins/user-session"],function(e,t,n,a){var l=t.default.computed;e.default=t.default.Component.extend(n.default,a.default,{editImagingAction:"editImaging",editLabAction:"editLab",editMedicationAction:"editMedication",filterBy:null,filterValue:null,newImagingAction:"newImaging",newLabAction:"newLab",newMedicationAction:"newMedication",showDeleteImagingAction:"showDeleteImaging",showDeleteLabAction:"showDeleteLab",showDeleteMedicationAction:"showDeleteMedication",sortKey:null,sortDesc:!1,orderTypeFilters:t.default.computed(function(){var e=this.get("i18n");return[e.t("components.patientOrders.labels.imagingOrderType").toString(),e.t("components.patientOrders.labels.labOrderType").toString(),e.t("components.patientOrders.labels.medicationOrderType").toString()]}),canAddImaging:t.default.computed(function(){return this.currentUserCan("add_imaging")}),canAddLab:t.default.computed(function(){return this.currentUserCan("add_lab")}),canAddMedication:t.default.computed(function(){return this.currentUserCan("add_medication")}),canDeleteImaging:t.default.computed(function(){return this.currentUserCan("delete_imaging")}),canDeleteLab:t.default.computed(function(){return this.currentUserCan("delete_lab")}),canDeleteMedication:t.default.computed(function(){return this.currentUserCan("delete_medication")}),filteredList:l("orderList.[]","filterBy","filterValue",function(){var e=this.get("filterBy"),t=this.get("filterValue"),n=this.get("orderList");return n=this.filterList(n,e,t)}),orderList:l("visit.imaging.[]","visit.labs.[]","visit.medication.[]",function(){var e=this,n=this.get("i18n"),a=this.get("visit.imaging"),l=this.get("visit.labs"),s=this.get("visit.medication"),i=new t.default.A;return i.addObjects(a.map(function(t){return t.set("orderType",n.t("components.patientOrders.labels.imagingOrderType")),t.set("name",t.get("imagingType.name")),t.set("dateProcessed",t.get("imagingDate")),e._setPermissions(t,"canAddImaging","canDeleteImaging"),t})),i.addObjects(l.map(function(t){return t.set("orderType",n.t("components.patientOrders.labels.labOrderType")),t.set("name",t.get("labType.name")),t.set("dateProcessed",t.get("labDate")),e._setPermissions(t,"canAddLab","canDeleteLab"),t})),i.addObjects(s.map(function(t){return t.set("orderType",n.t("components.patientOrders.labels.medicationOrderType")),t.set("name",t.get("medicationName")),t.set("dateProcessed",t.get("prescriptionDate")),t.set("result",""),t.set("notes",t.get("prescription")),e._setPermissions(t,"canAddMedication","canDeleteMedication"),t})),i}),sortedOrders:t.default.computed("filteredList","sortKey","sortDesc",function(){var e=this.get("filteredList"),n=this.get("sortDesc"),a=this.get("sortKey");return t.default.isEmpty(e)||t.default.isEmpty(a)?e:e=e.sort(function(e,l){var s=e.get(a),i=l.get(a);return"orderType"===a&&(s=s.toString(),i=i.toString()),n?t.default.compare(i,s):t.default.compare(s,i)})}),i18n:t.default.inject.service(),visit:null,_setPermissions:function(e,t,n){e.get("canEdit")&&(this.get(t)&&e.set("canEdit",!0),this.get(n)&&e.set("canDelete",!0))},actions:{filter:function(e,t){this.setProperties({filterBy:e,filterValue:t})},newImaging:function(){this.sendAction("newImagingAction")},newLab:function(){this.sendAction("newLabAction")},newMedication:function(){this.sendAction("newMedicationAction")},editOrder:function(e){var t=e.get("constructor.modelName").capitalize();this.sendAction("edit"+t+"Action",e)},showDeleteOrder:function(e){var t=e.get("constructor.modelName").capitalize();this.sendAction("showDelete"+t+"Action",e)},sortByKey:function(e,t){this.setProperties({sortKey:e,sortDesc:t})}}})}),define("hospitalrun/components/patient-summary",["exports","ember","hospitalrun/mixins/user-session"],function(e,t,n){var a=t.default.computed,l=t.default.get,s=t.default.isEmpty,i=t.default.set;e.default=t.default.Component.extend(n.default,{allowAddAllergy:!1,allowAddDiagnosis:!1,allowAddOperativePlan:!1,classNames:["patient-summary"],diagnosisContainer:null,diagnosisList:null,disablePatientLink:!1,editDiagnosisAction:"editDiagnosis",editOperativePlanAction:"editOperativePlan",editOperationReportAction:"editOperationReport",editProcedureAction:"editProcedure",hideInActiveDiagnoses:!0,patient:null,patientProcedures:null,showAddDiagnosisAction:"showAddDiagnosis",showPatientAction:"showPatient",canAddAllergy:a("allowAddAllergy",{get:function(){var e=l(this,"allowAddAllergy");return e&&this.currentUserCan("add_allergy")}}),canAddOperativePlan:a("allowAddOperativePlan",{get:function(){var e=l(this,"allowAddOperativePlan");return e&&this.currentUserCan("add_operative_plan")}}),currentOperativePlan:a("patient.operativePlans.@each.status",{get:function(){var e=l(this,"patient.operativePlans");return e.findBy("isPlanned",!0)}}),haveProcedures:a("patientProcedures.length",function(){var e=this.get("patientProcedures.length");return e>0}),shouldLinkToPatient:a("disablePatientLink",function(){var e=this.get("disablePatientLink");return!e}),didReceiveAttrs:function(){this._super.apply(this,arguments);var e=l(this,"diagnosisContainer");s(e)&&i(this,"diagnosisContainer",l(this,"patient"))},actions:{addOperativePlan:function(){this.sendAction("editOperativePlanAction")},editOperativePlan:function(e){this.sendAction("editOperativePlanAction",e)},linkToPatient:function(){var e=this.get("shouldLinkToPatient");if(e){var t=this.get("patient"),n=this.get("returnTo"),a=this.get("returnToContext");t.set("returnTo",n),t.set("returnToContext",a),this.sendAction("showPatientAction",this.get("patient"))}},editDiagnosis:function(e){this.sendAction("editDiagnosisAction",e)},editProcedure:function(e){var t=l(e,"report");s(t)?this.sendAction("editProcedureAction",e):this.sendAction("editOperationReportAction",t)},showAddDiagnosis:function(){this.sendAction("showAddDiagnosisAction")}}})}),define("hospitalrun/components/patient-typeahead",["exports","ember","hospitalrun/mixins/patient-name","hospitalrun/components/type-ahead"],function(e,t,n,a){e.default=a.default.extend(n.default,{displayKey:"name",selectedAction:"selectedPatientChanged",setOnBlur:!0,_mapPatient:function(e){var t={};return t.name=this.getPatientDisplayName(e)+" - "+this.getPatientDisplayId(e),t[this.get("selectionKey")]=e,t},contentChanged:function(){var e=this.get("bloodhound"),n=this.get("content");e&&(e.clear(),t.default.isEmpty(n)||e.add(n.map(this._mapPatient.bind(this))))}.observes("content.[]"),mappedContent:function(){var e=this.get("content"),t=[];return e&&(t=e.map(this._mapPatient.bind(this))),t}.property("content")})}),define("hospitalrun/components/photo-display",["exports","ember"],function(e,t){e.default=t.default.Component.extend({computedPhotoUrl:null,filesystem:t.default.inject.service(),isFileSystemEnabled:t.default.computed.alias("filesystem.isFileSystemEnabled"),fileName:t.default.computed.alias("photo.fileName"),photo:null,url:t.default.computed.alias("photo.url"),photoUrl:function(){var e=this.get("computedPhotoUrl"),n=this.get("fileName"),a=this.get("filesystem"),l=this.get("isFileSystemEnabled"),s=this.get("url");return t.default.isEmpty(e)?(l&&a.pathToFileSystemURL(n).then(function(e){t.default.isEmpty(e)||this.set("computedPhotoUrl",e)}.bind(this)),s):e}.property("computedPhotoUrl","fileName","url")})}),define("hospitalrun/components/price-list",["exports","ember","hospitalrun/mixins/charge-actions"],function(e,t,n){e.default=t.default.Component.extend(n.default,{attributeBindings:["tabId:id","role"],charges:t.default.computed.alias("model.charges"),classNameBindings:["active"],classNames:["tab-pane"],index:null,model:null,pricingList:null,pricingType:null,role:"tab",setChargeQuantityAction:"setChargeQuantity",active:function(){var e=this.get("index");return 0===e}.property(),pricingListByType:function(){var e=this.get("pricingList"),n=this.get("pricingType"),a=[];if(!t.default.isEmpty(e)){e=e.filterBy("pricingType",n),e=e.map(function(e){var t=this.findChargeForPricingItem(e,this.get("charges"));return t&&this.sendAction("setChargeQuantityAction",e.id,t.get("quantity")),e}.bind(this));for(var l=0,s=e,i=s.length;l1&&!t.default.isEmpty(e)&&!isNaN(e)}.property("calculated"),currentQuantityGroups:function(){var e=void 0,n=this.get("quantityGroups"),a=this.get("targetUnit");if(e=n.get("firstObject"),!t.default.isEmpty(e)){var l=e.unit;t.default.isEmpty(l)?this.set("quantityGroups.firstObject.unit",a):this.updateCurrentUnit(l,0)}return n}.property("quantityGroups","targetUnit"),calculateTotal:function(){var e=this.get("quantityGroups"),n=!1,a=e.get("lastObject"),l=this.get("targetUnit");if(n=e.every(function(e){var n=e.quantity,a=e.unit;return!t.default.isEmpty(n)&&!t.default.isEmpty(a)&&!isNaN(n)}),n&&a.unit===l){var s=e.reduce(function(e,t){return e*parseInt(t.quantity)},1);this.set("calculated",s)}else this.set("calculated")},updateCurrentUnit:function(e,n){var a=this.get("targetUnit"),l=this.get("quantityGroups"),s=l.length;t.default.isEmpty(a)||(e===a?n0&&(this.set("selectedCamera",a[0].id),this.cameraChange(a[0].id))},_gotStream:function(e){if(this.isDestroyed)this._stopStream(e);else{var t=this.get("video");this.set("stream",e),t.src=window.URL.createObjectURL(e),t.play()}},_photoSourceChanged:function(e){var t=this.$(".camera"),n=this.$(".fileupload"),a=this.get("setupCamera");if(this.set("photoSource",e),e===l)n.show(),t.hide();else if(n.hide(),t.show(),!a){var s=this.$("canvas").get(0),i=this.$("img").get(0),o=this.$("video").get(0);this.setProperties({canvas:s,photo:i,video:o}),"undefined"==typeof MediaStreamTrack||"undefined"===MediaStreamTrack.getSources?navigator.getUserMedia&&(navigator.getUserMedia({audio:!1,video:!0},this._gotStream.bind(this),this._errorCallback),this._setupCanPlayListener(o)):(MediaStreamTrack.getSources(this._gotSources.bind(this)),this._setupCanPlayListener(o)),this.set("setupCamera",!0)}},_setupCanPlayListener:function(e){e.removeEventListener("canplay",this._setupVideo.bind(this),!1),e.addEventListener("canplay",this._setupVideo.bind(this),!1)},_setupVideo:function(){var e=this.get("canvas"),t=this.get("height"),n=this.get("video"),a=this.get("width");t=n.videoHeight/(n.videoWidth/a),n.setAttribute("width",a),n.setAttribute("height",t),e.setAttribute("width",a),e.setAttribute("height",t),this.setProperties({height:t,width:a})},_setup:function(){this.cameraChange=this._cameraChange.bind(this),this.photoSourceChange=this._photoSourceChanged.bind(this);var e=a;this.get("canCaptureVideo")||(e=l),this.set("photoSource",e)}.on("init"),_stopStream:function(e){var a=e||this.get("stream");if(!t.default.isEmpty(a))if("undefined"==typeof a.active)a.stop();else{var l=a.getTracks(),s=n(l,1),i=s[0];i.stop()}},actions:{takePhoto:function(){var e=this.get("canvas"),t=this.get("height"),n=this.get("video"),a=this.get("width");e.width=a,e.height=t,e.getContext("2d").drawImage(n,0,0,a,t);for(var l=e.toDataURL("image/png"),s=atob(l.split(",")[1]),i=[],o=0;o1}.property("photoSource","videoSources"),willDestroyElement:function(){this._stopStream()}})}),define("hospitalrun/components/text-search",["exports","ember"],function(e,t){e.default=t.default.TextField.extend(t.default.TargetActionSupport,{change:function(){this.triggerAction({action:"search"})},didInsertElement:function(){this.$().focus()}})}),define("hospitalrun/components/type-ahead",["exports","ember-rapid-forms/components/em-input","hospitalrun/mixins/typeahead"],function(e,t,n){e.default=t.default.extend(n.default)}),define("hospitalrun/components/typeahead-filter",["exports","ember","hospitalrun/mixins/typeahead"],function(e,t,n){e.default=t.default.Component.extend(n.default,{classNames:["input-group"],selectedAction:"filter",setOnBlur:!1,actions:{clearFilter:function(){var e=this.$(".tt-input");e.val(""),this.sendAction("selectedAction")}}})}),define("hospitalrun/controllers/abstract-delete-controller",["exports","ember"],function(e,t){e.default=t.default.Controller.extend({afterDeleteAction:"closeModal",showUpdateButton:!0,updateButtonText:"Delete",updateButtonAction:"delete",isUpdateDisabled:!1,actions:{cancel:function(){this.send("closeModal")},delete:function(){var e=this.get("model");e.set("archived",!0),e.save().then(function(){e.unloadRecord(),this.send(this.get("afterDeleteAction"),e)}.bind(this))}}})}),define("hospitalrun/controllers/abstract-edit-controller",["exports","ember","hospitalrun/mixins/edit-panel-props","hospitalrun/mixins/is-update-disabled","hospitalrun/mixins/modal-helper","hospitalrun/mixins/user-session"],function(e,t,n,a,l,s){var i=t.default.get;e.default=t.default.Controller.extend(n.default,a.default,l.default,s.default,{cancelAction:"allItems",cancelButtonText:function(){var e=this.get("i18n"),t=this.get("model.hasDirtyAttributes");return t?e.t("buttons.cancel"):e.t("buttons.returnButton")}.property("model.hasDirtyAttributes"),disabledAction:function(){var e=this.get("model");e.validate&&e.validate().catch(t.default.K);var n=e.get("isValid");if(!n)return"showDisabledDialog"}.property("model.isValid"),isNewOrDeleted:function(){return this.get("model.isNew")||this.get("model.isDeleted")}.property("model.isNew","model.isDeleted"),lookupListsToUpdate:null,showUpdateButton:function(){var e=this.get("updateCapability");return this.currentUserCan(e)}.property("updateCapability"),updateButtonAction:"update",updateButtonText:function(){var e=this.get("i18n");return this.get("model.isNew")?e.t("buttons.add"):e.t("buttons.update")}.property("model.isNew"),updateCapability:null,_addValueToLookupList:function(e,n,a,l){var s=e.get("value");t.default.isArray(s)||(s=[]),s.includes(n)||(s.push(n),s.sort(),e.set("value",s),a.includes(e)||a.push(e),this.set(l,e))},_cancelUpdate:function(){var e=this.get("model");e.rollbackAttributes()},actions:{cancel:function(){this._cancelUpdate(),this.send(this.get("cancelAction"))},returnTo:function e(){this._cancelUpdate();var e=this.get("model.returnTo"),n=this.get("model.returnToContext");t.default.isEmpty(n)?this.transitionToRoute(e):this.transitionToRoute(e,n)},showDisabledDialog:function(){var e=this.get("i18n");this.displayAlert(e.t("alerts.warningExclamation"),e.t("messages.requiredFieldsCorrectErrors"))},update:function(e){var t=this;try{this.beforeUpdate().then(function(){t.saveModel(e)}).catch(function(e){if(!e.ignore){var n=t.get("i18n");t.displayAlert(n.t("alerts.errorExclamation"),n.t("messages.saveActionException",{message:JSON.stringify(e)}))}})}catch(e){var n=this.get("i18n");this.displayAlert(n.t("alerts.errorExclamation"),n.t("messages.saveActionException",{message:JSON.stringify(e)}))}}},afterUpdate:function(){},beforeUpdate:function(){return t.default.RSVP.Promise.resolve()},saveModel:function(e){var t=this;i(this,"model").save().then(function(n){t.updateLookupLists(),e||t.afterUpdate(n)}).catch(function(e){t.send("error",e)})},updateLookupLists:function(){var e=this.get("lookupListsToUpdate"),n=t.default.A();t.default.isEmpty(e)||(e.forEach(function(e){var a=this.get(e.property),l=this.get(e.name),s=this.get("store");t.default.isEmpty(a)||(l||(l=s.push(s.normalize("lookup",{id:e.id,value:[],userCanAdd:!0}))),t.default.isArray(a)?a.forEach(function(t){this._addValueToLookupList(l,t,n,e.name)}.bind(this)):this._addValueToLookupList(l,a,n,e.name))}.bind(this)),n.forEach(function(e){e.save()}))}})}),define("hospitalrun/controllers/abstract-paged-controller",["exports","ember","hospitalrun/mixins/pagination-props","hospitalrun/mixins/progress-dialog","hospitalrun/mixins/user-session"],function(e,t,n,a,l){e.default=t.default.Controller.extend(n.default,a.default,l.default,{addPermission:null,deletePermission:null,nextStartKey:null,previousStartKey:null,previousStartKeys:[],progressMessage:"Loading Records. Please wait...",progressTitle:"Loading",queryParams:["startKey","sortKey","sortDesc"],sortDesc:!1,sortKey:null,canAdd:function(){return this.currentUserCan(this.get("addPermission"))}.property(),canDelete:function(){return this.currentUserCan(this.get("deletePermission"))}.property(),canEdit:function(){return this.currentUserCan(this.get("addPermission"))}.property(),showActions:function(){return this.get("canAdd")||this.get("canEdit")||this.get("canDelete")}.property("canAdd","canEdit","canDelete"),disablePreviousPage:function(){return t.default.isEmpty(this.get("previousStartKey"))}.property("previousStartKey"),disableNextPage:function(){return t.default.isEmpty(this.get("nextStartKey"))}.property("nextStartKey"),showPagination:function(){return!t.default.isEmpty(this.get("previousStartKey"))||!t.default.isEmpty(this.get("nextStartKey"))}.property("nextStartKey","previousStartKey"),hasRecords:t.default.computed("model.length",{get:function(){var e=this.get("model");return!t.default.isEmpty(e)&&e.get("length")>0}}),actions:{nextPage:function(){var e=this.get("nextStartKey"),t=this.get("previousStartKeys"),n=this.get("firstKey");this.set("previousStartKey",n),t.push(n),this.set("startKey",e),this.showProgressModal()},previousPage:function(){var e=this.get("previousStartKey"),t=this.get("previousStartKeys");t.pop(),this.set("startKey",e),this.set("previousStartKey",t.pop()),this.set("previousStartKeys",t),this.showProgressModal()},sortByKey:function(e,t){this.setProperties({previousStartKey:null,previousStartKeys:[],nextStartKey:null,sortDesc:t,sortKey:e,startKey:null,firstKey:null}),this.showProgressModal()}}})}),define("hospitalrun/controllers/abstract-report-controller",["exports","ember","hospitalrun/mixins/date-format","hospitalrun/mixins/modal-helper","moment","hospitalrun/mixins/number-format","hospitalrun/mixins/pagination-props","hospitalrun/mixins/pouchdb","hospitalrun/mixins/progress-dialog"],function(e,t,n,a,l,s,i,o,r){e.default=t.default.Controller.extend(n.default,a.default,s.default,i.default,o.default,r.default,{defaultErrorMessage:"An error was encountered while generating the requested report. Please let your system administrator know that you have encountered an error.",offset:0,limit:25,progressMessage:"Please wait while your report is generated.",progressTitle:"Generating Report",reportColumns:null,reportHeaders:null,reportRows:[],reportTitle:null,reportType:null,reportTypes:null,showFirstPageButton:!0,showLastPageButton:!0,showReportResults:!1,_addReportRow:function(e,n,a,l){var s=void 0,i=this.get("reportRows"),o=[];t.default.isEmpty(a)&&(a=this.get("reportColumns"));for(var r in a)a[r].include&&(s=t.default.get(e,a[r].property),t.default.isEmpty(s)?o.push(""):"_numberFormat"===a[r].format?n?o.push(s):o.push(this._numberFormat(s)):!n&&a[r].format?o.push(this[a[r].format](s)):o.push(s));l?i.addObject({rowAction:l,row:o}):i.addObject(o)},_finishReport:function(e){this.set("showReportResults",!0),this.set("offset",0),this._setReportHeaders(e),this._setReportTitle(),this._generateExport(),this.closeProgressModal(); +},_generateExport:function(){var e=[],t=this.get("reportHeaders"),n=[t];n.addObjects(this.get("reportRows")),n.forEach(function(t){var n=void 0;n=t.row?t.row:t,n=n.map(function(e){return e?e.replace?e.replace('"','""'):e:""}),e.push('"'+n.join('","')+'"')});var a=e.join("\r\n"),l="data:application/csv;charset=utf-8,"+encodeURIComponent(a);this.set("csvExport",l)},_notifyReportError:function(e){var t=this.get("i18n");throw this.closeProgressModal(),this.displayAlert(t.t("alerts.reportError"),t.t("messages.reportError")),new Error(e)},_setReportHeaders:function(e){var n=[];t.default.isEmpty(e)&&(e=this.get("reportColumns"));for(var a in e)e[a].include&&n.push(e[a].label);this.set("reportHeaders",n)},_setReportTitle:function(){var e=this.get("endDate"),n="",a="",s=this.get("reportType"),i=this.get("reportTypes"),o=this.get("startDate");t.default.isEmpty(e)||(n=(0,l.default)(e).format("l"));var r=i.findBy("value",s);t.default.isEmpty(o)?this.set("reportTitle",this.get("i18n").t("inventory.reports.titleSingleDate",{name:r.name,date:n})):(a=(0,l.default)(o).format("l"),this.set("reportTitle",this.get("i18n").t("inventory.reports.titleDateRange",{name:r.name,startDate:a,endDate:n})))},actions:{firstPage:function(){this.set("offset",0)},nextPage:function(){var e=this.get("limit");this.incrementProperty("offset",e)},previousPage:function(){var e=this.get("limit");this.decrementProperty("offset",e)},lastPage:function(){var e=this.get("reportRows.length"),t=this.get("limit"),n=parseInt(e/t);this.set("offset",n*t)}},currentReportRows:function(){var e=this.get("limit"),t=this.get("offset"),n=this.get("reportRows");return n.slice(t,t+e)}.property("reportRows.[]","offset","limit"),disablePreviousPage:function(){return 0===this.get("offset")}.property("offset"),disableNextPage:function(){var e=this.get("limit"),t=this.get("reportRows.length"),n=this.get("offset");return n+e>=t}.property("offset","limit","reportRows.length"),showPagination:function(){var e=this.get("reportRows.length"),t=this.get("limit");return e>t}.property("reportRows.length")})}),define("hospitalrun/controllers/application",["exports","ember"],function(e,t){e.default=t.default.Controller.extend({filesystem:t.default.inject.service(),session:t.default.inject.service(),_setup:function(){var e=this.get("filesystem");e.setup()}.on("init")})}),define("hospitalrun/controllers/index",["exports","ember","hospitalrun/mixins/user-session"],function(e,t,n){e.default=t.default.Controller.extend(n.default,{indexLinks:["Appointments","Labs","Imaging","Inventory","Medication","Patients","Users"],setupPermissions:t.default.on("init",function(){var e=this.get("defaultCapabilities");for(var t in e)this.currentUserCan(t)&&this.set("userCan_"+t,!0)}),activeLinks:t.default.computed("indexLinks",function(){var e=[],t=this.get("indexLinks");return t.forEach(function(t){var n=t.toLowerCase();this.currentUserCan(n)&&e.push({action:n,text:t})}.bind(this)),e})})}),define("hospitalrun/controllers/login",["exports","ember"],function(e,t){var n=t.default.Controller.extend({session:t.default.inject.service(),errorMessage:null,identification:null,password:null,actions:{authenticate:function(){var e=this,t=this.getProperties("identification","password"),n=t.identification,a=t.password;this.get("session").authenticate("authenticator:custom",{identification:n,password:a}).catch(function(t){e.set("errorMessage",t.reason)})}}});e.default=n}),define("hospitalrun/controllers/navigation",["exports","ember","hospitalrun/mixins/hospitalrun-version","hospitalrun/mixins/modal-helper","hospitalrun/mixins/progress-dialog","hospitalrun/mixins/user-session","hospitalrun/mixins/navigation"],function(e,t,n,a,l,s,i){e.default=t.default.Controller.extend(n.default,a.default,l.default,s.default,i.default,{ajax:t.default.inject.service(),application:t.default.inject.controller(),allowSearch:!1,config:t.default.inject.service(),currentSearchText:null,currentRouteName:t.default.computed.alias("application.currentRouteName"),progressTitle:"Searching",searchRoute:null,session:t.default.inject.service(),syncStatus:"",currentOpenNav:null,actions:{about:function(){var e=this,n=this.get("version");this.get("ajax").request("/serverinfo").then(function(a){var l="Version: "+n;t.default.isEmpty(a)||(l+=" Site Info: "+a),e.displayAlert(e.get("i18n").t("navigation.about"),l)})},invalidateSession:function(){var e=this.get("session");e.get("isAuthenticated")&&e.invalidate()},search:function(){if(this.allowSearch&&this.searchRoute){var e=this.get("currentRouteName"),t=this.get("currentSearchText"),n=this.get("searchText");t===n&&e.indexOf(".search")!==-1||(this.set("searchText",""),this.set("progressMessage","Searching for "+n+". Please wait..."),this.showProgressModal(),this.transitionToRoute(this.searchRoute+"/"+n))}},navAction:function(e){this.currentOpenNav&&this.currentOpenNav.route!==e.route&&this.currentOpenNav.closeSubnav(),this.currentOpenNav=e,this.transitionToRoute(e.route),this.set("isShowingSettings",!1)},toggleSettings:function(){this.toggleProperty("isShowingSettings")},closeSettings:function(){this.set("isShowingSettings",!1)}}})}),define("hospitalrun/custom-form-add/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember"],function(e,t,n){var a=n.default.computed,l=n.default.isEmpty;e.default=t.default.extend({updateAction:"addForm",actions:{addForm:function(){var e=this.get("model.modelToAddTo"),t=e.get("customForms"),a=this.get("model.selectedForm");l(t)&&(t=n.default.Object.create(),e.set("customForms",t)),t.set(a,n.default.Object.create()),e.notifyPropertyChange("customForms"),this.send("closeModal")}},isUpdateDisabled:a("model.selectedForm",function(){return l(this.get("model.selectedForm"))})})}),define("hospitalrun/custom-form-add/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"jaecxfpb",block:'{"statements":[["block",["modal-dialog"],null,[["cancelAction","isUpdateDisabled","title","updateButtonAction","updateButtonText"],["closeModal",["get",["isUpdateDisabled"]],["helper",["t"],["customForms.titles.addCustomForm"],null],"addForm",["helper",["t"],["customForms.buttons.addForm"],null]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["em-select"],null,[["label","property","content","prompt"],[["helper",["t"],["customForms.labels.formToAdd"],null],"selectedForm",["get",["model","customForms"]]," "]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/custom-form-add/template.hbs"}})}),define("hospitalrun/diagnosis/edit/controller",["exports","ember","hospitalrun/controllers/abstract-edit-controller"],function(e,t,n){var a=t.default.computed;e.default=n.default.extend({updateCapability:"add_diagnosis",editController:t.default.computed.alias("model.editController"),diagnosisList:t.default.computed.alias("editController.diagnosisList"),newDiagnosis:!1,lookupListsToUpdate:[{name:"diagnosisList",property:"model.diagnosis",id:"diagnosis_list"}],additionalButtons:a("model.isNew",function(){var e=this.get("i18n"),t=this.get("model.isNew");if(!t)return[{class:"btn btn-default warning",buttonAction:"deleteDiagnosis",buttonIcon:"octicon octicon-x",buttonText:e.t("buttons.delete")}]}),canDeleteDiagnosis:a(function(){return this.currentUserCan("delete_diagnosis")}),title:a("model.isNew",function(){var e=this.get("i18n"),t=this.get("model.isNew");return t?e.t("diagnosis.titles.addDiagnosis"):e.t("diagnosis.titles.editDiagnosis")}),afterUpdate:function(e){var t=this.get("newDiagnosis");t?this.get("editController").send("addDiagnosis",e):this.send("closeModal")},beforeUpdate:function(){var e=this.get("model");return this.set("newDiagnosis",e.get("isNew")),t.default.RSVP.Promise.resolve()},actions:{cancel:function(){this.send("closeModal")},deleteDiagnosis:function(){var e=this.get("model");this.get("editController").send("deleteDiagnosis",e)}}})}),define("hospitalrun/diagnosis/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"i1WyGKMG",block:'{"statements":[["block",["modal-dialog"],null,[["additionalButtons","hideCancelButton","isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["additionalButtons"]],["get",["hideCancelButton"]],["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],4]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["helper",["t"],["diagnosis.labels.activeDiagnosis"],null],"active","col-sm-4"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["diagnosis.labels.diagnosis"],null],false],["close-element"],["text","\\n "],["open-element","div",[]],["flush-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","diagnosis"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","hint","class"],["diagnosis",["helper",["t"],["diagnosis.labels.diagnosis"],null],["get",["diagnosisList"]],false,"diagnosis-text required"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model","isNew"]]],null,2,1],["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["date",["helper",["t"],["diagnosis.labels.date"],null],"col-sm-4 required"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["helper",["t"],["diagnosis.labels.secondaryDiagnosis"],null],"secondaryDiagnosis","col-sm-4 secondary-diagnosis"]]],false],["text","\\n"],["block",["unless"],[["get",["model","isNew"]]],null,0],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],3]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/diagnosis/edit/template.hbs"}})}),define("hospitalrun/dialog/controller",["exports","ember"],function(e,t){var n=t.default.computed,a=t.default.get,l=t.default.isEmpty;e.default=t.default.Controller.extend({showUpdateButton:!0,isUpdateDisabled:!1,cancelAction:n("model.cancelAction",function(){var e=a(this,"model.cancelAction");return l(e)&&(e="cancel"),e}),actions:{cancel:function(){this.send("closeModal")},confirm:function(){var e=this.getWithDefault("model.confirmAction","model.confirm");this.send(e,a(this,"model")),this.send("closeModal")},ok:function(){var e=a(this,"model.okAction"),t=a(this,"model.okContext");l(t)&&(t=a(this,"model")),l(e)||this.send(e,t),this.send("closeModal")}}})}),define("hospitalrun/dialog/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"CVjH3ZEN",block:'{"statements":[["block",["modal-dialog"],null,[["cancelAction","hideCancelButton","hideUpdateButton","isUpdateDisabled","title","updateButtonAction","updateButtonText","cancelButtonText"],[["get",["cancelAction"]],["get",["model","hideCancelButton"]],["get",["model","hideUpdateButton"]],["get",["model","isUpdateDisabled"]],["get",["model","title"]],["get",["model","updateButtonAction"]],["get",["model","updateButtonText"]],["get",["model","cancelButtonText"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","progress"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","progress-bar progress-bar-striped active"],["static-attr","role","progressbar"],["dynamic-attr","aria-valuenow",["unknown",["model","progressBarValue"]],null],["static-attr","aria-valuemin","0"],["static-attr","aria-valuemax","100"],["dynamic-attr","style",["unknown",["model","progressBarStyle"]],null],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","sr-only"],["flush-element"],["append",["helper",["t"],["loading.progressBar.progress"],[["progressBarValue"],[["get",["model","progressBarValue"]]]]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model","showProgress"]]],null,0],["text"," "],["append",["unknown",["model","message"]],false],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/dialog/template.hbs"}})}),define("hospitalrun/finishgauth/route",["exports","ember","hospitalrun/mixins/setup-user-role"],function(e,t,n){e.default=t.default.Route.extend(n.default,{config:t.default.inject.service(),database:t.default.inject.service(),session:t.default.inject.service(),model:function(e){var t=this;if(e.k&&e.s1&&e.s2&&e.t){var n=function(){t.get("session").authenticate("authenticator:custom",{google_auth:!0,params:e});var n={config_consumer_key:e.k,config_consumer_secret:e.s1,config_oauth_token:e.t,config_token_secret:e.s2};return{v:t.get("config").saveOauthConfigs(n).then(function(){var e=this;return n.config_use_google_auth=!0,this.get("database").setup(n).then(function(){return e.setupUserRole()})}.bind(t))}}();if("object"==typeof n)return n.v}}})}),define("hospitalrun/helpers/and",["exports","ember","ember-truth-helpers/helpers/and"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.andHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.andHelper)),e.default=a}),define("hospitalrun/helpers/app-version",["exports","ember","hospitalrun/config/environment"],function(e,t,n){function a(){return l}e.appVersion=a;var l=n.default.APP.version;e.default=t.default.Helper.helper(a)}),define("hospitalrun/helpers/date-format",["exports","ember","moment"],function(e,t,n){var a=function(){function e(e,t){var n=[],a=!0,l=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,s=e}finally{try{!a&&o.return&&o.return()}finally{if(l)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=t.default.Helper.helper(function(e,l){if(!t.default.isEmpty(e[0])){var s="l",i=a(e,1),o=i[0];return l&&l.format&&(s=l.format),(0,n.default)(o).format(s)}})}),define("hospitalrun/helpers/eq",["exports","ember","ember-truth-helpers/helpers/equal"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.equalHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.equalHelper)),e.default=a}),define("hospitalrun/helpers/gt",["exports","ember","ember-truth-helpers/helpers/gt"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.gtHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.gtHelper)),e.default=a}),define("hospitalrun/helpers/gte",["exports","ember","ember-truth-helpers/helpers/gte"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.gteHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.gteHelper)),e.default=a}),define("hospitalrun/helpers/html-line-break",["exports","ember"],function(e,t){var n=function(){function e(e,t){var n=[],a=!0,l=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,s=e}finally{try{!a&&o.return&&o.return()}finally{if(l)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=t.default.Helper.helper(function(e){var a=n(e,1),l=a[0];return null!==l&&"undefined"!=typeof l?t.default.String.htmlSafe(l.replace(/\n/g,"
")):null})}),define("hospitalrun/helpers/is-array",["exports","ember","ember-truth-helpers/helpers/is-array"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.isArrayHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.isArrayHelper)),e.default=a}),define("hospitalrun/helpers/is-equal-array",["exports","ember"],function(e,t){var n=function(){function e(e,t){var n=[],a=!0,l=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,s=e}finally{try{!a&&o.return&&o.return()}finally{if(l)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=t.default.Helper.helper(function(e){var a=n(e,2),l=a[0],s=a[1];return!(!t.default.isArray(l)||!t.default.isArray(s)||l.get("length")!==s.get("length"))&&l.every(function(e){return s.includes(e)})})}),define("hospitalrun/helpers/is-equal-by-path",["exports","ember"],function(e,t){var n=function(){function e(e,t){var n=[],a=!0,l=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,s=e}finally{try{!a&&o.return&&o.return()}finally{if(l)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=t.default.Helper.helper(function(e){var a=n(e,3),l=a[0],s=a[1],i=a[2];return i?t.default.get(l,i)===s:l===s})}),define("hospitalrun/helpers/is-equal",["exports","ember"],function(e,t){var n=function(){function e(e,t){var n=[],a=!0,l=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,s=e}finally{try{!a&&o.return&&o.return()}finally{if(l)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=t.default.Helper.helper(function(e){var t=n(e,2),a=t[0],l=t[1];return a===l})}),define("hospitalrun/helpers/is-not",["exports","ember"],function(e,t){var n=function(){function e(e,t){var n=[],a=!0,l=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,s=e}finally{try{!a&&o.return&&o.return()}finally{if(l)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=t.default.Helper.helper(function(e){var t=n(e,1),a=t[0];return!a})}),define("hospitalrun/helpers/lt",["exports","ember","ember-truth-helpers/helpers/lt"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.ltHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.ltHelper)),e.default=a}),define("hospitalrun/helpers/lte",["exports","ember","ember-truth-helpers/helpers/lte"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.lteHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.lteHelper)),e.default=a}),define("hospitalrun/helpers/not-eq",["exports","ember","ember-truth-helpers/helpers/not-equal"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.notEqualHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.notEqualHelper)),e.default=a}),define("hospitalrun/helpers/not",["exports","ember","ember-truth-helpers/helpers/not"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.notHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.notHelper)),e.default=a}),define("hospitalrun/helpers/number-format",["exports","ember","hospitalrun/mixins/number-format"],function(e,t,n){var a=function(){function e(e,t){var n=[],a=!0,l=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,s=e}finally{try{!a&&o.return&&o.return()}finally{if(l)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=t.default.Object.extend(n.default);e.default=t.default.Helper.helper(function(e){var t=a(e,1),n=t[0],s=new l;return s._numberFormat(n)})}),define("hospitalrun/helpers/or",["exports","ember","ember-truth-helpers/helpers/or"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.orHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.orHelper)),e.default=a}),define("hospitalrun/helpers/pluralize",["exports","ember-inflector/lib/helpers/pluralize"],function(e,t){e.default=t.default}),define("hospitalrun/helpers/read-path",["exports","ember"],function(e,t){var n=function(){function e(e,t){var n=[],a=!0,l=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,s=e}finally{try{!a&&o.return&&o.return()}finally{if(l)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=t.default.Helper.helper(function(e){var a=n(e,2),l=a[0],s=a[1];return t.default.isEmpty(s)?l:t.default.get(l,s)})}),define("hospitalrun/helpers/singularize",["exports","ember-inflector/lib/helpers/singularize"],function(e,t){e.default=t.default}),define("hospitalrun/helpers/t",["exports","ember-i18n/helper"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/helpers/xor",["exports","ember","ember-truth-helpers/helpers/xor"],function(e,t,n){var a=null;t.default.Helper?a=t.default.Helper.helper(n.xorHelper):t.default.HTMLBars.makeBoundHelper&&(a=t.default.HTMLBars.makeBoundHelper(n.xorHelper)),e.default=a}),define("hospitalrun/imaging/charge/controller",["exports","hospitalrun/procedures/charge/controller","ember"],function(e,t,n){e.default=t.default.extend({cancelAction:"closeModal",newPricingItem:!1,requestingController:n.default.inject.controllers("imaging/edit"),pricingList:n.default.computed.alias("requestingController.chargesPricingList")})}),define("hospitalrun/imaging/charge/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"bkPMKXlR",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["partial","procedures/charge"],["text","\\n"]],"locals":[]}],"hasPartials":true}',meta:{moduleName:"hospitalrun/imaging/charge/template.hbs"}})}),define("hospitalrun/imaging/completed/completed-list-item/component",["exports","ember"],function(e,t){e.default=t.default.Component.extend({tagName:"tr"})}),define("hospitalrun/imaging/completed/completed-list-item/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"mAPPy+fo",block:'{"statements":[["open-element","td",[]],["static-attr","class","requested-date"],["flush-element"],["append",["helper",["date-format"],[["get",["imaging","requestedDate"]]],null],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","imaging-date"],["flush-element"],["append",["helper",["date-format"],[["get",["imaging","imagingDate"]]],null],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","requested-by"],["flush-element"],["append",["unknown",["imaging","requestedBy"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","display-name"],["flush-element"],["append",["unknown",["imaging","patient","displayName"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","type"],["flush-element"],["append",["unknown",["imaging","imagingType","name"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","results"],["flush-element"],["append",["unknown",["imaging","result"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","notes"],["flush-element"],["append",["unknown",["imaging","notes"]],false],["close-element"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[],"hasPartials":false}',meta:{moduleName:"hospitalrun/imaging/completed/completed-list-item/template.hbs"}})}),define("hospitalrun/imaging/completed/controller",["exports","hospitalrun/controllers/abstract-paged-controller"],function(e,t){e.default=t.default.extend({startKey:[],showActions:!1})}),define("hospitalrun/imaging/completed/route",["exports","ember-i18n","hospitalrun/imaging/index/route"],function(e,t,n){e.default=n.default.extend({pageTitle:(0,t.translationMacro)("imaging.titles.completedImaging"),searchStatus:"Completed"})}),define("hospitalrun/imaging/completed/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"Rfh3vstr",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],3]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["imaging.messages.noCompleted"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["imaging/completed/completed-list-item"],null,[["imaging"],[["get",["imaging"]]]]],false],["text","\\n"]],"locals":["imaging"]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table imaging-completed-table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.dateRequested"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.dateCompleted"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.patient"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.imagingType"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.results"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.notes"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,1],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model"]]],null,2,0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/imaging/completed/template.hbs"}})}),define("hospitalrun/imaging/delete/controller",["exports","hospitalrun/controllers/abstract-delete-controller","hospitalrun/mixins/patient-submodule"],function(e,t,n){e.default=t.default.extend(n.default,{title:"Delete Request",actions:{delete:function(){this.deleteChildFromVisit("imaging")}}})}),define("hospitalrun/imaging/delete/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"9b0/J8uA",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-danger"],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-warning-sign"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["t"],["imaging.messages.delete"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/imaging/delete/template.hbs"}})}),define("hospitalrun/imaging/edit/controller",["exports","hospitalrun/controllers/abstract-edit-controller","hospitalrun/mixins/charge-actions","ember","hospitalrun/mixins/patient-submodule"],function(e,t,n,a,l){e.default=t.default.extend(n.default,l.default,{imagingController:a.default.inject.controller("imaging"),chargePricingCategory:"Imaging",chargeRoute:"imaging.charge",selectedImagingType:null,canComplete:function(){var e=this.get("model.isNew"),t=this.get("model.imagingTypeName"),n=this.get("selectedImagingType");return(!e||!(a.default.isEmpty(t)||a.default.isArray(n)&&n.length>1))&&this.currentUserCan("complete_imaging")}.property("selectedImagingType.[]","model.imagingTypeName"),actions:{completeImaging:function(){this.set("model.status","Completed"),this.get("model").validate().then(function(){this.get("model.isValid")&&(this.set("model.imagingDate",new Date),this.send("update"))}.bind(this)).catch(a.default.K)},update:function(){var e=this;this.get("model.isNew")?!function(){var t=e.get("model"),n=e.get("selectedImagingType");a.default.isEmpty(e.get("model.status"))&&e.set("model.status","Requested"),e.set("model.requestedBy",t.getUserName()),e.set("model.requestedDate",new Date),a.default.isEmpty(n)?e.saveNewPricing(e.get("model.imagingTypeName"),"Imaging","model.imagingType").then(function(){this.addChildToVisit(t,"imaging","Imaging").then(function(){this.saveModel()}.bind(this))}.bind(e)):e.getSelectedPricing("selectedImagingType").then(function(e){a.default.isArray(e)?this.createMultipleRequests(e,"imagingType","imaging","Imaging"):(this.set("model.imagingType",e),this.addChildToVisit(t,"imaging","Imaging").then(function(){this.saveModel()}.bind(this)))}.bind(e))}():this.saveModel()}},additionalButtons:function(){var e=this.get("i18n"),t=this.get("canComplete"),n=this.get("model.isValid");if(n&&t)return[{buttonAction:"completeImaging",buttonIcon:"glyphicon glyphicon-ok",class:"btn btn-primary on-white",buttonText:e.t("buttons.complete")}]}.property("canComplete","model.isValid"),lookupListsToUpdate:[{name:"radiologistList",property:"model.radiologist",id:"radiologists"}],pricingTypeForObjectType:"Imaging Procedure",pricingTypes:a.default.computed.alias("imagingController.imagingPricingTypes"),pricingList:null,radiologistList:a.default.computed.alias("imagingController.radiologistList"),updateCapability:"add_imaging",afterUpdate:function(e,t){var n=this.get("i18n");this.updateLookupLists();var a=void 0,l=void 0,s=void 0;"Completed"===this.get("model.status")?(l=n.t("imaging.alerts.completedTitle"),s=n.t("imaging.alerts.completedMessage")):(l=n.t("imaging.alerts.savedTitle"),s=n.t("imaging.alerts.savedMessage")), +t&&(a=this.get("cancelAction")),this.saveVisitIfNeeded(l,s,a),this.set("model.selectPatient",!1)}})}),define("hospitalrun/imaging/edit/route",["exports","ember-i18n","hospitalrun/routes/abstract-edit-route","hospitalrun/mixins/charge-route","ember","moment","hospitalrun/mixins/patient-list-route"],function(e,t,n,a,l,s,i){e.default=n.default.extend(a.default,i.default,{editTitle:(0,t.translationMacro)("imaging.titles.editTitle"),modelName:"imaging",newTitle:(0,t.translationMacro)("imaging.titles.editTitle"),pricingCategory:"Imaging",actions:{returnToAllItems:function(){this.controller.send("returnToAllItems")}},getNewData:function(){return l.default.RSVP.resolve({selectPatient:!0,requestDate:(0,s.default)().startOf("day").toDate()})}})}),define("hospitalrun/imaging/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"FpG92j1s",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],6]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","prompt","class"],["radiologist",["helper",["t"],["imaging.labels.radiologist"],null],["get",["radiologistList"]]," ","radiologist-input"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["result",["helper",["t"],["labels.result"],null],"result-input"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-xs-3"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.visit"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","visit","visitDate"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-xs-9"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.imagingType"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","imagingType","name"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-xs-12"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","requestedBy"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content","optionValuePath","optionLabelPath","prompt","selected"],["col-xs-3 required",["helper",["t"],["labels.visit"],null],"visit",["get",["patientVisitsForSelect"]],"selectObject","selectObject.visitDescription",["helper",["t"],["imaging.labels.addNewVisit"],null],["get",["model","visit"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["checkbox-or-typeahead"],null,[["property","label","list","selection","optionLabelPath","typeAheadType","className","prompt","model","class"],["imagingTypeName",["helper",["t"],["labels.imagingType"],null],["get",["objectTypeList"]],["get",["selectedImagingType"]],"name","pricing","required"," ",["get",["model"]],"imaging-type-input"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-summary"],null,[["patient","returnTo","returnToContext","disablePatientLink"],[["get",["model","patient"]],"imaging.edit",["get",["model","id"]],["get",["model","isNew"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-typeahead"],null,[["property","label","content","selection","class"],["patientTypeAhead",["helper",["t"],["labels.patient"],null],["get",["patientList"]],["get",["selectedPatient"]],"required patient-input"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model","selectPatient"]]],null,4,3],["block",["if"],[["get",["model","isNew"]]],null,2,1],["block",["if"],[["get",["canComplete"]]],null,0],["text"," "],["append",["helper",["em-text"],null,[["property","label","rows"],["notes",["helper",["t"],["labels.notes"],null],3]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],5]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/imaging/edit/template.hbs"}})}),define("hospitalrun/imaging/index/controller",["exports","hospitalrun/controllers/abstract-paged-controller","hospitalrun/mixins/user-session"],function(e,t,n){e.default=t.default.extend(n.default,{startKey:[],addPermission:"add_imaging"})}),define("hospitalrun/imaging/index/imaging-edit-button/component",["exports","ember"],function(e,t){e.default=t.default.Component.extend({tagName:"button",classNames:["btn","btn-default","neutral"]})}),define("hospitalrun/imaging/index/imaging-edit-button/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"fgj2GO/M",block:'{"statements":[["block",["link-to"],["imaging.edit",["get",["imaging"]]],null,0],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["append",["helper",["t"],["labels.edit"],null],false]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/imaging/index/imaging-edit-button/template.hbs"}})}),define("hospitalrun/imaging/index/requested-list-item/component",["exports","ember"],function(e,t){e.default=t.default.Component.extend({tagName:"tr",classNames:["clickable"],click:function(){this.sendAction("action",this.imaging)}})}),define("hospitalrun/imaging/index/requested-list-item/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"JWG9328s",block:'{"statements":[["open-element","td",[]],["static-attr","class","date"],["flush-element"],["append",["helper",["date-format"],[["get",["imaging","requestedDate"]]],[["format"],["l h:mm A"]]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","requested-by"],["flush-element"],["append",["unknown",["imaging","requestedBy"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","patient"],["flush-element"],["append",["unknown",["imaging","patient","displayName"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","type"],["flush-element"],["append",["unknown",["imaging","imagingType","name"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","notes"],["flush-element"],["append",["unknown",["imaging","notes"]],false],["close-element"],["text","\\n\\n"],["block",["if"],[["get",["showActions"]]],null,1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["imaging/index/imaging-edit-button"],null,[["imaging"],[["get",["imaging"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["canEdit"]]],null,0],["text"," "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/imaging/index/requested-list-item/template.hbs"}})}),define("hospitalrun/imaging/index/route",["exports","ember-i18n","hospitalrun/routes/abstract-index-route"],function(e,t,n){e.default=n.default.extend({modelName:"imaging",pageTitle:(0,t.translationMacro)("imaging.pageTitle"),searchStatus:"Requested",_getStartKeyFromItem:function(e){var t=e.get("imagingDateAsTime"),n=this._getPouchIdFromItem(e),a=e.get("requestedDateAsTime"),l=this.get("searchStatus");return[l,a,t,n]},_modelQueryParams:function(){var e=this._getMaxPouchId(),t=this.get("maxValue"),n=this._getMinPouchId(),a=this.get("searchStatus");return{options:{startkey:[a,null,null,n],endkey:[a,t,t,e]},mapReduce:"imaging_by_status"}}})}),define("hospitalrun/imaging/index/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"bA1O68vE",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],5]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","a",[]],["static-attr","href","#"],["modifier",["action"],[["get",[null]],"newItem"]],["flush-element"],["append",["helper",["t"],["messages.createNewRecord"],null],false],["close-element"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["messages.noItemsFound"],null],false],["text"," "],["block",["if"],[["get",["canAdd"]]],null,0],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["imaging/index/requested-list-item"],null,[["imaging","action","showActions","canEdit"],[["get",["imaging"]],"editItem",["get",["showActions"]],["get",["canEdit"]]]]],false],["text","\\n"]],"locals":["imaging"]},{"statements":[["text"," "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.dateRequested"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.patient"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.imagingType"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.notes"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["showActions"]]],null,3],["text"," "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,2],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["hasRecords"]]],null,4,1]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/imaging/index/template.hbs"}})}),define("hospitalrun/imaging/route",["exports","ember-i18n","hospitalrun/routes/abstract-module-route"],function(e,t,n){e.default=n.default.extend({addCapability:"add_imaging",additionalModels:[{name:"imagingPricingTypes",findArgs:["lookup","imaging_pricing_types"]},{name:"radiologistList",findArgs:["lookup","radiologists"]}],allowSearch:!1,moduleName:"imaging",newButtonText:(0,t.translationMacro)("imaging.buttons.newButton"),sectionTitle:(0,t.translationMacro)("imaging.sectionTitle")})}),define("hospitalrun/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","hospitalrun/config/environment"],function(e,t,n){var a=n.default.APP,l=a.name,s=a.version;e.default={name:"App Version",initialize:(0,t.default)(l,s)}}),define("hospitalrun/initializers/container-debug-adapter",["exports","ember-resolver/container-debug-adapter"],function(e,t){e.default={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0];e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("hospitalrun/initializers/data-adapter",["exports","ember"],function(e,t){e.default={name:"data-adapter",before:"store",initialize:t.default.K}}),define("hospitalrun/initializers/ember-data",["exports","ember-data/setup-container","ember-data/-private/core"],function(e,t,n){e.default={name:"ember-data",initialize:t.default}}),define("hospitalrun/initializers/ember-i18n",["exports","ember-i18n/initializers/ember-i18n"],function(e,t){e.default=t.default}),define("hospitalrun/initializers/ember-keyboard-first-responder-inputs",["exports","ember-keyboard/initializers/ember-keyboard-first-responder-inputs"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"initialize",{enumerable:!0,get:function(){return t.initialize}})}),define("hospitalrun/initializers/ember-simple-auth",["exports","ember","hospitalrun/config/environment","ember-simple-auth/configuration","ember-simple-auth/initializers/setup-session","ember-simple-auth/initializers/setup-session-service"],function(e,t,n,a,l,s){e.default={name:"ember-simple-auth",initialize:function(e){var t=n.default["ember-simple-auth"]||{};t.baseURL=n.default.baseURL,a.default.load(t),(0,l.default)(e),(0,s.default)(e)}}}),define("hospitalrun/initializers/export-application-global",["exports","ember","hospitalrun/config/environment"],function(e,t,n){function a(){var e=arguments[1]||arguments[0];if(n.default.exportApplicationGlobal!==!1){var a;if("undefined"!=typeof window)a=window;else if("undefined"!=typeof global)a=global;else{if("undefined"==typeof self)return;a=self}var l,s=n.default.exportApplicationGlobal;l="string"==typeof s?s:t.default.String.classify(n.default.modulePrefix),a[l]||(a[l]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete a[l]}}))}}e.initialize=a,e.default={name:"export-application-global",initialize:a}}),define("hospitalrun/initializers/i18n",["exports"],function(e){e.default={name:"i18n",after:"ember-i18n",initialize:function(e){e.inject("route","i18n","service:i18n"),e.inject("controller","i18n","service:i18n"),e.inject("mixin","i18n","service:i18n"),e.inject("model","i18n","service:i18n")}}}),define("hospitalrun/initializers/injectStore",["exports","ember"],function(e,t){e.default={name:"injectStore",before:"store",initialize:t.default.K}}),define("hospitalrun/initializers/store",["exports","ember"],function(e,t){e.default={name:"store",after:"ember-data",initialize:t.default.K}}),define("hospitalrun/initializers/transforms",["exports","ember"],function(e,t){e.default={name:"transforms",before:"store",initialize:t.default.K}}),define("hospitalrun/initializers/truth-helpers",["exports","ember","ember-truth-helpers/utils/register-helper","ember-truth-helpers/helpers/and","ember-truth-helpers/helpers/or","ember-truth-helpers/helpers/equal","ember-truth-helpers/helpers/not","ember-truth-helpers/helpers/is-array","ember-truth-helpers/helpers/not-equal","ember-truth-helpers/helpers/gt","ember-truth-helpers/helpers/gte","ember-truth-helpers/helpers/lt","ember-truth-helpers/helpers/lte"],function(e,t,n,a,l,s,i,o,r,d,c,u,p){function m(){t.default.Helper||((0,n.registerHelper)("and",a.andHelper),(0,n.registerHelper)("or",l.orHelper),(0,n.registerHelper)("eq",s.equalHelper),(0,n.registerHelper)("not",i.notHelper),(0,n.registerHelper)("is-array",o.isArrayHelper),(0,n.registerHelper)("not-eq",r.notEqualHelper),(0,n.registerHelper)("gt",d.gtHelper),(0,n.registerHelper)("gte",c.gteHelper),(0,n.registerHelper)("lt",u.ltHelper),(0,n.registerHelper)("lte",p.lteHelper))}e.initialize=m,e.default={name:"truth-helpers",initialize:m}}),define("hospitalrun/instance-initializers/ember-data",["exports","ember-data/-private/instance-initializers/initialize-store-service"],function(e,t){e.default={name:"ember-data",initialize:t.default}}),define("hospitalrun/instance-initializers/ember-i18n",["exports","ember-i18n/instance-initializers/ember-i18n"],function(e,t){e.default=t.default});define("hospitalrun/instance-initializers/ember-simple-auth",["exports","ember-simple-auth/instance-initializers/setup-session-restoration"],function(e,t){e.default={name:"ember-simple-auth",initialize:function(e){(0,t.default)(e)}}});define("hospitalrun/inventory/adjust/controller",["exports","hospitalrun/controllers/abstract-edit-controller","hospitalrun/mixins/inventory-adjustment-types","ember","ember-i18n"],function(e,t,n,a,l){e.default=t.default.extend(n.default,{inventoryController:a.default.inject.controller("inventory"),expenseAccountList:a.default.computed.alias("inventoryController.expenseAccountList"),title:(0,l.translationMacro)("inventory.titles.adjustment"),transactionTypeChanged:function(){a.default.run.once(this,function(){this.get("model").validate().catch(a.default.K)})}.observes("transactionType"),updateButtonText:function(){return this.get("model.transactionType")}.property("model.transactionType"),updateButtonAction:"adjust",updateCapability:"adjust_inventory_location",actions:{cancel:function(){this.send("closeModal")},adjust:function(){this.send("adjustItems",this.get("model"),!0)}}})}),define("hospitalrun/inventory/adjust/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"9dBN/TFf",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.item"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","adjustmentItem","name"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.adjustmentFor"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","locationName"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.currentQuantity"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","quantity"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content","optionValuePath","optionLabelPath"],["col-sm-4",["helper",["t"],["inventory.labels.adjustmentType"],null],"transactionType",["get",["adjustmentTypes"]],"type","name"]]],false],["text","\\n "],["append",["helper",["number-input"],null,[["property","label","class"],["adjustmentQuantity",["helper",["t"],["labels.quantity"],null],"col-sm-3 required"]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-text"],null,[["label","property","rows"],[["helper",["t"],["inventory.labels.reason"],null],"reason",3]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["dateCompleted",["helper",["t"],["inventory.labels.adjustmentDate"],null],"col-sm-4 required"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","class"],["expenseAccount",["helper",["t"],["inventory.labels.expense"],null],["get",["expenseAccountList"]],["get",["model","expenseAccount"]],"col-sm-8"]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/inventory/adjust/template.hbs"}})}),define("hospitalrun/inventory/barcode/controller",["exports","ember"],function(e,t){e.default=t.default.Controller.extend({selectedPrinter:null,barcodeUri:function(){var e=this.get("model.id"),n=this.get("model.name");return t.default.$(document).JsBarcode(e,{width:1,height:20,fontSize:10,displayValue:n,returnUri:!0})}.property("model.id","model.name"),printers:function(){return dymo.label.framework.getTapePrinters()}.property(),havePrinters:function(){var e=this.get("printers");return e.length>0}.property("printers"),singlePrinter:function(){var e=this.get("printers");return 1===e.length}.property("printers"),actions:{print:function(){var e=this.get("barcodeUri"),n=this.get("selectedPrinter");n||(n=this.get("printers")[0].name),t.default.$.get("/dymo/BarcodeAsImage.label",function(t){var a=dymo.label.framework.openLabelXml(t),l=e.substr("data:image/png;base64,".length);a.setObjectText("Image",l),a.print(n)},"text")}}})}),define("hospitalrun/inventory/barcode/route",["exports","ember"],function(e,t){e.default=t.default.Route.extend({model:function(e){return this.store.find("inventory",e.inventory_id)}})}),define("hospitalrun/inventory/barcode/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"PD6MlfyD",block:'{"statements":[["open-element","div",[]],["static-attr","class","panel panel-default"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n "],["open-element","img",[]],["dynamic-attr","src",["unknown",["barcodeUri"]],null],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["close-element"],["text","\\n\\n"],["block",["if"],[["get",["havePrinters"]]],null,1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","label",[]],["static-attr","for","printerSelect"],["flush-element"],["append",["helper",["t"],["inventory.labels.printer"],null],false],["close-element"],["text","\\n "],["append",["helper",["select-list"],null,[["content","optionLabelPath","optionValuePath","value","class","action","id"],[["get",["printers"]],"name","name",["get",["selectedPrinter"]],"form-control",["helper",["action"],[["get",[null]],["helper",["mut"],[["get",["selectedPrinter"]]],null]],null],"printerSelect"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["append",["helper",["t"],["inventory.labels.printBarcode"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n"],["block",["unless"],[["get",["singlePrinter"]]],null,0],["text"," "],["close-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-primary"],["modifier",["action"],[["get",[null]],"print"]],["flush-element"],["open-element","span",[]],["static-attr","class"," glyphicon glyphicon-print"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["inventory.labels.print"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/inventory/barcode/template.hbs"}})}),define("hospitalrun/inventory/batch/controller",["exports","hospitalrun/controllers/abstract-edit-controller","hospitalrun/mixins/inventory-id","hospitalrun/mixins/inventory-locations","ember","ember-i18n"],function(e,t,n,a,l,s){e.default=t.default.extend(n.default,a.default,{doingUpdate:!1,inventoryController:l.default.inject.controller("inventory"),inventoryItems:null,warehouseList:l.default.computed.alias("inventoryController.warehouseList"),aisleLocationList:l.default.computed.alias("inventoryController.aisleLocationList"),vendorList:l.default.computed.alias("inventoryController.vendorList"),purchaseAttributes:["expirationDate","inventoryItem","lotNumber","purchaseCost","quantity","vendorItemNo"],inventoryList:function(){var e=this.get("inventoryItems");if(!l.default.isEmpty(e)){var t=e.map(function(e){return e.doc});return t}}.property("inventoryItems.[]"),lookupListsToUpdate:[{name:"aisleLocationList",property:"model.aisleLocation",id:"aisle_location_list"},{name:"vendorList",property:"model.vendor",id:"vendor_list"},{name:"warehouseList",property:"model.location",id:"warehouse_list"}],showDistributionUnit:function(){return this._haveValidInventoryItem()}.property("model.inventoryItemTypeAhead","model.inventoryItem"),showInvoiceItems:function(){var e=this.get("model.invoiceItems");return!l.default.isEmpty(e)}.property("model.invoiceItems.[]"),totalReceived:function(){var e=this.get("model.invoiceItems"),t=0;l.default.isEmpty("invoiceItems")||(t=e.reduce(function(e,t){return e+Number(t.get("purchaseCost"))},t));var n=this.get("model.purchaseCost");return this.get("model.isValid")&&!l.default.isEmpty(n)&&(t+=Number(n)),t}.property("model.invoiceItems.[].purchaseCost","model.isValid","model.purchaseCost"),updateButtonText:(0,s.translationMacro)("inventory.labels.save"),updateCapability:"add_inventory_item",_addNewInventoryItem:function(){this.generateId().then(function(e){var t=this.store.createRecord("inventory",{id:e,name:this.get("model.inventoryItemTypeAhead"),quantity:0,skipSavePurchase:!0});this.send("openModal","inventory.quick-add",t)}.bind(this))},_addInventoryItem:function(){var e=this.get("model"),t=this.get("model.inventoryItemTypeAhead"),n=this.get("model.purchaseCost"),a=this.get("model.quantity");return e.validate().then(function(){if(!this.get("model.isValid")||l.default.isEmpty(t)||l.default.isEmpty(a)||l.default.isEmpty(n))throw Error("invalid");return this._haveValidInventoryItem()?void this._addInvoiceItem():(this._addNewInventoryItem(),!0)}.bind(this)).catch(function(){this.displayAlert(this.get("i18n").t("inventory.titles.warning"),this.get("i18n").t("inventory.messages.warning"))}.bind(this))},_addInvoiceItem:function(){var e=this.get("model"),t=e.get("invoiceItems"),n=e.getProperties(this.get("purchaseAttributes")),a=l.default.Object.create(n);t.addObject(a),e.set("expirationDate"),e.set("inventoryItem"),e.set("inventoryItemTypeAhead"),e.set("lotNumber"),e.set("purchaseCost"),e.set("quantity"),e.set("selectedInventoryItem"),e.set("vendorItemNo")},_findInventoryItem:function(e){var t=this.get("model.invoiceItems"),n=e.get("inventoryItem");if(!l.default.isEmpty(n)){var a=t.find(function(e){return e.get("inventoryItem.id")===n},this);if(!l.default.isEmpty(a))return a.get("inventoryItem")}},_haveValidInventoryItem:function(){var e=this.get("model.inventoryItemTypeAhead"),t=this.get("model.inventoryItem");if(l.default.isEmpty(e)||l.default.isEmpty(t))return!1;var n=t.get("name"),a=e.substr(0,n.length);return a===n},_savePurchases:function(){var e=this.get("model"),t=e.getProperties(["dateReceived","vendor","invoiceNo","location","aisleLocation","giftInKind"]),n=e.get("invoiceItems"),a=void 0,s=[];n.forEach(function(e){var n=e.get("inventoryItem"),l=e.get("quantity");a=this.store.createRecord("inv-purchase",t),a.setProperties(e.getProperties(this.get("purchaseAttributes"))),a.setProperties({distributionUnit:n.get("distributionUnit"),currentQuantity:l,originalQuantity:l,inventoryItem:n.get("id")}),s.push(a.save())}.bind(this)),l.default.RSVP.all(s).then(function(e){var t=[],n=[];e.forEach(function(e){var t=this._findInventoryItem(e),a=t.get("purchases");a.addObject(e),n.push(this.newPurchaseAdded(t,e))}.bind(this)),l.default.RSVP.all(t).then(function(){e.forEach(function(e){var n=this._findInventoryItem(e);n.updateQuantity(),t.push(n.save())}.bind(this)),l.default.RSVP.all(t).then(function(){this.updateLookupLists(),this.displayAlert(this.get("i18n").t("inventory.titles.purchaseSaved"),this.get("i18n").t("inventory.messages.purchaseSaved"),"allItems")}.bind(this))}.bind(this))}.bind(this))},actions:{addInventoryItem:function(){this._addInventoryItem()},addedNewInventoryItem:function(e){this.set("model.inventoryItem",e),this._addInvoiceItem(),this.send("closeModal"),this.get("doingUpdate")&&this._savePurchases()},removeItem:function(e){var t=this.get("model.invoiceItems"),n=e.itemToRemove;t.removeObject(n),this.send("closeModal")},showRemoveItem:function(e){var t=this.get("i18n").t("inventory.messages.removeItem"),n=l.default.Object.create({itemToRemove:e}),a=this.get("i18n").t("inventory.titles.removeItem");this.displayConfirm(a,t,"removeItem",n)},update:function(){this.set("doingUpdate",!0),this._addInventoryItem().then(function(e){e||this._savePurchases()}.bind(this))}}})}),define("hospitalrun/inventory/batch/route",["exports","hospitalrun/inventory/request/route","ember","ember-i18n"],function(e,t,n,a){e.default=t.default.extend({editTitle:(0,a.translationMacro)("navigation.subnav.inventoryReceived"),modelName:"inventory-batch",newTitle:(0,a.translationMacro)("navigation.subnav.inventoryReceived"),getNewData:function(){return n.default.RSVP.resolve({invoiceItems:[],dateReceived:new Date})},actions:{addedNewInventoryItem:function(e){this.controller.send("addedNewInventoryItem",e)}}})}),define("hospitalrun/inventory/batch/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"9T4fAteu",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],4]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-sm-2"],["flush-element"],["text","\\n "],["append",["unknown",["invoiceItem","inventoryItem","name"]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-sm-2"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","input-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["invoiceItem","quantity"]]]]],false],["text","\\n "],["open-element","span",[]],["static-attr","class","input-group-addon"],["flush-element"],["text","\\n "],["append",["unknown",["invoiceItem","inventoryItem","distributionUnit"]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-sm-2"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["invoiceItem","purchaseCost"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-sm-2"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["invoiceItem","vendorItemNo"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-sm-2"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["invoiceItem","lotNumber"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-sm-2"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","minDate","model"],["expirationDate","now",["get",["invoiceItem"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-sm-1"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showRemoveItem",["get",["invoiceItem"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["inventory.labels.remove"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["invoiceItem"]},{"statements":[["text"," "],["open-element","h3",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.invoiceItems"],null],false],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.name"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.quantity"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.cost"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.itemNumber"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.serialNumber"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.expirationDate"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.action"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","invoiceItems"]]],null,0],["text"," "],["close-element"],["text","\\n "],["open-element","h4",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.totalReceived"],[["total"],[["get",["totalReceived"]]]]],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","p",[]],["static-attr","class","form-control-static inventory-distribution-unit"],["flush-element"],["append",["unknown",["model","inventoryItem","distributionUnit"]],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["dateReceived",["helper",["t"],["inventory.labels.dateReceived"],null],"col-sm-4 required"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","className"],["vendor",["helper",["t"],["inventory.labels.vendor"],null],["get",["vendorList"]],["get",["model","vendor"]],"col-sm-4 required test-vendor"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["invoiceNo",["helper",["t"],["inventory.labels.invoiceNumber"],null],"col-sm-4 test-invoice-number"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group row"],["flush-element"],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","className"],["location",["helper",["t"],["inventory.labels.location"],null],["get",["warehouseList"]],["get",["model","location"]],"col-sm-5"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","className"],["aisleLocation",["helper",["t"],["inventory.labels.aisleLocation"],null],["get",["aisleLocationList"]],["get",["model","aisleLocation"]],"col-sm-5"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","col-sm-2 checkbox-label-space"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-check"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label sr-only"],["flush-element"],["append",["helper",["t"],["inventory.labels.gift"],null],false],["close-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["inventory.labels.gift"],null],"giftInKind"]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["append",["helper",["t"],["inventory.labels.invoiceLineItem"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["inventory-typeahead"],null,[["class","property","label","content","selection","showQuantity"],["col-sm-7 required test-inv-item","inventoryItemTypeAhead",["helper",["t"],["inventory.labels.inventoryItem"],null],["get",["inventoryList"]],["get",["selectedInventoryItem"]],false]]],false],["text","\\n "],["append",["helper",["number-input"],null,[["property","label","class"],["quantity",["helper",["t"],["labels.quantity"],null],"col-sm-2 required test-inv-quantity"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-sm-1"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.unit"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["showDistributionUnit"]]],null,2],["text"," "],["close-element"],["text","\\n "],["append",["helper",["number-input"],null,[["property","label","class"],["purchaseCost",["helper",["t"],["inventory.labels.purchaseCost"],null],"col-sm-2 required test-inv-cost"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["vendorItemNo",["helper",["t"],["inventory.labels.vendorItemNumber"],null],"col-sm-4"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["lotNumber",["helper",["t"],["inventory.labels.serialNumber"],null],"col-sm-4"]]],false],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","minDate","class"],["expirationDate",["helper",["t"],["inventory.labels.expirationDate"],null],"now","col-sm-2"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-sm-2"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["text"," "],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-primary"],["modifier",["action"],[["get",[null]],"addInventoryItem"]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["inventory.labels.add"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["model","invoiceItems"]]],null,1]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],3]],"locals":[]}],"hasPartials":false}', +meta:{moduleName:"hospitalrun/inventory/batch/template.hbs"}})}),define("hospitalrun/inventory/delete/controller",["exports","ember-i18n","hospitalrun/controllers/abstract-delete-controller"],function(e,t,n){e.default=n.default.extend({title:(0,t.translationMacro)("inventory.labels.deleteItem")})}),define("hospitalrun/inventory/delete/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"sUGbE9jt",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-danger"],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-warning-sign"],["flush-element"],["close-element"],["text"," \\n "],["append",["helper",["t"],["inventory.messages.delete"],[["name"],[["get",["model","name"]]]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/inventory/delete/template.hbs"}})}),define("hospitalrun/inventory/edit/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/mixins/inventory-locations","hospitalrun/mixins/inventory-type-list","hospitalrun/mixins/return-to","hospitalrun/mixins/unit-types","hospitalrun/mixins/user-session"],function(e,t,n,a,l,s,i,o){e.default=t.default.extend(a.default,l.default,s.default,i.default,o.default,{inventory:n.default.inject.controller(),savingNewItem:!1,canAddPurchase:function(){return this.currentUserCan("add_inventory_purchase")}.property(),canAdjustLocation:function(){return this.currentUserCan("adjust_inventory_location")},warehouseList:n.default.computed.alias("inventory.warehouseList"),aisleLocationList:n.default.computed.alias("inventory.aisleLocationList"),inventoryTypeList:n.default.computed.alias("inventory.inventoryTypeList.value"),inventoryUnitList:n.default.computed.alias("inventory.inventoryUnitList.value"),vendorList:n.default.computed.alias("inventory.vendorList"),database:n.default.inject.service(),lookupListsToUpdate:[{name:"aisleLocationList",property:"model.aisleLocation",id:"aisle_location_list"},{name:"vendorList",property:"model.vendor",id:"vendor_list"},{name:"warehouseList",property:"model.location",id:"warehouse_list"}],canEditQuantity:function(){return this.get("model.isNew")}.property("model.isNew"),haveTransactions:function(){var e=this.get("transactions");return null!==e}.property("transactions.[]"),locationQuantityTotal:function(){var e=this.get("model.locations"),t=e.reduce(function(e,t){return e+parseInt(t.get("quantity"))},0);return t}.property("model.locations"),quantityDiscrepency:function(){var e=this.get("locationQuantityTotal"),t=this.get("model.quantity");return!n.default.isEmpty(e)&&!n.default.isEmpty(t)&&e!==t}.property("locationQuantityTotal","model.quantity"),quantityDifferential:function(){var e=this.get("locationQuantityTotal"),t=this.get("model.quantity");return Math.abs(e-t)}.property("locationQuantityTotal","model.quantity"),originalQuantityUpdated:function(){var e=this.get("model.isNew"),t=this.get("model.originalQuantity");e&&!n.default.isEmpty(t)&&this.set("model.quantity",t)}.observes("model.isNew","model.originalQuantity"),showTransactions:function(){var e=this.get("transactions");return!n.default.isEmpty(e)}.property("transactions.[]"),transactions:null,updateCapability:"add_inventory_item",actions:{adjustItems:function(e){var t=parseInt(e.get("adjustmentQuantity")),n=this.get("model"),a=e.get("transactionType"),l=this.get("store").createRecord("inv-request",{adjustPurchases:!0,dateCompleted:e.get("dateCompleted"),expenseAccount:e.get("expenseAccount"),inventoryItem:n,quantity:t,transactionType:a,reason:e.get("reason"),deliveryAisle:e.get("aisleLocation"),deliveryLocation:e.get("location")});l.set("inventoryLocations",[e]);var s=!1;"Adjustment (Add)"!==a&&"Return"!==a||(s=!0),l.set("markAsConsumed",!0),l.get("inventoryItem").then(function(){this.send("fulfillRequest",l,!0,s,!0)}.bind(this))},editNewItem:function(){this.send("editItem",this.get("model.id"))},showAdjustment:function(e){e.setProperties({dateCompleted:new Date,adjustmentItem:this.get("model"),adjustmentQuantity:"",reason:"",transferItem:null,transactionType:"Adjustment (Add)"}),this.send("openModal","inventory.adjust",e)},showTransfer:function(e){e.set("adjustmentQuantity"),e.set("transferItem",this.get("model")),e.set("dateCompleted",new Date),this.send("openModal","inventory.transfer",e)},transferItems:function(e){var t=this.get("model"),n=this.get("store").createRecord("inv-request",{adjustPurchases:!1,dateCompleted:e.get("dateCompleted"),inventoryItem:t,quantity:e.get("adjustmentQuantity"),deliveryAisle:e.get("transferAisleLocation"),deliveryLocation:e.get("transferLocation"),transactionType:"Transfer"});this.transferToLocation(t,e).then(function(){e.setProperties({transferItem:null,transferLocation:null,transferAisleLocation:null,adjustmentQuantity:null}),n.set("locationsAffected",[{name:e.get("locationName"),quantity:n.get("quantity")}]),n.get("inventoryItem").then(function(){this._saveRequest(n)}.bind(this))}.bind(this))},updatePurchase:function(e,t){t&&(this.get("model").updateQuantity(),this.send("update",!0)),this.send("closeModal")}},_completeBeforeUpdate:function(e,t,a){var l=null,s=e.get("prefix"),i=[],o=this.get("model"),r=o.getProperties("aisleLocation","dateReceived","purchaseCost","lotNumber","expirationDate","giftInKind","invoiceNo","location","originalQuantity","quantityGroups","vendor","vendorItemNo"),d=this.get("model.originalQuantity");if(!n.default.isEmpty(d)){r.currentQuantity=d,r.inventoryItem=this.get("model.id");var c=this.get("store").createRecord("inv-purchase",r);i.push(c.save()),this.get("model.purchases").addObject(c),i.push(this.newPurchaseAdded(this.get("model"),c))}e.incrementProperty("value",1),l=e.get("value"),s+=l<1e5?String("00000"+l).slice(-5):l,o.set("friendlyId",s),i.push(e.save()),n.default.RSVP.all(i,"All before update done for inventory item").then(function(){t()},function(e){a(e)})},_findSequence:function(e,t,a){var l=new n.default.RSVP.Promise(function(t){this._checkNextSequence(t,e,0)}.bind(this));l.then(function(n){var l=this.get("store"),s=l.push(l.normalize("sequence",{id:"inventory_"+e,prefix:e.toLowerCase().substr(0,n),value:0}));this._completeBeforeUpdate(s,t,a)}.bind(this))},_findSequenceByPrefix:function(e,t){var n=this.get("database"),a={key:e.toLowerCase().substr(0,t)};return n.queryMainDB(a,"sequence_by_prefix")},_checkNextSequence:function(e,t,a){a++,this._findSequenceByPrefix(t,a).then(function(l){n.default.isEmpty(l.rows)?e(a):this._checkNextSequence(e,t,a)}.bind(this),function(){e(a)})},_saveRequest:function(e){e.set("status","Completed"),e.set("completedBy",e.getUserName()),e.save().then(function(){this.send("update",!0),this.send("closeModal"),this.getTransactions()}.bind(this))},getTransactions:function(){var e=this.get("model.id");this.set("transactions",null),this.store.query("inv-request",{options:{endkey:[e,"Completed",0],startkey:[e,"Completed",9999999999999],descending:!0},mapReduce:"inventory_request_by_item"}).then(function(e){this.set("transactions",e)}.bind(this))},beforeUpdate:function(){var e=this;if(!this.get("model.isNew"))return n.default.RSVP.Promise.resolve();var t=function(){var t=e.get("model"),a=t.get("inventoryType");return{v:new n.default.RSVP.Promise(function(e,n){t.validate().then(function(){t.get("isValid")?(this.set("savingNewItem",!0),this.store.find("sequence","inventory_"+a).then(function(t){this._completeBeforeUpdate(t,e,n)}.bind(this),function(){this._findSequence(a,e,n)}.bind(this))):(this.send("showDisabledDialog"),n("invalid model"))}.bind(this)).catch(function(){this.send("showDisabledDialog")}.bind(this))}.bind(e))}}();return"object"==typeof t?t.v:void 0},afterUpdate:function(){var e=null;this.get("savingNewItem")&&(e="editNewItem",this.set("savingNewItem",!1)),this.displayAlert("Inventory Item Saved","The inventory item has been saved.",e)}})}),define("hospitalrun/inventory/edit/route",["exports","hospitalrun/routes/abstract-edit-route","ember","ember-i18n","hospitalrun/mixins/inventory-id"],function(e,t,n,a,l){e.default=t.default.extend(l.default,{editTitle:(0,a.translationMacro)("inventory.labels.editItem"),modelName:"inventory",newTitle:(0,a.translationMacro)("inventory.labels.newItem"),actions:{adjustItems:function(e){this.controller.send("adjustItems",e)},doneFulfillRequest:function(){this.controller.getTransactions()},editNewItem:function(){this.controller.send("editNewItem")},transferItems:function(e){this.controller.send("transferItems",e)},updatePurchase:function(e,t){this.controller.send("updatePurchase",e,t)}},getNewData:function(){return n.default.RSVP.resolve({dateReceived:new Date,quantityGroups:[]})},setupController:function(e,t){this._super(e,t),e.getTransactions()}})}),define("hospitalrun/inventory/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"dewSrZbs",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],27]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","colspan","4"],["flush-element"],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-refresh glyphicon-refresh-animate"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["inventory.messages.loading"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["unknown",["location","name"]],false],["open-element","br",[]],["flush-element"],["close-element"],["text","\\n"]],"locals":["location"]},{"statements":[["text"," "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.transferredFrom"],null],false],["close-element"],["text","\\n"],["block",["each"],[["get",["transaction","locationsAffected"]]],null,1],["text"," "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.transferredTo"],null],false],["close-element"],["text"," "],["append",["unknown",["transaction","deliveryDetails"]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.delivered"],null],false],["close-element"],["text"," "],["append",["unknown",["transaction","deliveryDetails"]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.prescription"],null],false],["close-element"],["text"," "],["append",["unknown",["transaction","deliveryDetails"]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["unknown",["location","name"]],false],["open-element","br",[]],["flush-element"],["close-element"],["text","\\n"]],"locals":["location"]},{"statements":[["text"," "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.cost"],null],false],["close-element"],["text"," "],["append",["unknown",["transaction","costPerUnit"]],false],["open-element","br",[]],["flush-element"],["close-element"],["text","\\n "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.quantity"],null],false],["close-element"],["text"," "],["append",["unknown",["transaction","quantityAtCompletion"]],false],["open-element","br",[]],["flush-element"],["close-element"],["text","\\n "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.pulled"],null],false],["close-element"],["text","\\n"],["block",["each"],[["get",["transaction","locationsAffected"]]],null,5],["block",["if"],[["get",["transaction","patient"]]],null,4,3]],"locals":[]},{"statements":[["text"," "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.location"],null],false],["close-element"],["text"," "],["append",["unknown",["transaction","deliveryDetails"]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.returned"],null],false],["close-element"],["text"," "],["append",["unknown",["transaction","deliveryDetails"]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["inventory.edit.reason"],null],false],["close-element"],["text"," "],["append",["unknown",["transaction","reason"]],false],["open-element","br",[]],["flush-element"],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["transaction","haveReason"]]],null,9],["block",["if"],[["get",["transaction","patient"]]],null,8,7]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["transaction","dateCompleted"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["transaction","quantity"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["transaction","transactionType"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["transaction","expenseAccount"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["transaction","isAdjustment"]]],null,10],["block",["if"],[["get",["transaction","isFulfillment"]]],null,6],["block",["if"],[["get",["transaction","isTransfer"]]],null,2],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["transaction"]},{"statements":[["block",["each"],[["get",["transactions"]]],null,11]],"locals":[]},{"statements":[["text"," "],["open-element","h3",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.transactions"],null],false],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.dateCompleted"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.quantity"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.transaction"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.expense"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.details"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["haveTransactions"]]],null,12,0],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-primary neutral"],["modifier",["action"],[["get",[null]],"showAdjustment",["get",["location"]]]],["flush-element"],["append",["helper",["t"],["inventory.labels.adjust"],null],false],["close-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-primary neutral"],["modifier",["action"],[["get",[null]],"showTransfer",["get",["location"]]]],["flush-element"],["append",["helper",["t"],["inventory.labels.transfer"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["location","location"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["location","aisleLocation"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["location","quantity"]],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canAdjustLocation"]]],null,14],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["location","quantity"]]],null,15]],"locals":["location"]},{"statements":[["text"," "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.action"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","h3",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.locations"],null],false],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.location"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.aisleLocation"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.quantity"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canAdjustLocation"]]],null,17],["text"," "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","locations"]]],null,16],["text"," "],["close-element"],["text","\\n"],["block",["if"],[["get",["showTransactions"]]],null,13]],"locals":[]},{"statements":[["text"," "],["append",["helper",["t"],["inventory.labels.giftInKindNo"],null],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["t"],["inventory.labels.giftInKindYes"],null],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["dynamic-attr","class",["helper",["if"],[["get",["purchase","expired"]],"warning"],null],null],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["purchase","dateReceived"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["purchase","purchaseCost"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["purchase","costPerUnit"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["purchase","originalQuantity"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["purchase","currentQuantity"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["purchase","giftInKind"]]],null,20,19],["text"," "],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["purchase","lotNumber"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["purchase","expirationDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["purchase","vendor"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["purchase","invoiceNo"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["purchase"]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"showAddPurchase",["get",["model"]]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["inventory.titles.addPurchase"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-danger alert-dismissible"],["static-attr","role","alert"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","close"],["static-attr","data-dismiss","alert"],["flush-element"],["open-element","span",[]],["static-attr","aria-hidden","true"],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["open-element","span",[]],["static-attr","class","sr-only"],["flush-element"],["append",["helper",["t"],["buttons.close"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-warning-sign"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["t"],["inventory.messages.quantity"],[["quantity","locationQuantity"],[["get",["model","quantity"]],["get",["locationQuantityTotal"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["inventory.messages.adjust"],[["difference"],[["get",["quantityDifferential"]]]]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["quantityDiscrepency"]]],null,23],["text"," "],["open-element","h3",[]],["flush-element"],["text","\\n "],["append",["helper",["t"],["inventory.labels.purchases"],null],false],["text","\\n"],["block",["if"],[["get",["canAddPurchase"]]],null,22],["text"," "],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.dateReceived"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.purchaseCost"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.costPerUnit"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.originalQuantity"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.currentQuantity"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.gift"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.serialNumber"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.expirationDate"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.vendor"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.invoiceNumber"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","purchases"]]],null,21],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","h3",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.purchaseInfo"],null],false],["close-element"],["text","\\n "],["partial","inv-purchase"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["partial","inventory-basic"],["text","\\n"],["block",["if"],[["get",["model","isNew"]]],null,25,24],["block",["unless"],[["get",["model","isNew"]]],null,18]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],26]],"locals":[]}],"hasPartials":true}',meta:{moduleName:"hospitalrun/inventory/edit/template.hbs"}})}),define("hospitalrun/inventory/index/controller",["exports","hospitalrun/controllers/abstract-paged-controller","hospitalrun/mixins/user-session"],function(e,t,n){e.default=t.default.extend(n.default,{startKey:[],canAdd:function(){return this.currentUserCan("add_inventory_request")}.property(),canFulfill:function(){return this.currentUserCan("fulfill_inventory")}.property()})}),define("hospitalrun/inventory/index/route",["exports","hospitalrun/routes/abstract-index-route","hospitalrun/mixins/user-session","ember-i18n"],function(e,t,n,a){e.default=t.default.extend(n.default,{modelName:"inv-request",newButtonAction:function(){return this.currentUserCan("add_inventory_request")?"newRequest":null}.property(),newButtonText:(0,a.translationMacro)("buttons.newRequestPlus"),pageTitle:(0,a.translationMacro)("navigation.subnav.requests"),_getStartKeyFromItem:function(e){var t=this._getPouchIdFromItem(e);return["Requested",null,t]},_modelQueryParams:function(){var e=this.get("maxValue");return{options:{startkey:["Requested",null,null],endkey:["Requested",e,e]},mapReduce:"inventory_request_by_status"}},actions:{fulfill:function(e){e.set("dateCompleted",new Date),this.transitionTo("inventory.request",e)}}})}),define("hospitalrun/inventory/index/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"kh9OXcNN",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],6]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["open-element","a",[]],["static-attr","href","#"],["modifier",["action"],[["get",[null]],"newRequest"]],["flush-element"],["text"," "],["append",["helper",["t"],["inventory.messages.createRequest"],null],false],["close-element"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["inventory.messages.noRequests"],null],false],["block",["if"],[["get",["canAdd"]]],null,0],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-primary"],["modifier",["action"],[["get",[null]],"fulfill",["get",["request"]]]],["flush-element"],["append",["helper",["t"],["labels.fulfill"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["request","inventoryItem","name"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["request","quantity"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["request","dateRequested"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["request","requestedBy"]],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canFulfill"]]],null,2],["text"," "],["close-element"],["text","\\n"]],"locals":["request"]},{"statements":[["text"," "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.name"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.quantity"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.requestedOn"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canFulfill"]]],null,4],["text"," "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,3],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["hasRecords"]]],null,5,1]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/inventory/index/template.hbs"}})}),define("hospitalrun/inventory/listing/controller",["exports","hospitalrun/controllers/abstract-paged-controller","hospitalrun/mixins/user-session"],function(e,t,n){e.default=t.default.extend(n.default,{canAddItem:function(){return this.currentUserCan("add_inventory_item")}.property(),canAddPurchase:function(){return this.currentUserCan("add_inventory_purchase")}.property(),canDeleteItem:function(){return this.currentUserCan("delete_inventory_item")}.property(),startKey:[]})}),define("hospitalrun/inventory/listing/route",["exports","hospitalrun/routes/abstract-index-route","hospitalrun/mixins/user-session","ember-i18n"],function(e,t,n,a){e.default=t.default.extend(n.default,{modelName:"inventory",newButtonAction:function(){return this.currentUserCan("add_inventory_item")?"newItem":null}.property(),newButtonText:(0,a.translationMacro)("buttons.newItem"),pageTitle:(0,a.translationMacro)("inventory.labels.items"),_modelQueryParams:function(){return{mapReduce:"inventory_by_name"}},_getStartKeyFromItem:function(e){var t=this._getPouchIdFromItem(e);return[e.get("name"),t]}})}),define("hospitalrun/inventory/listing/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"lA3sUJLz",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],14]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","a",[]],["static-attr","href","#"],["modifier",["action"],[["get",[null]],"newItem"]],["flush-element"],["append",["helper",["t"],["messages.createNewRecord"],null],false],["close-element"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["messages.noItemsFound"],null],false],["text"," "],["block",["if"],[["get",["canAddItem"]]],null,0],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["append",["helper",["t"],["buttons.barcode"],null],false]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"deleteItem",["get",["inventory"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["buttons.delete"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editItem",["get",["inventory"]]],[["bubbles"],[false]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"showAddPurchase",["get",["inventory"]]],[["bubbles"],[false]]],["flush-element"],["append",["helper",["t"],["buttons.add"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["static-attr","class","clickable"],["modifier",["action"],[["get",[null]],"editItem",["get",["inventory"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["inventory","friendlyId"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["inventory","name"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["inventory","inventoryType"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["inventory","quantity"]],false],["text"," "],["append",["unknown",["inventory","distributionUnit"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["inventory","displayLocations"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["inventory","crossReference"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddPurchase"]]],null,5],["block",["if"],[["get",["canAddItem"]]],null,4],["block",["if"],[["get",["canDeleteItem"]]],null,3],["text"," "],["block",["link-to"],["inventory.barcode",["get",["inventory"]]],[["class","bubbles"],["btn btn-default neutral",false]],2],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["unless"],[["get",["inventory","isNew"]]],null,6]],"locals":["inventory"]},{"statements":[["append",["helper",["t"],["inventory.labels.xref"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.quantity"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.type"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.name"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.id"],null],false]],"locals":[]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["friendlyId",["get",["sortDesc"]],["get",["sortKey"]]]],12],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["name",["get",["sortDesc"]],["get",["sortKey"]]]],11],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["inventoryType",["get",["sortDesc"]],["get",["sortKey"]]]],10],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["quantity",["get",["sortDesc"]],["get",["sortKey"]]]],9],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.location"],null],false],["close-element"],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["crossReference",["get",["sortDesc"]],["get",["sortKey"]]]],8],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,7],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["hasRecords"]]],null,13,1]],"locals":[]}],"hasPartials":false}', +meta:{moduleName:"hospitalrun/inventory/listing/template.hbs"}})}),define("hospitalrun/inventory/purchase/edit/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/mixins/unit-types"],function(e,t,n,a){e.default=t.default.extend(a.default,{inventoryController:n.default.inject.controller("inventory"),cancelAction:"closeModal",canEditQuantity:function(){var e=this.get("model.originalQuantity"),t=this.get("model.currentQuantity");return!(t-1)return e.name.split(":")[1]})},_addLocationColumn:function(e){var t=this;if(!n.default.isEmpty(e)){var a=function(){var n=[];return e.forEach(function(e){var t=void 0;t=0===e.name.indexOf("From:")?e.name:this._getWarehouseLocationName(e.name),n.includes(t)||n.push(t)}.bind(t)),{v:n}}();if("object"==typeof a)return a.v}},_addReportRow:function(e,t,a,l){!n.default.isEmpty(l)||n.default.isEmpty(e.inventoryItem)||n.default.isEmpty(e.inventoryItem.id)||(l={action:"viewInventory",model:e.inventoryItem.id}),this._super(e,t,a,l)},_addTotalsRow:function(e,t,n){n>0&&this._addReportRow({totalCost:e+this._numberFormat(t),quantity:e+this._numberFormat(n),unitCost:e+this._numberFormat(t/n)},!0)},_adjustLocation:function(e,t,a,l){var s=e.findBy("name",t);n.default.isEmpty(s)&&(s={name:t,quantity:0},e.push(s)),l?s.quantity+=a:s.quantity-=a},_adjustPurchase:function(e,t,a,l){var s=e.findBy("id",t);if(!n.default.isEmpty(s)){var i=s.calculatedQuantity;l?i+=a:i-=a,s.calculatedQuantity=i}},_calculateCosts:function(e,t){return n.default.isEmpty(e)||e.forEach(function(e){var n=this._calculateCostPerUnit(e),a=e.calculatedQuantity;t.quantity+=e.calculatedQuantity,t.totalCost+=a*n}.bind(this)),0===t.totalCost||0===t.quantity?t.unitCost=0:t.unitCost=t.totalCost/t.quantity,t},_calculateUsage:function(e,t){return n.default.isEmpty(e)||e.forEach(function(e){var n=this._calculateCostPerUnit(e),a=e.calculatedQuantity;t.quantity-=e.calculatedQuantity,t.totalCost-=a*n}.bind(this)),0===t.totalCost||0===t.quantity?t.unitCost=0:t.unitCost=t.totalCost/t.quantity,t},_calculateCostPerUnit:function(e){var t=e.purchaseCost,a=parseInt(e.originalQuantity);return n.default.isEmpty(t)||n.default.isEmpty(a)?0:Number((t/a).toFixed(2))},_findInventoryItems:function(e,t,a,l){n.default.isEmpty(a)&&(a={});var s=this.get("database");return new n.default.RSVP.Promise(function(i,o){s.queryMainDB(e,t).then(function(e){var t=Object.keys(a),r=[];n.default.isEmpty(e.rows)||e.rows.forEach(function(e){e.doc.inventoryItem&&!t.includes(e.doc.inventoryItem)&&(r.push(s.getPouchId(e.doc.inventoryItem,"inventory")),t.push(e.doc.inventoryItem))}),this._getInventoryItems(r,a).then(function(t){e.rows.forEach(function(e){var a=t[e.doc.inventoryItem];if(!n.default.isEmpty(a)&&("purchaseObjects"!==l||a.purchases.includes(e.doc.id))){var s=a[l];n.default.isEmpty(s)&&(s=[]),s.push(e.doc),a[l]=s}}),i(t)},o)}.bind(this),o)}.bind(this))},_findInventoryItemsByPurchase:function(e,t){return this._findInventoryItems({startkey:[e.startTime,"invPurchase_"],endkey:[e.endTime,"invPurchase_￿"],include_docs:!0},"inventory_purchase_by_date_received",t,"purchaseObjects")},_findInventoryItemsByRequest:function(e,t){return this._findInventoryItems({startkey:["Completed",e.startTime,"invRequest_"],endkey:["Completed",e.endTime,"invRequest_￿"],include_docs:!0},"inventory_request_by_status",t,"requestObjects")},_finishExpenseReport:function(e){var t=this.get("expenseCategories"),a=this.get("expenseMap"),l=this.get("i18n");t.forEach(function(t){var s=0,i=void 0,o=void 0;this._addReportRow({inventoryItem:{name:l.t("inventory.reports.rows.expensesFor")+t}}),a[t].expenseAccounts.forEach(function(a){"detailedExpense"===e&&a.reportRows.forEach(function(e){this._addReportRow(e)}.bind(this)),i=n.default.isEmpty(a.name)?l.t("inventory.reports.rows.noAccount"):a.name,o=l.t("inventory.reports.rows.subtotalFor",{category:t,account:i}),this._addReportRow({totalCost:o+this._numberFormat(a.total)},!0),s+=a.total}.bind(this)),o=l.t("inventory.reports.rows.totalFor",{var:t}),this._addReportRow({totalCost:o+this._numberFormat(s)},!0),this.incrementProperty("grandCost",s)}.bind(this)),this._addReportRow({totalCost:l.t("inventory.reports.rows.total")+this._numberFormat(this.get("grandCost"))},!0)},_finishLocationReport:function(){var e="",t=0,n=this.get("locationSummary"),a="",l=0,s=this.get("i18n");n=n.sortBy("name"),n.forEach(function(n){a=this._getWarehouseLocationName(n.name);var i=s.t("inventory.reports.rows.totalFor",{var:e});if(e!==a&&(this._addTotalsRow(i,t,l),l=0,t=0,e=a),this._includeLocation(a))for(var o in n.items)n.items[o].quantity>0&&(this._addReportRow({giftInKind:n.items[o].giftInKind,inventoryItem:n.items[o].item,quantity:n.items[o].quantity,locations:[{name:n.name}],totalCost:n.items[o].totalCost,unitCost:n.items[o].unitCost}),l+=this._getValidNumber(n.items[o].quantity),t+=this._getValidNumber(n.items[o].totalCost),this.incrementProperty("grandCost",this._getValidNumber(n.items[o].totalCost)),this.incrementProperty("grandQuantity",this._getValidNumber(n.items[o].quantity)))}.bind(this)),l>0&&this._addTotalsRow(s.t("inventory.reports.rows.totalFor",{var:a}),t,l)},_generateExpirationReport:function(){var e=0,t=this.get("database"),a=this.get("reportRows"),l=this._getDateQueryParams();t.queryMainDB({startkey:[l.startTime,"invPurchase_"],endkey:[l.endTime,"invPurchase_￿"],include_docs:!0},"inventory_purchase_by_expiration_date").then(function(l){var s=[],o=[];l.rows.forEach(function(e){e.doc.currentQuantity>0&&!n.default.isEmpty(e.doc.expirationDate)&&(s.push(e.doc),o.push(t.getPouchId(e.doc.inventoryItem,"inventory")))}.bind(this)),this._getInventoryItems(o).then(function(t){var n=this.get("i18n");s.forEach(function(n){var l=n.currentQuantity,s=new Date(n.expirationDate),o=t[n.inventoryItem];o&&this._includeLocation(n.location)&&(a.addObject([o.friendlyId,o.name,l,o.distributionUnit,(0,i.default)(s).format("l"),this.formatLocationName(n.location,n.aisleLocation)]),e+=l)}.bind(this)),a.addObject(["","",n.t("inventory.reports.rows.total")+e,"",""]),this.set("showReportResults",!0),this.set("reportHeaders",[n.t("labels.id"),n.t("labels.name"),n.t("inventory.labels.currentQuantity"),n.t("inventory.labels.distributionUnit"),n.t("inventory.labels.expirationDate"),n.t("inventory.labels.location")]),this._generateExport(),this._setReportTitle(),this.closeProgressModal()}.bind(this))}.bind(this))},_generateFinancialSummaryReport:function(){var e=this._getDateQueryParams();this._calculateBeginningBalance(e).then(function(t){this._generateSummaries(e).then(function(e){var n=this._numberFormat(t+e),a=this.get("i18n");t+e<0?this.get("reportRows").addObject([a.t("inventory.reports.rows.balanceEnd"),"","("+n+")"]):this.get("reportRows").addObject([a.t("inventory.reports.rows.balanceEnd"),"",n]),this.set("showReportResults",!0),this.set("reportHeaders",[a.t("inventory.reports.rows.category"),a.t("labels.type"),a.t("inventory.labels.total")]),this._generateExport(),this._setReportTitle(),this.closeProgressModal()}.bind(this),function(e){this._notifyReportError(this.get("i18n").t("inventory.reports.rows.errInFinSum")+e)}.bind(this))}.bind(this))},_generateSummaries:function(e){return new n.default.RSVP.Promise(function(t,a){var l=0,s=this.get("i18n");this._findInventoryItemsByRequest(e,{}).then(function(i){this._findInventoryItemsByPurchase(e,i).then(function(e){var a={},i={},o={},r={};if(this.adjustmentTypes.forEach(function(e){r[e.type]=[]}),Object.keys(e).forEach(function(t){if(!n.default.isEmpty(t)&&!n.default.isEmpty(e[t])){var l=e[t];n.default.isEmpty(l.purchaseObjects)||l.purchaseObjects.forEach(function(e){a[l.inventoryType]=this._getValidNumber(a[l.inventoryType])+this._getValidNumber(e.purchaseCost)}.bind(this)),n.default.isEmpty(l.requestObjects)||l.requestObjects.forEach(function(e){e.adjustPurchases&&("Fulfillment"===e.transactionType?e.giftInKind?o[l.inventoryType]=this._getValidNumber(o[l.inventoryType])+this._getValidNumber(e.quantity*e.costPerUnit):i[l.inventoryType]=this._getValidNumber(i[l.inventoryType])+this._getValidNumber(e.quantity*e.costPerUnit):r[e.transactionType][l.inventoryType]=this._getValidNumber(r[e.transactionType][l.inventoryType])+this._getValidNumber(e.quantity*e.costPerUnit))}.bind(this))}}.bind(this)),Object.keys(a).length>0){var d=0;this.get("reportRows").addObject([s.t("inventory.labels.purchases"),"",""]),Object.keys(a).forEach(function(e){var t=this._getValidNumber(a[e]);d+=t,this.get("reportRows").addObject(["",e,this._numberFormat(t)])}.bind(this)),this.get("reportRows").addObject([s.t("inventory.reports.rows.totalPurchases"),"",this._numberFormat(d)]),l+=d}if(Object.keys(i).length>0||Object.keys(o).length>0){this.get("reportRows").addObject([s.t("inventory.reports.rows.consumed"),"",""]);var c=0;if(Object.keys(i).length>0){this.get("reportRows").addObject([s.t("inventory.reports.rows.consumedPuchases"),"",""]);var u=0;Object.keys(i).forEach(function(e){var t=this._getValidNumber(i[e]);u+=t,this.get("reportRows").addObject(["",e,"("+this._numberFormat(t)+")"])}.bind(this)),c+=u,this.get("reportRows").addObject([s.t("inventory.reports.rows.consumedPurchasesTotal"),"","("+this._numberFormat(u)+")"])}if(Object.keys(o).length>0){this.get("reportRows").addObject([s.t("inventory.reports.rows.consumedGik"),"",""]);var p=0;Object.keys(o).forEach(function(e){var t=this._getValidNumber(o[e]);p+=t,this.get("reportRows").addObject(["",e,"("+this._numberFormat(t)+")"])}.bind(this)),c+=p,this.get("reportRows").addObject([s.t("inventory.reports.rows.consumedGikTotal"),"","("+this._numberFormat(p)+")"])}this.get("reportRows").addObject([s.t("inventory.reports.rows.consumedTotal"),"","("+this._numberFormat(c)+")"]),l-=c}var m=0;this.get("reportRows").addObject([s.t("inventory.reports.rows.adjustments"),"",""]),Object.keys(r).forEach(function(e){Object.keys(r[e]).length>0&&(this.get("reportRows").addObject([e,"",""]),Object.keys(r[e]).forEach(function(t){var n=this._getValidNumber(r[e][t]);"Adjustment (Add)"===e||"Return"===e?(m+=n,this.get("reportRows").addObject(["",t,this._numberFormat(n)])):(m-=n,this.get("reportRows").addObject(["",t,"("+this._numberFormat(n)+")"]))}.bind(this)))}.bind(this)),m<0?this.get("reportRows").addObject([s.t("inventory.reports.rows.adjustmentsTotal"),"","("+this._numberFormat(m)+")"]):this.get("reportRows").addObject([s.t("inventory.reports.rows.adjustmentsTotal"),"",this._numberFormat(m)]),l+=m,t(l)}.bind(this),a)}.bind(this),a)}.bind(this))},_calculateBeginningBalance:function(e){return new n.default.RSVP.Promise(function(t,a){var l={startTime:null,endTime:e.startTime},s=0,i=this.get("i18n");this._findInventoryItemsByRequest(l,{}).then(function(e){this._findInventoryItemsByPurchase(l,e).then(function(e){Object.keys(e).forEach(function(t){if(!n.default.isEmpty(t)&&!n.default.isEmpty(e[t])){var a=e[t],l=a.purchaseObjects,i=a.requestObjects,o={inventoryItem:a,quantity:0,unitCost:0,totalCost:0};n.default.isEmpty(l)||l.forEach(function(e){var t=e.originalQuantity;e.calculatedQuantity=t}),n.default.isEmpty(i)||i.forEach(function(e){var t=e.adjustPurchases,a=!1,s=e.purchasesAffected,i=e.transactionType;a="Adjustment (Add)"===i||"Return"===i,t&&(n.default.isEmpty(s)||n.default.isEmpty(l)||s.forEach(function(e){this._adjustPurchase(l,e.id,e.quantity,a)}.bind(this)))}.bind(this)),n.default.isEmpty(l)||(o=this._calculateCosts(l,o),s+=this._getValidNumber(o.totalCost))}}.bind(this)),s<0?this.get("reportRows").addObject([i.t("inventory.reports.rows.balanceBegin"),"","("+this._numberFormat(s)+")"]):this.get("reportRows").addObject([i.t("inventory.reports.rows.balanceBegin"),"",this._numberFormat(s)]),t(s)}.bind(this),a)}.bind(this),a)}.bind(this))},_generateInventoryReport:function(){this.set("grandCost",0),this.set("grandQuantity",0),this.set("locationSummary",[]);var e=void 0,t=this.get("locationSummary"),a=this.get("reportType"),l=this._getDateQueryParams(),s=this.get("i18n");if("daysLeft"===a){var o=this.get("endDate"),r=this.get("startDate");if(n.default.isEmpty(o)||n.default.isEmpty(r))return void this.closeProgressModal();e=(0,i.default)(o).diff(r,"days")}this._findInventoryItemsByRequest(l,{}).then(function(o){this._findInventoryItemsByPurchase(l,o).then(function(l){switch(Object.keys(l).forEach(function(o){if(!n.default.isEmpty(l[o])){var r=l[o],d=r.purchaseObjects,c=r.requestObjects,u={giftInKind:"N",inventoryItem:r,quantity:0,unitCost:0,totalCost:0,locations:[],vendors:[]};n.default.isEmpty(d)||d.forEach(function(e){var t=this.getDisplayLocationName(e.location,e.aisleLocation),a=e.originalQuantity;e.calculatedQuantity=a,e.giftInKind===!0&&(u.giftInKind="Y"),n.default.isEmpty(e.vendor)||u.vendors.includes(e.vendor)||u.vendors.push(e.vendor),this._adjustLocation(u.locations,t,a,!0)}.bind(this)),n.default.isEmpty(c)||c.forEach(function(e){var t=e.adjustPurchases,a=e.transactionType,l=!1,s=e.locationsAffected,i=e.purchasesAffected;if(l="Adjustment (Add)"===a||"Return"===a,t)n.default.isEmpty(i)||n.default.isEmpty(d)||i.forEach(function(e){this._adjustPurchase(d,e.id,e.quantity,l)}.bind(this));else if("Transfer"===a){var o=this.getDisplayLocationName(e.deliveryLocation,e.deliveryAisle);this._adjustLocation(u.locations,o,e.quantity,!0)}s.forEach(function(e){this._adjustLocation(u.locations,e.name,e.quantity,l)}.bind(this))}.bind(this));var p=0,m=0;switch(a){case"byLocation":u.locations.forEach(function(e){var a=t.findBy("name",this._getWarehouseLocationName(e.name));n.default.isEmpty(a)?(a=n.default.copy(e),a.items={},t.push(a)):a.quantity+=this._getValidNumber(e.quantity);var l=this._calculateCosts(d,{quantity:0,totalCost:0});a.items[r.id]={item:r,quantity:this._getValidNumber(e.quantity),giftInKind:u.giftInKind,totalCost:this._getValidNumber(l.unitCost)*this._getValidNumber(e.quantity),unitCost:this._getValidNumber(l.unitCost)}}.bind(this));break;case"daysLeft":if(!n.default.isEmpty(c)&&this._hasIncludedLocation(u.locations)){var f=c.reduce(function(e,t){return"Fulfillment"===t.transactionType?e+=this._getValidNumber(t.quantity):e}.bind(this),0);u.quantity=this._getValidNumber(r.quantity),f>0?(u.consumedPerDay=this._numberFormat(f/e,!0),u.daysLeft=this._numberFormat(u.quantity/u.consumedPerDay)):(0===f?u.consumedPerDay="0":u.consumedPerDay="?"+f,u.daysLeft="?"),this._addReportRow(u)}break;case"detailedAdjustment":case"detailedTransfer":case"detailedUsage":case"detailedExpense":case"summaryExpense":n.default.isEmpty(c)||(c.forEach(function(e){var t=this;this._includeTransaction(a,e.transactionType)&&this._hasIncludedLocation(e.locationsAffected)&&!function(){var n=t.getDisplayLocationName(e.deliveryLocation,e.deliveryAisle),l=[],o=t._getValidNumber(e.quantity),r=t._getValidNumber(e.quantity)*t._getValidNumber(e.costPerUnit);l=e.locationsAffected.map(function(e){return"detailedTransfer"===a?{name:s.t("inventory.reports.rows.transfer2",{source:e.name,target:n}).toString()}:{name:s.t("inventory.reports.rows.transfer1",{quantity:o,location:e.name}).toString()}}.bind(t));var d={date:(0,i.default)(new Date(e.dateCompleted)).format("l"),expenseAccount:e.expenseAccount,giftInKind:u.giftInKind,inventoryItem:u.inventoryItem,quantity:e.quantity,transactionType:e.transactionType,locations:l,unitCost:e.costPerUnit,totalCost:r};"detailedExpense"===a||"summaryExpense"===a?t._updateExpenseMap(e,d):(t._addReportRow(d),m+=t._getValidNumber(e.quantity),p+=t._getValidNumber(r))}()}.bind(this)),"detailedExpense"!==a&&"summaryExpense"!==a&&(this._addTotalsRow(s.t("inventory.reports.rows.subtotal"),p,m),this.incrementProperty("grandCost",p),this.incrementProperty("grandQuantity",m)));break;case"summaryTransfer":case"summaryUsage":!n.default.isEmpty(c)&&this._hasIncludedLocation(u.locations)&&(u.quantity=c.reduce(function(e,t){if(this._includeTransaction(a,t.transactionType)){var n=this._getValidNumber(t.quantity)*this._getValidNumber(t.costPerUnit);return p+=n,e+=this._getValidNumber(t.quantity)}return e}.bind(this),0),u.quantity>0&&(u.totalCost=p,u.unitCost=p/u.quantity,this._addReportRow(u),this.incrementProperty("grandCost",p),this.incrementProperty("grandQuantity",u.quantity)));break;case"detailedPurchase":n.default.isEmpty(d)||(d.forEach(function(e){if(this._includeLocation(e.location)){var t="N";e.giftInKind===!0&&(t="Y"),this._addReportRow({date:(0,i.default)(new Date(e.dateReceived)).format("l"),giftInKind:t,inventoryItem:u.inventoryItem,quantity:e.originalQuantity,unitCost:e.costPerUnit,totalCost:e.purchaseCost,locations:[{name:this.getDisplayLocationName(e.location,e.aisleLocation)}]}),p+=this._getValidNumber(e.purchaseCost),m+=this._getValidNumber(e.originalQuantity)}}.bind(this)),this._addTotalsRow(s.t("inventory.reports.rows.subtotal"),p,m),this.incrementProperty("grandCost",p),this.incrementProperty("grandQuantity",m));break;case"summaryPurchase":n.default.isEmpty(d)||(u.locations=[],u.quantity=d.reduce(function(e,t){p+=this._getValidNumber(t.purchaseCost);var n=this.getDisplayLocationName(t.location,t.aisleLocation);return u.locations.findBy("name",n)||u.locations.push({name:this.getDisplayLocationName(t.location,t.aisleLocation)}),e+=this._getValidNumber(t.originalQuantity)}.bind(this),0),this._hasIncludedLocation(u.locations)&&(u.unitCost=p/u.quantity,u.totalCost=p,this._addReportRow(u),this.incrementProperty("grandCost",p),this.incrementProperty("grandQuantity",u.quantity)));break;case"valuation":!n.default.isEmpty(d)&&this._hasIncludedLocation(u.locations)&&(this._calculateCosts(d,u),this.incrementProperty("grandCost",this._getValidNumber(u.totalCost)),this.incrementProperty("grandQuantity",this._getValidNumber(u.quantity)),this._addReportRow(u))}}}.bind(this)),a){case"detailedExpense":case"summaryExpense":this._finishExpenseReport(a);break;case"byLocation":this._finishLocationReport(),this._addTotalsRow(s.t("inventory.reports.rows.total"),this.get("grandCost"),this.get("grandQuantity"));break;default:this._addTotalsRow(s.t("inventory.reports.rows.total"),this.get("grandCost"),this.get("grandQuantity"))}this._finishReport()}.bind(this),function(e){this._notifyReportError(s.t("inventory.reports.rows.errInFindPur")+e)}.bind(this))}.bind(this),function(e){this._notifyReportError(s.t("inventory.reports.rows.errInFindPur")+e)}.bind(this))},_getDateQueryParams:function(){var e=this.get("endDate"),t=this.get("maxValue"),a=this.get("startDate"),l=void 0;return n.default.isEmpty(e)||(t=(0,i.default)(e).endOf("day").toDate().getTime()),n.default.isEmpty(a)||(l=(0,i.default)(a).startOf("day").toDate().getTime()),{endTime:t,startTime:l}},_getInventoryItems:function(e,t){var a=this.get("database");return new n.default.RSVP.Promise(function(l,s){n.default.isEmpty(t)&&(t={}),a.queryMainDB({keys:e,include_docs:!0}).then(function(e){e.rows.forEach(function(e){e.doc&&e.doc.archived!==!0&&(t[e.doc.id]=e.doc)}),l(t)},s)})},_getWarehouseLocationName:function(e){var t="";return t=e.indexOf(":")>-1?e.split(":")[0].trim():e},_hasIncludedLocation:function(e){var t=!1;return e.forEach(function(e){var n=this._getWarehouseLocationName(e.name);this._includeLocation(n)&&(t=!0)}.bind(this)),t},_includeLocation:function(e){var t=this.get("filterLocation");return n.default.isEmpty(t)||e===t},_includeTransaction:function(e,t){var n=0===e.indexOf("detailed"),a=void 0;if("detailedExpense"===e||"summaryExpense"===e)return!0;switch(t){case"Fulfillment":a=n?"detailedUsage":"summaryUsage";break;case"Transfer":a=n?"detailedTransfer":"summaryTransfer";break;default:a=n?"detailedAdjustment":"summaryAdjustment"}return e===a},_updateExpenseMap:function(e,t){var a=void 0,l=this.get("expenseMap"),s="Y"===t.giftInKind,i=!0;switch(e.transactionType){case"Fulfillment":case"Return":a=s?l["Gift In Kind Usage"]:l["Inventory Consumed"],"Return"===e.transactionType&&(i=!1);break;case"Adjustment (Add)":case"Adjustment (Remove)":case"Return To Vendor":case"Write Off":a=l["Inventory Obsolence"],"Adjustment (Add)"===e.transactionType&&(i=!1)}if(!n.default.isEmpty(a)){var o=a.expenseAccounts.findBy("name",e.expenseAccount);n.default.isEmpty(o)&&(o={name:e.expenseAccount,total:0,reportRows:[]},a.expenseAccounts.push(o)),o.reportRows.push(t);var r=this._getValidNumber(e.quantity)*this._getValidNumber(e.costPerUnit);i?(a.total+=r,o.total+=r):(a.total=a.total-r,o.total=o.total-r,t.totalCost=t.totalCost*-1)}},actions:{generateReport:function(){var e=this,t=this.get("endDate"),a=this.get("reportRows"),l=this.get("reportType"),s=this.get("startDate");if(!n.default.isEmpty(s)||!n.default.isEmpty(t))switch(a.clear(),this.showProgressModal(),l){case"expiration":this._generateExpirationReport();break;case"summaryFinance":this._generateFinancialSummaryReport();break;case"detailedExpense":case"summaryExpense":var i=function(){var t=e.get("expenseCategories"),n={};return t.forEach(function(e){n[e]={total:0,expenseAccounts:[]}}),e.set("expenseMap",n),e._generateInventoryReport(),"break"}();if("break"===i)break;default:this._generateInventoryReport()}},viewInventory:function(e){this.store.find("inventory",e).then(function(e){e.set("returnTo","inventory.reports"),this.transitionToRoute("inventory.edit",e)}.bind(this))}}})}),define("hospitalrun/inventory/reports/route",["exports","hospitalrun/routes/abstract-index-route","ember","ember-i18n"],function(e,t,n,a){e.default=t.default.extend({pageTitle:(0,a.translationMacro)("inventory.titles.inventoryReport"),model:function(){return n.default.RSVP.resolve(n.default.Object.create({}))}})}),define("hospitalrun/inventory/reports/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"g8+aEF0m",block:'{"statements":[["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",[null]],false]],11],["text"," "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-footer"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"generateReport"]],["flush-element"],["append",["helper",["t"],["inventory.reports.generate"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["close-element"],["text","\\n"],["block",["if"],[["get",["showReportResults"]]],null,1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","th",[]],["flush-element"],["text","\\n "],["append",["get",["reportHeader"]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":["reportHeader"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-primary"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["append",["unknown",["reportTitle"]],false],["append",["helper",["nav-paging"],null,[["paginationProps"],[["get",["paginationProps"]]]]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n"],["block",["each"],[["get",["reportHeaders"]]],null,0],["text"," "],["close-element"],["text","\\n "],["partial","report-rows"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-footer"],["flush-element"],["text","\\n "],["open-element","a",[]],["dynamic-attr","href",["unknown",["csvExport"]],null],["static-attr","target","_blank"],["dynamic-attr","download",["concat",[["unknown",["reportTitle"]],".csv"]]],["static-attr","class","btn btn-default"],["flush-element"],["append",["helper",["t"],["inventory.reports.export"],null],false],["close-element"],["text","\\n\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","transactionType","label"]],"reportColumns.transactionType.include","col-xs-2"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","expenseAccount","label"]],"reportColumns.expenseAccount.include","col-xs-2"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","consumedPerDay","label"]],"reportColumns.consumedPerDay.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","daysLeft","label"]],"reportColumns.daysLeft.include","col-xs-2"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","total","label"]],"reportColumns.total.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","unitcost","label"]],"reportColumns.unitcost.include","col-xs-2"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","date","label"]],"reportColumns.date.include","col-xs-2"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","h3",[]],["flush-element"],["append",["helper",["t"],["inventory.reports.fields"],null],false],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","col-xs-1"],["flush-element"],["close-element"],["text","\\n"],["block",["if"],[["get",["includeDate"]]],null,6],["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","id","label"]],"reportColumns.id.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","name","label"]],"reportColumns.name.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","description","label"]],"reportColumns.description.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","type","label"]],"reportColumns.type.include","col-xs-2"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","col-xs-1"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","quantity","label"]],"reportColumns.quantity.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","unit","label"]],"reportColumns.unit.include","col-xs-2"]]],false],["text","\\n"],["block",["if"],[["get",["includeCostFields"]]],null,5],["block",["if"],[["get",["includeDaysLeft"]]],null,4],["text"," "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","price","label"]],"reportColumns.price.include","col-xs-2"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","col-xs-1"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","reorder","label"]],"reportColumns.reorder.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","gift","label"]],"reportColumns.gift.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","locations","label"]],"reportColumns.locations.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","aisle","label"]],"reportColumns.aisle.include","col-xs-2"]]],false],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","xref","label"]],"reportColumns.xref.include","col-xs-2"]]],false],["text","\\n\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","col-xs-1"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property","class"],[["get",["reportColumns","vendor","label"]],"reportColumns.vendor.include","col-xs-2"]]],false],["text","\\n"],["block",["if"],[["get",["includeExpenseAccount"]]],null,3],["block",["if"],[["get",["includeTransactionType"]]],null,2],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["date-picker"],null,[["property","label","class"],["startDate",["helper",["t"],["inventory.labels.dateStart"],null],"col-sm-4 test-start-date"]]],false],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["endDate",["helper",["t"],["inventory.labels.dateEnd"],null],"col-sm-4 test-end-date"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["date-picker"],null,[["property","label","class"],["endDate",["helper",["t"],["inventory.labels.dateEffective"],null],"col-sm-4"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-select"],null,[["class","label","property","content","prompt"],["col-xs-6",["helper",["t"],["inventory.labels.location"],null],"filterLocation",["get",["warehouseList"]]," "]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-xs-6"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["static-attr","for","report-type"],["flush-element"],["append",["helper",["t"],["inventory.reports.reportType"],null],false],["close-element"],["text","\\n "],["append",["helper",["select-list"],null,[["action","class","content","id","optionValuePath","optionLabelPath","value"],[["helper",["action"],[["get",[null]],["helper",["mut"],[["get",["reportType"]]],null]],null],"form-control",["get",["reportTypes"]],"report-type","value","name",["get",["reportType"]]]]],false],["text","\\n "],["close-element"],["text","\\n"],["block",["unless"],[["get",["hideLocationFilter"]]],null,10],["text"," "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n"],["block",["if"],[["get",["showEffectiveDate"]]],null,9,8],["text"," "],["close-element"],["text","\\n"],["block",["if"],[["get",["useFieldPicker"]]],null,7],["text","\\n"]],"locals":[]}],"hasPartials":true}', +meta:{moduleName:"hospitalrun/inventory/reports/template.hbs"}})}),define("hospitalrun/inventory/request/controller",["exports","hospitalrun/controllers/abstract-edit-controller","hospitalrun/mixins/fulfill-request","hospitalrun/mixins/inventory-locations","ember"],function(e,t,n,a,l){e.default=t.default.extend(n.default,a.default,{inventoryController:l.default.inject.controller("inventory"),inventoryItems:null,cancelAction:"allRequests",warehouseList:l.default.computed.alias("inventoryController.warehouseList"),aisleLocationList:l.default.computed.alias("inventoryController.aisleLocationList"),expenseAccountList:l.default.computed.alias("inventoryController.expenseAccountList"),inventoryList:function(){var e=this.get("inventoryItems");if(!l.default.isEmpty(e)){var t=e.map(function(e){return e.doc});return t}}.property("inventoryItems.[]"),lookupListsToUpdate:[{name:"expenseAccountList",property:"model.expenseAccount",id:"expense_account_list"},{name:"aisleLocationList",property:"model.deliveryAisle",id:"aisle_location_list"},{name:"warehouseList",property:"model.deliveryLocation",id:"warehouse_list"}],canFulfill:function(){var e=this.get("model.requestedItems");return l.default.isEmpty(e)&&this.currentUserCan("fulfill_inventory")}.property("model.requestedItems.[]"),isFulfilling:function(){var e=this.get("canFulfill"),t=this.get("isRequested"),n=this.get("model.shouldFulfillRequest"),a=e&&(t||n);return a?l.default.isEmpty(this.get("model.dateCompleted"))&&this.set("model.dateCompleted",new Date):this.set("model.dateCompleted"),a}.property("isRequested","model.shouldFulfillRequest"),isRequested:function(){var e=this.get("model.status");return"Requested"===e}.property("model.status"),quantityLabel:function(){var e=this.get("selectedInventoryItem");return l.default.isEmpty(e)?this.get("i18n").t("labels.quantity").toString():this.get("i18n").t("inventory.labels.quantity",{unit:e.distributionUnit}).toString()}.property("selectedInventoryItem"),showRequestedItems:function(){var e=this.get("model.requestedItems");return!l.default.isEmpty(e)}.property("model.requestedItems.[]"),updateViaFulfillRequest:!1,updateButtonText:function(){return this.get("isFulfilling")?this.get("i18n").t("buttons.fulfill"):this._super()}.property("model.isNew","isFulfilling"),updateCapability:"add_inventory_request",actions:{addInventoryItem:function(){var e=this.get("model"),t=e.get("inventoryItem"),n=e.get("requestedItems"),a=e.get("quantity");e.validate().then(function(){if(e.get("isValid")&&!l.default.isEmpty(t)&&!l.default.isEmpty(a)){var s=l.default.Object.create({item:t.get("content"),quantity:a});n.addObject(s),e.set("inventoryItem"),e.set("inventoryItemTypeAhead"),e.set("quantity"),this.set("selectedInventoryItem")}}.bind(this)).catch(l.default.K)},allRequests:function(){this.transitionToRoute("inventory.index")},removeItem:function(e){var t=this.get("model.requestedItems"),n=e.itemToRemove;t.removeObject(n),this.send("closeModal")},showRemoveItem:function(e){var t=this.get("i18n").t("inventory.messages.removeItemRequest"),n=l.default.Object.create({itemToRemove:e}),a=this.get("i18n").t("inventory.titles.removeItem");this.displayConfirm(a,t,"removeItem",n)},update:function(e){this.beforeUpdate().then(function(){var t=this,n=this.get("updateViaFulfillRequest");if(n)this.updateLookupLists(),this.performFulfillRequest(this.get("model"),!1,!1,!0).then(this.afterUpdate.bind(this));else{var a=this.get("model.isNew"),s=this.get("model.requestedItems");a&&!l.default.isEmpty(s)?!function(){var e=t.get("model"),n=e.getProperties(["dateRequested","deliveryAisle","deliveryLocation","expenseAccount","requestedBy","status"]),a=[],i=[],o=[];l.default.isEmpty(t.get("model.inventoryItem"))||l.default.isEmpty(t.get("model.quantity"))||o.push(e.save()),s.forEach(function(e){n.inventoryItem=e.get("item"),n.quantity=e.get("quantity");var t=this.get("store").createRecord("inv-request",n);a.push(t.get("inventoryItem")),i.push(t)}.bind(t)),l.default.RSVP.all(a,"Get inventory items for inventory requests").then(function(){i.forEach(function(e){o.push(e.save())}),l.default.RSVP.all(o,"Save batch inventory requests").then(function(){this.updateLookupLists(),this.afterUpdate()}.bind(this))}.bind(t))}():this.get("model").save().then(function(t){this.updateLookupLists(),e||this.afterUpdate(t)}.bind(this))}}.bind(this))}},afterUpdate:function(){var e=this.get("updateViaFulfillRequest");e?this.displayAlert(this.get("i18n").t("inventory.titles.requestFulfilled"),this.get("i18n").t("inventory.messages.requestFulfilled"),"allRequests"):this.displayAlert(this.get("i18n").t("inventory.titles.requestUpdated"),this.get("i18n").t("inventory.messages.requestUpdated"))},beforeUpdate:function(){return this.get("isFulfilling")?this.set("updateViaFulfillRequest",!0):this.set("updateViaFulfillRequest",!1),this.get("model.isNew")&&(this.set("model.dateRequested",new Date),this.set("model.requestedBy",this.get("model").getUserName()),this.get("isFulfilling")||this.set("model.status","Requested")),l.default.RSVP.resolve()}})}),define("hospitalrun/inventory/request/route",["exports","hospitalrun/routes/abstract-edit-route","ember","ember-i18n"],function(e,t,n,a){e.default=t.default.extend({editTitle:(0,a.translationMacro)("inventory.titles.editRequest"),modelName:"inv-request",newTitle:(0,a.translationMacro)("inventory.titles.addRequest"),database:n.default.inject.service(),getNewData:function(){return n.default.RSVP.resolve({transactionType:"Request",requestedItems:[]})},actions:{allRequests:function(e){this.controller.send("allRequests",e)},removeItem:function(e){this.controller.send("removeItem",e)}},setupController:function(e,t){this._super(e,t);var n={startkey:"inventory_",endkey:"inventory_￿",include_docs:!0};this.get("database").queryMainDB(n).then(function(t){e.set("inventoryItems",t.rows)})}})}),define("hospitalrun/inventory/request/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"qer6XY+A",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],7]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["dateCompleted",["helper",["t"],["labels.dateCompleted"],null],"col-sm-4"]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["inventory-location-picker"],null,[["label","quantityRequested","locationList","selectedLocations","class"],[["helper",["t"],["inventory.labels.pullFrom"],null],["get",["model","quantity"]],["get",["model","inventoryItem","availableLocations"]],["get",["model","inventoryLocations"]],"inventory-location"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label sr-only"],["flush-element"],["append",["helper",["t"],["inventory.labels.consumePurchases"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["inventory.labels.markAsConsumed"],null],"markAsConsumed"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label sr-only"],["flush-element"],["append",["helper",["t"],["inventory.labels.fulfillRequest"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["inventory.labels.fulfillRequest"],null],"shouldFulfillRequest"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["append",["unknown",["requestedItem","item","name"]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-2"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","input-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["requestedItem","quantity"]]]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","input-group-addon"],["flush-element"],["append",["unknown",["requestedItem","item","distributionUnit"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showRemoveItem",["get",["requestedItem"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["buttons.remove"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["requestedItem"]},{"statements":[["text"," "],["open-element","h3",[]],["flush-element"],["append",["helper",["t"],["inventory.labels.requestedItems"],null],false],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.name"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.quantity"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.action"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","requestedItems"]]],null,2],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["inventory-typeahead"],null,[["class","property","label","content","selection"],["col-sm-8 test-inv-item","inventoryItemTypeAhead",["helper",["t"],["inventory.labels.inventoryItem"],null],["get",["inventoryList"]],["get",["selectedInventoryItem"]]]]],false],["text","\\n\\n "],["append",["helper",["number-input"],null,[["property","label","class"],["quantity",["get",["quantityLabel"]],"col-sm-3 test-inv-quantity"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-sm-1"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["close-element"],["text","\\n "],["open-element","h4",[]],["static-attr","class","form-control-static"],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-plus"],["modifier",["action"],[["get",[null]],"addInventoryItem"]],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["showRequestedItems"]]],null,3],["block",["if"],[["get",["canFulfill"]]],null,1]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.item"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","inventoryItem","name"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.quantityRequested"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","quantity"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.quantityOnHand"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","inventoryItem","quantity"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["isRequested"]]],null,5,4],["text"," "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","class"],["deliveryLocation",["helper",["t"],["inventory.labels.deliveryLocation"],null],["get",["warehouseList"]],["get",["model","deliveryLocation"]],"test-delivery-location"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","class"],["deliveryAisle",["helper",["t"],["inventory.labels.deliveryAisle"],null],["get",["aisleLocationList"]],["get",["model","deliveryAisle"]],"test-delivery-aisle"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","class"],["expenseAccount",["helper",["t"],["inventory.labels.billTo"],null],["get",["expenseAccountList"]],["get",["model","expenseAccount"]],"test-bill-to"]]],false],["text","\\n"],["block",["if"],[["get",["isFulfilling"]]],null,0]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],6]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/inventory/request/template.hbs"}})}),define("hospitalrun/inventory/route",["exports","hospitalrun/routes/abstract-module-route","hospitalrun/mixins/fulfill-request","hospitalrun/mixins/inventory-id","hospitalrun/mixins/inventory-locations"],function(e,t,n,a,l){e.default=t.default.extend(n.default,a.default,l.default,{addCapability:"add_inventory_item",additionalButtons:function(){if(this.currentUserCan(this.get("addCapability")))return[{buttonAction:"newInventoryBatch",buttonText:"+ inventory received",class:"btn btn-primary"}]}.property(),additionalModels:[{name:"aisleLocationList",findArgs:["lookup","aisle_location_list"]},{name:"expenseAccountList",findArgs:["lookup","expense_account_list"]},{name:"inventoryTypeList",findArgs:["lookup","inventory_types"]},{name:"inventoryUnitList",findArgs:["lookup","unit_types"]},{name:"warehouseList",findArgs:["lookup","warehouse_list"]},{name:"vendorList",findArgs:["lookup","vendor_list"]}],currentItem:null,moduleName:"inventory",newButtonText:"+ new request",sectionTitle:"Inventory",actions:{addPurchase:function(e){var t=this.get("currentItem"),n=t.get("purchases");n.addObject(e),this.newPurchaseAdded(t,e).then(function(){t.updateQuantity(),t.save().then(function(){this.send("closeModal")}.bind(this))}.bind(this))},newInventoryBatch:function(){this.currentUserCan(this.get("addCapability"))&&this.transitionTo("inventory.batch","new")},newRequest:function(){this.transitionTo("inventory.request","new")},allItems:function(){this.transitionTo("inventory.listing")},showAddPurchase:function(e){var t=this.get("store").createRecord("inv-purchase",{dateReceived:new Date,distributionUnit:e.get("distributionUnit"),inventoryItem:e.get("id")});this.set("currentItem",e),this.send("openModal","inventory.purchase.edit",t)}}})}),define("hospitalrun/inventory/search/controller",["exports","hospitalrun/inventory/listing/controller"],function(e,t){e.default=t.default.extend()}),define("hospitalrun/inventory/search/route",["exports","hospitalrun/routes/abstract-search-route"],function(e,t){e.default=t.default.extend({moduleName:"inventory",searchKeys:[{name:"crossReference",type:"contains"},{name:"description",type:"fuzzy"},{name:"friendlyId",type:"contains"},{name:"name",type:"fuzzy"}],searchModel:"inventory"})}),define("hospitalrun/inventory/search/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"MRgLDxZL",block:'{"statements":[["block",["search-listing"],null,[["newButtonText","allButtonText"],[["helper",["t"],["inventory.labels.newItem"],null],["helper",["t"],["inventory.labels.allInventory"],null]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["partial","inventory/listing"],["text","\\n"]],"locals":[]}],"hasPartials":true}',meta:{moduleName:"hospitalrun/inventory/search/template.hbs"}})}),define("hospitalrun/inventory/transfer/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","ember-i18n"],function(e,t,n,a){e.default=t.default.extend({inventoryController:n.default.inject.controller("inventory"),warehouseList:n.default.computed.alias("inventoryController.warehouseList"),aisleLocationList:n.default.computed.alias("inventoryController.aisleLocationList"),lookupListsToUpdate:[{name:"aisleLocationList",property:"model.transferAisleLocation",id:"aisle_location_list"},{name:"warehouseList",property:"model.transferLocation",id:"warehouse_list"}],title:(0,a.translationMacro)("inventory.titles.transfer"),updateButtonText:(0,a.translationMacro)("inventory.labels.transfer"),updateButtonAction:"transfer",updateCapability:"adjust_inventory_location",actions:{cancel:function(){this.send("closeModal")},transfer:function(){this.updateLookupLists(),this.send("transferItems",this.get("model"),!0)}}})}),define("hospitalrun/inventory/transfer/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"agZXzn11",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.item"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","transferItem","name"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.transferFrom"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","locationName"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["inventory.labels.quantityAvailable"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","quantity"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["class","property","label","list","selection"],["required","transferLocation",["helper",["t"],["inventory.labels.transferTo"],null],["get",["warehouseList"]],["get",["model","transferLocation"]]]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection"],["transferAisleLocation",["helper",["t"],["inventory.labels.transferToAisle"],null],["get",["aisleLocationList"]],["get",["model","transferAisleLocation"]]]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["number-input"],null,[["property","label","class"],["adjustmentQuantity",["helper",["t"],["labels.quantity"],null],"col-sm-3 required"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["dateCompleted",["helper",["t"],["inventory.labels.dateTransferred"],null],"col-sm-4 required"]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/inventory/transfer/template.hbs"}})}),define("hospitalrun/invoices/add-line-item/controller",["exports","hospitalrun/mixins/billing-categories","ember","hospitalrun/mixins/is-update-disabled"],function(e,t,n,a){e.default=n.default.Controller.extend(t.default,a.default,{invoiceController:n.default.inject.controller("invoices"),billingCategoryList:n.default.computed.alias("invoiceController.billingCategoryList"),editController:n.default.inject.controller("invoices/edit"),title:"Add Line Item",updateButtonText:"Add",updateButtonAction:"add",showUpdateButton:!0,actions:{cancel:function(){this.send("closeModal")},add:function(){this.get("model").save().then(function(e){this.get("editController").send("addLineItem",e)}.bind(this))}},billingCategories:function(){var e=this.get("defaultBillingCategories"),t=this.get("billingCategoryList");return n.default.isEmpty(t)?n.default.Object.create({value:e}):t}.property("billingCategoryList","defaultBillingCategories")})}),define("hospitalrun/invoices/add-line-item/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"n6Aw1U4J",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["em-input"],null,[["property","label","class"],["name",["helper",["t"],["labels.name"],null],"required"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","className","label","list","selection"],["category","required",["helper",["t"],["labels.category"],null],["get",["billingCategories"]],["get",["model","category"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/invoices/add-line-item/template.hbs"}})}),define("hospitalrun/invoices/delete/controller",["exports","hospitalrun/controllers/abstract-delete-controller"],function(e,t){e.default=t.default.extend({title:"Delete Invoice"})}),define("hospitalrun/invoices/delete/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"eXEh2gJn",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[],"locals":[]},{"statements":[["text"," "],["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0],["text","\\n "],["open-element","div",[]],["static-attr","class","alert alert-danger"],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-warning-sign"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["t"],["billing.alerts.deleteItem"],[["item"],[["get",["model","displayInvoiceNumber"]]]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/invoices/delete/template.hbs"}})}),define("hospitalrun/invoices/edit/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","moment","hospitalrun/mixins/number-format","hospitalrun/mixins/patient-submodule","hospitalrun/mixins/publish-statuses","hospitalrun/utils/select-values","npm:uuid"],function(e,t,n,a,l,s,i,o,r){e.default=t.default.extend(l.default,s.default,i.default,{invoiceController:n.default.inject.controller("invoices"),expenseAccountList:n.default.computed.alias("invoiceController.expenseAccountList.value"),patientList:n.default.computed.alias("invoiceController.patientList"),pharmacyCharges:[],pricingProfiles:n.default.computed.map("invoiceController.pricingProfiles",o.default.selectObjectMap),supplyCharges:[],updateCapability:"add_invoice",wardCharges:[],additionalButtons:function(){var e=[],t=this.get("model.isValid"),n=this.get("model.status");return t&&"Draft"===n&&e.push({class:"btn btn-default default",buttonAction:"finalizeInvoice",buttonIcon:"glyphicon glyphicon-ok",buttonText:"Invoice Ready"}),e.push({class:"btn btn-default neutral",buttonAction:"printInvoice",buttonIcon:"glyphicon glyphicon-print",buttonText:"Print"}),e}.property("model.isValid","model.status"),canAddCharge:function(){return this.currentUserCan("add_charge")}.property(),canAddPayment:function(){return this.currentUserCan("add_payment")}.property(),pharmacyExpenseAccount:function(){var e=this.get("expenseAccountList");if(!n.default.isEmpty(e)){var t=e.find(function(e){if(e.toLowerCase().indexOf("pharmacy")>-1)return!0});return t}}.property("expenseAccountList.value"),actions:{addItemCharge:function(e){var t=e.get("details"),n=this.store.createRecord("line-item-detail",{id:r.default.v4()});t.addObject(n)},addLineItem:function(e){var t=this.get("model.lineItems");t.addObject(e),this.send("update",!0),this.send("closeModal")},deleteCharge:function(e){this._deleteObject(e.itemToDelete,e.deleteFrom)},deleteLineItem:function(e){this._deleteObject(e.itemToDelete,this.get("model.lineItems"))},finalizeInvoice:function(){var e=this.get("model"),t=e.get("payments"),a=[];e.get("patient.payments").then(function(l){l.forEach(function(l){var s=l.get("invoice");n.default.isEmpty(s)&&(l.set("invoice",e),a.push(l.save()),t.addObject(l))}.bind(this)),n.default.RSVP.all(a).then(function(){this.set("model.status","Billed"),this.send("update")}.bind(this))}.bind(this))},printInvoice:function(){this.transitionToRoute("print.invoice",this.get("model"))},removePayment:function(e){var t=this.get("model.payments"),n=e.itemToRemove;n.set("invoice"),t.removeObject(e.itemToRemove),this.send("update",!0),this.send("closeModal")},showAddLineItem:function(){var e=this.store.createRecord("billing-line-item",{id:r.default.v4()});this.send("openModal","invoices.add-line-item",e)},showDeleteItem:function(e,t){this.showDeleteModal(e,n.default.Object.create({confirmAction:"deleteCharge",deleteFrom:t,title:"Delete Charge"}))},showDeleteLineItem:function(e){this.showDeleteModal(e,n.default.Object.create({confirmAction:"deleteLineItem",title:"Delete Line Item"}))},showDeleteModal:function(e,t){t=n.default.merge(t,n.default.Object.create({message:"Are you sure you want to delete "+e.get("name")+"?",itemToDelete:e,updateButtonAction:"confirm",updateButtonText:this.get("i18n").t("buttons.ok")})),this.send("openModal","dialog",t)},showRemovePayment:function(e){var t="Are you sure you want to remove this payment from this invoice?",a=n.default.Object.create({itemToRemove:e}),l="Remove Payment";this.displayConfirm(l,t,"removePayment",a)},toggleDetails:function(e){e.toggleProperty("showDetails")}},changePaymentProfile:function(){var e=this.get("model.patient"),t=this.get("model.paymentProfile");!n.default.isEmpty(e)&&n.default.isEmpty(t)&&this.set("model.paymentProfile",e.get("paymentProfile"))}.observes("model.patient"),paymentProfileChanged:function(){var e=this._getValidNumber(this.get("model.paymentProfile.discountPercentage")),t=this.get("model.originalPaymentProfileId"),a=this.get("model.paymentProfile.id");if(a!==t){var l=this.get("model.lineItems");l.forEach(function(t){var l=t.get("details"),s=0;if(l.forEach(function(e){var t=e.get("pricingItem.pricingOverrides");if(!n.default.isEmpty(t)){var l=t.findBy("profile.id",a);n.default.isEmpty(l)||n.default.set(e,"price",l.get("price"))}}.bind(this)),e>0){var i=t.get("total");s=this._numberFormat(e/100*i,!0),t.set("discount",s)}}.bind(this)),this.set("model.originalPaymentProfileId",a)}}.observes("model.paymentProfile"),visitChanged:function(){var e=this.get("model.visit"),t=this.get("model.lineItems");if(!n.default.isEmpty(e)&&n.default.isEmpty(t)){this.set("model.originalPaymentProfileId");var a=this.resolveVisitChildren();n.default.RSVP.allSettled(a,"Resolved visit children before generating invoice").then(function(t){var a=this,l=this._resolveVisitDescendents(t,"charges");n.default.isEmpty(l)?(this._generateLineItems(e,t),this.paymentProfileChanged()):!function(){var s="Reloaded charges before generating invoice";n.default.RSVP.allSettled(l,s).then(function(a){var l=[];a.forEach(function(e){if(!n.default.isEmpty(e.value)){var t=e.value.get("pricingItem");n.default.isEmpty(t)||l.push(t.reload())}}),s="Reloaded pricing items before generating invoice",n.default.RSVP.allSettled(l,s).then(function(){this._generateLineItems(e,t),this.paymentProfileChanged()}.bind(this))}.bind(a))}()}.bind(this),function(e){console.log("Error resolving visit children",e)})}}.observes("model.visit"),_addPharmacyCharge:function(e,t){var n=this;return e.getMedicationDetails(t).then(function(t){var a=e.get("quantity"),l=n.get("pharmacyCharges"),s=n.get("pharmacyExpenseAccount"),i=n.store.createRecord("line-item-detail",{id:r.default.v4(),name:t.name,quantity:a,price:t.price,department:"Pharmacy",expenseAccount:s});l.addObject(i)})},_addSupplyCharge:function(e,t){var n=this.get("supplyCharges"),a=this._createChargeItem(e,t);n.addObject(a)},_createChargeItem:function(e,t){var n=this.store.createRecord("line-item-detail",{id:r.default.v4(),name:e.get("pricingItem.name"),expenseAccount:e.get("pricingItem.expenseAccount"),quantity:e.get("quantity"),price:e.get("pricingItem.price"),department:t,pricingItem:e.get("pricingItem")});return n},_deleteObject:function(e,t){t.removeObject(e),e.get("isNew")||e.destroyRecord(),this.send("update",!0),this.send("closeModal")},_mapWardCharge:function(e){return this._createChargeItem(e,"Ward")},_completeBeforeUpdate:function(e,t,n){var a="inv",l=void 0;e.incrementProperty("value",1),l=e.get("value"),a+=l<1e5?String("00000"+l).slice(-5):l,this.set("model.id",a),e.save().then(t,n)},_generateLineItems:function(e,t){var l=this,s=e.get("endDate"),i=t[0].value,o=t[1].value,d=void 0,c=void 0,u=this.get("model.lineItems"),p=t[2].value,m=t[3].value,f=e.get("startDate"),h=e.get("charges"); +if(this.setProperties({pharmacyCharges:[],supplyCharges:[],wardCharges:[]}),!n.default.isEmpty(s)&&!n.default.isEmpty(f)){s=(0,a.default)(s),f=(0,a.default)(f);var g=s.diff(f,"days");g>1&&(d=this.store.createRecord("line-item-detail",{id:r.default.v4(),name:"Days",quantity:g}),c=this.store.createRecord("billing-line-item",{id:r.default.v4(),category:"Hospital Charges",name:"Room/Accomodation"}),c.get("details").addObject(d),u.addObject(c))}var b=[];p.forEach(function(e){b.push(this._addPharmacyCharge(e,"inventoryItem"))}.bind(this)),this.set("wardCharges",h.map(this._mapWardCharge.bind(this))),m.forEach(function(e){var t=e.get("charges");t.forEach(function(e){e.get("medicationCharge")?b.push(this._addPharmacyCharge(e,"medication")):this._addSupplyCharge(e,"O.R.")}.bind(this))}.bind(this)),o.forEach(function(e){n.default.isEmpty(e.get("labType"))||this._addSupplyCharge(n.default.Object.create({pricingItem:e.get("labType"),quantity:1}),"Lab"),e.get("charges").forEach(function(e){this._addSupplyCharge(e,"Lab")}.bind(this))}.bind(this)),i.forEach(function(e){n.default.isEmpty(e.get("imagingType"))||this._addSupplyCharge(n.default.Object.create({pricingItem:e.get("imagingType"),quantity:1}),"Imaging"),e.get("charges").forEach(function(e){this._addSupplyCharge(e,"Imaging")}.bind(this))}.bind(this)),n.default.RSVP.all(b).then(function(){c=l.store.createRecord("billing-line-item",{id:r.default.v4(),name:"Pharmacy",category:"Hospital Charges"}),c.get("details").addObjects(l.get("pharmacyCharges")),u.addObject(c),c=l.store.createRecord("billing-line-item",{id:r.default.v4(),name:"X-ray/Lab/Supplies",category:"Hospital Charges"}),c.get("details").addObjects(l.get("supplyCharges")),u.addObject(c),c=l.store.createRecord("billing-line-item",{id:r.default.v4(),name:"Ward Items",category:"Hospital Charges"}),c.get("details").addObjects(l.get("wardCharges")),u.addObject(c),c=l.store.createRecord("billing-line-item",{id:r.default.v4(),name:"Physical Therapy",category:"Hospital Charges"}),u.addObject(c),c=l.store.createRecord("billing-line-item",{id:r.default.v4(),name:"Others/Misc",category:"Hospital Charges"}),u.addObject(c),l.send("update",!0)})},_resolveVisitDescendents:function(e,t){var a=[];return e.forEach(function(e){n.default.isEmpty(e.value)||e.value.forEach(function(e){var l=e.get(t);n.default.isEmpty(l)||l.forEach(function(e){a.push(e.reload())})})}),a},beforeUpdate:function(){return new n.default.RSVP.Promise(function(e,t){var a=this.get("model.lineItems"),l=[];a.forEach(function(e){e.get("details").forEach(function(e){l.push(e.save())}.bind(this)),l.push(e.save())}.bind(this)),n.default.RSVP.all(l,"Saved invoice children before saving invoice").then(function(){this.get("model.isNew")?this.store.find("sequence","invoice").then(function(n){this._completeBeforeUpdate(n,e,t)}.bind(this),function(){var n=this.get("store"),a=n.push(n.normalize("sequence",{id:"invoice",value:0}));this._completeBeforeUpdate(a,e,t)}.bind(this)):e()}.bind(this),t)}.bind(this))},afterUpdate:function(){var e="The invoice record has been saved.";this.displayAlert("Invoice Saved",e)}})}),define("hospitalrun/invoices/edit/route",["exports","hospitalrun/routes/abstract-edit-route","ember"],function(e,t,n){e.default=t.default.extend({editTitle:"Edit Invoice",modelName:"invoice",newTitle:"New Invoice",actions:{deleteCharge:function(e){this.controller.send("deleteCharge",e)},deleteLineItem:function(e){this.controller.send("deleteLineItem",e)},removePayment:function(e){this.controller.send("removePayment",e)}},afterModel:function(e){return new n.default.RSVP.Promise(function(t,a){var l=e.get("lineItems"),s=[];l.forEach(function(e){s.push(e.reload())}),n.default.RSVP.all(s,"Reload billing line items for invoice").then(function(e){var l=[];e.forEach(function(e){e.get("details").forEach(function(e){l.push(e.reload())})}),n.default.RSVP.all(l,"Reload billing line item details for invoice").then(t,a)},a)})},getNewData:function(){return n.default.RSVP.resolve({billDate:new Date,status:"Draft"})},setupController:function(e,t){t.set("originalPaymentProfileId",t.get("paymentProfile.id")),this._super(e,t);var a=t.get("lineItems"),l=[];a.forEach(function(e){e.get("details").forEach(function(e){var t=e.get("pricingItem");n.default.isEmpty(t)||l.push(t.reload())})})}})}),define("hospitalrun/invoices/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"HLQLw+RK",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],17]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showRemovePayment",["get",["payment"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.remove"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"showEditPayment",["get",["payment"]]],[["bubbles"],[false]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["payment","canRemovePayment"]]],null,0],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["modifier",["action"],[["get",[null]],"showEditPayment",["get",["payment"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["payment","datePaid"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["payment","amount"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["payment","paymentType"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["payment","notes"]],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canAddPayment"]]],null,1],["text"," "],["close-element"],["text","\\n"]],"locals":["payment"]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"showAddPayment",["get",["model"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["admin.roles.capability.addPayment"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteItem",["get",["detail"]],["get",["item","details"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.delete"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","colspan","2"],["static-attr","class","col-xs-6 input-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["detail","name"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["detail","quantity"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["detail","price"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["select-list"],null,[["class","content","value","action"],["form-control",["get",["expenseAccountList"]],["get",["detail","expenseAccount"]],["helper",["action"],[["get",[null]],["helper",["mut"],[["get",["detail","expenseAccount"]]],null]],null]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["text","\\n "],["append",["helper",["number-format"],[["get",["detail","amountOwed"]]],null],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-2"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddCharge"]]],null,4],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["detail"]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-primary"],["modifier",["action"],[["get",[null]],"addItemCharge",["get",["item"]]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["admin.roles.capability.addCharge"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","th",[]],["static-attr","colspan","2"],["static-attr","class","col-xs-6"],["flush-element"],["append",["helper",["t"],["labels.name"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["helper",["t"],["labels.quantity"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["helper",["t"],["labels.price"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["helper",["t"],["labels.expense_to"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["append",["helper",["t"],["labels.total"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddCharge"]]],null,6],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["item","details"]]],null,5]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteLineItem",["get",["item"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.delete"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-5"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","input-group"],["flush-element"],["text","\\n "],["open-element","span",[]],["dynamic-attr","class",["concat",["input-group-addon glyphicon\\n ",["helper",["if"],[["get",["item","showDetails"]],"glyphicon-minus","glyphicon-plus"],null]]]],["modifier",["action"],[["get",[null]],"toggleDetails",["get",["item"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","strong",[]],["flush-element"],["append",["helper",["input"],null,[["class","value"],["form-control",["get",["item","name"]]]]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["text","\\n "],["append",["helper",["number-format"],[["get",["item","total"]]],null],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control text-right",["get",["item","discount"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control text-right",["get",["item","nationalInsurance"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["append",["helper",["input"],null,[["class","value"],["form-control text-right",["get",["item","privateInsurance"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["item","amountOwed"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-2"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddCharge"]]],null,8],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["item","showDetails"]]],null,7]],"locals":["item"]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-12"],["flush-element"],["text","\\n "],["open-element","strong",[]],["flush-element"],["append",["unknown",["categoryGroup","category"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["categoryGroup","items"]]],null,9],["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["labels.total"],null],false],["text"," "],["append",["unknown",["categoryGroup","category"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["categoryGroup","total"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["categoryGroup","discount"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["categoryGroup","nationalInsurance"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["categoryGroup","privateInsurance"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["categoryGroup","amountOwed"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["categoryGroup"]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"showAddLineItem"],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.addLineItem"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group col-xs-3"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.visit"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","visit","visitDescription"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-typeahead"],null,[["property","label","content","selection","class"],["patientTypeAhead",["helper",["t"],["labels.patient"],null],["get",["patientList"]],["get",["selectedPatient"]],"col-xs-4 required invoice-patient"]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content","optionValuePath","optionLabelPath","selected","prompt"],["col-xs-4 required invoice-visit",["helper",["t"],["labels.visit"],null],"visit",["get",["patientVisitsForSelect"]],"selectObject","selectObject.visitDescription",["get",["model","visit"]],"Please select a visit"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group col-xs-2"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.invoiceId"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","id"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-summary"],null,[["patient","returnTo","returnToContext","disablePatientLink"],[["get",["model","patient"]],"invoices.edit",["get",["model","id"]],["get",["model","isNew"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["unless"],[["get",["model","isNew"]]],null,15],["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n"],["block",["unless"],[["get",["model","isNew"]]],null,14],["text"," "],["append",["helper",["date-picker"],null,[["property","label","class"],["billDate",["helper",["t"],["labels.billDate"],null],"col-xs-2"]]],false],["text","\\n"],["block",["if"],[["get",["model","isNew"]]],null,13,12],["text"," "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["externalInvoiceNumber",["helper",["t"],["billing.labels.externalInvoiceNumber"],null],"col-xs-3 external-invoice-no"]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["label","property","content","optionValuePath","optionLabelPath","class","prompt","selected"],[["helper",["t"],["billing.labels.paymentProfile"],null],"paymentProfile",["get",["pricingProfiles"]],"selectObject","selectObject.name","col-xs-3"," ",["get",["model","paymentProfile"]]]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],16],["text"," "],["open-element","form",[]],["static-attr","class","form-inline"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel detail-section"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["text","\\n "],["append",["helper",["t"],["labels.lineItems"],null],false],["text","\\n"],["block",["if"],[["get",["canAddCharge"]]],null,11],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-5"],["flush-element"],["append",["helper",["t"],["labels.description"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["append",["helper",["t"],["billing.labels.actualCharges"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["append",["helper",["t"],["labels.discount"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["append",["helper",["t"],["billing.labels.insurance"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["append",["helper",["t"],["billing.labels.hmoCom"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-1 text-right"],["flush-element"],["append",["helper",["t"],["labels.excess"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2 text-right"],["flush-element"],["append",["helper",["t"],["labels.action"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","lineItemsByCategory"]]],null,10],["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["labels.total"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["model","total"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["model","discount"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["model","nationalInsurance"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["model","privateInsurance"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["model","patientResponsibility"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["billing.labels.paymentsDeposits"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","colspan","4"],["flush-element"],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["text","-"],["append",["helper",["number-format"],[["get",["model","paidTotal"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","strong",[]],["flush-element"],["append",["helper",["t"],["labels.grandTotal"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","colspan","4"],["flush-element"],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","text-right"],["flush-element"],["append",["helper",["number-format"],[["get",["model","remainingBalance"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel detail-section"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["text","\\n "],["append",["helper",["t"],["labels.remarks"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["append",["helper",["textarea"],null,[["class","value"],["form-control",["get",["model","remarks"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel detail-section"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","h3",[]],["static-attr","class","panel-title"],["flush-element"],["text","\\n "],["append",["helper",["t"],["labels.payments"],null],false],["text","\\n"],["block",["if"],[["get",["canAddPayment"]]],null,3],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.date"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.amount"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.type"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.notes"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.action"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","payments"]]],null,2],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/invoices/edit/template.hbs"}})}),define("hospitalrun/invoices/index/controller",["exports","hospitalrun/controllers/abstract-paged-controller"],function(e,t){e.default=t.default.extend({addPermission:"add_invoice",deletePermission:"delete_invoice",canAddPayment:function(){return this.currentUserCan("add_payment")}.property(),startKey:[],queryParams:["startKey","status"]})}),define("hospitalrun/invoices/index/route",["exports","hospitalrun/routes/abstract-index-route","ember"],function(e,t,n){e.default=t.default.extend({modelName:"invoice",pageTitle:"Invoice Listing",_getStartKeyFromItem:function(e){var t=e.get("billDateAsTime"),n=this._getPouchIdFromItem(e),a=e.get("status");return[a,t,n]},_modelQueryParams:function(e){var t=void 0,a=this._getMaxPouchId(),l=this.get("maxValue"),s=this._getMinPouchId(),i=e.status;return n.default.isEmpty(i)&&(i="Billed"),this.set("pageTitle",i+" Invoices"),t={options:{startkey:[i,null,s],endkey:[i,l,a]},mapReduce:"invoice_by_status"},"All"===i&&(delete t.options.startkey,delete t.options.endkey),t},queryParams:{startKey:{refreshModel:!0},status:{refreshModel:!0}}})}),define("hospitalrun/invoices/index/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"+thqAl2P",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],9]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["billing.alerts.noInvoiceFound"],null],false],["text"," "],["open-element","a",[]],["static-attr","href","#"],["modifier",["action"],[["get",[null]],"newItem"]],["flush-element"],["append",["helper",["t"],["billing.buttons.createInvoice"],null],false],["close-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"deleteItem",["get",["invoice"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["buttons.delete"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editItem",["get",["invoice"]]],[["bubbles"],[false]]],["flush-element"],["append",["helper",["t"],["buttons.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"showAddPayment",["get",["invoice"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["admin.roles.capability.addPayment"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canAddPayment"]]],null,3],["block",["if"],[["get",["canAdd"]]],null,2],["block",["if"],[["get",["canDelete"]]],null,1]],"locals":[]},{"statements":[["block",["if"],[["get",["showActions"]]],null,4]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["static-attr","class","clickable"],["modifier",["action"],[["get",[null]],"editItem",["get",["invoice"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","invoice-number"],["flush-element"],["append",["unknown",["invoice","displayInvoiceNumber"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["invoice","billDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["invoice","status"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["invoice","patient","displayName"]],false],["text"," - "],["append",["unknown",["invoice","patient","displayPatientId"]],false],["text"," "],["open-element","br",[]],["flush-element"],["close-element"],["append",["unknown",["invoice","visit","primaryDiagnoses"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["invoice","total"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["invoice","remainingBalance"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["unless"],[["get",["invoice","paidFlag"]]],null,5],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["invoice"]},{"statements":[["text"," "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.number"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.billDate"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.status"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.patient"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.total"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.balanceDue"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["showActions"]]],null,7],["text"," "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,6],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["hasRecords"]]],null,8,0]],"locals":[]}],"hasPartials":false}', +meta:{moduleName:"hospitalrun/invoices/index/template.hbs"}})}),define("hospitalrun/invoices/payment/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/mixins/patient-submodule"],function(e,t,n,a){e.default=t.default.extend(a.default,{cancelAction:"closeModal",findPatientVisits:!1,invoiceController:n.default.inject.controller("invoices"),newPayment:!1,expenseAccountList:n.default.computed.alias("invoiceController.expenseAccountList"),patientList:n.default.computed.alias("invoiceController.patientList"),_finishUpdate:function(e,t){this.send("closeModal"),this.displayAlert(t,e)},currentPatient:function(){var e=this.get("model.paymentType");return"Deposit"===e?this.get("model.patient"):this.get("model.invoice.patient")}.property("model.patient","model.paymentType","model.invoice.patient"),title:function(){var e=this.get("model.isNew"),t=this.get("model.paymentType");return e?"Add "+t:"Edit "+t}.property("model.isNew","model.paymentType"),selectPatient:function(){var e=this.get("model.isNew"),t=this.get("model.paymentType");return e&&"Deposit"===t}.property("model.isNew","model.paymentType"),beforeUpdate:function(){this.get("model.isNew")?this.set("newPayment",!0):this.set("newPayment",!1);var e=this.get("currentPatient");return this.set("model.charityPatient","Charity"===e.get("patientType")),n.default.RSVP.resolve()},afterUpdate:function(){this.get("model").save().then(function(e){var t=this;this.get("newPayment")?!function(){var n=t.get("currentPatient");n.get("payments").then(function(t){t.addObject(e),n.save().then(function(){var t=this;if("Deposit"===e.get("paymentType")){var a="A deposit of "+e.get("amount")+" was added for patient "+n.get("displayName");this._finishUpdate(a,"Deposit Added")}else!function(){var n=t.get("model.invoice");n.addPayment(e),n.save().then(function(){var t="A payment of "+e.get("amount")+" was added to invoice "+n.get("id");this._finishUpdate(t,"Payment Added")}.bind(t))}()}.bind(this))}.bind(t))}():this.send("closeModal")}.bind(this))}})}),define("hospitalrun/invoices/payment/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"R4hTidw9",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText","updateButtonClass"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]],"update-payment-btn"]],4]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.patient"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","invoice","patient","displayName"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-typeahead"],null,[["property","label","content","selection","class"],["patientTypeAhead",["helper",["t"],["labels.patient"],null],["get",["patientList"]],["get",["selectedPatient"]],"required payment-patient"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["selectPatient"]]],null,1,0]],"locals":[]},{"statements":[["block",["if"],[["get",["model","isNew"]]],null,2],["text"," "],["append",["helper",["number-input"],null,[["property","label","class"],["amount",["helper",["t"],["labels.amount"],null],"required payment-amount"]]],false],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","maxDate","class"],["datePaid",["helper",["t"],["labels.datePaid"],null],"now","required"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection"],["expenseAccount",["helper",["t"],["labels.creditTo"],null],["get",["expenseAccountList"]],["get",["model","expenseAccount"]]]]],false],["text","\\n "],["append",["helper",["em-text"],null,[["property","label"],["notes",["helper",["t"],["labels.notes"],null]]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],3]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/invoices/payment/template.hbs"}})}),define("hospitalrun/invoices/route",["exports","hospitalrun/routes/abstract-module-route","hospitalrun/mixins/modal-helper","hospitalrun/mixins/patient-list-route"],function(e,t,n,a){e.default=t.default.extend(n.default,a.default,{addCapability:"add_invoice",currentScreenTitle:"Invoices",editTitle:"Edit Invoice",newTitle:"New Invoice",moduleName:"invoices",newButtonText:"+ new invoice",sectionTitle:"Invoices",additionalButtons:function(){if(this.currentUserCan("add_payment"))return[{class:"btn btn-default",buttonText:"+ add deposit",buttonAction:"showAddDeposit"}]}.property(),additionalModels:[{name:"billingCategoryList",findArgs:["lookup","billing_categories"]},{name:"expenseAccountList",findArgs:["lookup","expense_account_list"]},{name:"pricingProfiles",findArgs:["price-profile"]}],actions:{showAddDeposit:function(){var e=this.store.createRecord("payment",{paymentType:"Deposit",datePaid:new Date});this.send("openModal","invoices.payment",e)},showAddPayment:function(e){var t=this.store.createRecord("payment",{invoice:e,paymentType:"Payment",datePaid:new Date});this.send("openModal","invoices.payment",t)},showEditPayment:function(e){this.currentUserCan("add_payment")&&this.send("openModal","invoices.payment",e)}},subActions:function(){var e=[{text:"Billed",linkTo:"invoices.index",statusQuery:"Billed"}];return this.currentUserCan("add_invoice")&&(e.push({text:"Drafts",linkTo:"invoices.index",statusQuery:"Draft"}),e.push({text:"All Invoices",linkTo:"invoices.index",statusQuery:"All"})),e.push({text:"Paid",linkTo:"invoices.index",statusQuery:"Paid"}),e}.property()})}),define("hospitalrun/invoices/search/route",["exports","hospitalrun/routes/abstract-search-route"],function(e,t){e.default=t.default.extend({moduleName:"invoices",searchKeys:[{name:"externalInvoiceNumber",type:"contains"},{name:"patientInfo",type:"contains"}],searchModel:"invoice"})}),define("hospitalrun/invoices/search/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"7Stx2dsU",block:'{"statements":[["block",["search-listing"],null,[["newButtonText","allButtonText"],["New Invoice","All Invoices"]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["partial","invoices/index"],["text","\\n"]],"locals":[]}],"hasPartials":true}',meta:{moduleName:"hospitalrun/invoices/search/template.hbs"}})}),define("hospitalrun/labs/charge/controller",["exports","hospitalrun/procedures/charge/controller","ember"],function(e,t,n){e.default=t.default.extend({labsEdit:n.default.inject.controller("labs/edit"),cancelAction:"closeModal",newPricingItem:!1,requestingController:n.default.computed.alias("controllers.labs/edit"),pricingList:n.default.computed.alias("controllers.labs/edit.chargesPricingList")})}),define("hospitalrun/labs/charge/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"8qHLvc50",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["partial","procedures/charge"],["text","\\n"]],"locals":[]}],"hasPartials":true}',meta:{moduleName:"hospitalrun/labs/charge/template.hbs"}})}),define("hospitalrun/labs/completed/controller",["exports","hospitalrun/controllers/abstract-paged-controller"],function(e,t){e.default=t.default.extend({startKey:[],showActions:!1})}),define("hospitalrun/labs/completed/labs-completed-list-item/component",["exports","ember"],function(e,t){e.default=t.default.Component.extend({tagName:"tr"})}),define("hospitalrun/labs/completed/labs-completed-list-item/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"53/ixka0",block:'{"statements":[["open-element","td",[]],["static-attr","class","requested-date"],["flush-element"],["append",["helper",["date-format"],[["get",["lab","requestedDate"]]],null],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","lab-date"],["flush-element"],["append",["helper",["date-format"],[["get",["lab","labDate"]]],null],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","patient"],["flush-element"],["append",["unknown",["lab","patient","displayName"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","requested-by"],["flush-element"],["append",["unknown",["lab","requestedBy"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","lab-type"],["flush-element"],["append",["unknown",["lab","labType","name"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","result"],["flush-element"],["append",["unknown",["lab","result"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","notes"],["flush-element"],["append",["unknown",["lab","notes"]],false],["close-element"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[],"hasPartials":false}',meta:{moduleName:"hospitalrun/labs/completed/labs-completed-list-item/template.hbs"}})}),define("hospitalrun/labs/completed/route",["exports","hospitalrun/labs/index/route","ember-i18n"],function(e,t,n){e.default=t.default.extend({pageTitle:(0,n.translationMacro)("labs.completedTitle"),searchStatus:"Completed"})}),define("hospitalrun/labs/completed/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"hCs/6AmP",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],3]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["labs.messages.noCompleted"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["labs/completed/labs-completed-list-item"],null,[["lab"],[["get",["lab"]]]]],false],["text","\\n"]],"locals":["lab"]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.dateRequested"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.dateCompleted"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.patient"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labs.labels.labType"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.results"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.notes"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,1],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model"]]],null,2,0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/labs/completed/template.hbs"}})}),define("hospitalrun/labs/delete/controller",["exports","hospitalrun/controllers/abstract-delete-controller","hospitalrun/mixins/patient-submodule","ember-i18n"],function(e,t,n,a){e.default=t.default.extend(n.default,{title:(0,a.translationMacro)("labs.deleteTitle"),actions:{delete:function(){this.deleteChildFromVisit("labs")}}})}),define("hospitalrun/labs/delete/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"+OJQ5Cwg",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-danger"],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-warning-sign"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["t"],["labs.messages.confirmDeletion"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/labs/delete/template.hbs"}})}),define("hospitalrun/labs/edit/controller",["exports","hospitalrun/controllers/abstract-edit-controller","hospitalrun/mixins/charge-actions","ember","hospitalrun/mixins/patient-submodule"],function(e,t,n,a,l){e.default=t.default.extend(n.default,l.default,{labsController:a.default.inject.controller("labs"),chargePricingCategory:"Lab",chargeRoute:"labs.charge",selectedLabType:null,canComplete:function(){var e=this.get("model.isNew"),t=this.get("model.labTypeName"),n=this.get("selectedLabType");return(!e||!(a.default.isEmpty(t)||a.default.isArray(n)&&n.length>1))&&this.currentUserCan("complete_lab")}.property("selectedLabType.[]","model.labTypeName"),actions:{completeLab:function(){this.set("model.status","Completed"),this.get("model").validate().then(function(){this.get("model.isValid")&&(this.set("model.labDate",new Date),this.send("update"))}.bind(this)).catch(a.default.K)},update:function(){var e=this;this.get("model.isNew")?!function(){var t=e.get("model"),n=e.get("selectedLabType");a.default.isEmpty(e.get("model.status"))&&e.set("model.status","Requested"),e.set("model.requestedBy",t.getUserName()),e.set("model.requestedDate",new Date),a.default.isEmpty(n)?e.saveNewPricing(e.get("model.labTypeName"),"Lab","model.labType").then(function(){this.addChildToVisit(t,"labs","Lab").then(function(){this.saveModel()}.bind(this))}.bind(e)):e.getSelectedPricing("selectedLabType").then(function(e){a.default.isArray(e)?this.createMultipleRequests(e,"labType","labs","Lab"):(this.set("model.labType",e),this.addChildToVisit(t,"labs","Lab").then(function(){this.saveModel()}.bind(this)))}.bind(e))}():this.saveModel()}},additionalButtons:function(){var e=this.get("canComplete"),t=this.get("model.isValid"),n=this.get("i18n");if(t&&e)return[{buttonAction:"completeLab",buttonIcon:"glyphicon glyphicon-ok",class:"btn btn-primary on-white",buttonText:n.t("buttons.complete")}]}.property("canComplete","model.isValid"),pricingTypeForObjectType:"Lab Procedure",pricingTypes:a.default.computed.alias("labsController.labPricingTypes"),pricingList:null,updateCapability:"add_lab",afterUpdate:function(e,t){var n=this.get("i18n"),a=void 0,l=void 0,s=void 0;"Completed"===this.get("model.status")?(s=n.t("labs.alerts.requestCompletedTitle"),l=n.t("labs.alerts.requestCompletedMessage")):(s=n.t("labs.alerts.requestSavedTitle"),l=n.t("labs.alerts.requestSavedMessage")),t&&(a=this.get("cancelAction")),this.saveVisitIfNeeded(s,l,a),this.set("model.selectPatient",!1)}})}),define("hospitalrun/labs/edit/route",["exports","ember","hospitalrun/routes/abstract-edit-route","hospitalrun/mixins/charge-route","moment","hospitalrun/mixins/patient-list-route","ember-i18n"],function(e,t,n,a,l,s,i){e.default=n.default.extend(a.default,s.default,{editTitle:(0,i.translationMacro)("labs.editTitle"),modelName:"lab",newTitle:(0,i.translationMacro)("labs.newTitle"),pricingCategory:"Lab",actions:{returnToAllItems:function(){this.controller.send("returnToAllItems")}},getNewData:function(){return t.default.RSVP.resolve({selectPatient:!0,requestDate:(0,l.default)().startOf("day").toDate()})}})}),define("hospitalrun/labs/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"zksQIuZ7",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],6]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["em-input"],null,[["property","label","class"],["result",["helper",["t"],["labels.result"],null],"test-result-input"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-xs-3"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.visit"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","visit","visitDate"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-xs-6"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labs.labels.labType"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","labType","name"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-xs-9"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","requestedBy"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content","optionValuePath","optionLabelPath","prompt","selected"],["col-xs-3 required test-visit-type",["helper",["t"],["labels.visit"],null],"visit",["get",["patientVisitsForSelect"]],"selectObject","selectObject.visitDescription",["helper",["t"],["labs.labels.addNewVisit"],null],["get",["model","visit"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["checkbox-or-typeahead"],null,[["property","label","list","selection","optionLabelPath","typeAheadType","className","prompt","model"],["labTypeName",["helper",["t"],["labs.labels.labType"],null],["get",["objectTypeList"]],["get",["selectedLabType"]],"name","pricing","required test-lab-type"," ",["get",["model"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-summary"],null,[["patient","returnTo","returnToContext","disablePatientLink"],[["get",["model","patient"]],"labs.edit",["get",["model","id"]],["get",["model","isNew"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-typeahead"],null,[["property","label","content","selection","class"],["patientTypeAhead",["helper",["t"],["labels.patient"],null],["get",["patientList"]],["get",["selectedPatient"]],"required test-patient-name"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model","selectPatient"]]],null,4,3],["block",["if"],[["get",["model","isNew"]]],null,2,1],["block",["if"],[["get",["canComplete"]]],null,0],["text"," "],["append",["helper",["em-text"],null,[["property","label","rows"],["notes",["helper",["t"],["labels.notes"],null],3]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],5]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/labs/edit/template.hbs"}})}),define("hospitalrun/labs/index/controller",["exports","hospitalrun/controllers/abstract-paged-controller","hospitalrun/mixins/user-session"],function(e,t,n){e.default=t.default.extend(n.default,{startKey:[],addPermission:"add_lab"})}),define("hospitalrun/labs/index/labs-edit-button/component",["exports","ember"],function(e,t){e.default=t.default.Component.extend({tagName:"button",classNames:["btn","btn-default","neutral"]})}),define("hospitalrun/labs/index/labs-edit-button/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"D+D+/RzO",block:'{"statements":[["block",["link-to"],["labs.edit",["get",["lab"]]],null,0],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["append",["helper",["t"],["labels.edit"],null],false]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/labs/index/labs-edit-button/template.hbs"}})}),define("hospitalrun/labs/index/labs-list-item/component",["exports","ember"],function(e,t){e.default=t.default.Component.extend({tagName:"tr",classNames:["clickable"],click:function(){this.sendAction("action",this.lab)}})}),define("hospitalrun/labs/index/labs-list-item/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"lUoTUBbz",block:'{"statements":[["open-element","td",[]],["static-attr","class","requested-date"],["flush-element"],["append",["helper",["date-format"],[["get",["lab","requestedDate"]]],[["format"],["l h:mm A"]]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","patient"],["flush-element"],["append",["unknown",["lab","patient","displayName"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","requested-by"],["flush-element"],["append",["unknown",["lab","requestedBy"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","lab-type"],["flush-element"],["append",["unknown",["lab","labType","name"]],false],["close-element"],["text","\\n"],["open-element","td",[]],["static-attr","class","notes"],["flush-element"],["append",["unknown",["lab","notes"]],false],["close-element"],["text","\\n"],["block",["if"],[["get",["showActions"]]],null,1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["labs/index/labs-edit-button"],null,[["lab"],[["get",["lab"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["canEdit"]]],null,0],["text"," "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/labs/index/labs-list-item/template.hbs"}})}),define("hospitalrun/labs/index/route",["exports","hospitalrun/routes/abstract-index-route","ember-i18n"],function(e,t,n){e.default=t.default.extend({modelName:"lab",pageTitle:(0,n.translationMacro)("labs.requestsTitle"),searchStatus:"Requested",_getStartKeyFromItem:function(e){var t=e.get("labDateAsTime"),n=this._getPouchIdFromItem(e),a=e.get("requestedDateAsTime"),l=this.get("searchStatus");return[l,a,t,n]},_modelQueryParams:function(){var e=this._getMaxPouchId(),t=this.get("maxValue"),n=this._getMinPouchId(),a=this.get("searchStatus");return{options:{startkey:[a,null,null,n],endkey:[a,t,t,e]},mapReduce:"lab_by_status"}}})}),define("hospitalrun/labs/index/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"6Iu3UI4u",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],5]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["open-element","a",[]],["static-attr","href","#"],["modifier",["action"],[["get",[null]],"newItem"]],["flush-element"],["append",["helper",["t"],["labs.messages.createNewRecord"],null],false],["close-element"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["labs.messages.noItemsFound"],null],false],["text"," "],["block",["if"],[["get",["canAdd"]]],null,0],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["labs/index/labs-list-item"],null,[["lab","action","showActions","canEdit"],[["get",["lab"]],"editItem",["get",["showActions"]],["get",["canEdit"]]]]],false],["text","\\n"]],"locals":["lab"]},{"statements":[["text"," "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.dateRequested"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.patient"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labs.labels.labType"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["static-attr","class","col-xs-2"],["flush-element"],["append",["helper",["t"],["labels.notes"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["showActions"]]],null,3],["text"," "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,2],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["hasRecords"]]],null,4,1]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/labs/index/template.hbs"}})}),define("hospitalrun/labs/route",["exports","hospitalrun/routes/abstract-module-route","ember-i18n"],function(e,t,n){e.default=t.default.extend({addCapability:"add_lab",additionalModels:[{name:"labPricingTypes",findArgs:["lookup","lab_pricing_types"]}],allowSearch:!1,moduleName:"labs",newButtonText:(0,n.translationMacro)("labs.buttons.newButton"),sectionTitle:(0,n.translationMacro)("labs.sectionTitle")})}),define("hospitalrun/locales/de/translations",["exports"],function(e){e.default={dashboard:{title:"Was möchten Sie tun?"},navigation:{imaging:"Bildgebung",inventory:"Inventar",patients:"Patienten",appointments:"Termine",medication:"Medikation",labs:"Labore",billing:"Abrechnung",administration:"Administration",subnav:{requests:"Anfragen",items:"Einheiten",completed:"Erledigt",newRequest:"Neue Anfrage",inventoryReceived:"Eingeganges Inventar",reports:"Berichte",patientListing:"Patietenliste",newPatient:"Neuer Patient",thisWeek:"Diese Woche",today:"Heute",search:"Suche",addAppointment:"Termin eintragen",dispense:"Verabreichen",returnMedication:"Medikamente zurückgeben",invoices:"Rechnungen",newInvoice:"Neue Rechnung",prices:"Kosten",priceProfiles:"Preisprofile",lookupLists:"Nachschlagelisten",addressFields:"Adressfelder",loadDb:"Datenbank laden",users:"Benutzer",newUser:"Neuer Benutzer"},actions:{logout:"Abmelden",login:"Anmelden"},about:"Über HospitalRun"},user:{plusNewUser:"+ Neuer Benutzer",usersPageTile:"Benutzerliste"},admin:{addressOptions:"Adressoptionen",lookupLists:"Nachschlagelisten",loadDb:"Datenbank laden",users:"Benutzer",address:{address1Label:"Adresse 1 Kennzeichen",address2Label:"Adresse 2 Kennzeichen",address3Label:"Adresse 3 Kennzeichen",address4Label:"Adresse 4 Kennzeichen",include1Label:"Einbezug 1 Kennzeichen",include2Label:"Einbezug 2 Kennzeichen",include3Label:"Einbezug 3 Kennzeichen",include4Label:"Einbezug 4 Kennzeichen",titles:{optionsSaved:"Optionen gespeichert"},messages:{addressSaved:"Die Adressoptionen wurden gespeichert"}},lookup:{anesthesiaTypes:"Anästhesiearten",anesthesiologists:"Anästhesiologe",billingCategories:"Abrechnungskategorien",clinicList:"Kliniken",countryList:"Länder",diagnosisList:"Diagnosen",cptCodeList:"CPT Codes",expenseAccountList:"Ausgabekonten",aisleLocationList:"Gänge-Verzeichnis",warehouseList:"Warenhaus",inventoryTypes:"Inventartypen",imagingPricingTypes:"Bildgebungs-Preiskategorien",labPricingTypes:"Labor-Preiskategorien",patientStatusList:"Patientenstatus",physicianList:"Ärzte",procedureList:"Abläufe",procedureLocations:"Ablaufs-Orte",procedurePricingTypes:"Ablaufs-Preiskategorien",radiologists:"Radiologen",unitTypes:"Einheiten",vendorList:"Anbieter",visitLocationList:"Einsatzorte",visitTypes:"Besuchsarten",wardPricingTypes:"Krankenstations-Preistypen"}},labels:{name:"Name",patient:"Patient",quantity:"Anzahl",requestedOn:"Angefragt am",dateRequested:"Anfragedatum",dateCompleted:"Abschlussdatum",requestedBy:"Angefragt von",fulfill:"Ausführen",actions:"Aktionen",action:"Aktion",notes:"Notizen",edit:"Bearbeiten",imagingType:"Bildgebungsart",result:"Ergebnis",results:"Ergebnisse",visit:"Besuch",requests:"Anfragen",completed:"Erledigt",id:"Id-Nr",sex:"Geschlecht",age:"Alter",username:"Username",email:"E-Mail",role:"Rolle",delete:"Entfernen",userCanAddNewValue:"Benutzer kann neue Werte hinzufügen",value:"Wert",lookupType:"Nachschlagebereich",importFile:"Datei importieren",fileLoadSuccessful:"Datei erfolgreich geladen",fileToLoad:"Datei laden",startTime:"Startzeit",endTime:"Endzeit",docRead:"Dokument gelesen",docWritten:"Dokument geschrieben",displayName:"Angezeigter Name",password:"Passwort",editUser:"Benutzer bearbeiten",newUser:"Neuer Benutzer",deleteUser:"Benutzer löschen"},messages:{noItemsFound:"Keine Einträge gefunden.",createNewRecord:"Neuen Eintrag erstellen?",createNewUser:"Neuen Benutzer hinzufügen?",noUsersFound:"Keine Benutzer gefunden.",areYouSureDelete:"Wollen Sie den Benutzer {{user}} sicher löschen?",userHasBeenSaved:"Der Benutzer wurde gespeichert.",userSaved:"Benutzer gespeichert",forAuthorizedPersons:"Dieser Bericht ist nur für autorisierte Personen."},buttons:{complete:"Abschließen",cancel:"Abbrechen",returnButton:"Zurück",add:"Hinzufügen",update:"Aktualisieren",ok:"Okay",delete:"Entfernen",newUser:"Neuer Benutzer",addValue:"Wert hinzufügen",import:"Importieren",loadFile:"Datei laden"},login:{messages:{signIn:"Bitte anmelden",error:"Benutzername oder Passwort falsch."},labels:{password:"Passwort",username:"Benutzername",signIn:"Anmelden"}},inventory:{messages:{noRequests:"Keine Anfragen gefunden.",createRequest:"Neue Anfrage erstellen?"}},imaging:{pageTitle:"Anfrage zur Bildgebung",sectionTitle:"Bildgebung",buttons:{newButton:"+ Neue Bildgebung"},labels:{radiologist:"Radiologe",addNewVisit:"--Neuen Besuch hinzufügen--"},messages:{noCompleted:"Keine erledigten Einträge gefunden."},titles:{completedImaging:"Erledigte Bildgebung",editTitle:"Bildgebungs-Anfrage bearbeiten",newTitle:"Neue Bildgebungs-Anfrage"},alerts:{completedTitle:"Bildgebungs-Anfrage gestellt",completedMessage:"Die Anfrage zur Bildgebung wurde abgeschlossen.",savedTitle:"Bildgebungs-Anfrage gespeichert", +savedMessage:"Die Anfrage zur Bildgebung wurde gespeichert."}}}}),define("hospitalrun/locales/en/config",["exports"],function(e){e.default={}}),define("hospitalrun/locales/en/translations",["exports"],function(e){e.default={dashboard:{title:"What would you like to do?"},errors:{inclusion:"is not included in the list",exclusion:"is reserved",invalid:"is invalid",confirmation:"doesn't match {{attribute}}",accepted:"must be accepted",empty:"can't be empty",blank:"can't be blank",present:"must be blank",tooLong:"is too long (maximum is {{count}} characters)",tooShort:"is too short (minimum is {{count}} characters)",wrongLength:"is the wrong length (should be {{count}} characters)",notANumber:"is not a number",notAnInteger:"must be an integer",greaterThan:"must be greater than {{count}}",greaterThanOrEqualTo:"must be greater than or equal to {{count}}",equalTo:"must be equal to {{count}}",lessThan:"must be less than {{count}}",lessThanOrEqualTo:"must be less than or equal to {{count}}",otherThan:"must be other than {{count}}",odd:"must be odd",even:"must be even",invalidNumber:"not a valid number",result:"Please enter a result before completing"},dates:{long:"{{years}} year {{months}} months {{days}} days",longPlural:"{{years}} years {{months}} months {{days}} days",longOmitYears:"{{months}} months {{days}} days",longOmitDays:"{{years}} year {{months}} months",longOmitDaysPlural:"{{years}} years {{months}} months",longOmitDaysYears:"{{months}} months",shortOmitYears:"{{months}}m {{days}}d",short:"{{years}}y {{months}}m {{days}}d"},navigation:{imaging:"Imaging",inventory:"Inventory",patients:"Patients",appointments:"Appointments",medication:"Medication",labs:"Labs",billing:"Billing",administration:"Administration",subnav:{actions:"Actions",requests:"Requests",items:"Items",completed:"Completed",newRequest:"New Request",inventoryReceived:"Inventory Received",reports:"Reports",patientListing:"Patient Listing",newPatient:"New Patient",thisWeek:"This Week",today:"Today",search:"Search",addAppointment:"Add Appointment",dispense:"Dispense",returnMedication:"Return Medication",invoices:"Invoices",newInvoice:"New Invoice",prices:"Prices",priceProfiles:"Price Profiles",lookupLists:"Lookup Lists",addressFields:"Address Fields",loadDB:"Load DB",users:"Users",newUser:"New User",admittedPatients:"Admitted Patients",missed:"Missed",userRoles:"User Roles",workflow:"Workflow",outpatient:"Outpatient",customForms:"Custom Forms",calendar:"Calendar"},actions:{logout:"Logout",login:"Login"},about:"About HospitalRun"},user:{plusNewUser:"+ new user",usersPageTile:"User Listing"},admin:{addressOptions:"Address Options",lookupLists:"Lookup Lists",loadDb:"Load DB",userRoles:"User Roles",users:"Users",address:{address1Label:"Address 1 Label",address2Label:"Address 2 Label",address3Label:"Address 3 Label",address4Label:"Address 4 Label",include1Label:"Include 1 Label",include2Label:"Include 2 Label",include3Label:"Include 3 Label",include4Label:"Include 4 Label",titles:{optionsSaved:"Options Saved"},messages:{addressSaved:"The address options have been saved"},newTitle:"Address Options",editTitle:"Address Options",addressLabel:"Address"},customForms:{buttons:{addField:"Add Field",moveDown:"Move Down",moveUp:"Move Up",newForm:"+ new form",preview:"Preview"},labels:{alwaysInclude:"Always Include",checkbox:"Checkbox",columns:"Columns",colSpan:"Number of Columns To Span",customForm:"Custom Form",formName:"Form Name",formType:"Form Type",includeOtherOption:"Include Other Option",label:"Label",newForm:"New Form",operativePlanFormType:"Operative Plan and Report",otherOptionLabel:"Other Option Label",patientFormType:"Patient",property:"Property",radio:"Radio",select:"Dropdown",socialworkFormType:"Social Work",text:"Text",textarea:"Large Text",visitFormType:"Visit"},messages:{deleteForm:"Are you sure you want to delete this custom form?",formSaved:"The {{name}} form has been saved."},titles:{customForms:"Custom Forms",deleteForm:"Delete Custom Form",editCustomForm:"Edit Custom Form",fields:"Fields",formSaved:"Form Saved",checkboxValues:"Checkbox Values",dropDownValues:"Dropdown Values",newCustomForm:"New Custom Form",radioValues:"Radio Values"}},loaddb:{progressMessage:"Please wait while your database is loaded.",progressTitle:"Loading Database",displayAlertTitle:"Select File To Load",displayAlertMessage:"Please select file to load.",errorDisplayAlertTitle:"Error Loading",errorDisplayAlertMessage:"The database could not be imported. The error was: {{error}}",editTitle:"Load DB"},lookup:{alertImportListTitle:"Select File To Import",alertImportListMessage:"Please select file to import.",alertImportListSaveTitle:"List Imported",alertImportListSaveMessage:"The lookup list has been imported.",alertImportListUpdateTitle:"List Saved",alertImportListUpdateMessage:"The lookup list has been saved.",pageTitle:"Lookup Lists",edit:{template:{addTitle:"Add Value",editTitle:"Edit Value",updateButtonTextAdd:"Add",updateButtonTextUpdate:"Update",labelTitle:"Value"}},anesthesiaTypes:"Anesthesia Types",anesthesiologists:"Anesthesiologists",billingCategories:"Billing Categories",clinicList:"Clinic Locations",countryList:"Countries",diagnosisList:"Diagnoses",cptCodeList:"CPT Codes",expenseAccountList:"Expense Accounts",aisleLocationList:"Inventory Aisle Locations",warehouseList:"Inventory Locations",inventoryTypes:"Inventory Types",imagingPricingTypes:"Imaging Pricing Types",labPricingTypes:"Lab Pricing Types",patientStatusList:"Patient Status List",physicianList:"Physicians",procedureList:"Procedures",procedureLocations:"Procedures Locations",procedurePricingTypes:"Procedure Pricing Types",radiologists:"Radiologists",unitTypes:"Unit Types",vendorList:"Vendor",visitLocationList:"Visit Locations",visitTypes:"Visit Types",wardPricingTypes:"Ward Pricing Types",messages:{deleteLookupValue:"Are you sure you want to delete the {{value}} value?"},titles:{deleteLookupValue:"Delete Value"}},roles:{capability:{admin:"Administration",loadDb:"Load Database",updateConfig:"Update Configurations",appointments:"Appointments",addAppointment:"Add Appointment",billing:"Billing",addCharge:"Add Charge",addPricing:"Add Pricing",addPricingProfile:"Add Pricing Profile",addInvoice:"Add Invoice",addPayment:"Add Payment",deleteInvoice:"Delete Invoice",deletePricing:"Delete Pricing",deletePricingProfile:"Delete Pricing Profile",editInvoice:"Edit Invoice",invoices:"Invoices",overrideInvoice:"Override Invoice",pricing:"Pricing",patients:"Patients",addDiagnosis:"Add Diagnosis",addPhoto:"Add Photo",addPatient:"Add Patient",addProcedure:"Add Procedure",addVisit:"Add Visit",addVitals:"Add Vitals",admitPatient:"Admit Patient",deletePhoto:"Delete Photo",deletePatient:"Delete Patient",deleteAppointment:"Delete Appointment",deleteDiagnosis:"Delete Diagnosis",deleteProcedure:"Delete Procedure",deleteSocialwork:"Delete Social Work",deleteVitals:"Delete Vitals",deleteVisit:"Delete Visit",dischargePatient:"Discharge Patient",patientReports:"Patient Reports",visits:"Visits",medication:"Medication",addMedication:"Add Medication",deleteMedication:"Delete Medication",fulfillMedication:"Fulfill Medication",labs:"Labs",addLab:"Add Lab",completeLab:"Complete Lab",deleteLab:"Delete Lab",imaging:"Imaging",addImaging:"Add Imaging",completeImaging:"Complete Imaging",deleteImaging:"Delete Imaging",inventory:"Inventory",addInventoryRequest:"Add Inventory Request",addInventoryItem:"Add Inventory Item",addInventoryPurchase:"Add Inventory Purchase",adjustInventoryLocation:"Adjust Inventory Location",deleteInventoryItem:"Delete Inventory Item",fulfillInventory:"Fulfill Inventory",defineUserRoles:"Define User Roles",addBillingDiagnosis:"Add Billing Diagnosis",addNote:"Add Note",addSocialwork:"Add Social Work",deleteNote:"Delete Note",addOperativePlan:"Add Operative Plan",addAllergy:"Add Allergy",addOperationReport:"Add Operation Report"},messages:{roleSaved:"The {{roleName}} role has been saved."},titles:{roleSaved:"Role Saved"}},visitForms:{labels:{followup:"Followup",form:"Form",initial:"Initial",visitType:"Visit Type"},titles:{visitForms:"Visit Forms"}},workflow:{admissionDepositLabel:"Admission deposit required",clinicPrepaymentLabel:"Clinic prepayment required",followupPrepaymentLabel:"Followup prepayment required",outpatientLabLabel:"Outpatient Lab prepayment required",outpatientImagingLabel:"Outpatient Imaging prepayment required",outpatientMedicationLabel:"Outpatient Medication prepayment required",titles:{optionsSaved:"Options Saved"},messages:{optionsSaved:"The workflow options have been saved"},newTitle:"Workflow Options",editTitle:"Workflow Options",workflowLabel:"Workflow"}},labels:{cptcode:"CPT Code",loading:"Loading",name:"Name",note:"Note",patient:"Patient",prescriber:"Prescriber",quantity:"Quantity",requestedOn:"Requested On",date:"Date",dateOfBirth:"Date of Birth",dateOfBirthShort:"DoB",dateRequested:"Date Requested",dateCompleted:"Date Completed",description:"Description",requestedBy:"Requested By",fulfill:"Fulfill",fulfillRequest:"Fulfill Request",fulfillRequestNow:"Fulfill Request Now",actions:"Actions",action:"Action",notes:"Notes",edit:"Edit",imageOrders:"Image Orders",labOrders:"Lab Orders",imagingType:"Imaging Type",result:"Result",results:"Results",visit:"Visit",requests:"Requests",completed:"Completed",id:"Id",on:"on",type:"Type",sex:"Sex",age:"Age",search:"Search",username:"Username",email:"Email",role:"Role",delete:"Delete",userCanAddNewValue:"User Can Add New Values",value:"Value",lookupType:"Lookup Type",importFile:"Import File",fileLoadSuccessful:"File To Load Successful",fileToLoad:"File Load",fileName:"File Name",startTime:"Start Time",startDate:"Start Date",endTime:"End Time",endDate:"End Date",docRead:"Docs Read",docWritten:"Docs Written",displayName:"Display Name",password:"Password",editUser:"Edit User",newUser:"New User",deleteUser:"Delete User",medication:"Medication",status:"Status",addNewOutpatientVisit:"--Add New Outpatient Visit--",prescription:"Prescription",prescriptionDate:"Prescription Date",billTo:"Bill To",pullFrom:"Pull From",fulfilled:"Fulfilled",deleteRequest:"Delete Request",location:"Location",provider:"Provider",with:"With",allDay:"All Day",physician:"Physician",assisting:"Assisting",anesthesia:"Anesthesia",procedures:"Procedures",number:"Number",billDate:"Bill Date",balanceDue:"Balance Due",amount:"Amount",datePaid:"Date Paid",creditTo:"Credit To",invoiceId:"Invoice ID",lineItems:"Line Items",discount:"Discount",excess:"Excess",price:"Price",total:"Total",expenseTo:"Expense To",grandTotal:"Grand Total",remarks:"Remarks",payments:"Payments",category:"Category",department:"Department",address:"Address",country:"Country"},messages:{noItemsFound:"No items found.",noHistoryAvailable:"No history available.",createNewRecord:"Create a new record?",createNewUser:"Create a new user?",noUsersFound:"No users found.",areYouSureDelete:"Are you sure you wish to delete the user {{user}}?",userHasBeenSaved:"The user has been saved.",userSaved:"User Saved",onBehalfOf:"on behalf of",newPatientHasToBeCreated:"A new patient needs to be created...Please wait..",noNotesAvailable:"No additional clinical notes are available for this visit.",sorry:"Sorry, something went wrong...",forAuthorizedPersons:"This report is for authorized persons only.",requiredFieldsCorrectErrors:"Please fill in required fields (marked with *) and correct the errors before saving.",saveActionException:"An error occurred while attempting to save: {{message}}",reportError:"An error was encountered while generating the requested report. Please let your system administrator know that you have encountered an error."},alerts:{pleaseWait:"Please Wait",warningExclamation:"Warning!!!!",errorExclamation:"Error!!!!",reportError:"Error Generating Report"},headings:{chargedItems:"Charged Items"},buttons:{addItem:"Add Item",complete:"Complete",cancel:"Cancel",close:"Close",returnButton:"Return",barcode:"Barcode",add:"Add",update:"Update",ok:"Ok",fulfill:"Fulfill",remove:"Remove",delete:"Delete",newUser:"New User",addValue:"Add Value",newNote:"New Note",import:"Import",loadFile:"Load File",newRequest:"New Request",allRequests:"All Requests",dispense:"Dispense",newItem:"+ new item",newRequestPlus:"+ new request",addVisit:"Add Visit",search:"Search",filter:"Filter",clear:"Clear",edit:"Edit",addLineItem:"Add Line Item",showFewer:"Show Fewer",showAll:"Show All"},login:{messages:{signIn:"please sign in",error:"Username or password is incorrect."},labels:{password:"Password",username:"Username",signIn:"Sign in"}},loading:{progressBar:{progress:"{{progressBarValue}}% Complete"},messages:{0:"The top butterfly flight speed is 12 miles per hour. Some moths can fly 25 miles per hour!",1:"Owls are the only birds that can see the color blue.",2:"Cats have over 100 vocal sounds; dogs only have 10.",3:"Humans use a total of 72 different muscles in speech.",4:"More than 1,000 different languages are spoken on the continent of Africa.",5:"An erythrophobe is someone who blushes easily.",6:"The most common phobia in the world is odynophobia which is the fear of pain.",7:"Your body uses 300 muscles to balance itself when you are standing still.",8:"Certain frogs can be frozen solid then thawed, and continue living.",9:"Our eyes are always the same size from birth, but our nose and ears never stop growing.",10:"Your tongue is the only muscle in your body that is attached at only one end.",11:"Camels have three eyelids to protect themselves from blowing sand."}},inventory:{edit:{cost:"Cost Per Unit:",delivered:"Delievered To:",location:"Location Adjusted:",prescription:"Prescription For:",pulled:"Pulled From:",quantity:"Quantity at Completion:",reason:"Reason:",returned:"Returned from Patient:",transferredFrom:"Transferred From:",transferredTo:"Transferred To:"},labels:{action:"Action",add:"Add",adjust:"Adjust",adjustmentDate:"Adjustment Date",adjustmentFor:"Adjustment For",adjustmentType:"Adjustment Type",aisle:"Aisle",aisleLocation:"Aisle Location",allInventory:"All Inventory",availableQuantity:"{{quantity}} available",billTo:"Bill To",consumePurchases:"Consume Purchases",consumptionRate:"Consumption Rate",cost:"Cost",costPerUnit:"Cost per Unit",crossReference:"Cross Reference",currentQuantity:"Current Quantity",dateCompleted:"Date Completed",dateEffective:"Effective Date",dateEnd:"End Date",dateStart:"Start Date",dateReceived:"Date Received",dateTransferred:"Date Transferred",daysLeft:"Days Left",deliveryAisle:"Delivery Aisle",deliveryLocation:"Delivery Location",distributionUnit:"Distribution Unit",deleteItem:"Delete Item",details:"Details",editItem:"Edit Item",expense:"Expense To",expirationDate:"Expiration Date",fulfillRequest:"Fulfill Request",fulfillRequestNow:"Fulfill Request Now",gift:"Gift in Kind",giftUsage:"Gift in Kind Usage",giftInKindNo:"N",giftInKindYes:"Y",inventoryConsumed:"Inventory Consumed",inventoryItem:"Inventory Item",inventoryObsolence:"Inventory Obsolence",invoiceItems:"Invoice Items",invoiceLineItem:"Invoice Line Item",invoiceNumber:"Invoice Number",item:"Item",items:"Items",itemNumber:"Item Number",location:"Location",locations:"Locations",name:"Name",markAsConsumed:"Mark as Consumed",newItem:"New Item",allItems:"All Items",originalQuantity:"Original Quantity",print:"Print",printBarcode:"Print Barcode",printer:"Printer",pullFrom:"Pull From",purchases:"Purchases",purchaseCost:"Purchase Cost",purchaseInfo:"Purchase Information",quantity:"Quantity ({{unit}})",quantityAvailable:"Quantity Available",quantityOnHand:"Quantity on Hand",quantityRequested:"Quantity Requested",rank:"Rank",reason:"Reason",remove:"Remove",reorderPoint:"Reorder Point",requestedItems:"Requested Items",salePricePerUnit:"Sale Price per Unit",save:"Save",serialNumber:"Serial/Lot Number",total:"Total",totalCost:"Total Cost",totalReceived:"Total Received: {{total}}",transaction:"Transaction",transactions:"Transactions",transfer:"Transfer",transferFrom:"Transfer From",transferTo:"Transfer To Location",transferToAisle:"Transfer to Aisle Location",unit:"Unit",unitCost:"Unit Cost",vendor:"Vendor",vendorItemNumber:"Vendor Item Number",xref:"XRef"},messages:{adjust:"Please adjust the quantities on the appropriate location(s) to account for the difference of {{difference}}.",createRequest:"Create a new request?",delete:"Are you sure you wish to delete {{name}}?",itemNotFound:"The inventory item {{item}} could not be found.
If you would like to create a new inventory item, fill in the information below.
Otherwise, press the Cancel button to return.",loading:"Loading transactions ...",purchaseSaved:"The inventory purchases have been successfully saved.",noRequests:"No requests found.",noItems:"No items found.",quantity:"The total quantity of ({{quantity}}) does not match the total quantity in the locations ({{locationQuantity}}).",removeItem:"Are you sure you want to remove this item from this invoice?",removeItemRequest:"Are you sure you want to remove this item from this request?",requestFulfilled:"The inventory request has been fulfilled.",requestUpdated:"The inventory request has been updated.",warning:"Please fill in required fields (marked with *) and correct the errors before adding."},reports:{rows:{adjustments:"Adjustments",adjustmentsTotal:"Total Adjustments",balanceBegin:"Beginning Balance",balanceEnd:"Ending Balance",category:"Category",consumed:"Consumed",consumedGik:"GiK Consumed",consumedGikTotal:"Total GiK Consumed",consumedPuchases:"Purchases Consumed",consumedPurchasesTotal:"Total Purchases Consumed",consumedTotal:"Total Consumed",errInFinSum:"Error in _generateFinancialSummaryReport: ",errInFindPur:"Error in _findInventoryItemsByPurchase: ",errInFindReq:"Error in _findInventoryItemsByRequest: ",expensesFor:"Expenses For: ",noAccount:"(No Account)",subtotal:"Subtotal: ",subtotalFor:"Subtotal for {{category}} - {{account}}: ",total:"Total: ",totalFor:"Total for {{var}}: ",totalPurchases:"Total Purchases",transfer1:"{{quantity}} from {{location}}",trasnfer2:"From: {{source}} To: {{target}}"},adjustment:"Detailed Adjustment",daysSupply:"Days Supply Left In Stock",expenseDetail:"Detailed Expenses",expenseSum:"Summary Expenses",expiration:"Expiration Date",export:"Export Report",fields:"Fields to Include",finance:"Finance Summary",generate:"Generate Report",invLocation:"Inventory By Location",invValuation:"Inventory Valuation",purchaseDetail:"Detailed Purchase",purchaseSum:"Summary Purchase",reportType:"Report Type",stockTransferDetail:"Detailed Stock Transfer",stockTransferSum:"Summary Stock Transfer",stockUsageDetail:"Detailed Stock Usage",stockUsageSum:"Summary Stock Usage",titleSingleDate:"{{name}} Report {{date}}",titleDateRange:"{{name}} Report {{startDate}} - {{endDate}}"},titles:{addPurchase:"Add Purchase",addRequest:"New Request",adjustment:"Adjustment",editPurchase:"Edit Purchase",editRequest:"Edit Request",inventoryItem:"New Inventory Item",inventoryReport:"Inventory Report",purchaseSaved:"Inventory Purchases Saved",quickAddTitle:"New Inventory Item",removeItem:"Remove Item",requestFulfilled:"Request Fulfilled",requestUpdated:"Request Updated",transfer:"Transfer Items",warning:"Warning!!!!!"}},imaging:{pageTitle:"Imaging Requests",sectionTitle:"Imaging",buttons:{newButton:"+ new imaging"},labels:{radiologist:"Radiologist",addNewVisit:"--Add New Visit--"},messages:{delete:"Are you sure you wish to delete this imaging request?",noCompleted:"No completed items found."},titles:{completedImaging:"Completed Imaging",editTitle:"Edit Imaging Request",newTitle:"New Imaging Request"},alerts:{completedTitle:"Imaging Request Completed",completedMessage:"The imaging request has been completed.",savedTitle:"Imaging Request Saved",savedMessage:"The imaging request has been saved."}},medication:{pageTitle:"Medication Requests",sectionTitle:"Medication",returnMedication:"Return Medication",buttons:{dispenseMedication:"dispense medication",newButton:"+ new request",returnMedication:"return medication"},titles:{completedMedication:"Completed Medication",editMedicationRequest:"Edit Medication Request",newMedicationRequest:"New Medication Request"},messages:{createNew:"Create a new medication request?",confirmDeletion:"Are you sure you wish to delete this medication request?"},labels:{refills:"Refills",quantityRequested:"Quantity Requested",quantityDispensed:"Quantity Dispensed",quantityDistributed:"Quantity Distributed",quantityToReturn:"Quantity To Return",returnLocation:"Return Location",returnAisle:"Return Aisle",returnReason:"Return Reason/Notes",adjustmentDate:"Adjustment Date",creditToAccount:"Credit To Account"},alerts:{returnedTitle:"Medication Returned",returnedMessage:"The medication has been marked as returned.",savedTitle:"Medication Request Saved",savedMessage:"The medication record has been saved.",fulfilledTitle:"Medication Request Fulfilled"}},appointments:{currentScreenTitle:"Appointment List",editTitle:"Edit Appointment",newTitle:"New Appointment",sectionTitle:"Appointments",thisWeek:"Appointments This Week",missed:"Missed Appointments",searchTitle:"Search Appointments",todayTitle:"Today's Appointments",calendarTitle:"Appointments Calendar",messages:{deleteAppointmentMessage:"Are you sure you wish to delete this appointment?",endTimeLaterThanStart:"Please select an end time later than the start time."},buttons:{newButton:"+ new appointment"},labels:{selectedStartingDate:"Show Appointments On Or After"}},vitals:{messages:{delete:"Are you sure you wish to delete these vitals?"},labels:{dateRecorded:"Date Recorded",temperature:"Temperature",weight:"Weight",height:"Height",sbp:"SBP",dbp:"DBP",heartRate:"Heart Rate",respiratoryRate:"Respiratory Rate"}},visits:{titles:{additionalDiagnoses:"Additional Diagnoses",checkedIn:"Patient Checked In",checkOut:"Patient Check Out",checkedOut:"Patient Checked Out",discharged:"Patient Discharged",editVisit:"Edit Visit",newVisit:"New Visit",patientCheckIn:"Patient Check In",visitSaved:"Visit Saved"},messages:{delete:"Are you sure you wish to delete this visit?",checkOut:"Are you sure you wish to check out {{patientName}}?",checkedOut:"{{patientName}} has been checked out.",discharged:"{{patientName}} has been discharged.",patientCheckedIn:"{{patientName}} has been checked in.",patientCreatedAndCheckedIn:"{{patientName}} has been created and checked in.",visitAndPatientSaved:"The visit and patient records have been saved.",visitSaved:"The visit record has been saved."},buttons:{newProcedure:"New Procedure",newAppointment:"New Appointment",addDiagnosis:"Add Diagnosis",newVitals:"New Vitals",checkIn:"Check In",checkOut:"Check Out",discharge:"Discharge"},labels:{diagnosis:"Diagnosis",procedure:"Procedure",procedureDate:"Procedure Date",authoredBy:"Authored By",visitInformation:"Visit Information",examiner:"Examiner",status:"Visit Status",finalDiagnosis:"Final/Billing Diagnosis",visitDate:"Visit Date",visitType:"Visit Type",patientToCheckIn:"Patient To Check In",checkInTime:"Check In",checkOutTime:"Check Out",appointment:"Appointment",haveAppointment:"Y",noAppointment:"N",ordersDone:"Orders Done",haveDoneOrders:"Y",ordersNotDone:"N",reasonForVisit:"Reason For Visit",statusAdmitted:"Admitted",statusDischarged:"Discharged",statusCheckedIn:"Checked In",statusCheckedOut:"Checked Out",createNewPatient:"Create New Patient"},navigation:{charges:"Charges",notes:"Notes",orders:"Orders",procedures:"Procedures",vitals:"Vitals"}},labs:{sectionTitle:"Labs",requestsTitle:"Lab Requests",editTitle:"Edit Lab Request",newTitle:"New Lab Request",deleteTitle:"Delete Request",completedTitle:"Completed Labs",labels:{labType:"Lab Type",addNewVisit:"--Add New Visit--"},messages:{noItemsFound:"No labs found.",createNewRecord:"Create a new record?",confirmDeletion:"Are you sure you wish to delete this lab request?",noCompleted:"No completed items found."},buttons:{newButton:"+ new lab"},alerts:{requestCompletedTitle:"Lab Request Completed",requestCompletedMessage:"The lab request has been completed.",requestSavedTitle:"Lab Request Saved",requestSavedMessage:"The lab request has been saved."}},patients:{navigation:{photos:"Photos",general:"General",history:"History",appointments:"Appointments",visits:"Visits",medication:"Medication",imaging:"Imaging",labs:"Labs",socialWork:"Social Work"},titles:{addContact:"Add Contact",admittedPatients:"Admitted Patients",expenses:"Expenses",additionalContacts:"Additional Contacts",familyInformation:"Family Information",delete:"Delete Patient",new:"New Patient",edit:"Edit Patient",patient:"Patient Report",patientListing:"Patient Listing",patientReport:"Patient Report",addPhoto:"Add Photo",editPhoto:"Edit Photo",socialWork:"Expense",familyInfo:"Family Info",deleteFamilyMember:"Delete Family Member",deleteExpense:"Delete Expense",deletePhoto:"Delete Photo",deleteContact:"Delete Contact",savedPatient:"Patient Saved",todaysOutpatients:"Today's Outpatients",admissionsDetail:"Admissions Detail",admissionsSummary:"Admissions Summary",diagnosticTesting:"Diagnostic Testing",dischargesDetail:"Discharges Detail",dischargesSummary:"Discharges Summary",proceduresDetail:"Procedures Detail",proceduresSummary:"Procedures Summary",patientStatus:"Patient Status",totalPatientDays:"Total Patient Days",totalPatientDaysDetailed:"Total Patient Days (Detailed)",visit:"Visit",deletePatientRecord:"Delete Patient Record",outpatientsForDate:"Outpatients for {{visitDate}}"},messages:{areYouSureDelete:"Are you sure you want to delete this {{object}}?",deletePatient:"Are you sure you wish to delete {{firstName}} {{lastName}}?",noPatientsFound:"No patients found.",savedPatient:"The patient record for {{displayName}} has been saved.",notFoundQuickAdd:"The patient {{patientFullName}} could not be found. If you would like to create a new patient, fill in the information below. Otherwise press the Cancel button to return.",createNewPatient:"Create a new patient record?",deletingPatient:"Deleting patient and all associated records"},buttons:{addExpense:"Add Expense",addContact:"Add Contact",addOperativePlan:"Add Operative Plan",editOperativePlan:"Current Operative Plan",newLab:"New Lab",newVisit:"New Visit",newMedication:"New Medication",newImaging:"New Imaging",addFamilyMember:"Add Family Member",newPhoto:"New Photo",newAppointment:"New Appointment",backToPatients:"Back to Patient List",newPatient:"+ new patient",patientCheckIn:"Patient Check In"},labels:{primaryDiagnosis:"Primary Diagnoses",secondaryDiagnosis:"Secondary Diagnoses",monthlyCost:"Monthly Cost",totalMontlyExpense:"Total Monthly Expenses",patientType:"Patient Type",admissionDate:"Admission Date",patientDays:"Patient Days",dischargeDate:"Discharge Date",admit:"Admit",relationships:"Relationships",phone:"Phone",email:"Email",firstName:"First Name",middleName:"Middle Name",lastName:"Last Name",sex:"Sex",dob:"DOB",dateOfBirth:"Date Of Birth",placeOfBirth:"Place Of Birth",sources:"Sources",cost:"Cost",civilStatus:"Civil Status",relationship:"Relationship To Patient",education:"Education",occupation:"Occupation",income:"Income",insurance:"Insurance",dateProcessed:"Date Processed",status:"Patient Status",externalPatientId:"External Patient Id",bloodType:"Blood Type",clinic:"Clinic Site",referredBy:"Referred By",referredDate:"Referred Date",religion:"Religion",parent:"Parent/Guardian",contacts:"Contacts",sexNotEntered:"Sex Not Entered",operativePlan:"Operative Plan"},notes:{newNote:"New Note for",updateNote:"Updating Note from",onBehalfOfLabel:"On Behalf Of",onBehalfOfCopy:"on behalf of",pleaseSelectAVisit:"Please select a visit"}},billing:{alerts:{noInvoiceFound:"No invoices found",deleteItem:"Are you sure you wish to delete {{item}}?",noPricingItems:"No pricing items found.",noPricingProfiles:"No pricing profiles found."},buttons:{createInvoice:"Create an invoice?",addOverride:"Add Override"},labels:{externalInvoiceNumber:"External Invoice #",paymentProfile:"Payment Profile",actualCharges:"Actual Charges",insurance:"National Insurance",hmoCom:"HMO/COM",paymentsDeposits:"Payments/Deposits",pricingPanelOverrides:"Pricing profile overrides",pricingProfile:"Pricing Profile",discountAmount:"Discount Amount",discountPercentage:"Discount Percentage"}},print:{invoice:{labels:{patientName:"NAME OF PATIENT:",patientId:"PATIENT #:",patientAge:"AGE:",patientAddress:"ADDRESS:",dateAdmitted:"ADMITTED:",dateDischarged:"DISCHARGE:",dischargeNotes:"Discharge Notes:",remarks:"Remarks:",billedBy:"Billed by:",billedDate:"Bill Date:",spacer:"__________________________________________"},messages:{whereConducted:"were deducted during my confinement"},titles:{patientMember:"Patient-Member",relContact:"Relationship/Contact no.",patients:"PATIENT'S",billingStatement:"BILLING STATEMENT"}}},procedures:{titles:{addChargeItem:"Add Charge Item",deleteChargeItem:"Delete Charge Item",editChargeItem:"Edit Charge Item",medicationUsed:"Medication Used",deleteMedicationUsed:"Delete Medication Used",addMedicationUsed:"Add Medication Used",editMedicationUsed:"Edit Medication Used",edit:"Edit Procedure",saved:"Procedure Saved",new:"New Procedure"},labels:{medicationUsed:"Medication Used"},messages:{deleteMedication:"Are you sure you want to delete this medication?",delete:"Are you sure you wish to delete this procedure?",saved:"The procedure record has been saved."},buttons:{addMedication:"Add Medication"}},components:{chargesByTypeTab:{charges:"charges"},customFormManager:{buttons:{addForm:"Add Form"}},sortableColumn:{labels:{selectAll:"(Select All)"}},dateTimePicker:{amHour:"{{hour}} AM",midnight:"Midnight",noon:"Noon",pmHour:"{{hour}} PM"},takePhoto:{how:"How Do You Want To Add A Photo?",takePhoto:"Take photo",uploadPhoto:"Upload Photo",uploadFile:"Upload File",camera:"Camera",photo:"photo",preview:"preview"},quantityConv:{unit:"Unit",conversion:"What does 1 {{name}} contain?"},quantityCalc:{result:"{{targetUnit}} total: {{calculated}}"},patientOrders:{buttons:{newImaging:"New Imaging",newLab:"New Lab",newMedication:"New Medication"},labels:{imagingOrderType:"Imaging",labOrderType:"Lab",medicationOrderType:"Medication",orderType:"Order Type"}},priceList:{charges:"{{pricingType}} charges"},operativeProcedures:{buttons:{addProcedure:"Add Procedure"},labels:{procedure:"Procedure"},titles:{procedures:"Procedures"}}},customForms:{buttons:{addForm:"Add Form"},labels:{formToAdd:"Form To Add"},titles:{addCustomForm:"Add Custom Form"}},diagnosis:{labels:{activeDiagnosis:"Active Diagnosis",date:"Date",diagnosis:"Diagnosis",secondaryDiagnosis:"Secondary Diagnosis"},titles:{addDiagnosis:"Add Diagnosis",editDiagnosis:"Edit Diagnosis"}},allergies:{buttons:{addAllergy:"Add Allergy"},titles:{addAllergy:"Add Allergy",editAllergy:"Edit Allergy"},labels:{allergyName:"Name",patientAllergy:"Patient Allergies"}},operativePlan:{buttons:{completePlan:"Complete Plan"},labels:{additionalNotes:"Additional Notes",admissionInstructions:"Instructions Upon Admission",caseComplexity:"Case Complexity",completedStatus:"Completed",droppedStatus:"Dropped",operationDescription:"Operation Description",plannedStatus:"Planned",status:"Status",surgeon:"Surgeon",surgeryDate:"Surgery Date"},messages:{planSaved:"The operative plan has been saved.",planCompleted:"The operative plan has been completed. You will now be directed to the operation report."},titles:{editTitle:"Edit Operative Plan",newTitle:"New Operative Plan",planCompleted:"Plan Completed",planSaved:"Plan Saved"}},operationReport:{labels:{additionalNotes:"Additional Notes",assistant:"Assistant",caseComplexity:"Case Complexity",operationDescription:"Operation Description",preOpPrimaryDiagnosis:"Pre-op Primary Diagnosis",preOpSecondaryDiagnosis:"Pre-op Secondary Diagnosis",surgeon:"Surgeon",surgeryDate:"Surgery Date"},messages:{reportSaved:"The operation report has been saved."},titles:{editTitle:"Edit Operation Report",newTitle:"New Operation Report",reportSaved:"Report Saved"}},application:{messages:{sessionExpired:"Your session has expired. Please login to continue."},titles:{sessionExpired:"Session Expired"}} +}}),define("hospitalrun/locales/es-CO/translations",["exports"],function(e){e.default={dashboard:{title:"Que deseas hacer?"},navigation:{imaging:"Radiografia",inventory:"Inventario",patients:"Pacientes",appointments:"Citas",medication:"Recetas medicas",labs:"Laboratorio",billing:"Facturas",administration:"Administracion",subnav:{requests:"Pedidos",items:"Items",completed:"Completado",newRequest:"New pedido",inventoryReceived:"Inventario recibido",reports:"Reportes",patientListing:"Lista de pacientes",newPatient:"Nuevo paciente",thisWeek:"Esta semana",today:"Hoy",search:"Buscar",addAppointment:"Nueva cita",dispense:"Dispense",returnMedication:"Devolver medicamento",invoices:"Facturas",newInvoice:"Nueva factura",prices:"Precios",priceProfiles:"Perfil de precios",lookupLists:"Lista de busuedas",addressFields:"Campos de dirección",loadDb:"Cargar base de datos",users:"Usuarios",newUser:"Nuevo usuario",userRoles:"Roles"},actions:{logout:"Salir",login:"Ingresar"},about:"Información de HospitalRun"},user:{plusNewUser:"+ nuevo usuario",usersPageTile:"Listado de usuarios"},admin:{addressOptions:"Opciones de direcciones",lookupLists:"Lista de busqueda",loadDb:"Cargar Base de datos",userRoles:"Roles",users:"Usuarios",address:{address1Label:"Texto direccion 1",address2Label:"Texto direccion 2",address3Label:"Texto direccion 3",address4Label:"Texto direccion 4",include1Label:"Incluir 1",include2Label:"Incluir 2",include3Label:"Incluir 3",include4Label:"Incluir 4",titles:{optionsSaved:"Opciones guardadas"},messages:{addressSaved:"las opciones de dirección han sido guardadas"},newTitle:"Opciones de dirección",editTitle:"Opciones de dirección",addressLabel:"Direcciones"},loaddb:{progressMessage:"Por favor espere mientras la base de datos es cargada.",progressTitle:"Cargando ase de datos",displayAlertTitle:"Seleccione un archivo para cargar",displayAlertMessage:"Por favor seleccione un archivo para ser cargado.",errorDisplayAlertTitle:"Error cargando",errorDisplayAlertMessage:"La base de datos no fue cargada el error fue: {{error}}",editTitle:"Cargar bd"},lookup:{alertImportListTitle:"Seleccione un archivo para importar",alertImportListMessage:"Por favor seleccione un archivo para importar.",alertImportListSaveTitle:"Lista importada",alertImportListSaveMessage:"Lista de busqueda importada.",alertImportListUpdateTitle:"Lista salvada",alertImportListUpdateMessage:"La lista de busqueda ha sido salvada.",pageTitle:"Listas de busqueda",edit:{template:{addTitle:"Adicionar valor",editTitle:"Editar valor",updateButtonTextAdd:"Adicionar",updateButtonTextUpdate:"Actualizar",labelTitle:"Valor"}},anesthesiaTypes:"Tipos de anestesia",anesthesiologists:"Anestesiologo",billingCategories:"Categorias de facturacion",clinicList:"Ubicacion de las clinicas",countryList:"Paises",diagnosisList:"Diagnosticos",cptCodeList:"Codigos CPT",expenseAccountList:"Cuentas de gastos",aisleLocationList:"Ubicacion de inventario de pasillo",warehouseList:"Ubicacciones de inventarios",inventoryTypes:"Tipos de inventarios",imagingPricingTypes:"Tipos de precios de radiografias",labPricingTypes:"Precios de laboratorio",patientStatusList:"Lista de estado de pacientes",physicianList:"Medicos",procedureList:"Procedimientos",procedureLocations:"Ubicacion de los procedimientos",procedurePricingTypes:"Tipos de procedimientos y precios",radiologists:"Radiologo",unitTypes:"Tipos de unidad",vendorList:"Proveedor",visitLocationList:"Lugares de visista",visitTypes:"Tipos de visita",wardPricingTypes:"Tipos de las tarifas"},roles:{capability:{admin:"Administracion",loadDb:"Cargar base de datos",updateConfig:"Actualizar configuracion",appointments:"Citas",addAppointment:"Adicionar cita",billing:"Facturacion",addCharge:"Adicionar cargo (valor)",addPricing:"Adicionar precio",addPricingProfile:"Adicionar perfil de precios",addInvoice:"Adicionar factura",addPayment:"Adicionar pago",deleteInvoice:"Eliminar factura",deletePricing:"Eliminar precio",deletePricingProfile:"Eliminar perfil de precio",editInvoice:"Editar factura",invoices:"Facturas",overrideInvoice:"Sobreescribir factura",pricing:"Precio",patients:"Pacientes",addDiagnosis:"Adicionar diagnostico",addPhoto:"Adicionar foto",addPatient:"Adicionar paciente",addVisit:"Adicionar visita",addVitals:"Adicionar partes vitales",admitPatient:"Admitir paciente",deletePhoto:"Eliminar foto",deletePatient:"Eliminar paciente",deleteAppointment:"Eliminar cita",deleteDiagnosis:"Eliminar diagnostico",deleteProcedure:"Eliminar procedimiento",deleteSocialwork:"Eliminar trabajo social",deleteVitals:"Eliminar organo vital",deleteVisit:"Eliminar visita",dischargePatient:"Descartar paciente",patientReports:"Reportes por paciente",visits:"Visitas",medication:"Medicación",addMedication:"Adicionar medicación",deleteMedication:"Eliminar medicación",fulfillMedication:"Cumplir la medicación",labs:"Laboratorios",addLab:"Adicionar laboratorio",completeLab:"Completar laboratorio",deleteLab:"Eliminar laboratorio",imaging:"Radiografia",addImaging:"Adicionar radiografia",completeImaging:"Completar radiografia",deleteImaging:"Eliminar radiografia",inventory:"Inventario",addInventoryRequest:"Pedido de inventario",addInventoryItem:"Adicionar elemento al inventario",addInventoryPurchase:"Adicionar compra",adjustInventoryLocation:"Ajustar lugar elemento en el inventario",deleteInventoryItem:"Eliminar elemento del inventario",deleteInventoryPurchase:"Eliminar compra del inventario",fulfillInventory:"Cumplimiento de inventario",defineUserRoles:"Roles de usuario"},messages:{roleSaved:"El {{roleName}} rol ha sido salvado."},titles:{roleSaved:"Role salvado"}}},labels:{cptcode:"Codigo CPT",loading:"Cargando",name:"Nombre",patient:"Paciente",quantity:"Cantidada",requestedOn:"Pedido On",date:"Fecha",dateOfBirth:"Fecha de nacimiento",dateOfBirthShort:"FDN",dateRequested:"Fecha de pedido",dateCompleted:"Fecha completada",description:"Descripción",requestedBy:"Pedido por|",fulfill:"Cumplomiento",fulfillRequest:"Pedido de cumplimiento",fulfillRequestNow:"Pedido de cumplimiento ahora",actions:"Acciones",action:"Accion",notes:"Notas",edit:"Editar",imageOrders:"Ordenes de radiografias",labOrders:"Ordenes de laboratorio",imagingType:"Tipo de radiografia",result:"Resultado",results:"Resultados",visit:"Visita",requests:"Pedido",completed:"Completado",id:"Id",on:"on",type:"Tipo",sex:"Genero",age:"Edad",username:"Nombre de usuario",email:"Email",role:"Rol",delete:"Eliminar",userCanAddNewValue:"Los usuarios pueden agregar nuevos valores",value:"Valor",lookupType:"Tipo de busqueda",importFile:"Importar archivo",fileLoadSuccessful:"Archivo cargado exitosamente",fileToLoad:"Archivo cargado",startTime:"Hora de inicio",startDate:"Fecha de inicio",endTime:"Hora de finalización",endDate:"Fecha final",docRead:"Leer documento",docWritten:"Documento escrito",displayName:"Nombre para mostrar",password:"Contraseña",editUser:"Editar usuario",newUser:"Nuevo usuario",deleteUser:"Eliminar usuario",medication:"Medicación",status:"Estado",addNewOutpatientVisit:"--Nueva visita a paciente externo--",prescription:"Receta medica",prescriptionDate:"Fecha de la receta medica",billTo:"Facturar a",pullFrom:"Traer de",fulfilled:"Cumplido",deleteRequest:"Eliminar pedido",location:"Ubicacion",provider:"Proveedor",with:"con",allDay:"Todo el dia",physician:"Médico",assisting:"Asistencia",anesthesia:"Anestesia",procedures:"Procedimiento"},messages:{noItemsFound:"Elementos no encontrados.",noHistoryAvailable:"Historia no disponible.",createNewRecord:"Crear un nuevo registro?",createNewUser:"Crear un nuevo usuario?",noUsersFound:"Ningun usuario encontrado.",areYouSureDelete:"Estas seguro de eliminar este usuario {{user}}?",userHasBeenSaved:"El usuario ha sido salvado.",userSaved:"Usuario salvado",onBehalfOf:"a nombre de",newPatientHasToBeCreated:"Un nuevo paciente debe ser creado...Por favor espere..",noNotesAvailable:"No hay notas clínicas adicionales están disponibles para esta visita.",sorry:"Lo sentimos, un error ha ocurrido...",forAuthorizedPersons:"Este informe es sólo para personas autorizadas."},alerts:{pleaseWait:"Por favor espere"},buttons:{complete:"Completado",cancel:"Cancelar",close:"Cerrar",returnButton:"Regresar",barcode:"Codigo de barras",add:"Adicionar",update:"Actualizar",ok:"Ok",fulfill:"Cumplimiento",remove:"Remover",delete:"Eliminar",newUser:"Nuevo usuario",addValue:"Adicionar valor",newNote:"Nueva nota",import:"Importar",loadFile:"Cargar archivo",newRequest:"Nueva solicitud",allRequests:"Todas las solicitudes",dispense:"Repartir",newItem:"+ nuevo elemento",newRequestPlus:"+ nuevo pedido",addVisit:"Adicionar visita",search:"Buscar"},login:{messages:{signIn:"por favor ingrese",error:"Nombre de usuario o clave incorrectos."},labels:{password:"Clave",username:"Nombre de usuario",signIn:"Ingresar"}},inventory:{edit:{cost:"Costo por unidad:",delivered:"Enviado A:",location:"Cambio de ubicación:",prescription:"Recetado por:",pulled:"Pulled From:",quantity:"Quantity at Completion:",reason:"Razón:",returned:"Regresado al paciente:",transferredFrom:"Transferido a:",transferredTo:"Transferido a:"},labels:{action:"Acción",add:"Adicionar",adjust:"Adjustar",adjustmentDate:"Fecha de ajuste",adjustmentFor:"Ajustado para",adjustmentType:"Tipo de ajuste",aisle:"Pasillo",aisleLocation:"Ubicación pasillo",allInventory:"Todo el inventario",billTo:"Facturao a",consumePurchases:"Consume Purchases",consumptionRate:"Tasa de consumo",cost:"Costo",costPerUnit:"Costo por Unidad",crossReference:"Referencia cruzada",currentQuantity:"Cantidad actual",dateCompleted:"Fecha completado",dateEffective:"Gecha efectiva",dateEnd:"Fecha final",dateStart:"Fecha inicial",dateReceived:"Fecha recibido",dateTransferred:"Fecha transferencia",daysLeft:"Dias restantes",deliveryAisle:"Enviado a pasillo",deliveryLocation:"Ubicación del envio",distributionUnit:"Unidad de distribución",deleteItem:"Eliminar elemento",details:"Detalles",editItem:"Editar elemento",expense:"Gastos a",expirationDate:"Fecha de vencimiento",fulfillRequest:"Pedido de cumplimiento",fulfillRequestNow:"Pedido de incumplimiento para hoy",gift:"Regalo en especie",giftUsage:"Uso del regalo en especie",giftInKindNo:"N",giftInKindYes:"Y",inventoryConsumed:"Inventario consumido",inventoryItem:"Elemento del inventario",inventoryObsolence:"Obsolescencia de inventario",invoiceItems:"Articulos de factura",invoiceLineItem:"Elemento de la factura linea",invoiceNumber:"Factura numero",item:"Elemento",items:"Elementos",itemNumber:"Numero de elemento",location:"Ubicación",locations:"Ubicaciones",name:"Nombre",markAsConsumed:"Marcar como consumido",newItem:"Nuevo elemento",originalQuantity:"Cantidad original",print:"Imprimir",printBarcode:"Imprimir codigo de barras",printer:"Impresora",pullFrom:"Traido de",purchases:"Compras",purchaseCost:"Costo de compra",purchaseInfo:"Informacion de la compra",quantity:"Cantidad ({{unit}})",quantityAvailable:"Cantidad disponible",quantityOnHand:"Cantidad a la mano",quantityRequested:"Cantidad pedida",rank:"Ranking",reason:"Razón",remove:"Remover",reorderPoint:"Reordenar punto",requestedItems:"Elementos solicitados",salePricePerUnit:"Costo de venta por unidad",save:"Guardar",serialNumber:"Serial/Numero de lote",total:"Total",totalCost:"Costo total",totalReceived:"Total Recivido: {{total}}",transaction:"Transaccion",transactions:"Transacciones",transfer:"Translados",transferFrom:"Translado desde",transferTo:"Translado a ubicación",transferToAisle:"Translado a pasillo",unit:"Unidad",unitCost:"Unidad Costo",vendor:"Proveedor",vendorItemNumber:"Proveedor numero de elemento",xref:"XRef"},messages:{adjust:"Por favor ajust las cantidades en la ubicación adecuada(s) la diferencia de la cuenta es {{difference}}.",createRequest:"Crear un nuevo pedido?",delete:"Estas seguro de eliminar {{name}}?",itemNotFound:"El elemento del inventario {{item}} no se pudo encontrar.
Si desea crear un nuevo elemento, Ingrese la información abajo.
De lo contrario opria cancelar para volver.",loading:"Cargando transacciones ...",purchaseSaved:"La compra de inventario ha sido salvada.",noRequests:"No se encontraron pedidos.",noItems:"No se encontraron elementos.",quantity:"La cantidad total ({{quantity}}) no encaja con la cantidad total en las ubicaciones ({{locationQuantity}}).",removeItem:"Esta seguro de eliminar este elemento de la factura?",removeItemRequest:"Seguro que quiere eliminar este elemento del pedido?",requestFulfilled:"El pedido de inventario ha sido procesado.",requestUpdated:"El pedido de inventario ha sido actualizado.",warning:"Valide los campos requeridos (marcados con *) corrija los errores antes de adicionar."},reports:{rows:{adjustments:"Ajustes",adjustmentsTotal:"Ajustes totales",balanceBegin:"Balance inicial",balanceEnd:"Balance Final",category:"Categoria",consumed:"Consumado",consumedGik:"GiK Consumido",consumedGikTotal:"Total GiK Consumido",consumedPuchases:"Total de lo comprado consumido",consumedPurchasesTotal:"Total de lo comprado consumido",consumedTotal:"Total consumido",errInFinSum:"Error en _generateFinancialSummaryReport: ",errInFindPur:"Error en _findInventoryItemsByPurchase: ",errInFindReq:"Error en _findInventoryItemsByRequest: ",expensesFor:"Gatos para: ",noAccount:"(No Cuenta)",subtotal:"Subtotal: ",subtotalFor:"Subtotal para {{category}} - {{account}}: ",total:"Total: ",totalFor:"Total para {{var}}: ",totalPurchases:"Compras Totales",transfer1:"{{quantity}} de {{location}}",trasnfer2:"De: {{source}} A: {{target}}"},adjustment:"Ajuste detallado",daysSupply:"Dias de inventario restante",expenseDetail:"Gastos detallados",expenseSum:"Resumen de gastos",expiration:"Fecha de expiracion",export:"Exportar reporte",fields:"Campos a incluir",finance:"Resumen de finanzas",generate:"Generar reporte",invLocation:"Inventario por ubicacion",invValuation:"Inventario por valoracion",purchaseDetail:"Compras detalladas",purchaseSum:"Resumen de compras",reportType:"Tipo de reporte",stockTransferDetail:"Detalle de traslado de stock",stockTransferSum:"Resumen traslado de stock",stockUsageDetail:"Detalle de uso de stock",stockUsageSum:"Resumen uso de stock"},titles:{addPurchase:"Adicionar compra",addRequest:"Nuevo pedido",adjustment:"Ajuste",editPurchase:"Editar compra",editRequest:"Editar pedido",inventoryItem:"Nuevo elemento de inventario",inventoryReport:"Reporte de inventario",purchaseSaved:"Compras de inventario guardadas",quickAddTitle:"Nuevo elemento de inventario",removeItem:"Remover elemento",requestFulfilled:"Pedido cumplido",requestUpdated:"Pedido actualizado",transfer:"Trasladar elementos",warning:"Peligro!!!!!"}},imaging:{pageTitle:"Pedido de radriografia",sectionTitle:"Radiografias",buttons:{newButton:"+ new radiografia"},labels:{radiologist:"Radiologo",addNewVisit:"--Adicionar nueva visita--"},messages:{noCompleted:"No de items encontrados."},titles:{completedImaging:"Radiografia completada",editTitle:"Pedido de edicion de radiografia",newTitle:"Nuevo pedido de radiografia"},alerts:{completedTitle:"Pedido de radiografia completado",completedMessage:"El pedido de radiografia ha sido completado.",savedTitle:"Pedido de radiografia salvado",savedMessage:"El pedido de radiografia ha sido guardado."}},medication:{pageTitle:"Pedido de medicación",sectionTitle:"Medication",returnMedication:"Retorno de medicación",buttons:{dispenseMedication:"dispensar medicación",newButton:"+ nuevo pedido",returnMedication:"debolver medicacion"},titles:{completedMedication:"Medicacion completada",editMedicationRequest:"Editar pedido de medicacion",newMedicationRequest:"Nuevo pedido de medicacion"},messages:{createNew:"Crear un nuevo pedido de medicacion?",confirmDeletion:"Estas seguro de eliminar este pedido de medicación?"},labels:{refills:"Recargas",quantityRequested:"Cantidad solicitada",quantityDispensed:"Cantidad dispensada",quantityDistributed:"Cantidad distribuida",quantityToReturn:"Cantidad a devolver",returnLocation:"Retornar a ubicación",returnAisle:"Devolve a pasillo",returnReason:"Razon por la que se devuelve/Nota",adjustmentDate:"Fecha de ajuste",creditToAccount:"Credito a cuenta"},alerts:{returnedTitle:"Medicacion devuelta",returnedMessage:"La medicacion ha sido marcada para devolver.",savedTitle:"Pedido de medicacion guardado",savedMessage:"La elemento de medicación ha sido guardado.",fulfilledTitle:"Pedido de medicación cumplido"}},appointments:{currentScreenTitle:"Listado de citas",editTitle:"Editar cita",newTitle:"Nueva cita",sectionTitle:"Citas",thisWeek:"Citas esta semana",missed:"Citas perdidas",searchTitle:"Buscar citas",todayTitle:"Citas para hoy",messages:{deleteAppointmentMessage:"Esta seguro de eliminar esta cita?",endTimeLaterThanStart:"Seleccione una hora de finalizacion despues de la de inicio."},buttons:{newButton:"+ nueva cita"}},visits:{edit:{buttons:{newAppointment:"Nuevas citas",addDiagnosis:"Adicionar diagnostico",newProcedure:"Nuevo procedimiento",newLab:"New laboratorio",newMedication:"Nueva mediicación",newImaging:"Nueva radiografia"},labels:{diagnosis:"Diagnostico",procedure:"Procedimiento",authoredBy:"Escrito por",labs:"Laboratorios",imaging:"Radiografias",visitInformation:"Informacion de visita"}}},labs:{sectionTitle:"Laboratorios",requestsTitle:"Pedido de laboratorio",editTitle:"Editar pedido de laboratorio",newTitle:"Nuevo pedido de laboratorio",deleteTitle:"Eliminar pedido",completedTitle:"Completar laboratorio",labels:{labType:"Tipo de laboratorio",addNewVisit:"--Adicionar nueva visita--"},messages:{noItemsFound:"No boratorios encontrados.",createNewRecord:"Crear un registro?",confirmDeletion:"Esta seguro de eliminar esta solicitud de laboratorio?",noCompleted:"No elementos completados encontrados."},buttons:{newButton:"+ nuevo laboratorio"},alerts:{requestCompletedTitle:"Pedido de laboratorio competado",requestCompletedMessage:"El pedido de laboratorio ha sido completado.",requestSavedTitle:"Silicitud de laboratorio guardado",requestSavedMessage:"El pedido de laboratorio ha sido guardado."}},common:{actions:"Acciones"},patients:{notes:{onBehalfOfLabel:"A nombre de",onBehalfOfCopy:"a nombre de",pleaseSelectAVisit:"Por favor seleccione una visista",noteLabel:"Nota"}}}}),define("hospitalrun/locales/es/translations",["exports"],function(e){e.default={dashboard:{title:"Que deseas hacer?"},navigation:{imaging:"Radiografia",inventory:"Inventario",patients:"Pacientes",appointments:"Citas",medication:"Recetas medicas",labs:"Laboratorio",billing:"Facturas",administration:"Administracion",subnav:{requests:"Pedidos",items:"Items",completed:"Completado",newRequest:"New pedido",inventoryReceived:"Inventario recibido",reports:"Reportes",patientListing:"Lista de pacientes",newPatient:"Nuevo paciente",thisWeek:"Esta semana",today:"Hoy",search:"Buscar",addAppointment:"Nueva cita",dispense:"Dispense",returnMedication:"Devolver medicamento",invoices:"Facturas",newInvoice:"Nueva factura",prices:"Precios",priceProfiles:"Perfil de precios",lookupLists:"Lista de busuedas",addressFields:"Campos de dirección",loadDb:"Cargar base de datos",users:"Usuarios",newUser:"Nuevo usuario",userRoles:"Roles"},actions:{logout:"Salir",login:"Ingresar"},about:"Información de HospitalRun"},user:{plusNewUser:"+ nuevo usuario",usersPageTile:"Listado de usuarios"},admin:{addressOptions:"Opciones de direcciones",lookupLists:"Lista de busqueda",loadDb:"Cargar Base de datos",userRoles:"Roles",users:"Usuarios",address:{address1Label:"Texto direccion 1",address2Label:"Texto direccion 2",address3Label:"Texto direccion 3",address4Label:"Texto direccion 4",include1Label:"Incluir 1",include2Label:"Incluir 2",include3Label:"Incluir 3",include4Label:"Incluir 4",titles:{optionsSaved:"Opciones guardadas"},messages:{addressSaved:"las opciones de dirección han sido guardadas"},newTitle:"Opciones de dirección",editTitle:"Opciones de dirección",addressLabel:"Direcciones"},loaddb:{progressMessage:"Por favor espere mientras la base de datos es cargada.",progressTitle:"Cargando ase de datos",displayAlertTitle:"Seleccione un archivo para cargar",displayAlertMessage:"Por favor seleccione un archivo para ser cargado.",errorDisplayAlertTitle:"Error cargando",errorDisplayAlertMessage:"La base de datos no fue cargada el error fue: {{error}}",editTitle:"Cargar bd"},lookup:{alertImportListTitle:"Seleccione un archivo para importar",alertImportListMessage:"Por favor seleccione un archivo para importar.",alertImportListSaveTitle:"Lista importada",alertImportListSaveMessage:"Lista de busqueda importada.",alertImportListUpdateTitle:"Lista salvada",alertImportListUpdateMessage:"La lista de busqueda ha sido salvada.",pageTitle:"Listas de busqueda",edit:{template:{addTitle:"Adicionar valor",editTitle:"Editar valor",updateButtonTextAdd:"Adicionar",updateButtonTextUpdate:"Actualizar",labelTitle:"Valor"}},anesthesiaTypes:"Tipos de anestesia",anesthesiologists:"Anestesiologo",billingCategories:"Categorias de facturacion",clinicList:"Ubicacion de las clinicas",countryList:"Paises",diagnosisList:"Diagnosticos",cptCodeList:"Codigos CPT",expenseAccountList:"Cuentas de gastos",aisleLocationList:"Ubicacion de inventario de pasillo",warehouseList:"Ubicacciones de inventarios",inventoryTypes:"Tipos de inventarios",imagingPricingTypes:"Tipos de precios de radiografias",labPricingTypes:"Precios de laboratorio",patientStatusList:"Lista de estado de pacientes",physicianList:"Medicos",procedureList:"Procedimientos",procedureLocations:"Ubicacion de los procedimientos",procedurePricingTypes:"Tipos de procedimientos y precios",radiologists:"Radiologo",unitTypes:"Tipos de unidad",vendorList:"Proveedor",visitLocationList:"Lugares de visista",visitTypes:"Tipos de visita",wardPricingTypes:"Tipos de las tarifas"},roles:{capability:{admin:"Administracion",loadDb:"Cargar base de datos",updateConfig:"Actualizar configuracion",appointments:"Citas",addAppointment:"Adicionar cita",billing:"Facturacion",addCharge:"Adicionar cargo (valor)",addPricing:"Adicionar precio",addPricingProfile:"Adicionar perfil de precios",addInvoice:"Adicionar factura",addPayment:"Adicionar pago",deleteInvoice:"Eliminar factura",deletePricing:"Eliminar precio",deletePricingProfile:"Eliminar perfil de precio",editInvoice:"Editar factura",invoices:"Facturas",overrideInvoice:"Sobreescribir factura",pricing:"Precio",patients:"Pacientes",addDiagnosis:"Adicionar diagnostico",addPhoto:"Adicionar foto",addPatient:"Adicionar paciente",addVisit:"Adicionar visita",addVitals:"Adicionar partes vitales",admitPatient:"Admitir paciente",deletePhoto:"Eliminar foto",deletePatient:"Eliminar paciente",deleteAppointment:"Eliminar cita",deleteDiagnosis:"Eliminar diagnostico",deleteProcedure:"Eliminar procedimiento",deleteSocialwork:"Eliminar trabajo social",deleteVitals:"Eliminar organo vital",deleteVisit:"Eliminar visita",dischargePatient:"Descartar paciente",patientReports:"Reportes por paciente",visits:"Visitas",medication:"Medicación",addMedication:"Adicionar medicación",deleteMedication:"Eliminar medicación",fulfillMedication:"Cumplir la medicación",labs:"Laboratorios",addLab:"Adicionar laboratorio",completeLab:"Completar laboratorio",deleteLab:"Eliminar laboratorio",imaging:"Radiografia",addImaging:"Adicionar radiografia",completeImaging:"Completar radiografia",deleteImaging:"Eliminar radiografia",inventory:"Inventario",addInventoryRequest:"Pedido de inventario",addInventoryItem:"Adicionar elemento al inventario",addInventoryPurchase:"Adicionar compra",adjustInventoryLocation:"Ajustar lugar elemento en el inventario",deleteInventoryItem:"Eliminar elemento del inventario",deleteInventoryPurchase:"Eliminar compra del inventario",fulfillInventory:"Cumplimiento de inventario",defineUserRoles:"Roles de usuario"},messages:{roleSaved:"El {{roleName}} rol ha sido salvado."},titles:{roleSaved:"Role salvado"}}},labels:{cptcode:"Codigo CPT",loading:"Cargando",name:"Nombre",patient:"Paciente",quantity:"Cantidada",requestedOn:"Pedido On",date:"Fecha",dateOfBirth:"Fecha de nacimiento",dateOfBirthShort:"FDN",dateRequested:"Fecha de pedido",dateCompleted:"Fecha completada",description:"Descripción",requestedBy:"Pedido por|",fulfill:"Cumplomiento",fulfillRequest:"Pedido de cumplimiento",fulfillRequestNow:"Pedido de cumplimiento ahora",actions:"Acciones",action:"Accion",notes:"Notas",edit:"Editar",imageOrders:"Ordenes de radiografias",labOrders:"Ordenes de laboratorio",imagingType:"Tipo de radiografia",result:"Resultado",results:"Resultados",visit:"Visita",requests:"Pedido",completed:"Completado",id:"Id",on:"on",type:"Tipo",sex:"Genero",age:"Edad",username:"Nombre de usuario",email:"Email",role:"Rol",delete:"Eliminar",userCanAddNewValue:"Los usuarios pueden agregar nuevos valores",value:"Valor",lookupType:"Tipo de busqueda",importFile:"Importar archivo",fileLoadSuccessful:"Archivo cargado exitosamente",fileToLoad:"Archivo cargado",startTime:"Hora de inicio",startDate:"Fecha de inicio",endTime:"Hora de finalización",endDate:"Fecha final",docRead:"Leer documento",docWritten:"Documento escrito",displayName:"Nombre para mostrar",password:"Contraseña",editUser:"Editar usuario",newUser:"Nuevo usuario",deleteUser:"Eliminar usuario",medication:"Medicación",status:"Estado",addNewOutpatientVisit:"--Nueva visita a paciente externo--",prescription:"Receta medica",prescriptionDate:"Fecha de la receta medica",billTo:"Facturar a",pullFrom:"Traer de",fulfilled:"Cumplido",deleteRequest:"Eliminar pedido",location:"Ubicacion",provider:"Proveedor",with:"con",allDay:"Todo el dia",physician:"Médico",assisting:"Asistencia",anesthesia:"Anestesia",procedures:"Procedimiento"},messages:{noItemsFound:"Elementos no encontrados.",noHistoryAvailable:"Historia no disponible.",createNewRecord:"Crear un nuevo registro?",createNewUser:"Crear un nuevo usuario?",noUsersFound:"Ningun usuario encontrado.",areYouSureDelete:"Estas seguro de eliminar este usuario {{user}}?",userHasBeenSaved:"El usuario ha sido salvado.",userSaved:"Usuario salvado",onBehalfOf:"a nombre de",newPatientHasToBeCreated:"Un nuevo paciente debe ser creado...Por favor espere..",noNotesAvailable:"No hay notas clínicas adicionales están disponibles para esta visita.",sorry:"Lo sentimos, un error ha ocurrido...",forAuthorizedPersons:"Este informe es sólo para personas autorizadas."},alerts:{pleaseWait:"Por favor espere"},buttons:{complete:"Completado",cancel:"Cancelar",close:"Cerrar",returnButton:"Regresar",barcode:"Codigo de barras",add:"Adicionar",update:"Actualizar",ok:"Ok",fulfill:"Cumplimiento",remove:"Remover",delete:"Eliminar",newUser:"Nuevo usuario",addValue:"Adicionar valor",newNote:"Nueva nota",import:"Importar",loadFile:"Cargar archivo",newRequest:"Nueva solicitud",allRequests:"Todas las solicitudes",dispense:"Repartir",newItem:"+ nuevo elemento",newRequestPlus:"+ nuevo pedido",addVisit:"Adicionar visita",search:"Buscar"},login:{messages:{signIn:"por favor ingrese",error:"Nombre de usuario o clave incorrectos."},labels:{password:"Clave",username:"Nombre de usuario",signIn:"Ingresar"}},inventory:{edit:{cost:"Costo por unidad:",delivered:"Enviado A:",location:"Cambio de ubicación:",prescription:"Recetado por:",pulled:"Pulled From:",quantity:"Quantity at Completion:",reason:"Razón:",returned:"Regresado al paciente:",transferredFrom:"Transferido a:",transferredTo:"Transferido a:"},labels:{action:"Acción",add:"Adicionar",adjust:"Adjustar",adjustmentDate:"Fecha de ajuste",adjustmentFor:"Ajustado para",adjustmentType:"Tipo de ajuste",aisle:"Pasillo",aisleLocation:"Ubicación pasillo",allInventory:"Todo el inventario",billTo:"Facturao a",consumePurchases:"Consume Purchases",consumptionRate:"Tasa de consumo",cost:"Costo",costPerUnit:"Costo por Unidad",crossReference:"Referencia cruzada",currentQuantity:"Cantidad actual",dateCompleted:"Fecha completado",dateEffective:"Gecha efectiva",dateEnd:"Fecha final",dateStart:"Fecha inicial",dateReceived:"Fecha recibido",dateTranferred:"Fecha transferencia",daysLeft:"Dias restantes",deliveryAisle:"Enviado a pasillo",deliveryLocation:"Ubicación del envio",distributionUnit:"Unidad de distribución",deleteItem:"Eliminar elemento",details:"Detalles",editItem:"Editar elemento",expense:"Gastos a",expirationDate:"Fecha de vencimiento",fulfillRequest:"Pedido de cumplimiento",fulfillRequestNow:"Pedido de incumplimiento para hoy",gift:"Regalo en especie",giftUsage:"Uso del regalo en especie",giftInKindNo:"N",giftInKindYes:"Y",inventoryConsumed:"Inventario consumido",inventoryItem:"Elemento del inventario",inventoryObsolence:"Obsolescencia de inventario",invoiceItems:"Articulos de factura",invoiceLineItem:"Elemento de la factura linea",invoiceNumber:"Factura numero",item:"Elemento",items:"Elementos",itemNumber:"Numero de elemento",location:"Ubicación",locations:"Ubicaciones",name:"Nombre",markAsConsumed:"Marcar como consumido",newItem:"Nuevo elemento",originalQuantity:"Cantidad original",print:"Imprimir",printBarcode:"Imprimir codigo de barras",printer:"Impresora",pullFrom:"Traido de",purchases:"Compras",purchaseCost:"Costo de compra",purchaseInfo:"Informacion de la compra",quantity:"Cantidad ({{unit}})",quantityAvailable:"Cantidad disponible",quantityOnHand:"Cantidad a la mano",quantityRequested:"Cantidad pedida",rank:"Ranking",reason:"Razón",remove:"Remover",reorderPoint:"Reordenar punto",requestedItems:"Elementos solicitados",salePricePerUnit:"Costo de venta por unidad",save:"Guardar",serialNumber:"Serial/Numero de lote",total:"Total",totalCost:"Costo total",totalReceived:"Total Recivido: {{total}}",transaction:"Transaccion",transactions:"Transacciones",transfer:"Translados",transferFrom:"Translado desde",transferTo:"Translado a ubicación",transferToAisle:"Translado a pasillo",unit:"Unidad",unitCost:"Unidad Costo",vendor:"Proveedor",vendorItemNumber:"Proveedor numero de elemento",xref:"XRef"},messages:{adjust:"Por favor ajust las cantidades en la ubicación adecuada(s) la diferencia de la cuenta es {{difference}}.",createRequest:"Crear un nuevo pedido?",delete:"Estas seguro de eliminar {{name}}?",itemNotFound:"El elemento del inventario {{item}} no se pudo encontrar.
Si desea crear un nuevo elemento, Ingrese la información abajo.
De lo contrario opria cancelar para volver.",loading:"Cargando transacciones ...",purchaseSaved:"La compra de inventario ha sido salvada.",noRequests:"No se encontraron pedidos.",noItems:"No se encontraron elementos.",quantity:"La cantidad total ({{quantity}}) no encaja con la cantidad total en las ubicaciones ({{locationQuantity}}).",removeItem:"Esta seguro de eliminar este elemento de la factura?",removeItemRequest:"Seguro que quiere eliminar este elemento del pedido?",requestFulfilled:"El pedido de inventario ha sido procesado.",requestUpdated:"El pedido de inventario ha sido actualizado.",warning:"Valide los campos requeridos (marcados con *) corrija los errores antes de adicionar."},reports:{rows:{adjustments:"Ajustes",adjustmentsTotal:"Ajustes totales",balanceBegin:"Balance inicial",balanceEnd:"Balance Final",category:"Categoria",consumed:"Consumado",consumedGik:"GiK Consumido",consumedGikTotal:"Total GiK Consumido",consumedPuchases:"Total de lo comprado consumido",consumedPurchasesTotal:"Total de lo comprado consumido",consumedTotal:"Total consumido",errInFinSum:"Error en _generateFinancialSummaryReport: ",errInFindPur:"Error en _findInventoryItemsByPurchase: ",errInFindReq:"Error en _findInventoryItemsByRequest: ",expensesFor:"Gatos para: ",noAccount:"(No Cuenta)",subtotal:"Subtotal: ",subtotalFor:"Subtotal para {{category}} - {{account}}: ",total:"Total: ",totalFor:"Total para {{var}}: ",totalPurchases:"Compras Totales",transfer1:"{{quantity}} de {{location}}",trasnfer2:"De: {{source}} A: {{target}}"},adjustment:"Ajuste detallado",daysSupply:"Dias de inventario restante",expenseDetail:"Gastos detallados",expenseSum:"Resumen de gastos",expiration:"Fecha de expiracion",export:"Exportar reporte",fields:"Campos a incluir",finance:"Resumen de finanzas",generate:"Generar reporte",invLocation:"Inventario por ubicacion",invValuation:"Inventario por valoracion",purchaseDetail:"Compras detalladas", +purchaseSum:"Resumen de compras",reportType:"Tipo de reporte",stockTransferDetail:"Detalle de traslado de stock",stockTransferSum:"Resumen traslado de stock",stockUsageDetail:"Detalle de uso de stock",stockUsageSum:"Resumen uso de stock"},titles:{addPurchase:"Adicionar compra",addRequest:"Nuevo pedido",adjustment:"Ajuste",editPurchase:"Editar compra",editRequest:"Editar pedido",inventoryItem:"Nuevo elemento de inventario",inventoryReport:"Reporte de inventario",purchaseSaved:"Compras de inventario guardadas",quickAddTitle:"Nuevo elemento de inventario",removeItem:"Remover elemento",requestFulfilled:"Pedido cumplido",requestUpdated:"Pedido actualizado",transfer:"Trasladar elementos",warning:"Peligro!!!!!"}},imaging:{pageTitle:"Pedido de radriografia",sectionTitle:"Radiografias",buttons:{newButton:"+ new radiografia"},labels:{radiologist:"Radiologo",addNewVisit:"--Adicionar nueva visita--"},messages:{noCompleted:"No de items encontrados."},titles:{completedImaging:"Radiografia completada",editTitle:"Pedido de edicion de radiografia",newTitle:"Nuevo pedido de radiografia"},alerts:{completedTitle:"Pedido de radiografia completado",completedMessage:"El pedido de radiografia ha sido completado.",savedTitle:"Pedido de radiografia salvado",savedMessage:"El pedido de radiografia ha sido guardado."}},medication:{pageTitle:"Pedido de medicación",sectionTitle:"Medication",returnMedication:"Retorno de medicación",buttons:{dispenseMedication:"dispensar medicación",newButton:"+ nuevo pedido",returnMedication:"debolver medicacion"},titles:{completedMedication:"Medicacion completada",editMedicationRequest:"Editar pedido de medicacion",newMedicationRequest:"Nuevo pedido de medicacion"},messages:{createNew:"Crear un nuevo pedido de medicacion?",confirmDeletion:"Estas seguro de eliminar este pedido de medicación?"},labels:{refills:"Recargas",quantityRequested:"Cantidad solicitada",quantityDispensed:"Cantidad dispensada",quantityDistributed:"Cantidad distribuida",quantityToReturn:"Cantidad a devolver",returnLocation:"Retornar a ubicación",returnAisle:"Devolve a pasillo",returnReason:"Razon por la que se devuelve/Nota",adjustmentDate:"Fecha de ajuste",creditToAccount:"Credito a cuenta"},alerts:{returnedTitle:"Medicacion devuelta",returnedMessage:"La medicacion ha sido marcada para devolver.",savedTitle:"Pedido de medicacion guardado",savedMessage:"La elemento de medicación ha sido guardado.",fulfilledTitle:"Pedido de medicación cumplido"}},appointments:{currentScreenTitle:"Listado de citas",editTitle:"Editar cita",newTitle:"Nueva cita",sectionTitle:"Citas",thisWeek:"Citas esta semana",missed:"Citas perdidas",searchTitle:"Buscar citas",todayTitle:"Citas para hoy",messages:{deleteAppointmentMessage:"Esta seguro de eliminar esta cita?",endTimeLaterThanStart:"Seleccione una hora de finalizacion despues de la de inicio."},buttons:{newButton:"+ nueva cita"}},visits:{edit:{buttons:{newAppointment:"Nuevas citas",addDiagnosis:"Adicionar diagnostico",newProcedure:"Nuevo procedimiento",newLab:"New laboratorio",newMedication:"Nueva mediicación",newImaging:"Nueva radiografia"},labels:{diagnosis:"Diagnostico",procedure:"Procedimiento",authoredBy:"Escrito por",labs:"Laboratorios",imaging:"Radiografias",visitInformation:"Informacion de visita"}}},labs:{sectionTitle:"Laboratorios",requestsTitle:"Pedido de laboratorio",editTitle:"Editar pedido de laboratorio",newTitle:"Nuevo pedido de laboratorio",deleteTitle:"Eliminar pedido",completedTitle:"Completar laboratorio",labels:{labType:"Tipo de laboratorio",addNewVisit:"--Adicionar nueva visita--"},messages:{noItemsFound:"No boratorios encontrados.",createNewRecord:"Crear un registro?",confirmDeletion:"Esta seguro de eliminar esta solicitud de laboratorio?",noCompleted:"No elementos completados encontrados."},buttons:{newButton:"+ nuevo laboratorio"},alerts:{requestCompletedTitle:"Pedido de laboratorio competado",requestCompletedMessage:"El pedido de laboratorio ha sido completado.",requestSavedTitle:"Silicitud de laboratorio guardado",requestSavedMessage:"El pedido de laboratorio ha sido guardado."}},common:{actions:"Acciones"},patients:{notes:{onBehalfOfLabel:"A nombre de",onBehalfOfCopy:"a nombre de",pleaseSelectAVisit:"Por favor seleccione una visista",noteLabel:"Nota"}}}}),define("hospitalrun/locales/fr/translations",["exports"],function(e){e.default={dashboard:{title:"Que voulez-vous faire?"},navigation:{imaging:"Imagerie",inventory:"Inventaire",patients:"Patients",appointments:"Rendez-vous",medication:"Médicament",labs:"Labos",billing:"Facturation",administration:"Administration",subnav:{requests:"Demandes",items:"Articles",completed:"Traité",newRequest:"Nouvelle demande",inventoryReceived:"Inventaire reçu",reports:"Rapports",patientListing:"Liste des patients",newPatient:"Nouveau patient",thisWeek:"Cette semaine",today:"Aujourd'hui",search:"Rechercher",addAppointment:"Ajouter un rendez-vous",dispense:"Dispenser",returnMedication:"Retourner un Médicament",invoices:"Factures",newInvoice:"Nouvelle facture",prices:"Prix",priceProfiles:"Profils de prix",lookupLists:"Listes de référence",addressFields:"Champs d'adresse",loadDb:"Importer une BD",users:"Utilisateurs",newUser:"Nouvel utilisateur",admittedPatients:"patients admis",missed:"Manqué",userRoles:"Rôles de l'utilisateur"},actions:{logout:"Deconnexion",login:"Connexion"},about:"À propos de HospitalRun"},user:{plusNewUser:"+ nouvel utilisateur",usersPageTile:"Liste des Utilisateurs"},admin:{addressOptions:"Options d'adresse",lookupLists:"Listes de référence",loadDb:"Importer une BD",users:"Utilisateurs",address:{address1Label:"Label de l'adresse 1",address2Label:"Label de l'adresse 2",address3Label:"Label de l'adresse 3",address4Label:"Label de l'adresse 4",include1Label:"Label de l'include 1",include2Label:"Label de l'include 2",include3Label:"Label de l'include 3",include4Label:"Label de l'include 4",titles:{optionsSaved:"Options enregistrées"},messages:{addressSaved:"Les options d'adresse ont été enregistrées"},newTitle:"Options d'adresse",editTitle:"Options d'adresse",addressLabel:"Adresse"},loaddb:{progressMessage:"Veuillez patienter durant le chargement de la base de données.",progressTitle:"Chargement de la base de données en cours",displayAlertTitle:"Sélectionner le fichier à télécharger.",displayAlertMessage:"Veuillez sélectionner le fichier à télécharger.",errorDisplayAlertTitle:"Erreur de chargement",errorDisplayAlertMessage:"La base de données ne pouvait pas être importée. L'erreur etait: {{error}}",editTitle:"Importer une BD"},lookup:{alertImportListTitle:"Sélectionner le fichier à importer",alertImportListMessage:"Veuillez sélectionner le fichier à importer.",alertImportListSaveTitle:"Liste importée",alertImportListSaveMessage:"La liste de référence a été importée.",alertImportListUpdateTitle:"Liste enregistrée",alertImportListUpdateMessage:"La liste de référence a été enregistrée.",pageTitle:"Listes de référence",edit:{template:{addTitle:"Ajouter une valeur",editTitle:"Modifier la valeur",updateButtonTextAdd:"Ajouter",updateButtonTextUpdate:"Mettre à jour",labelTitle:"Valeur"}},anesthesiaTypes:"Types d'Anesthésie",anesthesiologists:"Anesthésiologistes",billingCategories:"Catégories de facturation",clinicList:"Emplacements de la clinique",countryList:"Pays",diagnosisList:"Diagnostics",cptCodeList:"Codes CPT",expenseAccountList:"Comptes de dépense",aisleLocationList:"Emplacements de rayon d'inventaire",warehouseList:"Emplacements d'inventaire",inventoryTypes:"Types d'inventaire",imagingPricingTypes:"Types de prix d'imagerie",labPricingTypes:"Types de prix de labo",patientStatusList:"Liste de statut de patient",physicianList:"Médécins",procedureList:"Procédures",procedureLocations:"Emplacements des procédures",procedurePricingTypes:"Types de prix de procédure",radiologists:"Radiologistes",unitTypes:"Types d'unité",vendorList:"Fournisseur",visitLocationList:"Emplacements de visite",visitTypes:"Types de visite",wardPricingTypes:"Types de prix de service"},roles:{capability:{admin:"Administration",loadDb:"Charger la Base de données",updateConfig:"Mettre à jour les Configurations",appointments:"Rendez-vous",addAppointment:"Ajouter un Rendez-vous",billing:"Facturation",addCharge:"Ajouter une charge",addPricing:"Ajouter un Prix",addPricingProfile:"Ajouter le profil de prix",addInvoice:"Ajouter une facture",addPayment:"Ajouter un paiement",deleteInvoice:"Supprimer une facture",deletePricing:"Supprimer un Prix",deletePricingProfile:"Supprimer le profil de prix",editInvoice:"Modifier la facture",invoices:"Factures",overrideInvoice:"Remplacer la facture",pricing:"Tarification",patients:"Patients",addDiagnosis:"Ajouter un diagnostic",addPhoto:"Ajouter une photo",addPatient:"Ajouter un patient",addVisit:"Ajouter une visite",addVitals:"Ajouter les signes vitaux",admitPatient:"Admettre un patient",deletePhoto:"Supprimer une photo",deletePatient:"Supprimer un patient",deleteAppointment:"Supprimer un rendez-vous",deleteDiagnosis:"Supprimer un diagnostic",deleteProcedure:"Supprimer une procédure",deleteSocialwork:"Supprimer un travail social",deleteVitals:"Supprimer des signes vitaux",deleteVisit:"Supprimer une Visite",dischargePatient:"Liberer un patient",patientReports:"Rapports des patients",visits:"Visites",medication:"Médicament",addMedication:"Ajouter un médicament",deleteMedication:"Supprimer un médicament",fulfillMedication:"Traiter une demande de médicaments",labs:"Test Labo",addLab:"Ajouter un test labo",completeLab:"Completer un test labo",deleteLab:"Supprimer un test labo",imaging:"Imagerie",addImaging:"Ajouter une imagerie",completeImaging:"Completer une imagerie",deleteImaging:"Supprimer une Imagerie",inventory:"Inventaire",addInventoryRequest:"Ajouter une demande d'inventaire",addInventoryItem:"Ajouter un article d'inventaire",addInventoryPurchase:"Ajouter un achat d'inventaire",adjustInventoryLocation:"Ajuster la localisation de l'inventaire",deleteInventoryItem:"Supprimer un article d'inventaire",deleteInventoryPurchase:"Supprimer un achat d'inventaire",fulfillInventory:"Traiter l'inventaire",defineUserRoles:"Rôles d'utilisateur"},messages:{roleSaved:"Le rôle {{roleName}} a été enregistré."},titles:{roleSaved:"Rôle enregistré"}}},labels:{cptcode:"Code CPT",loading:"Chargement",name:"Nom",patient:"Patient",prescriber:"prescripteur",quantity:"Quantité",requestedOn:"Demandé le",date:"Date",dateOfBirth:"Date de naissance",dateOfBirthShort:"DdN",dateRequested:"Date de demande",dateCompleted:"Date de traitement",description:"Description",requestedBy:"Demandé par",fulfill:"Traiter",fulfillRequest:"Traiter la demande",fulfillRequestNow:"Traiter la demande maintenant",actions:"Actions",action:"Action",notes:"Notes",edit:"Modifier",imageOrders:"Demandes d'imagerie",labOrders:"Demandes de labo",imagingType:"Type d'imagerie",result:"Resultat",results:"Resultats",visit:"Visite",requests:"Demandes",completed:"Traité",id:"Id",on:"sur",type:"Type",sex:"Sexe",age:"Age",username:"Nom d'utilisateur",email:"Email",role:"Rôle",delete:"Supprimer",userCanAddNewValue:"Utilisateur peut ajouter de nouvelles valeurs",value:"Valeur",lookupType:"Type de référence",importFile:"Importer un fichier",fileLoadSuccessful:"Téléchargement reussi",fileToLoad:"Téléchargement de fichier",startTime:"Heure de debut",startDate:"Date de debut",endTime:"Heure de fin",endDate:"Date de fin",docRead:"Documents lus",docWritten:"Documents écrits",displayName:"Nom à afficher",password:"Mot de passe",editUser:"Modifier un utilisateur",newUser:"Nouvel utilisateur",deleteUser:"Supprimer un utilisateur",medication:"Médicament",status:"Statut",addNewOutpatientVisit:"--Ajouter une nouvelle consultation externe--",prescription:"Ordonnance",prescriptionDate:"Date de prescription",billTo:"Facturer à",pullFrom:"Tirer de",fulfilled:"Traité",deleteRequest:"Supprimer la demande",location:"Emplacement",provider:"Fournisseur",with:"Avec",allDay:"Toute la journée",physician:"Médecin",assisting:"Assistant",anesthesia:"Anesthésie",procedures:"Procédures"},messages:{noItemsFound:"Aucun article retrouvé.",noHistoryAvailable:"Aucune historique disponible.",createNewRecord:"Créer un nouveau dossier?",createNewUser:"Créer un nouvel utilisateur?",noUsersFound:"Aucun utilisateur retrouvé.",areYouSureDelete:"Êtes-vous sûr de vouloir supprimer l'utilisateur {{user}}?",userHasBeenSaved:"L'utilisateur a été enregistré.",userSaved:"Utilisateur enregistré",onBehalfOf:"de la part de",newPatientHasToBeCreated:"Un nouveau patient doit être crée...Veuillez attendre...",noNotesAvailable:"Aucune note clinique supplémentaire disponible pour cette visite.",sorry:"Désolé, quelque chose a mal tourné ...",forAuthorizedPersons:"Ce rapport est destiné uniquement aux personnes autorisées."},alerts:{pleaseWait:"Veuillez attendre"},buttons:{complete:"Traiter",cancel:"Annuler",close:"Fermer",returnButton:"Retourner",barcode:"Code barre",add:"Ajouter",update:"Mettre à jour",ok:"Ok",fulfill:"Traiter",remove:"Retirer",delete:"Supprimer",newUser:"Nouvel utilisateur",addValue:"Ajouter une valeur",newNote:"Nouvelle note",import:"Importer",loadFile:"Télécharger le fichier",newRequest:"Nouvelle demande",allRequests:"Toutes les demandes",dispense:"Dispenser",newItem:"+ nouvel article",newRequestPlus:"+ nouvelle demande",addVisit:"Ajouter une visite",search:"Rechercher"},login:{messages:{signIn:"veuillez-vous connecter",error:"Nom d'utilisateur ou mot de passe est incorrect."},labels:{password:"Mot de passe",username:"Nom d'utilisateur",signIn:"Connexion"}},inventory:{edit:{cost:"Coût par unité:",delivered:"Livré à:",location:"Emplacement ajusté:",prescription:"Ordonnance pour:",pulled:"Tiré de:",quantity:"Quantité après traitement:",reason:"Motif:",returned:"Retourné par le patient:",transferredFrom:"Transféré de:",transferredTo:"Transféré à:"},labels:{action:"Action",add:"Ajouter",adjust:"Ajuster",adjustmentDate:"Date d'ajustement",adjustmentFor:"Ajustement pour",adjustmentType:"Type d'ajustement",aisle:"Rayon",aisleLocation:"Emplacement du rayon",allInventory:"Toute l'inventaire",billTo:"Facturer à",consumePurchases:"Utiliser les achats",consumptionRate:"Taux d'utilisation",cost:"Coût",costPerUnit:"Coût par unité",crossReference:"Reference",currentQuantity:"Quantité actuelle",dateCompleted:"Date de traitement",dateEffective:"Date d'effet",dateEnd:"Date de fin",dateStart:"Date de debut",dateReceived:"Date de réception",dateTransferred:"Date de transfert",daysLeft:"Nombre de jours restant",deliveryAisle:"Rayon de livraison",deliveryLocation:"Emplacement de livraison",distributionUnit:"Unité de distribution",deleteItem:"Supprimer l'article",details:"Détails",editItem:"Modifier l'article",expense:"Dépenses pour",expirationDate:"Date d'expiration",fulfillRequest:"Traiter la demande",fulfillRequestNow:"Traiter la demande maintenant",gift:"Don en nature",giftUsage:"Utilisation de don en nature",giftInKindNo:"N",giftInKindYes:"O",inventoryConsumed:"Inventaire utilisé",inventoryItem:"Article à inventorier",inventoryObsolence:"Inventory Obsolence",invoiceItems:"Articles de facture",invoiceLineItem:"Article de facture",invoiceNumber:"Numero de facture",item:"Article",items:"Articles",itemNumber:"Numero d'article",location:"Emplacement",locations:"Emplacements",name:"Nom",markAsConsumed:"Marqué comme utilisé",newItem:"Nouvel article",originalQuantity:"Quantité originale",print:"Imprimer",printBarcode:"Imprimer le code barre",printer:"Imprimante",pullFrom:"Tirer de",purchases:"Achats",purchaseCost:"Coût d'achat",purchaseInfo:"Détails de l'achat",quantity:"Quantité ({{unit}})",quantityAvailable:"Quantité disponible",quantityOnHand:"Quantité en main",quantityRequested:"Quantité demandée",rank:"Rang",reason:"Motif",remove:"Retirer",reorderPoint:"Point de commande",requestedItems:"Articles demandés",salePricePerUnit:"Prix de vente unitaire",save:"Enregistrer",serialNumber:"Numéro de série / lot",total:"Total",totalCost:"Coût total",totalReceived:"Total reçu: {{total}}",transaction:"Transaction",transactions:"Transactions",transfer:"Transférer",transferFrom:"Transféré de",transferTo:"Transférer à l'emplacement",transferToAisle:"Transférer à l'emplacement du rayon",unit:"Unité",unitCost:"Coût unitaire",vendor:"Fournisseur",vendorItemNumber:"Numéro d'article fournisseur",xref:"XRef"},messages:{adjust:"Veuillez ajuster les quantités sur le ou les emplacement(s) appropriée(s) pour tenir compte de la différence de {{difference}}.",createRequest:"Créer une nouvelle demande?",delete:"Etes-vous sûr que vous souhaitez supprimer {{name}}?",itemNotFound:"L'article d'inventaire {{item}} ne pouvait pas être retrouvé.
Si vous voulez créer un nouvel article d'inventaire, veuillez saisir les informations ci-dessous.
Sinon, appuyez sur le bouton Annuler pour retourner.",loading:"Chargement des transactions en cours…",purchaseSaved:"Les achats d'inventaire ont été enregistrés avec succès.",noRequests:"Aucune demande retrouvée.",noItems:"Aucun article retrouvé.",quantity:"La quantité totale de ({{quantity}}) ne correspond pas à la quantité totale dans les emplacements ({{locationQuantity}}).",removeItem:"Etes-vous sûr de vouloir retirer cet article de cette facture?",removeItemRequest:"Etes-vous sûr de vouloir supprimer cet article de cette demande?",requestFulfilled:"La demande d'inventaire a été traitée.",requestUpdated:"La demande d'inventaire a été mis à jour.",warning:"Veuillez remplir les champs obligatoires (marqués d'un *) et corriger les erreurs avant d'ajouter."},reports:{rows:{adjustments:"Ajustements",adjustmentsTotal:"Ajustements totaux",balanceBegin:"Solde d'ouverture",balanceEnd:"Solde de clôture",category:"Catégorie",consumed:"Utilisé",consumedGik:"GiK utilisé",consumedGikTotal:"GiK total utilisé",consumedPuchases:"Achats utilisés",consumedPurchasesTotal:"Achats totaux utilisés",consumedTotal:"Total utilisé",errInFinSum:"Erreur dans _generateFinancialSummaryReport: ",errInFindPur:"Erreur dans _findInventoryItemsByPurchase: ",errInFindReq:"Erreur dans _findInventoryItemsByRequest: ",expensesFor:"Dépenses pour: ",noAccount:"(Pas de compte)",subtotal:"Sous-total: ",subtotalFor:"Sous-total pour {{category}} - {{account}}: ",total:"Total: ",totalFor:"Total pour {{var}}: ",totalPurchases:"Achats totaux",transfer1:"{{quantity}} de {{location}}",trasnfer2:"De: {{source}} A: {{target}}"},adjustment:"Ajustement détaillée",daysSupply:"Stock restant (en nombre de jours)",expenseDetail:"Détails des dépenses",expenseSum:"Résumé des dépenses",expiration:"Date d'expiration",export:"Exporter un rapport",fields:"Champs à inclure",finance:"Résumé des finances",generate:"Créer un rapport",invLocation:"Inventaire par emplacement",invValuation:"Valorisation de l'inventaire",purchaseDetail:"Détails de l'achat",purchaseSum:"Résumé de l'achat",reportType:"Type de rapport",stockTransferDetail:"Transfert détaillé du stock",stockTransferSum:"Résumé du transfert du stock",stockUsageDetail:"Utilisation détaillée du stock",stockUsageSum:"Résumé de l'utilisation du stock"},titles:{addPurchase:"Ajouter un achat",addRequest:"Nouvelle demande",adjustment:"Ajustement",editPurchase:"Modifier l'achat",editRequest:"Modifier la demande",inventoryItem:"Nouvel article d'inventaire",inventoryReport:"Rapport d'inventaire",purchaseSaved:"Achats d'inventaire enregistrés",quickAddTitle:"Nouvel article d'inventaire",removeItem:"Retirer l'article",requestFulfilled:"Demande traitée",requestUpdated:"Demande mis à jour",transfer:"Transférer les articles",warning:"Attention!!!!!"}},imaging:{pageTitle:"Demandes d'imagerie",sectionTitle:"Imagerie",buttons:{newButton:"+ nouvelle imagerie"},labels:{radiologist:"Radiologiste",addNewVisit:"--Ajouter une nouvelle visite--"},messages:{noCompleted:"Aucun article traité retrouvé."},titles:{completedImaging:"Imagerie traitée",editTitle:"Modifier la demande d'imagerie",newTitle:"Nouvelle demande d'imagerie"},alerts:{completedTitle:"Demande d'imagerie traitée",completedMessage:"La demande d'imagerie a été traitée.",savedTitle:"Demande d'imagerie enregistrée",savedMessage:"La demande d'imagerie a été enregistrée."}},medication:{pageTitle:"Demandes de médicament",sectionTitle:"Médicament",returnMedication:"Retourner un médicament",buttons:{dispenseMedication:"dispenser un médicament",newButton:"+ nouvelle demande",returnMedication:"retourner un médicament"},titles:{completedMedication:"Médicament traitée",editMedicationRequest:"Modifier une demande de médicament",newMedicationRequest:"Nouvelle demande de médicament"},messages:{createNew:"Créer une nouvelle demande de médicament?",confirmDeletion:"Êtes-vous sûr de vouloir supprimer cette demande de médicaments?"},labels:{refills:"Renouvellements",quantityRequested:"Quantité demandé",quantityDispensed:"Quantité dispensé",quantityDistributed:"Quantité distribué",quantityToReturn:"Quantité à retourner",returnLocation:"Emplacement de retour",returnAisle:"Rayon de retour",returnReason:"Motif/notes du retour",adjustmentDate:"Date d'ajustement",creditToAccount:"Créditer le compte"},alerts:{returnedTitle:"Médicament retourné",returnedMessage:"Le médicament a été marqué comme retourné.",savedTitle:"Demande de médicament enregistrée",savedMessage:"Le dossier de médicament a été enregistré.",fulfilledTitle:"Demande de médicament traitée"}},appointments:{currentScreenTitle:"Liste des rendez-vous",editTitle:"Modifier le rendez-vous",newTitle:"Nouveau rendez-vous",sectionTitle:"Rendez-vous",thisWeek:"Rendez-vous de la semaine",missed:"Rendez-vous manqués",searchTitle:"Rechercher les rendez-vous",todayTitle:"Rendez-vous d'aujourd'hui",messages:{deleteAppointmentMessage:"Etes-vous sûr de vouloir supprimer ce rendez-vous?",endTimeLaterThanStart:"Veuillez sélectionnez une heure de fin plus tard que l'heure de début."},buttons:{newButton:"+ nouveau rendez-vous"}},visits:{edit:{buttons:{newAppointment:"Nouveau rendez-vous",addDiagnosis:"Ajoute un diagnostic",newProcedure:"Nouvelle procédure",newLab:"Nouveau labo",newImaging:"Nouvelle imagerie",newMedication:"Nouveau médicament"},labels:{diagnosis:"Diagnostic",procedure:"Procédure",authoredBy:"Crée par",labs:"Labos",imaging:"Imagerie",visitInformation:"Détails de la visite"}}},labs:{sectionTitle:"Labos",requestsTitle:"Demandes de labo",editTitle:"Modifier la demande de labo",newTitle:"Nouvelle demande de labo",deleteTitle:"Supprimer la demande",completedTitle:"Labos traités",labels:{labType:"Type de labo",addNewVisit:"--Ajouter une nouvelle visite--"},messages:{noItemsFound:"Aucun labo retrouvé.",createNewRecord:"Créer un nouveau dossier?",confirmDeletion:"Etes-vous sûr de vouloir supprimer cette demande de labo?",noCompleted:"Aucun article traité retrouvé."},buttons:{newButton:"+ nouveau labo"},alerts:{requestCompletedTitle:"Demande de labo traitée",requestCompletedMessage:"La demande de labo a été traitée.",requestSavedTitle:"Demande de labo enregistrée",requestSavedMessage:"La demande de labo a été enregistrée."}},common:{actions:"Actions"},patients:{notes:{onBehalfOfLabel:"De la part de",onBehalfOfCopy:"de la part de",pleaseSelectAVisit:"Veuillez sélectionner une visite",noteLabel:"Note"}}}}),define("hospitalrun/locales/pt-BR/translations",["exports"],function(e){e.default={dashboard:{title:"O que você gostaria de fazer?"},errors:{inclusion:"não está na lista",exclusion:"é reservado",invalid:"é inválido",confirmation:"{{attribute}} não corresponde",accepted:"deve ser aceito",empty:"não pode ser vazio",blank:"não pode ser branco",present:"pode ser branco",tooLong:"é muito longo (quantidade máxima de caracteres é {{count}} )",tooShort:"é muito curta (quantidade mínima de caracteres é {{count}})",wrongLength:"o tamanho está errado (são esperados {{count}} caracteres)",notANumber:"não é um número",notAnInteger:"deve ser um número inteiro",greaterThan:"deve ser maior do que {{count}}",greaterThanOrEqualTo:"deve ser maior ou igual à {{count}}",equalTo:"deve ser igual à {{count}}",lessThan:"deve ser menor do que {{count}}",lessThanOrEqualTo:"deve ser menor ou igual à {{count}}",otherThan:"deve ser diferente de {{count}}",odd:"deve ser ímpar",even:"deve ser até",invalidNumber:"número não é valido"},navigation:{imaging:"Imagem",inventory:"Inventário",patients:"Pacientes",appointments:"Compromisso",medication:"Medicação",labs:"Laboratórios",billing:"Faturamento",administration:"Administração",subnav:{actions:"Ações",requests:"Requisições",items:"Itens",completed:"Concluídos",newRequest:"Nova Requisição",inventoryReceived:"Inventário Recebido",reports:"Relatórios",patientListing:"Lista de Pacientes",newPatient:"Novo Paciente",thisWeek:"Essa Semana",today:"Hoje",search:"Pesquisa",addAppointment:"Adicionar Compromisso",dispense:"Dispensar",returnMedication:"Retorno de Medicação",invoices:"Faturas",newInvoice:"Nova Fatura",prices:"Preços",priceProfiles:"Perfis de Preços",lookupLists:"Listas de Pesquisa",addressFields:"Campos de Endereço",loadDB:"Carregar BD",users:"Usuários",newUser:"Novo Usuário",admittedPatients:"Pacientes Admitidos",missed:"Perdidos",userRoles:"Perfis de Usuário",workflow:"Workflow"},actions:{logout:"Sair",login:"Entrar"},about:"Sobre HospitalRun"},user:{plusNewUser:"+ novo usuário",usersPageTile:"Lista de Usuários"},admin:{addressOptions:"Opções de Endereço",lookupLists:"Lista de Pesquisas",loadDb:"Carregar DB",userRoles:"Perfis de Usuários",users:"Usuários",address:{address1Label:"Rótulo Endereço 1",address2Label:"Rótulo Endereço 2",address3Label:"Rótulo Endereço 3",address4Label:"Rótulo Endereço 4",include1Label:"Rótulo Include 1",include2Label:"Rótulo Include 2",include3Label:"Rótulo Include 3",include4Label:"Rótulo Include 4",titles:{optionsSaved:"Opções Salvas"},messages:{addressSaved:"As opções de endereço foram salvas"},newTitle:"Opções de Endereço",editTitle:"Opções de Endereço",addressLabel:"Endereço"},loaddb:{progressMessage:"Por favor aguarde enquanto o seu banco de dados é carregado.",progressTitle:"Carregando Banco de Dados",displayAlertTitle:"Selecione o Arquivo para Carregar",displayAlertMessage:"Por favor Selecione o Arquivo para Carregar.",errorDisplayAlertTitle:"Erro ao carregar",errorDisplayAlertMessage:"O banco de dados não foi carregado. O erro foi: {{error}}",editTitle:"Carregando BD"},lookup:{alertImportListTitle:"Selecione o arquivo para importação",alertImportListMessage:"Por favor Selecione o arquivo para importação.",alertImportListSaveTitle:"Lista Importdada",alertImportListSaveMessage:"A lista de pesquisa foi importada.",alertImportListUpdateTitle:"Lista Salva",alertImportListUpdateMessage:"A lista de pesquisa foi salva.",pageTitle:"Listas de Pesquisa",edit:{template:{addTitle:"Adicionar Valor",editTitle:"Editar Valor",updateButtonTextAdd:"Adicionar",updateButtonTextUpdate:"Atualizar",labelTitle:"Valor"}},anesthesiaTypes:"Tipos de Anestesia",anesthesiologists:"Anestesiologista",billingCategories:"Categorias de Faturamento",clinicList:"Localização de Clínicas",countryList:"Países",diagnosisList:"Diagnósticos",cptCodeList:"Códigos CPT",expenseAccountList:"Contas de Despesas",aisleLocationList:"Localização de Corredores no Inventário",warehouseList:"Locais de Inventário",inventoryTypes:"Tipos de Inventário",imagingPricingTypes:"Tipos de Preço Imagem",labPricingTypes:"Tipos de Preço Laboratório",patientStatusList:"Lista de Situação do Paciente",physicianList:"Médicos",procedureList:"Procedimentos",procedureLocations:"Localização de Procedimentos",procedurePricingTypes:"Tipos de Preço Procedimento",radiologists:"Radiologista",unitTypes:"Tipos de Unidade",vendorList:"Fornecedor",visitLocationList:"Localização dos Visitantes",visitTypes:"Tipos de Visita",wardPricingTypes:"Tipos de Preços Enfermaria"},roles:{capability:{admin:"Administração",loadDb:"Carregar Banco de Dados",updateConfig:"Atualizar Configurações",appointments:"Compromissos",addAppointment:"Adicionar Compromissos",billing:"Faturamentos",addCharge:"Adicionar Cobrança",addPricing:"Adicionar Preço",addPricingProfile:"Adicionar Perfil de Preço",addInvoice:"Adicionar Fatura",addPayment:"Adicionar Pagamentos",deleteInvoice:"Excluir Fatura",deletePricing:"Excluir Preço",deletePricingProfile:"Excluir Perfil de Preço",editInvoice:"Editar Fatura",invoices:"Faturas",overrideInvoice:"Substituir Fatura",pricing:"Preço",patients:"Pacientes",addDiagnosis:"Adicionar Diagnóstico",addPhoto:"Adicionar Foto",addPatient:"Adicionar Paciente",addProcedure:"Adicionar Procedimento",addVisit:"Adicionar Visita",addVitals:"Adicionar Sinais Vitais",admitPatient:"Admitir Paciente",deletePhoto:"Excluir Paciente",deletePatient:"Excluir Paciente",deleteAppointment:"Excluir Compromisso",deleteDiagnosis:"Excluir Diagnóstico",deleteProcedure:"Excluir Procedimento",deleteSocialwork:"Excluir Trabalho Social",deleteVitals:"Excluir Sinais Vitais",deleteVisit:"Excluir Visita",dischargePatient:"Alta do Paciente",patientReports:"Relatório do Paciente",visits:"Visita",medication:"Medicação",addMedication:"Adicionar Medicação",deleteMedication:"Excluir Medicação",fulfillMedication:"Preencher Medicação",labs:"Laboratório",addLab:"Adicionar Laboratório",completeLab:"Laboratório Concluído",deleteLab:"Excluir Laboratório",imaging:"Imagem",addImaging:"Adicionar Imagem",completeImaging:"Imagem Concluída",deleteImaging:"Excluir Imagem",inventory:"Inventário",addInventoryRequest:"Adicionar Requisição de Inventário",addInventoryItem:"Adicionar Item de Inventário",addInventoryPurchase:"Adicionar Compra de Inventário",adjustInventoryLocation:"Ajustar Localização de Inventário",deleteInventoryItem:"Excluir Item de Inventário",fulfillInventory:"Preencher Inventário",defineUserRoles:"Perfis de Usuários"},messages:{roleSaved:"O perfil {{roleName}} foi salvo."},titles:{roleSaved:"Perfil Salvo"}},workflow:{admissionDepositLabel:"Depósito de Admissão é exigido",clinicPrepaymentLabel:"Pagamento Antecipado da Clínica é exigido",followupPrepaymentLabel:"Pagamento Antecipado do Acompanhamento é exigido",outpatientLabLabel:"Pagamento Antecipado do Laboratório Ambulatorial é exigido",outpatientImagingLabel:"Pagamento Antecipado do Ambulatorio de Imagem é exigido",outpatientMedicationLabel:"Pagamento Antecipado do Ambulatorio de Medicação é exigido",titles:{optionsSaved:"Opções Salvas"},messages:{optionsSaved:"As opções de WorkFlow foram salvas"},newTitle:"Opções de Workflow",editTitle:"Opções de Workflow",workflowLabel:"Workflow"}},labels:{cptcode:"Código CPT*",loading:"Carregando",name:"Nome",note:"Note",patient:"Paciente",prescriber:"Médico Responsável pela Prescrição",quantity:"Quantidade",requestedOn:"Solicitado em",date:"Data",dateOfBirth:"Data de Nascimento",dateOfBirthShort:"DtNasc",dateRequested:"Data da Requisição",dateCompleted:"Data da Conclusão",description:"Descrição",requestedBy:"Requisitado por",fulfill:"Preencha",fulfillRequest:"Preencha a Requisição",fulfillRequestNow:"Preencha a Requisição Agora",actions:"Ações",action:"Ação",notes:"Notas",edit:"Editar",imageOrders:"Pedido de Imagem",labOrders:"Pedidos de Laboratório",imagingType:"Tipo de Imagem",result:"Resultado",results:"Resultados",visit:"Visita",requests:"Requisições",completed:"Completo",id:"Id",on:"ligado",type:"Tipo",sex:"Sexo",age:"Idade",search:"Pesquisa",username:"Usuário",email:"Email",role:"Papel",delete:"Excluir",userCanAddNewValue:"O usuário pode adicionar novos valores",value:"Valor",lookupType:"Tipo de Pesquisa",importFile:"Importar Arquivo",fileLoadSuccessful:"Arquivo Carregado com Sucesso",fileToLoad:"Carregar Arquivo",startTime:"Hora Início",startDate:"Data de Início",endTime:"Hora de Término",endDate:"Data de Término",docRead:"Documentos Lidos",docWritten:"Documentos Escritos",displayName:"Nome de Exibição",password:"Senha",editUser:"Editar Usuário",newUser:"Novo Usuário",deleteUser:"Excluir Usuário",medication:"Medicação",status:"Situação",addNewOutpatientVisit:"--Adicionar Nova Visita Ambulatorial--",prescription:"Prescrição",prescriptionDate:"Data da Prescrição",billTo:"Conta Para",pullFrom:"Puxar De",fulfilled:"Preenchido",deleteRequest:"Excluir Requisição",location:"Localização",provider:"Fornecedor", +with:"Com",allDay:"Todo Dia",physician:"Médico",assisting:"Ajudante",anesthesia:"Anestesia",procedures:"Procedimentos",number:"Número",billDate:"Data da Conta",balanceDue:"Saldo Devedor",amount:"Quantidade",datePaid:"Data de Pagamento",creditTo:"Crédito Para",invoiceId:"ID da Fatura",lineItems:"Itens de Linha",discount:"Desconto",excess:"Excesso",price:"Preço",total:"Total",expenseTo:"Despesa Para",grandTotal:"Total Geral",remarks:"Observações",payments:"Pagamentos",category:"Categoria",department:"Departamento",address:"Endereço",country:"País"},messages:{noItemsFound:"Nenhum item encontrado",noHistoryAvailable:"Histórico não disponível.",createNewRecord:"Criar uma nova gravação?",createNewUser:"Criar um novo usuário?",noUsersFound:"Nenhum usuário encontrado.",areYouSureDelete:"Você tem certeza que deseja excluir o usuário {{user}}?",userHasBeenSaved:"O usuário foi salvo.",userSaved:"Usuário Salvo",onBehalfOf:"em nome de",newPatientHasToBeCreated:"Um novo paciente precisa ser criado... Por favor aguarde...",noNotesAvailable:"Nenhuma nota clinica adicional está diponível para essa visita.",sorry:"Desculpe, algo deu errado...",forAuthorizedPersons:"Este relatório é somente para pessoas autorizadas."},alerts:{pleaseWait:"Por Favor Aguarde"},headings:{chargedItems:"Itens Carregados"},buttons:{addItem:"Adicionar Item",complete:"Completo",cancel:"Cancelar",close:"Fechar",returnButton:"Retornar",barcode:"Código de Barras",add:"Adicionar",update:"Atualizar",ok:"Ok",fulfill:"Preencher",remove:"Remover",delete:"Excluir",newUser:"Novo Usuário",addValue:"Adicionar Valor",newNote:"Nova Nota",import:"Importar",loadFile:"Carregar Arquivo",newRequest:"Nova Requisição",allRequests:"Todas as Requisições",dispense:"Dispensar",newItem:"+ novo item",newRequestPlus:"+ nova requisição",addVisit:"Adicionar Visita",search:"Pesquisa",edit:"Editar",addLineItem:"Adicionar Item de Linha"},login:{messages:{signIn:"inscreva-se",error:"Nome de usuário ou senha está incorreta."},labels:{password:"Senha",username:"Usuário",signIn:"Entrar"}},loading:{progressBar:{progress:"{{progressBarValue}}% concluído"},messages:{0:"A velocidade de vôo borboleta superior é de 12 milhas por hora. Alguns meses pode voar 25 milhas por hora!",1:"As corujas são os únicos pássaros que podem ver a cor azul.",2:"Os gatos têm mais de 100 sons vocais; cachorros têm apenas 10.",3:"Os Humanos usam um total de 72 músculos diferentes na fala.",4:"Mais de 1.000 idiomas diferentes são falados no continente africano",5:"Uma eritrofobo é alguém que fica vermelho facilmente.",6:"A fobia mais comum do mundo é a Odinofobia que é o medo da dor.",7:"Seu corpo utiliza 300 músculo para manter o equilíbrio quando você está parado.",8:"Alguns sapos podem ser congelados e depois de serem descongelados continuarem a viver.",9:"Nossos olhos estão sempre do mesmo tamanho de quando nascemos, mas nossas orelhas e nariz nunca param de crescer.",10:"Sua língua é o único músculo em seu corpo qu está ligado apenas em uma extremidade.",11:"Camelos tem três pálpebras para se protegerem das tempestades de areia."}},inventory:{edit:{cost:"Preço por Unidade:",delivered:"Entregue a:",location:"Localização Ajustada:",prescription:"Prescrição para:",pulled:"Retirado de:",quantity:"Quantidade na Conclusão:",reason:"Motivo:",returned:"Devolvido do Paciente:",transferredFrom:"Transferido de:",transferredTo:"Transferido para:"},labels:{action:"Ação",add:"Adicionar",adjust:"Ajustar",adjustmentDate:"Data de Ajuste",adjustmentFor:"Ajuste Para",adjustmentType:"Tipo de Ajuste",aisle:"Corredor",aisleLocation:"Localização do Corredor",allInventory:"Todo Inventário",billTo:"Conta Para",consumePurchases:"Compras para Consumo",consumptionRate:"Taxa de Consumo",cost:"Preço",costPerUnit:"Preço por Unidade",crossReference:"Referência Cruzada",currentQuantity:"Quantidade Atual",dateCompleted:"Data de Conclusao",dateEffective:"Data Efetiva",dateEnd:"Data de Término",dateStart:"Data de Início",dateReceived:"Data Recebida",dateTransferred:"Data Transferida",daysLeft:"Dias Restantes",deliveryAisle:"Corredor de Entrega",deliveryLocation:"Local de Entrega",distributionUnit:"Centro de Distribuição",deleteItem:"Deletar Item",details:"Detalhes",editItem:"Editar Item",expense:"Despesa para",expirationDate:"Data de Expiração",fulfillRequest:"Preencher Requisição",fulfillRequestNow:"Preencher Requisição Agora",gift:"Doação em Espécie",giftUsage:"Uso de Doação em Espécie",giftInKindNo:"N",giftInKindYes:"S",inventoryConsumed:"Inventário Consumido",inventoryItem:"Item de Inventário",inventoryObsolence:"Obsolescência de Inventário",invoiceItems:"Itens da Fatura",invoiceLineItem:"Item de Linha da Fatura",invoiceNumber:"Número da Fatura",item:"Item",items:"Itens",itemNumber:"Número de Item",location:"Localização",locations:"Localizações",name:"Nome",markAsConsumed:"Marcar como Consumido",newItem:"Novo Item",allItems:"Todos os Itens",originalQuantity:"Quantidade Original",print:"Imprimir",printBarcode:"Imprimir Código Barras",printer:"Impressora",pullFrom:"Retirar de",purchases:"Compras",purchaseCost:"Custo da Compra",purchaseInfo:"Informações da Compra",quantity:"Quantity ({{unit}})",quantityAvailable:"Quantity Available",quantityOnHand:"Quantidade on Hand",quantityRequested:"Quantidade Solicitada",rank:"Classificação",reason:"Motivo",remove:"Remover",reorderPoint:"Ponto de Reabastecimento",requestedItems:"Itens Solicitados",salePricePerUnit:"Preço de Venda por Unidade",save:"Salvar",serialNumber:"Lote/Número de Série",total:"Total",totalCost:"Preço Total",totalReceived:"Total Recebido: {{total}}",transaction:"Transação",transactions:"Transações",transfer:"Transferir",transferFrom:"Transferir de",transferTo:"Transferir para Localização",transferToAisle:"Transferir para Localização de Corredor",unit:"Unidade",unitCost:"Preço Unitário",vendor:"Fornecedor",vendorItemNumber:"Número de Item do Fornecedor",xref:"RefX"},messages:{adjust:"Por favor ajustar as quantidades no(s) local(is) apropriado(s) da conta para a diferença de {{difference}}.",createRequest:"Criar uma nova requisição?",delete:"Você tem certeza que deseja excluir {{name}}?",itemNotFound:"O item de inventário {{item}} não pode ser encontrado.
Se você quiser criar um novo item de inventário, preencha as informações abaixo.
Caso o contrário, pressione o botão Cancelar para voltar.",loading:"Carregando transações ...",purchaseSaved:"As compras de inventário foram salvas com sucesso.",noRequests:"Nenhuma requisição encontrada.",noItems:"Nenhum item encontrado.",quantity:"A quantidade total de ({{quantity}}) não corresponde com a quantidade total nas localizações({{locationQuantity}}).",removeItem:"Você tem certeza de que deseja remover este item desta fatura?",removeItemRequest:"Você tem certeza de que deseja remover este item desta requisição?",requestFulfilled:"A requisição de invenário foi preenchida.",requestUpdated:"A requisição de invenário foi atualizada.",warning:"Por favor preencher campos obrigatório (marcado(s) com *) e corrija os erros antes de adicionar."},reports:{rows:{adjustments:"Ajustes",adjustmentsTotal:"Total dos Ajustes",balanceBegin:"Balanço Inicial",balanceEnd:"Balanço Final",category:"Categoria",consumed:"Consumidos",consumedGik:"Doações Consumidas",consumedGikTotal:"Total Doações Consumidas",consumedPuchases:"Compras Consumidas",consumedPurchasesTotal:"Total Compras Consumidas",consumedTotal:"Total Consumido",errInFinSum:"Erro em _generateFinancialSummaryReport: ",errInFindPur:"Erro em _findInventoryItemsByPurchase: ",errInFindReq:"Erro em _findInventoryItemsByRequest: ",expensesFor:"Despesas para: ",noAccount:"(Sem Conta)",subtotal:"Subtotal: ",subtotalFor:"Subtotal para {{category}} - {{account}}: ",total:"Total: ",totalFor:"Total para {{var}}: ",totalPurchases:"Total de Compras",transfer1:"{{quantity}} de {{location}}",trasnfer2:"De: {{source}} Para: {{target}}"},adjustment:"Ajuste Detalhado",daysSupply:"Dias de Abastecimento Deixado no Estoque",expenseDetail:"Despesas Detalhadas",expenseSum:"Sumário de Despesas",expiration:"Data de Expiração",export:"Exportar Relatório",fields:"Campos para Incluir",finance:"Sumário Financeiro",generate:"Gerar Relatório",invLocation:"Inventário por Localização",invValuation:"Valorização do Inventário",purchaseDetail:"Compras Detalhadas",purchaseSum:"Sumário de Compras",reportType:"Tipo de Relatório",stockTransferDetail:"Tranferências de Estoque Detalhadas",stockTransferSum:"Sumário de Tranferências de Estoque",stockUsageDetail:"Uso de Estoque Detalhado",stockUsageSum:"Sumário de Uso de Estoque"},titles:{addPurchase:"Adicionar Compra",addRequest:"Nova Requisição",adjustment:"Ajuste",editPurchase:"Editar Compra",editRequest:"Editar Requisição",inventoryItem:"Novo Item de Inventário",inventoryReport:"Relatório de Inventário",purchaseSaved:"Compras de Invenários Salvas",quickAddTitle:"Novo Item de Inventário",removeItem:"Remover Item",requestFulfilled:"Requisição Preenchida",requestUpdated:"Requisição Atualizada",transfer:"Itens de Transferência",warning:"Atenção!!!!!"}},imaging:{pageTitle:"Requisição de imagens",sectionTitle:"Imagem",buttons:{newButton:"+ nova imagem"},labels:{radiologist:"Radiologista",addNewVisit:"--Adicionar novo visitante--"},messages:{delete:"Você tem certeza que deseja excluir essa requisição de imagem?",noCompleted:"Nenhum item completo encontrado."},titles:{completedImaging:"Imagem completa",editTitle:"Requisição de edição de imagem",newTitle:"Nova requisição de imagem"},alerts:{completedTitle:"Requisição de Imagem Completa",completedMessage:"A requisição de imagem esta completa.",savedTitle:"Requisição de imagem salva",savedMessage:"A requisição de imagem foi salva."}},medication:{pageTitle:"Requisição de Medicação",sectionTitle:"Medicação",returnMedication:"Retorno de Medicação",buttons:{dispenseMedication:"dispensar medicação",newButton:"+ nova requisição",returnMedication:"retorno de medicação"},titles:{completedMedication:"Medicação Concluída",editMedicationRequest:"Editar Requisição de Medicação",newMedicationRequest:"Nova Requisição de Medicação"},messages:{createNew:"Criar uma nova requisição de medicação?",confirmDeletion:"Você tem certeza que deseja excluir essa requisição de medicação?"},labels:{refills:"Recargas",quantityRequested:"Quantidade Requisitada",quantityDispensed:"Quantidade Dispensada",quantityDistributed:"Quantidade Distribuída",quantityToReturn:"Quantidade Retornada",returnLocation:"Localização de Retorno",returnAisle:"Corredor de Retorno",returnReason:"Razão/Notas de Retorno",adjustmentDate:"Data de Ajuste",creditToAccount:"Crédito na Conta"},alerts:{returnedTitle:"Medicação Retornada",returnedMessage:"A medicação foi marcada como retornada.",savedTitle:"Requisição de Medicação foi Salva",savedMessage:"O registro de medicação foi salvo.",fulfilledTitle:"Requisição de Medicação Preenchido"}},appointments:{currentScreenTitle:"Lista de Compromisso",editTitle:"Editar Compromisso",newTitle:"Novo Compromisso",sectionTitle:"Compromissos",thisWeek:"Compromissos dessa Semana",missed:"Compromissos Esquecidos",searchTitle:"Pesquisar Compromissos",todayTitle:"Compromissos de Hoje",messages:{deleteAppointmentMessage:"Você tem certeza que deseja excluir esse compromisso?",endTimeLaterThanStart:"Por favor, selecione um horário de término mais tarde do que a hora de início."},buttons:{newButton:"+ novo compromisso"},labels:{selectedStartingDate:"Mostrar Compromisso em ou após"}},vitals:{messages:{delete:"Você tem certeza que deseja excluir esses sinais vitais?"},labels:{dateRecorded:"Data de Gravação",temperature:"Temperatura",weight:"Peso",height:"Altura",sbp:"PAS",dbp:"PAD",heartRate:"Frequência Cardíaca",respiratoryRate:"Frequência Respiratória"}},visits:{titles:{additionalDiagnoses:"Diagnósticos Adicionais"},messages:{delete:"Você tem certeza que deseja excluir essa visita?"},buttons:{newProcedure:"Novo Procedimento",newLab:"Novo Laboratório",newAppointment:"Novo Compromisso",addDiagnosis:"Adicionar Diagnóstico",newImaging:"Nova Imagem",newMedication:"Nova Medicação",newVitals:"Novos Sinais Vitais"},labels:{diagnosis:"Diagnósticos",procedure:"Procedimentos",authoredBy:"Autorizado Por",labs:"Laboratório",imaging:"Imagem",visitInformation:"Imformação de Visita",examiner:"Examinador",medication:"Medicação",status:"Situação de Visita",admittingDiagnosis:"Diagnósticos de Admisão",finalDiagnosis:"Diagnósticos de Finais/Faturamento",visitType:"Tipo de Visita",vitals:"Sinais Vitais"}},labs:{sectionTitle:"Laboratório",requestsTitle:"Requisições de Laboratório",editTitle:"Editar Requisição de Laboratório",newTitle:"Nova Requisição de Laboratório",deleteTitle:"Excluir Requisição",completedTitle:"Laboratórios Concluídos",labels:{labType:"Tipo de Laboratório",addNewVisit:"--Adicionar Nova Visita--"},messages:{noItemsFound:"Nenhum laboratório encontrado.",createNewRecord:"Criar novo registro?",confirmDeletion:"VOcê tem certeza que deseja excluir essa requisição de laboratório?",noCompleted:"Items concluídos não econtrados."},buttons:{newButton:"+ novo laboratório"},alerts:{requestCompletedTitle:"Requisições de Laboratório Concluída",requestCompletedMessage:"Requisição de laboratório foi concluída.",requestSavedTitle:"Requisição de Laboratório Salva",requestSavedMessage:"A requisição de laboratório foi salva."}},patients:{navigation:{photos:"Fotos",general:"Geral",history:"Histórico",appointments:"Compromissos",visits:"Visitas",medication:"Medicação",imaging:"Imagem",labs:"Laboratórios",socialWork:"Assitência Social"},titles:{expenses:"Despesas",additionalContacts:"Contatos Adicionais",familyInformation:"Informação Familiar",delete:"Excluir Paciente",new:"Novo Paciente",edit:"Editar Paciente",patient:"Relatório de Paciente",patientListing:"Lista de Pacientes",addPhoto:"Adicionar Foto",editPhoto:"Editar Foto",socialWork:"Despesa",familyInfo:"Informação Familiar",deleteFamilyMember:"Excluir Membro Familiar",deleteExpense:"Excluir Despesa",deletePhoto:"Excluir Foto",deleteContact:"Excluir Contato",savedPatient:"Paciente Salvo"},messages:{areYouSureDelete:"Você tem certeza que deseja excluir este(a) {{object}}?",deletePatient:"Você tem certeza que deseja excluir {{firstName}} {{lastName}}?",noPatientsFound:"Nenhum paciente encontrado.",savedPatient:"O registro de paciente para {{displayName}} foi salvo.",notFoundQuickAdd:"O paciente {{patientFullName}} não pode ser encontrato. Se você deseja cadastras um novo paciente, preencha as informações abaixo. Caso contrário clique em Cancelar para voltar.",createNewPatient:"Criar novos registro de paciente?"},buttons:{addExpense:"Adicionar Despesa",addContact:"Adicionar Contato",newLab:"Novo Laboratório",newVisit:"Nova Visita",newMedication:"Nova Medicação",newImaging:"Nova Imagem",addFamilyMember:"Adicionar Membro Familiar",newPhoto:"Nova Foto",newAppointment:"Novo Compromisso",backToPatients:"Voltar para Lista de Pacientes",newPatient:"+ novo paciente"},labels:{primaryDiagnosis:"Diagnósticos Primários",secondaryDiagnosis:"Diagnósticos Secundários",monthlyCost:"Custo Mensal",totalMontlyExpense:"Total de Despesas Mensais",patientType:"Tipo de Paciente",admissionDate:"Data de Admissão",patientDays:"Dias do Paciente",dischargeDate:"Data de Pagamento",discharge:"Pagamento",admit:"Admitir",relationships:"Relação",phone:"Telefone",email:"Email",firstName:"Primeiro Nome",middleName:"Nome do meio",lastName:"Último Nome",sex:"Sexo",dob:"DatNasc",dateOfBirth:"Data de Nascimento",placeOfBirth:"Local de Nascimento",sources:"Fontes",cost:"Custo",civilStatus:"Estado Civil",relationship:"Relação com Paciente",education:"Educação",occupation:"Ocupação",income:"Renda",insurance:"Seguro",dateProcessed:"Data de Processamento",status:"Situação do Paciente",externalPatientId:"ID de Paciente Externo",bloodType:"Tipo Sanguíneo",clinic:"Site(Filial) da Clínica",referredBy:"Indicado Por",referredDate:"Data de Indicação",religion:"Religião",parent:"Responsável Legal"},notes:{newNote:"Nova Nota para",updateNote:"Atualizando Nota de",onBehalfOfLabel:"Em Nome de",onBehalfOfCopy:"em nome de",pleaseSelectAVisit:"Por favor selecione uma visita"}},billing:{alerts:{noInvoiceFound:"Nenhuma fatura encontrada",deleteItem:"Você tem certeza que deseja excluir {{item}}?",noPricingItems:"Nenhum item de preço encontrado.",noPricingProfiles:"Nenhum perfil de preço encontrado."},buttons:{createInvoice:"Criar nova fatura?",addOverride:"Adicionar Substituir"},labels:{externalInvoiceNumber:"Fatura Externa #",paymentProfile:"Perfil de Pagamento",actualCharges:"Cobranças Atuais",insurance:"Seguro Nacional",hmoCom:"HMO/COM",paymentsDeposits:"Pagamentos/Depositos",pricingPanelOverrides:"Substituição e Perfil de Preços",pricingProfile:"Perfil de Preços",discountAmount:"Quantidade de Desconto",discountPercentage:"Porcentagem de Desconto"}},print:{invoice:{labels:{patientName:"NOME DO PACIENTE:",patientId:"PACIENTE #:",patientAge:"IDADE:",patientAddress:"ENDEREÇO:",dateAdmitted:"ADMITIDO:",dateDischarged:"PAGAMENTO:",dischargeNotes:"Notas de Pagamento:",remarks:"Observações:",billedBy:"Faturado por:",billedDate:"Data de Faturamento:",spacer:"__________________________________________"},messages:{whereConducted:"foram deduzidos durante minha internação"},titles:{patientMember:"Paciente-Membro",relContact:"Relações/Contato",patients:"DO PACIENTE",billingStatement:"DECLARAÇÃO DO FATURAMENTO"}}},procedures:{titles:{addChargeItem:"Adicionar Item de Cobrança",deleteChargeItem:"Excluir Item de Cobrança",editChargeItem:"Editar Item de Cobrança",medicationUsed:"Medicação Usada",deleteMedicationUsed:"Excluir Medicação Usada",addMedicationUsed:"Adicionar Medicação Usada",editMedicationUsed:"Editar Medicação Usada",edit:"Editar Procedimento",saved:"Procedimento Salvo",new:"Novo Procedimento"},labels:{medicationUsed:"Medicação Usada"},messages:{deleteMedication:"Você tem certeza que deseja excluir esta medicação?",delete:"Você tem certeza que deseja excluir este procedimento?",saved:"O registro de procedimento foi salvo."},buttons:{addMedication:"Adicionar Medicação"}},components:{chargesByTypeTab:{charges:"cobranças"},takePhoto:{how:"Como você quer adicionar um Foto?",takePhoto:"Tirar um Foto",uploadPhoto:"Upload de Foto",uploadFile:"Upload de Arquivo",camera:"Câmera",photo:"foto",preview:"pré visualização"},quantityConv:{unit:"Unidade",conversion:"O que significa contém 1 {{name}}?"},quantityCalc:{result:"{{targetUnit}} total: {{calculated}}"},priceList:{charges:"cobranças de {{pricingType}}"}}}}),define("hospitalrun/locales/ru/translations",["exports"],function(e){e.default={dashboard:{title:"Что вы хотите сделать?"},labels:{name:"Имя",patient:"Пациент",quantity:"Количество",requestedOn:"Запрошен",dateRequested:"Дата Запроса",dateCompleted:"Дата Выполнения",requestedBy:"Запрошен",fulfill:"Отправить",actions:"Действия",action:"Действие",notes:"Заметки",edit:"Редактировать",imagingType:"Тип визуализации",result:"Результат",results:"Результаты",visit:"Осмотр",requests:"Ожидающие",completed:"Выполненые",id:"Номер",sex:"Пол",age:"Возраст"},messages:{noItemsFound:"Ничего не найдено.",createNewRecord:"Создать новую запись?",forAuthorizedPersons:"Этот отчет предназначен только для уполномоченных лиц."},buttons:{complete:"Готово",cancel:"Отметить",returnButton:"Вернутся",add:"Добавить",update:"Обновить",ok:"Ок"},login:{messages:{signIn:"войдите в систему",error:"Неверное имя пользователя или пароль."},labels:{password:"Пароль",username:"Имя пользователя",signIn:"Войти"}},inventory:{messages:{noRequests:"Запросов не найдено.",createRequest:"Создать новый запрос?"}},imaging:{pageTitle:"Запросы на визуализацию",sectionTitle:"Визуализация",buttons:{newButton:"+ новый запрос"},labels:{radiologist:"Радиолог",addNewVisit:"--Добавить новый тип осмотра--"},messages:{noCompleted:"Не найдено выполненых запросов."},titles:{completedImaging:"Выполненые запросы",editTitle:"Редактировать запрос на визуализацию",newTitle:"Новый запрос на визуализацию"},alerts:{completedTitle:"Визуализация выполнена",completedMessage:"Запрос на визуализацию удовлетворён.",savedTitle:"Запрос сохранён",savedMessage:"Запрос на визуализацию сохранён."}}}}),define("hospitalrun/locales/tr/translations",["exports"],function(e){e.default={dashboard:{title:"Ne yapmak istersiniz?"},labels:{name:"Ad",patient:"Hasta",quantity:"Miktar",requestedOn:"Açık Talep",dateRequested:"Talep Tarihi",dateCompleted:"Bitiş tarihi",requestedBy:"Talep sahibi",fulfill:"Fulfill",actions:"İşlemler",action:"İşlem",notes:"Notlar",edit:"Düzenle",imagingType:"Görüntüleme Tipi",result:"Sonuç",results:"Sonuçlar",visit:"Ziyaret",requests:"Talepler",completed:"Tamamlandı",id:"Id",sex:"Cinsiyet",age:"Yaş"},messages:{noItemsFound:"Hiçbir öğe bulunamadı.",createNewRecord:"Yeni bir kayıt oluştur?",forAuthorizedPersons:"Bu rapor yetkili kişiler içindir."},buttons:{complete:"Bitir",cancel:"Vazgeç",returnButton:"Geri Dön",add:"Ekle",update:"Güncelle",ok:"Tamam"},login:{messages:{signIn:"GİRİŞ YAPIN",error:"Kullanıcı adı veya parola hatalı."},labels:{password:"Parola",username:"Kullanıcı Adı",signIn:"Giriş yap"}},inventory:{messages:{noRequests:"Talep bulunamadı",createRequest:"Yeni talep oluştur?"}},imaging:{pageTitle:"Görüntüleme talepleri",sectionTitle:"Görüntüleme",buttons:{newButton:"+ yeni görüntüleme"},labels:{radiologist:"Radyolog",addNewVisit:"--Yeni Ziyaret Ekle--"},messages:{noCompleted:"Tamamlanmayan öğe bulunamadı."},titles:{completedImaging:"Görüntüleme Tamamlandı",editTitle:"Görüntüleme Talebini Düzenle",newTitle:"Yeni Görüntüleme Talebi"},alerts:{completedTitle:"Görüntüleme Talebi Tamamlandı",completedMessage:"Görüntüleme talebi başarıyla tamamlandı.",savedTitle:"Görüntüleme Talebi Kaydedildi",savedMessage:"Görüntüleme Talebi başarıyla kaydedildi."}}}}),define("hospitalrun/medication/completed/controller",["exports","hospitalrun/controllers/abstract-paged-controller"],function(e,t){e.default=t.default.extend({showActions:!1,startKey:[]})}),define("hospitalrun/medication/completed/route",["exports","ember-i18n","hospitalrun/medication/index/route"],function(e,t,n){e.default=n.default.extend({modelName:"medication",pageTitle:(0,t.translationMacro)("medication.titles.completedMedication"),searchStatus:"Fulfilled"})}),define("hospitalrun/medication/completed/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"wgSAKpsG",block:'{"statements":[["partial","medication/index"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[],"hasPartials":true}',meta:{moduleName:"hospitalrun/medication/completed/template.hbs"}})}),define("hospitalrun/medication/delete/controller",["exports","ember-i18n","hospitalrun/controllers/abstract-delete-controller","hospitalrun/mixins/patient-submodule"],function(e,t,n,a){e.default=n.default.extend(a.default,{title:(0,t.translationMacro)("labels.delete_request"),actions:{delete:function(){this.deleteChildFromVisit("medication")}}})}),define("hospitalrun/medication/delete/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"TYQrMXNj",block:'{"statements":[["block",["modal-dialog"],null,[["isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-danger"],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-warning-sign"],["flush-element"],["close-element"],["text","\\n "],["append",["helper",["t"],["medication.messages.confirmDeletion"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/medication/delete/template.hbs"}})}),define("hospitalrun/medication/edit/controller",["exports","hospitalrun/controllers/abstract-edit-controller","hospitalrun/mixins/add-new-patient","ember","hospitalrun/mixins/fulfill-request","hospitalrun/mixins/inventory-locations","hospitalrun/mixins/patient-submodule","hospitalrun/mixins/user-session"],function(e,t,n,a,l,s,i,o){e.default=t.default.extend(n.default,l.default,s.default,i.default,o.default,{medicationController:a.default.inject.controller("medication"),expenseAccountList:a.default.computed.alias("medicationController.expenseAccountList"),canFulfill:function(){return this.currentUserCan("fulfill_medication")}.property(),isFulfilled:function(){var e=this.get("model.status");return"Fulfilled"===e}.property("model.status"),isFulfilling:function(){var e=this.get("canFulfill"),t=this.get("model.isRequested"),n=this.get("model.shouldFulfillRequest"),a=e&&(t||n);return this.get("model").set("isFulfilling",a),a}.property("canFulfill","model.isRequested","model.shouldFulfillRequest"),isFulfilledOrRequested:function(){return this.get("isFulfilled")||this.get("model.isRequested")}.property("isFulfilled","model.isRequested"),prescriptionClass:function(){var e=this.get("model.quantity");if(a.default.isEmpty(e))return"required"}.property("model.quantity"),quantityClass:function(){var e=this.get("model.prescription"),t="col-xs-3",n=this.get("isFulfilling");return(n||a.default.isEmpty(e))&&(t+=" required"),t+" test-quantity-input"}.property("isFulfilling","model.prescription"),quantityLabel:function(){var e=this.get("i18n"),t=e.t("medication.labels.quantityRequested"),n=this.get("isFulfilled"),a=this.get("isFulfilling");return a?t=e.t("medication.labels.quantityDispensed"):n&&(t=e.t("medication.labels.quantityDistributed")),t}.property("isFulfilled"),medicationList:[],updateCapability:"add_medication",afterUpdate:function(){var e=this.get("i18n"),t=void 0,n=void 0,a=this.get("isFulfilled");a?(t=e.t("medication.alerts.fulfilledTitle"),n="The medication request has been fulfilled.",this.set("model.selectPatient",!1)):(t=e.t("medication.alerts.savedTitle"),n=e.t("medication.alerts.savedMessage")),this.saveVisitIfNeeded(t,n)},beforeUpdate:function(){var e=this.get("isFulfilling"),t=this.get("model.isNew");return t||e?new a.default.RSVP.Promise(function(n,l){var s=this.get("model");s.validate().then(function(){s.get("isValid")?t?a.default.isEmpty(s.get("patient"))?(this.addNewPatient(),l({ignore:!0,message:"creating new patient first"})):(s.set("medicationTitle",s.get("inventoryItem.name")),s.set("priceOfMedication",s.get("inventoryItem.price")),s.set("status","Requested"),s.set("requestedBy",s.getUserName()),s.set("requestedDate",new Date),this.addChildToVisit(s,"medication","Pharmacy").then(function(){this.finishBeforeUpdate(e,n)}.bind(this),l)):this.finishBeforeUpdate(e,n):(this.send("showDisabledDialog"),l("invalid model"))}.bind(this)).catch(function(){this.send("showDisabledDialog"),l("invalid model")}.bind(this))}.bind(this)):a.default.RSVP.resolve()},finishBeforeUpdate:function(e,t){if(e){var n=this.get("model.inventoryLocations"),a=this.get("store").createRecord("inv-request",{expenseAccount:this.get("model.expenseAccount"),dateCompleted:new Date,inventoryItem:this.get("model.inventoryItem"),inventoryLocations:n,quantity:this.get("model.quantity"),transactionType:"Fulfillment",patient:this.get("model.patient"),markAsConsumed:!0});this.performFulfillRequest(a,!1,!1,!0).then(function(){this.set("model.status","Fulfilled"),t()}.bind(this))}else t()},showUpdateButton:function(){var e=this.get("isFulfilled");return!e&&this._super()}.property("updateCapability","isFulfilled"),updateButtonText:function(){var e=this.get("i18n");return this.get("model.hideFulfillRequest")?e.t("buttons.dispense"):this.get("isFulfilling")?e.t("labels.fulfill"):this._super()}.property("model.isNew","isFulfilling","model.hideFulfillRequest")})}),define("hospitalrun/medication/edit/route",["exports","ember-i18n","hospitalrun/routes/abstract-edit-route","ember","hospitalrun/mixins/fulfill-request","hospitalrun/mixins/inventory-locations","moment","hospitalrun/mixins/patient-list-route","npm:uuid"],function(e,t,n,a,l,s,i,o,r){e.default=n.default.extend(l.default,s.default,o.default,{editTitle:(0,t.translationMacro)("medication.titles.editMedicationRequest"),modelName:"medication",newTitle:(0,t.translationMacro)("medication.titles.newMedicationRequest"),database:a.default.inject.service(),getNewData:function(e){var t=this.get("idParam"),n={selectPatient:!0,prescriptionDate:(0,i.default)().startOf("day").toDate()};return"dispense"===e[t]&&(n.shouldFulfillRequest=!0,n.hideFulfillRequest=!0),n.id=r.default.v4(),a.default.RSVP.resolve(n)},model:function(e){var t=this.get("idParam");return!a.default.isEmpty(t)&&"new"===e[t]||"dispense"===e[t]?this._createNewRecord(e):this._super(e)},setupController:function(e,t){this._super(e,t);var n={key:"Medication",include_docs:!0},l=t.get("inventoryItem.id"),s=t.get("patient");a.default.isEmpty(l)&&this.get("database").queryMainDB(n,"inventory_by_type").then(function(t){var n=t.rows.map(function(e){return e.doc});e.set("medicationList",n)}),a.default.isEmpty(s)&&this._fetchPatientList(e)}})}),define("hospitalrun/medication/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"Xm0JjdeG",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],15]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection"],["expenseAccount",["helper",["t"],["labels.billTo"],null],["get",["expenseAccountList"]],["get",["model","expenseAccount"]]]]],false],["text","\\n "],["append",["helper",["inventory-location-picker"],null,[["label","quantityRequested","locationList","selectedLocations","class"],[["helper",["t"],["labels.pullFrom"],null],["get",["model","quantity"]],["get",["model","inventoryItem","availableLocations"]],["get",["model","inventoryLocations"]],"inventory-location"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["labels.fulfillRequest"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-checkbox"],null,[["label","property"],[["helper",["t"],["labels.fulfillRequestNow"],null],"shouldFulfillRequest"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canFulfill"]]],null,1]],"locals":[]},{"statements":[["block",["if"],[["get",["model","isNew"]]],null,2]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-text"],null,[["property","label","rows","class"],["prescription",["helper",["t"],["labels.prescription"],null],"3",["get",["prescriptionClass"]]]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["prescriptionDate",["helper",["t"],["labels.prescriptionDate"],null],"col-sm-4"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["number-input"],null,[["property","label","class"],["quantity",["get",["quantityLabel"]],["get",["quantityClass"]]]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["refills",["helper",["t"],["medication.labels.refills"],null],"col-xs-3"]]],false],["text","\\n "],["close-element"],["text","\\n"],["block",["unless"],[["get",["model","hideFulfillRequest"]]],null,3],["block",["if"],[["get",["isFulfilling"]]],null,0]],"locals":[]},{"statements":[["text"," "],["append",["helper",["date-format"],[["get",["model","prescriptionDate"]]],null],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["static-text"],null,[["label","value"],[["helper",["t"],["labels.prescription"],null],["get",["model","prescription"]]]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n"],["block",["static-text"],null,[["label","class"],[["helper",["t"],["labels.prescriptionDate"],null],"col-xs-4"]],5],["text"," "],["append",["helper",["static-text"],null,[["label","class","value"],[["get",["quantityLabel"]],"col-xs-3",["get",["model","quantity"]]]]],false],["text","\\n "],["append",["helper",["static-text"],null,[["label","class","value"],[["helper",["t"],["medication.labels.refills"],null],"col-xs-3",["get",["model","refills"]]]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["labels.prescriber"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","requestedBy"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["inventory-typeahead"],null,[["property","label","content","selection","class"],["inventoryItemTypeAhead",["helper",["t"],["labels.medication"],null],["get",["medicationList"]],["get",["selectedInventoryItem"]],"required test-medication-input"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["labels.medication"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","medicationName"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","form-group col-xs-3"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["labels.visit"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","visit","visitDescription"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-select"],null,[["class","label","property","content","optionValuePath","optionLabelPath","prompt","selected"],["col-xs-4 required test-add-visit",["helper",["t"],["labels.visit"],null],"visit",["get",["patientVisitsForSelect"]],"selectObject","selectObject.visitDescription",["helper",["t"],["labels.addNewOutpatientVisit"],null],["get",["model","visit"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-typeahead"],null,[["property","label","content","selection","class"],["patientTypeAhead",["helper",["t"],["labels.patient"],null],["get",["patientList"]],["get",["selectedPatient"]],"col-xs-6 required test-patient-input"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-summary"],null,[["patient","returnTo","returnToContext","disablePatientLink"],[["get",["model","patient"]],"medication.edit",["get",["model","id"]],["get",["model","isNew"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["unless"],[["get",["model","selectPatient"]]],null,13],["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n"],["block",["if"],[["get",["model","selectPatient"]]],null,12],["block",["if"],[["get",["model","isNew"]]],null,11,10],["text"," "],["close-element"],["text","\\n"],["block",["if"],[["get",["isFulfilledOrRequested"]]],null,9,8],["block",["if"],[["get",["isFulfilledOrRequested"]]],null,7],["block",["if"],[["get",["isFulfilled"]]],null,6,4]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],14]],"locals":[]}],"hasPartials":false}', +meta:{moduleName:"hospitalrun/medication/edit/template.hbs"}})}),define("hospitalrun/medication/index/controller",["exports","hospitalrun/controllers/abstract-paged-controller","hospitalrun/mixins/user-session"],function(e,t,n){e.default=t.default.extend(n.default,{startKey:[],canAdd:function(){return this.currentUserCan("add_medication")}.property(),showActions:function(){return this.currentUserCan("fulfill_medication")}.property()})}),define("hospitalrun/medication/index/route",["exports","ember-i18n","hospitalrun/routes/abstract-index-route"],function(e,t,n){e.default=n.default.extend({modelName:"medication",pageTitle:(0,t.translationMacro)("medication.pageTitle"),searchStatus:"Requested",_getStartKeyFromItem:function(e){var t=e.get("prescriptionDateAsTime"),n=this._getPouchIdFromItem(e),a=e.get("requestedDateAsTime"),l=this.get("searchStatus");return[l,a,t,n]},_modelQueryParams:function(){var e=this._getMaxPouchId(),t=this.get("maxValue"),n=this._getMinPouchId(),a=this.get("searchStatus");return{options:{startkey:[a,null,null,n],endkey:[a,t,t,e]},mapReduce:"medication_by_status"}}})}),define("hospitalrun/medication/index/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"xGEaoO6P",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],6]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["open-element","a",[]],["static-attr","href","#"],["modifier",["action"],[["get",[null]],"newItem"]],["flush-element"],["append",["helper",["t"],["medication.messages.createNew"],null],false],["close-element"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["messages.noItemsFound"],null],false],["text"," "],["block",["if"],[["get",["canAdd"]]],null,0],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"editItem",["get",["medicationRequest"]]],[["bubbles"],[false]]],["flush-element"],["append",["helper",["t"],["labels.fulfill"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["static-attr","class","clickable"],["modifier",["action"],[["get",[null]],"editItem",["get",["medicationRequest"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["medicationRequest","prescriptionDate"]]],[["format"],["l h:mm A"]]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medicationRequest","patient","displayName"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medicationRequest","requestedBy"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medicationRequest","medicationName"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medicationRequest","quantity"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medicationRequest","status"]],false],["close-element"],["text","\\n"],["block",["if"],[["get",["showActions"]]],null,2],["text"," "],["close-element"],["text","\\n"]],"locals":["medicationRequest"]},{"statements":[["text"," "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.date"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.patient"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.prescriber"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.medication"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.quantity"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.status"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["showActions"]]],null,4],["text"," "],["close-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,3],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model"]]],null,5,1]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/medication/index/template.hbs"}})}),define("hospitalrun/medication/return/controller",["exports","ember-i18n","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/mixins/fulfill-request","hospitalrun/mixins/inventory-locations","hospitalrun/mixins/patient-submodule","hospitalrun/utils/select-values"],function(e,t,n,a,l,s,i,o){e.default=n.default.extend(l.default,s.default,i.default,{medicationController:a.default.inject.controller("medication"),medicationList:[],lookupListsToUpdate:[{name:"aisleLocationList",property:"model.aisleLocation",id:"aisle_location_list"},{name:"expenseAccountList",property:"model.expenseAccount",id:"expense_account_list"},{name:"warehouseList",property:"model.location",id:"warehouse_list"}],patientMedicationList:[],setNewMedicationList:!1,aisleLocationList:a.default.computed.alias("medicationController.aisleLocationList"),expenseAccountList:a.default.computed.alias("medicationController.expenseAccountList"),warehouseList:a.default.computed.alias("medicationController.warehouseList"),updateCapability:"add_medication",medicationChanged:function(){var e=this.get("model.medication");if(a.default.isEmpty(e))this.set("model.inventoryItem");else{var t=e.get("inventoryItem");this.set("model.inventoryItemTypeAhead",t.get("name")+" - "+t.get("friendlyId")),this.set("model.inventoryItem",t)}a.default.run.later(function(){this.get("model").validate().catch(a.default.K)}.bind(this))}.observes("model.medication"),patientVisitsChanged:function(){var e=this.get("patientVisits");a.default.isEmpty(e)||this.set("model.visit",e.get("firstObject"))}.observes("patientVisits"),showPatientMedicationList:function(){var e=this.get("patientMedicationList");return this.get("patientMedication"),!a.default.isEmpty(e)}.property("patientMedicationList","model.patient","model.visit"),patientMedication:function(){var e=this.get("setNewMedicationList"),t=this.get("model.visit");return e?this.set("setNewMedicationList",!1):a.default.isEmpty(t)||t.get("medication").then(function(e){e=e.filterBy("status","Fulfilled"),this.set("model.medication",e.get("firstObject")),this.set("patientMedicationList",e.map(o.default.selectObjectMap)),this.set("setNewMedicationList",!0)}.bind(this)),this.get("patientMedicationList")}.property("setNewMedicationList","model.patient","model.visit"),_finishUpdate:function(){var e=this.get("model.deliveryAisle"),t=this.get("model.deliveryLocation"),n=this.get("model.inventoryItem");this._findOrCreateLocation(n,t,e).then(function(e){this.set("model.adjustPurchases",!0),this.set("model.inventoryLocations",[e]),this.set("model.markAsConsumed",!0),this.get("model.inventoryItem").then(function(){this.send("fulfillRequest",this.get("model"),!1,!0,!0)}.bind(this))}.bind(this))},actions:{doneFulfillRequest:function(){var e=this.get("i18n");this.updateLookupLists(),this.displayAlert(e.t("medication.alerts.returnedTitle"),e.t("medication.alerts.returnedMessage"),"allItems")},update:function(){var e=this.get("model.medication"),t=this.get("model.quantity");a.default.isEmpty(e)?this._finishUpdate():e.reload().then(function(){e.decrementProperty("quantity",t),e.get("quantity")<0&&e.set("quantity",0),e.save().then(this._finishUpdate.bind(this))}.bind(this))}},updateButtonText:(0,t.translationMacro)("medication.returnMedication")})}),define("hospitalrun/medication/return/route",["exports","ember-i18n","hospitalrun/medication/edit/route","ember"],function(e,t,n,a){e.default=n.default.extend({editTitle:(0,t.translationMacro)("medication.returnMedication"),modelName:"inv-request",newTitle:(0,t.translationMacro)("medication.returnMedication"),getNewData:function(){return a.default.RSVP.resolve({dateCompleted:new Date,selectPatient:!0,transactionType:"Return"})}})}),define("hospitalrun/medication/return/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"YZt6viXc",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],3]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["inventory-typeahead"],null,[["property","label","content","selection","class","showQuantity"],["inventoryItemTypeAhead",["helper",["t"],["labels.medication"],null],["get",["medicationList"]],["get",["selectedInventoryItem"]],"required test-medication-input",false]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-select"],null,[["class","label","property","content","optionValuePath","optionLabelPath","selected"],["required",["helper",["t"],["labels.medication"],null],"medication",["get",["patientMedication"]],"selectObject","selectObject.inventoryItem.name",["get",["model","medication"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["showPatientMedicationList"]]],null,1,0],["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["patient-typeahead"],null,[["property","label","content","selection","class"],["patientTypeAhead",["helper",["t"],["labels.patient"],null],["get",["patientList"]],["get",["selectedPatient"]],"col-xs-6"]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["class","label","property","content","optionValuePath","optionLabelPath","selected"],["col-xs-6",["helper",["t"],["labels.visit"],null],"visit",["get",["patientVisitsForSelect"]],"selectObject","selectObject.visitDescription",["get",["model","visit"]]]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["number-input"],null,[["property","label","class"],["quantity",["helper",["t"],["medication.labels.quantityToReturn"],null],"col-xs-3 required test-medication-quantity"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","className"],["deliveryLocation",["helper",["t"],["medication.labels.returnLocation"],null],["get",["warehouseList"]],["get",["model","location"]],"col-xs-4"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","className"],["deliveryAisle",["helper",["t"],["medication.labels.returnAisle"],null],["get",["aisleLocationList"]],["get",["model","aisleLocation"]],"col-xs-4"]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-text"],null,[["property","label","rows"],["reason",["helper",["t"],["medication.labels.returnReason"],null],"3"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["dateCompleted",["helper",["t"],["medication.labels.adjustmentDate"],null],"col-sm-4"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","className"],["expenseAccount",["helper",["t"],["medication.labels.creditToAccount"],null],["get",["expenseAccountList"]],["get",["model","expenseAccount"]],"col-sm-8"]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],2]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/medication/return/template.hbs"}})}),define("hospitalrun/medication/route",["exports","ember-i18n","hospitalrun/routes/abstract-module-route","ember"],function(e,t,n,a){e.default=n.default.extend({addCapability:"add_medication",moduleName:"medication",newButtonText:(0,t.translationMacro)("medication.buttons.newButton"),sectionTitle:(0,t.translationMacro)("medication.sectionTitle"),additionalButtons:function(){var e=this.get("i18n"),t=[];if(this.currentUserCan("fulfill_medication")&&t.push({buttonIcon:"octicon octicon-checklist",buttonAction:"dispenseMedication",buttonText:e.t("medication.buttons.dispenseMedication"),class:"btn btn-primary"}),this.currentUserCan(this.get("addCapability"))&&t.push({buttonIcon:"octicon octicon-mail-reply",buttonAction:"returnMedication",buttonText:e.t("medication.buttons.returnMedication"),class:"btn btn-primary"}),!a.default.isEmpty(t))return t}.property(),additionalModels:[{name:"aisleLocationList",findArgs:["lookup","aisle_location_list"]},{name:"expenseAccountList",findArgs:["lookup","expense_account_list"]},{name:"sexList",findArgs:["lookup","sex"]},{name:"warehouseList",findArgs:["lookup","warehouse_list"]}],actions:{dispenseMedication:function(){this.currentUserCan("fulfill_medication")&&this.transitionTo("medication.edit","dispense")},returnMedication:function(){this.currentUserCan(this.get("addCapability"))&&this.transitionTo("medication.return","new")}}})}),define("hospitalrun/medication/search/route",["exports","hospitalrun/routes/abstract-search-route"],function(e,t){e.default=t.default.extend({moduleName:"medication",searchKeys:[{name:"prescription",type:"contains"}],searchModel:"medication"})}),define("hospitalrun/medication/search/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"T9jkbT1t",block:'{"statements":[["block",["search-listing"],null,[["newButtonText","allButtonText"],[["helper",["t"],["buttons.newRequest"],null],["helper",["t"],["buttons.allRequests"],null]]],0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["partial","medication/index"],["text","\\n"]],"locals":[]}],"hasPartials":true}',meta:{moduleName:"hospitalrun/medication/search/template.hbs"}})}),define("hospitalrun/mixins/active-link",["exports","ember-cli-active-link-wrapper/mixins/active-link"],function(e,t){e.default=t.default}),define("hospitalrun/mixins/add-new-patient",["exports","ember","hospitalrun/mixins/patient-id"],function(e,t,n){e.default=t.default.Mixin.create(n.default,{customForms:t.default.inject.service(),addedNewPatient:!1,newPatientId:null,actions:{addedNewPatient:function(e){this.send("closeModal"),this.set("addedNewPatient",!0),this.set("model.patient",e),this.set("newPatientId"),this.send("update")}},addNewPatient:function(){var e=this,n=this.get("i18n");this.displayAlert(n.t("alerts.pleaseWait"),n.t("messages.newPatientHasToBeCreated")),this._getNewPatientId().then(function(n){var a=e.get("model.patientTypeAhead"),l=a.split(" "),s={customForms:t.default.Object.create(),friendlyId:n,patientFullName:a,requestingController:e},i=e.get("customForms");return i.setDefaultCustomForms(["patient","socialwork"],s).then(function(){var t=void 0;l.length>=3?(s.firstName=l[0],s.middleName=l[1],s.lastName=l.splice(2,l.length).join(" ")):2===l.length?(s.firstName=l[0],s.lastName=l[1]):s.firstName=a,t=e.store.createRecord("patient",s),e.send("openModal","patients.quick-add",t)})})},_getNewPatientId:function(){var e=this.get("newPatientId");return t.default.isEmpty(e)?new t.default.RSVP.Promise(function(e,t){this.generateFriendlyId().then(function(t){this.set("newPatientId",t),e(t)}.bind(this),t)}.bind(this)):t.default.RSVP.resolve(e)}})}),define("hospitalrun/mixins/appointment-statuses",["exports","ember","hospitalrun/utils/select-values"],function(e,t,n){e.default=t.default.Mixin.create({appointmentStatusList:["Attended","Scheduled","Canceled","Missed"],appointmentStatuses:t.default.computed.map("appointmentStatusList",n.default.selectValuesMap),appointmentStatusesWithEmpty:function(){return n.default.selectValues(this.get("appointmentStatusList"),!0)}.property()})}),define("hospitalrun/mixins/billing-categories",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({defaultBillingCategories:["Hospital Charges"]})}),define("hospitalrun/mixins/blood-types",["exports","ember","hospitalrun/utils/select-values"],function(e,t,n){e.default=t.default.Mixin.create({bloodTypes:["A+","A-","AB-","AB+","B+","B-","O+","O-"].map(n.default.selectValuesMap)})}),define("hospitalrun/mixins/can-edit-requested",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({canEdit:function(){var e=this.get("status");return"Requested"===e}.property("status")})}),define("hospitalrun/mixins/charge-actions",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({chargePricingCategory:null,pricingList:null,pricingTypeForObjectType:null,pricingTypes:null,_createNewChargeRecord:function(e,n){return new t.default.RSVP.Promise(function(t,a){this.store.find("pricing",n).then(function(n){var l=this.store.createRecord("proc-charge",{dateCharged:new Date,quantity:e,pricingItem:n});l.save().then(function(e){var n=this.get("model.charges");n.addObject(e),t()}.bind(this),a)}.bind(this),a)}.bind(this),"_createNewChargeRecord with pricingId:"+n)},actions:{addCharge:function(e){var t=this.get("model.charges");t.addObject(e),this.send("update",!0),this.send("closeModal")},deleteCharge:function(e){var t=e.get("chargeToDelete"),n=this.get("model.charges");n.removeObject(t),t.destroyRecord(),this.send("update",!0),this.send("closeModal")},showAddCharge:function(){var e=this.get("store").createRecord("proc-charge",{dateCharged:new Date,quantity:1,pricingCategory:this.get("chargePricingCategory")});this.send("openModal",this.get("chargeRoute"),e)},showEditCharge:function(e){e.set("itemName",e.get("pricingItem.name")),e.set("pricingCategory",this.get("chargePricingCategory")),this.send("openModal",this.get("chargeRoute"),e)},showDeleteCharge:function(e){this.send("openModal","dialog",t.default.Object.create({confirmAction:"deleteCharge",title:"Delete Charge Item",message:"Are you sure you want to delete this charged item?",chargeToDelete:e,updateButtonAction:"confirm",updateButtonText:this.get("i18n").t("buttons.ok")}))},setChargeQuantity:function(e,t){var n=this.get("model");n.set(e,t)}},canAddCharge:function(){return this.currentUserCan("add_charge")}.property(),chargesPricingList:function(){var e=this.get("pricingList"),t=this.get("pricingTypeForObjectType");return e.filter(function(e){return e.type!==t})}.property("pricingList","pricingTypeForObjectType"),chargeRoute:null,findChargeForPricingItem:function(e,t){var n=t.find(function(t){var n=t.get("pricingItem.id");return e.id===n});return n},objectTypeList:function(){var e=this.get("pricingList"),n=this.get("pricingTypeForObjectType"),a=this.get("userCanAddPricingTypes"),l=t.default.Object.create({value:[],userCanAdd:a});return t.default.isEmpty(e)||l.set("value",e.filterBy("pricingType",n)),l}.property("pricingList","pricingTypeForObjectType","pricingTypeValues"),organizeByType:t.default.computed.alias("pricingTypes.organizeByType"),pricingTypeList:function(){var e=this.get("pricingList"),n=this.get("pricingTypeValues"),a=this.get("pricingTypeForObjectType");if(!t.default.isEmpty(n))return n=n.filter(function(n){var l=!1;return t.default.isEmpty(e)||(l=!t.default.isEmpty(e.findBy("pricingType",n))),l&&n!==a}),n=n.sortBy("name")}.property("pricingTypeValues","pricingTypeForObjectType","pricingList"),pricingTypeValues:t.default.computed.alias("pricingTypes.value"),createMultipleRequests:function(e,t,n,a){var l=e.get("firstObject"),s=this.get("model");s.set(t,l),this.addChildToVisit(s,n,a).then(function(l){s.save().then(function(){this._finishCreateMultipleRequests(e,t,n,a,l)}.bind(this))}.bind(this))},_finishCreateMultipleRequests:function(e,n,a,l,s){var i={},o=this.get("model"),r=void 0,d=[],c=this.get("model.patient"),u=[];o.eachAttribute(function(e){i[e]=o.get(e)}),e.forEach(function(e,t){t>0&&(r=this.store.createRecord(l.toLowerCase(),i),r.set(n,e),r.set("patient",c),r.set("visit",s),d.push(r),u.push(r.save()))}.bind(this)),t.default.RSVP.all(u).then(function(){var e=[];d.forEach(function(t){e.push(this.addChildToVisit(t,a,l))}.bind(this)),t.default.RSVP.all(e).then(function(e){this.afterUpdate(e,!0)}.bind(this))}.bind(this))},saveNewPricing:function(e,n,a){return new t.default.RSVP.Promise(function(t,l){var s=void 0,i=this.get("pricingTypeForObjectType");s=this.store.createRecord("pricing",{name:e,category:n,pricingType:i}),s.save().then(function(e){this.get("pricingList").addObject({id:e.get("id"),name:s.get("name")}),this.set(a,s),t()}.bind(this),l)}.bind(this),"saveNewPricing for: "+e)},getSelectedPricing:function(e){var n=this.get(e);return t.default.isEmpty(n)?t.default.RSVP.resolve():new t.default.RSVP.Promise(function(e,a){t.default.isArray(n)?this.store.findByIds("pricing",n).then(e,a):this.store.find("pricing",n.id).then(e,a)}.bind(this))},showAddCharge:function(){var e=this.get("canAddCharge"),t=this.get("organizeByType");return!!e&&!t}.property("canAddCharge","organizeByType"),showEditCharges:function(){var e=this.get("canAddCharge"),t=this.get("organizeByType");return!!e&&t}.property("canAddCharge","organizeByType"),showPricingTypeTabs:function(){var e=this.get("pricingTypeList");return!t.default.isEmpty(e)&&e.get("length")>1}.property("pricingTypeList"),userCanAddPricingTypes:function(){var e=this.get("pricingTypes");return!!t.default.isEmpty(e)||e.get("userCanAdd")}.property("pricingTypes"),updateCharges:function(){var e=this.get("model.charges"),n=this.get("organizeByType"),a=this.get("pricingList");return n?new t.default.RSVP.Promise(function(n,l){var s=[],i=this.get("model");a.forEach(function(n){var a=this.findChargeForPricingItem(n,i.get("charges")),l=i.get(n.id);t.default.isEmpty(l)?a&&(e.removeObject(a),s.push(a.destroyRecord())):a?a.get("quantity")!==l&&(a.set("quantity",l),s.push(a.save())):s.push(this._createNewChargeRecord(l,n.id))}.bind(this)),t.default.RSVP.all(s,"Charges updated for current record: "+this.get("model.id")).then(n,l)}.bind(this),"updateCharges for current record: "+this.get("model.id")):t.default.RSVP.resolve()}})}),define("hospitalrun/mixins/charge-route",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({database:t.default.inject.service(),actions:{deleteCharge:function(e){this.controller.send("deleteCharge",e)}},pricingList:null,afterModel:function(){return new t.default.RSVP.Promise(function(e,t){var n=this.get("database"),a=n.getMaxPouchId("pricing"),l=n.getMinPouchId("pricing"),s=this.get("pricingCategory"),i={startkey:[s,null,null,l],endkey:[s,{},{},a],include_docs:!0};n.queryMainDB(i,"pricing_by_category").then(function(t){var n=t.rows.map(function(e){return e.doc});this.set("pricingList",n),e()}.bind(this)).catch(t)}.bind(this))},setupController:function(e,t){this._super(e,t),e.set("pricingList",this.get("pricingList"))}})}),define("hospitalrun/mixins/custom-field-types",["exports","ember"],function(e,t){var n=t.default.computed;e.default=t.default.Mixin.create({fieldTypeValues:["checkbox","radio","select","text","textarea"],fieldTypes:n(function(){var e=this.get("i18n"),n=this.get("fieldTypeValues");return n.map(function(t){return{id:t,value:e.t("admin.customForms.labels."+t)}}).sort(function(e,n){return t.default.compare(e.value.toString(),n.value.toString())})})})}),define("hospitalrun/mixins/date-format",["exports","ember","moment"],function(e,t,n){e.default=t.default.Mixin.create({_dateFormat:function(e,a){if(t.default.isEmpty(a)&&(a="l"),!t.default.isEmpty(e))return(0,n.default)(e).format(a)},dateToTime:function(e){if(!t.default.isEmpty(e)&&e.getTime)return e.getTime()}})}),define("hospitalrun/mixins/diagnosis-actions",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({editDiagnosis:function(e){e.set("editController",this),this.send("openModal","diagnosis.edit",e)},actions:{deleteDiagnosis:function(e){var t=this,n=this.get("model.diagnoses");n.removeObject(e),e.set("archived",!0),e.save().then(function(){t.send("closeModal"),t.send("update",!0)})},editDiagnosis:function(e){this.editDiagnosis(e)},showAddDiagnosis:function(){var e=this.get("store").createRecord("diagnosis",{date:new Date});this.editDiagnosis(e)}}})}),define("hospitalrun/mixins/dob-days",["exports","ember","moment"],function(e,t,n){e.default=t.default.Mixin.create({convertDOBToText:function(e,t,a){var l=new Date,s=0,i=0,o=0;e&&(void 0===e.getFullYear&&(e=(0,n.default)(e,"l").toDate()),void 0!==e.getFullYear&&(s=l.getFullYear()-e.getFullYear(),(l.getMonth()0?c.t("dates.short",d):c.t("dates.shortOmitYears",d):a?s>1?c.t("dates.longOmitDaysPlural",d):1===s?c.t("dates.longOmitDays",d):c.t("dates.longOmitDaysYears",d):s>1?c.t("dates.longPlural",d):1===s?c.t("dates.long",d):c.t("dates.longOmitYears",d)}})}),define("hospitalrun/mixins/edit-panel-props",["exports","ember"],function(e,t){var n=t.default.computed,a=t.default.isEmpty,l=["actionForUpdateButton","additionalButtons","cancelButtonText","disabledAction","hideCancelButton","showUpdateButton","updateButtonAction","updateButtonIcon","updateButtonText"];e.default=t.default.Mixin.create({additionalButtons:null,cancelButtonText:null,disabledAction:null,hideCancelButton:null,showUpdateButton:null,updateButtonAction:null,updateButtonIcon:null,updateButtonText:null,actionForUpdateButton:n("disabledAction",function(){var e=this.get("disabledAction");return a(e)||e===!1?"updateButtonAction":"disabledAction"}),editPanelProps:n.apply(void 0,l.concat([function(){return this.getProperties(l)}]))})}),define("hospitalrun/mixins/filter-list",["exports","ember"],function(e,t){var n=t.default.isEmpty,a=t.default.String.isHTMLSafe;e.default=t.default.Mixin.create({filteredBy:new t.default.Map,filterList:function(e,t,l){var s=this.get("filteredBy");if(n(t)&&n(s))return e;n(t)||s.set(t,l),this.set("filteredBy",s);var i=e.filter(function(e){var t=!0;return s.forEach(function(l,s){var i=e.get(s);n(l)||(a(l)&&(l=l.toString()),a(i)&&(i=i.toString()),i!==l&&(t=!1))}),t});return i}})}),define("hospitalrun/mixins/fulfill-request",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({actions:{doneFulfillRequest:function(){},fulfillRequest:function(e,t,n,a){this.performFulfillRequest(e,t,n,a)}},performFulfillRequest:function(e,n,a,l){return new t.default.RSVP.Promise(function(s,i){var o=e.get("markAsConsumed"),r=e.get("transactionType");"Request"===r&&(r=null),e.get("inventoryItem").then(function(d){o?(e.set("adjustPurchases",!0),t.default.isEmpty(r)&&e.set("transactionType","Fulfillment"),this._performFulfillment(e,d,a).then(function(){this._finishFulfillRequest(e,d,n,a,l),s()}.bind(this),i)):(e.set("adjustPurchases",!1),t.default.isEmpty(r)&&e.set("transactionType","Transfer"),this._finishFulfillRequest(e,d,n,a,l),s())}.bind(this),i)}.bind(this))},_findQuantity:function(e,t,n,a){var l=void 0,s=[],i=n.get("quantity"),o=parseInt(e.get("quantity")),r=o,d=[],c=0;if(a){var u=t.get("lastObject");l=u.get("costPerUnit"),u.incrementProperty("currentQuantity",o),c+=l*r,d.push({id:u.get("id"),quantity:o}),s.addObject(u)}else{var p=t.any(function(e){var t=e.get("currentQuantity");return!(e.get("expired")||t<=0)&&(l=e.get("costPerUnit"),!!a||(r>t?(c+=l*t,r-=t,d.push({id:e.get("id"),quantity:parseInt(t)}),t=0):(c+=l*r,t-=r,d.push({id:e.get("id"),quantity:parseInt(r)}),r=0),e.set("currentQuantity",t),s.addObject(e),0===r))});if(!p)return"Could not find any purchases that had the required quantity: "+o}return e.set("costPerUnit",(c/o).toFixed(2)),e.set("quantityAtCompletion",i),e.set("purchasesAffected",d),e.set("purchases",s),n.updateQuantity(),!0},_finishFulfillRequest:function(e,n,a,l,s){var i=e.get("inventoryLocations"),o=[],r=e.get("markAsConsumed"),d=[],c=parseInt(e.get("quantity")),u=e.get("purchases");if(l){var p=i.get("firstObject");p.incrementProperty("quantity",c),d.push(p.save()),o.push({name:p.get("locationName"),quantity:c})}else i.reduce(function(t,a){var l=e.get("deliveryLocation"),s=e.get("deliveryAisle"),i=parseInt(a.get("quantity"));if(t>0)return r||(a.set("transferAisleLocation",s),a.set("transferLocation",l)),i>=t?(r?(a.decrementProperty("quantity",t),d.push(a.save())):(a.set("adjustmentQuantity",t),d.push(this.transferToLocation(n,a))),o.push({name:a.get("locationName"),quantity:t}),0):(r?(a.decrementProperty("quantity",i),d.push(a.save())):(a.set("adjustmentQuantity",i),d.push(this.transferToLocation(n,a))),o.push({name:a.get("locationName"),quantity:i}),t-i)}.bind(this),c);e.set("locationsAffected",o),r&&u.forEach(function(e){d.push(e.save())}),t.default.RSVP.all(d,"Preliminary saving done for inventory fulfillment").then(function(){var l=[];l.push(n.save()),e.set("status","Completed"),e.set("completedBy",e.getUserName()),l.push(e.save()),t.default.RSVP.all(l,"All saving done for inventory fulfillment").then(function(){this.send("doneFulfillRequest"),a&&this.send("closeModal"),s||this.transitionTo("inventory.index")}.bind(this))}.bind(this))},_performFulfillment:function(e,n,a){return new t.default.RSVP.Promise(function(t,l){var s=n.get("purchases"),i=n.get("quantity"),o=e.get("quantity");if(a||i>=o){var r=this._findQuantity(e,s,n,a);r===!0?t():l(r)}else l("The quantity on hand, "+i+" is less than the requested quantity of "+o+".")}.bind(this))}})}),define("hospitalrun/mixins/hospitalrun-version",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({version:"0.9.17"})}),define("hospitalrun/mixins/inventory-adjustment-types",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({adjustmentTypes:[{name:"Add",type:"Adjustment (Add)"},{name:"Remove",type:"Adjustment (Remove)"},{name:"Return To Vendor",type:"Return To Vendor"},{name:"Return",type:"Return"},{name:"Write Off",type:"Write Off"}]})}),define("hospitalrun/mixins/inventory-id",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({generateId:function(){var e=1,n=999,a=(new Date).getTime(),l=Math.floor(Math.random()*(n-e+1))+e;return t.default.RSVP.resolve(a.toString(36)+"_"+l.toString(36))}})}),define("hospitalrun/mixins/inventory-locations",["exports","ember","npm:uuid"],function(e,t,n){e.default=t.default.Mixin.create({aisleToFind:null,locationToFind:null,_addQuantityToLocation:function(e,n,a,l){return new t.default.RSVP.Promise(function(t,s){this._findOrCreateLocation(e,a,l).then(function(e){e.incrementProperty("quantity",n),e.save().then(t,s)})}.bind(this))},_findOrCreateLocation:function(e,a,l){return new t.default.RSVP.Promise(function(t,s){var i=this,o=!1,r=e.get("locations");this.set("aisleToFind",l),this.set("locationToFind",a),o=r.find(this.findLocation,this),o?t(o):!function(){var e=i.get("store").createRecord("inv-location",{id:n.default.v4(),aisleLocation:l,location:a,quantity:0});r.addObject(e),e.save().then(function(){ +t(e)},s)}()}.bind(this))},findLocation:function(e){var n=e.get("aisleLocation"),a=this.get("aisleToFind"),l=e.get("location"),s=this.get("locationToFind");if((t.default.isEmpty(n)&&t.default.isEmpty(a)||n===a)&&(t.default.isEmpty(l)&&t.default.isEmpty(s)||l===s))return!0},newPurchaseAdded:function(e,n){return new t.default.RSVP.Promise(function(t,a){var l=n.get("aisleLocation"),s=n.get("location"),i=parseInt(n.get("originalQuantity"));this._addQuantityToLocation(e,i,s,l).then(t,a)}.bind(this))},saveLocation:function(e,t){if(0===e.get("quantity")){var n=t.get("locations");return n.removeObject(e),e.destroyRecord()}return e.save()},transferToLocation:function(e,n){var a=n.get("transferAisleLocation"),l=n.get("transferLocation"),s=parseInt(n.get("adjustmentQuantity"));return new t.default.RSVP.Promise(function(t,i){this._addQuantityToLocation(e,s,l,a).then(function(){n.decrementProperty("quantity",s),n.save().then(t,i)},i)}.bind(this))}})}),define("hospitalrun/mixins/inventory-type-list",["exports","ember","hospitalrun/utils/select-values"],function(e,t,n){e.default=t.default.Mixin.create({defaultInventoryTypes:["Medication","Supply"],inventoryTypes:function(){var e=this.get("defaultInventoryTypes"),a=this.get("inventoryTypeList"),l=void 0;return l=t.default.isEmpty(a)?e:a,l=n.default.selectValues(l)}.property("inventoryTypeList","defaultInventoryTypes")})}),define("hospitalrun/mixins/is-update-disabled",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({isUpdateDisabled:function(){return!t.default.isNone(this.get("model.isValid"))&&!this.get("model.isValid")}.property("model.isValid")})}),define("hospitalrun/mixins/location-name",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({getDisplayLocationName:function(e,n){var a=this.formatLocationName(e,n);return t.default.isEmpty(a)&&(a="No Location"),a},formatLocationName:function(e,n){var a="";return t.default.isEmpty(e)||(a+=e,t.default.isEmpty(n)||(a+=" : ")),t.default.isEmpty(n)||(a+=n),a},locationName:function(){var e=this.get("aisleLocation"),t=this.get("location");return this.getDisplayLocationName(t,e)}.property("location","aisleLocation")})}),define("hospitalrun/mixins/medication-details",["exports","ember","ember-data"],function(e,t,n){e.default=t.default.Mixin.create({getMedicationName:function(e){var n=this,a=this.get("medicationTitle");if(!t.default.isEmpty(a))return a;var l=this.get(e);l.then?l.then(function(e){n.set("medicationTitle",e.get("name"))}):this.set("medicationTitle",l.get("name"))},getMedicationPrice:function(e){var n=this,a=this.get("priceOfMedication");if(!t.default.isEmpty(a))return a;var l=this.get(e);l.then?l.then(function(e){n.set("priceOfMedication",e.get("price"))}):this.set("priceOfMedication",l.get("price"))},getMedicationDetails:function(e){var n=this;return new t.default.RSVP.Promise(function(a){var l=n.get("medicationTitle"),s=n.get("priceOfMedication");if(t.default.isEmpty(l)||t.default.isEmpty(s)){var i=n.get(e);i.then?i.then(function(e){a({name:e.get("name"),price:e.get("price")})}):a({name:i.get("name"),price:i.get("price")})}else a({name:l,price:s})})},medicationTitle:n.default.attr("string"),priceOfMedication:n.default.attr("number"),rxNormIdentifier:n.default.attr("string")})}),define("hospitalrun/mixins/modal-helper",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({displayAlert:function(e,n,a,l,s){var i=this.get("i18n"),o=t.default.Object.extend({updateButtonText:i.t("buttons.ok")});this.send("openModal","dialog",o.create({cancelAction:s,hideCancelButton:!0,message:n,okAction:a,okContext:l,title:e,updateButtonAction:"ok"}))},displayConfirm:function(e,n,a,l){t.default.isEmpty(l)&&(l=t.default.Object.create()),l.set("confirmAction",a),l.set("title",e),l.set("message",n),l.set("updateButtonAction","confirm"),l.set("updateButtonText","Ok"),this.send("openModal","dialog",l)}})}),define("hospitalrun/mixins/navigation",["exports","ember"],function(e,t){var n=t.default.String.camelize;e.default=t.default.Mixin.create({navItems:[{title:"Inventory",iconClass:"octicon-package",route:"inventory",capability:"inventory",subnav:[{title:"Requests",iconClass:"octicon-chevron-right",route:"inventory.index",capability:"add_inventory_request"},{title:"Items",iconClass:"octicon-chevron-right",route:"inventory.listing",capability:"inventory"},{title:"Inventory Received",iconClass:"octicon-plus",route:"inventory.batch",subroute:"new",capability:"add_inventory_item"},{title:"Reports",iconClass:"octicon-chevron-right",route:"inventory.reports",capability:"inventory"}]},{title:"Patients",iconClass:"octicon-organization",route:"patients",capability:"patients",subnav:[{title:"Patient Listing",iconClass:"octicon-chevron-right",route:"patients",capability:"patients"},{title:"Admitted Patients",iconClass:"octicon-chevron-right",route:"patients.admitted",capability:"patients"},{title:"Outpatient",iconClass:"octicon-chevron-right",route:"patients.outpatient",capability:"patients"},{title:"New Patient",iconClass:"octicon-plus",route:"patients.edit",subroute:"new",capability:"add_patient"},{title:"Reports",iconClass:"octicon-chevron-right",route:"patients.reports",capability:"patients"}]},{title:"Appointments",iconClass:"octicon-calendar",route:"appointments.index",capability:"appointments",subnav:[{title:"This Week",iconClass:"octicon-chevron-right",route:"appointments.index",capability:"appointments"},{title:"Today",iconClass:"octicon-chevron-right",route:"appointments.today",capability:"appointments"},{title:"Missed",iconClass:"octicon-chevron-right",route:"appointments.missed",capability:"appointments"},{title:"Search",iconClass:"octicon-search",route:"appointments.search",capability:"appointments"},{title:"Calendar",iconClass:"octicon-calendar",route:"appointments.calendar",capability:"appointments"},{title:"Add Appointment",iconClass:"octicon-plus",route:"appointments.edit",subroute:"new",capability:"add_appointment"}]},{title:"Imaging",iconClass:"octicon-device-camera",route:"imaging.index",capability:"imaging",subnav:[{title:"Requests",iconClass:"octicon-chevron-right",route:"imaging.index",capability:"imaging"},{title:"Completed",iconClass:"octicon-chevron-right",route:"imaging.completed",capability:"imaging"},{title:"New Request",iconClass:"octicon-plus",route:"imaging.edit",subroute:"new",capability:"add_imaging"}]},{title:"Medication",iconClass:"octicon-file-text",route:"medication.index",capability:"medication",subnav:[{title:"Requests",iconClass:"octicon-chevron-right",route:"medication.index",capability:"medication"},{title:"Completed",iconClass:"octicon-chevron-right",route:"medication.completed",capability:"medication"},{title:"New Request",iconClass:"octicon-plus",route:"medication.edit",subroute:"new",capability:"add_medication"},{title:"Dispense",iconClass:"octicon-checklist",route:"medication.edit",subroute:"dispense",capability:"fulfill_medication"},{title:"Return Medication",iconClass:"octicon-mail-reply",route:"medication.return",subroute:"new",capability:"add_medication"}]},{title:"Labs",iconClass:"octicon-microscope",route:"labs.index",capability:"labs",subnav:[{title:"Requests",iconClass:"octicon-chevron-right",route:"labs.index",capability:"labs"},{title:"Completed",iconClass:"octicon-chevron-right",route:"labs.completed",capability:"labs"},{title:"New Request",iconClass:"octicon-plus",route:"labs.edit",subroute:"new",capability:"add_lab"}]},{title:"Billing",iconClass:"octicon-credit-card",route:"invoices.index",capability:"invoices",subnav:[{title:"Invoices",iconClass:"octicon-chevron-right",route:"invoices.index",capability:"invoices"},{title:"New Invoice",iconClass:"octicon-plus",route:"invoices.edit",subroute:"new",capability:"invoices"},{title:"Prices",iconClass:"octicon-chevron-right",route:"pricing.index",capability:"invoices"},{title:"Price Profiles",iconClass:"octicon-chevron-right",route:"pricing.profiles",capability:"invoices"}]},{title:"Administration",iconClass:"octicon-person",route:"admin.lookup",capability:"admin",subnav:[{title:"Address Fields",iconClass:"octicon-chevron-right",route:"admin.address",capability:"update_config"},{title:"Custom Forms",iconClass:"octicon-chevron-right",route:"admin.custom-forms",capability:"update_config"},{title:"Load DB",iconClass:"octicon-plus",route:"admin.loaddb",capability:"load_db"},{title:"Lookup Lists",iconClass:"octicon-chevron-right",route:"admin.lookup",capability:"update_config"},{title:"Users",iconClass:"octicon-chevron-right",route:"users",capability:"users"},{title:"New User",iconClass:"octicon-plus",route:"users.edit",subroute:"new",capability:"add_user"},{title:"User Roles",iconClass:"octicon-chevron-right",route:"admin.roles",capability:"define_user_roles"}]}],localizedNavItems:t.default.computed("navItems.[]",function(){var e=this,a="navigation.",l=function(e,t){return"string"==typeof e?t:e};return this.get("navItems").map(function(s){var i=a+n(s.title).toLowerCase(),o=e.get("i18n").t(i);return t.default.set(s,"localizedTitle",l(o,s.title)),s.subnav=s.subnav.map(function(t){var s=a+"subnav."+n(t.title),i=e.get("i18n").t(s);return t.localizedTitle=l(i,t.title),t}),s})})})}),define("hospitalrun/mixins/number-format",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({_calculateTotal:function(e,n){var a=void 0,l=0;return a=t.default.isArray(e)?e:this.get(e),l=a.reduce(function(e,a){return e+=this._getValidNumber(t.default.get(a,n))}.bind(this),0),this._numberFormat(l,!0)},_getValidNumber:function(e){return t.default.isEmpty(e)||isNaN(e)?0:Number(e)},_numberFormat:function(e,n){var a=void 0;if(!t.default.isEmpty(e)){if(isNaN(e))return;return a=Math.round(e)===e?Number(e).toString():this._round100(e).toFixed(2),n?Number(a):a.replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,")}},_validNumber:function(e){return!t.default.isEmpty(e)&&!isNaN(e)&&e>0},_round100:function(e){var t=100*e;return Math.round(t)/100}})}),define("hospitalrun/mixins/operative-plan-statuses",["exports","ember"],function(e,t){var n=t.default.computed,a="completed";e.COMPLETED_STATUS=a;var l="dropped";e.DROPPED_STATUS=l;var s="planned";e.PLANNED_STATUS=s;var i=[a,l,s];e.default=t.default.Mixin.create({planStatuses:n(function(){var e=this.get("i18n");return i.map(function(t){return{id:t,value:e.t("operativePlan.labels."+t+"Status")}}).sort(function(e,n){return t.default.compare(e.value.toString(),n.value.toString())})})})}),define("hospitalrun/mixins/pagination-props",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({paginationProps:function(){var e=["disableNextPage","disablePreviousPage","showFirstPageButton","showLastPageButton","showPagination"];return this.getProperties(e)}.property("disableNextPage","disablePreviousPage","showFirstPageButton","showLastPageButton","showPagination")})}),define("hospitalrun/mixins/paging-actions",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({firstPage:"firstPage",lastPage:"lastPage",nextPage:"nextPage",previousPage:"previousPage",actions:{firstPage:function(){this.sendAction("firstPage")},lastPage:function(){this.sendAction("lastPage")},nextPage:function(){this.sendAction("nextPage")},previousPage:function(){this.sendAction("previousPage")}}})}),define("hospitalrun/mixins/patient-appointments",["exports","ember","hospitalrun/mixins/pouchdb"],function(e,t,n){e.default=t.default.Mixin.create(n.default,{getPatientAppointments:function(e){var t=e.get("id"),n=this.get("maxValue");return this.store.query("appointment",{options:{startkey:[t,null,null,"appointment_"],endkey:[t,n,n,n]},mapReduce:"appointments_by_patient"})}})}),define("hospitalrun/mixins/patient-diagnosis",["exports","ember"],function(e,t){var n=t.default.isEmpty;e.default=t.default.Mixin.create({_addDiagnosisToList:function(e,n){t.default.isEmpty(e)||t.default.isEmpty(n.findBy("description",e))&&n.addObject(e)},getDiagnoses:function(e,t,a){var l=this,s=arguments.length<=3||void 0===arguments[3]?"diagnoses":arguments[3],i=[];if(!n(e)){var o=e.get(s);return t&&(o=o.filterBy("active",!0)),a||(a=!1),o=o.filterBy("secondaryDiagnosis",a),o.forEach(function(e){l._addDiagnosisToList(e,i)}),i}}})}),define("hospitalrun/mixins/patient-id",["exports","ember"],function(e,t){function n(e,t){return t<1e5&&(t=("00000"+t).slice(-5)),""+e+t}e.sequenceId=n;var a=t.default.inject,l=t.default.isEmpty;e.default=t.default.Mixin.create({idPrefix:null,database:a.service(),config:a.service(),generateFriendlyId:function(){var e=this,t=this.get("config"),a=this.get("database"),s=a.getMaxPouchId("patient"),i=function e(i){var o=void 0,r=void 0;return t.getPatientPrefix().then(function(e){o=i.get("value"),r=n(e,o);var t={startkey:[r,null],endkey:[r,s]};return a.queryMainDB(t,"patient_by_display_id")}).then(function(t){return l(t.rows)?i.get("hasDirtyAttributes")?i.save().then(function(){return r}):r:(i.incrementProperty("value"),e(i))})};return this.store.find("sequence","patient").then(i).catch(function(){var t=e.get("store"),n=t.push(t.normalize("sequence",{id:"patient",value:1}));return i(n)})}})}),define("hospitalrun/mixins/patient-invoices",["exports","ember","hospitalrun/mixins/pouchdb"],function(e,t,n){e.default=t.default.Mixin.create(n.default,{getPatientInvoices:function(e){var t=e.get("id");return this.store.query("invoice",{options:{key:t},mapReduce:"invoice_by_patient"})}})}),define("hospitalrun/mixins/patient-list-route",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({database:t.default.inject.service(),_fetchPatientList:function(e){var t={startkey:"patient_",endkey:"patient_￿",include_docs:!0},n=this.get("database");n.queryMainDB(t).then(function(t){if(t.rows){var n=t.rows.map(function(e){return e.doc});e.set("patientList",n)}})},actions:{returnToPatient:function(){this.controller.send("returnToPatient"),this.controller.send("closeModal")},returnToVisit:function(){this.controller.send("returnToVisit")}},setupController:function(e,t){this._super(e,t),this._fetchPatientList(e)}})}),define("hospitalrun/mixins/patient-name",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({getPatientDisplayId:function(e){var n=t.default.get(e,"externalPatientId"),a=t.default.get(e,"friendlyId"),l=t.default.get(e,"id");return t.default.isEmpty(a)?t.default.isEmpty(n)?l:n:a},getPatientDisplayName:function(e,n){var a=t.default.get(e,"firstName"),l=t.default.get(e,"lastName"),s=t.default.get(e,"middleName"),i=[];return t.default.isEmpty(a)||i.push(a),t.default.isEmpty(s)||n||i.push(s),t.default.isEmpty(l)||i.push(l),i.join(" ")}})}),define("hospitalrun/mixins/patient-notes",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({canAddNote:function(){return this.currentUserCan("add_note")&&(!t.default.isEmpty(this.get("visits"))||!t.default.isEmpty(this.get("model.visits")))},canDeleteNote:function(){return this.currentUserCan("delete_note")},_computeNoteType:function(e){switch(e.get("visitType")){case"Admission":return t.default.isEmpty(e.get("procedures"))?"Pre-op":"Post-op";case"Clinic":case"Followup":return"General";default:return e.get("visitType")}},_setNoteType:function(){var e=this.get("model");null==e.get("noteType")&&e.set("noteType",this._computeNoteType(e.get("visit")))}})}),define("hospitalrun/mixins/patient-submodule",["exports","ember-data","ember","hospitalrun/mixins/patient-visits","hospitalrun/utils/select-values"],function(e,t,n,a,l){var s=n.default.get,i=n.default.isEmpty;e.default=n.default.Mixin.create(a.default,{findPatientVisits:!0,needToUpdateVisit:!1,patientList:null,selectedPatient:null,newVisitAdded:null,actions:{showPatient:function(e){this.transitionToRoute("patients.edit",e)},returnToAllItems:function(){this._cancelUpdate(),this.send("allItems")},returnToPatient:function(){this._cancelUpdate(),this.transitionToRoute("patients.edit",this.get("model.returnToPatient"))},returnToVisit:function(){this._cancelUpdate(),this.transitionToRoute("visits.edit",this.get("model.returnToVisit"))},selectedPatientChanged:function(e){var t=this;n.default.isEmpty(e)?(this.set("model.patient",null),this.patientSelected()):this.store.find("patient",e.id).then(function(e){t.set("model.patient",e),t.patientSelected(e),n.default.run.once(t,function(){this.get("model").validate().catch(n.default.K)})})}},addChildToVisit:function(e,t,a){return new n.default.RSVP.Promise(function(l,s){var i=this.get("model.visit");n.default.isEmpty(i)?i=this.createNewVisit(a).then(function(n){this._finishAddChildToVisit(e,t,n,l,s)}.bind(this),s):this._finishAddChildToVisit(e,t,i,l,s)}.bind(this))},addDiagnosisToModelAndPatient:function(e){var t=this,n=this.get("model.diagnoses");n.addObject(e);var a=this.get("model.patient.diagnoses"),l=a.any(function(t){return t.get("active")===!0&&t.get("diagnosis")===e.get("diagnosis")&&t.get("secondaryDiagnosis")===e.get("secondaryDiagnosis")});if(l)this.send("update",!0),this.send("closeModal");else{a.addObject(e);var s=this.get("model.patient");s.save().then(function(){t.send("update",!0),t.send("closeModal")})}},_finishAddChildToVisit:function(e,t,n,a,l){n.get(t).then(function(t){t.addObject(e),this.set("needToUpdateVisit",!0),a(n)}.bind(this),l)},cancelAction:function(){var e=this.get("model.returnToPatient"),t=this.get("model.returnToVisit");return i(t)?i(e)?"returnToAllItems":"returnToPatient":"returnToVisit"}.property("model.returnToPatient","model.returnToVisit"),createNewVisit:function(e){return new n.default.RSVP.Promise(function(t,n){var a=this.get("model"),l=a.get("patient"),s=this.get("store").createRecord("visit",{startDate:new Date,endDate:new Date,outPatient:!0,patient:l,visitType:e});a.set("visit",s),s.save().then(function(){s.reload().then(function(e){this.set("newVisitAdded",e),a.set("visit",e),t(e)}.bind(this),n)}.bind(this),n).catch(function(e){console.log("Error creating new visit"),n(e)}.bind(this))}.bind(this))},deleteChildFromVisit:function(e){var t=this,n=this.get("model");n.set("archived",!0),this.removeChildFromVisit(n,e).then(function(){n.save().then(function(){n.unloadRecord(),t.send("closeModal")})})},getPatientDiagnoses:function(e,t){var n=this,a=e.get("diagnoses"),l=void 0;i(a)||(l=a.filterBy("active",!0).map(function(e){var t=e.get("diagnosis"),a=e.getProperties("active","date","diagnosis","secondaryDiagnosis");return a.diagnosis=t,n.store.createRecord("diagnosis",a)}));var o=s(t,"diagnoses");o.clear(),i(l)||o.addObjects(l)},patientId:n.default.computed.alias("model.patient.id"),patientSelected:function(){},patientVisits:function(){var e=this.get("model.patient"),a=void 0;return a=!n.default.isEmpty(e)&&this.get("findPatientVisits")?this.getPatientVisits(e):n.default.RSVP.resolve([]),t.default.PromiseArray.create({promise:a})}.property("model.patient.id","newVisitAdded"),patientVisitsForSelect:function(){return t.default.PromiseArray.create({promise:this.get("patientVisits").then(function(e){return e.map(l.default.selectObjectMap)})})}.property("patientVisits.[]"),removeChildFromVisit:function(e,t){return new n.default.RSVP.Promise(function(a,l){var s=[],i=this.get("model.visit");s.addObjects(this.resolveVisitChildren()),n.default.RSVP.all(s,"Resolved visit children before removing "+t).then(function(){i.get(t).then(function(t){t.removeObject(e),i.save().then(a,l)}.bind(this),l)}.bind(this),l)}.bind(this))},resolveVisitChildren:function(){var e=[],t=this.get("model.visit");return n.default.isEmpty(t)||(e.push(t.get("imaging")),e.push(t.get("labs")),e.push(t.get("medication")),e.push(t.get("procedures")),e.push(t.get("vitals"))),e},saveNewDiagnoses:function(){var e=this.get("model.diagnoses");if(e=e.filterBy("isNew",!0),i(e))return n.default.RSVP.resolve();var t=e.map(function(e){return e.save()});return n.default.RSVP.all(t)},saveVisitIfNeeded:function(e,t,n){this.get("needToUpdateVisit")?this.get("model.visit").save().then(function(){this.set("needToUpdateVisit",!1),this.displayAlert(e,t,n)}.bind(this)):this.displayAlert(e,t,n)},visitId:n.default.computed.alias("model.visit.id"),visitsController:n.default.computed.alias("controllers.visits")})}),define("hospitalrun/mixins/patient-visits",["exports","ember","hospitalrun/mixins/pouchdb","hospitalrun/utils/visit-statuses"],function(e,t,n,a){var l=t.default.isEmpty;e.default=t.default.Mixin.create(n.default,{getPatientVisits:function(e){var t=this.get("maxValue"),n=e.get("id");return this.store.query("visit",{options:{startkey:[n,null,null,null,"visit_"],endkey:[n,t,t,t,t]},mapReduce:"visit_by_patient",debug:!0})},checkoutVisit:function(e,t){var n=this;return e.set("status",t),e.set("endDate",new Date),e.save().then(function(l){return n.updatePatientVisitFlags(l).then(function(){var l=n.get("i18n"),s={patientName:e.get("patient.displayName")},i=void 0,o=void 0;t===a.default.CHECKED_OUT?(i=l.t("visits.messages.checkedOut",s),o=l.t("visits.titles.checkedOut")):(i=l.t("visits.messages.discharged",s),o=l.t("visits.titles.discharged")),n.displayAlert(o,i)})})},updatePatientVisitFlags:function(e){var n=e.get("patient"),l=n.get("admitted"),s=n.get("checkedIn"),i=this.get("model.status");return i!==a.default.ADMITTED||l?i!==a.default.CHECKED_IN||s?i===a.default.CHECKED_OUT&&s?this._updateUnlessVisitStatusExists(n,a.default.CHECKED_IN,"checkedIn"):i===a.default.DISCHARGED&&l?this._updateUnlessVisitStatusExists(n,a.default.ADMITTED,"admitted"):t.default.RSVP.resolve():(n.set("checkedIn",!0),n.save()):(n.set("admitted",!0),n.save())},_updateUnlessVisitStatusExists:function(e,t,n){return this.getPatientVisits(e).then(function(a){if(l(a.findBy("status",t)))return e.set(n,!1),e.save()})}})}),define("hospitalrun/mixins/payment-profiles",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({paymentProfiles:["Private","Discounted","Free"]})}),define("hospitalrun/mixins/pouch-adapter-utils",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({session:t.default.inject.service(),_pouchError:function(e){return function(n){if(401===n.status){var a=this.get("session");!t.default.isEmpty(a)&&a.get("isAuthenticated")&&a.invalidate()}var l=[n.status,(n.name||n.error)+":",n.message||n.reason].join(" ");t.default.run(null,e,l)}.bind(this)}})}),define("hospitalrun/mixins/pouchdb",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({maxValue:"￿"})}),define("hospitalrun/mixins/progress-dialog",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({progressDialog:null,progressDialogDefaults:{showProgress:!0,hideCancelButton:!0,hideUpdateButton:!0,progressBarValue:0,progressBarStyle:"width: 0%;"},progressInterval:500,progressMessage:null,progressTimer:null,progressTitle:null,scheduleProgress:function(e){return t.default.run.later(this,function(){e.apply(this),this.set("progressTimer",this.scheduleProgress(e))},this.get("progressInterval"))},updateProgressBar:function(){var e=this.get("progressDialog"),n=e.get("progressBarValue");n+=10,n>100&&(n=0),e.set("progressBarValue",n);var a=t.default.String.htmlSafe("width: "+n+"%");e.set("progressBarStyle",a)},closeProgressModal:function(){t.default.run.cancel(this.get("progressTimer")),this.send("closeModal")},showProgressModal:function(){var e=t.default.Object.create(this.get("progressDialogDefaults"));e.progressBarStyle=t.default.String.htmlSafe(e.progressBarStyle),e.set("title",this.get("progressTitle")),e.set("message",this.get("progressMessage")),this.set("progressDialog",e),this.set("progressTimer",this.scheduleProgress(this.get("updateProgressBar"))),this.send("openModal","dialog",e)}})}),define("hospitalrun/mixins/publish-statuses",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({publishStatuses:["Draft","Published","Private","Archived"]})}),define("hospitalrun/mixins/result-validation",["exports","ember","ember-i18n"],function(e,t,n){e.default=t.default.Mixin.create({validations:{result:{acceptance:{accept:!0,if:function(e){if(!e.get("hasDirtyAttributes"))return!1;var n=e.get("status"),a=e.get("result");return!("Completed"!==n||!t.default.isEmpty(a))},message:(0,n.translationMacro)("errors.result")}}}})}),define("hospitalrun/mixins/return-to",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({cancelAction:function(){var e=this.get("model.returnTo");return t.default.isEmpty(e)?"allItems":"returnTo"}.property("returnTo")})}),define("hospitalrun/mixins/setup-user-role",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({setupUserRole:function(){var e=this.get("session"),n=e.get("data.authenticated.role");return this.get("store").find("user-role",n.dasherize()).then(function(t){e.set("data.authenticated.userCaps",t.get("capabilities"));var n=e.get("store"),a=e.get("data");return n.persist(a),!0}).catch(t.default.K)}})}),define("hospitalrun/mixins/typeahead",["exports","ember-data","ember"],function(e,t,n){var a=n.default.computed,l=n.default.observer;e.default=n.default.Mixin.create({_mapContentItems:function(){var e=this,a=this.get("content");if(a){var l=a.filter(function(e){return!n.default.isEmpty(e)});return l=a instanceof t.default.RecordArray?l.map(function(t){var n=t.getProperties(e.get("displayKey"));return n[e.get("selectionKey")]=t,n}):l.map(function(t){var n={};return n[e.get("displayKey")]=t,n})}return[]},mappedContent:a("content",function(){return this._mapContentItems()}),contentChanged:l("content.[]",function(){var e=this.get("bloodhound");e&&(e.clear(),e.add(this._mapContentItems()))}),bloodhound:null,displayKey:"value",selectionKey:"value",hint:!0,highlight:!0,lastHint:null,limit:500,minlength:1,selectedItem:!1,inputElement:null,typeAhead:null,setOnBlur:!0,templates:null,selectedAction:null,_getSource:function(){var e=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace(this.get("displayKey")),queryTokenizer:Bloodhound.tokenizers.whitespace,local:this.get("mappedContent")});return e.initialize(),this.set("bloodhound",e),e.ttAdapter()},didInsertElement:function(){var e=this,t=this.$("input");this.set("inputElement",t);var a=t.typeahead({autoselect:!0,hint:this.get("hint"),highlight:this.get("highlight"),minLength:this.get("minlength")},{displayKey:this.get("displayKey"),limit:this.get("limit"),source:this._getSource(),templates:this.get("templates")});this.set("typeAhead",a),a.on("typeahead:selected",function(t,n){e.itemSelected(n[e.get("selectionKey")])}),a.on("typeahead:autocompleted",function(t,n){e.itemSelected(n[e.get("selectionKey")])}),this.get("setOnBlur")&&(t.on("keyup",function(){var t=e.$(".tt-hint"),n=t.val();e.set("lastHint",n),e.set("selectedItem",!1)}),t.on("blur",function(t){var a=e.get("selection"),l=t.target.value.trim();n.default.isEmpty(a)||(a.trim&&(a=a.trim()),e.set("selection",a)),e.get("selectedItem")||!function(){var s=e.get("lastHint"),i=!1;n.default.isEmpty(s)&&(s=l,i=!0),n.default.isEmpty(l)||n.default.isEmpty(s)?n.default.isEmpty(l)&&e.itemSelected():e.get("bloodhound").search(s,function(n){n.length>0?i&&s.toLowerCase()!==n[0][e.get("displayKey")].toLowerCase()||(e.itemSelected(n[0][e.get("selectionKey")]),t.target.value=n[0][e.get("displayKey")],e.get("model").set(e.get("propertyName"),t.target.value)):l!==a&&e.itemSelected()})}()}))},itemSelected:function(e){this.set("selection",e),this.set("selectedItem",!0);var t=this.get("selectedAction");n.default.isEmpty(t)||this.sendAction("selectedAction",e)},willDestroyElement:function(){this.get("inputElement").typeahead("destroy")}})}),define("hospitalrun/mixins/unit-types",["exports","ember","hospitalrun/utils/select-values"],function(e,t,n){e.default=t.default.Mixin.create({defaultUnitList:["ampoule","bag","bottle","box","bundle","capsule","case","container","cream","each","gel","nebule","ointment","pack","pair","pallet","patch","pcs","pill","plastic","polyamp","roll","spray","suppository","suspension","set","syrup","tablet","tray","tube","vial"],unitList:function(){var e=this.get("defaultUnitList"),n=this.get("inventoryUnitList");return t.default.isEmpty(n)?e:n}.property("inventoryUnitList","defaultUnitList"),unitListForSelect:t.default.computed.map("unitList",n.default.selectValuesMap)})}),define("hospitalrun/mixins/user-roles",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({userRoles:[{name:"Data Entry",roles:["Data Entry","user"]},{name:"Doctor",roles:["Doctor","user"]},{name:"Finance",roles:["Finance","user"]},{name:"Finance Manager",roles:["Finance Manager","user"]},{name:"Hospital Administrator",roles:["Hospital Administrator","user"]},{name:"Inventory Manager",roles:["Inventory Manager","user"]},{name:"Imaging Technician",roles:["Imaging Technician","user"]},{name:"Lab Technician",roles:["Lab Technician","user"]},{name:"Medical Records Officer",roles:["Medical Records Officer","user"]},{name:"Nurse",roles:["Nurse","user"]},{name:"Nurse Manager",roles:["Nurse Manager","user"]},{name:"Patient Administration",roles:["Patient Administration","user"]},{name:"Pharmacist",roles:["Pharmacist","user"]},{name:"Social Worker",roles:["Social Worker","user"]},{name:"System Administrator",roles:["System Administrator","admin","user"]},{name:"User Administrator",roles:["User Administrator","admin","user"]}]})}),define("hospitalrun/mixins/user-session",["exports","ember"],function(e,t){e.default=t.default.Mixin.create({session:t.default.inject.service(),defaultCapabilities:{admin:["User Administrator","System Administrator"],add_allergy:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Patient Administration","System Administrator"],appointments:["Data Entry","Finance","Hospital Administrator","Medical Records Officer","Patient Administration","Social Worker","System Administrator"],add_appointment:["Data Entry","Finance","Hospital Administrator","Medical Records Officer","Patient Administration","Social Worker","System Administrator"],add_charge:["Data Entry","Hospital Administrator","Medical Records Officer","System Administrator"],add_billing_diagnosis:["Data Entry","Hospital Administrator","Medical Records Officer","System Administrator"],add_diagnosis:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Patient Administration","System Administrator"],add_medication:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Pharmacist","System Administrator"],add_operative_plan:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Patient Administration","System Administrator"],add_operation_report:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Patient Administration","System Administrator"],add_photo:["Data Entry","Hospital Administrator","Medical Records Officer","Patient Administration","Social Worker","System Administrator"],add_patient:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Patient Administration","Social Worker","System Administrator"],add_pricing:["Data Entry","Finance","Hospital Administrator","Medical Records Officer","System Administrator"],add_pricing_profile:["Data Entry","Finance","Hospital Administrator","Medical Records Officer","System Administrator"],add_lab:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Lab Technician","System Administrator"],add_imaging:["Data Entry","Doctor","Hospital Administrator","Imaging Technician","Medical Records Officer","System Administrator"],add_inventory_request:["Data Entry","Hospital Administrator","Inventory Manager","Medical Records Officer","Nurse Manager","Pharmacist","System Administrator"],add_inventory_item:["Data Entry","Hospital Administrator","Inventory Manager","Medical Records Officer","System Administrator"],add_inventory_purchase:["Data Entry","Hospital Administrator","Inventory Manager","Medical Records Officer","System Administrator"],add_invoice:["Data Entry","Hospital Administrator","Medical Records Officer","System Administrator"],add_payment:["Hospital Administrator","Medical Records Officer","System Administrator"],add_procedure:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Nurse","Nurse Manager","Patient Administration","System Administrator"],add_socialwork:["Hospital Administrator","Medical Records Officer","Social Worker","System Administrator"], +add_user:["User Administrator","System Administrator"],add_visit:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Nurse","Nurse Manager","Patient Administration","Social Worker","System Administrator"],add_vitals:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Nurse","Nurse Manager","System Administrator"],admit_patient:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Nurse","Nurse Manager","Patient Administration","Social Worker","System Administrator"],adjust_inventory_location:["Hospital Administrator","Inventory Manager","Medical Records Officer","System Administrator"],billing:["Hospital Administrator","Finance","Finance Manager","System Administrator"],complete_imaging:["Imaging Technician","Medical Records Officer","System Administrator"],complete_lab:["Lab Technician","Medical Records Officer","System Administrator"],delete_appointment:["Hospital Administrator","Medical Records Officer","Patient Administration","Social Worker","System Administrator"],delete_diagnosis:["Doctor","Hospital Administrator","Medical Records Officer","Patient Administration","System Administrator"],delete_inventory_item:["Hospital Administrator","Inventory Manager","Medical Records Officer","System Administrator"],delete_imaging:["Doctor","Hospital Administrator","Medical Records Officer","System Administrator"],delete_invoice:["Hospital Administrator","System Administrator"],delete_lab:["Doctor","Hospital Administrator","Medical Records Officer","System Administrator"],delete_medication:["Doctor","Hospital Administrator","Medical Records Officer","System Administrator"],delete_photo:["Data Entry","Hospital Administrator","Medical Records Officer","Patient Administration","Social Worker","System Administrator"],delete_patient:["Hospital Administrator","Medical Records Officer","Patient Administration","System Administrator"],delete_pricing:["Finance","Data Entry","Hospital Administrator","Medical Records Officer","System Administrator"],delete_pricing_profile:["Finance","Data Entry","Hospital Administrator","Medical Records Officer","System Administrator"],delete_procedure:["Doctor","Hospital Administrator","Medical Records Officer","Nurse","Nurse Manager","Patient Administration","System Administrator"],delete_socialwork:["Hospital Administrator","Medical Records Officer","Social Worker","System Administrator"],delete_vitals:["Doctor","Hospital Administrator","Medical Records Officer","Nurse","Nurse Manager","System Administrator"],delete_visit:["Doctor","Hospital Administrator","Medical Records Officer","Nurse","Nurse Manager","Patient Administration","Social Worker","System Administrator"],delete_user:["User Administrator","System Administrator"],discharge_patient:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Nurse","Nurse Manager","Patient Administration","Social Worker","System Administrator"],edit_invoice:["Data Entry","Hospital Administrator","Medical Records Officer","System Administrator"],fulfill_inventory:["Hospital Administrator","Inventory Manager","Medical Records Officer","Pharmacist","System Administrator"],fulfill_medication:["Medical Records Officer","Pharmacist","System Administrator"],imaging:["Data Entry","Doctor","Hospital Administrator","Imaging Technician","Medical Records Officer","System Administrator"],invoices:["Hospital Administrator","Finance","Finance Manager","System Administrator"],labs:["Data Entry","Doctor","Hospital Administrator","Lab Technician","Medical Records Officer","System Administrator"],medication:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Pharmacist","System Administrator"],inventory:["Data Entry","Hospital Administrator","Inventory Manager","Medical Records Officer","Nurse Manager","Pharmacist","System Administrator"],load_db:["System Administrator"],override_invoice:["Hospital Administrator","System Administrator"],query_db:["System Administrator"],patients:["Data Entry","Doctor","Finance","Finance Manager","Hospital Administrator","Imaging Technician","Lab Technician","Medical Records Officer","Nurse","Nurse Manager","Patient Administration","Social Worker","System Administrator"],patient_reports:["Hospital Administrator","Patient Administration","System Administrator"],pricing:["Data Entry","Finance","Hospital Administrator","Medical Records Officer","System Administrator"],visits:["Data Entry","Doctor","Hospital Administrator","Medical Records Officer","Nurse Manager","Nurse","Patient Administration","Social Worker","System Administrator"],update_config:["System Administrator"],users:["User Administrator","System Administrator"],add_note:["Doctor","Medical Records Officer","Nurse","Nurse Manager","Patient Administration","System Administrator"],delete_note:["Medical Records Officer","Nurse Manager","Patient Administration","System Administrator"],define_user_roles:["System Administrator"]},_getUserSessionVars:function(){var e=this.get("session");if(!t.default.isEmpty(e)&&e.get("isAuthenticated"))return e.get("data.authenticated")},currentUserCan:function(e){var n=this._getUserSessionVars();if(!t.default.isEmpty(n)&&!t.default.isEmpty(n.role)){var a=this.get("session").get("data.authenticated.userCaps");if(!t.default.isEmpty(a))return a.includes(e.camelize());var l=this.get("defaultCapabilities"),s=l[e];if(!t.default.isEmpty(s))return s.includes(n.role)}return!1},getUserName:function(e){var n=void 0,a=this._getUserSessionVars();return t.default.isEmpty(a)||(e?n=a.name:t.default.isEmpty(a.displayName)?t.default.isEmpty(a.name)||(n=a.name):n=a.displayName),n}})}),define("hospitalrun/mixins/visit-types",["exports","ember","hospitalrun/utils/select-values"],function(e,t,n){e.default=t.default.Mixin.create({defaultVisitTypes:["Admission","Clinic","Followup","Imaging","Lab","Pharmacy"],_getVisitTypes:function(e){var a=this.get("defaultVisitTypes"),l=this.get("visitTypesList"),s=void 0;return s=t.default.isEmpty(l)?a:l.get("value"),s=n.default.selectValues(s,e)},visitTypes:function(){return this._getVisitTypes()}.property("visitTypesList","defaultVisitTypes").volatile(),visitTypesWithEmpty:function(){return this._getVisitTypes(!0)}.property("visitTypesList","defaultVisitTypes").volatile()})}),define("hospitalrun/models/abstract",["exports","ember-data","ember","ember-validations","ember-pouch","hospitalrun/mixins/user-session"],function(e,t,n,a,l,s){var i=n.default.get,o=n.default.inject,r=n.default.isEmpty;e.default=l.Model.extend(s.default,a.default,{session:o.service(),archived:t.default.attr("boolean"),lastModified:t.default.attr("date"),modifiedBy:t.default.attr(),modifiedFields:t.default.attr(),loadedCustomForms:null,didLoad:function(){var e=this.get("customForms");r(e)||(e=JSON.parse(JSON.stringify(e))),this.set("loadedCustomForms",e)},changedAttributes:function e(){var e=this._super(),t=this.get("customForms"),n=this.get("loadedCustomForms");if(!r(t)){r(n)&&(n={});var a=Object.keys(t);a.forEach(function(a){var l=n[a],s="customForms."+a;r(l)&&(l={});var o=i(t,a),d=Object.keys(o);d.forEach(function(t){var n=i(l,t),a=i(o,t);n!=a&&(e[s+"."+t]=[n,a])})})}return e},save:function(e){var t=void 0,a=this.changedAttributes(),l=new Date,s=this.get("modifiedFields"),i=this.get("session");if(!i||!i.get("isAuthenticated"))return new n.default.RSVP.Promise(function(e,t){n.default.run(null,t,"ERROR you must be logged in to save")});if(this.get("hasDirtyAttributes")&&!this.get("isDeleted")){r(s)&&(s={}),this.set("lastModified",l);for(t in a)s[t]=l;this.set("modifiedFields",s),this.set("modifiedBy",this.getUserName())}return this._super(e).catch(function(t){if(!r(e)&&e.retry)throw t;if(t.name&&t.name.indexOf&&t.name.indexOf("conflict")>-1)return this.rollbackAttributes(),this.reload().then(function(t){for(var l in a)t.set(l,a[l][1]);return n.default.isEmpty(e)&&(e={}),e.retry=!0,t.save(e)});throw t}.bind(this))}})}),define("hospitalrun/models/add-diagnosis",["exports","ember-data","ember-validations","ember-pouch"],function(e,t,n,a){e.default=a.Model.extend(n.default,{diagnosis:t.default.attr("string"),validations:{diagnosis:{presence:!0}}})}),define("hospitalrun/models/allergy",["exports","hospitalrun/models/abstract","ember-data"],function(e,t,n){e.default=t.default.extend({name:n.default.attr("string"),icd9CMCode:n.default.attr("string"),icd10Code:n.default.attr("string"),patient:n.default.belongsTo("patient")})}),define("hospitalrun/models/appointment",["exports","hospitalrun/models/abstract","ember-data","ember","moment","hospitalrun/utils/patient-validation"],function(e,t,n,a,l,s){e.default=t.default.extend({allDay:n.default.attr(),provider:n.default.attr("string"),location:n.default.attr("string"),appointmentType:n.default.attr("string"),startDate:n.default.attr("date"),endDate:n.default.attr("date"),notes:n.default.attr("string"),status:n.default.attr("string",{defaultValue:"Scheduled"}),patient:n.default.belongsTo("patient",{async:!1}),visits:n.default.hasMany("visit"),longDateFormat:"l h:mm A",shortDateFormat:"l",timeFormat:"h:mm A",_getDateSpan:function(e,t,n){var a=e.format(n),l=t.format(n);return a+" - "+l},appointmentDate:function(){var e=this.get("startDate");return e}.property("startDate"),displayStatus:function(){var e=this.get("status");return a.default.isEmpty(e)&&(e="Scheduled"),e}.property("status"),formattedAppointmentDate:function(){var e=this.get("allDay"),t=(0,l.default)(this.get("endDate")),n="",a="",s=(0,l.default)(this.get("startDate"));return s.isSame(t,"day")?(a=s.format(this.get("shortDateFormat")),e||(a+=" ",a+=this._getDateSpan(s,t,this.get("timeFormat")))):(n=e?this.get("shortDateFormat"):this.get("longDateFormat"),a=this._getDateSpan(s,t,n)),a}.property("startDate","endDate"),validations:{appointmentDate:{presence:{if:function(e){var t=e.get("appointmentType");return"Admission"!==t}}},patientTypeAhead:s.default.patientTypeAhead,patient:{presence:!0},appointmentType:{presence:!0},location:{presence:!0},startDate:{presence:!0},endDate:{acceptance:{accept:!0,if:function(e){if(!e.get("hasDirtyAttributes"))return!1;var t=e.get("allDay"),n=e.get("startDate"),l=e.get("endDate");if(a.default.isEmpty(l)||a.default.isEmpty(n))return!0;if(t){if(l.getTime()l},message:"Invalid quantity"}},dateCompleted:{presence:{message:"Please provide a date"}},transferLocation:{acceptance:{accept:!0,if:function(e){var t=e.get("transferLocation"),n=e.get("transferItem");return!(a.default.isEmpty(n)||!a.default.isEmpty(t))},message:"Please select a location to transfer to"}}}});e.default=s}),define("hospitalrun/models/inv-purchase",["exports","hospitalrun/models/abstract","ember-data","ember","hospitalrun/mixins/location-name","hospitalrun/mixins/number-format"],function(e,t,n,a,l,s){function i(){return[]}var o=t.default.extend(l.default,s.default,{purchaseCost:n.default.attr("number"),lotNumber:n.default.attr("string"),dateReceived:n.default.attr("date"),costPerUnit:function(){var e=this.get("purchaseCost"),t=parseInt(this.get("originalQuantity"));return a.default.isEmpty(e)||a.default.isEmpty(t)||0===e||0===t?0:this._numberFormat(e/t,!0)}.property("purchaseCost","originalQuantity"),originalQuantity:n.default.attr("number"),currentQuantity:n.default.attr("number"),expirationDate:n.default.attr("date"),expired:n.default.attr("boolean"),location:n.default.attr("string"),aisleLocation:n.default.attr("string"),giftInKind:n.default.attr("boolean"),inventoryItem:n.default.attr("string"),vendor:n.default.attr("string"),vendorItemNo:n.default.attr("string"),distributionUnit:n.default.attr("string"),invoiceNo:n.default.attr("string"),quantityGroups:n.default.attr({defaultValue:i}),validations:{purchaseCost:{numericality:!0},originalQuantity:{numericality:{greaterThanOrEqualTo:0}},vendor:{presence:!0}}});e.default=o}),define("hospitalrun/models/inv-request",["exports","hospitalrun/models/abstract","hospitalrun/mixins/inventory-adjustment-types","ember-data","ember","hospitalrun/mixins/location-name"],function(e,t,n,a,l,s){var i=t.default.extend(n.default,s.default,{adjustPurchases:a.default.attr("boolean"),completedBy:a.default.attr("string"),costPerUnit:a.default.attr("number"),dateCompleted:a.default.attr("date"),dateRequested:a.default.attr("date"),deliveryAisle:a.default.attr("string"),deliveryLocation:a.default.attr("string"),expenseAccount:a.default.attr("string"),inventoryItem:a.default.belongsTo("inventory",{async:!0}),locationsAffected:a.default.attr(),markAsConsumed:a.default.attr("boolean",{defaultValue:!0}),patient:a.default.belongsTo("patient",{async:!1}),purchasesAffected:a.default.attr(),quantity:a.default.attr("number"),quantityAtCompletion:a.default.attr("number"),reason:a.default.attr("string"),requestedBy:a.default.attr("string"),status:a.default.attr("string"),transactionType:a.default.attr("string"),visit:a.default.belongsTo("visit",{async:!1}),deliveryLocationName:function(){var e=this.get("deliveryAisle"),t=this.get("deliveryLocation");return this.formatLocationName(t,e)}.property("deliveryAisle","deliveryLocation"),deliveryDetails:function(){var e=this.get("deliveryLocationName"),t=this.get("patient");return l.default.isEmpty(t)?e:t.get("displayName")}.property("deliveryAisle","deliveryLocation","patient"),haveReason:function(){return!l.default.isEmpty(this.get("reason"))}.property("reason"),isAdjustment:function(){var e=this.get("adjustmentTypes"),t=this.get("transactionType"),n=e.findBy("type",t);return!l.default.isEmpty(n)}.property("transactionType"),isFulfillment:function(){return"Fulfillment"===this.get("transactionType")}.property("transactionType"),isTransfer:function(){return"Transfer"===this.get("transactionType")}.property("transactionType"),validations:{inventoryItemTypeAhead:{acceptance:{accept:!0,if:function(e){if(!e.get("hasDirtyAttributes"))return!1;var t=e.get("inventoryItem.name"),n=e.get("inventoryItemTypeAhead"),a=e.get("requestedItems"),s=e.get("status");if("Requested"===s)return!1;if(l.default.isEmpty(t)||l.default.isEmpty(n))return l.default.isEmpty(a);var i=n.substr(0,t.length);return t!==i},message:"Please select a valid inventory item"}},quantity:{numericality:{greaterThan:0,messages:{greaterThan:"must be greater than 0"},if:function(e){var t=e.get("requestedItems");return l.default.isEmpty(t)}},acceptance:{accept:!0,if:function(e){var t=e.get("isNew"),n=parseInt(e.get("quantity")),a=e.get("transactionType"),l=null;return"Return"!==a&&(l=t&&"Request"===a?e.get("inventoryItem.quantity"):e.get("inventoryLocation.quantity"),n>l)},message:"The quantity must be less than or equal to the number of available items."}}}});e.default=i}),define("hospitalrun/models/inventory-batch",["exports","hospitalrun/models/abstract","ember"],function(e,t,n){e.default=t.default.extend({haveInvoiceItems:function(){var e=this.get("invoiceItems");return!n.default.isEmpty(e)},validations:{dateReceived:{presence:!0},inventoryItemTypeAhead:{presence:{unless:function(e){return e.haveInvoiceItems()}}},purchaseCost:{numericality:{greaterThan:0,messages:{greaterThan:"must be greater than 0"},unless:function(e){return e.haveInvoiceItems()}}},quantity:{numericality:{greaterThan:0,messages:{greaterThan:"must be greater than 0"},unless:function(e){return e.haveInvoiceItems()}}},vendor:{presence:!0}}})}),define("hospitalrun/models/inventory",["exports","hospitalrun/models/abstract","ember-data","ember","ember-computed","hospitalrun/mixins/location-name","hospitalrun/utils/item-condition"],function(e,t,n,a,l,s,i){var o=a.default.get,r=a.default.set,d={if:function(e){var t=o(e,"skipSavePurchase");return!t&&o(e,"isNew")}};e.default=t.default.extend(s.default,{crossReference:n.default.attr("string"),description:n.default.attr("string"),distributionUnit:n.default.attr("string"),friendlyId:n.default.attr("string"),inventoryType:n.default.attr("string"),keywords:n.default.attr(),name:n.default.attr("string"),price:n.default.attr("number"),quantity:n.default.attr("number"),rank:n.default.attr("string"),reorderPoint:n.default.attr("number"),locations:n.default.hasMany("inv-location",{async:!1}),purchases:n.default.hasMany("inv-purchase",{async:!1}),estimatedDaysOfStock:14,availableLocations:(0,l.default)("locations.@each.quantity",function(){var e=o(this,"locations").filter(function(e){return o(e,"quantity")>0});return e}),displayLocations:(0,l.default)("availableLocations",function(){var e=this,t=o(this,"availableLocations"),n=[];return t.forEach(function(t){var l=o(t,"aisleLocation"),s=o(t,"location"),i=e.formatLocationName(s,l);a.default.isEmpty(i)||n.push(i)}),n.toString()}),condition:(0,l.default)("rank","estimatedDaysOfStock",function(){var e=o(this,"estimatedDaysOfStock"),t=(0,i.rankToMultiplier)(o(this,"rank"));return(0,i.getCondition)(e,t)}),validations:{distributionUnit:{presence:!0},purchaseCost:{numericality:d},name:{presence:!0},quantity:{numericality:{validateIfNewItem:d,greaterThanOrEqualTo:0}},price:{numericality:{allowBlank:!0}},originalQuantity:{presence:d},reorderPoint:{numericality:{allowBlank:!0}},inventoryType:{presence:!0},vendor:{presence:d}},updateQuantity:function(){var e=o(this,"purchases"),t=e.reduce(function(e,t){var n=0;return t.get("expired")||(n=t.get("currentQuantity")),e+n},0);r(this,"quantity",t)}})}),define("hospitalrun/models/invoice",["exports","hospitalrun/models/abstract","hospitalrun/mixins/date-format","ember-data","ember","hospitalrun/mixins/number-format","hospitalrun/utils/patient-validation"],function(e,t,n,a,l,s,i){var o=l.default.computed,r=l.default.get,d=l.default.set;e.default=t.default.extend(n.default,s.default,{billDate:a.default.attr("date"),externalInvoiceNumber:a.default.attr("string"),paidTotal:a.default.attr("number"),patientInfo:a.default.attr("string"),remarks:a.default.attr("string"),status:a.default.attr("string"),lineItems:a.default.hasMany("billing-line-item",{async:!1}),patient:a.default.belongsTo("patient",{async:!1}),paymentProfile:a.default.belongsTo("price-profile",{async:!1}),payments:a.default.hasMany("payment",{async:!1}),visit:a.default.belongsTo("visit",{async:!1}),addPayment:function(e){var t=r(this,"payments");t.addObject(e),this.paymentAmountChanged()},billDateAsTime:o("billDate",function(){return this.dateToTime(r(this,"billDate"))}),discountTotals:l.default.computed.mapBy("lineItemsByCategory","discount"),discount:l.default.computed.sum("discountTotals"),nationalInsuranceTotals:l.default.computed.mapBy("lineItemsByCategory","nationalInsurance"),nationalInsurance:l.default.computed.sum("nationalInsuranceTotals"),paidFlag:o("status",function(){return"Paid"===r(this,"status")}),remainingBalance:o("patientResponsibility","paidTotal",function(){var e=r(this,"patientResponsibility"),t=r(this,"paidTotal");return this._numberFormat(e-t,!0)}),privateInsuranceTotals:l.default.computed.mapBy("lineItemsByCategory","privateInsurance"),privateInsurance:l.default.computed.sum("privateInsuranceTotals"),lineTotals:l.default.computed.mapBy("lineItems","total"),total:l.default.computed.sum("lineTotals"),displayInvoiceNumber:o("externalInvoiceNumber","id",function(){var e=r(this,"externalInvoiceNumber"),t=r(this,"id");return l.default.isEmpty(e)?t:e}),lineItemsByCategory:o("lineItems.@each.amountOwed",function(){var e=r(this,"lineItems"),t=[];return e.forEach(function(e){var n=r(e,"category"),a=t.findBy("category",n);l.default.isEmpty(a)&&(a={category:n,items:[]},t.push(a)),a.items.push(e)}.bind(this)),t.forEach(function(e){e.amountOwed=this._calculateTotal(e.items,"amountOwed"),e.discount=this._calculateTotal(e.items,"discount"),e.nationalInsurance=this._calculateTotal(e.items,"nationalInsurance"),e.privateInsurance=this._calculateTotal(e.items,"privateInsurance"),e.total=this._calculateTotal(e.items,"total")}.bind(this)),t}),patientIdChanged:function(){if(!l.default.isEmpty(r(this,"patient"))){var e=r(this,"patient.displayName"),t=r(this,"patient.displayPatientId");d(this,"patientInfo",e+" - "+t)}}.observes("patient.displayName","patient.id","patient.displayPatientId"),patientResponsibilityTotals:l.default.computed.mapBy("lineItems","amountOwed"),patientResponsibility:l.default.computed.sum("patientResponsibilityTotals"),paymentAmountChanged:function(){var e=r(this,"payments").filter(function(e){return!r(e,"isNew")});if(0!==e.length){var t=e.reduce(function(e,t){return e+=this._getValidNumber(t.get("amount"))}.bind(this),0);d(this,"paidTotal",this._numberFormat(t,!0));var n=r(this,"remainingBalance");n<=0&&d(this,"status","Paid")}}.observes("payments.[]","payments.@each.amount"),validations:{patientTypeAhead:i.default.patientTypeAhead,patient:{presence:!0},visit:{presence:!0}}})}),define("hospitalrun/models/lab",["exports","hospitalrun/models/abstract","hospitalrun/mixins/can-edit-requested","hospitalrun/mixins/date-format","ember-data","ember","hospitalrun/utils/patient-validation","hospitalrun/mixins/result-validation"],function(e,t,n,a,l,s,i,o){var r=s.default.computed,d=s.default.get;e.default=t.default.extend(n.default,a.default,o.default,{labDate:l.default.attr("date"),notes:l.default.attr("string"),requestedBy:l.default.attr("string"),requestedDate:l.default.attr("date"),result:l.default.attr("string"),status:l.default.attr("string"),charges:l.default.hasMany("proc-charge",{async:!1}),labType:l.default.belongsTo("pricing",{async:!1}),patient:l.default.belongsTo("patient",{async:!1}),visit:l.default.belongsTo("visit",{async:!1}),labDateAsTime:r("labDate",function(){return this.dateToTime(d(this,"labDate"))}),requestedDateAsTime:r("requestedDate",function(){return this.dateToTime(d(this,"requestedDate"))}),validations:{labTypeName:{presence:{if:function(e){if(e.get("isNew"))return!0},message:"Please select a lab type"}},patientTypeAhead:i.default.patientTypeAhead,patient:{presence:!0}}})}),define("hospitalrun/models/line-item-detail",["exports","hospitalrun/models/abstract","ember-data","ember","hospitalrun/mixins/number-format"],function(e,t,n,a,l){var s=a.default.computed,i=a.default.get;e.default=t.default.extend(l.default,{department:n.default.attr("string"),expenseAccount:n.default.attr("string"),name:n.default.attr("string"),price:n.default.attr("number"),quantity:n.default.attr("number"),total:n.default.attr("number"),pricingItem:n.default.belongsTo("pricing",{async:!1}),amountOwed:s("price","quantity",function(){var e=i(this,"price"),t=i(this,"quantity"),n=0;return this._validNumber(e)&&this._validNumber(t)&&(n=this._numberFormat(e*t,!0)),n})})}),define("hospitalrun/models/lookup",["exports","ember-pouch","ember-data"],function(e,t,n){e.default=t.Model.extend({_attachments:n.default.attr(),importFile:n.default.attr("boolean",{defaultValue:!1}),value:n.default.attr(""),organizeByType:n.default.attr("boolean"),userCanAdd:n.default.attr("boolean")})}),define("hospitalrun/models/medication",["exports","hospitalrun/models/abstract","hospitalrun/mixins/can-edit-requested","ember-data","hospitalrun/mixins/date-format","ember","hospitalrun/mixins/medication-details"],function(e,t,n,a,l,s,i){e.default=t.default.extend(n.default,l.default,i.default,{inventoryItem:a.default.belongsTo("inventory",{async:!0}),notes:a.default.attr("string"),patient:a.default.belongsTo("patient",{async:!1}),prescription:a.default.attr("string"),prescriptionDate:a.default.attr("date"),quantity:a.default.attr("number"),refills:a.default.attr("number"),requestedDate:a.default.attr("date"),requestedBy:a.default.attr("string"),status:a.default.attr("string"),visit:a.default.belongsTo("visit",{async:!1}),isRequested:function(){var e=this.get("status");return"Requested"===e}.property("status"),medicationName:function(){return this.getMedicationName("inventoryItem")}.property("medicationTitle","inventoryItem"),medicationPrice:function(){return this.getMedicationPrice("inventoryItem")}.property("priceOfMedication","inventoryItem"),prescriptionDateAsTime:function(){return this.dateToTime(this.get("prescriptionDate"))}.property("prescriptionDate"),requestedDateAsTime:function(){return this.dateToTime(this.get("requestedDate"))}.property("requestedDate"),validations:{prescription:{acceptance:{accept:!0,if:function(e){if(!e.get("hasDirtyAttributes")||e.get("isFulfilling"))return!1;var t=e.get("prescription"),n=e.get("quantity");return!(!s.default.isEmpty(t)||!s.default.isEmpty(n))},message:"Please enter a prescription or a quantity"}},inventoryItemTypeAhead:{acceptance:{accept:!0,if:function(e){if(!e.get("hasDirtyAttributes")||!e.get("isNew"))return!1;var t=e.get("inventoryItem.name"),n=e.get("inventoryItemTypeAhead");if(s.default.isEmpty(t)||s.default.isEmpty(n))return!0;var a=n.substr(0,t.length);return t!==a},message:"Please select a valid medication"}},patientTypeAhead:{presence:{if:function(e){return e.get("selectPatient")}}},quantity:{numericality:{allowBlank:!0,greaterThan:0,messages:{greaterThan:"must be greater than 0"}},presence:{if:function(e){var t=e.get("isFulfilling");return t}},acceptance:{accept:!0,if:function(e){var t=e.get("isFulfilling"),n=parseInt(e.get("quantity")),a=null;return!!t&&(a=e.get("inventoryItem.quantity"),n>a)},message:"The quantity must be less than or equal to the number of available medication."}},refills:{numericality:{allowBlank:!0}}}})}),define("hospitalrun/models/operation-report",["exports","hospitalrun/models/abstract","ember-data","ember"],function(e,t,n,a){function l(){return[]}var s=a.default.get,i=a.default.isEmpty;e.default=t.default.extend({additionalNotes:n.default.attr("string"),caseComplexity:n.default.attr("number"),customForms:n.default.attr("custom-forms"),procedures:n.default.attr("operative-procedures",{defaultValue:l}),operationDescription:n.default.attr("string"),surgeon:n.default.attr("string"),surgeryDate:n.default.attr("date"),preOpDiagnoses:n.default.hasMany("diagnosis"),diagnoses:n.default.hasMany("diagnosis"),operativePlan:n.default.belongsTo("operative-plan",{async:!0}),patient:n.default.belongsTo("patient",{async:!1}),validations:{caseComplexity:{numericality:{allowBlank:!0,onlyInteger:!0}},procedureDescription:{presence:{if:function(e){return i(s(e,"procedures"))}}}}})}),define("hospitalrun/models/operative-plan",["exports","hospitalrun/models/abstract","ember-data","ember","hospitalrun/mixins/operative-plan-statuses"],function(e,t,n,a,l){function s(){return[]}var i=a.default.computed,o=a.default.get,r=a.default.isEmpty;e.default=t.default.extend({additionalNotes:n.default.attr("string"),admissionInstructions:n.default.attr("string"),caseComplexity:n.default.attr("number"),customForms:n.default.attr("custom-forms"),operationDescription:n.default.attr("string"),procedures:n.default.attr("operative-procedures",{ +defaultValue:s}),status:n.default.attr("string",{defaultValue:l.PLANNED_STATUS}),surgeon:n.default.attr("string"),surgeryDate:n.default.attr("date"),diagnoses:n.default.hasMany("diagnosis"),patient:n.default.belongsTo("patient",{async:!1}),isPlanned:i("status",{get:function(){var e=o(this,"status");return e===l.PLANNED_STATUS}}),validations:{caseComplexity:{numericality:{allowBlank:!0,onlyInteger:!0}},procedureDescription:{presence:{if:function(e){return r(o(e,"procedures"))}}}}})}),define("hospitalrun/models/option",["exports","ember-pouch","ember-data"],function(e,t,n){e.default=t.Model.extend({value:n.default.attr("")})}),define("hospitalrun/models/override-price",["exports","hospitalrun/models/abstract","ember-data"],function(e,t,n){e.default=t.default.extend({price:n.default.attr("number"),profile:n.default.belongsTo("price-profile",{async:!1}),validations:{profile:{presence:!0},price:{numericality:!0}}})}),define("hospitalrun/models/patient-note",["exports","hospitalrun/models/abstract","ember","ember-data"],function(e,t,n,a){var l=n.default.computed;e.default=t.default.extend({attribution:a.default.attr("string"),content:a.default.attr("string"),createdBy:a.default.attr("string"),date:a.default.attr("date"),noteType:a.default.attr(),patient:a.default.belongsTo("patient",{async:!1}),visit:a.default.belongsTo("visit",{async:!1}),authoredBy:l("attribution","createdBy",function(){if(n.default.isEmpty(this.get("attribution")))return this.get("createdBy");var e=this.get("i18n");return this.get("createdBy")+" "+e.t("patients.notes.onBehalfOfCopy")+" "+this.get("attribution")}),validations:{patient:{presence:!0},visit:{presence:!0},noteType:{presence:!0},content:{presence:!0}}})}),define("hospitalrun/models/patient",["exports","hospitalrun/models/abstract","hospitalrun/mixins/dob-days","hospitalrun/utils/email-validation","ember","ember-data","hospitalrun/mixins/patient-name"],function(e,t,n,a,l,s,i){var o=l.default.computed,r=l.default.get;e.default=t.default.extend(n.default,i.default,{admitted:s.default.attr("boolean",{defaultValue:!1}),additionalContacts:s.default.attr(),address:s.default.attr("string"),address2:s.default.attr("string"),address3:s.default.attr("string"),address4:s.default.attr("string"),bloodType:s.default.attr("string"),clinic:s.default.attr("string"),country:s.default.attr("string"),checkedIn:s.default.attr("boolean",{defaultValue:!1}),customForms:s.default.attr("custom-forms"),dateOfBirth:s.default.attr("date"),economicClassification:s.default.attr("string"),email:s.default.attr("string"),expenses:s.default.attr(),externalPatientId:s.default.attr("string"),familySupport1:s.default.attr("string"),familySupport2:s.default.attr("string"),familySupport3:s.default.attr("string"),familySupport4:s.default.attr("string"),familySupport5:s.default.attr("string"),friendlyId:s.default.attr("string"),familyInfo:s.default.attr(),firstName:s.default.attr("string"),sex:s.default.attr("string"),occupation:s.default.attr("string"),history:s.default.attr("string"),insurance:s.default.attr("string"),lastName:s.default.attr("string"),livingArrangement:s.default.attr("string"),middleName:s.default.attr("string"),notes:s.default.attr("string"),otherIncome:s.default.attr("string"),patientType:s.default.attr("string"),parent:s.default.attr("string"),phone:s.default.attr("string"),placeOfBirth:s.default.attr("string"),referredDate:s.default.attr("date"),referredBy:s.default.attr("string"),religion:s.default.attr("string"),socialActionTaken:s.default.attr("string"),socialRecommendation:s.default.attr("string"),status:s.default.attr("string"),allergies:s.default.hasMany("allergy",{async:!0}),diagnoses:s.default.hasMany("diagnosis",{async:!1}),operationReports:s.default.hasMany("operation-report",{async:!0}),operativePlans:s.default.hasMany("operative-plan",{async:!0}),payments:s.default.hasMany("payment",{async:!0}),paymentProfile:s.default.belongsTo("price-profile",{async:!1}),age:o("dateOfBirth",function(){var e=r(this,"dateOfBirth");return this.convertDOBToText(e)}),displayAddress:o("address","address2","address3","address4",function(){var e=this.getProperties("address","address2","address3","address4"),t="";for(var n in e)l.default.isEmpty(e[n])||(l.default.isEmpty(t)||(t+=", "),t+=e[n]);return t}),displayName:o("firstName","lastName","middleName",function(){return this.getPatientDisplayName(this)}),displayPatientId:o("id","externalPatientId","friendlyId",function(){return this.getPatientDisplayId(this)}),shortAge:o("dateOfBirth",function(){var e=r(this,"dateOfBirth");return this.convertDOBToText(e,!0)}),shortDisplayName:o("firstName","lastName",function(){return this.getPatientDisplayName(this,!0)}),validations:{email:{format:{with:a.default.emailRegex,allowBlank:!0,message:"please enter a valid email address"}},friendlyId:{presence:!0},firstName:{presence:!0},lastName:{presence:!0}}})}),define("hospitalrun/models/payment",["exports","hospitalrun/models/abstract","ember-data","ember"],function(e,t,n,a){var l=a.default.computed,s=a.default.get;e.default=t.default.extend({amount:n.default.attr("number"),charityPatient:n.default.attr("boolean"),datePaid:n.default.attr("date"),expenseAccount:n.default.attr("string"),notes:n.default.attr("string"),paymentType:n.default.attr("string"),invoice:n.default.belongsTo("invoice",{async:!1}),canRemovePayment:l("paymentType",function(){return"Deposit"===s(this,"paymentType")}),validations:{amount:{numericality:!0},datePaid:{presence:!0}}})}),define("hospitalrun/models/photo",["exports","hospitalrun/models/abstract","ember-data"],function(e,t,n){e.default=t.default.extend({_attachments:n.default.attr(),caption:n.default.attr("string"),coverImage:n.default.attr("boolean"),fileName:n.default.attr("string"),localFile:n.default.attr("boolean"),url:n.default.attr("string"),patient:n.default.belongsTo("patient",{async:!1})})}),define("hospitalrun/models/price-profile",["exports","hospitalrun/models/abstract","ember-data"],function(e,t,n){e.default=t.default.extend({name:n.default.attr("string"),discountAmount:n.default.attr("number"),discountPercentage:n.default.attr("number"),validations:{name:{presence:!0},discountAmount:{numericality:{allowBlank:!0}},discountPercentage:{numericality:{allowBlank:!0}}}})}),define("hospitalrun/models/pricing",["exports","hospitalrun/models/abstract","ember-data"],function(e,t,n){e.default=t.default.extend({category:n.default.attr("string"),expenseAccount:n.default.attr("string"),name:n.default.attr("string"),price:n.default.attr("number"),pricingType:n.default.attr("string"),pricingOverrides:n.default.hasMany("override-price",{async:!1}),validations:{category:{presence:!0},name:{presence:!0},price:{numericality:!0}}})}),define("hospitalrun/models/proc-charge",["exports","hospitalrun/models/abstract","ember-data","ember","hospitalrun/mixins/medication-details"],function(e,t,n,a,l){var s=a.default.computed,i=a.default.get;e.default=t.default.extend(l.default,{quantity:n.default.attr("number"),dateCharged:n.default.attr("date"),medication:n.default.belongsTo("inventory",{async:!1}),pricingItem:n.default.belongsTo("pricing",{async:!1}),medicationCharge:s("medication","newMedicationCharge",function(){var e=i(this,"medication"),t=i(this,"newMedicationCharge");return!a.default.isEmpty(e)||!a.default.isEmpty(t)}),medicationName:s("medication",function(){return this.get("medication.name")}),medicationPrice:s("medication",function(){return this.get("medication.price")}),validations:{itemName:{presence:!0,acceptance:{accept:!0,if:function(e){var t=i(e,"medicationCharge");if(!t||!i(e,"hasDirtyAttributes"))return!1;var n=i(e,"inventoryItem.name"),l=i(e,"itemName");if(a.default.isEmpty(n)||a.default.isEmpty(l))return!0;var s=l.substr(0,n.length);return n!==s},message:"Please select a valid medication"}},quantity:{numericality:{greaterThan:0,messages:{greaterThan:"must be greater than 0"}}}}})}),define("hospitalrun/models/procedure",["exports","hospitalrun/models/abstract","ember-data"],function(e,t,n){e.default=t.default.extend({anesthesiaType:n.default.attr("string"),anesthesiologist:n.default.attr("string"),assistant:n.default.attr("string"),description:n.default.attr("string"),cptCode:n.default.attr("string"),location:n.default.attr("string"),notes:n.default.attr("string"),physician:n.default.attr("string"),procedureDate:n.default.attr("date"),timeStarted:n.default.attr("string"),timeEnded:n.default.attr("string"),charges:n.default.hasMany("proc-charge",{async:!1}),visit:n.default.belongsTo("visit",{async:!1}),validations:{description:{presence:!0},oxygenHours:{numericality:{allowBlank:!0}},pacuHours:{numericality:{allowBlank:!0}},physician:{presence:!0},procedureDate:{presence:!0},display_procedureDate:{presence:{message:"Please select a valid date"}}}})}),define("hospitalrun/models/sequence",["exports","ember-pouch","ember-data"],function(e,t,n){e.default=t.Model.extend({prefix:n.default.attr("string"),value:n.default.attr("number")})}),define("hospitalrun/models/social-expense",["exports","ember-data","ember-validations","ember-pouch"],function(e,t,n,a){e.default=a.Model.extend(n.default,{category:t.default.attr("string"),sources:t.default.attr("string"),cost:t.default.attr(),validations:{category:{presence:!0},cost:{numericality:!0}}})}),define("hospitalrun/models/user-role",["exports","hospitalrun/models/abstract","ember-data"],function(e,t,n){e.default=t.default.extend({name:n.default.attr("string"),capabilities:n.default.attr()})}),define("hospitalrun/models/user",["exports","ember-data","hospitalrun/utils/email-validation","ember","ember-validations"],function(e,t,n,a,l){var s=a.default.computed,i=t.default.Model.extend(l.default,{derived_key:t.default.attr("string"),deleted:t.default.attr("boolean"),displayName:t.default.attr("string"),email:t.default.attr("string"),iterations:t.default.attr(),name:t.default.attr("string"),password:t.default.attr("string"),password_scheme:t.default.attr("string"),password_sha:t.default.attr("string"),rev:t.default.attr("string"),roles:t.default.attr(),salt:t.default.attr("string"),userPrefix:t.default.attr("string"),displayRole:s("roles",function(){var e=this.get("roles");if(!a.default.isEmpty(e))return e[0]}),validations:{email:{format:{with:n.default.emailRegex,message:"Please, enter a valid email address"}}}});e.default=i}),define("hospitalrun/models/visit",["exports","hospitalrun/models/abstract","ember-data","ember","moment"],function(e,t,n,a,l){function s(e){if(!e.get("hasDirtyAttributes"))return!1;var t=e.get("startDate"),n=e.get("endDate");return!a.default.isEmpty(n)&&!a.default.isEmpty(t)&&n.getTime()n)return t.set("value",l),t.save()})})},beforeUpdate:function(){var e=this;if(!this.get("model.isNew"))return l.default.RSVP.resolve();var t=this.get("database"),n=this.get("model.friendlyId"),a=this.get("maxValue"),s={startkey:[n,null],endkey:[n,a]};return t.queryMainDB(s,"patient_by_display_id").then(function(t){return l.default.isEmpty(t.rows)?l.default.RSVP.resolve():e.generateFriendlyId().then(function(t){return e.model.set("friendlyId",t),l.default.RSVP.resolve()})})},afterUpdate:function(e){var t=this;this._updateSequence(e).then(function(){t.send("openModal","dialog",l.default.Object.create({title:t.get("i18n").t("patients.titles.savedPatient"),message:t.get("i18n").t("patients.messages.savedPatient",e),updateButtonAction:"returnToPatient",updateButtonText:t.get("i18n").t("patients.buttons.backToPatients"),cancelButtonText:t.get("i18n").t("buttons.close")}))})}})}),define("hospitalrun/patients/edit/route",["exports","hospitalrun/routes/abstract-edit-route","ember","hospitalrun/mixins/patient-id","hospitalrun/mixins/patient-visits","hospitalrun/mixins/patient-notes","hospitalrun/mixins/pouchdb","ember-i18n"],function(e,t,n,a,l,s,i,o){e.default=t.default.extend(a.default,l.default,i.default,s.default,{customForms:n.default.inject.service(),editTitle:(0,o.translationMacro)("patients.titles.edit"),modelName:"patient",newTitle:(0,o.translationMacro)("patients.titles.new"),photos:null,actions:{updateNote:function(e){e.get("visit").save().then(function(){})},appointmentDeleted:function(e){this.controller.send("appointmentDeleted",e)},returnToPatient:function(){this.controller.send("returnToPatient")},deleteContact:function(e){this.controller.send("deleteContact",e)},deleteExpense:function(e){this.controller.send("deleteExpense",e)},deleteFamily:function(e){this.controller.send("deleteFamily",e)},deletePhoto:function(e){this.controller.send("deletePhoto",e)},updateExpense:function(e){this.controller.send("updateExpense",e)},updateFamilyInfo:function(e){this.controller.send("updateFamilyInfo",e)},visitDeleted:function(e){this.controller.send("visitDeleted",e)}},getNewData:function(){var e=this,t=this.get("customForms"),a={customForms:n.default.Object.create()};return t.setDefaultCustomForms(["patient","socialwork"],a).then(function(){return e.generateFriendlyId().then(function(e){return a.friendlyId=e,a})})},setupController:function(e,t){var a=t.get("friendlyId"),l=t.get("externalPatientId"),s=this.get("maxValue"),i=t.get("id");n.default.isEmpty(a)&&!n.default.isEmpty(l)&&t.set("friendlyId",l),this._super(e,t),this.getPatientVisits(t).then(function(e){t.set("visits",e)}),this.store.query("appointment",{options:{startkey:[i,null,null,"appointment_"],endkey:[i,s,s,s]},mapReduce:"appointments_by_patient"}).then(function(e){t.set("appointments",e)}),this.store.query("photo",{options:{key:i},mapReduce:"photo_by_patient"}).then(function(e){var n=[];n.addObjects(e),t.set("photos",n)})}})}),define("hospitalrun/patients/edit/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"u/yTHHia",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],52]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","colspan","2"],["flush-element"],["open-element","b",[]],["flush-element"],["append",["helper",["t"],["patients.labels.totalMontlyExpense"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["totalExpenses"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteExpense",["get",["expense"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.delete"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["expense","category"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["expense","sources"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["expense","cost"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"showEditExpense",["get",["expense"]]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canDeleteSocialWork"]]],null,1],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["expense"]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteFamily",["get",["info"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.delete"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["info","name"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["info","age"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["info","civilStatus"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["info","relationship"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["info","education"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["info","occupation"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["info","income"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["info","insurance"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"showEditFamily",["get",["info"]]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canDeleteSocialWork"]]],null,3],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["info"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","role","tabpanel"],["static-attr","class","tab-pane"],["static-attr","id","social"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["open-element","h4",[]],["flush-element"],["text","\\n "],["append",["helper",["t"],["patients.titles.familyInformation"],null],false],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"showEditFamily"],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["patients.buttons.addFamilyMember"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.name"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.age"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.civilStatus"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.relationship"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.education"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.occupation"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.income"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.insurance"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.action"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","familyInfo"]]],null,4],["text"," "],["close-element"],["text","\\n "],["open-element","h4",[]],["flush-element"],["text","\\n "],["append",["helper",["t"],["patients.titles.expenses"],null],false],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"showEditExpense"],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["patients.buttons.addExpense"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.category"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.sources"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.monthlyCost"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","expenses"]]],null,2],["block",["if"],[["get",["showExpenseTotal"]]],null,0],["text"," "],["close-element"],["text","\\n "],["append",["helper",["custom-form-manager"],null,[["model","formType"],[["get",["model"]],"socialwork"]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"newLab"],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["patients.buttons.newLab"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"newImaging"],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["patients.buttons.newImaging"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"newMedication"],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["patients.buttons.newMedication"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteVisit",["get",["visit"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["buttons.delete"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editVisit",["get",["visit"]]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["modifier",["action"],[["get",[null]],"editVisit",["get",["visit"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["visit","startDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["visit","endDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["visit","primaryDiagnoses"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["visit","examiner"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["visit","location"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["visit","visitType"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddVisit"]]],null,10],["block",["if"],[["get",["canDeleteVisit"]]],null,9],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["visit"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"newVisit"],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["patients.buttons.newVisit"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteAppointment",["get",["appointment"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["buttons.delete"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editAppointment",["get",["appointment"]]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["modifier",["action"],[["get",[null]],"editAppointment",["get",["appointment"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","formattedAppointmentDate"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","provider"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","location"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","appointmentType"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["appointment","displayStatus"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddAppointment"]]],null,14],["block",["if"],[["get",["canDeleteAppointment"]]],null,13],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["appointment"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"newAppointment"],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["patients.buttons.newAppointment"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeletePhoto",["get",["photo"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.delete"],null],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editPhoto",["get",["photo"]]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","col-sm-4 col-md-3"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","thumbnail"],["modifier",["action"],[["get",[null]],"editPhoto",["get",["photo"]]]],["flush-element"],["text","\\n "],["append",["helper",["photo-display"],null,[["photo"],[["get",["photo"]]]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","caption"],["flush-element"],["text","\\n "],["append",["unknown",["photo","caption"]],false],["text","\\n "],["open-element","p",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddPhoto"]]],null,18],["block",["if"],[["get",["canDeletePhoto"]]],null,17],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["photo"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"showAddPhoto"],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["patients.buttons.newPhoto"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","role","tabpanel"],["static-attr","class","tab-pane"],["static-attr","id","photos"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddPhoto"]]],null,20],["text"," "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n"],["block",["each"],[["get",["model","photos"]]],null,19],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","role","tabpanel"],["static-attr","class","tab-pane"],["static-attr","id","appointments"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddAppointment"]]],null,16],["text"," "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.date"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["visits.labels.examiner"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.location"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.type"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.status"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","appointments"]]],null,15],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","role","tabpanel"],["static-attr","class","tab-pane"],["static-attr","id","visits"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddVisit"]]],null,12],["text"," "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.startDate"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.endDate"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["visits.labels.diagnosis"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.provider"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.location"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.type"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","visits"]]],null,11],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","role","tabpanel"],["static-attr","class","tab-pane"],["static-attr","id","medication"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddMedication"]]],null,8],["text"," "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["partial","patients/medication"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","role","tabpanel"],["static-attr","class","tab-pane"],["static-attr","id","imaging"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddImaging"]]],null,7],["text"," "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["partial","patients/imaging"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","role","tabpanel"],["static-attr","class","tab-pane"],["static-attr","id","labs"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddLab"]]],null,6],["text"," "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["partial","patients/labs"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["canAddSocialWork"]]],null,5]],"locals":[]},{"statements":[["text"," "],["open-element","td",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteContact",["get",["additionalContact"]]],[["bubbles"],[false]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.delete"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["additionalContact","name"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["additionalContact","phone"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["additionalContact","email"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["additionalContact","relationship"]],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canDeleteContact"]]],null,22],["text"," "],["close-element"],["text","\\n"]],"locals":["additionalContact"]},{"statements":[["text"," "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.action"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","h4",[]],["flush-element"],["append",["helper",["t"],["patients.titles.additionalContacts"],null],false],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.name"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.phone"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.email"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.relationship"],null],false],["close-element"],["text","\\n"],["block",["if"],[["get",["canDeleteContact"]]],null,24],["text"," "],["close-element"],["text","\\n"],["block",["each"],[["get",["model","additionalContacts"]]],null,23],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-text"],null,[["label","property","rows","class"],[["helper",["t"],["labels.address"],null],"address",3,"col-xs-12 col-sm-6"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-input"],null,[["label","property","class"],[["get",["address4Label"]],"address4","col-xs-12 col-sm-6"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-input"],null,[["label","property","class"],[["get",["address3Label"]],"address3","col-xs-12 col-sm-6"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-input"],null,[["label","property","class"],[["get",["address2Label"]],"address2","col-xs-12 col-sm-6"]]],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["em-text"],null,[["label","property","rows","class"],[["get",["address1Label"]],"address",3,"col-xs-12 col-sm-6"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["address1Include"]]],null,30],["block",["if"],[["get",["address2Include"]]],null,29],["block",["if"],[["get",["address3Include"]]],null,28],["block",["if"],[["get",["address4Include"]]],null,27]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-heading"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"showAddContact"],[["bubbles","on"],[false,"click"]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["patients.buttons.addContact"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["t"],["messages.noHistoryAvailable"],null],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","h5",[]],["static-attr","class","ph-note-heading"],["flush-element"],["append",["helper",["date-format"],[["get",["medication","prescriptionDate"]]],null],false],["text",": "],["append",["unknown",["medication","medicationName"]],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["helper",["eq"],[["get",["medication","status"]],"Fulfilled"],null]],null,34]],"locals":["medication"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","ph-note-item"],["flush-element"],["text","\\n "],["open-element","h5",[]],["static-attr","class","ph-note-heading"],["flush-element"],["append",["helper",["t"],["labels.medication"],null],false],["close-element"],["text","\\n"],["block",["each"],[["get",["visit","medication"]]],null,35],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","h5",[]],["static-attr","class","ph-note-heading"],["flush-element"],["append",["helper",["date-format"],[["get",["lab","labDate"]]],null],false],["text",": "],["append",["unknown",["lab","labType","name"]],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["helper",["eq"],[["get",["lab","status"]],"Completed"],null]],null,37]],"locals":["lab"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","ph-note-item"],["flush-element"],["text","\\n "],["open-element","h5",[]],["static-attr","class","ph-note-heading"],["flush-element"],["append",["helper",["t"],["labels.labOrders"],null],false],["close-element"],["text","\\n"],["block",["each"],[["get",["visit","labs"]]],null,38],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","h5",[]],["static-attr","class","ph-note-heading"],["flush-element"],["append",["helper",["date-format"],[["get",["imaging","imagingDate"]]],null],false],["text",": "],["append",["unknown",["imaging","imagingType","name"]],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["helper",["eq"],[["get",["imaging","status"]],"Completed"],null]],null,40]],"locals":["imaging"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","ph-note-item"],["flush-element"],["text","\\n "],["open-element","h5",[]],["static-attr","class","ph-note-heading"],["flush-element"],["append",["helper",["t"],["labels.imageOrders"],null],false],["close-element"],["text","\\n"],["block",["each"],[["get",["visit","imaging"]]],null,41],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","clickable"],["modifier",["action"],[["get",[null]],"editProcedure",["get",["procedure"]]]],["flush-element"],["text","\\n "],["open-element","h5",[]],["static-attr","class","ph-note-heading"],["flush-element"],["text","\\n "],["append",["helper",["date-format"],[["get",["procedure","procedureDate"]]],null],false],["text",":\\n "],["append",["unknown",["procedure","description"]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["procedure"]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","ph-note-item"],["flush-element"],["text","\\n "],["open-element","h5",[]],["static-attr","class","ph-note-heading"],["flush-element"],["append",["helper",["t"],["labels.procedures"],null],false],["close-element"],["text","\\n"],["block",["each"],[["get",["visit","procedures"]]],null,43],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","patient-history-item"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","patient-history-heading clickable"],["modifier",["action"],[["get",[null]],"editVisit",["get",["visit"]]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","ph-visit-date"],["flush-element"],["append",["unknown",["visit","visitDate"]],false],["close-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","ph-visit-type"],["flush-element"],["append",["unknown",["visit","visitType"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["visit","procedures"]]],null,44],["block",["if"],[["get",["visit","hasCompletedImaging"]]],null,42],["block",["if"],[["get",["visit","hasCompletedLabs"]]],null,39],["block",["if"],[["get",["visit","hasCompletedMedication"]]],null,36],["text","\\n "],["close-element"],["text","\\n"]],"locals":["visit"]},{"statements":[["block",["each"],[["get",["model","visits"]]],null,45]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel-heading clearfix"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-primary align-right"],["modifier",["action"],[["get",[null]],"showAddPatientNote"],[["bubbles","on"],[false,"click"]]],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","class","octicon octicon-plus"],["flush-element"],["close-element"],["append",["helper",["t"],["buttons.newNote"],null],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","role","tabpanel"],["static-attr","class","tab-pane active"],["static-attr","id","history"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel detail-section"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddNote"]]],null,47],["text"," "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n"],["block",["if"],[["get",["model","visits"]]],null,46,33],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","li",[]],["static-attr","role","presentation"],["flush-element"],["open-element","a",[]],["static-attr","href","#social"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","social-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.socialWork"],null],false],["close-element"],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["patient-summary"],null,[["patient","patientProcedures","disablePatientLink","store","allowAddAllergy","allowAddDiagnosis","allowAddOperativePlan","diagnosisList"],[["get",["model"]],["get",["patientProcedures"]],true,["get",["store"]],true,true,true,["get",["diagnosisList"]]]]],false],["text","\\n "],["open-element","ul",[]],["static-attr","class","nav nav-pills tab-nav"],["static-attr","role","tablist"],["flush-element"],["text","\\n "],["open-element","li",[]],["static-attr","role","presentation"],["static-attr","class","active"],["flush-element"],["open-element","a",[]],["static-attr","href","#history"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","history-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.history"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","li",[]],["static-attr","role","presentation"],["flush-element"],["open-element","a",[]],["static-attr","href","#general"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","general-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.general"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","li",[]],["static-attr","role","presentation"],["flush-element"],["open-element","a",[]],["static-attr","href","#photos"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","photos-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.photos"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","li",[]],["static-attr","role","presentation"],["flush-element"],["open-element","a",[]],["static-attr","href","#appointments"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","appointments-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.appointments"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","li",[]],["static-attr","role","presentation"],["flush-element"],["open-element","a",[]],["static-attr","href","#visits"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","visits-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.visits"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","li",[]],["static-attr","role","presentation"],["flush-element"],["open-element","a",[]],["static-attr","href","#medication"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","medication-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.medication"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","li",[]],["static-attr","role","presentation"],["flush-element"],["open-element","a",[]],["static-attr","href","#imaging"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","imaging-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.imaging"],null],false],["close-element"],["close-element"],["text","\\n "],["open-element","li",[]],["static-attr","role","presentation"],["flush-element"],["open-element","a",[]],["static-attr","href","#labs"],["static-attr","role","tab"],["static-attr","data-toggle","pill"],["static-attr","data-test-selector","labs-tab"],["flush-element"],["append",["helper",["t"],["patients.navigation.labs"],null],false],["close-element"],["close-element"],["text","\\n"],["block",["if"],[["get",["canAddSocialWork"]]],null,49],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["unless"],[["get",["isNewOrDeleted"]]],null,50],["text"," "],["open-element","div",[]],["static-attr","class","tab-content"],["flush-element"],["text","\\n"],["block",["unless"],[["get",["isNewOrDeleted"]]],null,48],["text"," "],["open-element","div",[]],["static-attr","role","tabpanel"],["dynamic-attr","class",["concat",["tab-pane ",["helper",["if"],[["get",["isNewOrDeleted"]],"active"],null]]]],["static-attr","id","general"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel detail-section"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","col-xs-12 col-sm-6"],["flush-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["firstName",["helper",["t"],["patients.labels.firstName"],null],"form-input-group required test-first-name"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["middleName",["helper",["t"],["patients.labels.middleName"],null],"form-input-group test-middle-name"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["lastName",["helper",["t"],["patients.labels.lastName"],null],"form-input-group required test-last-name"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","class","list","selection"],["sex",["helper",["t"],["patients.labels.sex"],null],"form-input-group",["get",["sexList"]],["get",["model","sex"]]]]],false],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class","maxDate"],["dateOfBirth",["helper",["t"],["patients.labels.dateOfBirth"],null],"form-input-group ","now"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","form-input-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["append",["helper",["t"],["labels.age"],null],false],["close-element"],["text","\\n "],["open-element","p",[]],["static-attr","class","form-control-static"],["flush-element"],["append",["unknown",["model","age"]],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["placeOfBirth",["helper",["t"],["patients.labels.placeOfBirth"],null],"form-input-group"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["occupation",["helper",["t"],["patients.labels.occupation"],null],"form-input-group"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","form-input-group"],["flush-element"],["text","\\n "],["open-element","label",[]],["flush-element"],["append",["helper",["t"],["patients.labels.patientType"],null],false],["close-element"],["text","\\n "],["open-element","div",[]],["flush-element"],["text","\\n "],["append",["helper",["ext-radio"],null,[["content","value","showInline"],[["get",["patientTypes"]],["get",["model","patientType"]],true]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","col-xs-12 col-sm-6"],["flush-element"],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","class"],["status",["helper",["t"],["patients.labels.status"],null],["get",["statusList"]],["get",["model","status"]],"form-input-group"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["externalPatientId",["helper",["t"],["patients.labels.externalPatientId"],null],"form-input-group"]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["prompt","label","property","content","class"],[" ",["helper",["t"],["patients.labels.bloodType"],null],"bloodType",["get",["bloodTypes"]],"form-input-group"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","class"],["clinic",["helper",["t"],["patients.labels.clinic"],null],["get",["clinicList"]],["get",["model","clinic"]],"form-input-group"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["referredBy",["helper",["t"],["patients.labels.referredBy"],null],"form-input-group"]]],false],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["referredDate",["helper",["t"],["patients.labels.referredDate"],null],"form-input-group"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["religion",["helper",["t"],["patients.labels.religion"],null],"form-input-group"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["parent",["helper",["t"],["patients.labels.parent"],null],"form-input-group"]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["label","property","content","optionValuePath","optionLabelPath","prompt","class"],[["helper",["t"],["billing.labels.paymentProfile"],null],"paymentProfile",["get",["pricingProfiles"]],"selectObject","selectObject.name"," ","form-input-group"]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel detail-section"],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAddContact"]]],null,32],["text"," "],["open-element","div",[]],["static-attr","class","panel-body detail-section-content"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["phone",["helper",["t"],["patients.labels.phone"],null],"col-xs-12 col-sm-6"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","type","label","class"],["email","email",["helper",["t"],["labels.email"],null],"col-xs-12 col-sm-6"]]],false],["text","\\n"],["block",["if"],[["get",["haveAddressOptions"]]],null,31,26],["text"," "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","className"],["country",["helper",["t"],["labels.country"],null],["get",["countryList"]],["get",["model","country"]],"col-xs-12 col-sm-6"]]],false],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["haveAdditionalContacts"]]],null,25],["text"," "],["close-element"],["text","\\n "],["append",["helper",["custom-form-manager"],null,[["model","formType"],[["get",["model"]],"patient"]]],false],["text","\\n "],["close-element"],["text","\\n"],["block",["unless"],[["get",["isNewOrDeleted"]]],null,21],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton","bubbles"],[["get",["model"]],false,false]],51]],"locals":[]}],"hasPartials":true}', +meta:{moduleName:"hospitalrun/patients/edit/template.hbs"}})}),define("hospitalrun/patients/imaging/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"b0VbAwnT",block:'{"statements":[["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.dateRequested"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.imagingType"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.status"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.dateProcessed"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.result"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.notes"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["patientImaging"]]],null,3],["close-element"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteImaging",["get",["imaging"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["labels.delete"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editImaging",["get",["imaging"]]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canAddImaging"]]],null,1],["block",["if"],[["get",["canDeleteImaging"]]],null,0]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["modifier",["action"],[["get",[null]],"editImaging",["get",["imaging"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["imaging","requestedDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["imaging","imagingType","name"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["imaging","status"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["imaging","imagingDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["imaging","result"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["imaging","notes"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["imaging","requestedBy"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["imaging","canEdit"]]],null,2],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["imaging"]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/imaging/template.hbs"}})}),define("hospitalrun/patients/index/controller",["exports","hospitalrun/controllers/abstract-paged-controller","hospitalrun/mixins/patient-visits","hospitalrun/utils/visit-statuses"],function(e,t,n,a){e.default=t.default.extend(n.default,{addPermission:"add_patient",deletePermission:"delete_patient",canAdmitPatient:function(){return this.currentUserCan("admit_patient")}.property(),canDischargePatient:function(){return this.currentUserCan("discharge_patient")}.property(),startKey:[],actions:{checkInPatient:function(e){this.send("createNewVisit",e)},checkoutPatient:function(e){this.editPatientVisitWithStatus(e,a.default.CHECKED_IN)},dischargePatient:function(e){this.editPatientVisitWithStatus(e,a.default.ADMITTED)}},editPatientVisitWithStatus:function(e,t){var n=this;this.getPatientVisits(e).then(function(e){var a=e.findBy("status",t);a&&(a.set("endDate",new Date),n.transitionToRoute("visits.edit",a))})}})}),define("hospitalrun/patients/index/route",["exports","hospitalrun/routes/abstract-index-route","ember","ember-i18n","hospitalrun/mixins/user-session"],function(e,t,n,a,l){var s=n.default.computed;e.default=t.default.extend(l.default,{modelName:"patient",newButtonAction:s(function(){return this.currentUserCan("add_patient")?"newItem":null}),newButtonText:(0,a.translationMacro)("patients.buttons.newPatient"),pageTitle:(0,a.translationMacro)("patients.titles.patientListing"),_getStartKeyFromItem:function(e){var t=e.get("displayPatientId"),n=this._getPouchIdFromItem(e);return[t,n]},_modelQueryParams:function(){return{mapReduce:"patient_by_display_id"}}})});define("hospitalrun/patients/index/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"XNP6TQZC",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],21]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","a",[]],["static-attr","href","#"],["modifier",["action"],[["get",[null]],"newItem"]],["flush-element"],["append",["helper",["t"],["patients.messages.createNewPatient"],null],false],["close-element"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-info"],["static-attr","data-test-selector","no-patients-found"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["append",["helper",["t"],["patients.messages.noPatientsFound"],null],false],["block",["if"],[["get",["canAdd"]]],null,0],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"deleteItem",["get",["patient"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["buttons.delete"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default success admit"],["modifier",["action"],[["get",[null]],"checkInPatient",["get",["patient"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-log-in"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["visits.buttons.checkIn"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canAdmitPatient"]]],null,3]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default info"],["modifier",["action"],[["get",[null]],"checkoutPatient",["get",["patient"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-log-out"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["visits.buttons.checkOut"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canDischargePatient"]]],null,5]],"locals":[]},{"statements":[["block",["if"],[["get",["patient","checkedIn"]]],null,6,4]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default info"],["modifier",["action"],[["get",[null]],"dischargePatient",["get",["patient"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","glyphicon glyphicon-log-out"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["visits.buttons.discharge"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canDischargePatient"]]],null,8]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editItem",["get",["patient"]]],[["bubbles"],[false]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["canAdd"]]],null,10],["block",["if"],[["get",["patient","admitted"]]],null,9,7],["block",["if"],[["get",["canDelete"]]],null,2],["text"," "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["static-attr","class","clickable"],["modifier",["action"],[["get",[null]],"editItem",["get",["patient"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["patient","displayPatientId"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["patient","firstName"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["patient","lastName"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["patient","sex"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["patient","dateOfBirth"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["patient","status"]],false],["close-element"],["text","\\n"],["block",["if"],[["get",["showActions"]]],null,11],["text"," "],["close-element"],["text","\\n"]],"locals":["patient"]},{"statements":[["text"," "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.status"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["patients.labels.dob"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["patients.labels.sex"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["patients.labels.lastName"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["patients.labels.firstName"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.id"],null],false]],"locals":[]},{"statements":[["text"," "],["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","thead",[]],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["id",["get",["sortDesc"]],["get",["sortKey"]]]],19],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["firstName",["get",["sortDesc"]],["get",["sortKey"]]]],18],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["lastName",["get",["sortDesc"]],["get",["sortKey"]]]],17],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["sex",["get",["sortDesc"]],["get",["sortKey"]]]],16],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["dateOfBirth",["get",["sortDesc"]],["get",["sortKey"]]]],15],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["status",["get",["sortDesc"]],["get",["sortKey"]]]],14],["text","\\n"],["block",["if"],[["get",["showActions"]]],null,13],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","tbody",[]],["flush-element"],["text","\\n"],["block",["each"],[["get",["model"]]],null,12],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["hasRecords"]]],null,20,1]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/index/template.hbs"}})});define("hospitalrun/patients/labs/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"NZjGsEXR",block:'{"statements":[["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.dateRequested"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labs.labels.labType"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.status"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["patients.labels.dateProcessed"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.result"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.notes"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["patientLabs"]]],null,3],["close-element"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteLab",["get",["lab"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["text"," "],["append",["helper",["t"],["labels.delete"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editLab",["get",["lab"]]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canAddLab"]]],null,1],["block",["if"],[["get",["canDeleteLab"]]],null,0]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["modifier",["action"],[["get",[null]],"editLab",["get",["lab"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["lab","requestedDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["lab","labType","name"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["lab","status"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["lab","labDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["lab","result"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["lab","notes"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["lab","requestedBy"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["lab","canEdit"]]],null,2],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["lab"]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/labs/template.hbs"}})}),define("hospitalrun/patients/medication/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"s3chlZL2",block:'{"statements":[["open-element","table",[]],["static-attr","class","table"],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.date"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.name"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.status"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.prescription"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.requestedBy"],null],false],["close-element"],["text","\\n "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["patientMedications"]]],null,3],["close-element"],["text","\\n"]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default warning"],["modifier",["action"],[["get",[null]],"showDeleteMedication",["get",["medication"]]],[["bubbles"],[false]]],["flush-element"],["open-element","span",[]],["static-attr","class","octicon octicon-x"],["flush-element"],["close-element"],["append",["helper",["t"],["labels.delete"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","button",[]],["static-attr","type","button"],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"editMedication",["get",["medication"]]]],["flush-element"],["append",["helper",["t"],["labels.edit"],null],false],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canAddMedication"]]],null,1],["block",["if"],[["get",["canDeleteMedication"]]],null,0]],"locals":[]},{"statements":[["text"," "],["open-element","tr",[]],["modifier",["action"],[["get",[null]],"editMedication",["get",["medication"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["helper",["date-format"],[["get",["medication","prescriptionDate"]]],null],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medication","medicationName"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medication","status"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medication","prescription"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["append",["unknown",["medication","requestedBy"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["flush-element"],["text","\\n"],["block",["if"],[["get",["medication","canEdit"]]],null,2],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["medication"]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/medication/template.hbs"}})}),define("hospitalrun/patients/notes/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/mixins/is-update-disabled","moment","hospitalrun/mixins/patient-submodule","hospitalrun/mixins/patient-notes","hospitalrun/mixins/user-session"],function(e,t,n,a,l,s,i,o){e.default=t.default.extend(a.default,o.default,s.default,i.default,{cancelAction:"closeModal",updateAction:"updateNote",moduleController:n.default.inject.controller("patients"),physicianList:n.default.computed.alias("moduleController.physicianList"),lookupListsToUpdate:[{name:"physicianList",property:"model.attribution",id:"physician_list"}],title:function(){return this.get("model.isNew")?this.get("i18n").t("patients.notes.newNote")+" "+this.get("model.patient.displayName"):this.get("i18n").t("patients.notes.newNote")+" "+(0,l.default)(this.get("model.date")).format("MM/DD/YYYY")+" for "+this.get("model.patient.displayName")}.property("model.patient.displayName"),updateCapability:"add_note",beforeUpdate:function(){return this.set("model.date",new Date),this.set("model.createdBy",this.getUserName()),n.default.RSVP.Promise.resolve()},afterUpdate:function(){this.send(this.get("updateAction"),this.get("model")),this.send(this.get("cancelAction"))},actions:{changeVisit:function(){var e=$('select[name="note-visits"]').get(0),t=e.selectedIndex,n=this.get("patientVisitsForSelect"),a=t-1,l=n[a].selectObject;this.get("model").set("visit",l),this._setNoteType()}}})}),define("hospitalrun/patients/notes/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"lvlxvqfb",block:'{"statements":[["block",["modal-dialog"],null,[["hideCancelButton","hideUpdateButton","isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["hideCancelButton"]],["get",["hideUpdateButton"]],["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],2]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","option",[]],["dynamic-attr","value",["concat",[["unknown",["item","selectObject"]]]]],["dynamic-attr","selected",["helper",["is-equal"],[["get",["item","selectObject"]],["get",["model","visit"]]],null],null],["flush-element"],["text","\\n "],["append",["unknown",["item","selectObject","visitDescription"]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":["item"]},{"statements":[["text"," "],["append",["helper",["em-text"],null,[["label","property","rows","class"],[["helper",["t"],["labels.note"],null],"content",3,"test-note-content required form-input-group"]]],false],["text","\\n\\n "],["open-element","select",[]],["static-attr","name","note-visits"],["static-attr","class","form-control"],["modifier",["action"],[["get",[null]],"changeVisit"],[["on"],["change"]]],["flush-element"],["text","\\n "],["open-element","option",[]],["dynamic-attr","selected",["helper",["is-not"],[["get",["model","visit"]]],null],null],["flush-element"],["text","\\n "],["append",["helper",["t"],["patients.notes.pleaseSelectAVisit"],null],false],["text","\\n "],["close-element"],["text","\\n"],["block",["each"],[["get",["patientVisitsForSelect"]]],null,0],["text"," "],["close-element"],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","className"],["attribution",["helper",["t"],["patients.notes.onBehalfOfLabel"],null],["get",["physicianList"]],["get",["attribution"]],"form-input-group test-note-attribution"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],1]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/notes/template.hbs"}})}),define("hospitalrun/patients/operation-report/controller",["exports","ember","hospitalrun/patients/operative-plan/controller"],function(e,t,n){var a=t.default.computed.alias,l=t.default.get;e.default=n.default.extend({additionalButtons:null,lookupListsToUpdate:[{name:"physicianList",property:"model.assistant",id:"physician_list"},{name:"physicianList",property:"model.surgeon",id:"physician_list"},{name:"procedureList",property:"modelProcedures",id:"procedure_list"}],updateCapability:"add_operation_report",diagnosisList:a("patientController.diagnosisList"),_finishAfterUpdate:function(){var e=l(this,"i18n"),t=e.t("operationReport.messages.reportSaved"),n=e.t("operationReport.titles.reportSaved");this.displayAlert(n,t)},actions:{addDiagnosis:function(e){this.addDiagnosisToModelAndPatient(e)}}})}),define("hospitalrun/patients/operation-report/route",["exports","hospitalrun/routes/abstract-edit-route","ember","ember-i18n"],function(e,t,n,a){e.default=t.default.extend({customForms:n.default.inject.service(),editTitle:(0,a.translationMacro)("operationReport.titles.editTitle"),modelName:"operation-report",newTitle:(0,a.translationMacro)("operationReport.titles.newTitle"),getNewData:function(){var e=this.get("customForms"),t={customForms:n.default.Object.create()};return e.setDefaultCustomForms(["operativePlan"],t)}})}),define("hospitalrun/patients/operation-report/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"QUbhR2Eo",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["patient-summary"],null,[["allowAddDiagnosis","diagnosisContainer","diagnosisList","disablePatientLink","patient"],[true,["get",["model"]],["get",["diagnosisList"]],true,["get",["model","patient"]]]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","patient-summary"],["flush-element"],["text","\\n "],["append",["helper",["patient-diagnosis"],null,[["diagnosisContainer","diagnosisProperty","primaryDiagnosisLabel","secondaryDiagnosisLabel"],[["get",["model"]],"preOpDiagnoses",["helper",["t"],["operationReport.labels.preOpPrimaryDiagnosis"],null],["helper",["t"],["operationReport.labels.preOpSecondaryDiagnosis"],null]]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-text"],null,[["property","label","class"],["operationDescription",["helper",["t"],["operationReport.labels.operationDescription"],null],"operation-description"]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["surgeryDate",["helper",["t"],["operationReport.labels.surgeryDate"],null],"form-input-group col-sm-4 surgery-date"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["className","property","label","list","selection","class"],["col-sm-3","surgeon",["helper",["t"],["operationReport.labels.surgeon"],null],["get",["physicianList"]],["get",["model","surgeon"]],"operation-surgeon"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["className","property","label","list","selection","class"],["col-sm-3","assistant",["helper",["t"],["operationReport.labels.assistant"],null],["get",["physicianList"]],["get",["model","assistant"]],"operation-assistant"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["caseComplexity",["helper",["t"],["operationReport.labels.caseComplexity"],null],"col-sm-2 case-complexity"]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["operative-procedures"],null,[["model","procedureList"],[["get",["model"]],["get",["procedureList"]]]]],false],["text","\\n "],["append",["helper",["em-text"],null,[["property","label"],["additionalNotes",["helper",["t"],["operationReport.labels.additionalNotes"],null]]]],false],["text","\\n "],["append",["helper",["custom-form-manager"],null,[["model","formType"],[["get",["model"]],"operativePlan"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/operation-report/template.hbs"}})}),define("hospitalrun/patients/operative-plan/controller",["exports","hospitalrun/controllers/abstract-edit-controller","ember","hospitalrun/components/operative-procedures","hospitalrun/mixins/operative-plan-statuses","hospitalrun/mixins/patient-submodule"],function(e,t,n,a,l,s){var i=n.default.computed,o=n.default.computed.alias,r=n.default.get,d=n.default.inject,c=n.default.RSVP,u=n.default.set,p=["additionalNotes","caseComplexity","customForms","patient","procedures","operationDescription","surgeon","surgeryDate"];e.default=t.default.extend(l.default,s.default,{completedPlan:!1,lookupListsToUpdate:[{name:"physicianList",property:"model.surgeon",id:"physician_list"},{name:"procedureList",property:"modelProcedures",id:"procedure_list"}],newPlan:!1,updateCapability:"add_operative_plan",patientsController:d.controller("patients"),physicianList:o("patientsController.physicianList"),procedureList:o("patientsController.procedureList"),additionalButtons:i("model.{isNew,status}",function(){var e=r(this,"i18n"),t=r(this,"model.isNew"),n=r(this,"model.status");if(!t&&n!==l.COMPLETED_STATUS)return[{class:"btn btn-primary on-white",buttonAction:"completePlan",buttonIcon:"octicon octicon-check",buttonText:e.t("operativePlan.buttons.completePlan")}]}),modelProcedures:i.map("model.procedures",function(e){return r(e,"description")}),afterUpdate:function(){var e=r(this,"newPlan");if(e){var t=r(this,"model.patient");t.save().then(this._finishAfterUpdate.bind(this))}else this._finishAfterUpdate()},beforeUpdate:function(){var e=r(this,"model"),t=r(e,"isNew"),n=r(e,"status");if((0,a.addProcedure)(e),u(this,"newPlan",t),n===l.COMPLETED_STATUS){var s=e.changedAttributes();s.status&&u(this,"completedPlan",!0)}else u(this,"completedPlan",!1);return t?this.saveNewDiagnoses():c.resolve()},_createOperationReport:function(){var e=this,t=r(this,"store"),n=r(this,"model"),a=n.getProperties.apply(n,p),l=r(n,"diagnoses"),s=r(n,"patient");u(a,"operativePlan",n),u(a,"preOpDiagnosis",l),u(a,"returnToPatient",r(s,"id"));var i=t.createRecord("operation-report",a);this.getPatientDiagnoses(s,i),i.save().then(function(t){s.save().then(function(){var n=r(e,"i18n"),a=n.t("operativePlan.messages.planCompleted"),l=n.t("operativePlan.titles.planCompleted");e.displayAlert(l,a,"showOperationReport",t,"ok")})})},_finishAfterUpdate:function(){var e=r(this,"completedPlan");if(e)this._createOperationReport();else{var t=r(this,"i18n"),n=t.t("operativePlan.messages.planSaved"),a=t.t("operativePlan.titles.planSaved");this.displayAlert(a,n)}},actions:{completePlan:function(){var e=r(this,"model");u(e,"status",l.COMPLETED_STATUS),this.send("update")}}})}),define("hospitalrun/patients/operative-plan/route",["exports","hospitalrun/routes/abstract-edit-route","ember","ember-i18n"],function(e,t,n,a){e.default=t.default.extend({customForms:n.default.inject.service(),editTitle:(0,a.translationMacro)("operativePlan.titles.editTitle"), +modelName:"operative-plan",newTitle:(0,a.translationMacro)("operativePlan.titles.newTitle"),getNewData:function(){var e=this.get("customForms"),t={customForms:n.default.Object.create()};return e.setDefaultCustomForms(["operativePlan"],t)},actions:{showOperationReport:function(e){this.transitionTo("patients.operation-report",e)}}})}),define("hospitalrun/patients/operative-plan/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"qKdB5zif",block:'{"statements":[["block",["edit-panel"],null,[["editPanelProps"],[["get",["editPanelProps"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["patient-summary"],null,[["patient","disablePatientLink","diagnosisContainer"],[["get",["model","patient"]],true,["get",["model"]]]]],false],["text","\\n "],["append",["helper",["em-text"],null,[["property","label","class"],["operationDescription",["helper",["t"],["operativePlan.labels.operationDescription"],null],"operation-description"]]],false],["text","\\n "],["append",["helper",["operative-procedures"],null,[["model","procedureList"],[["get",["model"]],["get",["procedureList"]]]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["surgeryDate",["helper",["t"],["operativePlan.labels.surgeryDate"],null],"form-input-group col-sm-4 surgery-date"]]],false],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["className","property","label","list","selection","class"],["col-sm-4","surgeon",["helper",["t"],["operativePlan.labels.surgeon"],null],["get",["physicianList"]],["get",["model","surgeon"]],"plan-surgeon"]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["prompt","label","property","content","class"],[" ",["helper",["t"],["operativePlan.labels.status"],null],"status",["get",["planStatuses"]],"form-input-group col-sm-2 plan-status"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["caseComplexity",["helper",["t"],["operativePlan.labels.caseComplexity"],null],"col-sm-2 case-complexity"]]],false],["text","\\n "],["close-element"],["text","\\n "],["append",["helper",["em-text"],null,[["property","label","class"],["admissionInstructions",["helper",["t"],["operativePlan.labels.admissionInstructions"],null],"admission-instructions"]]],false],["text","\\n "],["append",["helper",["em-text"],null,[["property","label","class"],["additionalNotes",["helper",["t"],["operativePlan.labels.additionalNotes"],null],"additional-notes"]]],false],["text","\\n "],["append",["helper",["custom-form-manager"],null,[["model","formType"],[["get",["model"]],"operativePlan"]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/operative-plan/template.hbs"}})}),define("hospitalrun/patients/outpatient/controller",["exports","ember","hospitalrun/mixins/filter-list","hospitalrun/mixins/modal-helper","hospitalrun/mixins/patient-visits","hospitalrun/utils/select-values","hospitalrun/mixins/user-session","hospitalrun/utils/visit-statuses","hospitalrun/mixins/visit-types"],function(e,t,n,a,l,s,i,o,r){var d=t.default.computed,c=t.default.isEmpty;e.default=t.default.Controller.extend(n.default,a.default,l.default,s.default,i.default,r.default,{addPermission:"add_patient",deletePermission:"delete_patient",filterValue:null,filterBy:null,queryParams:["visitDate","visitLocation"],sortByDesc:null,sortByKey:null,visitLocation:null,visitDate:null,canAddVisit:d(function(){return this.currentUserCan("add_visit")}),hasAppointmentLabels:d(function(){var e=this.get("i18n");return[e.t("visits.labels.haveAppointment"),e.t("visits.labels.noAppointment")]}),doneOrdersValues:d(function(){var e=this.get("i18n");return[e.t("visits.labels.ordersNotDone"),e.t("visits.labels.haveDoneOrders")]}),locationList:t.default.computed.map("patientController.locationList.value",s.default.selectValuesMap).volatile(),patientNames:d.map("model",function(e){return e.get("patient.shortDisplayName")}),patientController:t.default.inject.controller("patients"),sexList:d.alias("patientController.sexList.value"),visitTypesList:d.alias("patientController.visitTypesList"),visitTypesValues:d.map("visitTypes",function(e){return e.value}),checkedInVisits:d.filter("model.@each.status",function(e){return"Admission"!==e.get("visitType")&&e.get("status")===o.default.CHECKED_IN}),filteredVisits:d("checkedInVisits","filterBy","filterValue","visitLocation",function(){var e=this.get("filterBy"),t=this.get("filterValue"),n=this.get("filteredBy"),a=this.get("visitLocation"),l=this.get("checkedInVisits");return c(a)?n.delete("location"):n.set("location",a),this.filterList(l,e,t)}),sortedVisits:d("filteredVisits","sortByKey","sortByDesc",function(){var e=this.get("filteredVisits"),n=this.get("sortByDesc"),a=this.get("sortByKey");return t.default.isEmpty(e)||t.default.isEmpty(a)?e:e=e.toArray().sort(function(e,l){var s=e.get(a),i=l.get(a);return"orderType"===a&&(s=s.toString(),i=i.toString()),n?t.default.compare(i,s):t.default.compare(s,i)})}),startKey:[],actions:{checkOut:function(e){var t=this.get("i18n"),n={patientName:e.get("patient.displayName")},a=t.t("visits.messages.checkOut",n);this.displayConfirm(t.t("visits.titles.checkOut"),a,"finishCheckOut",e)},editVisit:function(e){this.get("canAddVisit")&&(e.set("returnTo","patients.outpatient"),this.transitionToRoute("visits.edit",e))},filter:function(e,t){this.set("filterBy",e),this.set("filterValue",t)},finishCheckOut:function(e){this.checkoutVisit(e,o.default.CHECKED_OUT)},search:function(){var e=this.get("model.selectedVisitDate"),t=this.get("model.selectedLocation");c(e)||this.set("visitDate",e.getTime()),c(t)?this.set("visitLocation",null):this.set("visitLocation",t)},sortByKey:function(e,t){this.setProperties({sortByDesc:t,sortByKey:e})},patientCheckIn:function(){this.transitionToRoute("visits.edit","checkin").then(function(e){var t={outPatient:!0,visitType:null,returnTo:"patients.outpatient"};e.currentModel.setProperties(t)})}}})}),define("hospitalrun/patients/outpatient/route",["exports","hospitalrun/routes/abstract-index-route","hospitalrun/mixins/date-format","ember","moment","ember-i18n"],function(e,t,n,a,l,s){var i=a.default.computed,o=a.default.isEmpty;e.default=t.default.extend(n.default,{database:a.default.inject.service(),modelName:"visit",newButtonAction:"patientCheckIn",newButtonText:(0,s.translationMacro)("patients.buttons.patientCheckIn"),selectedVisitDate:null,showingTodaysPatients:!0,pageTitle:i("showingTodaysPatients","selectedVisitDate",function(){var e=this.get("i18n"),t=this.get("showingTodaysPatients");if(t)return e.t("patients.titles.todaysOutpatients");var n=this._dateFormat(this.get("selectedVisitDate"));return e.t("patients.titles.outpatientsForDate",{visitDate:n})}),queryParams:{visitDate:{refreshModel:!0},visitLocation:{refreshModel:!1}},_getStartKeyFromItem:function(e){var t=e.get("displayPatientId");return[t,"patient_"+e.get("id")]},_modelQueryParams:function(e){var t=this.get("database"),n=t.getMaxPouchId("visit"),a=t.getMinPouchId("visit"),s=e.visitDate;s=o(s)?(0,l.default)():(0,l.default)(parseInt(s)),s.isSame((0,l.default)(),"day")?this.set("showingTodaysPatients",!0):(this.set("showingTodaysPatients",!1),this.set("selectedVisitDate",s.toDate()));var i=s.endOf("day").valueOf(),r=s.startOf("day").valueOf();return{mapReduce:"visit_by_date",options:{endkey:[i,i,n],startkey:[r,null,a]}}},model:function(e){var t=this;return this._super(e).then(function(n){var a=new Date;return o(e.visitDate)||a.setTime(e.visitDate),n.set("selectedVisitDate",a),n.set("display_selectedVisitDate",t._dateFormat(a)),n.set("selectedLocation",e.visitLocation),n})},actions:{finishCheckOut:function(e){this.controller.send("finishCheckOut",e)},patientCheckIn:function(){this.controller.send("patientCheckIn")}}})}),define("hospitalrun/patients/outpatient/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"UnoRIh+j",block:'{"statements":[["block",["item-listing"],null,[["paginationProps"],[["get",["paginationProps"]]]],11]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","tr",[]],["static-attr","class","clickable"],["modifier",["action"],[["get",[null]],"editVisit",["get",["visit"]]]],["flush-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["unknown",["visit","patient","displayPatientId"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["unknown",["visit","patient","shortDisplayName"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["unknown",["visit","patient","sex"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["unknown",["visit","patient","shortAge"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["unknown",["visit","visitType"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["helper",["date-format"],[["get",["visit","startDate"]]],[["format"],["h:mm A"]]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1 text-center"],["flush-element"],["append",["unknown",["visit","hasAppointmentLabel"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["append",["unknown",["visit","examiner"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1 text-center"],["flush-element"],["append",["unknown",["visit","hasDoneOrders"]],false],["close-element"],["text","\\n "],["open-element","td",[]],["static-attr","class","col-xs-1"],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default neutral"],["modifier",["action"],[["get",[null]],"checkOut",["get",["visit"]]],[["bubbles"],[false]]],["flush-element"],["append",["helper",["t"],["visits.buttons.checkOut"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":["visit"]},{"statements":[["text"," "],["append",["helper",["t"],["visits.labels.ordersDone"],null],false],["text","\\n"]],"locals":[]},{"statements":[["append",["helper",["t"],["visits.labels.examiner"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["visits.labels.appointment"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["visits.labels.checkInTime"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["visits.labels.visitType"],null],false]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.age"],null],false]],"locals":[]},{"statements":[["text"," "],["append",["helper",["t"],["patients.labels.sex"],null],false],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["t"],["labels.name"],null],false],["text","\\n"]],"locals":[]},{"statements":[["append",["helper",["t"],["labels.id"],null],false]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","class"],["selectedVisitDate",["helper",["t"],["visits.labels.visitDate"],null],"col-sm-3 outpatient-date"]]],false],["text","\\n "],["append",["helper",["em-select"],null,[["class","property","label","content","prompt"],["col-sm-3 form-input-group outpatient-location","selectedLocation",["helper",["t"],["labels.location"],null],["get",["locationList"]]," "]]],false],["text","\\n "],["open-element","div",[]],["static-attr","class","form-group col-sm-3"],["flush-element"],["text","\\n "],["open-element","label",[]],["static-attr","class","control-label"],["flush-element"],["close-element"],["text","\\n "],["open-element","div",[]],["flush-element"],["text","\\n "],["open-element","button",[]],["static-attr","class","btn btn-default"],["modifier",["action"],[["get",[null]],"search"]],["flush-element"],["append",["helper",["t"],["buttons.search"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","panel panel-info"],["flush-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","panel-body"],["flush-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],10],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","table",[]],["static-attr","class","table outpatient-list"],["flush-element"],["text","\\n "],["open-element","thead",[]],["flush-element"],["text","\\n "],["open-element","tr",[]],["static-attr","class","table-header"],["flush-element"],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["patient.displayPatientId",["get",["sortByDesc"]],["get",["sortByKey"]]]],9],["text","\\n"],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey","filterBy","filteredBy","filterType","filterValues"],["patient.shortDisplayName",["get",["sortByDesc"]],["get",["sortByKey"]],"patient.shortDisplayName",["get",["filteredBy"]],"typeahead",["get",["patientNames"]]]],8],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey","filterBy","filteredBy","filterValues"],["patient.sex",["get",["sortByDesc"]],["get",["sortByKey"]],"patient.sex",["get",["filteredBy"]],["get",["sexList"]]]],7],["text"," "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["patient.dateOfBirth",["get",["sortByDesc"]],["get",["sortByKey"]]]],6],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey","filterBy","filteredBy","filterValues"],["visitType",["get",["sortByDesc"]],["get",["sortByKey"]],"visitType",["get",["filteredBy"]],["get",["visitTypesValues"]]]],5],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["startDate",["get",["sortByDesc"]],["get",["sortByKey"]]]],4],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey","filterBy","filteredBy","filterValues"],["hasAppointmentLabel",["get",["sortByDesc"]],["get",["sortByKey"]],"hasAppointmentLabel",["get",["filteredBy"]],["get",["hasAppointmentLabels"]]]],3],["text","\\n "],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey"],["examiner",["get",["sortByDesc"]],["get",["sortByKey"]]]],2],["text","\\n"],["block",["sortable-column"],null,[["sortBy","sortDesc","sortKey","filterBy","filteredBy","filterValues"],["hasDoneOrders",["get",["sortByDesc"]],["get",["sortByKey"]],"hasDoneOrders",["get",["filteredBy"]],["get",["doneOrdersValues"]]]],1],["text"," "],["open-element","th",[]],["flush-element"],["append",["helper",["t"],["labels.actions"],null],false],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","tbody",[]],["flush-element"],["text","\\n"],["block",["each"],[["get",["sortedVisits"]]],null,0],["text"," "],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/outpatient/template.hbs"}})}),define("hospitalrun/patients/photo/controller",["exports","ember"],function(e,t){e.default=t.default.Controller.extend({patientsEdit:t.default.inject.controller("patients/edit"),title:function(){var e=this.get("model.isNew");return e?this.get("i18n").t("patients.titles.addPhoto"):this.get("i18n").t("patients.titles.editPhoto")}.property("model.isNew"),updateButtonText:function(){var e=this.get("model.isNew");return e?this.get("i18n").t("buttons.add"):this.get("i18n").t("buttons.update")}.property("model.isNew"),updateButtonAction:"update",showUpdateButton:!0,editController:t.default.computed.alias("patientsEdit"),actions:{cancel:function(){this.send("closeModal")},update:function(){var e=this.get("model.caption"),t=this.get("model.isNew"),n=this.get("model.photoFile");t?this.get("editController").send("addPhoto",n,e):this.get("editController").send("updatePhoto",this.get("model"))}}})}),define("hospitalrun/patients/photo/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"c+xb//yl",block:'{"statements":[["block",["modal-dialog"],null,[["hideCancelButton","hideUpdateButton","isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["hideCancelButton"]],["get",["hideUpdateButton"]],["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],3]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","thumbnail"],["flush-element"],["text","\\n "],["open-element","img",[]],["dynamic-attr","alt",["unknown",["model","caption"]],null],["dynamic-attr","src",["unknown",["model","url"]],null],["static-attr","class","img-responsive"],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["append",["helper",["take-photo"],null,[["photoFile"],[["get",["model","photoFile"]]]]],false],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["model","isNew"]]],null,1,0],["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label"],["caption","Caption"]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],2]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/photo/template.hbs"}})}),define("hospitalrun/patients/quick-add/controller",["exports","ember","hospitalrun/controllers/abstract-edit-controller","ember-i18n"],function(e,t,n,a){e.default=n.default.extend({sexList:t.default.computed.alias("model.requestingController.sexList"),title:(0,a.translationMacro)("patients.titles.new"),updateCapability:"add_patient",actions:{cancel:function(){this.send("closeModal")}},afterUpdate:function(e){var t=this.get("model.requestingController");t.send("addedNewPatient",e)}})}),define("hospitalrun/patients/quick-add/template",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"CI80Vogk",block:'{"statements":[["block",["modal-dialog"],null,[["hideCancelButton","isUpdateDisabled","title","updateButtonAction","updateButtonText"],[["get",["hideCancelButton"]],["get",["isUpdateDisabled"]],["get",["title"]],["get",["updateButtonAction"]],["get",["updateButtonText"]]]],1]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["friendlyId","Id","required col-sm-6"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["firstName","First Name","required col-sm-6"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["middleName","Middle Name","col-sm-6"]]],false],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["lastName","Last Name","required col-sm-6"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["select-or-typeahead"],null,[["property","label","list","selection","class"],["sex","Sex",["get",["sexList"]],["get",["model","sex"]],"col-sm-6 form-input-group"]]],false],["text","\\n "],["append",["helper",["date-picker"],null,[["property","label","maxDate","class"],["dateOfBirth","Date of Birth","now","col-sm-6"]]],false],["text","\\n "],["close-element"],["text","\\n "],["open-element","div",[]],["static-attr","class","row"],["flush-element"],["text","\\n "],["append",["helper",["em-input"],null,[["property","label","class"],["phone",["helper",["t"],["patients.labels.phone"],null],"col-xs-12 col-sm-6"]]],false],["text","\\n "],["append",["helper",["em-text"],null,[["label","property","rows","class"],[["helper",["t"],["labels.address"],null],"address",3,"col-xs-12 col-sm-6"]]],false],["text","\\n "],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text"," "],["open-element","div",[]],["static-attr","class","alert alert-warning"],["static-attr","role","alert"],["flush-element"],["text","\\n "],["append",["helper",["t"],["patients.messages.notFoundQuickAdd",["get",["model"]]],null],false],["text","\\n "],["close-element"],["text","\\n"],["block",["em-form"],null,[["model","submitButton"],[["get",["model"]],false]],0]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"hospitalrun/patients/quick-add/template.hbs"}})}),define("hospitalrun/patients/reports/controller",["exports","ember","hospitalrun/controllers/abstract-report-controller","moment","hospitalrun/mixins/patient-diagnosis","hospitalrun/mixins/patient-visits","hospitalrun/utils/select-values","hospitalrun/mixins/visit-types"],function(e,t,n,a,l,s,i,o){e.default=n.default.extend(l.default,s.default,o.default,{patientsController:t.default.inject.controller("patients"),clinicList:t.default.computed.map("patientsController.clinicList.value",i.default.selectValuesMap),diagnosisList:t.default.computed.alias("patientsController.diagnosisList"),physicianList:t.default.computed.map("patientsController.physicianList.value",i.default.selectValuesMap),locationList:t.default.computed.map("patientsController.locationList.value",i.default.selectValuesMap),statusList:t.default.computed.map("patientsController.statusList.value",i.default.selectValuesMap),visitTypesList:t.default.computed.alias("patientsController.visitTypesList"),reportType:"detailedAdmissions",patientDetails:{},admissionReportColumns:t.default.computed(function(){var e=this.get("i18n");return{sex:{label:e.t("labels.sex"),include:!0,property:"sex"},total:{label:e.t("labels.total"),include:!0,property:"total",format:"_numberFormat"}}}),admissionDetailReportColumns:t.default.computed(function(){var e=this.get("i18n");return{id:{label:e.t("labels.id"),include:!0,property:"patientId"},name:{label:e.t("labels.name"),include:!0,property:"patientName"},admissionDate:{label:e.t("patients.labels.admissionDate"),include:!0,property:"admissionDate",format:"_dateTimeFormat"},dischargeDate:{label:e.t("patients.labels.dischargeDate"),include:!1,property:"dischargeDate",format:"_dateTimeFormat"},patientDays:{label:e.t("patients.labels.patientDays"),include:!1,property:"patientDays",format:"_numberFormat"}}}),diagnosticReportColumns:t.default.computed(function(){var e=this.get("i18n");return{type:{label:e.t("labels.type"),include:!0,property:"type"},total:{label:e.t("labels.total"),include:!0,property:"total",format:"_numberFormat"}}}),procedureDetailReportColumns:t.default.computed(function(){var e=this.get("i18n");return{id:{label:e.t("labels.id"),include:!0,property:"patient.displayPatientId"},name:{label:e.t("labels.name"),include:!0,property:"patient.displayName"},procedure:{label:e.t("visits.labels.procedure"),include:!0,property:"procedure"},procedureDate:{label:e.t("visits.labels.procedureDate"),include:!0,property:"procedureDate",format:"_dateTimeFormat"}}}),reportColumns:t.default.computed(function(){var e=this.get("i18n");return{visitDate:{label:e.t("visits.labels.visitDate"),include:!0,property:"visitDate"},visitType:{label:e.t("visits.labels.visitType"),include:!0,property:"visitType"},visitLocation:{label:e.t("labels.location"),include:!1,property:"location"},examiner:{label:e.t("visits.labels.examiner"),include:!0,property:"examiner"},name:{label:e.t("labels.name"),include:!0,property:"patient.displayName"},id:{label:e.t("labels.id"),include:!0,property:"patient.displayPatientId"},sex:{label:e.t("patients.labels.sex"),include:!0,property:"patient.sex"},dateOfBirth:{label:e.t("patients.labels.dateOfBirth"),include:!0,property:"patient.dateOfBirth",format:"_dateFormat"},age:{label:e.t("labels.age"),include:!1,property:"patient.age"},primaryDiagnosis:{label:e.t("patients.labels.primaryDiagnosis"),include:!1,property:"primaryDiagnosis"},secondaryDiagnoses:{label:e.t("patients.labels.secondaryDiagnosis"),include:!1,property:"additionalDiagnoses",format:"_diagnosisListToString"},procedures:{label:e.t("labels.procedures"),include:!1,property:"resolvedProcedures",format:"_procedureListToString"},contacts:{label:e.t("patients.labels.contacts"),include:!1,property:"patient",format:"_contactListToString"},referredBy:{label:e.t("patients.labels.referredBy"),include:!1,property:"patient.referredBy"},referredDate:{label:e.t("patients.labels.referredDate"),include:!1,property:"patient.referredDate",format:"_dateFormat"}}}),statusReportColumns:t.default.computed(function(){var e=this.get("i18n");return{id:{label:e.t("labels.id"),include:!0,property:"patient.displayPatientId"},name:{label:e.t("labels.name"),include:!0,property:"patient.displayName"},status:{label:e.t("labels.status"),include:!0,property:"patient.status"},primaryDiagnosis:{label:e.t("patients.labels.primaryDiagnosis"),include:!0,property:"patient",format:"_formatPrimaryDiagnosis"},secondaryDiagnoses:{label:e.t("patients.labels.secondaryDiagnosis"),include:!0,property:"patient",format:"_formatSecondaryDiagnosis"}}}),reportTypes:t.default.computed(function(){var e=this.get("i18n");return[{name:e.t("patients.titles.admissionsDetail"),value:"detailedAdmissions"},{name:e.t("patients.titles.admissionsSummary"),value:"admissions"},{name:e.t("patients.titles.diagnosticTesting"),value:"diagnostic"},{name:e.t("patients.titles.dischargesDetail"),value:"detailedDischarges"},{name:e.t("patients.titles.dischargesSummary"),value:"discharges"},{name:e.t("patients.titles.proceduresDetail"),value:"detailedProcedures"},{name:e.t("patients.titles.proceduresSummary"),value:"procedures"},{name:e.t("patients.titles.patientStatus"),value:"status"},{name:e.t("patients.titles.totalPatientDays"),value:"patientDays"},{name:e.t("patients.titles.totalPatientDaysDetailed"),value:"detailedPatientDays"},{name:e.t("patients.titles.visit"),value:"visit"}]}),isDischargeReport:function(){var e=this.get("reportType");return e.toLowerCase().indexOf("discharges")>-1}.property("reportType"),isStatusReport:function(){var e=this.get("reportType");return"status"===e}.property("reportType"),isVisitReport:function(){var e=this.get("reportType");return"visit"===e}.property("reportType"),_addContactToList:function(e,n,a,l){var s=[];t.default.isEmpty(n)&&t.default.isEmpty(e)||(t.default.isEmpty(e)||s.push(e),t.default.isEmpty(n)||s.push(n),l.push(a+s.join(", ")))},_addReportRow:function(e,n,a,l){if(t.default.isEmpty(l)&&!t.default.isEmpty(e.patient)){var s=null;s=e.get?e.get("patient.id"):e.patient.get("id"),t.default.isEmpty(s)||(l={action:"viewPatient",model:s})}this._super(e,n,a,l)},_addRowsByType:function(e,t,n,a){var l=this._totalByType(e,t,n);l.forEach(function(e){this._addReportRow(e,!0,a)}.bind(this))},_addPatientProcedureRows:function(e,n){e.forEach(function(e){t.default.isEmpty(e.records)?this._addReportRow({procedure:"Total for "+e.type+": "+e.total},!0,n):e.records.forEach(function(t,a){this._addReportRow({patient:t.get("patient"),procedure:t.get("description"),procedureDate:t.get("procedureDate")},!1,n),a+1===e.records.length&&this._addReportRow({procedure:"Total for "+e.type+": "+e.total},!0,n)}.bind(this))}.bind(this))},_contactListToString:function(e){var n=e.get("additionalContacts"),a=void 0,l=[],s=e.get("email"),i=e.get("phone");return this._addContactToList(i,s,"Primary: ",l),t.default.isEmpty(n)||n.forEach(function(e){a="",t.default.isEmpty(e.name)||t.default.isEmpty(e.relationship)||(t.default.isEmpty(e.name)||(a+=e.name),t.default.isEmpty(e.relationship)||(t.default.isEmpty(a)||(a+=" - "),a+=e.relationship),a+=": "),this._addContactToList(e.phone,e.email,a,l)}.bind(this)),l.join(";\n")},_dateTimeFormat:function(e){return this._dateFormat(e,"l h:mm A")},_diagnosisListToString:function(e){return this._listToString(e,"diagnosis","date")},_findDiagnosticsByDate:function(){var e=this.get("endDate"),n=this.get("startDate"),l={options:{},mapReduce:"imaging_by_status"},s=this.get("maxValue");return new t.default.RSVP.Promise(function(i,o){l.options.startkey=["Completed",null,n.getTime(),null],t.default.isEmpty(e)||(e=(0,a.default)(e).endOf("day").toDate(),l.options.endkey=["Completed",s,e.getTime(),s]),this.store.query("imaging",l).then(function(e){var t={imaging:e};l.mapReduce="lab_by_status",this.store.query("lab",l).then(function(e){t.labs=e,i(t)},o)}.bind(this),o)}.bind(this))},_findPatientsByStatus:function(){var e=this.get("status"),n={options:{key:e},mapReduce:"patient_by_status"};return new t.default.RSVP.Promise(function(e,t){this.store.query("patient",n).then(e,t)}.bind(this))},_findProceduresByDate:function(){var e=this.get("endDate"),n=this.get("startDate"),l={options:{},mapReduce:"procedure_by_date"},s=this.get("maxValue");return new t.default.RSVP.Promise(function(i,o){l.options.startkey=[n.getTime(),null],t.default.isEmpty(e)||(e=(0,a.default)(e).endOf("day").toDate(),l.options.endkey=[e.getTime(),s]),this.store.query("procedure",l).then(i,o)}.bind(this))},_findVisitsByDate:function(){var e=this.get("endDate"),n=this.get("startDate"),l={options:{},mapReduce:"visit_by_date"},s=this.get("isDischargeReport"),i=this.get("maxValue");return s&&(l.mapReduce="visit_by_discharge_date"),new t.default.RSVP.Promise(function(s,o){var r=this.get("isDischargeReport");l.options.startkey=[n.getTime(),null],t.default.isEmpty(e)||(e=(0,a.default)(e).endOf("day").toDate(),r?l.options.endkey=[e.getTime(),i]:l.options.endkey=[e.getTime(),i,i]),this.store.query("visit",l).then(s,o)}.bind(this))},_filterByLike:function(e,n,a){return e.filter(function(e){var n=e.get("field");if(t.default.isEmpty(n))return!1;if(t.default.isArray(n)){var l=n.find(function(e){return this._haveLikeValue(e,a)}.bind(this));return!t.default.isEmpty(l)}return this._haveLikeValue(n,a)})},_filterInPatientVisit:function(e){var n=e.get("outPatient"),a=e.get("status");return!n&&!t.default.isEmpty(a)},_finishVisitReport:function(e){var t=this._totalByType(e,"visitType","total");t.forEach(function(e){"total"===e.type?this._addReportRow({visitDate:"Total visits: "+e.total}):(e.records.forEach(function(e){this._addReportRow(e)}.bind(this)),this._addReportRow({visitDate:"Total for "+e.type+": "+e.total}))}.bind(this)),this._finishReport()},_formatPrimaryDiagnosis:function(e){var t=this.getDiagnoses(e,!0,!1);return this._diagnosisListToString(t)},_formatSecondaryDiagnosis:function(e){var t=this.getDiagnoses(e,!0,!0);return this._diagnosisListToString(t)},_generateAdmissionOrDischargeReport:function(e,n){var a=this,l=!1,s=void 0,i={},o=this.get("i18n").t("patients.labels.sexNotEntered");n.indexOf("detailed")>-1?(l=!0, +s=this.get("admissionDetailReportColumns"),s.patientDays.include=!1,"detailedDischarges"===n?s.dischargeDate.include=!0:s.dischargeDate.include=!1):s=this.get("admissionReportColumns"),e=e.filter(this._filterInPatientVisit),e.forEach(function(e){if(!this.get("isDischargeReport")||!t.default.isEmpty(e.get("endDate"))){var n={patient:e.get("patient"),patientId:e.get("patient.displayPatientId"),patientName:e.get("patient.displayName"),admissionDate:e.get("startDate"),dischargeDate:e.get("endDate")},a=e.get("patient.sex");a||(a=o);var l=i[a];l||(l={count:0,rows:[]},i[a]=l),l.count++,l.rows.push(n)}}.bind(this));var r=0,d=function(e){a._addReportRow(e,!1,s)};for(var c in i)l?(i[c].rows.forEach(d),this._addReportRow({patientId:c+" Total: "+i[c].count},!0,s)):this._addReportRow({sex:c,total:i[c].count},!0,s),r+=i[c].count;this._addReportRow({patientId:"Grand Total: "+r},!0,s),this._finishReport(s)},_generateDiagnosticReport:function(){this._findDiagnosticsByDate().then(function(e){var t=this.get("diagnosticReportColumns");this._addRowsByType(e.imaging,"imagingType.name","Total for imaging: ",t),this._addRowsByType(e.labs,"labType.name","Total for labs: ",t),this._finishReport(t)}.bind(this),function(e){this._notifyReportError("Error in _generateDiagnosticReport: "+e)}.bind(this))},_generatePatientDaysReport:function(e,n){e=e.filter(this._filterInPatientVisit);var l=0===n.indexOf("detailed"),s=this.get("endDate"),i=void 0,o=(0,a.default)(this.get("startDate")).startOf("day");l?(i=this.get("admissionDetailReportColumns"),i.patientDays.include=!0,i.dischargeDate.include=!0):i={total:{label:"Total",include:!0,property:"total",format:"_numberFormat"}},s=t.default.isEmpty(s)?(0,a.default)().endOf("day"):(0,a.default)(s).endOf("day");var r=e.reduce(function(e,n){var r=n.get("endDate"),d=(0,a.default)(n.get("startDate")).startOf("day");r=t.default.isEmpty(r)?(0,a.default)().endOf("day"):(0,a.default)(r).endOf("day"),d.isBefore(o)&&(d=o),r.isAfter(s)&&(r=s);var c=r.diff(d,"days",!0);return l&&this._addReportRow({patient:n.get("patient"),patientId:n.get("patient.displayPatientId"),patientName:n.get("patient.displayName"),admissionDate:n.get("startDate"),dischargeDate:n.get("endDate"),patientDays:c},!1,i),e+=c}.bind(this),0);l?this._addReportRow({patientDays:"Total: "+this._numberFormat(r)},!0,i):this._addReportRow({total:r},!1,i),this._finishReport(i)},_generateProcedureReport:function(e){this._findProceduresByDate().then(function(n){var a=void 0;if(n=n.filter(function(e){var n=e.get("visit");return!t.default.isEmpty(n)&&!t.default.isEmpty(n.get("patient.id"))&&n.get("patient.archived")!==!0}),0===e.indexOf("detailed")){a=this.get("procedureDetailReportColumns"),n.forEach(function(e){e.set("patient",e.get("visit.patient"))});var l=this._totalByType(n,"description","all procedures");this._addPatientProcedureRows(l,a),this._finishReport(a)}else a=this.get("diagnosticReportColumns"),this._addRowsByType(n,"description","Total procedures: ",a),this._finishReport(a)}.bind(this),function(e){this._notifyReportError("Error in _generateProcedureReport: "+e)}.bind(this))},_generateStatusReport:function(){this._findPatientsByStatus().then(function(e){var t=this.get("statusReportColumns"),n=e.sortBy("lastName","firstName");this._getPatientVisits(n).then(function(e){e.forEach(function(e){this._addReportRow({patient:e},!1,t)}.bind(this)),this._finishReport(t)}.bind(this)).catch(function(e){this._notifyReportError("Error in _generateStatusReport: "+e)}.bind(this))}.bind(this)).catch(function(e){this._notifyReportError("Error in _generateStatusReport: "+e)}.bind(this))},_generateVisitReport:function(e){var n=this,a=this.get("reportColumns"),l=this.getProperties("examiner","visitDate","visitType","location","clinic","primaryDiagnosis","secondaryDiagnosis");for(var s in l)if(!t.default.isEmpty(l[s]))switch(s){case"diagnosis":e=this._filterByLike(e,"diagnosisList",l[s]);break;default:e=e.filterBy(s,l[s])}a.procedures.include?!function(){var a={};e.forEach(function(e){a[e.get("id")]=e.get("procedures")}),t.default.RSVP.hash(a).then(function(t){e.forEach(function(e){e.set("resolvedProcedures",t[e.get("id")])}),this._finishVisitReport(e)}.bind(n))}():this._finishVisitReport(e)},_getPatientVisits:function(e){return new t.default.RSVP.Promise(function(n,a){var l={};e.forEach(function(e){l[e.get("id")]=this.getPatientVisits(e)}.bind(this)),t.default.RSVP.hash(l).then(function(t){e.forEach(function(e){e.set("visits",t[e.get("id")])}),n(e)},a)}.bind(this))},_haveLikeValue:function(e,t){return e.toLowerCase().indexOf(t.toLowerCase())>-1},_listToString:function(e,n,a){var l=[];return t.default.isEmpty(e)||(l=e.map(function(e){return t.default.get(e,n)+" ( "+this._dateFormat(t.default.get(e,a))+")"}.bind(this))),l.join(",\n")},_totalByType:function(e,n,a){var l=0,s=[];return e.forEach(function(e){var a=e.get(n),i=void 0;t.default.isEmpty(a)||(i=s.find(function(e){var t=e.type;return t.trim().toLowerCase()===a.toLowerCase()}),t.default.isEmpty(i)&&(i={type:a.trim(),total:0,records:[]},s.push(i)),i.total++,i.records.push(e),l++)}),s=s.sortBy("type"),s.push({type:a,total:l}),s},_procedureListToString:function(e){return this._listToString(e,"description","procedureDate")},_validateDates:function(){var e=void 0,n=this.get("endDate"),a=!0,l=this.get("reportType"),s=this.get("startDate");return"status"===l||(t.default.isEmpty(s)?(e="Please enter a start date.",a=!1):!t.default.isEmpty(n)&&n.getTime()0&&this.set("firstKey",this._getStartKeyFromItem(e.get("firstObject"))),e.get("length")>i){var n=e.popObject();this.set("nextStartKey",this._getStartKeyFromItem(n))}else this.set("nextStartKey");t(e)}.bind(this),a)}.bind(this))},queryParams:{sortDesc:{refreshModel:!0},sortKey:{refreshModel:!0},startKey:{refreshModel:!0}},setupController:function(e,t){var a=this.getProperties("firstKey","nextStartKey");e.setProperties(a);var l={currentScreenTitle:this.get("pageTitle")};this.get("hideNewButton")?l.newButtonAction=null:n.default.isEmpty(this.get("newButtonAction"))||(l.newButtonAction=this.get("newButtonAction")),n.default.isEmpty(this.get("newButtonText"))||(l.newButtonText=this.get("newButtonText")),this.send("setSectionHeader",l),this.closeProgressModal(),this._super(e,t)}})}),define("hospitalrun/routes/abstract-module-route",["exports","ember-simple-auth/mixins/authenticated-route-mixin","ember","hospitalrun/mixins/user-session"],function(e,t,n,a){function l(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0),e.set("searchText",this.get("searchText")),this.controllerFor("navigation").closeProgressModal();var n=this.controllerFor(this.get("moduleName")),l="Search Results for "+a.default.Handlebars.Utils.escapeExpression(this.get("searchText"))+"";n.set("currentScreenTitle",l.htmlSafe())}})}),define("hospitalrun/routes/application",["exports","ember-simple-auth/mixins/application-route-mixin","ember","hospitalrun/mixins/modal-helper","hospitalrun/mixins/setup-user-role","hospitalrun/utils/unauthorized-error"],function(e,t,n,a,l,s){var i=n.default.get,o=n.default.inject,r=n.default.isEmpty,d=n.default.Route,c=n.default.set,u="transitionAfterLogin",p=d.extend(t.default,a.default,l.default,{database:o.service(),config:o.service(),session:o.service(),shouldSetupUserRole:!0,actions:{closeModal:function(){this.disconnectOutlet({parentView:"application",outlet:"modal"})},error:function(e,t){var n=this;e instanceof s.default?!function(){var e=n.get("i18n"),a=e.t("application.messages.sessionExpired"),l=i(n,"session"),s=e.t("application.titles.sessionExpired");if(r(t))n.displayAlert(s,a,"unauthorizeSession");else{var o=l.get("store"),d=l.get("data"),p=void 0;p=t.targetName?t.targetName:t,c(d,u,p),o.persist(d).then(function(){n.displayAlert(s,a,"unauthorizeSession")})}}():this._super(e)},openModal:function(e,t){t&&c(this.controllerFor(e),"model",t),this.renderModal(e)},unauthorizeSession:function(){var e=i(this,"session");i(e,"isAuthenticated")&&e.invalidate()},updateModal:function(e,t){c(this.controllerFor(e),"model",t)}},model:function(e,t){var n=i(this,"session"),a=n&&i(n,"isAuthenticated");return i(this,"config").setup().then(function(e){if("finishgauth"!==t.targetName&&"login"!==t.targetName){if(c(this,"shouldSetupUserRole",!0),a)return i(this,"database").setup(e).catch(function(){n.invalidate()})}else"finishgauth"===t.targetName&&c(this,"shouldSetupUserRole",!1)}.bind(this))},afterModel:function(){c(this.controllerFor("navigation"),"allowSearch",!1),$("#apploading").remove()},renderModal:function(e){this.render(e,{into:"application",outlet:"modal"})},sessionAuthenticated:function(){var e=this;i(this,"shouldSetupUserRole")===!0&&this.setupUserRole();var t=i(this,"session"),n=t.get("data"),a=i(n,u);if(r(a))this._super();else{var l=t.get("store");c(n,"transitionAfterLogin",null),l.persist(n).then(function(){e.transitionTo(a)})}}});e.default=p}),define("hospitalrun/routes/index",["exports","ember-simple-auth/mixins/authenticated-route-mixin","ember"],function(e,t,n){e.default=n.default.Route.extend(t.default,{afterModel:function(){this.controllerFor("navigation").set("allowSearch",!1)}})}),define("hospitalrun/routes/login",["exports","ember","ember-simple-auth/mixins/unauthenticated-route-mixin"],function(e,t,n){e.default=t.default.Route.extend(n.default,{config:t.default.inject.service(),beforeModel:function(e){return this.get("session").get("isAuthenticated")?void this._super(e):this.get("config").useGoogleAuth().then(function(e){e&&window.location.replace("/auth/google")})}})}),define("hospitalrun/serializers/application",["exports","ember-pouch"],function(e,t){e.default=t.Serializer.extend()}),define("hospitalrun/serializers/user",["exports","ember-data"],function(e,t){var n=t.default.JSONSerializer.extend({attrs:{rev:"_rev"},primaryKey:"_id",isNewSerializerAPI:!0,normalizeArrayResponse:function(e,t,n,a,l){var s=n.rows.map(function(e){return e.doc}.bind(this));return this._super(e,t,s,a,l)},normalizeSaveResponse:function(e,t,n){return{data:{id:n.id,type:"user",attrs:{rev:n.rev}}}}});e.default=n}),define("hospitalrun/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/services/config",["exports","ember"],function(e,t){var n=t.default.inject,a=t.default.run;e.default=t.default.Service.extend({configDB:null,database:n.service(),session:n.service(),sessionData:t.default.computed.alias("session.data"),setup:function(){var e=this.replicateConfigDB.bind(this),t=this.loadConfig.bind(this),n=this.createDB();return this.set("configDB",n),this.setCurrentUser(),e(n).then(t)},createDB:function(){return new PouchDB("config")},replicateConfigDB:function(e){var n=new t.default.RSVP.Promise(function(t){var n=document.location.protocol+"//"+document.location.host+"/db/config";e.replicate.from(n).then(t).catch(t)});return n},loadConfig:function(){var e=this.get("configDB"),n={include_docs:!0,keys:["config_consumer_key","config_consumer_secret","config_disable_offline_sync","config_oauth_token","config_token_secret","config_use_google_auth"]};return new t.default.RSVP.Promise(function(t,a){e.allDocs(n,function(e,n){e&&(console.log("Could not get configDB configs:",e),a(e));for(var l={},s=0;s-1){d=n;var u=n.split("/");r=u.pop(),n=u.join("/"),n+="/"}if(d.indexOf(".")===-1)if(e.type){var p=e.type.split("/");d+="."+p.pop()}else d+=".png";this.fileExists(d).then(function(u){if(u&&(d=n+i.getTime()+r),t.default.isEmpty(o)&&s("Local filesystem unavailable, please use Google Chrome browser"),t.default.isEmpty(r)&&!t.default.isEmpty(e.type)){var p=e.type.split("/");p.length>1&&(d+="."+p[1])}o.mkdir(n,!1,function(){o.write(d,{data:e,type:e.type},function(e){c.saveFileLink(d,a),l(e)},function(e){s(e)})},function(e){s(e)})}.bind(this))}.bind(this))},deleteFile:function(e,n){return new t.default.RSVP.Promise(function(t,a){var l=this.get("filer"),s=this.get("config");try{l.rm(e,function(){s.removeFileLink(n),t()},a)}catch(e){a(e)}}.bind(this))},downloadIfNeeded:function(e){var n=t.default.get(e,"fileName");this.fileExists(n).then(function(t){t||this._downloadFileFromServer(e)}.bind(this))},fileExists:function(e){return new t.default.RSVP.Promise(function(t){var n=this.get("filer");n.fs.root.getFile(e,{},function(){t(!0)},function(){t(!1)})}.bind(this))},fileToDataURL:function(e){return new t.default.RSVP.Promise(function(t){var n=new FileReader;n.onloadend=function(e){t(e.target.result)},n.readAsDataURL(e)})},fileToString:function(e){return new t.default.RSVP.Promise(function(t){var n=new FileReader;n.onloadend=function(e){t(e.target.result)},n.readAsText(e)})},isFileSystemEnabled:function(){var e=this.get("filer");return!t.default.isEmpty(e)}.property("filer"),pathToFileSystemURL:function(e){return new t.default.RSVP.Promise(function(t){var n=this.get("filer");n.fs.root.getFile(e,{},function(e){t(e.toURL())},function(){t()})}.bind(this))}})}),define("hospitalrun/services/i18n",["exports","ember-i18n/services/i18n"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/services/keyboard",["exports","ember-keyboard/services/keyboard"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/services/session",["exports","ember-simple-auth/services/session"],function(e,t){e.default=t.default}),define("hospitalrun/services/validations",["exports","ember"],function(e,t){var n=t.default.set;e.default=t.default.Service.extend({init:function(){n(this,"cache",{})}})}),define("hospitalrun/serviceworkers/pouchdb-sync",["exports"],function(e){function t(){if(!d&&r.config_disable_offline_sync!==!0){var e={ajax:{headers:{},timeout:3e4}};r.config_consumer_secret&&r.config_token_secret&&r.config_consumer_key&&r.config_oauth_token&&(e.ajax.headers["x-oauth-consumer-secret"]=r.config_consumer_secret,e.ajax.headers["x-oauth-consumer-key"]=r.config_consumer_key,e.ajax.headers["x-oauth-token-secret"]=r.config_token_secret,e.ajax.headers["x-oauth-token"]=r.config_oauth_token);var t=self.location.protocol+"//"+self.location.host+"/db/main",n=new PouchDB(t,e);d=u.sync(n,{live:!0,retry:!0}).on("change",function(e){logDebug("local sync change",e)}).on("paused",function(){logDebug("local sync paused")}).on("active",function(){logDebug("local sync active")}).on("denied",function(e){logDebug("local sync denied:",e)}).on("complete",function(e){logDebug("local sync complete:",e)}).on("error",function(e){logDebug("local sync error:",e)})}}function n(){return new Promise(function(e,t){r?e():c.allDocs({include_docs:!0}).then(function(t){r={},t.rows.forEach(function(e){r[e.id]=e.doc.value}),e()},t)})}function a(e,a,l,s){return n().then(t).catch(function(e){logDebug("Error setting up remote sync",JSON.stringify(e,null,2))}),logDebug("Looking for couchdb response for:",e.url),new Promise(function(t,n){var r=performance.now();toolbox.networkOnly(e,a,l).then(function(a){if(a){var l=performance.now()-r;t(a),i(l,e.url)}else logDebug("Network first returned no response, get data from local pouch db."),o(s,e,t,n)}).catch(function(a){logDebug("Network first returned err, get data from local pouch db:",a),o(s,e,t,n)})})}function l(e){return new Response(JSON.stringify(e),{status:200,statusText:"OK"})}function s(e){var t={};if(e.indexOf("?")>0)for(var n=e.split("?"),a=decodeURIComponent(n[1]).split("&"),l=0;l()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}}),define("hospitalrun/utils/get-cmd-key",["exports","ember-keyboard/utils/get-cmd-key"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/utils/i18n/compile-template",["exports","ember-i18n/utils/i18n/compile-template"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/utils/i18n/missing-message",["exports","ember-i18n/utils/i18n/missing-message"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/utils/item-condition",["exports","ember"],function(e,t){function n(){var e=arguments.length<=0||void 0===arguments[0]?"B":arguments[0],n=t.default.A(l).findBy("rank",e);return n.value}function a(e){var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1];return e*=t,e>=14?"good":e<7?"bad":"average"}e.rankToMultiplier=n,e.getCondition=a;var l=[{rank:"A",value:.5},{rank:"B",value:1},{rank:"C",value:2}]}),define("hospitalrun/utils/listener-name",["exports","ember-keyboard/utils/listener-name"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("hospitalrun/utils/patient-validation",["exports","ember"],function(e,t){e.default={patientTypeAhead:{acceptance:{accept:!0,if:function(e){if(!e.get("selectPatient"))return!1;if(!e.get("hasDirtyAttributes"))return!1;var n=e.get("patient.displayName"),a=e.get("patientTypeAhead");if(t.default.isEmpty(n)||t.default.isEmpty(a))return!0;var l=a.substr(0,n.length).toLowerCase();return 0!==n.toLowerCase().indexOf(l)},message:"Please select a patient"}}}}),define("hospitalrun/utils/pouch-views",["exports","ember"],function(e,t){function n(e,t){return t.query(e,{limit:0}).catch(function(e){console.log("index error: "+JSON.stringify(e,null,2))})}function a(e,t){var n={_id:"_design/"+e.name,version:e.version,views:{}};return t&&(n._rev=t),n.views[e.name]={map:e.function.toString()},e.sort&&(n.lists={sort:e.sort}),n}function l(e,a,l,s){return a.get("_design/"+e.name).then(function(i){return i.version!==e.version?o(e,a,i._rev,l,s):l?n(e.name,a):t.default.RSVP.resolve()},function(){return o(e,a,null,l,s)})}function s(e,t,n){var a="function(head, req) {function keysEqual(keyA, keyB) {for (var i= 0; i < keyA.length; i++) {if (keyA[i] !== keyB[i]) {return false;}}return true;}";return t&&(a+='function getCompareDate(dateString) {if (!dateString || dateString === "") {return 0;}return new Date(dateString).getTime();}'),a+='function compareStrings(aString, bString) {if (!aString) {aString = "";}if (!bString) {bString = "";}if (aString < bString) {return -1;} else if (aString > bString) {return 1;} else {return 0;}}var row,rows=[],startingPosition = 0;while(row = getRow()) {rows.push(row);}',n&&(a+="rows = rows.filter("+n+");"),a+="rows.sort("+e+');if (req.query.sortDesc) {rows = rows.reverse();}if (req.query.sortStartKey) {var startKey = JSON.parse(req.query.sortStartKey);for (var i=0; i 0) {rows = rows.slice(startingPosition);}send(JSON.stringify({"rows" : rows}));}'}function i(e,t){return"function(doc) {\n var doctype, uidx;\n if (doc._id && (uidx = doc._id.indexOf('_')) > 0 && !doc.data.archived) {\n doctype = doc._id.substring(0, uidx);\n if (doctype === '"+e+"') {\n "+t+"\n }\n }\n }"}function o(e,t,l,s,i){var o=a(e,l);return s&&console.log("WARNING: The view "+e.name+" is out of date. Please update the pouch dump "+i+" to the latest version of "+e.name),t.put(o).then(function(){return n(e.name,t)},function(e){console.log("ERR updating design doc:",JSON.stringify(e,null,2))})}function r(e){return"var "+e+" = doc.data."+e+";\n if ("+e+" && "+e+' !== "") {\n '+e+" = new Date("+e+");\n if ("+e+".getTime) {\n "+e+" = "+e+".getTime();\n }\n }"}var d="if (doc.data.friendlyId) {\n emit([doc.data.friendlyId, doc._id]);\n } else if (doc.data.externalPatientId) {\n emit([doc.data.externalPatientId, doc._id]);\n } else {\n emit([doc._id, doc._id]);\n }",c=s(function(e,t){var n="";switch(req.query&&req.query.sortKey&&(n=req.query.sortKey),n){case"firstName":case"sex":case"lastName":case"status":return compareStrings(e.doc.data[n],t.doc.data[n]);case"dateOfBirth":return getCompareDate(e.doc.data.dateOfBirth)-getCompareDate(t.doc.data.dateOfBirth);default:return 0}}.toString(),!0),u=[{name:"appointments_by_date",function:i("appointment",r("endDate")+"\n "+r("startDate")+"\n emit([startDate, endDate, doc._id]);"),sort:s(function(e,t){function n(e){return e&&""!==e?e:"Scheduled"}var a="";switch(req.query&&req.query.sortKey&&(a=req.query.sortKey),a){case"appointmentType":case"location":case"provider":return compareStrings(e.doc.data[a],t.doc.data[a]);case"date":var l=getCompareDate(e.doc.data.startDate)-getCompareDate(t.doc.data.startDate);return 0===l?getCompareDate(e.doc.data.endDate)-getCompareDate(t.doc.data.endDate):l;case"status":var s=n(e.doc.data[a]),i=n(t.doc.data[a]);return compareStrings(s,i);default:return 0}}.toString(),!0,function(e){var t=null,n=!0;if(req.query&&req.query.filterBy&&(t=JSON.parse(req.query.filterBy)),!t)return!0;for(var a=0;a*{float:left;margin:0 0 0 -1px}.fc .fc-button-group>:first-child{margin-left:0}.fc-popover{position:absolute;box-shadow:0 2px 6px rgba(0,0,0,.15)}.fc-popover .fc-header{padding:2px 4px}.fc-popover .fc-header .fc-title{margin:0 2px}.fc-ltr .fc-popover .fc-header .fc-title,.fc-rtl .fc-popover .fc-header .fc-close{float:left}.fc-ltr .fc-popover .fc-header .fc-close,.fc-rtl .fc-popover .fc-header .fc-title{float:right}.fc-unthemed .fc-popover{border-width:1px;border-style:solid}.fc-unthemed .fc-popover .fc-header .fc-close{font-size:.9em;margin-top:2px}.fc-popover>.ui-widget-header+.ui-widget-content{border-top:0}.fc-divider{border-style:solid;border-width:1px}hr.fc-divider{height:0;margin:0;padding:0 0 2px;border-width:1px 0}.fc-bg table,.fc-row .fc-bgevent-skeleton table,.fc-row .fc-highlight-skeleton table{height:100%}.fc-bg,.fc-bgevent-skeleton,.fc-helper-skeleton,.fc-highlight-skeleton{position:absolute;top:0;left:0;right:0}.fc table{width:100%;box-sizing:border-box;table-layout:fixed;font-size:1em}.fc td,.fc th{border-style:solid;border-width:1px;padding:0;vertical-align:top}.fc td.fc-today{border-style:double}a[data-goto]:hover{text-decoration:underline}.fc .fc-row{border-style:solid;border-width:0}.fc-row table{border-left:0 hidden transparent;border-right:0 hidden transparent;border-bottom:0 hidden transparent}.fc-row:first-child table{border-top:0 hidden transparent}.fc-row{position:relative}.fc-row .fc-bg{z-index:1}.fc-row .fc-bgevent-skeleton td,.fc-row .fc-highlight-skeleton td{border-color:transparent}.fc-row .fc-bgevent-skeleton{z-index:2}.fc-row .fc-highlight-skeleton{z-index:3}.fc-row .fc-content-skeleton{position:relative;z-index:4;padding-bottom:2px}.fc-row .fc-helper-skeleton{z-index:5}.fc-row .fc-content-skeleton td,.fc-row .fc-helper-skeleton td{background:0 0;border-color:transparent;border-bottom:0}.fc-row .fc-content-skeleton tbody td,.fc-row .fc-helper-skeleton tbody td{border-top:0}.fc-scroller{-webkit-overflow-scrolling:touch}.fc-row.fc-rigid,.fc-time-grid-event{overflow:hidden}.fc-scroller>.fc-day-grid,.fc-scroller>.fc-time-grid{position:relative;width:100%}.fc-event{position:relative;display:block;font-size:.85em;line-height:1.3;border-radius:3px;border:1px solid #3a87ad;font-weight:400}.fc-event,.fc-event-dot{background-color:#3a87ad}.fc-event,.fc-event:hover,.ui-widget .fc-event{color:#fff;text-decoration:none}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc-event .fc-bg{z-index:1;background:#fff;opacity:.25}.fc-event .fc-content{position:relative;z-index:2}.fc-event .fc-resizer{position:absolute;z-index:4;display:none}.fc-event.fc-allow-mouse-resize .fc-resizer,.fc-event.fc-selected .fc-resizer{display:block}.fc-event.fc-selected .fc-resizer:before{content:"";position:absolute;z-index:9999;top:50%;left:50%;width:40px;height:40px;margin-left:-20px;margin-top:-20px}.fc-event.fc-selected{z-index:9999!important;box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event.fc-selected.fc-dragging{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-h-event.fc-selected:before{content:"";position:absolute;z-index:3;top:-10px;bottom:-10px;left:0;right:0}.fc-ltr .fc-h-event.fc-not-start,.fc-rtl .fc-h-event.fc-not-end{margin-left:0;border-left-width:0;padding-left:1px;border-top-left-radius:0;border-bottom-left-radius:0}.fc-ltr .fc-h-event.fc-not-end,.fc-rtl .fc-h-event.fc-not-start{margin-right:0;border-right-width:0;padding-right:1px;border-top-right-radius:0;border-bottom-right-radius:0}.fc-ltr .fc-h-event .fc-start-resizer,.fc-rtl .fc-h-event .fc-end-resizer{cursor:w-resize;left:-1px}.fc-ltr .fc-h-event .fc-end-resizer,.fc-rtl .fc-h-event .fc-start-resizer{cursor:e-resize;right:-1px}.fc-h-event.fc-allow-mouse-resize .fc-resizer{width:7px;top:-1px;bottom:-1px}.fc-h-event.fc-selected .fc-resizer{border-radius:4px;border-width:1px;width:6px;height:6px;border-style:solid;border-color:inherit;background:#fff;top:50%;margin-top:-4px}.fc-ltr .fc-h-event.fc-selected .fc-start-resizer,.fc-rtl .fc-h-event.fc-selected .fc-end-resizer{margin-left:-4px}.fc-ltr .fc-h-event.fc-selected .fc-end-resizer,.fc-rtl .fc-h-event.fc-selected .fc-start-resizer{margin-right:-4px}.fc-day-grid-event{margin:1px 2px 0;padding:0 1px}tr:first-child>td>.fc-day-grid-event{margin-top:2px}.fc-day-grid-event.fc-selected:after{content:"";position:absolute;z-index:1;top:-1px;right:-1px;bottom:-1px;left:-1px;background:#000;opacity:.25}.fc-day-grid-event .fc-content{white-space:nowrap;overflow:hidden}.fc-day-grid-event .fc-time{font-weight:700}.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer,.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer{margin-left:-2px}.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer,.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer{margin-right:-2px}a.fc-more{margin:1px 3px;font-size:.85em;cursor:pointer;text-decoration:none}a.fc-more:hover{text-decoration:underline}.fc-limited{display:none}.fc-day-grid .fc-row{z-index:1}.fc-more-popover{z-index:2;width:220px}.fc-more-popover .fc-event-container{padding:10px}.fc-now-indicator{position:absolute;border:0 solid red}.fc-unselectable{user-select:none;-webkit-tap-highlight-color:transparent}.fc-toolbar.fc-header-toolbar{margin-bottom:1em}.fc-toolbar.fc-footer-toolbar{margin-top:1em}.fc-toolbar .fc-left{float:left}.fc-toolbar .fc-right{float:right}.fc-toolbar .fc-center{display:inline-block}.fc .fc-toolbar>*>*{float:left;margin-left:.75em}.fc .fc-toolbar>*>:first-child{margin-left:0}.fc-toolbar h2{margin:0}.fc-toolbar button{position:relative}.fc-toolbar .fc-state-hover,.fc-toolbar .ui-state-hover{z-index:2}.fc-toolbar .fc-state-down{z-index:3}.fc-toolbar .fc-state-active,.fc-toolbar .ui-state-active{z-index:4}.fc-toolbar button:focus{z-index:5}.fc-view-container *,.fc-view-container :after,.fc-view-container :before{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.fc-view,.fc-view>table{position:relative;z-index:1}.fc-basicDay-view .fc-content-skeleton,.fc-basicWeek-view .fc-content-skeleton{padding-bottom:1em}.fc-basic-view .fc-body .fc-row{min-height:4em}.fc-row.fc-rigid .fc-content-skeleton{position:absolute;top:0;left:0;right:0}.fc-day-top.fc-other-month{opacity:.3}.fc-basic-view .fc-day-number,.fc-basic-view .fc-week-number{padding:2px}.fc-basic-view th.fc-day-number,.fc-basic-view th.fc-week-number{padding:0 2px}.fc-ltr .fc-basic-view .fc-day-top .fc-day-number{float:right}.fc-rtl .fc-basic-view .fc-day-top .fc-day-number{float:left}.fc-ltr .fc-basic-view .fc-day-top .fc-week-number{float:left;border-radius:0 0 3px}.fc-rtl .fc-basic-view .fc-day-top .fc-week-number{float:right;border-radius:0 0 0 3px}.fc-basic-view .fc-day-top .fc-week-number{min-width:1.5em;text-align:center;background-color:#f2f2f2;color:grey}.fc-basic-view td.fc-week-number>*{display:inline-block;min-width:1.25em}.fc-agenda-view .fc-day-grid{position:relative;z-index:2}.fc-agenda-view .fc-day-grid .fc-row{min-height:3em}.fc-agenda-view .fc-day-grid .fc-row .fc-content-skeleton{padding-bottom:1em}.fc .fc-axis{vertical-align:middle;padding:0 4px;white-space:nowrap}.fc-ltr .fc-axis{text-align:right}.fc-rtl .fc-axis{text-align:left}.ui-widget td.fc-axis{font-weight:400}.fc-time-grid,.fc-time-grid-container{position:relative;z-index:1}.fc-time-grid{min-height:100%}.fc-time-grid table{border:0 hidden transparent}.fc-time-grid>.fc-bg{z-index:1}.fc-time-grid .fc-slats,.fc-time-grid>hr{position:relative;z-index:2}.fc-time-grid .fc-content-col{position:relative}.fc-time-grid .fc-content-skeleton{position:absolute;z-index:3;top:0;left:0;right:0}.fc-time-grid .fc-business-container{position:relative;z-index:1}.fc-time-grid .fc-bgevent-container{position:relative;z-index:2}.fc-time-grid .fc-highlight-container{z-index:3;position:relative}.fc-time-grid .fc-event-container{position:relative;z-index:4}.fc-time-grid .fc-now-indicator-line{z-index:5}.fc-time-grid .fc-helper-container{position:relative;z-index:6}.fc-time-grid .fc-slats td{height:1.5em;border-bottom:0}.fc-time-grid .fc-slats .fc-minor td{border-top-style:dotted}.fc-time-grid .fc-slats .ui-widget-content{background:0 0}.fc-time-grid .fc-highlight{position:absolute;left:0;right:0}.fc-ltr .fc-time-grid .fc-event-container{margin:0 2.5% 0 2px}.fc-rtl .fc-time-grid .fc-event-container{margin:0 2px 0 2.5%}.fc-time-grid .fc-bgevent,.fc-time-grid .fc-event{position:absolute;z-index:1}.fc-time-grid .fc-bgevent{left:0;right:0}.fc-v-event.fc-not-start{border-top-width:0;padding-top:1px;border-top-left-radius:0;border-top-right-radius:0}.fc-v-event.fc-not-end{border-bottom-width:0;padding-bottom:1px;border-bottom-left-radius:0;border-bottom-right-radius:0}.fc-time-grid-event.fc-selected{overflow:visible}.fc-scroller-clip,.fc-time-grid-event .fc-content,.fc-timeline .fc-cell-content,.fc-timeline-event .fc-content,.pika-label,.pika-next,.pika-prev,tr.fc-collapsed>td,tr.fc-transitioning>td{overflow:hidden}.fc-time-grid-event.fc-selected .fc-bg{display:none}.fc-time-grid-event .fc-time,.fc-time-grid-event .fc-title{padding:0 1px}.fc-time-grid-event .fc-time{font-size:.85em;white-space:nowrap}.fc-time-grid-event.fc-short .fc-content{white-space:nowrap}.fc-time-grid-event.fc-short .fc-time,.fc-time-grid-event.fc-short .fc-title{display:inline-block;vertical-align:top}.fc-list-empty,.fc-timeline th{vertical-align:middle}.fc-time-grid-event.fc-short .fc-time span{display:none}.fc-time-grid-event.fc-short .fc-time:before{content:attr(data-start)}.fc-time-grid-event.fc-short .fc-time:after{content:"\000A0-\000A0"}.fc-time-grid-event.fc-short .fc-title{font-size:.85em;padding:0}.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer{left:0;right:0;bottom:0;height:8px;overflow:hidden;line-height:8px;font-size:11px;font-family:monospace;text-align:center;cursor:s-resize}.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer:after{content:"="}.fc-time-grid-event.fc-selected .fc-resizer{border-radius:5px;border-width:1px;width:8px;height:8px;border-style:solid;border-color:inherit;background:#fff;left:50%;margin-left:-5px;bottom:-5px}.fc-time-grid .fc-now-indicator-line{border-top-width:1px;left:0;right:0}.fc-time-grid .fc-now-indicator-arrow{margin-top:-5px}.fc-ltr .fc-time-grid .fc-now-indicator-arrow{left:0;border-width:5px 0 5px 6px;border-top-color:transparent;border-bottom-color:transparent}.fc-rtl .fc-time-grid .fc-now-indicator-arrow{right:0;border-width:5px 6px 5px 0;border-top-color:transparent;border-bottom-color:transparent}.fc-event-dot{display:inline-block;width:10px;height:10px;border-radius:5px}.fc-rtl .fc-list-view{direction:rtl}.fc-list-view{border-width:1px;border-style:solid}.fc .fc-list-table{table-layout:auto}.fc-list-table td{border-width:1px 0 0;padding:8px 14px}.fc-list-table tr:first-child td{border-top-width:0}.fc-list-heading{border-bottom-width:1px}.fc-list-heading td{font-weight:700}.fc-ltr .fc-list-heading-main{float:left}.fc-ltr .fc-list-heading-alt,.fc-rtl .fc-list-heading-main{float:right}.fc-rtl .fc-list-heading-alt{float:left}.fc-list-item.fc-has-url{cursor:pointer}.fc-list-item:hover td{background-color:#f5f5f5}.fc-list-item-marker,.fc-list-item-time{white-space:nowrap;width:1px}.fc-ltr .fc-list-item-marker{padding-right:0}.fc-rtl .fc-list-item-marker{padding-left:0}.fc-resource-area .fc-cell-content,.fc-timeline .fc-cell-text{padding-left:4px;padding-right:4px}.fc-list-item-title a{text-decoration:none;color:inherit}.fc-list-item-title a[href]:hover{text-decoration:underline}.fc-list-empty-wrap2{position:absolute;top:0;left:0;right:0;bottom:0}.fc-list-empty-wrap1{width:100%;height:100%;display:table}.fc-list-empty{display:table-cell;text-align:center}.fc-unthemed .fc-list-empty{background-color:#eee}/*! + * FullCalendar Scheduler v1.5.0 + * Docs & License: http://fullcalendar.io/scheduler/ + * (c) 2016 Adam Shaw + */.fc-scroller-clip{position:relative}.fc-no-scrollbars{background:rgba(255,255,255,0)}.fc-timeline .fc-body .fc-divider.ui-widget-header,.fc-timeline .fc-body .ui-widget-content{background-image:none}.fc-no-scrollbars::-webkit-scrollbar{width:0;height:0}.fc-scroller-canvas{position:relative;box-sizing:border-box;min-height:100%}.fc-scroller-canvas>.fc-bg{z-index:1}.fc-scroller-canvas>.fc-content{z-index:2;position:relative;border-style:solid;border-width:0}.ui-widget .fc-scroller-canvas>.fc-content{border-color:transparent}.fc-scroller-canvas.fc-gutter-left>.fc-content{border-left-width:1px;margin-left:-1px}.fc-scroller-canvas.fc-gutter-right>.fc-content{border-right-width:1px;margin-right:-1px}.fc-scroller-canvas.fc-gutter-top>.fc-content{border-top-width:1px;margin-top:-1px}.fc-rtl .fc-timeline{direction:rtl}.fc-timeline .fc-divider{width:3px;border-style:double}.fc-timeline .fc-head>tr>.fc-divider{border-bottom:0}.fc-timeline .fc-body>tr>.fc-divider{border-top:0}.fc-scrolled .fc-head .fc-scroller{z-index:2}.fc-timeline.fc-scrolled .fc-head .fc-scroller{box-shadow:0 3px 4px rgba(0,0,0,.075)}.fc-timeline .fc-body .fc-scroller{z-index:1}.fc-timeline .fc-scroller-canvas>div>div>table,.fc-timeline .fc-scroller-canvas>div>table{border-style:hidden}.fc-timeline .fc-scroller-canvas>.fc-content>.fc-rows>table{border-bottom-style:none}.fc-timeline td,.fc-timeline th{white-space:nowrap}.fc-timeline .fc-col-resizer{cursor:col-resize}.fc-timeline .fc-head .fc-cell-content{padding-top:3px;padding-bottom:3px}.fc-resource-area{width:30%}.fc-resource-area col{width:40%;min-width:70px}.fc-resource-area col.fc-main-col{width:60%}.fc-flat .fc-expander-space{display:none}.fc-ltr .fc-resource-area tr>*{text-align:left}.fc-rtl .fc-resource-area tr>*{text-align:right}.fc-resource-area .fc-super th{text-align:center}.fc-resource-area th>div{position:relative}.fc-resource-area th .fc-cell-content{position:relative;z-index:1}.fc-resource-area th .fc-col-resizer,.fc-time-area .fc-bgevent,.fc-time-area .fc-highlight,.fc-time-area .fc-slats{position:absolute;top:0;bottom:0}.fc-resource-area th .fc-col-resizer{z-index:2;width:5px}.fc-ltr .fc-resource-area th .fc-col-resizer{right:-3px}.fc-rtl .fc-resource-area th .fc-col-resizer{left:-3px}tr.fc-transitioning>td>div{transition:margin-top .2s}tr.fc-collapsed>td>div{margin-top:-10px}.fc-body .fc-resource-area .fc-cell-content{padding-top:8px;padding-bottom:8px}.fc-no-overlap .fc-body .fc-resource-area .fc-cell-content{padding-top:5px;padding-bottom:5px}.fc-resource-area .fc-icon{width:1em;font-size:.9em;vertical-align:middle;margin-top:-1%}.fc-resource-area .fc-expander{cursor:pointer;color:#666}.fc-time-area col{min-width:2.2em}.fc-ltr .fc-time-area .fc-chrono th{text-align:left}.fc-rtl .fc-time-area .fc-chrono th{text-align:right}.fc-time-area .fc-slats{z-index:1;left:0;right:0}.fc-time-area .fc-slats table{height:100%}.fc-time-area .fc-slats .fc-minor{border-style:dotted}.fc-time-area .fc-slats td{border-width:0 1px}.fc-ltr .fc-time-area .fc-slats td{border-right-width:0}.fc-rtl .fc-time-area .fc-slats td{border-left-width:0}.fc-time-area .fc-bgevent-container,.fc-time-area .fc-highlight-container{position:absolute;z-index:2;top:0;bottom:0;width:0}.fc-ltr .fc-time-area .fc-bgevent-container,.fc-ltr .fc-time-area .fc-helper-container,.fc-ltr .fc-time-area .fc-highlight-container{left:0}.fc-rtl .fc-time-area .fc-bgevent-container,.fc-rtl .fc-time-area .fc-helper-container,.fc-rtl .fc-time-area .fc-highlight-container{right:0}.fc-time-area .fc-rows{position:relative;z-index:3}.fc-time-area .fc-rows .ui-widget-content{background:0 0}.fc-time-area .fc-rows td>div{position:relative}.fc-time-area .fc-rows .fc-bgevent-container,.fc-time-area .fc-rows .fc-highlight-container{z-index:1}.fc-time-area .fc-event-container{position:relative;z-index:2;width:0}.fc-time-area .fc-helper-container{position:absolute;z-index:3;top:0}.fc-time-area .fc-event-container{padding-bottom:8px;top:-1px}.fc-time-area tr:first-child .fc-event-container{top:0}.fc-no-overlap .fc-time-area .fc-event-container{padding-bottom:0;top:0}.fc-timeline .fc-now-indicator{z-index:3;top:0}.fc-time-area .fc-now-indicator-arrow{margin:0 -6px;border-width:6px 5px 0;border-left-color:transparent;border-right-color:transparent}.fc-time-area .fc-now-indicator-line{margin:0 -1px;bottom:0;border-left-width:1px}.fc-timeline-event{position:absolute;border-radius:0;padding:2px 0;margin-bottom:1px}.fc-no-overlap .fc-timeline-event{padding:5px 0;margin-bottom:0}.fc-ltr .fc-timeline-event{margin-right:1px}.fc-rtl .fc-timeline-event{margin-left:1px}.fc-timeline-event .fc-content{padding:0 1px;white-space:nowrap}.fc-timeline-event .fc-time{font-weight:700;padding:0 1px}.fc-rtl .fc-timeline-event .fc-time{display:inline-block}.fc-timeline-event .fc-title{padding:0 1px}.fc-timeline-event.fc-selected .fc-bg{display:none}.fc-ltr .fc-timeline-event .fc-title{padding-left:10px;margin-left:-8px}.fc-rtl .fc-timeline-event .fc-title{padding-right:10px;margin-right:-8px}.fc-ltr .fc-timeline-event.fc-not-start .fc-title{margin-left:-2px}.fc-rtl .fc-timeline-event.fc-not-start .fc-title{margin-right:-2px}.fc-body .fc-time-area .fc-following,.fc-timeline-event.fc-not-start .fc-title{position:relative}.fc-body .fc-time-area .fc-following:before,.fc-timeline-event.fc-not-start .fc-title:before{content:"";position:absolute;top:50%;margin-top:-5px;border:5px solid #000;border-top-color:transparent;border-bottom-color:transparent;opacity:.5}.fc-ltr .fc-body .fc-time-area .fc-following:before,.fc-ltr .fc-timeline-event.fc-not-start .fc-title:before{border-left:0;left:2px}.fc-rtl .fc-body .fc-time-area .fc-following:before,.fc-rtl .fc-timeline-event.fc-not-start .fc-title:before{border-right:0;right:2px}.fc-license-message{position:absolute;z-index:99999;bottom:1px;left:1px;background:#eee;border-color:#ddd;border-style:solid;border-width:1px 1px 0 0;padding:2px 4px;font-size:12px;border-top-right-radius:3px}/*! + * Pikaday + * Copyright © 2014 David Bushell | BSD & MIT license | http://dbushell.com/ + */.pika-single{z-index:9999;display:block;position:relative;color:#333;background:#fff;border:1px solid #ccc;border-bottom-color:#bbb;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.pika-single:after,.pika-single:before{content:" ";display:table}.pika-single.is-hidden{display:none}.pika-single.is-bound{position:absolute;box-shadow:0 5px 15px -5px rgba(0,0,0,.5)}.pika-lendar{float:left;width:240px;margin:8px}.pika-title{position:relative;text-align:center}.pika-label{display:inline-block;position:relative;z-index:9999;margin:0;padding:5px 3px;font-size:14px;line-height:20px;font-weight:700;background-color:#fff}.pika-title select{cursor:pointer;position:absolute;z-index:9998;margin:0;left:0;top:5px;filter:alpha(opacity=0);opacity:0}.pika-next,.pika-prev{display:block;cursor:pointer;position:relative;outline:0;border:0;padding:0;width:20px;height:30px;color:transparent;white-space:nowrap;background-color:transparent;background-position:center center;background-repeat:no-repeat;background-size:75% 75%;opacity:.5}.pika-next:hover,.pika-prev:hover{opacity:1}.is-rtl .pika-next,.pika-prev{float:left;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==)}.is-rtl .pika-prev,.pika-next{float:right;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=)}.pika-next.is-disabled,.pika-prev.is-disabled{cursor:default;opacity:.2}.pika-select{display:inline-block}.pika-table{width:100%;border:0}.pika-table td,.pika-table th{width:14.285714285714286%;padding:0}.pika-table th{color:#999;font-size:12px;line-height:25px;font-weight:700;text-align:center}.pika-button{cursor:pointer;display:block;box-sizing:border-box;-moz-box-sizing:border-box;outline:0;border:0;margin:0;width:100%;padding:5px;color:#666;font-size:12px;line-height:15px;text-align:right;background:#f5f5f5}.pika-week{font-size:11px;color:#999}.is-today .pika-button{color:#3af;font-weight:700}.is-selected .pika-button{color:#fff;font-weight:700;background:#3af;box-shadow:inset 0 1px 3px #178fe5;border-radius:3px}.is-disabled .pika-button{pointer-events:none;cursor:default;color:#999;opacity:.3}.pika-button:hover{color:#fff!important;background:#ff8000!important;box-shadow:none!important;border-radius:3px!important}.pika-table abbr{border-bottom:none;cursor:help}.pika-time{margin:7px auto}@font-face{font-family:octicons;src:url(/fonts/octicons.eot?#iefix) format('embedded-opentype'),url(/fonts/octicons.woff) format('woff'),url(/fonts/octicons.ttf) format('truetype'),url(/fonts/octicons.svg#octicons) format('svg');font-weight:400;font-style:normal}.mega-octicon,.octicon{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mega-octicon{font-size:32px}.octicon-alert:before{content:'\f02d'}.octicon-alignment-align:before{content:'\f08a'}.octicon-alignment-aligned-to:before{content:'\f08e'}.octicon-alignment-unalign:before{content:'\f08b'}.octicon-arrow-down:before{content:'\f03f'}.octicon-arrow-left:before{content:'\f040'}.octicon-arrow-right:before{content:'\f03e'}.octicon-arrow-small-down:before{content:'\f0a0'}.octicon-arrow-small-left:before{content:'\f0a1'}.octicon-arrow-small-right:before{content:'\f071'}.octicon-arrow-small-up:before{content:'\f09f'}.octicon-arrow-up:before{content:'\f03d'}.octicon-beer:before{content:'\f069'}.octicon-book:before{content:'\f007'}.octicon-bookmark:before{content:'\f07b'}.octicon-briefcase:before{content:'\f0d3'}.octicon-broadcast:before{content:'\f048'}.octicon-browser:before{content:'\f0c5'}.octicon-bug:before{content:'\f091'}.octicon-calendar:before{content:'\f068'}.octicon-check:before{content:'\f03a'}.octicon-checklist:before{content:'\f076'}.octicon-chevron-down:before{content:'\f0a3'}.octicon-chevron-left:before{content:'\f0a4'}.octicon-chevron-right:before{content:'\f078'}.octicon-chevron-up:before{content:'\f0a2'}.octicon-circle-slash:before{content:'\f084'}.octicon-circuit-board:before{content:'\f0d6'}.octicon-clippy:before{content:'\f035'}.octicon-clock:before{content:'\f046'}.octicon-cloud-download:before{content:'\f00b'}.octicon-cloud-upload:before{content:'\f00c'}.octicon-code:before{content:'\f05f'}.octicon-color-mode:before{content:'\f065'}.octicon-comment-add:before,.octicon-comment:before{content:'\f02b'}.octicon-comment-discussion:before{content:'\f04f'}.octicon-credit-card:before{content:'\f045'}.octicon-dash:before{content:'\f0ca'}.octicon-dashboard:before{content:'\f07d'}.octicon-database:before{content:'\f096'}.octicon-device-camera:before{content:'\f056'}.octicon-device-camera-video:before{content:'\f057'}.octicon-device-desktop:before{content:'\f27c'}.octicon-device-mobile:before{content:'\f038'}.octicon-diff:before{content:'\f04d'}.octicon-diff-added:before{content:'\f06b'}.octicon-diff-ignored:before{content:'\f099'}.octicon-diff-modified:before{content:'\f06d'}.octicon-diff-removed:before{content:'\f06c'}.octicon-diff-renamed:before{content:'\f06e'}.octicon-ellipsis:before{content:'\f09a'}.octicon-eye-unwatch:before,.octicon-eye-watch:before,.octicon-eye:before{content:'\f04e'}.octicon-file-binary:before{content:'\f094'}.octicon-file-code:before{content:'\f010'}.octicon-file-directory:before{content:'\f016'}.octicon-file-media:before{content:'\f012'}.octicon-file-pdf:before{content:'\f014'}.octicon-file-submodule:before{content:'\f017'}.octicon-file-symlink-directory:before{content:'\f0b1'}.octicon-file-symlink-file:before{content:'\f0b0'}.octicon-file-text:before{content:'\f011'}.octicon-file-zip:before{content:'\f013'}.octicon-flame:before{content:'\f0d2'}.octicon-fold:before{content:'\f0cc'}.octicon-gear:before{content:'\f02f'}.octicon-gift:before{content:'\f042'}.octicon-gist:before{content:'\f00e'}.octicon-gist-secret:before{content:'\f08c'}.octicon-git-branch-create:before,.octicon-git-branch-delete:before,.octicon-git-branch:before{content:'\f020'}.octicon-git-commit:before{content:'\f01f'}.octicon-git-compare:before{content:'\f0ac'}.octicon-git-merge:before{content:'\f023'}.octicon-git-pull-request-abandoned:before,.octicon-git-pull-request:before{content:'\f009'}.octicon-globe:before{content:'\f0b6'}.octicon-graph:before{content:'\f043'}.octicon-heart:before{content:'\2665'}.octicon-history:before{content:'\f07e'}.octicon-home:before{content:'\f08d'}.octicon-horizontal-rule:before{content:'\f070'}.octicon-hourglass:before{content:'\f09e'}.octicon-hubot:before{content:'\f09d'}.octicon-inbox:before{content:'\f0cf'}.octicon-info:before{content:'\f059'}.octicon-issue-closed:before{content:'\f028'}.octicon-issue-opened:before{content:'\f026'}.octicon-issue-reopened:before{content:'\f027'}.octicon-jersey:before{content:'\f019'}.octicon-jump-down:before{content:'\f072'}.octicon-jump-left:before{content:'\f0a5'}.octicon-jump-right:before{content:'\f0a6'}.octicon-jump-up:before{content:'\f073'}.octicon-key:before{content:'\f049'}.octicon-keyboard:before{content:'\f00d'}.octicon-law:before{content:'\f0d8'}.octicon-light-bulb:before{content:'\f000'}.octicon-link:before{content:'\f05c'}.octicon-link-external:before{content:'\f07f'}.octicon-list-ordered:before{content:'\f062'}.octicon-list-unordered:before{content:'\f061'}.octicon-location:before{content:'\f060'}.octicon-gist-private:before,.octicon-git-fork-private:before,.octicon-lock:before,.octicon-mirror-private:before{content:'\f06a'}.octicon-logo-github:before{content:'\f092'}.octicon-mail:before{content:'\f03b'}.octicon-mail-read:before{content:'\f03c'}.octicon-mail-reply:before{content:'\f051'}.octicon-mark-github:before{content:'\f00a'}.octicon-markdown:before{content:'\f0c9'}.octicon-megaphone:before{content:'\f077'}.octicon-mention:before{content:'\f0be'}.octicon-microscope:before{content:'\f089'}.octicon-milestone:before{content:'\f075'}.octicon-mirror-public:before,.octicon-mirror:before{content:'\f024'}.octicon-mortar-board:before{content:'\f0d7'}.octicon-move-down:before{content:'\f0a8'}.octicon-move-left:before{content:'\f074'}.octicon-move-right:before{content:'\f0a9'}.octicon-move-up:before{content:'\f0a7'}.octicon-mute:before{content:'\f080'}.octicon-no-newline:before{content:'\f09c'}.octicon-octoface:before{content:'\f008'}.octicon-organization:before{content:'\f037'}.octicon-package:before{content:'\f0c4'}.octicon-paintcan:before{content:'\f0d1'}.octicon-pencil:before{content:'\f058'}.octicon-person-add:before,.octicon-person-follow:before,.octicon-person:before{content:'\f018'}.octicon-pin:before{content:'\f041'}.octicon-playback-fast-forward:before{content:'\f0bd'}.octicon-playback-pause:before{content:'\f0bb'}.octicon-playback-play:before{content:'\f0bf'}.octicon-playback-rewind:before{content:'\f0bc'}.octicon-plug:before{content:'\f0d4'}.octicon-file-add:before,.octicon-file-directory-create:before,.octicon-gist-new:before,.octicon-plus:before,.octicon-repo-create:before{content:'\f05d'}.octicon-podium:before{content:'\f0af'}.octicon-primitive-dot:before{content:'\f052'}.octicon-primitive-square:before{content:'\f053'}.octicon-pulse:before{content:'\f085'}.octicon-puzzle:before{content:'\f0c0'}.octicon-question:before{content:'\f02c'}.octicon-quote:before{content:'\f063'}.octicon-radio-tower:before{content:'\f030'}.octicon-repo-delete:before,.octicon-repo:before{content:'\f001'}.octicon-repo-clone:before{content:'\f04c'}.octicon-repo-force-push:before{content:'\f04a'}.octicon-gist-fork:before,.octicon-repo-forked:before{content:'\f002'}.octicon-repo-pull:before{content:'\f006'}.octicon-repo-push:before{content:'\f005'}.octicon-rocket:before{content:'\f033'}.octicon-rss:before{content:'\f034'}.octicon-ruby:before{content:'\f047'}.octicon-screen-full:before{content:'\f066'}.octicon-screen-normal:before{content:'\f067'}.octicon-search-save:before,.octicon-search:before{content:'\f02e'}.octicon-server:before{content:'\f097'}.octicon-settings:before{content:'\f07c'}.octicon-log-in:before,.octicon-sign-in:before{content:'\f036'}.octicon-log-out:before,.octicon-sign-out:before{content:'\f032'}.octicon-split:before{content:'\f0c6'}.octicon-squirrel:before{content:'\f0b2'}.octicon-star-add:before,.octicon-star-delete:before,.octicon-star:before{content:'\f02a'}.octicon-steps:before{content:'\f0c7'}.octicon-stop:before{content:'\f08f'}.octicon-repo-sync:before,.octicon-sync:before{content:'\f087'}.octicon-tag-add:before,.octicon-tag-remove:before,.octicon-tag:before{content:'\f015'}.octicon-telescope:before{content:'\f088'}.octicon-terminal:before{content:'\f0c8'}.octicon-three-bars:before{content:'\f05e'}.octicon-tools:before{content:'\f031'}.octicon-trashcan:before{content:'\f0d0'}.octicon-triangle-down:before{content:'\f05b'}.octicon-triangle-left:before{content:'\f044'}.octicon-triangle-right:before{content:'\f05a'}.octicon-triangle-up:before{content:'\f0aa'}.octicon-unfold:before{content:'\f039'}.octicon-unmute:before{content:'\f0ba'}.octicon-versions:before{content:'\f064'}.octicon-remove-close:before,.octicon-x:before{content:'\f081'}.octicon-zap:before{content:'\26A1'} \ No newline at end of file diff --git a/prod/assets/vendor-ed8acd5f4063b4b83b5df16f6da9e8b0.css b/prod/assets/vendor-ed8acd5f4063b4b83b5df16f6da9e8b0.css deleted file mode 100644 index 92d79188be..0000000000 --- a/prod/assets/vendor-ed8acd5f4063b4b83b5df16f6da9e8b0.css +++ /dev/null @@ -1,4 +0,0 @@ -@charset "UTF-8";/*! - * Pikaday - * Copyright © 2014 David Bushell | BSD & MIT license | http://dbushell.com/ - */.pika-single:after,.pika-time-container{clear:both}.pika-single{z-index:9999;display:block;position:relative;color:#333;background:#fff;border:1px solid #ccc;border-bottom-color:#bbb;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.pika-single:after,.pika-single:before{content:" ";display:table}.pika-single.is-hidden{display:none}.pika-single.is-bound{position:absolute;box-shadow:0 5px 15px -5px rgba(0,0,0,.5)}.pika-lendar{float:left;width:240px;margin:8px}.pika-title{position:relative;text-align:center}.pika-label{display:inline-block;position:relative;z-index:9999;overflow:hidden;margin:0;padding:5px 3px;font-size:14px;line-height:20px;font-weight:700;background-color:#fff}.pika-title select{cursor:pointer;position:absolute;z-index:9998;margin:0;left:0;top:5px;filter:alpha(opacity=0);opacity:0}.pika-next,.pika-prev{display:block;cursor:pointer;position:relative;outline:0;border:0;padding:0;width:20px;height:30px;color:transparent;white-space:nowrap;overflow:hidden;background-color:transparent;background-position:center center;background-repeat:no-repeat;background-size:75% 75%;opacity:.5}.pika-next:hover,.pika-prev:hover{opacity:1}.is-rtl .pika-next,.pika-prev{float:left;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==)}.is-rtl .pika-prev,.pika-next{float:right;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=)}.pika-next.is-disabled,.pika-prev.is-disabled{cursor:default;opacity:.2}.pika-select{display:inline-block}.pika-table{width:100%;border-collapse:collapse;border-spacing:0;border:0}.pika-table td,.pika-table th{width:14.285714285714286%;padding:0}.pika-table th{color:#999;font-size:12px;line-height:25px;font-weight:700;text-align:center}.pika-button{cursor:pointer;display:block;box-sizing:border-box;-moz-box-sizing:border-box;outline:0;border:0;margin:0;width:100%;padding:5px;color:#666;font-size:12px;line-height:15px;text-align:right;background:#f5f5f5}.pika-week{font-size:11px;color:#999}.is-today .pika-button{color:#3af;font-weight:700}.is-selected .pika-button{color:#fff;font-weight:700;background:#3af;box-shadow:inset 0 1px 3px #178fe5;border-radius:3px}.is-disabled .pika-button{pointer-events:none;cursor:default;color:#999;opacity:.3}.pika-button:hover{color:#fff!important;background:#ff8000!important;box-shadow:none!important;border-radius:3px!important}.pika-table abbr{border-bottom:none;cursor:help}.pika-time{margin:7px auto}@font-face{font-family:octicons;src:url(/fonts/octicons.eot?#iefix) format('embedded-opentype'),url(/fonts/octicons.woff) format('woff'),url(/fonts/octicons.ttf) format('truetype'),url(/fonts/octicons.svg#octicons) format('svg');font-weight:400;font-style:normal}.mega-octicon,.octicon{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mega-octicon{font-size:32px}.octicon-alert:before{content:'\f02d'}.octicon-alignment-align:before{content:'\f08a'}.octicon-alignment-aligned-to:before{content:'\f08e'}.octicon-alignment-unalign:before{content:'\f08b'}.octicon-arrow-down:before{content:'\f03f'}.octicon-arrow-left:before{content:'\f040'}.octicon-arrow-right:before{content:'\f03e'}.octicon-arrow-small-down:before{content:'\f0a0'}.octicon-arrow-small-left:before{content:'\f0a1'}.octicon-arrow-small-right:before{content:'\f071'}.octicon-arrow-small-up:before{content:'\f09f'}.octicon-arrow-up:before{content:'\f03d'}.octicon-beer:before{content:'\f069'}.octicon-book:before{content:'\f007'}.octicon-bookmark:before{content:'\f07b'}.octicon-briefcase:before{content:'\f0d3'}.octicon-broadcast:before{content:'\f048'}.octicon-browser:before{content:'\f0c5'}.octicon-bug:before{content:'\f091'}.octicon-calendar:before{content:'\f068'}.octicon-check:before{content:'\f03a'}.octicon-checklist:before{content:'\f076'}.octicon-chevron-down:before{content:'\f0a3'}.octicon-chevron-left:before{content:'\f0a4'}.octicon-chevron-right:before{content:'\f078'}.octicon-chevron-up:before{content:'\f0a2'}.octicon-circle-slash:before{content:'\f084'}.octicon-circuit-board:before{content:'\f0d6'}.octicon-clippy:before{content:'\f035'}.octicon-clock:before{content:'\f046'}.octicon-cloud-download:before{content:'\f00b'}.octicon-cloud-upload:before{content:'\f00c'}.octicon-code:before{content:'\f05f'}.octicon-color-mode:before{content:'\f065'}.octicon-comment-add:before,.octicon-comment:before{content:'\f02b'}.octicon-comment-discussion:before{content:'\f04f'}.octicon-credit-card:before{content:'\f045'}.octicon-dash:before{content:'\f0ca'}.octicon-dashboard:before{content:'\f07d'}.octicon-database:before{content:'\f096'}.octicon-device-camera:before{content:'\f056'}.octicon-device-camera-video:before{content:'\f057'}.octicon-device-desktop:before{content:'\f27c'}.octicon-device-mobile:before{content:'\f038'}.octicon-diff:before{content:'\f04d'}.octicon-diff-added:before{content:'\f06b'}.octicon-diff-ignored:before{content:'\f099'}.octicon-diff-modified:before{content:'\f06d'}.octicon-diff-removed:before{content:'\f06c'}.octicon-diff-renamed:before{content:'\f06e'}.octicon-ellipsis:before{content:'\f09a'}.octicon-eye-unwatch:before,.octicon-eye-watch:before,.octicon-eye:before{content:'\f04e'}.octicon-file-binary:before{content:'\f094'}.octicon-file-code:before{content:'\f010'}.octicon-file-directory:before{content:'\f016'}.octicon-file-media:before{content:'\f012'}.octicon-file-pdf:before{content:'\f014'}.octicon-file-submodule:before{content:'\f017'}.octicon-file-symlink-directory:before{content:'\f0b1'}.octicon-file-symlink-file:before{content:'\f0b0'}.octicon-file-text:before{content:'\f011'}.octicon-file-zip:before{content:'\f013'}.octicon-flame:before{content:'\f0d2'}.octicon-fold:before{content:'\f0cc'}.octicon-gear:before{content:'\f02f'}.octicon-gift:before{content:'\f042'}.octicon-gist:before{content:'\f00e'}.octicon-gist-secret:before{content:'\f08c'}.octicon-git-branch-create:before,.octicon-git-branch-delete:before,.octicon-git-branch:before{content:'\f020'}.octicon-git-commit:before{content:'\f01f'}.octicon-git-compare:before{content:'\f0ac'}.octicon-git-merge:before{content:'\f023'}.octicon-git-pull-request-abandoned:before,.octicon-git-pull-request:before{content:'\f009'}.octicon-globe:before{content:'\f0b6'}.octicon-graph:before{content:'\f043'}.octicon-heart:before{content:'\2665'}.octicon-history:before{content:'\f07e'}.octicon-home:before{content:'\f08d'}.octicon-horizontal-rule:before{content:'\f070'}.octicon-hourglass:before{content:'\f09e'}.octicon-hubot:before{content:'\f09d'}.octicon-inbox:before{content:'\f0cf'}.octicon-info:before{content:'\f059'}.octicon-issue-closed:before{content:'\f028'}.octicon-issue-opened:before{content:'\f026'}.octicon-issue-reopened:before{content:'\f027'}.octicon-jersey:before{content:'\f019'}.octicon-jump-down:before{content:'\f072'}.octicon-jump-left:before{content:'\f0a5'}.octicon-jump-right:before{content:'\f0a6'}.octicon-jump-up:before{content:'\f073'}.octicon-key:before{content:'\f049'}.octicon-keyboard:before{content:'\f00d'}.octicon-law:before{content:'\f0d8'}.octicon-light-bulb:before{content:'\f000'}.octicon-link:before{content:'\f05c'}.octicon-link-external:before{content:'\f07f'}.octicon-list-ordered:before{content:'\f062'}.octicon-list-unordered:before{content:'\f061'}.octicon-location:before{content:'\f060'}.octicon-gist-private:before,.octicon-git-fork-private:before,.octicon-lock:before,.octicon-mirror-private:before{content:'\f06a'}.octicon-logo-github:before{content:'\f092'}.octicon-mail:before{content:'\f03b'}.octicon-mail-read:before{content:'\f03c'}.octicon-mail-reply:before{content:'\f051'}.octicon-mark-github:before{content:'\f00a'}.octicon-markdown:before{content:'\f0c9'}.octicon-megaphone:before{content:'\f077'}.octicon-mention:before{content:'\f0be'}.octicon-microscope:before{content:'\f089'}.octicon-milestone:before{content:'\f075'}.octicon-mirror-public:before,.octicon-mirror:before{content:'\f024'}.octicon-mortar-board:before{content:'\f0d7'}.octicon-move-down:before{content:'\f0a8'}.octicon-move-left:before{content:'\f074'}.octicon-move-right:before{content:'\f0a9'}.octicon-move-up:before{content:'\f0a7'}.octicon-mute:before{content:'\f080'}.octicon-no-newline:before{content:'\f09c'}.octicon-octoface:before{content:'\f008'}.octicon-organization:before{content:'\f037'}.octicon-package:before{content:'\f0c4'}.octicon-paintcan:before{content:'\f0d1'}.octicon-pencil:before{content:'\f058'}.octicon-person-add:before,.octicon-person-follow:before,.octicon-person:before{content:'\f018'}.octicon-pin:before{content:'\f041'}.octicon-playback-fast-forward:before{content:'\f0bd'}.octicon-playback-pause:before{content:'\f0bb'}.octicon-playback-play:before{content:'\f0bf'}.octicon-playback-rewind:before{content:'\f0bc'}.octicon-plug:before{content:'\f0d4'}.octicon-file-add:before,.octicon-file-directory-create:before,.octicon-gist-new:before,.octicon-plus:before,.octicon-repo-create:before{content:'\f05d'}.octicon-podium:before{content:'\f0af'}.octicon-primitive-dot:before{content:'\f052'}.octicon-primitive-square:before{content:'\f053'}.octicon-pulse:before{content:'\f085'}.octicon-puzzle:before{content:'\f0c0'}.octicon-question:before{content:'\f02c'}.octicon-quote:before{content:'\f063'}.octicon-radio-tower:before{content:'\f030'}.octicon-repo-delete:before,.octicon-repo:before{content:'\f001'}.octicon-repo-clone:before{content:'\f04c'}.octicon-repo-force-push:before{content:'\f04a'}.octicon-gist-fork:before,.octicon-repo-forked:before{content:'\f002'}.octicon-repo-pull:before{content:'\f006'}.octicon-repo-push:before{content:'\f005'}.octicon-rocket:before{content:'\f033'}.octicon-rss:before{content:'\f034'}.octicon-ruby:before{content:'\f047'}.octicon-screen-full:before{content:'\f066'}.octicon-screen-normal:before{content:'\f067'}.octicon-search-save:before,.octicon-search:before{content:'\f02e'}.octicon-server:before{content:'\f097'}.octicon-settings:before{content:'\f07c'}.octicon-log-in:before,.octicon-sign-in:before{content:'\f036'}.octicon-log-out:before,.octicon-sign-out:before{content:'\f032'}.octicon-split:before{content:'\f0c6'}.octicon-squirrel:before{content:'\f0b2'}.octicon-star-add:before,.octicon-star-delete:before,.octicon-star:before{content:'\f02a'}.octicon-steps:before{content:'\f0c7'}.octicon-stop:before{content:'\f08f'}.octicon-repo-sync:before,.octicon-sync:before{content:'\f087'}.octicon-tag-add:before,.octicon-tag-remove:before,.octicon-tag:before{content:'\f015'}.octicon-telescope:before{content:'\f088'}.octicon-terminal:before{content:'\f0c8'}.octicon-three-bars:before{content:'\f05e'}.octicon-tools:before{content:'\f031'}.octicon-trashcan:before{content:'\f0d0'}.octicon-triangle-down:before{content:'\f05b'}.octicon-triangle-left:before{content:'\f044'}.octicon-triangle-right:before{content:'\f05a'}.octicon-triangle-up:before{content:'\f0aa'}.octicon-unfold:before{content:'\f039'}.octicon-unmute:before{content:'\f0ba'}.octicon-versions:before{content:'\f064'}.octicon-remove-close:before,.octicon-x:before{content:'\f081'}.octicon-zap:before{content:'\26A1'} \ No newline at end of file diff --git a/prod/assets/vendor-f370935dbd0f1d19b579a264273c07bc.js b/prod/assets/vendor-f370935dbd0f1d19b579a264273c07bc.js new file mode 100644 index 0000000000..d2f9a491fc --- /dev/null +++ b/prod/assets/vendor-f370935dbd0f1d19b579a264273c07bc.js @@ -0,0 +1,59 @@ +function createDeprecatedModule(e){define(e,["exports","ember-resolver/resolver","ember"],function(t,n,r){r.default.deprecate("Usage of `"+e+"` module is deprecated, please update to `ember-resolver`.",!1,{id:"ember-resolver.legacy-shims",until:"3.0.0"}),t.default=n.default})}function CODE128(e){function t(){return e.search(f)!=-1}function n(e){var t="";return t+=l,t+=r(e),t+=o(i(e)),t+=c}function r(e){for(var t="",n=0;n","11011011000",30],["?","11011000110",31],["@","11000110110",32],["A","10100011000",33],["B","10001011000",34],["C","10001000110",35],["D","10110001000",36],["E","10001101000",37],["F","10001100010",38],["G","11010001000",39],["H","11000101000",40],["I","11000100010",41],["J","10110111000",42],["K","10110001110",43],["L","10001101110",44],["M","10111011000",45],["N","10111000110",46],["O","10001110110",47],["P","11101110110",48],["Q","11010001110",49],["R","11000101110",50],["S","11011101000",51],["T","11011100010",52],["U","11011101110",53],["V","11101011000",54],["W","11101000110",55],["X","11100010110",56],["Y","11101101000",57],["Z","11101100010",58],["[","11100011010",59],["\\","11101111010",60],["]","11001000010",61],["^","11110001010",62],["_","10100110000",63],["`","10100001100",64],["a","10010110000",65],["b","10010000110",66],["c","10000101100",67],["d","10000100110",68],["e","10110010000",69],["f","10110000100",70],["g","10011010000",71],["h","10011000010",72],["i","10000110100",73],["j","10000110010",74],["k","11000010010",75],["l","11001010000",76],["m","11110111010",77],["n","11000010100",78],["o","10001111010",79],["p","10100111100",80],["q","10010111100",81],["r","10010011110",82],["s","10111100100",83],["t","10011110100",84],["u","10011110010",85],["v","11110100100",86],["w","11110010100",87],["x","11110010010",88],["y","11011011110",89],["z","11011110110",90],["{","11110110110",91],["|","10101111000",92],["}","10100011110",93],["~","10001011110",94],[String.fromCharCode(127),"10111101000",95],[String.fromCharCode(128),"10111100010",96],[String.fromCharCode(129),"11110101000",97],[String.fromCharCode(130),"11110100010",98],[String.fromCharCode(131),"10111011110",99],[String.fromCharCode(132),"10111101110",100],[String.fromCharCode(133),"11101011110",101],[String.fromCharCode(134),"11110101110",102]],l="11010010000",c="1100011101011",f=/^[!-~ ]+$/}window.EmberENV={FEATURES:{},EXTEND_PROTOTYPES:{Date:!1}};var runningTests=!1,loader,define,requireModule,require,requirejs;if(function(e){"use strict";function t(){l={define:0,require:0,reify:0,findDeps:0,modules:0,exports:0,resolve:0,resolveRelative:0,findModule:0,pendingQueueLength:0},requirejs._stats=l}function n(e){throw new Error("an unsupported module was defined, expected `define(name, deps, module)` instead got: `"+e+"` arguments to define`")}function r(e,t,n,r){l.modules++,this.id=p++,this.name=e,this.deps=!t.length&&n.length?m:t,this.module={exports:{}},this.callback=n,this.hasExportsAsDep=!1,this.isAlias=r,this.reified=new Array(t.length),this.state="new"}function i(e){this.name=e}function o(e,t){throw new Error("Could not find module `"+e+"` imported from `"+t+"`")}function s(e,t,n){l.findModule++;for(var r=d[e]||d[e+"/index"];r&&r.isAlias;)r=d[r.name];return r||o(e,t),n&&"pending"!==r.state&&"finalized"!==r.state&&(r.findDeps(n),n.push(r),l.pendingQueueLength++),r}function a(e,t){if(l.resolve++,"."!==e.charAt(0))return e;l.resolveRelative++;for(var n=e.split("/"),r=t.split("/"),i=r.slice(0,-1),o=0,s=n.length;o=0;r--)t[r].exports();return n.module.exports},t(),loader={noConflict:function(t){var n,r;for(n in t)t.hasOwnProperty(n)&&c.hasOwnProperty(n)&&(r=t[n],e[r]=e[n],e[n]=c[n])}};var f;f=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var d={},h={},p=0,m=["require","exports","module"];r.prototype.makeDefaultExport=function(){var e=this.module.exports;null===e||"object"!=typeof e&&"function"!=typeof e||void 0!==e.default||Object.isFrozen(e)||(e.default=e)},r.prototype.exports=function(){if("finalized"===this.state||"reifying"===this.state)return this.module.exports;l.exports++,loader.wrapModules&&(this.callback=loader.wrapModules(this.name,this.callback)),this.reify();var e=this.callback.apply(this,this.reified);return this.state="finalized",this.hasExportsAsDep&&void 0===e||(this.module.exports=e),this.makeDefaultExport(),this.module.exports},r.prototype.unsee=function(){this.state="new",this.module={exports:{}}},r.prototype.reify=function(){if("reified"!==this.state){this.state="reifying";try{this.reified=this._reify(),this.state="reified"}finally{"reifying"===this.state&&(this.state="errored")}}},r.prototype._reify=function(){l.reify++;for(var e=this.reified.slice(),t=0;t0)for(n in yr)r=yr[n],i=t[r],m(i)||(e[r]=i);return e}function v(t){g(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),br===!1&&(br=!0,e.updateOffset(this),br=!1)}function y(e){return e instanceof v||null!=e&&null!=e._isAMomentObject}function b(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function _(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=b(t)),n}function w(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),s=0;for(r=0;r0?"future":"past"];return k(n)?n(t):n.replace(/%s/i,t)}function M(e,t){var n=e.toLowerCase();Or[n]=Or[n+"s"]=Or[t]=e}function L(e){return"string"==typeof e?Or[e]||Or[e.toLowerCase()]:void 0}function P(e){var t,n,r={};for(n in e)u(e,n)&&(t=L(n),t&&(r[t]=e[n]));return r}function F(e,t){Dr[e]=t}function B(e){var t=[];for(var n in e)t.push({unit:n,priority:Dr[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}function H(t,n){return function(r){return null!=r?(z(this,t,r),e.updateOffset(this,n),this):q(this,t)}}function q(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function z(e,t,n){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](n)}function U(e){return e=L(e),k(this[e])?this[e]():this}function W(e,t){if("object"==typeof e){e=P(e);for(var n=B(e),r=0;r=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}function $(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(Mr[e]=i),t&&(Mr[t[0]]=function(){return V(i.apply(this,arguments),t[1],t[2])}),n&&(Mr[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function G(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Y(e){var t,n,r=e.match(Nr);for(t=0,n=r.length;t=0&&Ir.test(e);)e=e.replace(Ir,n),Ir.lastIndex=0,r-=1;return e}function Q(e,t,n){Zr[e]=k(t)?t:function(e,r){return e&&n?n:t}}function X(e,t){return u(Zr,e)?Zr[e](t._strict,t._locale):new RegExp(Z(e))}function Z(e){return ee(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i}))}function ee(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function te(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),o(t)&&(r=function(e,n){n[t]=_(e)}),n=0;n=0&&isFinite(a.getFullYear())&&a.setFullYear(e),a}function be(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function _e(e,t,n){var r=7+t-n,i=(7+be(e,0,r).getUTCDay()-t)%7;return-i+r-1}function we(e,t,n,r,i){var o,s,a=(7+n-r)%7,u=_e(e,r,i),l=1+7*(t-1)+a+u;return l<=0?(o=e-1,s=me(o)+l):l>me(e)?(o=e+1,s=l-me(e)):(o=e,s=l),{year:o,dayOfYear:s}}function Ee(e,t,n){var r,i,o=_e(e.year(),t,n),s=Math.floor((e.dayOfYear()-o-1)/7)+1;return s<1?(i=e.year()-1,r=s+Se(i,t,n)):s>Se(e.year(),t,n)?(r=s-Se(e.year(),t,n),i=e.year()+1):(i=e.year(),r=s),{week:r,year:i}}function Se(e,t,n){var r=_e(e,t,n),i=_e(e+1,t,n);return(me(e)-r+i)/7}function xe(e){return Ee(e,this._week.dow,this._week.doy).week}function ke(){return this._week.dow}function Ce(){return this._week.doy}function Re(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Te(e){var t=Ee(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ae(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function Oe(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function De(e,t){return e?n(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:this._weekdays}function Ne(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ie(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function je(e,t,n){var r,i,o,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=c([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?(i=ci.call(this._weekdaysParse,s),i!==-1?i:null):"ddd"===t?(i=ci.call(this._shortWeekdaysParse,s),i!==-1?i:null):(i=ci.call(this._minWeekdaysParse,s),i!==-1?i:null):"dddd"===t?(i=ci.call(this._weekdaysParse,s),i!==-1?i:(i=ci.call(this._shortWeekdaysParse,s),i!==-1?i:(i=ci.call(this._minWeekdaysParse,s),i!==-1?i:null))):"ddd"===t?(i=ci.call(this._shortWeekdaysParse,s),i!==-1?i:(i=ci.call(this._weekdaysParse,s),i!==-1?i:(i=ci.call(this._minWeekdaysParse,s),i!==-1?i:null))):(i=ci.call(this._minWeekdaysParse,s),i!==-1?i:(i=ci.call(this._weekdaysParse,s),i!==-1?i:(i=ci.call(this._shortWeekdaysParse,s),i!==-1?i:null)))}function Me(e,t,n){var r,i,o;if(this._weekdaysParseExact)return je.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=c([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Le(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Ae(e,this.localeData()),this.add(e-t,"d")):t}function Pe(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Fe(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Oe(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Be(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||ze.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=wi),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function He(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||ze.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ei),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function qe(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||ze.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Si),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ze(){function e(e,t){return t.length-e.length}var t,n,r,i,o,s=[],a=[],u=[],l=[];for(t=0;t<7;t++)n=c([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),s.push(r),a.push(i),u.push(o),l.push(r),l.push(i),l.push(o);for(s.sort(e),a.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)a[t]=ee(a[t]),u[t]=ee(u[t]),l[t]=ee(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ue(){return this.hours()%12||12}function We(){return this.hours()||24}function Ve(e,t){$(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function $e(e,t){return t._meridiemParse}function Ge(e){return"p"===(e+"").toLowerCase().charAt(0)}function Ye(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function Ke(e){return e?e.toLowerCase().replace("_","-"):e}function Je(e){for(var t,n,r,i,o=0;o0;){if(r=Qe(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&w(i,n,!0)>=t-1)break;t--}o++}return null}function Qe(e){var t=null;if(!Ti[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=xi._abbr,require("./locale/"+e),Xe(t)}catch(e){}return Ti[e]}function Xe(e,t){var n;return e&&(n=m(t)?tt(e):Ze(e,t),n&&(xi=n)),xi._abbr}function Ze(e,t){if(null!==t){var n=Ri;if(t.abbr=e,null!=Ti[e])x("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Ti[e]._config;else if(null!=t.parentLocale){if(null==Ti[t.parentLocale])return Ai[t.parentLocale]||(Ai[t.parentLocale]=[]),Ai[t.parentLocale].push({name:e,config:t}),null;n=Ti[t.parentLocale]._config}return Ti[e]=new T(R(n,t)),Ai[e]&&Ai[e].forEach(function(e){Ze(e.name,e.config)}),Xe(e),Ti[e]}return delete Ti[e],null}function et(e,t){if(null!=t){var n,r=Ri;null!=Ti[e]&&(r=Ti[e]._config),t=R(r,t),n=new T(t),n.parentLocale=Ti[e],Ti[e]=n,Xe(e)}else null!=Ti[e]&&(null!=Ti[e].parentLocale?Ti[e]=Ti[e].parentLocale:null!=Ti[e]&&delete Ti[e]);return Ti[e]}function tt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return xi;if(!n(e)){if(t=Qe(e))return t;e=[e]}return Je(e)}function nt(){return Sr(Ti)}function rt(e){var t,n=e._a;return n&&d(e).overflow===-2&&(t=n[ni]<0||n[ni]>11?ni:n[ri]<1||n[ri]>ie(n[ti],n[ni])?ri:n[ii]<0||n[ii]>24||24===n[ii]&&(0!==n[oi]||0!==n[si]||0!==n[ai])?ii:n[oi]<0||n[oi]>59?oi:n[si]<0||n[si]>59?si:n[ai]<0||n[ai]>999?ai:-1,d(e)._overflowDayOfYear&&(tri)&&(t=ri),d(e)._overflowWeeks&&t===-1&&(t=ui),d(e)._overflowWeekday&&t===-1&&(t=li),d(e).overflow=t),e}function it(e){var t,n,r,i,o,s,a=e._i,u=Oi.exec(a)||Di.exec(a);if(u){for(d(e).iso=!0,t=0,n=Ii.length;tme(i)&&(d(e)._overflowDayOfYear=!0),n=be(i,0,e._dayOfYear),e._a[ni]=n.getUTCMonth(),e._a[ri]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=r[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ii]&&0===e._a[oi]&&0===e._a[si]&&0===e._a[ai]&&(e._nextDay=!0,e._a[ii]=0),e._d=(e._useUTC?be:ye).apply(null,o),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ii]=24)}}function lt(e){var t,n,r,i,o,s,a,u;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)o=1,s=4,n=st(t.GG,e._a[ti],Ee(yt(),1,4).year),r=st(t.W,1),i=st(t.E,1),(i<1||i>7)&&(u=!0);else{o=e._locale._week.dow,s=e._locale._week.doy;var l=Ee(yt(),o,s);n=st(t.gg,e._a[ti],l.year),r=st(t.w,l.week),null!=t.d?(i=t.d,(i<0||i>6)&&(u=!0)):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(u=!0)):i=o}r<1||r>Se(n,o,s)?d(e)._overflowWeeks=!0:null!=u?d(e)._overflowWeekday=!0:(a=we(n,r,i,o,s),e._a[ti]=a.year,e._dayOfYear=a.dayOfYear)}function ct(t){if(t._f===e.ISO_8601)return void it(t);t._a=[],d(t).empty=!0;var n,r,i,o,s,a=""+t._i,u=a.length,l=0;for(i=J(t._f,t._locale).match(Nr)||[],n=0;n0&&d(t).unusedInput.push(s),a=a.slice(a.indexOf(r)+r.length),l+=r.length),Mr[o]?(r?d(t).empty=!1:d(t).unusedTokens.push(o),re(o,r,t)):t._strict&&!r&&d(t).unusedTokens.push(o);d(t).charsLeftOver=u-l,a.length>0&&d(t).unusedInput.push(a),t._a[ii]<=12&&d(t).bigHour===!0&&t._a[ii]>0&&(d(t).bigHour=void 0),d(t).parsedDateParts=t._a.slice(0),d(t).meridiem=t._meridiem,t._a[ii]=ft(t._locale,t._a[ii],t._meridiem),ut(t),rt(t)}function ft(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(r=e.isPM(n),r&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function dt(e){var t,n,r,i,o;if(0===e._f.length)return d(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Lt(){if(!m(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),e=mt(e),e._a){var t=e._isUTC?c(e._a):yt(e._a);this._isDSTShifted=this.isValid()&&w(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Pt(){return!!this.isValid()&&!this._isUTC}function Ft(){return!!this.isValid()&&this._isUTC}function Bt(){return!!this.isValid()&&this._isUTC&&0===this._offset}function Ht(e,t){var n,r,i,s=e,a=null;return St(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:o(e)?(s={},t?s[t]=e:s.milliseconds=e):(a=Hi.exec(e))?(n="-"===a[1]?-1:1,s={y:0,d:_(a[ri])*n,h:_(a[ii])*n,m:_(a[oi])*n,s:_(a[si])*n,ms:_(xt(1e3*a[ai]))*n}):(a=qi.exec(e))?(n="-"===a[1]?-1:1,s={y:qt(a[2],n),M:qt(a[3],n),w:qt(a[4],n),d:qt(a[5],n),h:qt(a[6],n),m:qt(a[7],n),s:qt(a[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(i=Ut(yt(s.from),yt(s.to)),s={},s.ms=i.milliseconds,s.M=i.months),r=new Et(s),St(e)&&u(e,"_locale")&&(r._locale=e._locale),r}function qt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function zt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ut(e,t){var n;return e.isValid()&&t.isValid()?(t=Rt(t,e),e.isBefore(t)?n=zt(e,t):(n=zt(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Wt(e,t){return function(n,r){var i,o;return null===r||isNaN(+r)||(x(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),n="string"==typeof n?+n:n,i=Ht(n,r),Vt(this,i,e),this}}function Vt(t,n,r,i){var o=n._milliseconds,s=xt(n._days),a=xt(n._months);t.isValid()&&(i=null==i||i,o&&t._d.setTime(t._d.valueOf()+o*r),s&&z(t,"Date",q(t,"Date")+s*r),a&&le(t,q(t,"Month")+a*r),i&&e.updateOffset(t,s||a))}function $t(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Gt(t,n){var r=t||yt(),i=Rt(r,this).startOf("day"),o=e.calendarFormat(this,i)||"sameElse",s=n&&(k(n[o])?n[o].call(this,r):n[o]);return this.format(s||this.localeData().calendar(o,this,yt(r)))}function Yt(){return new v(this)}function Kt(e,t){var n=y(e)?e:yt(e);return!(!this.isValid()||!n.isValid())&&(t=L(m(t)?"millisecond":t),"millisecond"===t?this.valueOf()>n.valueOf():n.valueOf()o&&(t=o),Nn.call(this,e,t,n,r,i))}function Nn(e,t,n,r,i){var o=we(e,t,n,r,i),s=be(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function In(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function jn(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function Mn(e,t){t[ai]=_(1e3*("0."+e))}function Ln(){return this._isUTC?"UTC":""}function Pn(){return this._isUTC?"Coordinated Universal Time":""}function Fn(e){return yt(1e3*e)}function Bn(){return yt.apply(null,arguments).parseZone()}function Hn(e){return e}function qn(e,t,n,r){var i=tt(),o=c().set(r,t);return i[n](o,e)}function zn(e,t,n){if(o(e)&&(t=e,e=void 0),e=e||"",null!=t)return qn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=qn(e,r,n,"month");return i}function Un(e,t,n,r){"boolean"==typeof e?(o(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,o(t)&&(n=t,t=void 0),t=t||"");var i=tt(),s=e?i._week.dow:0;if(null!=n)return qn(t,(n+s)%7,r,"day");var a,u=[];for(a=0;a<7;a++)u[a]=qn(t,(a+s)%7,r,"day");return u}function Wn(e,t){return zn(e,t,"months")}function Vn(e,t){return zn(e,t,"monthsShort")}function $n(e,t,n){return Un(e,t,n,"weekdays")}function Gn(e,t,n){return Un(e,t,n,"weekdaysShort")}function Yn(e,t,n){return Un(e,t,n,"weekdaysMin")}function Kn(){var e=this._data;return this._milliseconds=Xi(this._milliseconds),this._days=Xi(this._days),this._months=Xi(this._months),e.milliseconds=Xi(e.milliseconds),e.seconds=Xi(e.seconds),e.minutes=Xi(e.minutes),e.hours=Xi(e.hours),e.months=Xi(e.months),e.years=Xi(e.years),this}function Jn(e,t,n,r){var i=Ht(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Qn(e,t){return Jn(this,e,t,1)}function Xn(e,t){return Jn(this,e,t,-1)}function Zn(e){return e<0?Math.floor(e):Math.ceil(e)}function er(){var e,t,n,r,i,o=this._milliseconds,s=this._days,a=this._months,u=this._data;return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*Zn(nr(a)+s),s=0,a=0),u.milliseconds=o%1e3,e=b(o/1e3),u.seconds=e%60,t=b(e/60),u.minutes=t%60,n=b(t/60),u.hours=n%24,s+=b(n/24),i=b(tr(s)),a+=i,s-=Zn(nr(i)),r=b(a/12),a%=12,u.days=s,u.months=a,u.years=r,this}function tr(e){return 4800*e/146097}function nr(e){return 146097*e/4800}function rr(e){var t,n,r=this._milliseconds;if(e=L(e),"month"===e||"year"===e)return t=this._days+r/864e5,n=this._months+tr(t),"month"===e?n:n/12;switch(t=this._days+Math.round(nr(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function ir(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*_(this._months/12)}function or(e){return function(){return this.as(e)}}function sr(e){return e=L(e),this[e+"s"]()}function ar(e){return function(){return this._data[e]}}function ur(){return b(this.days()/7)}function lr(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function cr(e,t,n){var r=Ht(e).abs(),i=mo(r.as("s")),o=mo(r.as("m")),s=mo(r.as("h")),a=mo(r.as("d")),u=mo(r.as("M")),l=mo(r.as("y")),c=i0,c[4]=n,lr.apply(null,c)}function fr(e){return void 0===e?mo:"function"==typeof e&&(mo=e,!0)}function dr(e,t){return void 0!==go[e]&&(void 0===t?go[e]:(go[e]=t,!0))}function hr(e){var t=this.localeData(),n=cr(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function pr(){var e,t,n,r=vo(this._milliseconds)/1e3,i=vo(this._days),o=vo(this._months);e=b(r/60),t=b(e/60),r%=60,e%=60,n=b(o/12),o%=12;var s=n,a=o,u=i,l=t,c=e,f=r,d=this.asSeconds();return d?(d<0?"-":"")+"P"+(s?s+"Y":"")+(a?a+"M":"")+(u?u+"D":"")+(l||c||f?"T":"")+(l?l+"H":"")+(c?c+"M":"")+(f?f+"S":""):"P0D"}var mr,gr;gr=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r68?1900:2e3)};var gi=H("FullYear",!0);$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),M("week","w"),M("isoWeek","W"),F("week",5),F("isoWeek",5),Q("w",qr),Q("ww",qr,Pr),Q("W",qr),Q("WW",qr,Pr),ne(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=_(e)});var vi={dow:0,doy:6};$("d",0,"do","day"),$("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),$("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),$("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),M("day","d"),M("weekday","e"),M("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),Q("d",qr),Q("e",qr),Q("E",qr),Q("dd",function(e,t){return t.weekdaysMinRegex(e)}),Q("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Q("dddd",function(e,t){return t.weekdaysRegex(e)}),ne(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:d(n).invalidWeekday=e}),ne(["d","e","E"],function(e,t,n,r){t[r]=_(e)});var yi="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),_i="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),wi=Xr,Ei=Xr,Si=Xr;$("H",["HH",2],0,"hour"),$("h",["hh",2],0,Ue),$("k",["kk",2],0,We),$("hmm",0,0,function(){return""+Ue.apply(this)+V(this.minutes(),2)}),$("hmmss",0,0,function(){return""+Ue.apply(this)+V(this.minutes(),2)+V(this.seconds(),2)}),$("Hmm",0,0,function(){return""+this.hours()+V(this.minutes(),2)}),$("Hmmss",0,0,function(){return""+this.hours()+V(this.minutes(),2)+V(this.seconds(),2)}),Ve("a",!0),Ve("A",!1),M("hour","h"),F("hour",13),Q("a",$e),Q("A",$e),Q("H",qr),Q("h",qr),Q("HH",qr,Pr),Q("hh",qr,Pr),Q("hmm",zr),Q("hmmss",Ur),Q("Hmm",zr),Q("Hmmss",Ur),te(["H","HH"],ii),te(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),te(["h","hh"],function(e,t,n){t[ii]=_(e),d(n).bigHour=!0}),te("hmm",function(e,t,n){var r=e.length-2;t[ii]=_(e.substr(0,r)),t[oi]=_(e.substr(r)),d(n).bigHour=!0}),te("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ii]=_(e.substr(0,r)),t[oi]=_(e.substr(r,2)),t[si]=_(e.substr(i)),d(n).bigHour=!0}),te("Hmm",function(e,t,n){var r=e.length-2;t[ii]=_(e.substr(0,r)),t[oi]=_(e.substr(r))}),te("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ii]=_(e.substr(0,r)),t[oi]=_(e.substr(r,2)),t[si]=_(e.substr(i))});var xi,ki=/[ap]\.?m?\.?/i,Ci=H("Hours",!0),Ri={calendar:xr,longDateFormat:kr,invalidDate:Cr,ordinal:Rr,ordinalParse:Tr,relativeTime:Ar,months:di,monthsShort:hi,week:vi,weekdays:yi,weekdaysMin:_i,weekdaysShort:bi,meridiemParse:ki},Ti={},Ai={},Oi=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Di=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ni=/Z|[+-]\d\d(?::?\d\d)?/,Ii=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ji=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mi=/^\/?Date\((\-?\d+)/i;e.createFromInputFallback=S("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),e.ISO_8601=function(){};var Li=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=yt.apply(null,arguments);return this.isValid()&&e.isValid()?ethis?this:e:p()}),Fi=function(){return Date.now?Date.now():+new Date};kt("Z",":"),kt("ZZ",""),Q("Z",Jr),Q("ZZ",Jr),te(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ct(Jr,e)});var Bi=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Hi=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,qi=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Ht.fn=Et.prototype;var zi=Wt(1,"add"),Ui=Wt(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Wi=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});$(0,["gg",2],0,function(){return this.weekYear()%100}),$(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Cn("gggg","weekYear"),Cn("ggggg","weekYear"),Cn("GGGG","isoWeekYear"),Cn("GGGGG","isoWeekYear"),M("weekYear","gg"),M("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),Q("G",Yr),Q("g",Yr),Q("GG",qr,Pr),Q("gg",qr,Pr),Q("GGGG",Vr,Br),Q("gggg",Vr,Br),Q("GGGGG",$r,Hr),Q("ggggg",$r,Hr),ne(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=_(e)}),ne(["gg","GG"],function(t,n,r,i){n[i]=e.parseTwoDigitYear(t)}),$("Q",0,"Qo","quarter"),M("quarter","Q"),F("quarter",7),Q("Q",Lr),te("Q",function(e,t){t[ni]=3*(_(e)-1)}),$("D",["DD",2],"Do","date"),M("date","D"),F("date",9),Q("D",qr),Q("DD",qr,Pr),Q("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),te(["D","DD"],ri),te("Do",function(e,t){t[ri]=_(e.match(qr)[0],10)});var Vi=H("Date",!0);$("DDD",["DDDD",3],"DDDo","dayOfYear"),M("dayOfYear","DDD"),F("dayOfYear",4),Q("DDD",Wr),Q("DDDD",Fr),te(["DDD","DDDD"],function(e,t,n){n._dayOfYear=_(e)}),$("m",["mm",2],0,"minute"),M("minute","m"),F("minute",14),Q("m",qr),Q("mm",qr,Pr),te(["m","mm"],oi);var $i=H("Minutes",!1);$("s",["ss",2],0,"second"),M("second","s"),F("second",15),Q("s",qr),Q("ss",qr,Pr),te(["s","ss"],si);var Gi=H("Seconds",!1);$("S",0,0,function(){return~~(this.millisecond()/100)}),$(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),$(0,["SSS",3],0,"millisecond"),$(0,["SSSS",4],0,function(){return 10*this.millisecond()}),$(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),$(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),$(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),$(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),$(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),M("millisecond","ms"),F("millisecond",16),Q("S",Wr,Lr),Q("SS",Wr,Pr),Q("SSS",Wr,Fr);var Yi;for(Yi="SSSS";Yi.length<=9;Yi+="S")Q(Yi,Gr);for(Yi="S";Yi.length<=9;Yi+="S")te(Yi,Mn);var Ki=H("Milliseconds",!1);$("z",0,0,"zoneAbbr"),$("zz",0,0,"zoneName");var Ji=v.prototype;Ji.add=zi,Ji.calendar=Gt,Ji.clone=Yt,Ji.diff=tn,Ji.endOf=mn,Ji.format=an,Ji.from=un,Ji.fromNow=ln,Ji.to=cn,Ji.toNow=fn,Ji.get=U,Ji.invalidAt=xn,Ji.isAfter=Kt,Ji.isBefore=Jt,Ji.isBetween=Qt,Ji.isSame=Xt,Ji.isSameOrAfter=Zt,Ji.isSameOrBefore=en,Ji.isValid=En,Ji.lang=Wi,Ji.locale=dn,Ji.localeData=hn,Ji.max=Pi,Ji.min=Li,Ji.parsingFlags=Sn,Ji.set=W,Ji.startOf=pn,Ji.subtract=Ui,Ji.toArray=bn,Ji.toObject=_n,Ji.toDate=yn,Ji.toISOString=on,Ji.inspect=sn,Ji.toJSON=wn,Ji.toString=rn,Ji.unix=vn,Ji.valueOf=gn,Ji.creationData=kn,Ji.year=gi,Ji.isLeapYear=ve,Ji.weekYear=Rn,Ji.isoWeekYear=Tn,Ji.quarter=Ji.quarters=In,Ji.month=ce,Ji.daysInMonth=fe,Ji.week=Ji.weeks=Re,Ji.isoWeek=Ji.isoWeeks=Te,Ji.weeksInYear=On,Ji.isoWeeksInYear=An,Ji.date=Vi,Ji.day=Ji.days=Le,Ji.weekday=Pe,Ji.isoWeekday=Fe,Ji.dayOfYear=jn,Ji.hour=Ji.hours=Ci,Ji.minute=Ji.minutes=$i,Ji.second=Ji.seconds=Gi,Ji.millisecond=Ji.milliseconds=Ki,Ji.utcOffset=At,Ji.utc=Dt,Ji.local=Nt,Ji.parseZone=It,Ji.hasAlignedHourOffset=jt,Ji.isDST=Mt,Ji.isLocal=Pt,Ji.isUtcOffset=Ft,Ji.isUtc=Bt,Ji.isUTC=Bt,Ji.zoneAbbr=Ln,Ji.zoneName=Pn,Ji.dates=S("dates accessor is deprecated. Use date instead.",Vi),Ji.months=S("months accessor is deprecated. Use month instead",ce),Ji.years=S("years accessor is deprecated. Use year instead",gi),Ji.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Ot),Ji.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Lt);var Qi=T.prototype;Qi.calendar=A,Qi.longDateFormat=O,Qi.invalidDate=D,Qi.ordinal=N,Qi.preparse=Hn,Qi.postformat=Hn,Qi.relativeTime=I,Qi.pastFuture=j,Qi.set=C,Qi.months=oe,Qi.monthsShort=se,Qi.monthsParse=ue,Qi.monthsRegex=he,Qi.monthsShortRegex=de,Qi.week=xe,Qi.firstDayOfYear=Ce,Qi.firstDayOfWeek=ke,Qi.weekdays=De,Qi.weekdaysMin=Ie,Qi.weekdaysShort=Ne,Qi.weekdaysParse=Me,Qi.weekdaysRegex=Be,Qi.weekdaysShortRegex=He,Qi.weekdaysMinRegex=qe,Qi.isPM=Ge,Qi.meridiem=Ye,Xe("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===_(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),e.lang=S("moment.lang is deprecated. Use moment.locale instead.",Xe),e.langData=S("moment.langData is deprecated. Use moment.localeData instead.",tt);var Xi=Math.abs,Zi=or("ms"),eo=or("s"),to=or("m"),no=or("h"),ro=or("d"),io=or("w"),oo=or("M"),so=or("y"),ao=ar("milliseconds"),uo=ar("seconds"),lo=ar("minutes"),co=ar("hours"),fo=ar("days"),ho=ar("months"),po=ar("years"),mo=Math.round,go={s:45,m:45,h:22,d:26,M:11},vo=Math.abs,yo=Et.prototype;return yo.abs=Kn,yo.add=Qn,yo.subtract=Xn,yo.as=rr,yo.asMilliseconds=Zi,yo.asSeconds=eo,yo.asMinutes=to,yo.asHours=no,yo.asDays=ro,yo.asWeeks=io,yo.asMonths=oo,yo.asYears=so,yo.valueOf=ir,yo._bubble=er,yo.get=sr,yo.milliseconds=ao,yo.seconds=uo,yo.minutes=lo,yo.hours=co,yo.days=fo,yo.weeks=ur,yo.months=ho,yo.years=po,yo.humanize=hr,yo.toISOString=pr,yo.toString=pr,yo.toJSON=pr,yo.locale=dn,yo.localeData=hn,yo.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",pr),yo.lang=Wi,$("X",0,0,"unix"),$("x",0,0,"valueOf"),Q("x",Yr),Q("X",Qr),te("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),te("x",function(e,t,n){n._d=new Date(_(e))}),e.version="2.17.1",t(yt),e.fn=Ji,e.min=_t,e.max=wt,e.now=Fi,e.utc=c,e.unix=Fn,e.months=Wn,e.isDate=s,e.locale=Xe,e.invalid=p,e.duration=Ht,e.isMoment=y,e.weekdays=$n,e.parseZone=Bn,e.localeData=tt,e.isDuration=St,e.monthsShort=Vn,e.weekdaysMin=Yn,e.defineLocale=Ze,e.updateLocale=et,e.locales=nt,e.weekdaysShort=Gn,e.normalizeUnits=L,e.relativeTimeRounding=fr,e.relativeTimeThreshold=dr,e.calendarFormat=$t,e.prototype=Ji,e}),function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t){t=t||te;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function r(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"!==n&&!pe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function i(e,t,n){return pe.isFunction(t)?pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?pe.grep(e,function(e){return e===t!==n}):"string"!=typeof t?pe.grep(e,function(e){return se.call(t,e)>-1!==n}):xe.test(t)?pe.filter(t,e,n):(t=pe.filter(t,e),pe.grep(e,function(e){return se.call(t,e)>-1!==n&&1===e.nodeType}))}function o(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return pe.each(e.match(Oe)||[],function(e,n){t[n]=!0}),t}function a(e){return e}function u(e){throw e}function l(e,t,n){var r;try{e&&pe.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&pe.isFunction(r=e.then)?r.call(e,t,n):t.call(void 0,e)}catch(e){n.call(void 0,e)}}function c(){te.removeEventListener("DOMContentLoaded",c),e.removeEventListener("load",c),pe.ready()}function f(){this.expando=pe.expando+f.uid++}function d(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Pe.test(e)?JSON.parse(e):e)}function h(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Fe,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n=d(n)}catch(e){}Le.set(e,t,n)}else n=void 0;return n}function p(e,t,n,r){var i,o=1,s=20,a=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=a(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&He.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,pe.style(e,t,c+l);while(o!==(o=a()/u)&&1!==o&&--s)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function m(e){var t,n=e.ownerDocument,r=e.nodeName,i=We[r];return i?i:(t=n.body.appendChild(n.createElement(r)),i=pe.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),We[r]=i,i)}function g(e,t){for(var n,r,i=[],o=0,s=e.length;o-1)i&&i.push(o);else if(l=pe.contains(o.ownerDocument,o),s=v(f.appendChild(o),"script"),l&&y(s),n)for(c=0;o=s[c++];)Ge.test(o.type||"")&&n.push(o);return f}function _(){return!0}function w(){return!1}function E(){try{return te.activeElement}catch(e){}}function S(e,t,n,r,i,o){var s,a;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(a in t)S(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=w;else if(!i)return e;return 1===o&&(s=i,i=function(e){return pe().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function x(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e:e}function k(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function C(e){var t=rt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function R(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(Me.hasData(e)&&(o=Me.access(e),s=Me.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;n1&&"string"==typeof p&&!de.checkClone&&nt.test(p))return e.each(function(n){var o=e.eq(n);m&&(t[0]=p.call(this,n,o.html())),A(o,t,r,i)});if(d&&(o=b(t,e[0].ownerDocument,!1,e,i),s=o.firstChild,1===o.childNodes.length&&(o=s),s||i)){for(a=pe.map(v(o,"script"),k),u=a.length;f=0&&nS.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[H]=!0,e}function i(e){var t=I.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)S.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&xe(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function f(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function h(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(s[l]=f))}}else b=v(b===s?b.splice(p,b.length):b),o?o(null,s,b,u):X.apply(s,b)})}function b(e){for(var t,n,r,i=e.length,o=S.relative[e[0].type],s=o||S.relative[" "],a=o?1:0,u=p(function(e){return e===t},s,!0),l=p(function(e){return ee(t,e)>-1},s,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];a1&&m(c),a>1&&h(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),n,a0,o=e.length>0,s=function(r,s,a,u,l){var c,f,d,h=0,p="0",m=r&&[],g=[],y=A,b=r||o&&S.find.TAG("*",l),_=z+=null==y?1:Math.random()||.1,w=b.length;for(l&&(A=s===I||s||l);p!==w&&null!=(c=b[p]);p++){if(o&&c){for(f=0,s||c.ownerDocument===I||(N(c),a=!M);d=e[f++];)if(d(c,s||I,a)){u.push(c);break}l&&(z=_)}i&&((c=!d&&c)&&h--,r&&m.push(c))}if(h+=p,i&&p!==h){for(f=0;d=n[f++];)d(m,g,s,a);if(r){if(h>0)for(;p--;)m[p]||g[p]||(g[p]=J.call(u));g=v(g)}X.apply(u,g),l&&!r&&g.length>0&&h+n.length>1&&t.uniqueSort(u)}return l&&(z=_,A=y),m};return i?r(s):s}var w,E,S,x,k,C,R,T,A,O,D,N,I,j,M,L,P,F,B,H="sizzle"+1*new Date,q=e.document,z=0,U=0,W=n(),V=n(),$=n(),G=function(e,t){return e===t&&(D=!0),0},Y={}.hasOwnProperty,K=[],J=K.pop,Q=K.push,X=K.push,Z=K.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),he={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),_e=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Ee=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Se=function(){N()},xe=p(function(e){return e.disabled===!0&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{X.apply(K=Z.call(q.childNodes),q.childNodes),K[q.childNodes.length].nodeType}catch(e){X={apply:K.length?function(e,t){Q.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}E=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},N=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:q;return r!==I&&9===r.nodeType&&r.documentElement?(I=r,j=I.documentElement,M=!k(I),q!==I&&(n=I.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Se,!1):n.attachEvent&&n.attachEvent("onunload",Se)),E.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),E.getElementsByTagName=i(function(e){return e.appendChild(I.createComment("")),!e.getElementsByTagName("*").length}),E.getElementsByClassName=ge.test(I.getElementsByClassName),E.getById=i(function(e){return j.appendChild(e).id=H,!I.getElementsByName||!I.getElementsByName(H).length}),E.getById?(S.filter.ID=function(e){var t=e.replace(be,_e);return function(e){return e.getAttribute("id")===t}},S.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&M){var n=t.getElementById(e);return n?[n]:[]}}):(S.filter.ID=function(e){var t=e.replace(be,_e);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},S.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&M){var n,r,i,o=t.getElementById(e);if(o){if(n=o.getAttributeNode("id"),n&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if(n=o.getAttributeNode("id"),n&&n.value===e)return[o]}return[]}}),S.find.TAG=E.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):E.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},S.find.CLASS=E.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&M)return t.getElementsByClassName(e)},P=[],L=[],(E.qsa=ge.test(I.querySelectorAll))&&(i(function(e){j.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&L.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||L.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+H+"-]").length||L.push("~="),e.querySelectorAll(":checked").length||L.push(":checked"),e.querySelectorAll("a#"+H+"+*").length||L.push(".#.+[+~]")}),i(function(e){e.innerHTML="";var t=I.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&L.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&L.push(":enabled",":disabled"),j.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&L.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),L.push(",.*:")})),(E.matchesSelector=ge.test(F=j.matches||j.webkitMatchesSelector||j.mozMatchesSelector||j.oMatchesSelector||j.msMatchesSelector))&&i(function(e){E.disconnectedMatch=F.call(e,"*"),F.call(e,"[s!='']:x"),P.push("!=",oe)}),L=L.length&&new RegExp(L.join("|")),P=P.length&&new RegExp(P.join("|")),t=ge.test(j.compareDocumentPosition),B=t||ge.test(j.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},G=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!E.sortDetached&&t.compareDocumentPosition(e)===n?e===I||e.ownerDocument===q&&B(q,e)?-1:t===I||t.ownerDocument===q&&B(q,t)?1:O?ee(O,e)-ee(O,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],u=[t];if(!i||!o)return e===I?-1:t===I?1:i?-1:o?1:O?ee(O,e)-ee(O,t):0;if(i===o)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?s(a[r],u[r]):a[r]===q?-1:u[r]===q?1:0},I):I},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==I&&N(e),n=n.replace(ce,"='$1']"),E.matchesSelector&&M&&!$[n+" "]&&(!P||!P.test(n))&&(!L||!L.test(n)))try{var r=F.call(e,n);if(r||E.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,I,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==I&&N(e),B(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==I&&N(e);var n=S.attrHandle[t.toLowerCase()],r=n&&Y.call(S.attrHandle,t.toLowerCase())?n(e,t,!M):void 0;return void 0!==r?r:E.attributes||!M?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(we,Ee)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!E.detectDuplicates,O=!E.sortStable&&e.slice(0),e.sort(G),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return O=null,e},x=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=x(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=x(t);return n},S=t.selectors={cacheLength:50,createPseudo:r,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,_e),e[3]=(e[3]||e[4]||e[5]||"").replace(be,_e),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,_e).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(se," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,h,p,m=o!==s?"nextSibling":"previousSibling",g=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!u&&!a,b=!1;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[s?g.firstChild:g.lastChild],s&&y){for(d=g,f=d[H]||(d[H]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],h=l[0]===z&&l[1],b=h&&l[2],d=h&&g.childNodes[h];d=++h&&d&&d[m]||(b=h=0)||p.pop();)if(1===d.nodeType&&++b&&d===t){c[e]=[z,h,b];break}}else if(y&&(d=t,f=d[H]||(d[H]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],h=l[0]===z&&l[1],b=h),b===!1)for(;(d=++h&&d&&d[m]||(b=h=0)||p.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&(f=d[H]||(d[H]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[z,b]),d!==t)););return b-=i,b===r||b%r===0&&b/r>=0}}},PSEUDO:function(e,n){var i,o=S.pseudos[e]||S.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[H]?o(n):o.length>1?(i=[e,e,"",n],S.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),s=i.length;s--;)r=ee(e,i[s]),e[r]=!(t[r]=i[s])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=R(e.replace(ae,"$1"));return i[H]?r(function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,_e),function(t){return(t.textContent||t.innerText||x(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,_e).toLowerCase(),function(t){var n;do if(n=M?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===j},focus:function(e){return e===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:l(!1),disabled:l(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!S.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[n<0?n+t:n]}),even:c(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(s=o[0]).type&&9===t.nodeType&&M&&S.relative[o[1].type]){if(t=(S.find.ID(s.matches[0].replace(be,_e),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=he.needsContext.test(e)?0:o.length;i--&&(s=o[i],!S.relative[a=s.type]);)if((u=S.find[a])&&(r=u(s.matches[0].replace(be,_e),ye.test(o[0].type)&&f(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&h(o),!e)return X.apply(n,r),n;break}}return(l||R(e,c))(r,t,!M,n,!t||ye.test(e)&&f(t.parentNode)||t),n},E.sortStable=H.split("").sort(G).join("")===H,E.detectDuplicates=!!D,N(),E.sortDetached=i(function(e){return 1&e.compareDocumentPosition(I.createElement("fieldset"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),E.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=be,pe.expr=be.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=be.uniqueSort,pe.text=be.getText,pe.isXMLDoc=be.isXML,pe.contains=be.contains,pe.escapeSelector=be.escape;var _e=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},we=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Ee=pe.expr.match.needsContext,Se=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,xe=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t1?pe.uniqueSort(n):n},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&Ee.test(e)?pe(e):e||[],!1).length}});var ke,Ce=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Re=pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||ke,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Ce.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:te,!0)),Se.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=te.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):pe.isFunction(e)?void 0!==n.ready?n.ready(e):e(pe):pe.makeArray(e,this)};Re.prototype=pe.fn,ke=pe(te);var Te=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t=pe(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?se.call(pe(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return _e(e,"parentNode")},parentsUntil:function(e,t,n){return _e(e,"parentNode",n)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return _e(e,"nextSibling")},prevAll:function(e){return _e(e,"previousSibling")},nextUntil:function(e,t,n){return _e(e,"nextSibling",n)},prevUntil:function(e,t,n){return _e(e,"previousSibling",n)},siblings:function(e){return we((e.parentNode||{}).firstChild,e)},children:function(e){return we(e.firstChild)},contents:function(e){return e.contentDocument||pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Ae[e]||pe.uniqueSort(i), +Te.test(e)&&i.reverse()),this.pushStack(i)}});var Oe=/[^\x20\t\r\n\f]+/g;pe.Callbacks=function(e){e="string"==typeof e?s(e):pe.extend({},e);var t,n,r,i,o=[],a=[],u=-1,l=function(){for(i=e.once,r=t=!0;a.length;u=-1)for(n=a.shift();++u-1;)o.splice(n,1),n<=u&&u--}),this},has:function(e){return e?pe.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(t){var n=[["notify","progress",pe.Callbacks("memory"),pe.Callbacks("memory"),2],["resolve","done",pe.Callbacks("once memory"),pe.Callbacks("once memory"),0,"resolved"],["reject","fail",pe.Callbacks("once memory"),pe.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return pe.Deferred(function(t){pe.each(n,function(n,r){var i=pe.isFunction(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){function o(t,n,r,i){return function(){var l=this,c=arguments,f=function(){var e,f;if(!(t=s&&(r!==u&&(l=void 0,c=[e]),n.rejectWith(l,c))}};t?d():(pe.Deferred.getStackHook&&(d.stackTrace=pe.Deferred.getStackHook()),e.setTimeout(d))}}var s=0;return pe.Deferred(function(e){n[0][3].add(o(0,e,pe.isFunction(i)?i:a,e.notifyWith)),n[1][3].add(o(0,e,pe.isFunction(t)?t:a)),n[2][3].add(o(0,e,pe.isFunction(r)?r:u))}).promise()},promise:function(e){return null!=e?pe.extend(e,i):i}},o={};return pe.each(n,function(e,t){var s=t[2],a=t[5];i[t[1]]=s.add,a&&s.add(function(){r=a},n[3-e][2].disable,n[0][2].lock),s.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=s.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=re.call(arguments),o=pe.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?re.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(l(e,o.done(s(n)).resolve,o.reject),"pending"===o.state()||pe.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)l(i[n],s(n),o.reject);return o.promise()}});var De=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;pe.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&De.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},pe.readyException=function(t){e.setTimeout(function(){throw t})};var Ne=pe.Deferred();pe.fn.ready=function(e){return Ne.then(e).catch(function(e){pe.readyException(e)}),this},pe.extend({isReady:!1,readyWait:1,holdReady:function(e){e?pe.readyWait++:pe.ready(!0)},ready:function(e){(e===!0?--pe.readyWait:pe.isReady)||(pe.isReady=!0,e!==!0&&--pe.readyWait>0||Ne.resolveWith(te,[pe]))}}),pe.ready.then=Ne.then,"complete"===te.readyState||"loading"!==te.readyState&&!te.documentElement.doScroll?e.setTimeout(pe.ready):(te.addEventListener("DOMContentLoaded",c),e.addEventListener("load",c));var Ie=function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===pe.type(n)){i=!0;for(a in n)Ie(e,t,a,n[a],!0,o,s)}else if(void 0!==r&&(i=!0,pe.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(pe(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each(function(){Le.remove(this,e)})}}),pe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Me.get(e,t),n&&(!r||pe.isArray(n)?r=Me.access(e,t,pe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),s=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Me.get(e,n)||Me.access(e,n,{empty:pe.Callbacks("once memory").add(function(){Me.remove(e,[t+"queue",n])})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Ge=/^$|\/(?:java|ecma)script/i,Ye={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Ye.optgroup=Ye.option,Ye.tbody=Ye.tfoot=Ye.colgroup=Ye.caption=Ye.thead,Ye.th=Ye.td;var Ke=/<|&#?\w+;/;!function(){var e=te.createDocumentFragment(),t=e.appendChild(te.createElement("div")),n=te.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),de.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",de.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Je=te.documentElement,Qe=/^key/,Xe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ze=/^([^.]*)(?:\.(.+)|)/;pe.event={global:{},add:function(e,t,n,r,i){var o,s,a,u,l,c,f,d,h,p,m,g=Me.get(e);if(g)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&pe.find.matchesSelector(Je,i),n.guid||(n.guid=pe.guid++),(u=g.events)||(u=g.events={}),(s=g.handle)||(s=g.handle=function(t){return"undefined"!=typeof pe&&pe.event.triggered!==t.type?pe.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Oe)||[""],l=t.length;l--;)a=Ze.exec(t[l])||[],h=m=a[1],p=(a[2]||"").split(".").sort(),h&&(f=pe.event.special[h]||{},h=(i?f.delegateType:f.bindType)||h,f=pe.event.special[h]||{},c=pe.extend({type:h,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&pe.expr.match.needsContext.test(i),namespace:p.join(".")},o),(d=u[h])||(d=u[h]=[],d.delegateCount=0,f.setup&&f.setup.call(e,r,p,s)!==!1||e.addEventListener&&e.addEventListener(h,s)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),pe.event.global[h]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,l,c,f,d,h,p,m,g=Me.hasData(e)&&Me.get(e);if(g&&(u=g.events)){for(t=(t||"").match(Oe)||[""],l=t.length;l--;)if(a=Ze.exec(t[l])||[],h=m=a[1],p=(a[2]||"").split(".").sort(),h){for(f=pe.event.special[h]||{},h=(r?f.delegateType:f.bindType)||h,d=u[h]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)c=d[o],!i&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));s&&!d.length&&(f.teardown&&f.teardown.call(e,p,g.handle)!==!1||pe.removeEvent(e,h,g.handle),delete u[h])}else for(h in u)pe.event.remove(e,h+t[l],n,r,!0);pe.isEmptyObject(u)&&Me.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,s,a=pe.event.fix(e),u=new Array(arguments.length),l=(Me.get(this,"events")||{})[a.type]||[],c=pe.event.special[a.type]||{};for(u[0]=a,t=1;t=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||l.disabled!==!0)){for(o=[],s={},n=0;n-1:pe.find(i,this,null,[l]).length),s[i]&&o.push(r);o.length&&a.push({elem:l,handlers:o})}return l=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,tt=/\s*$/g;pe.extend({htmlPrefilter:function(e){return e.replace(et,"<$1>")},clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=pe.contains(e.ownerDocument,e);if(!(de.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(s=v(a),o=v(e),r=0,i=o.length;r0&&y(s,!u&&v(e,"script")),a},cleanData:function(e){for(var t,n,r,i=pe.event.special,o=0;void 0!==(n=e[o]);o++)if(je(n)){if(t=n[Me.expando]){if(t.events)for(r in t.events)i[r]?pe.event.remove(n,r):pe.removeEvent(n,r,t.handle);n[Me.expando]=void 0}n[Le.expando]&&(n[Le.expando]=void 0)}}}),pe.fn.extend({detach:function(e){return O(this,e,!0)},remove:function(e){return O(this,e)},text:function(e){return Ie(this,function(e){return void 0===e?pe.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return A(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=x(this,e);t.appendChild(e)}})},prepend:function(){return A(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=x(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return A(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return A(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(pe.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Ie(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!tt.test(e)&&!Ye[($e.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;n1)}}),pe.Tween=P,P.prototype={constructor:P,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=P.propHooks[this.prop];return e&&e.get?e.get(this):P.propHooks._default.get(this)},run:function(e){var t,n=P.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):P.propHooks._default.set(this),this}},P.prototype.init.prototype=P.prototype,P.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},P.propHooks.scrollTop=P.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=P.prototype.init,pe.fx.step={};var ht,pt,mt=/^(?:toggle|show|hide)$/,gt=/queueHooks$/;pe.Animation=pe.extend(W,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return p(n.elem,e,He.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(Oe);for(var n,r=0,i=e.length;r1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(i=pe.attrHooks[t.toLowerCase()]||(pe.expr.match.bool.test(t)?vt:void 0)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!de.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(Oe);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),vt={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):e.setAttribute(n,n),n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=yt[t]||pe.find.attr;yt[t]=function(e,t,r){var i,o,s=t.toLowerCase();return r||(o=yt[s],yt[s]=i,i=null!=n(e,t,r)?s:null,yt[s]=o),i}});var bt=/^(?:input|select|textarea|button)$/i,_t=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Ie(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[pe.propFix[e]||e]})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||_t.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),de.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),pe.fn.extend({addClass:function(e){var t,n,r,i,o,s,a,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,$(this)))});if("string"==typeof e&&e)for(t=e.match(Oe)||[];n=this[u++];)if(i=$(n),r=1===n.nodeType&&" "+V(i)+" "){for(s=0;o=t[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");a=V(r),i!==a&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,i,o,s,a,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,$(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Oe)||[];n=this[u++];)if(i=$(n),r=1===n.nodeType&&" "+V(i)+" "){for(s=0;o=t[s++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");a=V(r),i!==a&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,$(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(Oe)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=$(this),t&&Me.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Me.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+V($(n))+" ").indexOf(t)>-1)return!0;return!1}});var wt=/\r/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(wt,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:V(pe.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],u=s?o+1:i.length;for(r=o<0?u:s?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},de.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et=/^(?:focusinfocus|focusoutblur)$/;pe.extend(pe.event,{trigger:function(t,n,r,i){var o,s,a,u,l,c,f,d=[r||te],h=le.call(t,"type")?t.type:t,p=le.call(t,"namespace")?t.namespace.split("."):[]; +if(s=a=r=r||te,3!==r.nodeType&&8!==r.nodeType&&!Et.test(h+pe.event.triggered)&&(h.indexOf(".")>-1&&(p=h.split("."),h=p.shift(),p.sort()),l=h.indexOf(":")<0&&"on"+h,t=t[pe.expando]?t:new pe.Event(h,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=p.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),f=pe.event.special[h]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!pe.isWindow(r)){for(u=f.delegateType||h,Et.test(u+h)||(s=s.parentNode);s;s=s.parentNode)d.push(s),a=s;a===(r.ownerDocument||te)&&d.push(a.defaultView||a.parentWindow||e)}for(o=0;(s=d[o++])&&!t.isPropagationStopped();)t.type=o>1?u:f.bindType||h,c=(Me.get(s,"events")||{})[t.type]&&Me.get(s,"handle"),c&&c.apply(s,n),c=l&&s[l],c&&c.apply&&je(s)&&(t.result=c.apply(s,n),t.result===!1&&t.preventDefault());return t.type=h,i||t.isDefaultPrevented()||f._default&&f._default.apply(d.pop(),n)!==!1||!je(r)||l&&pe.isFunction(r[h])&&!pe.isWindow(r)&&(a=r[l],a&&(r[l]=null),pe.event.triggered=h,r[h](),pe.event.triggered=void 0,a&&(r[l]=a)),t.result}},simulate:function(e,t,n){var r=pe.extend(new pe.Event,n,{type:e,isSimulated:!0});pe.event.trigger(r,null,t)}}),pe.fn.extend({trigger:function(e,t){return this.each(function(){pe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return pe.event.trigger(e,t,n,!0)}}),pe.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),de.focusin="onfocusin"in e,de.focusin||pe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){pe.event.simulate(t,e.target,pe.event.fix(e))};pe.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Me.access(r,t);i||r.addEventListener(e,n,!0),Me.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Me.access(r,t)-1;i?Me.access(r,t,i):(r.removeEventListener(e,n,!0),Me.remove(r,t))}}});var St=e.location,xt=pe.now(),kt=/\?/;pe.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var Ct=/\[\]$/,Rt=/\r?\n/g,Tt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){var n=pe.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)G(n,e[n],t,i);return r.join("&")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&At.test(this.nodeName)&&!Tt.test(e)&&(this.checked||!Ve.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(Rt,"\r\n")}}):{name:t.name,value:n.replace(Rt,"\r\n")}}).get()}});var Ot=/%20/g,Dt=/#.*$/,Nt=/([?&])_=[^&]*/,It=/^(.*?):[ \t]*([^\r\n]*)$/gm,jt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Lt=/^\/\//,Pt={},Ft={},Bt="*/".concat("*"),Ht=te.createElement("a");Ht.href=St.href,pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:jt.test(St.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Bt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?J(J(e,pe.ajaxSettings),t):J(pe.ajaxSettings,e)},ajaxPrefilter:Y(Pt),ajaxTransport:Y(Ft),ajax:function(t,n){function r(t,n,r,a){var l,d,h,_,w,E=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,s=a||"",S.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(_=Q(p,S,r)),_=X(p,_,S,l),l?(p.ifModified&&(w=S.getResponseHeader("Last-Modified"),w&&(pe.lastModified[o]=w),w=S.getResponseHeader("etag"),w&&(pe.etag[o]=w)),204===t||"HEAD"===p.type?E="nocontent":304===t?E="notmodified":(E=_.state,d=_.data,h=_.error,l=!h)):(h=E,!t&&E||(E="error",t<0&&(t=0))),S.status=t,S.statusText=(n||E)+"",l?v.resolveWith(m,[d,E,S]):v.rejectWith(m,[S,E,h]),S.statusCode(b),b=void 0,f&&g.trigger(l?"ajaxSuccess":"ajaxError",[S,p,l?d:h]),y.fireWith(m,[S,E]),f&&(g.trigger("ajaxComplete",[S,p]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,s,a,u,l,c,f,d,h,p=pe.ajaxSetup({},n),m=p.context||p,g=p.context&&(m.nodeType||m.jquery)?pe(m):pe.event,v=pe.Deferred(),y=pe.Callbacks("once memory"),b=p.statusCode||{},_={},w={},E="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(c){if(!a)for(a={};t=It.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)S.always(e[S.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||E;return i&&i.abort(t),r(0,t),this}};if(v.promise(S),p.url=((t||p.url||St.href)+"").replace(Lt,St.protocol+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(Oe)||[""],null==p.crossDomain){l=te.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Ht.protocol+"//"+Ht.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=pe.param(p.data,p.traditional)),K(Pt,p,n,S),c)return S;f=pe.event&&p.global,f&&0===pe.active++&&pe.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Mt.test(p.type),o=p.url.replace(Dt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ot,"+")):(h=p.url.slice(o.length),p.data&&(o+=(kt.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(o=o.replace(Nt,"$1"),h=(kt.test(o)?"&":"?")+"_="+xt++ +h),p.url=o+h),p.ifModified&&(pe.lastModified[o]&&S.setRequestHeader("If-Modified-Since",pe.lastModified[o]),pe.etag[o]&&S.setRequestHeader("If-None-Match",pe.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&S.setRequestHeader("Content-Type",p.contentType),S.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Bt+"; q=0.01":""):p.accepts["*"]);for(d in p.headers)S.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(p.beforeSend.call(m,S,p)===!1||c))return S.abort();if(E="abort",y.add(p.complete),S.done(p.success),S.fail(p.error),i=K(Ft,p,n,S)){if(S.readyState=1,f&&g.trigger("ajaxSend",[S,p]),c)return S;p.async&&p.timeout>0&&(u=e.setTimeout(function(){S.abort("timeout")},p.timeout));try{c=!1,i.send(_,r)}catch(e){if(c)throw e;r(-1,e)}}else r(-1,"No Transport");return S},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},pe.fn.extend({wrapAll:function(e){var t;return this[0]&&(pe.isFunction(e)&&(e=e.call(this[0])),t=pe(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){pe(this).replaceWith(this.childNodes)}),this}}),pe.expr.pseudos.hidden=function(e){return!pe.expr.pseudos.visible(e)},pe.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},pe.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var qt={0:200,1223:204},zt=pe.ajaxSettings.xhr();de.cors=!!zt&&"withCredentials"in zt,de.ajax=zt=!!zt,pe.ajaxTransport(function(t){var n,r;if(de.cors||zt&&!t.crossDomain)return{send:function(i,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(s in i)a.setRequestHeader(s,i[s]);n=function(e){return function(){n&&(n=r=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(qt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),r=a.onerror=n("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),pe.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=pe(" - - + +