Skip to content

Commit

Permalink
test: Set default currency for patient
Browse files Browse the repository at this point in the history
(cherry picked from commit 30876a1)

# Conflicts:
#	erpnext/healthcare/doctype/patient_appointment/test_patient_appointment.py
  • Loading branch information
deepeshgarg007 authored and mergify[bot] committed May 25, 2022
1 parent e28f6b7 commit 4727482
Showing 1 changed file with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ def test_invalid_healthcare_service_unit_validation(self):
)
ip_record1 = frappe.get_doc("Inpatient Record", ip_record.name)
mark_invoiced_inpatient_occupancy(ip_record1)
<<<<<<< HEAD
discharge_patient(ip_record1, now_datetime())

def test_payment_should_be_mandatory_for_new_patient_appointment(self):
Expand Down Expand Up @@ -415,6 +416,44 @@ def create_practitioner(id=0, medical_department=None):

return practitioner.name

=======
discharge_patient(ip_record1)


def create_healthcare_docs():
patient = create_patient()
practitioner = frappe.db.exists('Healthcare Practitioner', '_Test Healthcare Practitioner')
medical_department = frappe.db.exists('Medical Department', '_Test Medical Department')

if not medical_department:
medical_department = frappe.new_doc('Medical Department')
medical_department.department = '_Test Medical Department'
medical_department.save(ignore_permissions=True)
medical_department = medical_department.name

if not practitioner:
practitioner = frappe.new_doc('Healthcare Practitioner')
practitioner.first_name = '_Test Healthcare Practitioner'
practitioner.gender = 'Female'
practitioner.department = medical_department
practitioner.op_consulting_charge = 500
practitioner.inpatient_visit_charge = 500
practitioner.save(ignore_permissions=True)
practitioner = practitioner.name

return patient, medical_department, practitioner

def create_patient():
patient = frappe.db.exists('Patient', '_Test Patient')
if not patient:
patient = frappe.new_doc('Patient')
patient.first_name = '_Test Patient'
patient.sex = 'Female'
patient.default_currency = 'INR'
patient.save(ignore_permissions=True)
patient = patient.name
return patient
>>>>>>> 30876a105c (test: Set default currency for patient)

def create_encounter(appointment):
if appointment:
Expand Down

0 comments on commit 4727482

Please sign in to comment.