NextGen Healthcare Inc. NXGN announced Wednesday an agreement to be acquired by private-equity firm Thoma Bravo in a deal that values the health records software company about about $1.61 billion. Under terms of the deal, NextGen shareholders will receive $23.95 a share in cash for each NextGen share they own. That represents a 16.5% premium to Tuesday’s closing price of $20.55. The company has 67.02 million shares outstanding as of July 21. The stock, which was currently halted for news, rose 6.3% on Tuesday after Bloomberg reported a buyout deal was near. The deal is expected to close in the fourth quarter of 2023….