It sounds like you may have a urea cycle disorder, which involves a deficiency of one of six enzymes in the liver which transfer
ammonia from the blood into a harmless substance. An untreated urea
cycle disorder results in elevations of ammonia, which in turn causes changes in the brain, causing brain swelling, seizures, coma, and death. For someone who has recovered from the hyperammonemia, residua of damage affects cognitive function.