Attribute Error in Sales Invoice

In ERPNext Version 14, I had a error while clicking “Invoice Patient Registration” button in Patient screen it shows an “Attribute Error”.
Here is the error log of the issue. What should I do to solve the error?

Information about bug

App Versions

{
	"erpnext": "14.8.0",
	"frappe": "14.16.0",
	"healthcare": "14.0.2"
}

Route

Form/Patient/HLC-PAT-2023-00114

Trackeback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 69, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 45, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 83, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1587, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/handler.py", line 304, in run_doc_method
    response = doc.run_method(method)
  File "apps/frappe/frappe/model/document.py", line 908, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1260, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1242, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 905, in fn
    return method_object(*args, **kwargs)
  File "apps/healthcare/healthcare/healthcare/doctype/patient/patient.py", line 182, in invoice_patient_registration
    sales_invoice.save(ignore_permissions=True)
  File "apps/frappe/frappe/model/document.py", line 303, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 325, in _save
    return self.insert()
  File "apps/frappe/frappe/model/document.py", line 257, in insert
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1039, in run_before_save_methods
    self.run_method("validate")
  File "apps/frappe/frappe/model/document.py", line 908, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1260, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1244, in runner
    add_to_return_value(self, f(self, method, *args, **kwargs))
  File "apps/healthcare/healthcare/healthcare/utils.py", line 492, in manage_invoice_validate
    if doc.service_unit and len(doc.items):
AttributeError: 'HealthcareSalesInvoice' object has no attribute 'service_unit'

Request Data

{
	"type": "POST",
	"args": {
		"docs": "{\"name\":\"HLC-PAT-2023-00114\",\"owner\":\"22yogesh2001@gmail.com\",\"creation\":\"2023-12-11 10:34:37.945914\",\"modified\":\"2023-12-11 11:31:09.705958\",\"modified_by\":\"22yogesh2001@gmail.com\",\"docstatus\":0,\"idx\":0,\"naming_series\":\"HLC-PAT-.YYYY.-\",\"first_name\":\"Venkat\",\"last_name\":\"Prabhu\",\"patient_name\":\"Venkat Prabhu\",\"sex\":\"Male\",\"blood_group\":\"B Positive\",\"dob\":\"1980-05-05\",\"status\":\"Disabled\",\"inpatient_record\":\"HLC-INP-2023-00026\",\"inpatient_status\":\"Admitted\",\"report_preference\":\"Print\",\"mobile\":\"9813659569\",\"phone\":\"9852165659\",\"email\":\"venkat_prabhu@gmail.com\",\"invite_user\":0,\"pincode\":\"600036\",\"city\":\"Kovilambakkam\",\"district\":\"CHENNAI\",\"state\":\"Tamil Nadu\",\"country\":\"India\",\"address\":\"Kovilambakkam, Chennai - 600036.\",\"corporate_name\":\"\",\"price_list\":\"\",\"customer\":\"Venkat Prabhu\",\"customer_group\":\"All Customer Groups\",\"territory\":\"All Territories\",\"default_currency\":\"INR\",\"default_price_list\":\"Standard Selling\",\"language\":\"en\",\"occupations\":\"Writer\",\"marital_status\":\"Married\",\"allergies\":\"No\",\"medication\":\"No\",\"medical_history\":\"Yes\",\"surgical_history\":\"Yes\",\"tobacco_past_use\":\"Yes\",\"tobacco_current_use\":\"Yes\",\"alcohol_past_use\":\"Yes\",\"alcohol_current_use\":\"Yes\",\"surrounding_factors\":\"No\",\"other_risk_factors\":\"No\",\"doctype\":\"Patient\",\"patient_relation\":[],\"__onload\":{\"addr_list\":[],\"contact_list\":[{\"name\":\"Venkat Prabhu-HLC-PAT-2023-00114\",\"creation\":\"2023-12-11 10:34:39.248974\",\"modified\":\"2023-12-11 10:34:39.459561\",\"modified_by\":\"22yogesh2001@gmail.com\",\"owner\":\"22yogesh2001@gmail.com\",\"docstatus\":0,\"idx\":0,\"first_name\":\"Venkat\",\"middle_name\":null,\"last_name\":\"Prabhu\",\"email_id\":\"venkat_prabhu@gmail.com\",\"user\":null,\"address\":null,\"sync_with_google_contacts\":0,\"status\":\"Passive\",\"salutation\":null,\"designation\":null,\"gender\":\"Male\",\"phone\":\"9852165659\",\"mobile_no\":\"9813659569\",\"company_name\":null,\"image\":\"\",\"google_contacts\":null,\"google_contacts_id\":null,\"pulled_from_google_contacts\":0,\"is_primary_contact\":1,\"department\":null,\"unsubscribed\":0,\"_user_tags\":null,\"_comments\":null,\"_assign\":null,\"_liked_by\":null,\"is_billing_contact\":0,\"email_ids\":[],\"phone_nos\":[]}],\"dashboard_info\":[]},\"__last_sync_on\":\"2023-12-19T08:02:37.703Z\"}",
		"method": "invoice_patient_registration"
	},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/run_doc_method"
}

Response Data

{
	"exc_type": "DoesNotExistError",
	"exception": "AttributeError: 'HealthcareSalesInvoice' object has no attribute 'service_unit'"
}

How to solve this error?