Connect with us

Vermont

Vermont hospitals are heading for bankruptcy. A plan to keep them afloat calls for dramatic changes

Published

on

Vermont hospitals are heading for bankruptcy. A plan to keep them afloat calls for dramatic changes


Vermont’s hospitals are in trouble. A new analysis found that the state’s hospitals would need as much as $3 billion in subsidies — from commercial insurance increases or taxpayers — to remain solvent over the next five years, if immediate steps aren’t taken.

That figure comes from a 142-page report outlining a plan to radically transform the state’s health care delivery system to bring down costs while continuing to provide access to care.

The report was mandated by statute and put together by the consulting firm Oliver Wyman, whose team conducted a series of meetings with thousands of patients, health care workers, hospital leaders and advocates over the past year.

“There is no hospital in Vermont that is not in jeopardy,” stressed Dr. Bruce Hamory, a consultant who specializes in redesigning health delivery and former infectious disease physician who led work on the report.

Advertisement

“You just can’t afford inaction,” he said at a presentation Wednesday to Vermont’s health care regulators, the Green Mountain Care Board.

Some of the headwinds facing the state’s costly health care system:

  • Commercial insurance rates are some of the highest in the country, and have increased by double digits for three years in a row, far outpacing the national average.
  • Most of the state’s 14 hospitals are operating at a loss, and those losses are expected to worsen in the coming years.
  • Vermont’s population is aging and shrinking, which will put further strain on the health care system and workforce.
  • Patients face long wait times for primary care and specialty care and have inadequate access to community based services, leading to expensive, sometimes unnecessary hospital visits.
  • Low-income households in rural areas face some of the greatest barriers to accessing care, stemming from a lack of affordable housing, transportation, and culturally competent care.

The report outlines a litany of recommendations to change the trajectory of health care finances in the state. Even with immediate action, experts caution it will take time to bring down commercial insurance rates.

“Probably two years minimum, if things really move,” Hamory said.

Restructure hospitals in the most dire financial straits

Four of Vermont’s hospitals — Grace Cottage Hospital in Townshend, Gifford Medical Center in Randolph, North Country Hospital in Newport and Springfield Hospital — have the most untenable finances based on the population they serve, according to the report.

Over the next three years, Oliver Wyman consultants say hospitals will need to close or reconfigure inpatient units to stay viable.

Advertisement

“Every prediction I can make, with every trick I know to pull, says that within three to five years, your bank will call the bill and close you,” Hamory said. “You need to be prepared.”

Some hospitals admit just one or two patients a day.

“The number of people really affected by not having in-patient acute care services is very small,” Hamory said.

That space and staff could be repurposed to provide other services, like mental health care, memory care, or skilled nursing facilities.

Advertisement

The report also suggests emergency departments could be converted to urgent care centers or shifted to a non-physician model.

Elodie Reed

/

Vermont Public

Advertisement
North Country Hospital, in a file photo from 2020. The report says that for the four hospitals it recommends suspending inpatient operations, nearby facilities are available to care for those patients at other hospitals, besides at North Country Hospital.

Closing inpatient services is a major concern for Mike Del Trecco, the head of the Vermont Association of Hospitals and Health Systems.

“For a hospital in the Northeast Kingdom, where are people going to go?” he said during a phone interview.

“This work is predicated on having out-patient community services available, and those don’t exist.”

The outgoing and incoming leaders of one of these hospitals, Gifford Medical Center, said they were also disappointed by many of the recommendations.

“While we knew this report to the state was coming, its contents are, frankly, shocking,” outgoing president and CEO Dan Bennett wrote in an emailed statement. “We will continue to advocate strongly for Gifford, for our patients, for our team members, for our future—to ensure Gifford is here to provide care in our region for generations to come.”

Advertisement

Michael Costa, who will lead Gifford starting in mid-October, added that the suggestions “have the potential to harm rural communities and some of the most vulnerable Vermonters.”

“I am particularly concerned that the report could reduce health care choices for Vermont’s women,” Costa wrote in an emailed statement.

In the report, Gifford Medical Center is cited as having a low volume of births attended by an obstetrician — though Gifford contends that the quality of that perinatal care is “exceptional” when compared against statewide data.

specialized equipment for a newborn baby

Joia Putnoi

Advertisement

/

Vermont Public

Specialized equipment for a newborn baby at Gifford Medical Center in December 2022.

