The New Jersey Board of Medical Examiners and Senate President Richard J. Codey are working to extricate the state's outpatient surgical centers from a difficult legal position. A judge ruled last year that doctors who owned a center in North Jersey were violating a heretofore unenforced state law prohibiting self-referral. The board, which regulates the centers, is now proposing an emergency amendment to its regulations that would sidestep the issue of self-referral by broadening the definition of a doctor's medical office.