In China, going to the hospital typically means that one could spend hours queuing for a consultation that lasts for just minutes. Now, a hospital in the southern metropolis of Guangzhou is looking to relieve the problem with artificial intelligence.

The Guangzhou Second Provincial Central Hospital has incorporated AI into almost every area in its operations, including patient pre-diagnosis, CT scans, organizing patient records, and transporting operating-room supplies, the hospital said this week (link in Chinese).

The country—which is challenging the US to be the world’s preeminent AI powerhouse—hopes that robots can go some way in fixing the severe problem of doctor shortages. China has 2.3 physicians for every 1,000 people as of 2016, compared with Switzerland’s 4.25 and the UK’s 2.83, while its rapidly aging population is only adding more pressure to the health care system. Chinese tech titan Tencent and one of the country’s leading voice-recognition firms, iFlytek, are among the companies working with the Guangzhou hospital.

The number of robotic patents has soared in China.

Using WeChat, the chat app owned by Tencent, users can get a pre-diagnosis through the hospital’s public account. An “intelligent doctor” will ask the patient a series of questions, similar to a self-diagnosis attempt on WebMD. The program will then make a recommendation based on the user’s answers. In one case, a 23-year-old woman, surnamed Zeng was asked 24 queries (link in Chinese), according to a local media report. Zeng thought her long-time abdomen pain was related to her digestive system, but the AI tool told her to see a gynaecologist.

To build the database, the hospital said it spent nearly two years to study more than 100,000 of its digital medical records spanning 12 years. The hospital also trained the AI tool using data from over 300 million medical records (link in Chinese) dating back to the 1990s from other hospitals in China. The tool has an accuracy rate of over 90% for diagnoses for more than 200 diseases, it said.

The hospital also uses facial recognition to create files for first-time patients. After recording a short video, the system will match an image extracted from the video to one that is stored in China’s national public security system.

However, even as AI continues to develop in China’s hospitals, the MIT Technology Review noted that there is little discussion in the country over who is responsible if an AI makes a wrong diagnosis, for example. And AI is only able to pick up some of the slack—a robot in China recently passed the country’s medical license examination, becoming the first robot in the world to pass a national medical license exam. In the end, however, the robot still needed a real doctor to sign off on reports and prescriptions.