diff --git a/app/reports/edit/controller.js b/app/reports/edit/controller.js index ff67d4e9da..719b082992 100644 --- a/app/reports/edit/controller.js +++ b/app/reports/edit/controller.js @@ -12,26 +12,19 @@ export default AbstractEditController.extend(PatientSubmodule, PatientDiagnosis, id: 'physician_list' }], - visitsController: Ember.inject.controller('visits'), newReport: false, - physicianList: Ember.computed.alias('visitsController.physicianList'), - visitController: Ember.inject.controller('visits'), + visitsController: Ember.inject.controller('visits'), + + physicianList: Ember.computed.alias('visitsController.physicianList'), - logoURL: Ember.computed.alias('visitController.printHeader.value.logoURL'), - facilityName: Ember.computed.alias('visitController.printHeader.value.facilityName'), - headerLine1: Ember.computed.alias('visitController.printHeader.value.headerLine1'), - headerLine2: Ember.computed.alias('visitController.printHeader.value.headerLine2'), - headerLine3: Ember.computed.alias('visitController.printHeader.value.headerLine3'), + logoURL: Ember.computed.alias('visitsController.printHeader.value.logoURL'), + facilityName: Ember.computed.alias('visitsController.printHeader.value.facilityName'), + headerLine1: Ember.computed.alias('visitsController.printHeader.value.headerLine1'), + headerLine2: Ember.computed.alias('visitsController.printHeader.value.headerLine2'), + headerLine3: Ember.computed.alias('visitsController.printHeader.value.headerLine3'), - diagnosis: Ember.computed('model.patient', function() { - let container = this.get('model.patient'); - let result = { - primary: this.getDiagnoses(container, true, false), - secondary: this.getDiagnoses(container, true, true) - }; - return result; - }), + diagnosisList: Ember.computed.alias('visitsController.diagnosisList'), nextAppointment: Ember.computed('model', function() { return this.getPatientFutureAppointment(this.get('model.visit')); diff --git a/app/reports/edit/template.hbs b/app/reports/edit/template.hbs index 7bdf08c846..6c50aeb9fe 100644 --- a/app/reports/edit/template.hbs +++ b/app/reports/edit/template.hbs @@ -24,6 +24,8 @@ returnTo='visit.edit' returnToContext=model.id disablePatientLink=model.isNew + diagnosisContainer=model.visit + diagnosisList=diagnosisList }} {{/if}} @@ -62,28 +64,6 @@ {{/if}} {{/unless}} - {{#if diagnosis.primary.length}} -
- - -
- {{/if}} - - {{#if diagnosis.secondary.length}} -
- - -
- {{/if}} - {{#if model.visit.procedures.length}}