If you have a doctor's note, you can get out of gym no problem. I'm surprised they still have gym classes in California, by the way - I thought when they cut property taxes all of that extraneous stuff like gym, art, music, etc. went out the window.
Anyways, if you do need to lose weight, you need to watch what you're eating. A famous female singer, Kelly Clarkson, lost 30 pounds from eating clean. She claimed she didn't workout. Look into that since you don't want to exercise