diff --git a/healthcare/healthcare/doctype/patient/patient.py b/healthcare/healthcare/doctype/patient/patient.py index 3d6f221805..88965eff68 100644 --- a/healthcare/healthcare/doctype/patient/patient.py +++ b/healthcare/healthcare/doctype/patient/patient.py @@ -352,33 +352,3 @@ def get_patient_detail(patient): vital_sign[0].pop("inpatient_record") details.update(vital_sign[0]) return details - - -def get_timeline_data(doctype, name): - """ - Return Patient's timeline data from medical records - Also include the associated Customer timeline data - """ - patient_timeline_data = dict( - frappe.db.sql( - """ - SELECT - unix_timestamp(communication_date), count(*) - FROM - `tabPatient Medical Record` - WHERE - patient=%s - and `communication_date` > date_sub(curdate(), interval 1 year) - GROUP BY communication_date""", - name, - ) - ) - - customer = frappe.db.get_value(doctype, name, "customer") - if customer: - from erpnext.accounts.party import get_timeline_data - - customer_timeline_data = get_timeline_data("Customer", customer) - patient_timeline_data.update(customer_timeline_data) - - return patient_timeline_data