Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix report diagnosis #22

Merged
merged 2 commits into from
Feb 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions app/reports/edit/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down
24 changes: 2 additions & 22 deletions app/reports/edit/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
returnTo='visit.edit'
returnToContext=model.id
disablePatientLink=model.isNew
diagnosisContainer=model.visit
diagnosisList=diagnosisList
}}
{{/if}}

Expand Down Expand Up @@ -62,28 +64,6 @@
{{/if}}
{{/unless}}

{{#if diagnosis.primary.length}}
<div class="ps-info-group">
<label class="ps-info-label">{{t 'reports.form.primaryDiagnosis' }}</label>
<ul>
{{#each diagnosis.primary as |item|}}
<li>{{item.diagnosis}}</li>
{{/each}}
</ul>
</div>
{{/if}}

{{#if diagnosis.secondary.length}}
<div class="ps-info-group">
<label class="ps-info-label">{{t 'reports.form.secondaryDiagnosis' }}</label>
<ul>
{{#each diagnosis.secondary as |item|}}
<li>{{item.diagnosis}}</li>
{{/each}}
</ul>
</div>
{{/if}}

{{#if model.visit.procedures.length}}
<div class="ps-info-group">
<label class="ps-info-label">{{t 'reports.form.procedures' }}</label>
Expand Down