Libra Group Inc. of Rockville, a private company that provides computer management services to hospitals, will be acquired by National Data Corp. of Atlanta in a deal worth about $5.6 million, National Data announced yesterday.

Stewart Gold, sole owner of the Libra Group, will receive 250,000 shares of National Data common stock. In over-the-counter trading yesterday, National Data stock closed at 22 1/2, off 1/2, which would make the transaction worth about $5.6 million at those prices.

Both National Data and the Libra Group offer computer management services and software to chiefly government hospitals. The acquisition of Libra "makes our presence in the market considerably greater," said Jack Rootes, National Data's group vice president for finance.

Currently National Data's strength is in providing computer systems to manage a hospital's pharmaceutical operations, Rootes said, adding that in contrast, the Libra Group has developed its expertise in all areas of hospital operations.

National Data had revenue of about $120 million in fiscal year 1983, which ended in May, Rootes said. Health care services accounted for 6 percent of National Data's business, he added.

Rootes said National Data offers services in cash management, merchandise phone ordering, and authorization for credit card purchases, besides its work in the health field. The company has operations in major cities around the country as well as in 45 nations, he said.

Gold founded the Libra Group in the mid-1970s, said Curt Huff, vice president of finance for Libra, and it has grown to employ about 125 workers.

The group has three wholly owned subsidiaries, Libra Research, Libra Technology and Global Health Foundation, and offices in Rockville and San Antonio, plus personnel working in New York and California hospitals, Huff said.

Rootes said he expects the acquisition to be completed at the latest by the end of the year.

Rootes said it has not been decided whether Gold will obtain a chair on the National Data board. No management changes are planned, Rootes said.