A basis for the theory of medicine