Codacy - fixes
diff --git a/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.py b/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.py
index 4a4bd39..6d00c25 100644
--- a/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.py
+++ b/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.py
@@ -16,7 +16,7 @@
def validate(self):
if self.consume_stock and not self.status == 'Draft':
if not self.warehouse:
- frappe.throw(("Set warehouse for Procedure {0} ").format(self.name))
+ frappe.throw(_("Set warehouse for Procedure {0} ").format(self.name))
self.set_actual_qty()
if self.items:
diff --git a/erpnext/healthcare/doctype/inpatient_record/inpatient_record.py b/erpnext/healthcare/doctype/inpatient_record/inpatient_record.py
index 2ed3f8e..2d928c6 100644
--- a/erpnext/healthcare/doctype/inpatient_record/inpatient_record.py
+++ b/erpnext/healthcare/doctype/inpatient_record/inpatient_record.py
@@ -115,13 +115,13 @@
for doc in docs:
doc_name_list = get_inpatient_docs_not_invoiced(doc, inpatient_record)
if doc_name_list:
- pending_invoices = get_doc_pendig(doc, doc_name_list, pending_invoices)
+ pending_invoices = get_pending_doc(doc, doc_name_list, pending_invoices)
if pending_invoices:
- frappe.throw(_("Can not mark Inpatient Record Discharged, there are Unpaid Invoices {0}").format(", "
- .join(map(lambda x: """ <b>{0}</b>""".format(x), pending_invoices))))
+ frappe.throw(_("Can not mark Inpatient Record Discharged, there are Unbilled Invoices {0}").format(", "
+ .join(pending_invoices)))
-def get_doc_pendig(doc, doc_name_list, pending_invoices):
+def get_pending_doc(doc, doc_name_list, pending_invoices):
if doc_name_list:
doc_ids = False
for doc_name in doc_name_list:
diff --git a/erpnext/healthcare/doctype/patient_encounter/patient_encounter.py b/erpnext/healthcare/doctype/patient_encounter/patient_encounter.py
index 5aa7867..4c62e57 100644
--- a/erpnext/healthcare/doctype/patient_encounter/patient_encounter.py
+++ b/erpnext/healthcare/doctype/patient_encounter/patient_encounter.py
@@ -5,8 +5,7 @@
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
-from frappe.utils import getdate, cstr
-import json
+from frappe.utils import cstr
class PatientEncounter(Document):
def on_update(self):