Private-equity firm Veritas Capital and hedge fund Elliott Management have agreed to acquire U.S. health-care software maker Athenahealth for about $5.7 billion in cash, the companies confirmed on Monday. Reuters had reported the deal was in the works on Sunday.