I have a problem on patient appoitment it brings error
App Versions
{
"frappe": "16.24.1",
"erpnext": "16.25.0",
"payments": "0.0.1",
"hrms": "16.10.1",
"education": "16.0.1",
"healthcare": "16.2.0"
}
Route
Form/Patient Appointment/new-patient-appointment-njijkofbts
Traceback
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 121, in application
response = frappe.api.handle(request)
File "apps/frappe/frappe/api/__init__.py", line 63, in handle
data = endpoint(**arguments)
File "apps/frappe/frappe/api/v1.py", line 40, in handle_rpc_call
return frappe.handler.handle()
~~~~~~~~~~~~~~~~~~~~~^^
File "apps/frappe/frappe/handler.py", line 53, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
return frappe.call(method, **frappe.form_dict)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/__init__.py", line 1129, in call
newargs = get_newargs(fn, kwargs)
File "apps/frappe/frappe/__init__.py", line 1163, in get_newargs
parameters, variable_kwargs_exist = _get_cached_signature_params(fn)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
File "apps/frappe/frappe/__init__.py", line 1141, in _get_cached_signature_params
signature = inspect.signature(fn)
File "/usr/local/lib/python3.14/inspect.py", line 3312, in signature
return Signature.from_callable(obj, follow_wrapped=follow_wrapped,
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
globals=globals, locals=locals, eval_str=eval_str,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
annotation_format=annotation_format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/inspect.py", line 3027, in from_callable
return _signature_from_callable(obj, sigcls=cls,
follow_wrapper_chains=follow_wrapped,
globals=globals, locals=locals, eval_str=eval_str,
annotation_format=annotation_format)
File "/usr/local/lib/python3.14/inspect.py", line 2502, in _signature_from_callable
return _signature_from_function(sigcls, obj,
skip_bound_arg=skip_bound_arg,
globals=globals, locals=locals, eval_str=eval_str,
annotation_format=annotation_format)
File "/usr/local/lib/python3.14/inspect.py", line 2325, in _signature_from_function
annotations = get_annotations(func, globals=globals, locals=locals, eval_str=eval_str,
format=annotation_format)
File "/usr/local/lib/python3.14/annotationlib.py", line 890, in get_annotations
ann = _get_dunder_annotations(obj)
File "/usr/local/lib/python3.14/annotationlib.py", line 1059, in _get_dunder_annotations
ann = getattr(obj, "__annotations__", None)
File "apps/healthcare/healthcare/healthcare/doctype/patient_appointment/patient_appointment.py", line 701, in __annotate__
date: str, practitioner: str, appointment: str | dict | "PatientAppointment" | None = None
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for |: 'typing.Union' and 'str'
Request Data
{
"type": "POST",
"args": {
"practitioner": "HLC-PRAC-2026-00001",
"date": "2026-08-05",
"appointment": "{\"docstatus\":0,\"doctype\":\"Patient Appointment\",\"name\":\"new-patient-appointment-njijkofbts\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"[email protected]\",\"naming_series\":\"HLC-APP-.YYYY.-\",\"status\":\"\",\"appointment_for\":\"Practitioner\",\"company\":\"VOILENTHY HEALTH CARE UNIT\",\"add_video_conferencing\":0,\"invoiced\":0,\"appointment_based_on_check_in\":0,\"reminded\":0,\"appointment_time\":null,\"duration\":60,\"department\":\"Microbiology\",\"service_unit\":\"\",\"appointment_type\":\"Consultation appointment\",\"practitioner_name\":\"Doctor John jffjkfkjf\",\"practitioner\":\"HLC-PRAC-2026-00001\",\"patient_name\":\"James Member Member\",\"inpatient_record\":null,\"emergency_record\":null,\"patient_sex\":\"Male\",\"patient\":\"James Member Member\",\"patient_age\":\"14 Years(s) 2 Month(s) 25 Day(s)\",\"notes\":\"fugihiliuluoutfdtuyiluoljdrtdygugk\"}"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/healthcare.healthcare.doctype.patient_appointment.patient_appointment.get_availability_data",
"request_id": null
}
Response Data
{
"exception": "TypeError: unsupported operand type(s) for |: 'typing.Union' and 'str'",
"exc_type": "TypeError",
"_exc_source": "healthcare (app)"
}
help me