There are a couple of common vectors to bring thee parasites into your tank. It could have already had the worm on arrival. These parasites tunnel under the skin and don't become visible, usually, until they're adults. Live feeders could have introduced the parasite (these worms are not just spread by fish but, also by birds). Of course, any new W/C introductions could have brought the parasite in. Especially with Dats. They seem to be at an unusually high risk of becoming hosts to many parasites.