A patient suffering from a rare disease in France has to wait an average of two years before being diagnosed. This medical wandering is highly detrimental both for the health system and for patients whose pathology may worsen. There exists an efficient network of Centres of Reference for Rare Diseases (CRMR), but patients are often referred to these structures too late. We are considering a probabilistic modelling of the patient pathway in order to create a simulator that will allow us to create an alert system that detects wandering patients and refers them to a CRMR while considering the potential additional costs associated with these decisions.