They've had the infrastructure and plans to deal with this since SARS.
They take your temperature everywhere, if you get a fever you go to a fever clinic (not a regular doctors office) for more tests. You can usually find out later that day if you have corona virus and if you do, you don't get to self quarantine because that could infect family and room-mates. You get taken to a quarantine hospital and you stay there until you're better. They also blocked the roads in and out of all the cities with many cases.
On top of all this, they could very well be lying about their death toll.