diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
index 4c1509e..6b264d4 100644
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
@@ -108,6 +108,14 @@
 			}, __('Create'));
 		}
 
+		frm.events.toggle_payment_fields(frm);
+	},
+
+	get_procedure_from_encounter: function(frm) {
+		get_prescribed_procedure(frm);
+	},
+
+	toggle_payment_fields: function(frm) {
 		frappe.db.get_value('Healthcare Settings', {name: 'Healthcare Settings'}, ['automate_appointment_invoicing'], (settings) => {
 			if (settings.automate_appointment_invoicing == 1) {
 				frm.set_df_property('mode_of_payment', 'hidden', 0);
@@ -121,10 +129,6 @@
 				frm.set_df_property('paid_amount', 'reqd', 0);
 			}
 		});
-	},
-
-	get_procedure_from_encounter: function(frm) {
-		get_prescribed_procedure(frm);
 	}
 });
 
diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
index c12ae86..e8e65ed 100755
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
@@ -13,7 +13,7 @@
 from frappe.core.doctype.sms_settings.sms_settings import send_sms
 from erpnext.hr.doctype.employee.employee import is_holiday
 from erpnext.healthcare.doctype.healthcare_settings.healthcare_settings import get_receivable_account, get_income_account
-from erpnext.healthcare.utils import check_validity_exists, get_service_item_and_practitioner_charge
+from erpnext.healthcare.utils import check_fee_validity, get_service_item_and_practitioner_charge
 
 class PatientAppointment(Document):
 	def validate(self):
@@ -25,7 +25,7 @@
 	def after_insert(self):
 		invoice_appointment(self)
 		self.update_prescription_details()
-		self.check_fee_validity()
+		self.update_fee_validity()
 		send_confirmation_msg(self)
 
 	def set_status(self):
@@ -59,8 +59,8 @@
 		self.appointment_time, end_time.time(), self.appointment_time, end_time.time(), self.appointment_time))
 
 		if overlaps:
-			overlapping_details = _('Appointment overlaps with {0}').format(overlaps[0][0])
-			overlapping_details += '<br>'
+			overlapping_details = _('Appointment overlaps with ')
+			overlapping_details += "<b><a href='#Form/Patient Appointment/{0}'>{0}</a></b><br>".format(overlaps[0][0])
 			overlapping_details += _('{0} has appointment scheduled with {1} at {2} having {3} minute(s) duration.').format(
 				overlaps[0][1], overlaps[0][2], overlaps[0][3], overlaps[0][4])
 			frappe.throw(overlapping_details, title=_('Appointments Overlapping'))
@@ -83,27 +83,18 @@
 				if comments:
 					frappe.db.set_value('Patient Appointment', self.name, 'notes', comments)
 
-	def check_fee_validity(self):
-		# Check fee validity exists
-		validity = check_validity_exists(self.practitioner, self.patient)
-		if validity:
-			fee_validity = frappe.get_doc('Fee Validity', validity)
-
-			# Check if the validity is valid
-			appointment_date = getdate(self.appointment_date)
-			if (fee_validity.valid_till >= appointment_date) and (fee_validity.visited < fee_validity.max_visits):
-				visited = fee_validity.visited + 1
-				frappe.db.set_value('Fee Validity', fee_validity.name, 'visited', visited)
-				if fee_validity.ref_invoice:
-					frappe.db.set_value('Patient Appointment', self.name, 'invoiced', True)
-					frappe.db.set_value('Patient Appointment', self.name, 'ref_sales_invoice', fee_validity.ref_invoice)
-				frappe.msgprint(_('{0} has fee validity till {1}').format(self.patient, fee_validity.valid_till))
+	def update_fee_validity(self):
+		fee_validity = check_fee_validity(self)
+		if fee_validity:
+			visited = fee_validity.visited + 1
+			frappe.db.set_value('Fee Validity', fee_validity.name, 'visited', visited)
+			if fee_validity.ref_invoice:
+				frappe.db.set_value('Patient Appointment', self.name, 'invoiced', True)
+				frappe.db.set_value('Patient Appointment', self.name, 'ref_sales_invoice', fee_validity.ref_invoice)
+			frappe.msgprint(_('{0} has fee validity till {1}').format(self.patient, fee_validity.valid_till))
 
 
 def invoice_appointment(appointment_doc):
-	if not appointment_doc.name:
-		return
-
 	if frappe.db.get_single_value('Healthcare Settings', 'automate_appointment_invoicing') and \
 			not frappe.db.get_value('Patient Appointment', appointment_doc.name, 'invoiced'):
 		sales_invoice = frappe.new_doc('Sales Invoice')
@@ -153,7 +144,7 @@
 				_('Appointment {0} and Sales Invoice {1} cancelled'.format(appointment.name, sales_invoice.name))
 			)
 		else:
-			validity = check_validity_exists(appointment.practitioner, appointment.patient)
+			validity = check_fee_validity(appointment.practitioner, appointment.patient)
 			if validity:
 				fee_validity = frappe.get_doc('Fee Validity', validity)
 				if validate_appointment_in_fee_validity(appointment, fee_validity.valid_till, fee_validity.ref_invoice):
