I'm sorry to hear about this. I hope you get well soon.
1) What kind of bike?
2) Fixed or single speed?
3) If you felt occasional slippage, why did you not investigate?
It sounds like you dropped your chain either due to a really loose chain or perhaps flexing the rear of the bike which can severely move the chainline. The latter is possible if you are a big or strong rider and the bike isn't very stiff.