In October, CVS Corp. will open Massachusetts' first retail medical clinics in Medway and Tewksbury, after the state Department of Public Health approved licenses for the first two clinics. The decision follows more than a year of debate about whether to allow convenient care in Massachusetts and strong opposition from doctors. CVS has applied for licenses for medical clinics in 26 additional stores, and Walgreens Pharmacy has submitted plans for competing clinics in 15 of its Massachusetts stores.