Springfield Hospital CEO Robert Adcock echoed Gifford Medical Center’s concerns.

“We do not support a path that reduces access to care and requires our patients to travel great distances for critical health care needs,” Adcock wrote in an emailed statement. He added that hospital leadership is “open to any recommendations that improve access to care for patients, help grow our workforce, and support a thriving Springfield community.”

For other hospitals in the state, the report calls for expanding certain specialties and discontinuing low-volume procedures.

Advertisement

Del Trecco, with the Vermont Association of Hospitals and Health Systems, questioned the practicality of that idea. “These organizations that would be looked to to enhance or increase their capacity, they don’t have the physical plant, they don’t have the staffing,” he said.

“The savings of these recommendations have to be clearly studied, and frankly, the resources necessary to implement these recommendations also have to be studied,” he added.

A photo of a blue and red sign reading copley hospital main entrance emergency

Carly Berlin

/

Advertisement

Vermont Public and VTDigger

Copley Hospital in Morrisville on Oct. 19, 2023.

And rearranging where health care services are offered can have drawbacks for both patients and the people working in health care.

“We don’t want to pretend that health care professionals are interchangeable or easily moved or retrained,” Jessa Barnard, the executive director of the Vermont Medical Society, which advocates for physicians and PAs, said during a phone interview. “I do worry about the fear factor.”

Move care out of hospitals

Providing health care in a hospital setting is far more expensive than at a doctor’s office or at home. As many as a third of emergency department visits are avoidable at some hospitals if adequate community care was accessible, according to the report.

Shifting care away from hospitals, however, has already been a major focus of health care reform efforts.

Advertisement

“That’s been what we’ve been trying to do for a decade,” Owen Foster, the chair of the Green Mountain Care Board said at the meeting Wednesday.

“Yeah, and not very well,” Hamory responded.

Foster said the state needs to change its regulatory requirements to make it easier to build new health care projects like free-standing surgery centers, imaging centers, and birthing centers (Vermont is one of eight states that does not have a free-standing birthing center).

The report also calls for growing telehealth and home-based care, and expanding the roles of pharmacists in providing vaccines, refilling chronic medications, and treating common illnesses.

Advertisement

The hood of a white ambulance

Amy Kolb Noyes

/

Vermont Public File

The report calls for reforms to EMS operations in Vermont.

Emergency medical technicians could also provide an expanded role in health care delivery, but funding mechanisms needs to change, according to the report. Now, EMS crews are only paid if they transport a patient to the hospital; they don’t get money for a return trip or for transferring patients between hospitals, and their work needs to be regionalized.

“I know it is running into many of the same discussions about consolidating schools — Vermont has 79 or so different EMS crews,” Hamory said.

Advertisement

Invest in housing, transportation, broadband and out-patient services

To address issues of health equity, the report recommends increasing efforts to recruit and retain health care providers from diverse ethnic, language and religious backgrounds, and suggests investing in primary care, mental health facilities and substance misuse treatment that all populations can access.

That’s on top of addressing inadequate housing and transportation, which the report says should help Vermonters receive more regular care and avoid costly inpatient stays and emergency department visits.

“Many of those things are underway and have been underway for years,” state Sen. Ruth Hardy, a Democrat from East Middlebury, said at the Wednesday meeting, referencing legislation related to broadband, developing housing, and an ongoing EMS study committee.

But the current housing and transportation landscape is not adequate to support the recommended changes, said Del Trecco, with the Vermont Association of Hospitals and Health Systems.

“A key to this work, and it’s predicated on fixing housing, fixing transportation and having community outpatient services. We have none of those things in the four communities [where hospitals are recommended to close inpatient units], and very little in Vermont to begin with,” he said.

Advertisement

Rein in costs at Vermont’s largest hospital

The University of Vermont Medical Center drives more than half of the state’s commercial insurance spending on hospitals but does not provide adequate access to specialty services, according to the report.

It recommends the hospital hire external consultants to help it reduce administrative costs, eliminate specialty programs that don’t see enough patients, and improve physician productivity to be more in line with national standards.

It also says UVM Health Network should reevaluate whether its medical education and research programs are contributing to better health outcomes for Vermonters.

“The funds used for both these purposes come largely from clinical dollars generated from patient care, and most of those dollars are from commercial insurance premiums,” Hamory said.

Advertisement

A green and white awning with a sign that reads "The University of Vermont Medical Center - 1 South Prospect Street" marks the entrance to a multi-story brick building.

