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 acceptance tests #37

Merged
merged 5 commits into from
Mar 14, 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
2 changes: 1 addition & 1 deletion app/medication/edit/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default AbstractEditController.extend(AddNewPatient, FulfillRequest, Inve
prescriptionClass: function() {
let quantity = this.get('model.quantity');
if (Ember.isEmpty(quantity)) {
return 'required';
return 'required test-medication-prescription';
}
}.property('model.quantity'),

Expand Down
58 changes: 29 additions & 29 deletions app/reports/edit/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -32,69 +32,69 @@
}}
{{/if}}

<div class="ps-info-group">
<label class="ps-info-label">
<div class="ps-info-group test-visit-date">
<label class="ps-info-label test-visit-date-label">
{{#if isOutPatient}}
{{t 'reports.form.visitDate' }}:
{{else}}
{{t 'reports.form.admissionDate' }}:
{{/if}}
</label>
{{date-format visit.startDate format="DD/MM/YYYY"}}
<span class="test-visit-date-data">{{date-format visit.startDate format="DD/MM/YYYY"}}</span>
</div>

{{#if isOutPatient}}

{{#if visit.procedures}}
<div class="ps-info-group">
<label class="ps-info-label">{{t 'reports.form.procedures' }}</label>
<div class="ps-info-group test-opd-procedure">
<label class="ps-info-label test-opd-procedure-label">{{t 'reports.form.procedures' }}</label>
<ul>
{{#each visit.procedures as |item|}}
<li>{{item.description}}</li>
<li class="test-opd-procedure-data">{{item.description}}</li>
{{/each}}
</ul>
</div>
{{/if}}

{{#if visit.labs}}
<div class="ps-info-group">
<label class="ps-info-label">{{t 'reports.form.labs' }}</label>
<div class="ps-info-group test-labs">
<label class="ps-info-label test-labs-label">{{t 'reports.form.labs' }}</label>
<ul>
{{#each visit.labs as |item|}}
<li>{{item.labType.name}}-{{item.result}} ({{item.status}})</li>
<li class="test-labs-data">{{item.labType.name}}-{{item.result}} ({{item.status}})</li>
{{/each}}
</ul>
</div>
{{/if}}

{{#if visit.imaging}}
<div class="ps-info-group">
<label class="ps-info-label">{{t 'reports.form.images' }}</label>
<div class="ps-info-group test-images">
<label class="ps-info-label test-images-label">{{t 'reports.form.images' }}</label>
<ul>
{{#each visit.imaging as |item|}}
<li>{{item.imagingType.name}}-{{item.result}} ({{item.status}})</li>
<li class="test-images-data">{{item.imagingType.name}}-{{item.result}} ({{item.status}})</li>
{{/each}}
</ul>
</div>
{{/if}}

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

{{#if nextAppointments}}
<div class="ps-info-group">
<label class="ps-info-label">{{t 'reports.form.nextAppointments' }}</label>
<div class="ps-info-group test-appointment">
<label class="ps-info-label test-appointment-label">{{t 'reports.form.nextAppointments' }}</label>
<ul>
{{#each nextAppointments as |appointment|}}
<li>
<li class="test-appointment-data">
{{date-format appointment.startDate format="DD/MM/YYYY hh:mm a"}}
{{#if appointment.appointmentType}}
(<b>{{appointment.appointmentType}}</b>)
Expand All @@ -106,29 +106,29 @@
{{/if}}

{{#if currentOperativePlan}}
<div class="ps-info-group">
<label class="ps-info-label">{{t 'reports.form.operativePlan.title' }}</label>
<div class="ps-info-group test-operative-plan">
<label class="ps-info-label test-operative-plan-label">{{t 'reports.form.operativePlan.title' }}</label>
<ul>
{{#if currentOperativePlan.operationDescription}}
<li>
<p><b>{{t 'reports.form.operativePlan.description' }}:</b><br>
{{currentOperativePlan.operationDescription}}</p>
<p><b class="test-operative-plan-description-label">{{t 'reports.form.operativePlan.description' }}:</b><br>
<span class="test-operative-plan-description-data">{{currentOperativePlan.operationDescription}}</span></p>
</li>
{{/if}}

<li>
<p><b>{{t 'reports.form.operativePlan.procedures' }}:</b></p>
<p><b class="test-operative-plan-procedures-label">{{t 'reports.form.operativePlan.procedures' }}:</b></p>
<ul>
{{#each currentOperativePlan.procedures as |procedure|}}
<li>{{procedure.description}}</li>
<li class="test-operative-plan-procedures-description">{{procedure.description}}</li>
{{/each}}
</ul>
</li>

{{#if currentOperativePlan.admissionInstructions}}
<li>
<p><b>{{t 'reports.form.operativePlan.instructions' }}:</b><br>
{{currentOperativePlan.admissionInstructions}}</p>
<p><b class="test-operative-plan-instructions-label">{{t 'reports.form.operativePlan.instructions' }}:</b><br>
<span class="test-operative-plan-instructions-data">{{currentOperativePlan.admissionInstructions}}</span></p>
</li>
{{/if}}
</ul>
Expand All @@ -139,9 +139,9 @@

{{else}}

<div class="ps-info-group">
<label class="ps-info-label">{{t 'reports.form.dischargeDate' }}: </label>
{{date-format model.reportDate format="DD/MM/YYYY"}}
<div class="ps-info-group test-visit-date">
<label class="ps-info-label test-visit-discharge-date-label">{{t 'reports.form.dischargeDate' }}: </label>
<span class="test-visit-discharge-date-data">{{date-format model.reportDate format="DD/MM/YYYY"}}</span>
</div>

<div class="row">
Expand Down
6 changes: 3 additions & 3 deletions app/visits/edit/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
</div>
<div class="panel-footer">
{{#if canAddProcedure}}
<button class="btn btn-primary align-right" {{action "showAddProcedure" bubbles=false }}><span class="octicon octicon-plus"></span> {{t 'visits.buttons.newProcedure' }}</button>
<button class="btn btn-primary align-right" data-test-selector="new-procedure-btn" {{action "showAddProcedure" bubbles=false }}><span class="octicon octicon-plus"></span> {{t 'visits.buttons.newProcedure' }}</button>
{{/if}}
</div>
</div>
Expand Down Expand Up @@ -268,7 +268,7 @@

<div class="panel-heading">
{{#if canAddReport}}
<button class="btn btn-primary align-right" {{action "newReport"}}>
<button class="btn btn-primary align-right" data-test-selector="report-btn" {{action "newReport"}}>
{{#if model.outPatient}}
{{t 'patients.buttons.newOPDReport'}}
{{else}}
Expand All @@ -294,7 +294,7 @@
<td>{{report.modifiedBy}}</td>
<td>{{report.reportType}}</td>
<td>
<button class="btn btn-default neutral" {{action "editReport" report}}>{{t 'labels.edit'}}</button>
<button class="btn btn-default neutral" data-test-selector="edit-report-btn" {{action "editReport" report}}>{{t 'labels.edit'}}</button>
</td>
</tr>
</table>
Expand Down
Loading