In Legends, taking a midi-chlorian test was apparently a common part of early childhood care on planets within the Republic:
Although the method by which the ancient Jedi detected potential Force-users was almost lost to time, records indicate that the Jedi—shortly after the battle of Ruusan—either discovered or rediscovered the existence of midi-chlorians, microscopic life-forms that reside within all living cells and communicate with the Force to reveal its will. Midi-chlorians can be detected by a simple blood test, and a high midi-chlorian count indicates great potential as a Jedi. The Great Holocron confirms that the Jedi relied upon this blood-analysis method up until the Jedi Purge.
While some beings considered it an honor to have their child become a member of the Jedi Order, others likened the Jedi to baby snatchers. However, records indicate that most parents—after being educated about the myriad risks and responsibilities of raising Force-sensitive children—were genuinely relieved to relinquish their offspring to the resourceful Jedi.
(Source: Jedi vs. Sith: The Essential Guide to the Force, page 57)