instruction: How many patients diagnosed with diabetic ketoacidosis type i (juvenile type) and not stated as uncontrolled had clinical chemistry tests?
response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Diabetes with ketoacidosis, type I [juvenile type], not stated as uncontrolled" AND lab."CATEGORY" = "Chemistry"