Dynamic Learning of Patient Response Types: An Application to Treating Chronic Diseases