diff --git a/erpnext/config/healthcare.py b/erpnext/config/healthcare.py index f4bf4f7bd2..37d95ad53b 100644 --- a/erpnext/config/healthcare.py +++ b/erpnext/config/healthcare.py @@ -11,7 +11,7 @@ def get_data(): { "type": "doctype", "name": "Patient Appointment", - "description": _("Patient Appointment"), + "label": _("Patient Appointment"), }, { "type": "doctype", @@ -43,7 +43,7 @@ def get_data(): { "type": "doctype", "name": "Lab Test", - "description": _("Results"), + "label": _("Lab Test"), }, { "type": "doctype", @@ -53,7 +53,8 @@ def get_data(): { "type": "report", "name": "Lab Test Report", - "is_query_report": True + "is_query_report": True, + "label": _("Lab Test Report"), } ] }, @@ -69,7 +70,7 @@ def get_data(): { "type": "doctype", "name": "Physician", - "label": "Physician", + "label": _("Physician"), }, { "type": "doctype", @@ -100,57 +101,57 @@ def get_data(): { "type": "doctype", "name": "Medical Department", - "label": "Medical Department" + "label": _("Medical Department"), }, { "type": "doctype", "name": "Appointment Type", - "description": _("Appointment Type Master"), + "label": _("Appointment Type"), }, { "type": "doctype", "name": "Prescription Dosage", - "description": _("Prescription Dosage") + "label": _("Prescription Dosage") }, { "type": "doctype", "name": "Prescription Duration", - "description": _("Prescription Period") + "label": _("Prescription Duration") }, { "type": "doctype", "name": "Complaint", - "description": _("Complaint") + "label": _("Complaint") }, { "type": "doctype", "name": "Diagnosis", - "description": _("Diagnosis") + "label": _("Diagnosis") }, { "type": "doctype", "name": "Lab Test Sample", - "description": _("Test Sample Master."), + "label": _("Test Sample."), }, { "type": "doctype", "name": "Lab Test UOM", - "description": _("Lab Test UOM.") + "label": _("Lab Test UOM.") }, { "type": "doctype", "name": "Antibiotic", - "description": _("Antibiotic.") + "label": _("Antibiotic.") }, { "type": "doctype", "name": "Sensitivity", - "description": _("Sensitivity Naming.") + "label": _("Sensitivity Naming.") }, { "type": "doctype", "name": "Lab Test Template", - "description": _("Lab Test Configurations.") + "label": _("Lab Test Template.") } ] } diff --git a/erpnext/healthcare/doctype/consultation/consultation.js b/erpnext/healthcare/doctype/consultation/consultation.js index 8ed01c35b8..89b8861602 100644 --- a/erpnext/healthcare/doctype/consultation/consultation.js +++ b/erpnext/healthcare/doctype/consultation/consultation.js @@ -28,7 +28,6 @@ frappe.ui.form.on('Consultation', { age = calculate_age(data.message.dob); } frappe.model.set_value(frm.doctype,frm.docname, "patient_age", age); - show_details(data.message); } }); } @@ -144,58 +143,6 @@ var btn_create_vital_signs = function (frm) { frappe.new_doc("Vital Signs"); }; -var show_details = function(data){ - var personal_details = ""; - var age = null; - if(data.dob){ - age = calculate_age(data.dob); - personal_details += "
Age : " + age; - } - if(data.sex) personal_details += "
Gender : " + data.sex; - if(data.blood_group) personal_details += "
Blood group : " + data.blood_group; - if(data.occupation) personal_details += "
Occupation : " + data.occupation; - if(data.email) personal_details += "
Email : " + data.email; - if(data.mobile) personal_details += "
Mobile : " + data.mobile; - - if(personal_details){ - personal_details = "

Personal Details" + personal_details + "
"; - } - - var details = ""; - if(data.allergies) details += "

Allergies : "+ data.allergies; - if(data.medication) details += "
Medication : "+ data.medication; - if(data.alcohol_current_use) details += "

Alcohol use : "+ data.alcohol_current_use; - if(data.alcohol_past_use) details += "
Alcohol past use : "+ data.alcohol_past_use; - if(data.tobacco_current_use) details += "
Tobacco use : "+ data.tobacco_current_use; - if(data.tobacco_past_use) details += "
Tobacco past use : "+ data.tobacco_past_use; - if(data.medical_history) details += "

Medical history : "+ data.medical_history; - if(data.surgical_history) details += "
Surgical history : "+ data.surgical_history; - if(data.surrounding_factors) details += "

Occupational hazards : "+ data.surrounding_factors; - if(data.other_risk_factors) details += "
Other risk factors : " + data.other_risk_factors; - if(data.patient_details) details += "

More info : " + data.patient_details; - - if(details){ - details = "

Patient Details" + details + "
"; - } - - var vitals = ""; - if(data.temperature) vitals += "
Temperature : " + data.temperature; - if(data.pulse) vitals += ", Pulse : " + data.pulse; - if(data.respiratory_rate) vitals += ", Respiratory Rate : " + data.respiratory_rate; - if(data.bp) vitals += ", BP : " + data.bp; - if(data.bmi) vitals += "
BMI : " + data.bmi; - if(data.nutrition_note) vitals += " (" + data.nutrition_note + ")"; - if(data.height) vitals += ", Height : " + data.height; - if(data.weight) vitals += ", Weight : " + data.weight; - if(data.signs_date) vitals += "
Date : " + data.signs_date; - - if(vitals){ - vitals = "

Vital Signs" + vitals + "
"; - } - details = personal_details + vitals + details; - cur_frm.fields_dict.patient_details_html.$wrapper.html(details); -}; - frappe.ui.form.on("Consultation", "appointment", function(frm){ if(frm.doc.appointment){ frappe.call({ @@ -266,7 +213,6 @@ frappe.ui.form.on("Consultation", "patient", function(frm) { } frappe.model.set_value(frm.doctype,frm.docname, "patient_age", age); frappe.model.set_value(frm.doctype,frm.docname, "patient_sex", data.message.sex); - if(frm.doc.__islocal) show_details(data.message); } }); } diff --git a/erpnext/healthcare/doctype/consultation/consultation.json b/erpnext/healthcare/doctype/consultation/consultation.json index 1eff21d18e..184f484e24 100644 --- a/erpnext/healthcare/doctype/consultation/consultation.json +++ b/erpnext/healthcare/doctype/consultation/consultation.json @@ -444,65 +444,6 @@ "set_only_once": 0, "unique": 0 }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fieldname": "patient_details", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Patient Details", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "patient_details_html", - "fieldtype": "HTML", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 1, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -1004,7 +945,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-11-22 14:03:30.434304", + "modified": "2017-12-28 11:25:35.256848", "modified_by": "Administrator", "module": "Healthcare", "name": "Consultation", @@ -1036,7 +977,7 @@ "read_only": 0, "read_only_onload": 0, "restrict_to_domain": "Healthcare", - "search_fields": "patient, physician, visit_department", + "search_fields": "patient, physician, visit_department, consultation_date, consultation_time", "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", diff --git a/erpnext/healthcare/doctype/consultation/consultation.py b/erpnext/healthcare/doctype/consultation/consultation.py index 69d7ecbd01..809074e94b 100755 --- a/erpnext/healthcare/doctype/consultation/consultation.py +++ b/erpnext/healthcare/doctype/consultation/consultation.py @@ -123,10 +123,10 @@ def delete_medical_record(consultation): def set_subject_field(consultation): subject = "No Diagnosis " if(consultation.diagnosis): - subject = "Diagnosis: \n"+ str(consultation.diagnosis)+". " + subject = "Diagnosis: "+ str(consultation.diagnosis)+". " if(consultation.drug_prescription): subject +="\nDrug(s) Prescribed. " if(consultation.test_prescription): - subject += " Test(s) Prescribed." + subject += "\nTest(s) Prescribed." return subject diff --git a/erpnext/healthcare/doctype/lab_test/lab_test.py b/erpnext/healthcare/doctype/lab_test/lab_test.py index 6fd9535ecc..766491d318 100644 --- a/erpnext/healthcare/doctype/lab_test/lab_test.py +++ b/erpnext/healthcare/doctype/lab_test/lab_test.py @@ -230,7 +230,7 @@ def get_employee_by_user_id(user_id): def insert_lab_test_to_medical_record(doc): subject = str(doc.test_name) if(doc.test_comment): - subject += ", \n"+str(doc.test_comment) + subject += ", "+str(doc.test_comment) medical_record = frappe.new_doc("Patient Medical Record") medical_record.patient = doc.patient medical_record.subject = subject diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.json b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.json index 14c48b809f..1dcdbb57f1 100644 --- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.json +++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.json @@ -698,7 +698,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-11-22 16:32:57.240736", + "modified": "2017-12-28 11:26:20.262978", "modified_by": "Administrator", "module": "Healthcare", "name": "Patient Appointment", @@ -750,7 +750,7 @@ "read_only": 0, "read_only_onload": 0, "restrict_to_domain": "Healthcare", - "search_fields": "patient, physician, appointment_datetime,department", + "search_fields": "patient, physician, department, appointment_date, appointment_time", "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", diff --git a/erpnext/healthcare/doctype/patient_medical_record/patient_medical_record.json b/erpnext/healthcare/doctype/patient_medical_record/patient_medical_record.json index 6edc0cc085..8aa4edeaa3 100644 --- a/erpnext/healthcare/doctype/patient_medical_record/patient_medical_record.json +++ b/erpnext/healthcare/doctype/patient_medical_record/patient_medical_record.json @@ -186,7 +186,7 @@ "read_only": 0, "remember_last_selected_value": 0, "report_hide": 0, - "reqd": 1, + "reqd": 0, "search_index": 0, "set_only_once": 0, "unique": 0 @@ -389,7 +389,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-11-15 12:48:59.945615", + "modified": "2017-12-27 14:37:40.468854", "modified_by": "Administrator", "module": "Healthcare", "name": "Patient Medical Record", diff --git a/erpnext/healthcare/doctype/vital_signs/vital_signs.py b/erpnext/healthcare/doctype/vital_signs/vital_signs.py index 436f79fcb9..a42ff02ea2 100644 --- a/erpnext/healthcare/doctype/vital_signs/vital_signs.py +++ b/erpnext/healthcare/doctype/vital_signs/vital_signs.py @@ -31,18 +31,18 @@ def delete_vital_signs_from_medical_record(doc): frappe.delete_doc("Patient Medical Record", medical_record_id[0][0]) def set_subject_field(doc): - subject = " " + subject = "" if(doc.temperature): - subject += "Temperature: \n"+ str(doc.temperature)+". " + subject += "Temperature: "+ str(doc.temperature)+".\n" if(doc.pulse): - subject += "Pulse: \n"+ str(doc.pulse)+". " + subject += "Pulse: "+ str(doc.pulse)+".\n" if(doc.respiratory_rate): - subject += "Respiratory Rate: \n"+ str(doc.respiratory_rate)+". " + subject += "Respiratory Rate: "+ str(doc.respiratory_rate)+".\n" if(doc.bp): - subject += "BP: \n"+ str(doc.bp)+". " + subject += "BP: "+ str(doc.bp)+".\n" if(doc.bmi): - subject += "BMI: \n"+ str(doc.bmi)+". " + subject += "BMI: "+ str(doc.bmi)+".\n" if(doc.nutrition_note): - subject += "Note: \n"+ str(doc.nutrition_note)+". " + subject += "Note: "+ str(doc.nutrition_note)+"." return subject