Zoe McDonald

/

Vermont Public

The University of Vermont Medical Center drives 56% of the state’s commercial insurance spending on hospitals, according to the Oliver Wyman report. Its physicians are spending about a third of their time on administrative roles and research duties, rather than seeing patients.

In an email Wednesday, UVM Medical Center spokesperson Annie Mackin wrote that upon initial review, the hospital agrees with a number of the Oliver Wyman report’s recommendations, including the focus on housing.

“So many challenges we are facing in health care, which are mirrored in other complex systems in our state, come back to our inability to attract and retain working Vermonters,” she wrote.

Advertisement

She added that the hospital disagrees with the portion of the report that cites high administrative costs, saying that it was “based on a flawed analysis of data.”

Mackin also wrote that UVM Medical Center is “proud to be an academic medical center, teaching the next generation of physicians here in Vermont, and conducting cutting-edge medical research.”

Next steps

Some are anticipating strong pushback to many of the details in the report.

“This is scary,” Mike Fisher, the state’s health care advocate, acknowledged at the meeting Wednesday.

“In the world of policy, it is easier to kill an idea than it is to pass a good idea,” he said. “I’m sure that is playing out today in messages to legislators and others.”

Advertisement

The exterior of Springfield Hospital, with a person walking toward the entrance carrying bags

Howard Weiss-Tisman

/

Vermont Public File

Springfield Hospital in 2019.

Hamory stressed the need for immediate action.

Advertisement

“Starting tomorrow, the convening of communities and hospitals to plan for and implement the needed changes in health care delivery must begin,” he said.

That includes specific actions items for Vermont lawmakers, the Agency of Human Services (AHS) and the Green Mountain Care Board (GMCB):

In the Legislature, the consultants recommend lawmakers continue actions like:

  • Remove barriers for new housing.
  • Expand broadband coverage to rural areas for EMS transport.
  • Fund an overhaul of EMS services so they are regionalized.
  • Expand professional licensure for nurses, EMTs and pharmacists.

At the Agency of Human Services, the report says:

  • Specialty care and EMS services should be regionalized.
  • Care management should be better coordinated, including through statewide electronic medical records.

And for the Green Mountain Care Board, the report instructs:

  • Streamline its regulatory processes.
  • Do not license any more hospital-based outpatient units.
  • Encourage free-standing diagnostic, heart disease and birthing centers.
  • Start to move toward pricing that’s 200% of Medicare levels, or less.

Have questions, comments or tips? Send us a message.





Source link

Advertisement

Vermont

Tourism Leaders To Gather In Killington For Vermont Tourism Summit

Published

on

Tourism Leaders To Gather In Killington For Vermont Tourism Summit


Tuesday, April 28-Wednesday, April 29 —KILLINGTON— The Killington Grand Resort Hotel & Conference Center will host the 41st Annual Vermont Tourism Summit, bringing together business owners, operators, and industry professionals from across the state for two days focused on collaboration, strategy, and growth within Vermont’s tourism economy.



Source link

Continue Reading

Vermont

Vermont residents remain concerned over potential environmental provisions

Published

on

Vermont residents remain concerned over potential environmental provisions


This week, a bill that would make changes to Vermont’s Act 181 is receiving testimony in the House Committee on Environment. Certain provisions in Act 181 could trigger a permitting process through Vermont’s land use protection law, Act 250. A rule related to road building and some lands identified as “critical natural resource areas” by the state’s land use review board are expected to take effect this year. Last month, legislation passed the Senate and is currently in the House to push those deadlines back by a few years. For Corinth resident Neil Ryan, that not enough. “The group of people that was largely left out of the process: Rural Vermonters are having this imposed upon them with no say,” he said. Ryan and his family have built their own farms for generations. He believes if the provisions take effect, it would be very difficult for future generations to accomplish what he has. “The difficulty of the Act 250 process, the costs associated with the Act 250 process, we wouldn’t have started those farms likely,” he said. However, Ryan said he does support the portion of Act 181 that allows towns to opt into being exempt from the permitting process altogether. This is meant to assist housing development. On Tuesday, regional planning commissions told lawmakers that many towns have opted in. Still, Vermont is not on track for its goal of 40,000 + homes by 2030. “We’re not saying rural housing growth should stop or slow,” Executive Director of the Northwest RPC Catherine Dimitruk said. “Were saying those additional units that we need, we should be doing all we can to encourage and incentivize.”The bill will remain in House environment for the foreseeable future.

