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: remove patientId field, fixed next appointment bug, removed unus… #5

Merged
merged 5 commits into from
Feb 21, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 1 addition & 2 deletions app/locales/en/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -1108,15 +1108,14 @@ export default {
saved: 'The report has been saved'
},
form: {
patientId: 'Patient Id',
visitDate: 'Date of Visit',
primaryDiagnosis: 'Primary Diagnosis',
secondaryDiagnosis: 'Secondary Diagnosis',
procedures: 'Procedures',
labs: 'Labs',
images: 'Images',
nextAppointmentDate: 'Date Of Next Appointment',
operativePlan: 'Operative Plans'
operativePlan: 'Planned Procedures'
},
opd: {
titles: {
Expand Down
6 changes: 3 additions & 3 deletions app/reports/edit/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export default AbstractEditController.extend(PatientSubmodule, PatientDiagnosis,
return result;
}),

nextAppointment: Ember.computed('model.patient.id', 'model.visit.startDate', function() {
let patientId = this.get('model.patient.id');
nextAppointment: Ember.computed('model', function() {
let patientId = this.get('model.visit.patient.id');
let visitDate = this.get('model.visit.startDate');
let maxValue = this.get('maxValue');
let promise = this.store.query('appointment', {
Expand All @@ -38,7 +38,7 @@ export default AbstractEditController.extend(PatientSubmodule, PatientDiagnosis,
if (!futureAppointments.length) {
return '';
}
let [appointment] = [futureAppointments];
let [appointment] = futureAppointments;
let res = appointment.get('startDate');
return res;
});
Expand Down
11 changes: 3 additions & 8 deletions app/reports/edit/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,11 @@
disablePatientLink=model.isNew
}}
{{/if}}
{{#if model.visit.patient.displayPatientId}}
<div class="ps-info-group patient-name print-hide">
<label class="ps-info-label">{{t 'reports.form.patientId' }}</label>
<input class="form-control" value={{model.visit.patient.displayPatientId}}>
</div>
{{/if}}

{{#if model.visit.startDate}}
<div class="ps-info-group">
<label class="ps-info-label">{{t 'reports.form.visitDate' }}</label>
<input class="form-control" value={{date-format model.visit.startDate format="DD/MM/YYYY hh:mm a"}}>
<input class="form-control" disabled value={{date-format model.visit.startDate format="DD/MM/YYYY hh:mm a"}}>
Copy link

@adeolabadmus adeolabadmus Feb 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The date field should be displayed just as text, not an input element. A tech-savvy/malicious user could tweak the disabled property of the input, and change the date.

Kindly implement this as text: <p> or <span>, not <input>

</div>
{{/if}}

Expand Down Expand Up @@ -83,7 +78,7 @@
{{#if nextAppointment}}
<div class="ps-info-group">
<label class="ps-info-label">{{t 'reports.form.nextAppointmentDate' }}</label>
<input class="form-control" value={{date-format nextAppointment format="DD/MM/YYYY hh:mm a"}}>
<input class="form-control" disabled value={{date-format nextAppointment format="DD/MM/YYYY hh:mm a"}}>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The appointment field should also be text not input, as stated above

</div>
{{/if}}

Expand Down