Governor Deval Patrick, in a State House ceremony, signed a sweeping bill on Monday that seeks to rein in the state’s rising health costs.The first-in-the nation legislation is considered the second phase of the groundbreaking universal healthcare law that was signed by Governor Mitt Romney in 2006. The new law allows health spending to grow no faster than the state’s economy through 2017. For five years after that, spending would slow further, to half a percentage point below the growth of the economy, although leaders would have the power under certain circumstances to soften that target. The bill also includes provisions to encourage a shift to paying hospitals and doctors for overall patient care rather than for every test and treatment.