Medtronic said on Tuesday it would buy privately held CathWorks in a deal valued at up to $585 million, as it looks to bolster its heart devices portfolio by adding a new diagnostic tool that could improve care standards.