Patient medical record and Consulatation (#12198)
* Patient Medical Record - Subject field reqd=0, Subject text formated * Consultation - remove patient details section * Search fields are updated for Consultation and Appointment * Translations applied on menu
This commit is contained in:
parent
2469095a13
commit
c90195de29
@ -11,7 +11,7 @@ def get_data():
|
|||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Patient Appointment",
|
"name": "Patient Appointment",
|
||||||
"description": _("Patient Appointment"),
|
"label": _("Patient Appointment"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
@ -43,7 +43,7 @@ def get_data():
|
|||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Lab Test",
|
"name": "Lab Test",
|
||||||
"description": _("Results"),
|
"label": _("Lab Test"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
@ -53,7 +53,8 @@ def get_data():
|
|||||||
{
|
{
|
||||||
"type": "report",
|
"type": "report",
|
||||||
"name": "Lab Test 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",
|
"type": "doctype",
|
||||||
"name": "Physician",
|
"name": "Physician",
|
||||||
"label": "Physician",
|
"label": _("Physician"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
@ -100,57 +101,57 @@ def get_data():
|
|||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Medical Department",
|
"name": "Medical Department",
|
||||||
"label": "Medical Department"
|
"label": _("Medical Department"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Appointment Type",
|
"name": "Appointment Type",
|
||||||
"description": _("Appointment Type Master"),
|
"label": _("Appointment Type"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Prescription Dosage",
|
"name": "Prescription Dosage",
|
||||||
"description": _("Prescription Dosage")
|
"label": _("Prescription Dosage")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Prescription Duration",
|
"name": "Prescription Duration",
|
||||||
"description": _("Prescription Period")
|
"label": _("Prescription Duration")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Complaint",
|
"name": "Complaint",
|
||||||
"description": _("Complaint")
|
"label": _("Complaint")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Diagnosis",
|
"name": "Diagnosis",
|
||||||
"description": _("Diagnosis")
|
"label": _("Diagnosis")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Lab Test Sample",
|
"name": "Lab Test Sample",
|
||||||
"description": _("Test Sample Master."),
|
"label": _("Test Sample."),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Lab Test UOM",
|
"name": "Lab Test UOM",
|
||||||
"description": _("Lab Test UOM.")
|
"label": _("Lab Test UOM.")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Antibiotic",
|
"name": "Antibiotic",
|
||||||
"description": _("Antibiotic.")
|
"label": _("Antibiotic.")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Sensitivity",
|
"name": "Sensitivity",
|
||||||
"description": _("Sensitivity Naming.")
|
"label": _("Sensitivity Naming.")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Lab Test Template",
|
"name": "Lab Test Template",
|
||||||
"description": _("Lab Test Configurations.")
|
"label": _("Lab Test Template.")
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,6 @@ frappe.ui.form.on('Consultation', {
|
|||||||
age = calculate_age(data.message.dob);
|
age = calculate_age(data.message.dob);
|
||||||
}
|
}
|
||||||
frappe.model.set_value(frm.doctype,frm.docname, "patient_age", age);
|
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");
|
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 += "<br><b>Age :</b> " + age;
|
|
||||||
}
|
|
||||||
if(data.sex) personal_details += "<br><b>Gender :</b> " + data.sex;
|
|
||||||
if(data.blood_group) personal_details += "<br><b>Blood group : </b> " + data.blood_group;
|
|
||||||
if(data.occupation) personal_details += "<br><b>Occupation :</b> " + data.occupation;
|
|
||||||
if(data.email) personal_details += "<br><b>Email :</b> " + data.email;
|
|
||||||
if(data.mobile) personal_details += "<br><b>Mobile :</b> " + data.mobile;
|
|
||||||
|
|
||||||
if(personal_details){
|
|
||||||
personal_details = "<div style='padding-left:10px; font-size:13px;' align='left'></br><b class='text-muted'>Personal Details</b>" + personal_details + "</div>";
|
|
||||||
}
|
|
||||||
|
|
||||||
var details = "";
|
|
||||||
if(data.allergies) details += "<br><br><b>Allergies : </b> "+ data.allergies;
|
|
||||||
if(data.medication) details += "<br><b>Medication : </b> "+ data.medication;
|
|
||||||
if(data.alcohol_current_use) details += "<br><br><b>Alcohol use : </b> "+ data.alcohol_current_use;
|
|
||||||
if(data.alcohol_past_use) details += "<br><b>Alcohol past use : </b> "+ data.alcohol_past_use;
|
|
||||||
if(data.tobacco_current_use) details += "<br><b>Tobacco use : </b> "+ data.tobacco_current_use;
|
|
||||||
if(data.tobacco_past_use) details += "<br><b>Tobacco past use : </b> "+ data.tobacco_past_use;
|
|
||||||
if(data.medical_history) details += "<br><br><b>Medical history : </b> "+ data.medical_history;
|
|
||||||
if(data.surgical_history) details += "<br><b>Surgical history : </b> "+ data.surgical_history;
|
|
||||||
if(data.surrounding_factors) details += "<br><br><b>Occupational hazards : </b> "+ data.surrounding_factors;
|
|
||||||
if(data.other_risk_factors) details += "<br><b>Other risk factors : </b> " + data.other_risk_factors;
|
|
||||||
if(data.patient_details) details += "<br><br><b>More info : </b> " + data.patient_details;
|
|
||||||
|
|
||||||
if(details){
|
|
||||||
details = "<div style='padding-left:10px; font-size:13px;' align='left'></br><b class='text-muted'>Patient Details</b>" + details + "</div>";
|
|
||||||
}
|
|
||||||
|
|
||||||
var vitals = "";
|
|
||||||
if(data.temperature) vitals += "<br><b>Temperature :</b> " + data.temperature;
|
|
||||||
if(data.pulse) vitals += ", <b>Pulse :</b> " + data.pulse;
|
|
||||||
if(data.respiratory_rate) vitals += ", <b>Respiratory Rate :</b> " + data.respiratory_rate;
|
|
||||||
if(data.bp) vitals += ", <b>BP :</b> " + data.bp;
|
|
||||||
if(data.bmi) vitals += "<br><b>BMI :</b> " + data.bmi;
|
|
||||||
if(data.nutrition_note) vitals += " (" + data.nutrition_note + ")";
|
|
||||||
if(data.height) vitals += ", <b>Height :</b> " + data.height;
|
|
||||||
if(data.weight) vitals += ", <b>Weight :</b> " + data.weight;
|
|
||||||
if(data.signs_date) vitals += "<br><b>Date :</b> " + data.signs_date;
|
|
||||||
|
|
||||||
if(vitals){
|
|
||||||
vitals = "<div style='padding-left:10px; font-size:13px;' align='left'></br><b class='text-muted'>Vital Signs</b>" + vitals + "<br></div>";
|
|
||||||
}
|
|
||||||
details = personal_details + vitals + details;
|
|
||||||
cur_frm.fields_dict.patient_details_html.$wrapper.html(details);
|
|
||||||
};
|
|
||||||
|
|
||||||
frappe.ui.form.on("Consultation", "appointment", function(frm){
|
frappe.ui.form.on("Consultation", "appointment", function(frm){
|
||||||
if(frm.doc.appointment){
|
if(frm.doc.appointment){
|
||||||
frappe.call({
|
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_age", age);
|
||||||
frappe.model.set_value(frm.doctype,frm.docname, "patient_sex", data.message.sex);
|
frappe.model.set_value(frm.doctype,frm.docname, "patient_sex", data.message.sex);
|
||||||
if(frm.doc.__islocal) show_details(data.message);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -444,65 +444,6 @@
|
|||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 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_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
@ -1004,7 +945,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-11-22 14:03:30.434304",
|
"modified": "2017-12-28 11:25:35.256848",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Healthcare",
|
"module": "Healthcare",
|
||||||
"name": "Consultation",
|
"name": "Consultation",
|
||||||
@ -1036,7 +977,7 @@
|
|||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"restrict_to_domain": "Healthcare",
|
"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,
|
"show_name_in_global_search": 1,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
@ -123,10 +123,10 @@ def delete_medical_record(consultation):
|
|||||||
def set_subject_field(consultation):
|
def set_subject_field(consultation):
|
||||||
subject = "No Diagnosis "
|
subject = "No Diagnosis "
|
||||||
if(consultation.diagnosis):
|
if(consultation.diagnosis):
|
||||||
subject = "Diagnosis: \n"+ str(consultation.diagnosis)+". "
|
subject = "Diagnosis: "+ str(consultation.diagnosis)+". "
|
||||||
if(consultation.drug_prescription):
|
if(consultation.drug_prescription):
|
||||||
subject +="\nDrug(s) Prescribed. "
|
subject +="\nDrug(s) Prescribed. "
|
||||||
if(consultation.test_prescription):
|
if(consultation.test_prescription):
|
||||||
subject += " Test(s) Prescribed."
|
subject += "\nTest(s) Prescribed."
|
||||||
|
|
||||||
return subject
|
return subject
|
||||||
|
@ -230,7 +230,7 @@ def get_employee_by_user_id(user_id):
|
|||||||
def insert_lab_test_to_medical_record(doc):
|
def insert_lab_test_to_medical_record(doc):
|
||||||
subject = str(doc.test_name)
|
subject = str(doc.test_name)
|
||||||
if(doc.test_comment):
|
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 = frappe.new_doc("Patient Medical Record")
|
||||||
medical_record.patient = doc.patient
|
medical_record.patient = doc.patient
|
||||||
medical_record.subject = subject
|
medical_record.subject = subject
|
||||||
|
@ -698,7 +698,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-11-22 16:32:57.240736",
|
"modified": "2017-12-28 11:26:20.262978",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Healthcare",
|
"module": "Healthcare",
|
||||||
"name": "Patient Appointment",
|
"name": "Patient Appointment",
|
||||||
@ -750,7 +750,7 @@
|
|||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"restrict_to_domain": "Healthcare",
|
"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,
|
"show_name_in_global_search": 1,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
@ -186,7 +186,7 @@
|
|||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
@ -389,7 +389,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-11-15 12:48:59.945615",
|
"modified": "2017-12-27 14:37:40.468854",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Healthcare",
|
"module": "Healthcare",
|
||||||
"name": "Patient Medical Record",
|
"name": "Patient Medical Record",
|
||||||
|
@ -33,16 +33,16 @@ def delete_vital_signs_from_medical_record(doc):
|
|||||||
def set_subject_field(doc):
|
def set_subject_field(doc):
|
||||||
subject = ""
|
subject = ""
|
||||||
if(doc.temperature):
|
if(doc.temperature):
|
||||||
subject += "Temperature: \n"+ str(doc.temperature)+". "
|
subject += "Temperature: "+ str(doc.temperature)+".\n"
|
||||||
if(doc.pulse):
|
if(doc.pulse):
|
||||||
subject += "Pulse: \n"+ str(doc.pulse)+". "
|
subject += "Pulse: "+ str(doc.pulse)+".\n"
|
||||||
if(doc.respiratory_rate):
|
if(doc.respiratory_rate):
|
||||||
subject += "Respiratory Rate: \n"+ str(doc.respiratory_rate)+". "
|
subject += "Respiratory Rate: "+ str(doc.respiratory_rate)+".\n"
|
||||||
if(doc.bp):
|
if(doc.bp):
|
||||||
subject += "BP: \n"+ str(doc.bp)+". "
|
subject += "BP: "+ str(doc.bp)+".\n"
|
||||||
if(doc.bmi):
|
if(doc.bmi):
|
||||||
subject += "BMI: \n"+ str(doc.bmi)+". "
|
subject += "BMI: "+ str(doc.bmi)+".\n"
|
||||||
if(doc.nutrition_note):
|
if(doc.nutrition_note):
|
||||||
subject += "Note: \n"+ str(doc.nutrition_note)+". "
|
subject += "Note: "+ str(doc.nutrition_note)+"."
|
||||||
|
|
||||||
return subject
|
return subject
|
||||||
|
Loading…
x
Reference in New Issue
Block a user