For many years, service members who were leaving the military have had to worry about whether their medical records would be properly transferred from one vast computer network in the Defense Department to another in the Department of Veterans Affairs. Now, the two departments have agreed to develop a joint computerized system for health care records that could provide a single source of data on a veteran's health from enlistment through death, officials said. The move is one of several that suggest the two departments are moving closer to unifying parts of their sprawling health care systems, which handle more than 15 million active-duty troops, retirees, veterans and their families. The agreement comes after a February report by the Government Accountability Office found that the departments were lagging in developing a shared system for electronic records. That report said both departments had spent billions of dollars upgrading their data systems in ways that did not increase coordination between their systems, and it recommended that they improve their "joint strategic planning."