A Puerto Rican surgeon has pleaded guilty to giving the Food and Drug Administration phony data on two diarrhea medicines, including one intended for children aged 2 to 11.

Dr. Julio A. Ortiz, 59, medical director of a hospital in Humacao, P.R., faces a maximum penalty of 10 years in prison and a $20,000 fine when he is sentenced on June 17 for fraudulent drug testing.

He pleaded guilty Tuesday to two counts.

Ortho Pharmaceutical Corp. of Raritan, N.J., paid Ortiz at least $6,000 for tests--using children--of liquid Imodium, which the Johnson & Johnson division has not put on sale. A.H. Robins Co. of Richmond paid him at least $16,000 to test the safety and effectiveness of Diarest for continued over-the-counter marketing to both adults and children.

He sent fake data to the Clinical R&D Services Corp. of Wayne, N.J., for relay to the drug companies and the FDA, according to court testimony.

Ortiz claimed to have tried Imodium on more than 60 children at the hospital, but FDA investigator Doralie L. Segal testified that in three trips to Puerto Rico to investigate she could find not one child who actually took the drug.

A 37-month-old boy he claimed to have treated for diarrhea turned out, Segal said, to be a 23-month-old boy who had never had the malady and who had gone to the hospital to have a flower removed from his nose.