Jack has pretty much summed it up.
You can, legally, be fired for being away from your post for too long at a time or too many times.
It is possible, not definite but possible, that your condition may - may, not will - qualify as a disability under the ADA.
If so, then your employer must...