From ca66fed23eaad07f87271ac5cb79a58df8527a7a Mon Sep 17 00:00:00 2001 From: Anoop Kurungadam Date: Fri, 17 May 2024 20:01:53 +0530 Subject: [PATCH] fix: remove unused call to get_timeline_data --- .../healthcare/doctype/patient/patient.py | 30 ------------------- 1 file changed, 30 deletions(-) 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