When migrating data to Medplum, it's crucial to maintain the integrity and relationships between different data types. FHIR splits data across multiple [Resources](/content/docs/fhir-basics#storing-data-resources/index.html) that contain [References](/content/docs/fhir-basics#linking-data-references/index.html) to each other.

To simplify the migration process, Medplum recommends migrating data elements roughly in order of the FHIR dependency graph. Here's the recommended order for migrating data:

| Order | Data Element | FHIR Resource | Notes |
| --- | --- | --- | --- |
| 1 | Provider Demographics & Credentials | [`Practitioner`](/content/docs/api/fhir/resources/practitioner/index.html), [`PractitionerRole`](/content/docs/api/fhir/resources/practitionerrole/index.html) | Migrate clinician information to link them to migrated clinical events |
| 2 | Shared Organizations | [`Organization`](/content/docs/api/fhir/resources/organization/index.html) | Used in multi-practice settings to represent each practice |
| 3 | Patient Demographics | [`Patient`](/content/docs/api/fhir/resources/patient/index.html) | Foundational patient record that will be referenced by all other clinical data |
| 4 | Problem List, Medication List | [`Condition`](/content/docs/api/fhir/resources/condition/index.html), [`MedicationRequest`](/content/docs/api/fhir/resources/medicationrequest/index.html) | Provides clinicians current medical "snapshot" of the patient's health |
| 5 | Encounter History, Vitals, Labs | [`Encounter`](/content/docs/api/fhir/resources/encounter/index.html), [`Observation`](/content/docs/api/fhir/resources/observation/index.html), [`DiagnosticReport`](/content/docs/api/fhir/resources/diagnosticreport/index.html) | Provides clinicians with longitudinal health of the patient |

This order ensures that foundational data ( ['Patient'](/content/docs/api/fhir/resources/patient/index.html) records) are in place before migrating related clinical data. It also attempts to deliver immediate clinical value by providing a patient snapshot, while backfilling longitudinal health data over time.

In the next guide, we'll discuss how to **convert your existing data to FHIR.**
