Apple HealthKitV2 Clinical Records Export Format
Clinical Records in HealthKit have a unique data structure for capturing information specific to the participant. Use HealthKit’s clinical record support to read Fast Healthcare Interoperability Resources (FHIR) from supported healthcare institutions. Instead of focusing on documents, FHIR breaks the user’s medical history into discrete records. HealthKit then represents each FHIR record as a sample. Please refer to Apple's HealthKit FHIR Resource Type article for a complete list of HealthKit clinical record samples.
Data Structure
One file will be created per type of data (e.g., "ClinicalAllergy" and "ClinicalImmunization"). The file name will correspond to the type of data (e.g., "HealthKitV2ClinicalRecords_ClinicalAllergy_20211101-20211217" and "HealthKitV2ClinicalRecords_ClinicalImmunization_20211101-20211217").
Clinical Notes also include an additional attachments file (e.g., "HealthKitV2ClinicalRecords_ClinicalNoteAttachments_20250601-20250624") containing the document content associated with each note.
Clinical Records
| Field | Description |
|---|---|
HealthKitClinicalRecordKey |
A unique, auto-generated key for this clinical record. |
ParticipantIdentifier |
The identifier of the participant this clinical record was recorded for. Can be used to cross reference with Participants. |
ParticipantID |
The stable, automatically generated, internal system identifier for this participant. Universally unique identifier (UUID). |
Date |
Sync date of the clinical record, in ISO 8601 format. Includes timezone offset information. |
DisplayName |
The primary display name as shown in the Health app. |
ResourceSourceUrl |
The full URL for the source of the FHIR resource. |
ResourceData |
The JSON representation of the FHIR resource. |
ResourceIdentifier |
The value from the FHIR resource’s resourceIdentifier field. |
ResourceType |
The value from the FHIR resource’s resourceType field. |
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”). |
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. |
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. |
Metadata |
Additional XML metadata inserted by the source application. |
InsertedDate |
The creation date of the entry, in ISO 8601 format. Is always in UTC. |
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 HealthKitClinicalRecordKey and ParticipantIdentifier as another sample.
Clinical Note Attachments
| Field | Description |
|---|---|
HealthKitClinicalRecordKey |
The key of the Clinical Note this attachment belongs to. Can be used to cross reference with the Clinical Note file. |
ParticipantIdentifier |
The identifier of the participant this attachment was recorded for. Can be used to cross reference with Participants. |
ParticipantID |
The stable, automatically generated, internal system identifier for this participant. Universally unique identifier (UUID). |
CreationDate |
The date the attachment was created, in ISO 8601 format. Includes timezone offset information. |
Name |
The name of the attachment document. |
ContentType |
The MIME type of the attachment (e.g., text/html, application/pdf). |
Data |
The Base64-encoded content of the attachment document. |
Sample CSV Exports
Health Records
HealthKitClinicalRecordKey,ParticipantIdentifier,ParticipantID,Date,DisplayName,ResourceSourceUrl,ResourceData,ResourceIdentifier,ResourceType,SourceIdentifier,SourceName,SourceVersion,SourceOperatingSystemVersion,SourceProductType,Metadata,InsertedDate
b8f73772-341c-55ae-b870-ff67e36cda14,MDH-3229-1050,539e5aec-e108-f011-b56a-147dda22d041,2021-12-14T12:21:03-05:00,CO2,https://sample.org,"{""status"":""final"",""category"":{""text"":""Laboratory"",""coding"":[{""system"":""http://hl7.org/fhir/observation-category"",""display"":""Laboratory"",""code"":""laboratory""}]},""issued"":""2021-09-23T19:19:40Z"",""id"":""SampleID"",""code"":{""text"":""CO2"",""coding"":[{""system"":""http://loinc.org"",""display"":""Carbon dioxide, total [Moles/volume] in Serum or Plasma"",""code"":""2028-9""}]},""valueQuantity"":{""code"":""mmol/L"",""value"":29,""system"":""http://unitsofmeasure.org"",""unit"":""mmol/L""},""subject"":{""display"":""McSample, Sample"",""reference"":""https://sample.org""},""performer"":[{""display"":""M Willis"",""reference"":""https://sample.org/""}],""effectiveDateTime"":""2021-09-23T19:19:00Z"",""referenceRange"":[{""low"":{""code"":""mmol/L"",""value"":22,""system"":""http://unitsofmeasure.org"",""unit"":""mmol/L""},""high"":{""code"":""mmol/L"",""value"":30,""system"":""http://unitsofmeasure.org"",""unit"":""mmol/L""},""text"":""22 - 30 mmol/L""}],""resourceType"":""Observation""}",SampleID1,Observation,com.apple.public.health.clinical.A5C6F309-3570-E7CB-9876-749D6875A153,Hospital,15.1,15.1.0,"iPhone11,8",null,2021-12-14T21:06:42Z
9be22c10-1e2a-53e6-a1d2-1504cc4dde86,MDH-3229-1050,539e5aec-e108-f011-b56a-147dda22d041,2021-12-14T12:21:03-05:00,HEMOGLOBIN,https://sample.org,"{""status"":""final"",""category"":{""text"":""Laboratory"",""coding"":[{""system"":""http://hl7.org/fhir/observation-category"",""display"":""Laboratory"",""code"":""laboratory""}]},""issued"":""2021-09-23T19:19:40Z"",""id"":""SampleID"",""code"":{""text"":""HEMOGLOBIN"",""coding"":[{""system"":""http://loinc.org"",""display"":""Hemoglobin [Mass/volume] in Blood"",""code"":""718-7""}]},""valueQuantity"":{""code"":""g/dL"",""value"":15.9,""system"":""http://unitsofmeasure.org"",""unit"":""g/dL""},""subject"":{""display"":""McSample, Sample"",""reference"":""https://sample.org/""},""performer"":[{""display"":""M Willis"",""reference"":""https://sample.org/""}],""effectiveDateTime"":""2021-09-23T19:19:00Z"",""referenceRange"":[{""low"":{""code"":""g/dL"",""value"":14,""system"":""http://unitsofmeasure.org"",""unit"":""g/dL""},""high"":{""code"":""g/dL"",""value"":17.4,""system"":""http://unitsofmeasure.org"",""unit"":""g/dL""},""text"":""14.0 - 17.4 g/dL""}],""resourceType"":""Observation""}",SampleID2,Observation,com.apple.public.health.clinical.A5C6F309-3570-E7CB-9876-749D6875A153,Hospital,15.1,15.1.0,"iPhone11,8",null,2021-12-14T21:06:42Z
23710292-0f29-5802-a183-83e496877b84,MDH-3229-1050,539e5aec-e108-f011-b56a-147dda22d041,2021-12-14T12:21:03-05:00,ALBUMIN,https://sample.org,"{""status"":""final"",""category"":{""text"":""Laboratory"",""coding"":[{""system"":""http://hl7.org/fhir/observation-category"",""display"":""Laboratory"",""code"":""laboratory""}]},""issued"":""2021-09-23T19:19:40Z"",""id"":""SampleID"",""code"":{""text"":""ALBUMIN"",""coding"":[{""system"":""http://loinc.org"",""display"":""Albumin [Mass/volume] in Serum or Plasma"",""code"":""1751-7""}]},""valueQuantity"":{""code"":""g/dL"",""value"":4.7,""system"":""http://unitsofmeasure.org"",""unit"":""g/dL""},""subject"":{""display"":""McSample, Sample"",""reference"":""https://sample.org/""},""performer"":[{""display"":""M Willis"",""reference"":""https://sample.org/""}],""effectiveDateTime"":""2021-09-23T19:19:00Z"",""referenceRange"":[{""low"":{""code"":""g/dL"",""value"":3.5,""system"":""http://unitsofmeasure.org"",""unit"":""g/dL""},""high"":{""code"":""g/dL"",""value"":5.2,""system"":""http://unitsofmeasure.org"",""unit"":""g/dL""},""text"":""3.5 - 5.2 g/dL""}],""resourceType"":""Observation""}",SampleID3,Observation,com.apple.public.health.clinical.A5C6F309-3570-E7CB-9876-749D6875A153,Hospital,15.1,15.1.0,"iPhone11,8",null,2021-12-14T21:06:42Z
Clinical Note Attachments
HealthKitClinicalRecordKey,ParticipantIdentifier,ParticipantID,CreationDate,Name,ContentType,Data
fb777d20-9646-53c7-909f-dedc6df1612d,MDH-3229-1050,539e5aec-e108-f011-b56a-147dda22d041,2024-09-08T14:13:55+00:00,Bar,text/html,PGRpdiBjbGFzcz0i...
fb777d20-9646-53c7-909f-dedc6df1612d,MDH-3229-1050,539e5aec-e108-f011-b56a-147dda22d041,2024-09-08T15:00:55+00:00,Foo,text/html,PGRpdj5zYW1wbGUgSFRNTCBjb250ZW50PC9kaXY+
Sample JSON Exports
Health Records
{
"HealthKitClinicalRecordKey":"b8f73772-341c-55ae-b870-ff67e36cda14",
"ParticipantIdentifier":"MDH-3229-1050",
"ParticipantID": "539e5aec-e108-f011-b56a-147dda22d041",
"Date":"2021-12-14T12:21:03-05:00",
"DisplayName":"CO2",
"Resource":
{
"SourceUrl":"https://sample.org/",
"Data":
{
"status":"final",
"category":
{
"text":"Laboratory",
"coding":
[
{
"system":"http://hl7.org/fhir/observation-category",
"display":"Laboratory","code":"laboratory"
}
]
},
"issued":"2021-09-23T19:19:40Z",
"id":"SampleID",
"code":
{
"text":"CO2",
"coding":
[
{
"system":"http://loinc.org",
"display":"Carbon dioxide, total [Moles/volume] in Serum or Plasma",
"code":"2028-9"
}
]
},
"valueQuantity":
{
"code":"mmol/L",
"value":29,
"system":"http://unitsofmeasure.org",
"unit":"mmol/L"
},
"subject":
{
"display":"McSample, Sample",
"reference":"https://sample.org/"
},
"performer":
[
{
"display":"M Willis",
"reference":"https://sample.org/"
}
],
"effectiveDateTime":"2021-09-23T19:19:00Z","referenceRange":
[
{
"low":
{
"code":"mmol/L",
"value":22,"system":"http://unitsofmeasure.org",
"unit":"mmol/L"
},
"high":
{
"code":"mmol/L",
"value":30,
"system":"http://unitsofmeasure.org",
"unit":"mmol/L"
},
"text":"22 - 30 mmol/L"
}
],
"resourceType":"Observation"
},
"Identifier":"SampleID",
"Type":"Observation"
},
"Source":
{
"Name":"Hospital",
"Identifier":"com.apple.public.health.clinical.ID",
"Version":"15.1",
"OperatingSystemVersion":"15.1.0",
"ProductType":"iPhone11,8"
},
"Metadata":null,
"InsertedDate":"2021-12-14T21:06:42Z"
}
Clinical Note Attachments
{
"HealthKitClinicalRecordKey":"fb777d20-9646-53c7-909f-dedc6df1612d",
"ParticipantIdentifier":"MDH-3229-1050",
"ParticipantID": "539e5aec-e108-f011-b56a-147dda22d041",
"Date":"2024-09-08T14:13:55+00:00",
"DisplayName":"Patient Instructions",
"Resource":
{
"Data":{}
},
"Source":
{
"Name":"Health",
"Identifier":"com.apple.Health",
"Version":"18.1",
"OperatingSystemVersion":"18.1.0",
"ProductType":"iPhone17,1"
},
"Attachments":
[
{
"CreationDate":"2024-09-08T14:13:55+00:00",
"Name":"Bar",
"ContentType":"text/html",
"Data":"PGRpdiBjbGFzcz0i..."
},
{
"CreationDate":"2024-09-08T15:00:55+00:00",
"Name":"Foo",
"ContentType":"text/html",
"Data":"PGRpdj5zYW1wbGUgSFRNTCBjb250ZW50PC9kaXY+"
}
],
"Metadata":{},
"InsertedDate":"2025-06-06T15:12:40Z"
}