SACRAMENTO — An effort to ease a shortage of primary-care doctors in some California communities by letting nurse practitioners operate more independently has flat-lined in the Legislature after a fierce lobbying battle. A bill by Sen. Ed Hernandez (D-West Covina) would have allowed nurse practitioners, who have more training than registered nurses, to practice without the direct supervision of a physician. The proposal failed in a committee Friday, under fire from the California Medical Assn., the powerful lobbying arm for the state's physicians. The organization teamed with some specialists and labor unions to mobilize lobbyists, engage doctors across the state and even dedicate Twitter accounts as it waged its campaign against the bill.