Medicines system will boost care across homes