Complex sentence: While being treated at the regimental hospital the doctor discovered her sex; she was discharged from the army and told to go home.
Split into simpler sentences: While being treated at the regimental hospital the doctor discovered her true sex. She was discharged from the army and told to go home.