Health CSV Importer

Health CSV Importer

Download on the App Store

Health CSV Importer

Summary

This guide explains how to format CSVs for use with Health CSV Importer.

Help from an AI Assistant

An AI assistant can help prepare, split, and validate your CSV exports for Health CSV Importer. Share llms.txt with your assistant to point it to the documentation and the Health CSV Importer skill.

Example prompt

Attach your health data export to your AI assistant, then copy and paste this prompt:

Please format the attached health data for import into Apple Health using Lionheart Software’s Health CSV Importer.

First, read https://2017.lionheartsw.com/software/health-csv-importer/llms.txt and follow the linked skill, import guide, and applicable references. Verify supported data types, units, and category values against the linked documentation. If you cannot access the documentation, ask me to provide it before formatting the files.

Inspect the source data and create downloadable UTF-8 CSV files with a single header row, supported column names, units in parentheses for quantities, and unambiguous dates. Preserve original values, precision, calendar dates, and timezone offsets. Do not invent missing values, times, units, or measurement meanings. Ask me about any ambiguity that affects the conversion; if timestamps have no timezone, tell me which timezone information I need to select in the app.

Keep unsupported or unresolved data in a separate reference-only file and explain why it cannot be imported. Validate the finished CSVs, check for duplicates, and summarize the mappings, conversions, record counts, and any omitted data. Include brief instructions for reviewing and importing the files in Health CSV Importer.

If your assistant has the skill installed, ask it to “Use $health-csv-importer to prepare these files for import into Apple Health with Health CSV Importer.”

Example CSVs

Here are several CSVs you can review to understand how to prepare your data.


Headers

The CSVs you import must contain headers. The header row must contain a start date header, and a data type header (with units in parenthesis).

See the “Data Types” section below for more information on supported column names and recommended units.

For example, if you would like to import a weight of 150 lbs on April 16, 2020, and 145 lbs on April 17, 2020, your CSV file might look like this:

Date,Weight (lbs)
2020-04-16,150
2020-04-17,145

Data Types

For details on all supported data types, consult this spreadsheet.

Health CSV Importer supports the following HealthKit data types:

Note on Units

Health CSV Importer will only import data using units that are supported by HealthKit. See Apple’s documentation here for more details on what units are supported.


Date Formats

The date column can either represent a date or a datetime value. If you’re importing a datetime value, ensure that your file contains one of each of the below date and time formats.

Important: If you don’t specify a time zone in the values themselves (e.g., no UTC offset), the app will prompt you to select one in-app (default options are local time and GMT, but you can also “write-in” any timezone in standard format).

Dates

Times

Here is an example of a correctly formatted datetime: 04-16-2020 08:07

You may also import fully-formatted ISO 8869-1 datetimes, e.g., 2020-04-16T08:07:00-07:00 (note the T separating the date and time components).


Deduplication

In addition to the existing guardrails we provide (such as warning on importing from the same file more than once), Health CSV Importer will prevent duplicates at the data-point level. Data points are checked for uniqueness on the following fields:

If you import a CSV containing a row with a data point matching an existing data point that was already imported by Health CSV Importer, that data point will be skipped.


FreeStyle Libre 3 Support

Health CSV Importer flawlessly handles FreeStyle Libre 3 exports generated from all locales. Just export your file using the instructions here and import the generated file as-is.


Other Notes

You can only import blood pressure data together, i.e. both diastolic and systolic values have to be present in the file you are importing. Hence, you will not be able to import only diastolic values or only systolic values separately.

As always, if you have any questions, please email us at [email protected].


A product of Lionheart Software.