Mike raises a good point that bears repeating:
If you are on orders for 30 days or more, ALL injuries, diseases, or conditions are compensable unless you are AWOL when it is incurred or the injury is due to intentional misconduct or willful negligence (think drunk driving), or it is shown that your disease pre-existed your military service. It does not matter if you are on leave, out of uniform, or off base. When I think of this, I think of it in relationship to time.
At the VA they talk about service-connection as being the basis for compensation. This has both a time element (if it is incurred in service, similar to the above) but also a causal connection (e.g., Servicemember falls in the Air Force and hurt his knees. 20 years later, after leaving the
AF, his back hurts as a result of his knees not working correctly = service connection). Since many older veterans establish SC after their military service is over, the causal connection is much more important. It is not important in military cases, unless you are fighting out causation due to misconduct issues (a whole other area that is complicated).