SACRAMENTO — California has made progress in protecting the healthcare system from a dramatic spike of sick patients during the COVID-19 pandemic.

But state public health officials are still planning for a worst-case scenario, quietly publishing a sobering set of detailed guidelines to answer the troubling ethical question of who lives and who dies should California face a new surge in the coronavirus outbreak, resulting in a shortage of ventilators and medical supplies.

A 38-page document by the California Department of Public Health, published last weekend, prescribes a method to prioritize patients in the event that an outbreak overwhelms hospitals, preserving intensive care beds and ventilators for people with the greatest likelihood of surviving with treatment over those with serious chronic conditions that limit their life expectancy. If necessary, younger people and workers who are “vital to the acute care response” would receive care before others.

“As your state public health officer, the gravity of what is contained within this document is felt deeply,” wrote Dr. Sonia Angell, director of the California Department of Public Health, in a letter that accompanies the guidelines. “The conversations that will be prompted by its release will be difficult.”

Gov. Gavin Newsom has taken unprecedented executive action in an attempt to prevent the spread of the coronavirus, and officials say limited hospitalizations compared with other states offer signs that the most populous state in the nation may avoid a situation in which the plan would be implemented. But some countries have experienced second waves of infections, demonstrating that California could be vulnerable if restrictions are eased prematurely or people begin to ignore social distancing orders.

“If we pull back too quickly, those numbers will go through the roof,” Newsom said.

Angell said officials are “cautiously optimistic” that adherence to the stay-at-home order and efforts to increase hospital beds will prevent the California healthcare system from being overrun with sick patients.

“We have seen the devastating impact that COVID-19 has had on healthcare delivery systems and communities in other countries and states,” she said. “As such, it is critically important that our state‘s healthcare system is prepared in case of the worst-case scenario.”

The state developed the guidelines over the last several weeks in consultation with hospitals, physicians and other healthcare groups, relying on scientific studies, best practices and other models to address one of the most difficult medical problems of modern times.

In Italy, scarce resources forced doctors to make life-and-death healthcare rationing decisions. Other states have adopted their own crisis care guidelines in anticipation of medical needs exceeding hospital resources.

State health officials in Minnesota, for example, advised hospitals to ration supplies based on the risk of mortality, the likelihood of a positive response to treatment and the possibility of transmitting infection, among other factors. Colorado adopted a tiered scoring system, with decisions based initially on the severity of acute illness, morbidity and measures of chronic illness, before prioritizing pediatric patients, healthcare workers and first responders.

Planning for the worst raises uncomfortable ethical questions, but it’s also important to create a thoughtful, uniform policy so doctors don’t end up making decisions in the moment, said Democratic state Sen. Richard Pan, a doctor who represents Sacramento.

“That’s where the rubber meets the road,” Pan said. “You can put [guidelines] out and have people discuss them, or if you don’t have them when the crisis comes, each person at the bedside is figuring it out for themselves. At least we have standards and an opportunity to discuss it. If everyone stays home and we continue to flatten the curve, then hopefully we won’t get to the point where we have to make these decisions.”

Under the “California State SARS-CoV-2 Crisis Care Guidelines,” hospitals are ultimately responsible for making their own emergency plans with the discretion to rely on the judgment of hospital leaders. Before launching plans around allocating ventilators and other treatments, hospitals must first make every effort to increase their supply, the guidelines say.

The Department of Public Health said the guidelines are meant to serve as a framework for healthcare facilities as they shift from regularly providing optimum care for the individual patient to “doing the greatest good for the greatest number” of patients as staff, beds, medication, equipment and other resources become scarce across the state during a crisis, according to the document.

The guidelines recommend that hospitals identify indicators and triggers to help them recognize warning signs and the need to shift the type of healthcare provided from conventional to contingency and ultimately crisis care.

Hospitals are advised to develop a team to make determinations on who receives care. In one example, dying patients or patients with a poor prognosis in need of resources that are in limited supply should receive palliative care, largely limited to treating symptoms, and healthcare providers are advised to “minimize interventions that prolong death.” The care team would reassess the prognosis of all patients at regular intervals to determine the best way to direct care.

An appendix to the guidelines on “ventilator management” calls for hospitals to give patients a priority score and determine who will receive intensive care with a focus on “saving the most lives and saving the most life-years.”

“Patients who are more likely to survive with intensive care are prioritized over patients who are less likely to survive with intensive care,” the guidelines say. “Patients who do not have serious comorbid illness are given priority over those who have illnesses that limit their life expectancy.”

The scoring system would assess potential organ failure risk and the presence of life-limiting conditions to determine prognoses for hospital survival and longer-term survival. For example, major life-limiting chronic diseases, such as moderate Alzheimer’s disease or moderately severe chronic lung disease, would add two points to someone’s score. Chronic diseases likely to cause death within a year’s time, such as severe Alzheimer’s disease or severe chronic lung disease, could add four points.

Total scores would range from one to eight, with priority for ventilators given to those with lower scores. If there are not enough resources to treat all patients with the same score, the guidelines suggest hospitals group patients by age — 12 to 40, 41 to 60, 61 to 75, and older than 75 — and treat younger people first.

“The ethical justification for incorporating the life-cycle principle is that it is a valuable goal to give individuals equal opportunity to pass through the stages of life — childhood, young adulthood, middle age and old age,” the document says. “The justification for this principle does not rely on considerations of one’s intrinsic worth or social utility. Rather, younger individuals receive priority because they have had the least opportunity to live through life’s stages.”

In addition, the document says that people whose work is “vital to the public health response, including all those whose work directly supports the provision of acute care to others, should be given heightened priority” to settle a “tie” between patients who can’t all be treated. Hospitals could eventually turn to a random lottery should such a tie still exist.

The guidelines provide recommendations for how hospitals should inform patients and their families about decisions to limit care and allow for a swift appeals process based largely on whether any errors were made in determining a score.

Anticipating a peak in infections to begin in May, California officials have sought 50,000 more beds and 10,000 more ventilators beyond the state’s regular supply.

Hospitalizations due to COVID-19 remain below state predictions in California, with fewer than 1,500 patients who contracted the virus or are suspected of being infected receiving intensive care treatment. If all goes according to plan, the peak may end up similar to current infection rates, according to Dr. Mark Ghaly, the state’s secretary of health and human services.

To prevent a situation in which Californians begin to ignore his stay-at-home order, causing cases to surge, Newsom has warned that residents should continue to stay home, and pushed back on pressures to ease restrictions from some local governments and frustrated protesters.

During a legislative hearing Monday, the administration presented a chart showing a sharp spike in hospitalizations if the stay-at-home order was lifted.

While the state is flattening the curve, it’s still possible that hospitals may not have the necessary resources to provide maximum care for every patient, said Carmela Coyle, president of the California Hospital Assn. The hospital association and the California Medical Assn. were among the healthcare groups that helped inform the new state guidelines.

“We are living through a time that no one called to work in healthcare ever wants to endure,” Coyle said in a statement. “These guidelines are a good start to help plan for difficult decisions that may have to be made.”