fix(healthcare): patient vitals undefined (#21906) (#21918)

(cherry picked from commit 4dd6b9986f)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
This commit is contained in:
mergify[bot]
2020-05-25 19:18:01 +05:30
committed by GitHub
parent fa62b72174
commit 4771362d39

View File

@@ -512,10 +512,10 @@ def get_children(doctype, parent, company, is_root=False):
def get_patient_vitals(patient, from_date=None, to_date=None):
if not patient: return
vitals = frappe.db.get_all('Vital Signs', {
vitals = frappe.db.get_all('Vital Signs', filters={
'docstatus': 1,
'patient': patient
}, order_by='signs_date, signs_time')
}, order_by='signs_date, signs_time', fields=['*'])
if len(vitals):
return vitals