This week, a bill that would make changes to Vermont’s Act 181 is receiving testimony in the House Committee on Environment.

Certain provisions in Act 181 could trigger a permitting process through Vermont’s land use protection law, Act 250.

Advertisement

A rule related to road building and some lands identified as “critical natural resource areas” by the state’s land use review board are expected to take effect this year.

Last month, legislation passed the Senate and is currently in the House to push those deadlines back by a few years. For Corinth resident Neil Ryan, that not enough.

“The group of people that was largely left out of the process: Rural Vermonters are having this imposed upon them with no say,” he said.

Advertisement

Ryan and his family have built their own farms for generations. He believes if the provisions take effect, it would be very difficult for future generations to accomplish what he has.

“The difficulty of the Act 250 process, the costs associated with the Act 250 process, we wouldn’t have started those farms likely,” he said.

However, Ryan said he does support the portion of Act 181 that allows towns to opt into being exempt from the permitting process altogether. This is meant to assist housing development.

On Tuesday, regional planning commissions told lawmakers that many towns have opted in. Still, Vermont is not on track for its goal of 40,000 + homes by 2030.

“We’re not saying rural housing growth should stop or slow,” Executive Director of the Northwest RPC Catherine Dimitruk said. “Were saying those additional units that we need, we should be doing all we can to encourage and incentivize.”

Advertisement

The bill will remain in House environment for the foreseeable future.



Source link

Continue Reading

Vermont

Hour-by-hour: See when to expect steady snow Tuesday in Vermont, New York

Published

on

Hour-by-hour: See when to expect steady snow Tuesday in Vermont, New York


Roads will turn slippery mid-morning through mid-afternoon

Advertisement

Hour-by-hour: See when to expect steady snow Tuesday in Vermont, New York

Roads will turn slippery mid-morning through mid-afternoon

Advertisement

NBC5 meteorologists expect a burst of steady snow to arrive Tuesday morning in Vermont and northern New York, lasting through the early-mid afternoon. Deteriorating road conditions will lead to slow travel for several hours, with some improvement expected by the evening commute.Watch the video above to see the timeline for your area.

NBC5 meteorologists expect a burst of steady snow to arrive Tuesday morning in Vermont and northern New York, lasting through the early-mid afternoon.

Advertisement

Deteriorating road conditions will lead to slow travel for several hours, with some improvement expected by the evening commute.

Watch the video above to see the timeline for your area.

Advertisement

