Los Angeles County health officials advised doctors to give up on testing patients in the hope of containing the coronavirus outbreak, instructing them to test patients only if a positive result could change how they would be treated.

The guidance, sent by the Los Angeles County Department of Public Health to doctors on Thursday, was prompted by a crush of patients and shortage of tests, and could make it difficult to ever know precisely how many people in L.A. County contracted the virus.

The department “is shifting from a strategy of case containment to slowing disease transmission and averting excess morbidity and mortality,” according to the letter. Doctors should test symptomatic patients only when “a diagnostic result will change clinical management or inform public health response.”

The guidance sets in writing what has been a reality all along. The shortage of tests nationwide has meant that many patients suspected of having COVID-19 have not had the diagnosis confirmed by a laboratory.

In addition to the lack of tests, public health agencies across the country lack the staff to trace the source of new cases, drastically reducing the chances of isolating people who have been exposed and thereby containing the outbreak.

For years, state and local health officials have been warning that steep cuts to federal grants meant to boost preparedness for a pandemic would mean there wouldn’t be enough equipment and staff on hand to respond in the crucial, early stage. Those fears have come to fruition now, officials said.

A front-line healthcare provider who was not authorized to speak to the media and requested anonymity said county doctors are interpreting Thursday’s letter and other advice coming from senior L.A. County public health officials to mean they should only test patients who are going to be hospitalized or have something unique about the way they contracted the virus.

They are not planning to test patients who have the symptoms but are otherwise healthy enough to be sent home to self-quarantine — meaning they may never show up in official tallies of people who tested positive.