Skip to content
  • There are no suggestions because the search field is empty.

Apple HealthKitV2 Electrocardiogram Export Format

Electrocardiograms (ECG) in HealthKit have a unique data structure for capturing information specific to the participant’s ECG.

Unlike other HealthKit data streams, ECGs do not show on the Apple HealthKit tab within a participant's chart. This data is still available through data exports.

Data Structure

Electrocardiogram Samples

Field Description
HealthKitECGSampleKey A unique, auto-generated key for this ECG.
ParticipantIdentifier The identifier of the participant this task was for. Can be used to cross reference with Participants.
ParticipantID The stable, automatically generated, internal system identifier for this participant. Universally unique identifier (UUID).
StartDate The start date of the ECG, in ISO 8601 format. Includes timezone offset information. May be empty if no start date was recorded.
Date The end date of the ECG, in ISO 8601 format. Includes timezone offset information.
AverageHeartRate The user’s average heart rate during the ECG.
Classification
The ECG’s classification.
NumberOfVoltageMeasurements
The number of voltage measurements associated with this sample.
SamplingFrequency The frequency at which the Apple Watch sampled the voltage.
SymptomStatus

A value that indicates whether the user entered a symptom when they recorded the ECG.

SourceIdentifier

A unique identifier for the source object.

SourceName The name of the source app which generated the reading. In the case of a “com.apple.health.*” SourceIdentifier, this is the name of the Apple Device used to generate the reading (e.g. “Chris’ iPhone”).
SourceOperatingSystemVersion An arbitrary string representing the version of the software running on the device, if applicable.
SourceProductType An arbitrary string representing the hardware version of the device, if applicable.
SourceVersion The version of the source app which generated the reading. In the case of a “com.apple.health.*” SourceIdentifier, this is the version of iOS or WatchOS on the device used to generate the reading.
DeviceFDAIdentifier The device identifier portion of the US Food and Drug Administration’s Unique Device Identifier (UDI), if applicable.
DeviceFirmwareVersion An arbitrary string representing the current version of the firmware running on the device, if applicable.
DeviceHardwareVersion An arbitrary string representing the hardware version of the device, if applicable.
DeviceLocalIdentifier An identifier that uniquely identifies the device object on the hardware running this code, if applicable.
DeviceManufacturer Manufacturer of the device used the generate the reading, if applicable.
DeviceModel Model of the device used the generate the reading, if applicable.
DeviceName The user-facing name for the device, if applicable.
DeviceSoftwareVersion An arbitrary string representing the version of the software running on the device, if applicable.
Metadata Additional XML metadata inserted by the source application.
InsertedDate The creation date of the entry, in ISO 8601 format. Is always in UTC.

Electrocardiogram Sub-Samples

Field Description
HealthKitECGSampleKey A unique, auto-generated key for this ECG.
ParticipantIdentifier The identifier of the participant this task was for. Can be used to cross reference with Participants.
MicroVolts

The microvolts unit of electric potential difference.

TimeSinceSampleStart

The time of the measurement relative to the sample’s start time.

 

If a participant re-syncs their device, you may observe duplicate samples. HealthKit samples are immutable, so when doing data analysis, your team will need to remove any samples that have the same HealthKitECGSampleKey and ParticipantIdentifier as another sample.

Sample CSV Exports

Electrocardiogram Samples

