Healthcare hotfix (#11574)

* Patient dashboard - Vital Signs

* Remove submit validation in Consultation

* Physician Schedule - Add Time Slots - Fix

* Patient Appointment - Client side - fixes
This commit is contained in:
Jamsheer 2017-11-15 09:47:00 +05:30 committed by Nabin Hait
parent 43edd5d03c
commit bab226698f
4 changed files with 11 additions and 7 deletions

View File

@ -23,10 +23,6 @@ class Consultation(Document):
if not self.diagnosis or not self.symptoms:
frappe.throw("Diagnosis and Complaints cannot be left blank")
physician = frappe.get_doc("Physician",self.physician)
if(frappe.session.user != physician.user_id):
frappe.throw(_("You don't have permission to submit"))
def set_sales_invoice_fields(company, patient):
sales_invoice = frappe.new_doc("Sales Invoice")
sales_invoice.customer = frappe.get_value("Patient", patient, "customer")

View File

@ -11,8 +11,8 @@ def get_data():
'items': ['Patient Appointment', 'Consultation']
},
{
'label': _('Lab Tests'),
'items': ['Lab Test']
'label': _('Lab Tests and Vital Signs'),
'items': ['Lab Test', 'Vital Signs']
}
]
}

View File

@ -25,6 +25,14 @@ frappe.ui.form.on('Patient Appointment', {
frm.add_custom_button(__('Cancel'), function() {
btn_update_status(frm, "Cancelled");
});
frm.add_custom_button(__("Consultation"),function(){
btn_create_consultation(frm);
},"Create");
frm.add_custom_button(__('Vital Signs'), function() {
btn_create_vital_signs(frm);
},"Create");
}
if(frm.doc.status == "Scheduled" && !frm.doc.__islocal){
frm.add_custom_button(__('Cancel'), function() {

View File

@ -33,7 +33,7 @@ frappe.ui.form.on('Physician Schedule', {
while(cur_time < end_time) {
let to_time = cur_time.clone().add(values.duration, 'minutes');
if(to_time < end_time) {
if(to_time <= end_time) {
// add a new timeslot
frm.add_child('time_slots', {