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.

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.