Patient Appointment Error - tabLeave Application doesn't exist

Hi Healthcare experts.

I have a FrappeCloud (public) site with Healthcare using Frappe14 running.

When attempting to check availability slots for booking a patient with a healthcare practitioner, I receive the following error:

Table ‘.tabLeave Application’ doesn’t exist".

This seems like a fundamental mySQL issue rather than a configuration issue, any advice would be appreciated.

Full Trace:

### App Versions

{
“email_delivery_service”: “0.0.1”,
“erpnext”: “14.2.1”,
“frappe”: “14.9.0”,
“healthcare”: “0.0.1”,
“non_profit”: “0.0.1”,
“payments”: “0.0.1”
}

### Route

Form/Patient Appointment/new-patient-appointment-1

### 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 1585, in call
return fn(*args, **newargs)
File “apps/healthcare/healthcare/healthcare/doctype/patient_appointment/patient_appointment.py”, line 313, in get_availability_data
check_employee_wise_availability(date, practitioner_doc)
File “apps/healthcare/healthcare/healthcare/doctype/patient_appointment/patient_appointment.py”, line 342, in check_employee_wise_availability
leave_record = frappe.db.sql(“”"select half_day from tabLeave Application
File “apps/frappe/frappe/database/database.py”, line 207, in sql
self._cursor.execute(query, values)
File “env/lib/python3.10/site-packages/pymysql/cursors.py”, line 148, in execute
result = self._query(query)
File “env/lib/python3.10/site-packages/pymysql/cursors.py”, line 310, in _query
conn.query(q)
File “env/lib/python3.10/site-packages/pymysql/connections.py”, line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “env/lib/python3.10/site-packages/pymysql/connections.py”, line 775, in _read_query_result
result.read()
File “env/lib/python3.10/site-packages/pymysql/connections.py”, line 1156, in read
first_packet = self.connection._read_packet()
File “env/lib/python3.10/site-packages/pymysql/connections.py”, line 725, in _read_packet
packet.raise_for_error()
File “env/lib/python3.10/site-packages/pymysql/protocol.py”, line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File “env/lib/python3.10/site-packages/pymysql/err.py”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1146, “Table ‘_b745028ab7849835.tabLeave Application’ doesn’t exist”)

### Request Data

{
“type”: “POST”,
“args”: {
“practitioner”: “HLC-PRAC-2022-00001”,
“date”: “2022-10-04”
},
“freeze”: true,
“freeze_message”: “Fetching Schedule…”,
“headers”: {},
“error_handlers”: {},
“url”: “/api/method/healthcare.healthcare.doctype.patient_appointment.patient_appointment.get_availability_data”
}

### Response Data

{
“exception”: “pymysql.err.ProgrammingError: (1146, "Table ‘_b745028ab7849835.tabLeave Application’ doesn’t exist")”
}

Thanks in advance for your assistance, Warren

I installed Frappe HR with resolved my issue.

1 Like