`;
}

function refreshWeatherIframe(containerId) {
var iframeId = ‘weather-iframe-‘ + containerId;
var iframe = document.getElementById(iframeId);
if (iframe && iframe.src) {
var originalSrc = iframe.src;
iframe.src = originalSrc + (originalSrc.indexOf(‘?’) > -1 ? ‘&’ : ‘?’) + ‘t=” + Date.now();
}
}

Advertisement

function initializeWeatherBox(container) {
var containerId = container.getAttribute(“data-container-id’);
var isWeatherBoxV2 = containerId === ‘home-weather-v2’;

function switchWeatherTab(tabName, clickedElement) {
container.querySelectorAll(‘[data-tab-id]’).forEach(function(tab) {
tab.classList.remove(‘open’);
tab.setAttribute(‘aria-selected’, ‘false’);
});

clickedElement.classList.add(‘open’);
clickedElement.setAttribute(‘aria-selected’, ‘true’);

container.querySelectorAll(‘[data-content-id]’).forEach(function(content) {
content.style.display = ‘none’;
content.setAttribute(‘hidden’, ‘true’);
});

var targetContent = container.querySelector(‘[data-content-id=”‘ + tabName + ‘”]’);
if (targetContent) {
targetContent.style.display = ‘block’;
targetContent.removeAttribute(‘hidden’);
}
}

Advertisement

function loadWeatherData() {
// If weather data is already being loaded, wait for it
if (window.weatherDataPromise) {
window.weatherDataPromise.then(function(data) {
if (data && data.data) {
var weatherContainer = container.closest(‘.weather-box-container’);
if (weatherContainer) {
weatherContainer.style.display = ‘flex’;
updateCurrentWeather(data.data);
updateForecastTabs(data.data);
updateWeatherAlertsBar(data.data);
}
}
});
return;
}

var location = { zip: window.DEFAULT_ZIPCODE };

try {
var storedLocations = localStorage.getItem(‘hrst.zip.history’);
if (storedLocations) {
var locations = JSON.parse(storedLocations);
if (locations && locations.length > 0) {
location = locations[0];
}
}
} catch (e) {}

var apiUrl = (window.DEWY_HOSTNAME || ”) + ‘/api/v1/weather/full/’ + location.zip;

if (window.fetch) {
window.weatherDataPromise = fetch(apiUrl)
.then(function(response) { return response.json(); })
.then(function(data) {
if (data && data.data) {
var article = container.closest(‘.article–wrapper’);
var weatherContainer = container.closest(‘.weather-box-container’);
if (weatherContainer) {
weatherContainer.style.display = ‘flex’;
updateCurrentWeather(data.data);
updateForecastTabs(data.data);
updateWeatherAlertsBar(data.data);
}
return data;
}
})
.catch(function(error) {
console.error(‘Error loading weather:’, error);
// Reset to unknown background on error
updateWeatherBackground(‘unknown’);
});
}
}

Advertisement

function updateWeatherAlertsBar(weatherData) {
var weatherWatchHeader = container.querySelector(‘.weather-watch-header’);
if (!weatherWatchHeader) return;

var weatherWatchText = weatherWatchHeader.querySelector(‘.weather-watch-text’);
var weatherWatchLink = weatherWatchHeader.querySelector(‘.weather-watch-link’);

if (weatherData.alerts_count > 0) {
weatherWatchHeader.className=”weather-watch-header has-alerts”;
if (weatherWatchText) {
weatherWatchText.textContent = `Weather Alerts (${weatherData.alerts_count})`;
}
if (weatherWatchLink) {
if (!weatherWatchLink.getAttribute(‘data-initial-href’)) {
weatherWatchLink.setAttribute(‘data-initial-href’, weatherWatchLink.getAttribute(‘href’));
weatherWatchLink.setAttribute(‘data-initial-onclick’, weatherWatchLink.getAttribute(‘onclick’) || ”);
}
weatherWatchLink.setAttribute(‘href’, “https://www.mynbc5.com/alerts”);
weatherWatchLink.setAttribute(‘onclick’, “return handleWeatherLinkClick(event, ‘click_alerts’, ‘click’, ‘mobile-weather’, “https://www.mynbc5.com/alerts”);”);
}
} else {
weatherWatchHeader.className=”weather-watch-header”;
if (weatherWatchText) {
weatherWatchText.textContent = containerId === ‘home-weather-v2’ ? ‘Watch Latest Forecast’ : ‘Latest Forecast’;
}
if (weatherWatchLink) {
var initialHref = weatherWatchLink.getAttribute(‘data-initial-href’);
var initialOnclick = weatherWatchLink.getAttribute(‘data-initial-onclick’);
if (initialHref) {
weatherWatchLink.setAttribute(‘href’, initialHref);
}
if (initialOnclick) {
weatherWatchLink.setAttribute(‘onclick’, initialOnclick);
}
}
}
}

function updateCurrentWeather(weatherData) {
if (weatherData.current) {
var tempValue = weatherData.current.temp_f || ”;
var skyValue = weatherData.current.sky || ”;
var feelsLikeValue = weatherData.current.feels_like_f || weatherData.current.temp_f || ”;

var tempEl = container.querySelector(‘.weather-grid–current-temp-value’);
if (tempEl) {
tempEl.textContent = tempValue;
tempEl.setAttribute(‘aria-label’, tempValue + ‘ degrees Fahrenheit’);
}

Advertisement

var iconEl = container.querySelector(‘.weather-grid–current-icon’);
if (iconEl && weatherData.current.icon_name) {
iconEl.className=”weather-grid–current-icon weather-current-icon icon icon-weather-” + weatherData.current.icon_name;
}

var skyEl = container.querySelector(‘.weather-grid–sky’);
if (skyEl) {
skyEl.textContent = skyValue;
skyEl.setAttribute(‘aria-label’, ‘Current condition: ‘ + skyValue);
}

var feelsEl = container.querySelector(‘.weather-grid–feels’);
if (feelsEl) {
feelsEl.textContent = feelsLikeValue + ‘°F’;
feelsEl.setAttribute(‘aria-label’, feelsLikeValue + ‘ degrees Fahrenheit’);
}

var weatherContainer = container.querySelector(‘.weather-temp-container’);
if (weatherContainer) {
var summary = ‘Current temperature ‘ + tempValue + ‘ degrees Fahrenheit, ‘ +
skyValue + ‘, feels like ‘ + feelsLikeValue + ‘ degrees’;
weatherContainer.setAttribute(‘aria-label’, summary);
}

updateWeatherBackground(weatherData.current.icon_name);
}
}

Advertisement

function updateWeatherBackground(iconName) {
try {
var bgPath = weatherImages.backgrounds[iconName] || weatherImages.backgrounds.unknown;
container.style.backgroundImage=”url(” + bgPath + ‘)’;
} catch (e) {
console.log(‘Error updating weather background:’, e);
}
}

function updateForecastTabs(weatherData) {
var visibleItems = isWeatherBoxV2 ? 6 : 5;

if (weatherData.hourly) {
var hourlyContainer = container.querySelector(‘.weather-hourly-forecast’);
if (hourlyContainer) {
var html=””;
var maxHours = Math.min(visibleItems, weatherData.hourly.length);

for (var i = 0; i 0 ? currentIndex – 1 : tabs.length – 1;
tabs[prevIndex].focus();
break;
case ‘ArrowRight’:
e.preventDefault();
var nextIndex = currentIndex

`;
}

