Apps That Can Alert the Doctor When Trouble Looms For many patients with chronic medical conditions like depression, pain or diabetes, the pattern is predictable: The more they suffer, the more they draw inward. Doctors may not see them until they are in crisis and show up in an emergency room. Now a digital-era solution is emerging. When patients withdraw, their cellphones may reach out for them. The phones use an app that tracks how often they send text messages and place calls, and how often they move and where they go. If their habits and patterns deviate in a way that suggests they've become withdrawn, the app alerts a doctor or other caregiver to check in. A handful of hospitals and medical centers have recently begun testing and using the technology, with financial backing for these digital flares coming from medical chains, the United States military and insurance companies. The novel approach relies on technology that is increasingly standard on smartphones: global positioning systems and accelerometers that can track location and movement. "It's a potential human early-warning system, the body's check-engine light," said Michael Seid, a professor of pediatrics at Cincinnati Children's Hospital Medical Center. Since last year, 15 patients with chronic gastrointestinal trouble have carried the phones to test the software's effectiveness. The results so far indicate that some patients clearly change their communication and movement patterns in the days before the onset of severe symptoms. When your pain increases, you're less likely to be at the park or the mall. It could be early indicators of a flare-up or worsening of the disease," Dr. Seid said. The technology, he added, "measures social behavior at a scale and depth you just didn't have before." The software is still being tested and studied for its effectiveness. But mental health experts and researchers say it shows great promise - not just for spotting worsening conditions, but also for picking up on behavior changes that suggest someone has stopped taking medication or needs a dosage change. "It could provide an important new tool in a fairly empty toolbox," said Dr. Adam I. Kaplin, a professor of psychology and neurology at Johns Hopkins. I have concerns, but can say, emphatically, they've put their finger on the need to catch these people before they go down the rabbit hole. Dr. Kaplin's concerns include whether such systems might send alerts that people may be sick when they're not, such as people who aren't depressed or in pain but simply have downtime, or perhaps the flu. If so, will that add costs, rather than alleviating them? And, he said, patients might fear they are being overly monitored. "When does big data become Big Brother?" he said. The companies and researchers behind the technology say they are aware of the privacy concerns. But they note that the patients must consent, and that the information goes only to health professionals or to designated family members. They also say it's too early to gauge what effect it will have on doctors and how they work with patients. The technology is part of a field often referred to as "big data" that captures and sifts through enormous amounts of data to better understand and predict behavior, like buying patterns, stock-market movements and conditions that can lead to military conflict. In the health field, researchers in labs across the country are pursuing a host of big-data technologies, including ways to better assess patient behaviors and measure drug effectiveness. One of the leading research centers in the field has been the M.I.T. Media Lab, where Alex Pentland, a professor of human dynamics, oversees the entrepreneurship program. He says the idea of collecting patient movements and communications could give doctors more accurate evidence of behavior than relying on patients' memory or efforts to describe their problems. "Humans are not just bad at it, they're terrible at it, and they're biased in so many ways," he said of patient self-assessment. The data from the phones "is a true God's-eye view of what we're doing." But Dr. Pentland added that the data must also be refined and understood so that, when someone appears to be withdrawing, the information is not misleading. "Maybe the guy is going to kill himself, or maybe he's going to write the classic American novel," he said. One of the companies with roots in the Media Lab is Ginger.io, which is providing the technology at Cincinnati Children's Hospital, along with larger deployments set to start this month at hospitals in North Carolina that are part of Novant Health, one of the nation's largest health care companies. Dr. Matthew Gymer, the director of innovation at Novant, said he wanted to see how well the technology performed in alerting caregivers to potential behavior changes in thousands of patients with different conditions, including diabetes, chronic pain and heart disease. "The reality is that as we march through life, there's a fairly predictable pattern to where we go and what we do," he said. If that pattern is broken in an unannounced way, something could be wrong. Cogito, another company with ties to the media lab, has begun a large-scale trial of the technology with the V.A. Boston Health Care System, part of the Department of Veterans Affairs, backed by the Defense Department and Raytheon, a military contractor. The test tries to measure whether a soldier might be headed for post-traumatic stress disorder by identifying periods of withdrawal or mania, said Joshua Feast, the founder of Cogito. Mr. Feast said a big focus of the research was to identify which measures were most effective at identifying and predicting illnesses like depression. Deborah Estrin, a computer science professor at U.C.L.A., is working on a small trial with chronic pain patients at the University of California, Davis, to see whether data drawn from patients' cellphones can show whether they are suddenly sedentary, a possible indication of intensifying pain, or even that someone is not taking their medication. Ms. Estrin said the promising early research points to possibilities like increasingly personalized treatments based on assessments of individual patterns of behavior. Doctors could better understand how a particular treatment, medication or dosage affects a patient. "I'm very excited, but there is work to be done," she said, adding: "If health was easy, we wouldn't be so sick."