New app will enhance the quality of mental-health treatment by helping family doctors to track their patients’ moods over time.