Advertisement

function refreshWeatherIframe(containerId) {
var iframeId = ‘weather-iframe-‘ + containerId;
var iframe = document.getElementById(iframeId);
if (iframe && iframe.src) {
var originalSrc = iframe.src;
iframe.src = originalSrc + (originalSrc.indexOf(‘?’) > -1 ? ‘&’ : ‘?’) + ‘t=” + Date.now();
}
}

function initializeWeatherBox(container) {
var containerId = container.getAttribute(“data-container-id’);
var isWeatherBoxV2 = containerId === ‘home-weather-v2’;

function switchWeatherTab(tabName, clickedElement) {
container.querySelectorAll(‘[data-tab-id]’).forEach(function(tab) {
tab.classList.remove(‘open’);
tab.setAttribute(‘aria-selected’, ‘false’);
});

clickedElement.classList.add(‘open’);
clickedElement.setAttribute(‘aria-selected’, ‘true’);

container.querySelectorAll(‘[data-content-id]’).forEach(function(content) {
content.style.display = ‘none’;
content.setAttribute(‘hidden’, ‘true’);
});

Advertisement

var targetContent = container.querySelector(‘[data-content-id=”‘ + tabName + ‘”]’);
if (targetContent) {
targetContent.style.display = ‘block’;
targetContent.removeAttribute(‘hidden’);
}
}

function loadWeatherData() {
// If weather data is already being loaded, wait for it
if (window.weatherDataPromise) {
window.weatherDataPromise.then(function(data) {
if (data && data.data) {
var weatherContainer = container.closest(‘.weather-box-container’);
if (weatherContainer) {
weatherContainer.style.display = ‘flex’;
updateCurrentWeather(data.data);
updateForecastTabs(data.data);
updateWeatherAlertsBar(data.data);
}
}
});
return;
}

var location = { zip: window.DEFAULT_ZIPCODE };

try {
var storedLocations = localStorage.getItem(‘hrst.zip.history’);
if (storedLocations) {
var locations = JSON.parse(storedLocations);
if (locations && locations.length > 0) {
location = locations[0];
}
}
} catch (e) {}

var apiUrl = (window.DEWY_HOSTNAME || ”) + ‘/api/v1/weather/full/’ + location.zip;

Advertisement

if (window.fetch) {
window.weatherDataPromise = fetch(apiUrl)
.then(function(response) { return response.json(); })
.then(function(data) {
if (data && data.data) {
var article = container.closest(‘.article–wrapper’);
var weatherContainer = container.closest(‘.weather-box-container’);
if (weatherContainer) {
weatherContainer.style.display = ‘flex’;
updateCurrentWeather(data.data);
updateForecastTabs(data.data);
updateWeatherAlertsBar(data.data);
}
return data;
}
})
.catch(function(error) {
console.error(‘Error loading weather:’, error);
// Reset to unknown background on error
updateWeatherBackground(‘unknown’);
});
}
}

function updateWeatherAlertsBar(weatherData) {
var weatherWatchHeader = container.querySelector(‘.weather-watch-header’);
if (!weatherWatchHeader) return;

var weatherWatchText = weatherWatchHeader.querySelector(‘.weather-watch-text’);
var weatherWatchLink = weatherWatchHeader.querySelector(‘.weather-watch-link’);

if (weatherData.alerts_count > 0) {
weatherWatchHeader.className=”weather-watch-header has-alerts”;
if (weatherWatchText) {
weatherWatchText.textContent = `Weather Alerts (${weatherData.alerts_count})`;
}
if (weatherWatchLink) {
if (!weatherWatchLink.getAttribute(‘data-initial-href’)) {
weatherWatchLink.setAttribute(‘data-initial-href’, weatherWatchLink.getAttribute(‘href’));
weatherWatchLink.setAttribute(‘data-initial-onclick’, weatherWatchLink.getAttribute(‘onclick’) || ”);
}
weatherWatchLink.setAttribute(‘href’, “https://www.mynbc5.com/alerts”);
weatherWatchLink.setAttribute(‘onclick’, “return handleWeatherLinkClick(event, ‘click_alerts’, ‘click’, ‘sidelist-weather’, “https://www.mynbc5.com/alerts”);”);
}
} else {
weatherWatchHeader.className=”weather-watch-header”;
if (weatherWatchText) {
weatherWatchText.textContent = containerId === ‘home-weather-v2’ ? ‘Watch Latest Forecast’ : ‘Latest Forecast’;
}
if (weatherWatchLink) {
var initialHref = weatherWatchLink.getAttribute(‘data-initial-href’);
var initialOnclick = weatherWatchLink.getAttribute(‘data-initial-onclick’);
if (initialHref) {
weatherWatchLink.setAttribute(‘href’, initialHref);
}
if (initialOnclick) {
weatherWatchLink.setAttribute(‘onclick’, initialOnclick);
}
}
}
}

function updateCurrentWeather(weatherData) {
if (weatherData.current) {
var tempValue = weatherData.current.temp_f || ”;
var skyValue = weatherData.current.sky || ”;
var feelsLikeValue = weatherData.current.feels_like_f || weatherData.current.temp_f || ”;

Advertisement

var tempEl = container.querySelector(‘.weather-grid–current-temp-value’);
if (tempEl) {
tempEl.textContent = tempValue;
tempEl.setAttribute(‘aria-label’, tempValue + ‘ degrees Fahrenheit’);
}

var iconEl = container.querySelector(‘.weather-grid–current-icon’);
if (iconEl && weatherData.current.icon_name) {
iconEl.className=”weather-grid–current-icon weather-current-icon icon icon-weather-” + weatherData.current.icon_name;
}

var skyEl = container.querySelector(‘.weather-grid–sky’);
if (skyEl) {
skyEl.textContent = skyValue;
skyEl.setAttribute(‘aria-label’, ‘Current condition: ‘ + skyValue);
}

var feelsEl = container.querySelector(‘.weather-grid–feels’);
if (feelsEl) {
feelsEl.textContent = feelsLikeValue + ‘°F’;
feelsEl.setAttribute(‘aria-label’, feelsLikeValue + ‘ degrees Fahrenheit’);
}

var weatherContainer = container.querySelector(‘.weather-temp-container’);
if (weatherContainer) {
var summary = ‘Current temperature ‘ + tempValue + ‘ degrees Fahrenheit, ‘ +
skyValue + ‘, feels like ‘ + feelsLikeValue + ‘ degrees’;
weatherContainer.setAttribute(‘aria-label’, summary);
}

Advertisement

updateWeatherBackground(weatherData.current.icon_name);
}
}

function updateWeatherBackground(iconName) {
try {
var bgPath = weatherImages.backgrounds[iconName] || weatherImages.backgrounds.unknown;
container.style.backgroundImage=”url(” + bgPath + ‘)’;
} catch (e) {
console.log(‘Error updating weather background:’, e);
}
}

function updateForecastTabs(weatherData) {
var visibleItems = isWeatherBoxV2 ? 6 : 5;

if (weatherData.hourly) {
var hourlyContainer = container.querySelector(‘.weather-hourly-forecast’);
if (hourlyContainer) {
var html=””;
var maxHours = Math.min(visibleItems, weatherData.hourly.length);

for (var i = 0; i 0 ? currentIndex – 1 : tabs.length – 1;
tabs[prevIndex].focus();
break;
case ‘ArrowRight’:
e.preventDefault();
var nextIndex = currentIndex

Advertisement

Loading more articles…



Source link

Continue Reading

Trending