The deal that brought together two of Birmingham's largest health companies was nearly a year in the making.