That phone app keeping track of your exercise and meals might keep you out of the hospital one day.

Why give your doctors permission to incorporate data from fitness trackers and health apps into electronic patient records? Well, they might spot signs of an ailment sooner and suggest behavioral changes or medication before you land in the emergency room. They also might be able to monitor how you're healing from surgery or whether you're following a treatment regimen.

"Right now we only see our patients for about a 15-minute visit in the office, and it's a very constricted view," said Dr. Lauren Koniaris, a specialist in pulmonary critical care at Hackensack University Medical Center in New Jersey. "This really globalizes the view of their health status, so that we're really in contact with them on a much more daily if not hour-to-hour basis. It's almost like a virtual house call."

At Hackensack, a handful of patients at risk for heart failure are asked to use a fitness tracker to count steps walked and flights climbed. They are also asked to record what they eat — by photographing the product's bar code, for instance — using a phone app that has a database containing nutrition information on food items. Using Apple's new HealthKit technology, data from the various trackers and apps get transferred to the Epic MyChart app on the iPhone. From there, the information goes to the hospital's records system.

Hackensack wants to expand to more patients and start tracking blood pressure and amount of sleep, too. But the hospital first needs to ensure that teams are in place to review the glut of data coming in. More broadly, there's also a question of whether these trackers and app really improve patient care, and consumer privacy and security issues to address. The University of California, San Francisco, is studying which gadgets are reliable and whether that reliability extends to patients with extreme conditions. Then they have to figure out which data are really meaningful — not just noise.

Many doctors and hospitals see potential. The Mayo Clinic uses Fitbit trackers to monitor hip-replacement patients for a month after surgery. Health workers get data on daily steps and can tell when patients have trouble walking — a hundred or more miles away. The Ochsner Health System in New Orleans is turning to wireless scales and blood-pressure devices to help reduce readmissions for chronic diseases such as heart failure. Not only can doctors intervene sooner, they can use the data to show how exercise can help lower blood pressure. "If we're going to succeed in improving health, we have to get patients more engaged in their care," said Dr. Richard Milani, a cardiologist at Ochsner.