All of Maine’s acute-care hospitals have agreed to participate in statewide network that allows health care providers to share and view patients’ health records electronically.

HealthInfoNet, a Portland nonprofit that operates the health records exchange, announced Tuesday that 34 of the state’s hospitals already are connected to the system and four more are under contract to connect by the end of the year.

The exchange was launched in July 2009.

Maine is one of just a few states to have all of its hospitals connected to a health records exchange that allows providers to securely find and request information about patients from other providers, according to HealthInfoNet.

The federal government and many medical providers have urged the adoption of electronic health records as a way to improve patient care. Timely sharing of patient information is expected to help avoid hospital readmissions, medication errors, duplicate testing and improve diagnoses.

In other states, competition among hospitals has forced health information exchanges to slow the rollout of systems like HealthInfoNet, said Devore Culver, HealthInfoNet’s CEO.

“We’re lucky in Maine,” he said in a press release. “Our hospitals and ambulatory provider systems have chosen not to compete on patient data and agreed early on that creating a centralized system was in the best interest of patients.”

In addition to Maine’s hospitals, HealthInfoNet is connected to 376 ambulatory provider sites including primary and specialty care practices, federally qualified health centers, mental health agencies, home-health and long-term care providers.

The four hospitals under contract to connect to the exchange are Redington-Fairview Hospital in Skowhegan, Waldo County General Hospital in Belfast, York Hospital in York, and Northern Maine Medical Center in Fort Kent.

Hospitals that already are connected can choose to both share and view information or only view it. The majority of hospitals and larger physician practices are both sharing and viewing information, according to HealthInfoNet.

Throughout 2013, HealthInfoNet plans to expand the types of data shared by participating hospitals and continue to connect new ambulatory sites.