A variant of the Rapidly Extended Random Tree (RRT*) algorithm is proposed when studying the global path planning of mobile robots in a hospital with multiple obstacles and disordered environments. In the sampling process, the algorithm adopts the target bias sampling combined with the sampling constraint strategy to guide the sampling points, and then combines the artificial potential field (APF) in the node expansion process to introduce attraction and repulsion to accelerate the growth of the random tree towards the target point. , and finally perform path optimization on the initial planning path, that is, pruning and smoothing, to improve the problem of path redundancy and tortuousness. Experiments show that the algorithm retains the characteristics of RRT random sampling flexibility and is also goal-oriented. Moreover, it reduces the cost of path planning and improves its smoothness, and accelerates the convergence of the algorithm, which makes it have advantages in the complex environment of the hospital.