Freeman Health System said Thursday that it has reached an agreement to buy four Northwest Arkansas hospitals.