New York City has recently overtaken Silicon Valley in 2016 startup funding for digital healthcare ventures, with $868 million in the pot. And just in the nick of time! This sector is poised to become more innovative than ever by virtue of necessity, as the repeal of the Affordable Care Act is on the congressional agenda and Medicaid funding disputed in the budget. With waves of retiring Baby Boomers in need of medical attention, and younger patients demanding more control over their health portfolios, the healthcare industry is badly in need of reform.

The increasing investment pool from the past few years has led to innovation beyond biotech, a particularly resource and regulation-intensive industry. As Fast Company reports, “It can take up to a decade for new products to get regulatory approval, and that requires clinical trials, well-funded research studies, and more.”

Venture capital investment in digital healthcare from the past few years has sometimes gone awry, however. The traditional Silicon Valley mantra “ask for forgiveness, not permission” has led healthcare entrepreneurs to run afoul of regulators, a significant and immovable fixture of the industry. By taking shortcuts to growth and profit, like many other Silicon Valley-style startups, healthcare entrepreneurs have compromised on compliance, which has led to setbacks.

Catching up on compliance and satisfying regulators can be “resource-intensive and time-consuming.” To do healthcare tech right, you need to–for example–take into account HIPAA rules protecting patient privacy and add extra layers of security. It can be especially challenging for health entrepreneurs to scale as quickly as they’d like due to various regulatory requirements and privacy concerns. Meanwhile their investors–used to Silicon Valley startups–expect a quicker return on their investments than these healthcare entrepreneurs can usually deliver.

Now, it is more readily acknowledged that digital healthcare startups will have to deal with the same regulatory issues that probably led entrepreneurs to incept and invent in the first place. Theranos, Zenefits, and 23andMe are among the casualties of this catch-22. According to Skip Fleshman, a digital health investor with Asset Management Ventures, “‘The tech community isn’t used to dealing with studies, FDA approval, publications, and reimbursement.”

Many startup incubators have formed specifically to guide and mentor startups in the healthcare sector, like New York’s aptly-named Startup Health. The National Business Incubation Association reports a 40% increase over the past three years in the number of accelerators in the state of New York.

Blueprint Health takes a 6% share of its startups and provides office space, mentoring, fundraising help, and investor connections. Their startup portfolio includes RubiconMD, putting rural doctors in touch with specialists; AdhereTech, makers of a self-regulating pill bottle; and DocDelta, a company specializing in healthcare staffing.

The New York Digital Health Accelerator directly connects startups to hospitals. Hospital leadership from 17 New York institutions choose and mentor the participants, also awarding funding in the form of $100,000. Founded in 2012, the accelerator has worked with 21 companies, raising $230 million upon completion of the five-month program.

Recent years have drawn a learning curve, both for healthcare entrepreneurs and their investors. More than 70% of New York deals in 2012 were for made early fundraising rounds: seed and angel. But CB Insights reports that investors are tempering their expectations: “The NYC metro area appears to be pulling back from very early-stage digital health deals and transitioning towards less speculative investments.”

That said, New York still beat Silicon Valley for deals involving early rounds of funding in 2016, 55% to 47%. And a healthy funnel seems to be forming: funding for Series B rounds doubled, and Series C deals grew to 7%. Oscar Health–a New York-based insurer–secured one of those Series C deals for $400 million, helping it put New York past Silicon Valley. Flatiron Health also raised a significant portion of the investment funds: $175 million to develop an oncology-based digital database platform. So with the help of adapted accelerators, New York healthcare startups are figuring out how to make it work in a big way.