The excess of ketone bodies will cause metabolic acidosis, the later is also aggravated by Lactic acidosis caused by dehydration & poor tissue perfusion.
Vomiting due to an ileus, plus increased insensible water losses due to tachypnea will worsen the state of dehydration.
Electrolyte abnormalities are 2ry to their loss in urine & trans-membrane alterations following acidosis & osmotic diuresis.