NHS Lothian confirmed it was investigating the cases of cryptosporidiosis which were traced to Craigies Farm in South Queensferry.
The parasitic infection, linked to farm animals, can cause diarrhoea, vomiting and stomach cramps and can be serious for young children.
Dr Graham Mackenzie, NHS Lothian public health consultant, said: “We are working closely with colleagues in hospital and primary care to ensure that if any further cases arise they receive appropriate and timely care.”
READ MORE: Live updates as Scots take to the polls
The health board said environmental health officers were working closely with the visitor attraction.
Dr Mackenzie added: “Infection can be picked up by touching or petting animals or through contact with fields, fences, gates and buildings where animals have been kept.
“We generally see a seasonal increase in cryptosporidiosis cases in springtime and all cases are investigated to identify a source.
READ MORE: Reform UK plan would create constitutional and legal crisis, warns expert
“To reduce the risk of infection it is important to wash your hands after contact with animals or areas where they are kept.”
Craigies has a petting farm where visitors can visit and feed lambs.
It is reported that the business, which also operates a cafe, farm shop and deli, has remained open since the cases were identified.
Cryptosporidiosis, caused by the parasite cryptosporidium, can be carried by a wide range of farm animals including sheep, cattle, pigs and goats.