The phrase has its roots in WW2. When a soldier came into a medical facility with a limb or multiple limbs detatched from his body, the nurses would call the patient a "basket case". As in they had to bring the soldier to them in a basket.
Modern day usage is to describe someone that is in need of extreme assistance(mental or physical).
Well Marge they brought in another basket case, a grenade blew off his legs.