Dr. D. programmed software to calculate the diets. The exact algorithms are proprietary, so we don't know exactly how it is done. He is always reading new studies and other literature as well as treating patients to continuously gather input. We do know that there are some 200 variables taken into account for each food based on how each types needs differ based on different reactivity, etc.