Partners HealthCare System Inc. reported substantially higher earnings yesterday for the three months ended June 30, crediting better investment performance, research revenue increases, and modest growth in patient discharges at its chain of Boston-area hospitals. Third-quarter net income was $51.7 million, compared to a $4.8 million loss in the same period last year, when Boston-based Partners suffered from a decline in the value of its interest-rate swaps, financial hedges it bought to lock in future rates for debt financing. This year, Partners, the region's largest hospital and doctors network, posted an operating margin -- the difference between its revenues and expenses -- of 3.8% in the April-to-June quarter, up from 2.7% in the corresponding quarter last year. But Partners' vice president of finance, Peter K. Markell, said he expects growth to slow in the fourth quarter, and Partners to register a full-year margin close to last year's 2.4%.