Talk to the doctor
Who is treating your parent's hip or call a mental health professional.
Talk to your parent about his/her thoughts & feelings. Be empathic, not critical/judgmental. Provide or arrange help with tasks & encourage reasonable activities & interaction with supportive people. Help your parent feel useful while limited.