If you've ever struggled to access your medical information, like a lab test or immunization, Apple is trying to make your life easier. On Wednesday, the company is releasing the test version of a new product that lets users download their health records, store them safely and show them to a doctor, caregiver or friend. "We view the future as consumers owning their own health data," Apple Chief Operating Officer Jeff Williams said in an interview with CNBC. It all works when a user opens the iPhone's health app, navigates to the health record section, and, on the new tool, adds a health provider. From there, the user taps to connect to Apple's software system and data start streaming into the service. Patients will get notified via an alert if new information becomes available.

In June, CNBC first reported on Apple's plans, including early discussions with top U.S. hospitals. The company confirmed that it has contracts with about a dozen hospitals across the country, including Cedars-Sinai, Johns Hopkins Medicine, Penn Medicine and the University of California, San Diego. The medical information available will include allergies, conditions, immunizations, lab results, medications, procedures and vitals. The information is encrypted and protected through a user's iPhone passcode. "Apple doesn't see the data unless the consumer chooses to share it," Williams said. Regulators and patient advocates have for years pushed for data-sharing standards within the medical sector to make it easier for records to flow between hospitals and doctors' offices. The lack of interoperability has made it a challenge for consumers to access high-quality care and has led to unnecessary medical errors.

Improving the experience

Apple is working with electronic medical record companies, notably Epic Systems, Cerner and AthenaHealth, to make it easier for people to view that information on the iPhone. That way, they can simply pull it up and suggest their doctor take a look. Medical record vendors "have been an enabling, and not a blocking factor, and we appreciate that," Kevin Lynch, Apple's vice president of technology, told CNBC. Apple is working alongside these companies to take advantage of a protocol for exchanging electronic health records, known as FHIR. In the future, hospitals and clinics will be able to register themselves for the service without going through an Apple representative. Apple has stressed that its primary goal is to give users a better experience and not to sell more iOS devices. Still, the Apple Watch is increasingly positioning itself as a health and fitness device, which also has the potential to save lives by tracking the user's heart health. And the new service, which is part of the iOS 11.3 beta, could be a draw to iPhones, particularly for users with multiple chronic conditions who will benefit most from access to their medical records.

Ultimately, "we're hoping to enable richer conversations between doctor and patient," said Sumbul Desai, Apple's digital health lead who's also a physician and medical researcher and formerly worked at Stanford. Other technology companies have attempted to solve this problem through their own web-based tools but have failed. Google shut down Google Health in 2011 due to a lack of traction among consumers. Apple is taking a different approach by ensuring that consumers can get their data in a matter of minutes. "It's difficult to think about something more significant than health records," said Williams. "With your banking records, you can see every transaction and dollars spent, and yet my health is way more significant and I couldn't put my finger on any of my lab information."

WATCH: Will Apple replace your family doctor?