Skip to content

Commit

Permalink
Merge pull request #23 from eHealthAfrica/fix-operative-plan
Browse files Browse the repository at this point in the history
Fix Operative Plans display
  • Loading branch information
Chima Alaebo authored Feb 27, 2017
2 parents a015ed2 + 62c4dce commit 74f1819
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 9 deletions.
8 changes: 7 additions & 1 deletion app/locales/en/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -1117,8 +1117,14 @@ export default {
procedures: 'Procedures',
labs: 'Labs',
images: 'Images',
medications: 'Medications',
nextAppointmentDate: 'Date Of Next Appointment',
operativePlan: 'Planned Procedures'
operativePlan: {
title: 'Operative Plans',
description: 'Operation Description',
procedures: 'Planned Procedures',
instructions: 'Instructions upon Admission'
}
},
opd: {
titles: {
Expand Down
42 changes: 34 additions & 8 deletions app/reports/edit/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

{{#if model.visit.startDate}}
<div class="ps-info-group">
<p class="ps-info-label">{{t 'reports.form.visitDate' }}</p>
<label class="ps-info-label">{{t 'reports.form.visitDate' }}</label>
{{date-format model.visit.startDate format="DD/MM/YYYY hh:mm a"}}
</div>
{{/if}}
Expand Down Expand Up @@ -69,7 +69,7 @@
<label class="ps-info-label">{{t 'reports.form.procedures' }}</label>
<ul>
{{#each model.visit.procedures as |item|}}
<li>{{item.description}} {{#if item.procedureDate }} - {{date-format item.procedureDate format="DD/MM/YYYY"}} {{/if}}</li>
<li>{{item.description}}</li>
{{/each}}
</ul>
</div>
Expand Down Expand Up @@ -97,23 +97,49 @@
</div>
{{/if}}

{{#if model.visit.medication.length}}
<div class="ps-info-group">
<label class="ps-info-label">{{t 'reports.form.medications' }}</label>
<ul>
{{#each model.visit.medication as |medication|}}
<li>{{medication.medicationName}} - {{medication.prescription}} ({{medication.status}})</li>
{{/each}}
</ul>
</div>
{{/if}}

{{#if nextAppointment}}
<div class="ps-info-group">
<p class="ps-info-label">{{t 'reports.form.nextAppointmentDate' }}</p>
<label class="ps-info-label">{{t 'reports.form.nextAppointmentDate' }}:</label>
{{date-format nextAppointment format="DD/MM/YYYY hh:mm a"}}
</div>
{{/if}}

{{#if model.visit.patient.operativePlans.length}}
<div class="ps-info-group">
<label class="ps-info-label">{{t 'reports.form.operativePlan' }}</label>
<label class="ps-info-label">{{t 'reports.form.operativePlan.title' }}</label>
<ul>
{{#each model.visit.patient.operativePlans as |item|}}
{{#each item.procedures as |p|}}
<li>{{p.description}} ({{item.status}})</li>
{{#each model.visit.patient.operativePlans as |operativePlan|}}
<li>
<p><b>{{t 'reports.form.operativePlan.description' }}:</b><br>
{{operativePlan.operationDescription}}</p>
</li>

<li>
<p><b>{{t 'reports.form.operativePlan.procedures' }}:</b></p>
<ul>
{{#each operativePlan.procedures as |procedure|}}
<li>{{procedure.description}}</li>
{{/each}}
</ul>
</li>

<li>
<p><b>{{t 'reports.form.operativePlan.instructions' }}:</b><br>
{{operativePlan.admissionInstructions}}
</p>
</li>
{{/each}}
{{/each}}
</ul>
</div>
{{/if}}
Expand Down

0 comments on commit 74f1819

Please sign in to comment.