As governments fumbled their coronavirus response, these four got it right. Here's how.

Updated 8:38 AM ET, Thu April 16, 2020

London (CNN)Like a line of dominoes, country after country has been shut down by the novel coronavirus. Despite signs the threat was making its way across the globe, there was a clear pattern of response in many parts of the world -- denial, fumbling and, eventually, lockdown.

In our globalized world, it's puzzling that so few lessons were learned in the early weeks of each country's outbreak, when the chances of containing and stopping the virus were highest. Now the focus is on flattening the curve, or slowing the virus' spread, to keep death tolls from climbing further.
As much of the world mulls gradually lifting lockdowns, there are still lessons to be learned from these four places that got it right. Here are 12 of those lessons.

Taiwan

Sitting just 180 kilometers (110 miles) off the coast of mainland China, Taiwan's outbreak could have been disastrous. At the end of January, the island was estimated to have had the second-highest number of cases in the world, according to Johns Hopkins University (JHU). 
But Taiwan, with a population of around 24 million people, has recorded just over 390 cases and six deaths, and yesterday, it reported no new cases at all. It's managed to do that without implementing severe restrictions, like lockdowns, or prolonged school and nursery closures.
In terms of its death toll, at least, Taiwan doesn't even have much of a curve to flatten, more of a line with a couple of rigid steps.
Compare that to the United States -- now the world's hardest-hit nation, at least in raw numbers -- which has reported at least 26,000 deaths. Even when you take population size into account, a level of success like Taiwan's could have meant just 83 deaths in the US.
Although Taiwan has high-quality universal health care, its success lies in its preparedness, speed, central command and rigorous contact tracing.
Lesson #1: Be prepared
Taiwan's preparedness came largely from some hard-learned lessons from the Severe Acute Respiratory Syndrome (SARS) outbreak in 2003, which killed 181 people on the island.
As a result, the island established a specialized Central Epidemic Command Center, which could be activated to coordinate a response in the event of an outbreak. In a sign of how Taiwan wanted to get ahead of the coronavirus, the center was activated on January 20, a day before the island even confirmed its first infection.
Because its authority was already established, the center was able to implement stringent measures without being slowed down by lengthy political processes. It put more than 120 action items into place within three weeks, according to a list published by the Journal of the American Medical Association (JAMA). That list alone could serve as a manual on exactly what to do during an outbreak.
Lesson #2: Be quick
Taiwan's action came well before its first Covid-19 infection was confirmed on January 21. Three weeks before, within days of China's first reported case to the World Health Organization (WHO), Taiwanese officials began boarding and inspecting passengers for fever and pneumonia symptoms on flights from Wuhan, the original epicenter of the virus in China. The island issued a travel alert for Wuhan on January 20, and two days later, still with just a single case, officials began updating the public in daily briefings.
A week after its first case, Taiwan began electronic monitoring of quarantined individuals via government-issued cell phones, and announced travel and entry restrictions, mostly targeting China's Hubei province, of which Wuhan is the capital. Just about every day after until the end of February, the government implemented new measures to keep the virus at bay.
Taiwan had only 329 cases when it imposed strict social distancing measures on April 1. In comparison, there were already 335 deaths and more than 3,000 cases on March 20, when Prime Minister Boris Johnson announced that pubs and restaurants were to close, and that most children would be pulled from schools and nurseries. And as the UK is not testing widely, the true number of infections is believed to be much higher than official figures show.
Soldiers from the military's chemical units take part in a drill to help slow the coronavirus' spread in the Xindian district near Taipei on March 14
Lesson #3: Test, trace and quarantine
Authorities carried out widespread testing and tracing the contacts of infected people, putting them all under quarantine. It proactively tested anyone who got off cruise ships and even retested people diagnosed with influenza or pneumonia, to make sure they hadn't been misdiagnosed and were infected with coronavirus.
Lesson #4: Use data and tech
"A coordinated government response with full collaboration of its citizenry [was] combined with the use of big data and technology," associate professor of pediatrics at Stanford Medicine, Jason Wang, told CNN. Wang has also studied public health policy and co-authored the JAMA report on Taiwan's response.
Taiwan merged national health insurance data with customs and immigration databases to create real-time alerts to help identify vulnerable populations.
"Having a good health data system helps with monitoring the spread of the disease and allows for its early detection. When someone sees a physician for respiratory symptoms, the national health insurance database will have a record of it. It is easier to track clusters of outbreaks," Wang said.
Taiwan used mandatory online reporting and check-ins for 14 days after travel restrictions. It also employed "digital fencing" for close to 55,000 people in home quarantine, where alarms would sound if a quarantined person wandered too far from home. The technical surveillance methods used in Taiwan and by other governments have raised privacy concerns from civil society groups.

Iceland

Getting a coronavirus test in many countries can be near impossible, unless you're already very ill. Not so in Iceland, where anyone who wants a test gets one. Widespread testing has been crucial to the country's low number of infections and deaths, authorities there say. Only around 1,700 people have been infected in Iceland, and only eight have died.
Lesson #5: Be aggressive
Iceland's response to the coronavirus hasn't been particularly innovative. It's just been meticulous and quick. Like Taiwan, its speed has meant it hasn't had to be too restrictive -- people can still meet in groups of up to 20, if they stay two meters away from each other. While universities are closed, schools and nurseries are still open, allowing more parents to work.
"From the beginning, since we diagnosed our first case, we worked according to our plan. Our plan was to be aggressive in detecting and diagnosing individuals, putting them into isolation, and to be very aggressive in our contact tracing. We used the police force and the healthcare system to sit down and contact trace every newly diagnosed case," Iceland's chief epidemiologist Thorolfur Gudnason told CNN.
"We are finding that above 60% of new cases are in people already quarantined. So that showed that contact tracing and quarantining contacts was a good move for us," Gudnason said.
Saebraut road in the Icelandic capital, Reykjavik, on April 3, as a ban on gatherings of more than 20 people is in effect.