Can you receive unemployment benefits in Texas if you were fired due to absences for medical reasons?

I have had to take a lot of time off from work because of chronic back pain, i am close to be written up for absences, and don't think I can continue in my postion it is very physical I see a doctor quite often. My job is not a good fit for me physically, please help.