fix: unlink item from healthcare service unit type (#22828)

Co-authored-by: Marica <maricadsouza221197@gmail.com>
diff --git a/erpnext/healthcare/doctype/healthcare_service_unit_type/healthcare_service_unit_type.py b/erpnext/healthcare/doctype/healthcare_service_unit_type/healthcare_service_unit_type.py
index bb86eaa..a318e50 100644
--- a/erpnext/healthcare/doctype/healthcare_service_unit_type/healthcare_service_unit_type.py
+++ b/erpnext/healthcare/doctype/healthcare_service_unit_type/healthcare_service_unit_type.py
@@ -39,7 +39,9 @@
 	def on_trash(self):
 		if self.item:
 			try:
-				frappe.delete_doc('Item', self.item)
+				item = self.item
+				self.db_set('item', '')
+				frappe.delete_doc('Item', item)
 			except Exception:
 				frappe.throw(_('Not permitted. Please disable the Service Unit Type'))