fix: patch for Healthcare Refactoring

This commit is contained in:
Rucha Mahabal 2020-04-15 11:53:39 +05:30
parent b84333f26e
commit 11121f4905

View File

@ -100,7 +100,7 @@ def execute():
for entry in encounter_details: for entry in encounter_details:
doc = frappe.get_doc('Patient Encounter', entry.name) doc = frappe.get_doc('Patient Encounter', entry.name)
symptoms = entry.symptoms.split('\n') symptoms = entry.symptoms.split('\n') if entry.symptoms else []
for symptom in symptoms: for symptom in symptoms:
if not frappe.db.exists('Complaint', symptom): if not frappe.db.exists('Complaint', symptom):
frappe.get_doc({ frappe.get_doc({
@ -112,7 +112,7 @@ def execute():
}) })
row.db_update() row.db_update()
diagnosis = entry.diagnosis.split('\n') diagnosis = entry.diagnosis.split('\n') if entry.diagnosis else []
for d in diagnosis: for d in diagnosis:
if not frappe.db.exists('Diagnosis', d): if not frappe.db.exists('Diagnosis', d):
frappe.get_doc({ frappe.get_doc({