Medical billing company Athenahealth Inc. (Nasdaq: ATHN) will buy Epocrates Inc. (Nasdaq: EPOC), a maker of mobile healthcare applications, for $293 million.

The purchase price works out to $11.75 per share in cash.

Athenahealth, headquartered in Watertown, Mass., provides medical groups with cloud-based electronic health records, as well as  patient management and communication services.

The company hopes to expand the network of doctors it serves through the transaction.

Piper Jaffray & Co. acted as San Mateo, Calif-based Epocrates financial adviser, and Cooley LLP served as legal counsel. Goodwin Proctor LLP handled legal matters for  Athenahealth.