For the past decade, Dr. Joseph A. Grocela has tinkered in the basement workshop of his Weston home, coming up with inventions. Now he’s in a legal fight with the hospital where he practices, Massachusetts General Hospital, and its corporate parent, Partners HealthCare System Inc., over who owns the rights to those creations and others. In a lawsuit filed in Suffolk Superior Court, Grocela, 47, says he was told by Frances Toneguzzo, the top official at Partners' licensing division, that Mass. General "trained you, we pay you, we own your brain and therefore own all your ideas."