HealthKitECGSampleKey,ParticipantIdentifier,StartDate,Date,AverageHeartRate,Classification,NumberOfVoltageMeasurements,SamplingFrequency,SymptomStatus,SourceIdentifier,SourceName,SourceOperatingSystemVersion,SourceProductType,SourceVersion,DeviceFDAIdentifier,DeviceFirmwareVersion,DeviceHardwareVersion,DeviceLocalIdentifier,DeviceManufacturer,DeviceModel,DeviceName,DeviceSoftwareVersion,Metadata,InsertedDate
d3e7dd07-5060-53fd-a58f-474b2dfbd7ec,256263d8-3ffc-eb11-aaae-0afb9334277d,2021-12-07T16:31:46-05:00,2021-12-07T16:32:16-05:00,61,SinusRhythm,15404,0,Not Set,com.apple.NanoHeartRhythm,ECG,8.1.0,"Watch4,4",1.9,,,"Watch4,4",,Apple Inc.,Watch,Apple Watch,8.1,"{""HKMetadataKeySyncVersion"":""0"",""HKMetadataKeyAppleECGAlgorithmVersion"":""1"",""HKMetadataKeySyncIdentifier"":""89C9E3B3-1B75-4F06-AC48-AFF179EC5266""}",2021-12-09T22:18:48Z
b407ceb2-d365-55ec-bfab-c9bbd9a60711,256263d8-3ffc-eb11-aaae-0afb9334277d,2021-12-09T15:13:26-05:00,2021-12-09T15:13:56-05:00,64,SinusRhythm,15404,0,Not Set,com.apple.NanoHeartRhythm,ECG,8.1.0,"Watch4,4",1.9,,,"Watch4,4",,Apple Inc.,Watch,Apple Watch,8.1,"{""HKMetadataKeySyncVersion"":""0"",""HKMetadataKeyAppleECGAlgorithmVersion"":""2"",""HKMetadataKeySyncIdentifier"":""AEBF344A-3CD2-4C9B-905F-3C793E6E831A""}",2021-12-09T22:18:48Z
2992a11b-8783-5221-8810-4f4d402c2f16,256263d8-3ffc-eb11-aaae-0afb9334277d,2021-12-09T15:20:16-05:00,2021-12-09T15:20:46-05:00,74,SinusRhythm,15404,0,Not Set,com.apple.NanoHeartRhythm,ECG,8.1.0,"Watch4,4",1.9,,,"Watch4,4",,Apple Inc.,Watch,Apple Watch,8.1,"{""HKMetadataKeySyncVersion"":""0"",""HKMetadataKeyAppleECGAlgorithmVersion"":""2"",""HKMetadataKeySyncIdentifier"":""40B3F71C-A280-4C5B-B4BA-FB6327BCDB63""}",2021-12-09T22:18:48Z

Electrocardiogram Sub-Samples

HealthKitECGSampleKey,ParticipantIdentifier,MicroVolts,TimeSinceSampleStart
d3e7dd07-5060-53fd-a58f-474b2dfbd7ec,256263d8-3ffc-eb11-aaae-0afb9334277d,-65.85879517,0
d3e7dd07-5060-53fd-a58f-474b2dfbd7ec,256263d8-3ffc-eb11-aaae-0afb9334277d,-20.15280342,5.17453024
d3e7dd07-5060-53fd-a58f-474b2dfbd7ec,256263d8-3ffc-eb11-aaae-0afb9334277d,-15.79679871,12.60817041
d3e7dd07-5060-53fd-a58f-474b2dfbd7ec,256263d8-3ffc-eb11-aaae-0afb9334277d,47.36212921,19.47508558

Sample JSON Export

Electrocardiogram Samples & Sub-Samples

{
 "HealthKitECGSampleKey":"d3e7dd07-5060-53fd-a58f-474b2dfbd7ec",
 "Device":
  {
   "FDAIdentifier":"",
   "FirmwareVersion":"",
   "HardwareVersion":"Watch4,4",
   "LocalIdentifier":"",
   "Manufacturer":"Apple Inc.",
   "Model":"Watch",
   "Name":"Apple Watch",
   "SoftwareVersion":"8.1"
  },
 "SubSamples":
  [
   {"MicroVolts":-65.858795166015625,"TimeSinceSampleStart":0.0},
   {"MicroVolts":11.933460235595703,"TimeSinceSampleStart":7.4784328642069227},
   {"MicroVolts":-15.733985900878906,"TimeSinceSampleStart":12.637383035374667},
   {"MicroVolts":-33.990604400634766,"TimeSinceSampleStart":29.997474324838343}
  ],
 "Source":
  {
   "Name":"ECG",
   "Identifier":"com.apple.NanoHeartRhythm",
   "Version":"1.90",
   "OperatingSystemVersion":"8.1.0",
   "ProductType":"Watch4,4"
  },
 "AverageHeartRate":61,
 "NumberOfVoltageMeasurements":15404,
 "SamplingFrequency":0,
 "Classification":"SinusRhythm",
 "Date":"2021-12-07T16:32:16-05:00",
 "InsertedDate":"2021-12-09T22:18:48Z",
 "ParticipantIdentifier":"256263d8-3ffc-eb11-aaae-0afb9334277d",
 "StartDate":"2021-12-07T16:31:46-05:00",
 "SymptomStatus":"Not Set",
 "Metadata":{"HKMetadataKeySyncVersion":"0","HKMetadataKeyAppleECGAlgorithmVersion":"1","HKMetadataKeySyncIdentifier":"89C9E3B3-1B75-4F06-AC48-AFF179EC5266"}
}