A glitch related to a health-records system run by the U.S. Department of Veterans Affairs forced the network offline in some locations, the latest hiccup in the agency’s yearslong effort to replace a system developed in the 1980s.

The problem, discovered last week during a software upgrade, forced the agency to shut the system down for nearly 21 hours between Thursday and Friday as it investigated the issue, said Terry Adirim, program executive director of the Veterans Affairs Electronic Health Record Modernization Integration...

A glitch related to a health-records system run by the U.S. Department of Veterans Affairs forced the network offline in some locations, the latest hiccup in the agency’s yearslong effort to replace a system developed in the 1980s.

The problem, discovered last week during a software upgrade, forced the agency to shut the system down for nearly 21 hours between Thursday and Friday as it investigated the issue, said Terry Adirim, program executive director of the Veterans Affairs Electronic Health Record Modernization Integration Office.

Terry Adirim, program executive director of the Veterans Affairs Electronic Health Record Modernization Integration Office.

Photo: Department of Veterans Affairs

Operations at the agency’s Mann-Grandstaff VA Medical Center in Spokane, Wash., and associated clinics, and the Central Ohio Healthcare System in Columbus, Ohio, were affected. Staff at the agency’s Mann-Grandstaff and associated clinics used paper records during the outage. Urgent-care clinics remained open and no surgeries were halted, according to a spokesman.

As many as 205 patient records were affected by the glitch, later discovered to be linked to a system that acts as an interface between the health-records system and identity-management systems. A coding defect resulted in demographic errors in some patient records, Dr. Adirim said.

The glitch is the latest difficulty in the VA’s yearslong, $16.1 billion rollout of a new electronic health records system developed by Cerner Corp. The initial October 2020 deployment at Mann-Grandstaff resulted in errors in patients’ allergy, medication and immunization data, according to a Government Accountability Office report. In July, an Office of Inspector General audit questioned the reliability of some cost estimates associated with the project.

Cerner, which has been collaborating with the VA on the rollout, declined to comment.

The VA’s new chief information officer, Kurt DelBene, recently said that improved delivery on the electronic health records modernization project hinged on “preparedness in terms of having very clear checklists of what constitutes ready to roll.”

Melissa Swift, U.S. transformation leader at Mercer, a consulting unit of Marsh & McLennan Cos., said the challenge with implementing such a wide-ranging technology modernization effort is that the system needs to interact with a host of other technology platforms and processes at the same time, opening up possibilities for problems.

“It really does have to do with the fact that technological systems are facing off against other complex systems,” Ms. Swift said.

Dr. Adirim said Veterans Affairs is currently reviewing all patient records that might contain demographic errors, with the goal to have them corrected by the end of the week. The department is taking stock of the cause of the disruption to prevent recurrences in the future, she said.

Write to Suman Bhattacharyya at Suman.Bhattacharyya@wsj.com