Apple Health
Backlinks: Apple watch | Tomorrow
CDA data
https://www.linkedin.com/pulse/connecting-ios-your-emr-using-healthkit-cda-part-ten-eric-whitley/
Processing Apple Health Data
Examples on the web in Javascript [Not much](https://www.google.com/search?client=safari&hl=en-us&q=%22javascript%22+xml+parser+apple+health&sa=X&ved=2ahUKEwi-vpXRgoz8AhWLE1kFHbLBAywQ5t4CegQIOxAB&biw=375&bih=548&dpr=2)…just an XML parser [fast-xml-parser - npm](https://www.npmjs.com/package/fast-xml-parser)
Observablehq
Not much out there.
- [Haroen Viaene on Twitter: "@mourner @observablehq how did you export the apple health data as json? I've looked for this before without good solution" / Twitter](https://mobile.twitter.com/haroenv/status/1257323836783030282)
- [Apple Health Data Analysis and Visualization / 666 Bufan | Observable](https://observablehq.com/@0251228d7a59bab1/apple-health-data-analysis-and-visualization)
- https://observablehq.com/@rustyconover/apple-workout-route-visualizer
- parses an XML (gpx) file using the DOM:
```javascript parsedXML = new DOMParser().parseFromString( await route.text(), "application/xml" ) ```
- https://observablehq.com/@cpietsch/lido-xml-as-tree
- parses a different XML thing (LIDO, a type of xml that describes a document, I think):
```javascript lido = parser.parse(xmlstring, {ignoreNameSpace: true }).lidoWrap.lido ```
Which is done via the fast-xml-parser, mentioned above:
```javascript parser = require(await FileAttachment("fast-xml-parser.js").url()) ```
Other links from MM laptop
- https://blog.gwlab.page/how-to-parse-xml-file-exported-from-apple-ios-health-app-and-make-a-sleep-schedule-plot-using-60c652697c81
- https://medium.com/@gaurvinayak18/analyzing-apple-health-data-with-python-17700260b599
- https://github.com/vinayakgaur/Apple-Health-Data-Analysis/blob/main/apple-health-data-parser.py
- https://towardsdatascience.com/analyse-your-health-with-python-and-apple-health-11c12894aae2