A patient with type I diabetes is admitted with vomiting and…