Using technology to keep people out of hospital