@@ -235,7 +226,7 @@
 	check_employee_wise_availability(date, practitioner_doc)
 
 	if practitioner_doc.practitioner_schedules:
-		slot_details = get_available_slots(practitioner_doc.practitioner_schedules, date)
+		slot_details = get_available_slots(practitioner_doc, date)
 	else:
 		frappe.throw(_('{0} does not have a Healthcare Practitioner Schedule. Add it in Healthcare Practitioner master').format(
 			practitioner), title=_('Practitioner Schedule Not Found'))
@@ -271,13 +262,13 @@
 				frappe.throw(_('{0} is on Leave on {1}').format(practitioner_doc.name, date), title=_('Not Available'))
 
 
-def get_available_slots(practitioner_schedules, date):
+def get_available_slots(practitioner_doc, date):
 	available_slots = []
 	slot_details = []
 	weekday = date.strftime('%A')
-	practitioner = None
+	practitioner = practitioner_doc.name
 
-	for schedule_entry in practitioner_schedules:
+	for schedule_entry in practitioner_doc.practitioner_schedules:
 		if schedule_entry.schedule:
 			practitioner_schedule = frappe.get_doc('Practitioner Schedule', schedule_entry.schedule)
 		else:
@@ -310,7 +301,7 @@
 					slot_name = schedule_entry.schedule
 					# fetch all appointments to practitioner without service unit
 					filters['practitioner'] = practitioner
-					filters['service_unit'] = ''
+					filters.pop('service_unit')
 
 				appointments = frappe.get_all(
 					'Patient Appointment',
diff --git a/erpnext/healthcare/utils.py b/erpnext/healthcare/utils.py
index 4bf0bdb..3c4e783 100644
--- a/erpnext/healthcare/utils.py
+++ b/erpnext/healthcare/utils.py
@@ -72,13 +72,12 @@
 			if not practitioner_exist_in_list:
 				valid_till = appointment.appointment_date + datetime.timedelta(days=int(valid_days))
 				visits = 0
-				validity = check_validity_exists(appointment.practitioner, appointment.patient)
-				if validity:
-					fee_validity = frappe.get_doc('Fee Validity', validity)
+				fee_validity = check_fee_validity(appointment)
+				if fee_validity:
 					valid_till = fee_validity.valid_till
 					visits = fee_validity.visited
-				fee_validity_details.append({'practitioner': appointment.practitioner,
-				'valid_till': valid_till, 'visits': visits})
+					fee_validity_details.append({'practitioner': appointment.practitioner,
+					'valid_till': valid_till, 'visits': visits})
 
 			if not skip_invoice:
 				practitioner_charge = 0
@@ -347,32 +346,39 @@
 		frappe.db.set_value(dt, doc_created, 'invoiced', invoiced)
 
 
-def check_validity_exists(practitioner, patient):
-	return frappe.db.get_value('Fee Validity', {'practitioner': practitioner, 'patient': patient}, 'name')
+def check_fee_validity(appointment):
+	validity = frappe.db.exists('Fee Validity', {
+		'practitioner': appointment.practitioner,
+		'patient': appointment.patient
+	})
+	if not validity:
+		return
+
+	fee_validity = frappe.get_doc('Fee Validity', validity)
+	appointment_date = getdate(appointment.appointment_date)
+	if fee_validity.valid_till >= appointment_date and fee_validity.visited < fee_validity.max_visits:
+		return fee_validity
 
 
 def manage_fee_validity(appointment_name, method, ref_invoice=None):
 	appointment_doc = frappe.get_doc('Patient Appointment', appointment_name)
-	validity = check_validity_exists(appointment_doc.practitioner, appointment_doc.patient)
+	fee_validity = check_fee_validity(appointment_doc)
 	do_not_update = False
 	visited = 0
-	if validity:
-		fee_validity = frappe.get_doc('Fee Validity', validity)
-		# Check if the validity is valid
-		if fee_validity.valid_till >= appointment_doc.appointment_date:
-			if method == 'on_cancel' and appointment_doc.status != 'Closed':
-				if ref_invoice == fee_validity.ref_invoice:
-					visited = fee_validity.visited - 1
-					if visited < 0:
-						visited = 0
-					frappe.db.set_value('Fee Validity', fee_validity.name, 'visited', visited)
-				do_not_update = True
-			elif method == 'on_submit' and fee_validity.visited < fee_validity.max_visits:
-				visited = fee_validity.visited + 1
+	if fee_validity:
+		if method == 'on_cancel' and appointment_doc.status != 'Closed':
+			if ref_invoice == fee_validity.ref_invoice:
+				visited = fee_validity.visited - 1
+				if visited < 0:
+					visited = 0
 				frappe.db.set_value('Fee Validity', fee_validity.name, 'visited', visited)
-				do_not_update = True
-			else:
-				do_not_update = False
+			do_not_update = True
+		elif method == 'on_submit' and fee_validity.visited < fee_validity.max_visits:
+			visited = fee_validity.visited + 1
+			frappe.db.set_value('Fee Validity', fee_validity.name, 'visited', visited)
+			do_not_update = True
+		else:
+			do_not_update = False
 
 		if not do_not_update:
 			fee_validity = update_fee_validity(fee_validity, appointment_doc.appointment_date, ref_invoice)
