From San Francisco to Massachusetts, local and state health departments across the country have begun rolling out efforts to stem the spread of the coronavirus by tracing the contacts of those who have tested positive for COVID-19, the disease it causes.

The initiative, known as contact tracing, aims to first locate the infected person, log where they went and with whom they've been in contact, then follow up with those contacts to see how they are feeling, if they have been tested and to determine if they should quarantine.

The desired outcome: break the chains of transmission of the contagious disease, empower health departments to know where it resides in a community, and ultimately, use that knowledge to know where and in what capacity to lift isolation orders and reopen the economy.

More from NBC News:

While contact tracing on a national level could cost in the billions of dollars and require hiring more than 100,000 people, public health experts say it's an important step, along with increased testing, to stopping the spread of the virus. To accomplish this, a combination of interviewing the infected — whether by telephone, text or a mobile app — and technology, including using smartphones, to track and monitor people will be needed.

San Francisco plans to use a workforce of 140 people, including medical students from the University of California, San Francisco, librarians and staff from the city attorney's office, to go through lists of people who have tested positive for the virus and interview them. Such laborious sleuthing has been done in the past to understand outbreaks of HIV, sexually transmitted diseases and other respiratory illnesses, including SARS.

As the 15th-largest city in the United States, with more than 880,000 residents, San Francisco currently has more than 1,100 COVID-19 cases and recorded at least 20 deaths as of Monday, comparatively lower numbers that reflect what officials say has been a "flattening of the curve."

Every clinician in the city who cares for someone with COVID-19 and every laboratory that processes a positive test must report the case to the Department of Public Health, which is how San Francisco is building out its database of contacts.

The city's health department is employing software developed by Dimagi, a Massachusetts-based tech company. The firm says its real-time tool isn't tracking people through Bluetooth technology, as tech giants are proposing to do, but rather allows the contact tracers to follow a set of prompts during interviews and keep a queue of cases and the status for each.

The city's public health director, Dr. Grant Colfax, said that participation in contact tracing is voluntary and no one will be asked about their immigration status or for their Social Security number or bank details. While English and Spanish language options are available, he added that the system would also include Cantonese, Mandarin and Tagalog.