Hello,
I’m investigating CDA XML compatibility with the Health app’s medical document import feature. Health rejects both custom CDA documents and an unchanged public HL7 CCD sample with a generic “No medical documents were found to import” error.
Feedback Assistant report: FB25204405.
Environment:
- iPhone 15 Pro Max
- iOS 27.2 beta 4 (24B5110a)
- Device language: Hebrew
- Region: Israel
Steps to reproduce:
- Save a CDA XML document in Files.
- Open the document’s share sheet and select Health.
- Health opens but displays an error instead of a document preview or import confirmation.
The exact Hebrew error is: “לא ניתן לייבא מסמכים רפואיים” “לא נמצאו מסמכים רפואיים לייבוא.”
Approximate English translation: “Unable to Import Medical Documents” “No medical documents were found to import.”
For comparison, I also tried the unchanged public HL7 CCD sample containing fictional patient data: https://github.com/HL7/CDA-core-2.0/blob/master/examples/sampleCCD.xml
This sample produces the same error. I understand that being an HL7 sample does not necessarily mean it satisfies all of Health’s import requirements.
My questions:
- Is standalone CDA XML import from Files into Health supported through this workflow?
- Are there specific CDA profiles, header fields, filename extensions, or packaging requirements needed for Health to recognize the document?
- Has anyone successfully imported a CDA document on this build, or identified a workaround?
- Is there a recommended way to distinguish a document validation failure from a file recognition or handoff failure?
Testing so far has been limited to the Health app’s user interface. I have not tested the document through HKCDADocumentSample in a native app, and I have not established whether this is a regression from an earlier iOS version.
I would appreciate guidance on the supported workflow or a public, fictional-data sample known to work with Health. Please do not share real patient records.
Thank you.
Thanks for the detailed report, and for testing with an unchanged public sample. That made it easy to check.
I tried the same HL7 sample CCD on an iPhone 18 Pro Max with iOS 27.0. Sharing it from Files to Health showed the same "Unable to Import Medical Documents" error, so this isn't limited to the 27.2 beta. On the same iPhone, HKCDADocumentSample accepted the file and read its title, patient name, author, and custodian.
That API also gives you a way to tell a document problem from a recognition or handoff problem. init(data:start:end:metadata:) validates the XML and throws an error when it can't accept the document. In my test, removing the sample's <author> or <custodian> element produced a "Failed to validate XML" error, while removing <title> didn't.
On requirements, the initializer's documentation asks for an XML document that meets the Clinical Document Architecture, R2 standard. The HKCDADocument documentation says HealthKit parses the title, patient name, author name, and custodian name from it. Neither describes additional requirements for the Health app's share import.
If your app needs to add CDA documents to Health, the initializer's documentation shows the documented path: create an HKCDADocumentSample, then save it to the HealthKit store.
I checked FB25204405, and it's open and under investigation. Please continue to test your software in release and pre-release versions of system software made available to you through your developer.apple.com account. When you do, add details about that into your bug report to keep it up to date. Please see developer.apple.com/download.