Skip to content

Commit

Permalink
fix: remove unused call to get_timeline_data
Browse files Browse the repository at this point in the history
  • Loading branch information
akurungadam committed May 17, 2024
1 parent ae3a655 commit ca66fed
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions healthcare/healthcare/doctype/patient/patient.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ca66fed

Please sign in to comment.