Text this: Engineering a learning healthcare system