A new portable gene therapy device could allow hospital pharmacies to create personalised medicines on demand, a new study says.