> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metriport.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Reference Tables

> Schema documentation for reference tables in the Metriport data model

Reference tables are normalized tables that store FHIR resource references in a structured format. They provide a consistent way to link resources across the Metriport data model.

**Reference Tables:**

Each reference table contains the following columns:

| Column                | Data Type | Description                                                                                 |
| --------------------- | --------- | ------------------------------------------------------------------------------------------- |
| `{resource_id_field}` | varchar   | The ID of the parent resource (e.g., `diagnostic_report_id`, `encounter_id`)                |
| `property`            | varchar   | The FHIR property name that contains the reference (e.g., 'performer', 'result', 'subject') |
| `reference_id`        | varchar   | The extracted reference ID from the FHIR reference string                                   |
| `reference_type`      | varchar   | The resource type being referenced (e.g., 'Patient', 'Practitioner', 'Observation')         |

## Reference Tables by Resource Type

### [Allergy Intolerance References](/medical-api/handling-data/schema-v000/allergy-intolerance/base)

The `allergy_intolerance_references` table supports the following reference properties:

* **patient** (required): links to the [patient](/medical-api/handling-data/schema-v000/patient) who has the allergy/intolerance
* **encounter**: links to the [encounter](/medical-api/handling-data/schema-v000/encounter) where the allergy/intolerance was recorded
* **recorder**: links to the [practitioner](/medical-api/handling-data/schema-v000/practitioner) who recorded the allergy/intolerance
* **asserter**: links to the [practitioner](/medical-api/handling-data/schema-v000/practitioner) or [patient](/medical-api/handling-data/schema-v000/patient) who asserted the allergy/intolerance

### [Condition References](/medical-api/handling-data/schema-v000/condition)

The `condition_references` table supports the following reference properties:

* **subject** (required): links to the [patient](/medical-api/handling-data/schema-v000/patient) who has the condition
* **encounter**: links to the [encounter](/medical-api/handling-data/schema-v000/encounter) where the condition was recorded
* **recorder**: links to the [practitioner](/medical-api/handling-data/schema-v000/practitioner) who recorded the condition

### [Diagnostic Report References](/medical-api/handling-data/schema-v000/diagnostic-report)

The `diagnostic_report_references` table supports the following reference properties:

* **subject** (required): links to the [patient](/medical-api/handling-data/schema-v000/patient) who is the subject of the diagnostic report
* **encounter**: links to the [encounter](/medical-api/handling-data/schema-v000/encounter) where the diagnostic report was generated
* **performer**: links to [practitioners](/medical-api/handling-data/schema-v000/practitioner) who performed the diagnostic procedure
* **result**: links to [observations](/medical-api/handling-data/schema-v000/observation) or other diagnostic results referenced in the report

### [Encounter References](/medical-api/handling-data/schema-v000/encounter)

The `encounter_references` table supports the following reference properties:

* **subject** (required): links to the [patient](/medical-api/handling-data/schema-v000/patient) who is the subject of the encounter
* **participant.individual**: links to [practitioners](/medical-api/handling-data/schema-v000/practitioner) involved in the encounter
* **location.location**: links to [locations](/medical-api/handling-data/schema-v000/location) where the encounter occurred
* **diagnosis.condition**: links to [conditions](/medical-api/handling-data/schema-v000/condition) diagnosed during the encounter

### [Immunization References](/medical-api/handling-data/schema-v000/immunization)

The `immunization_references` table supports the following reference properties:

* **patient** (required): links to the [patient](/medical-api/handling-data/schema-v000/patient) who received the immunization
* **encounter**: links to the [encounter](/medical-api/handling-data/schema-v000/encounter) where the immunization was given
* **location**: links to the [location](/medical-api/handling-data/schema-v000/location) where the immunization was given
* **performer.actor**: links to [practitioners](/medical-api/handling-data/schema-v000/practitioner) who administered the immunization

### [Observation References](/medical-api/handling-data/schema-v000/observation)

The `observation_references` table supports the following reference properties:

* **subject** (required): links to the [patient](/medical-api/handling-data/schema-v000/patient) who is the subject of the observation
* **encounter**: links to the [encounter](/medical-api/handling-data/schema-v000/encounter) where the observation was made
* **performer**: links to [practitioners](/medical-api/handling-data/schema-v000/practitioner) who performed the observation

### [Procedure References](/medical-api/handling-data/schema-v000/procedure)

The `procedure_references` table supports the following reference properties:

* **subject** (required): links to the [patient](/medical-api/handling-data/schema-v000/patient) who is the subject of the procedure
* **encounter**: links to the [encounter](/medical-api/handling-data/schema-v000/encounter) where the procedure was performed
* **performer.actor**: links to [practitioners](/medical-api/handling-data/schema-v000/practitioner) who performed the procedure
* **location**: links to the [location](/medical-api/handling-data/schema-v000/location) where the procedure was performed
* **report**: links to [diagnostic reports](/medical-api/handling-data/schema-v000/diagnostic-report) or other reports related to the procedure

### [Medication Administration References](/medical-api/handling-data/schema-v000/medication-administration)

The `medication_administration_references` table supports the following reference properties:

* **medication\_reference** (required): links to the [medication](/medical-api/handling-data/schema-v000/medication) that was administered
* **subject** (required): links to the [patient](/medical-api/handling-data/schema-v000/patient) who received the medication
* **performer.actor**: links to [practitioners](/medical-api/handling-data/schema-v000/practitioner) who administered the medication

### [Medication Dispense References](/medical-api/handling-data/schema-v000/medication-dispense)

The `medication_dispense_references` table supports the following reference properties:

* **medication\_reference** (required): links to the [medication](/medical-api/handling-data/schema-v000/medication) that was dispensed
* **subject** (required): links to the [patient](/medical-api/handling-data/schema-v000/patient) who received the medication
* **performer.actor**: links to [practitioners](/medical-api/handling-data/schema-v000/practitioner) who dispensed the medication
* **location**: links to the [location](/medical-api/handling-data/schema-v000/location) where the medication was dispensed

### [Medication Request References](/medical-api/handling-data/schema-v000/medication-request)

The `medication_request_references` table supports the following reference properties:

* **medication\_reference** (required): links to the [medication](/medical-api/handling-data/schema-v000/medication) that was requested
* **subject** (required): links to the [patient](/medical-api/handling-data/schema-v000/patient) for whom the medication was requested
* **encounter**: links to the [encounter](/medical-api/handling-data/schema-v000/encounter) where the medication was requested
* **requester**: links to the [practitioner](/medical-api/handling-data/schema-v000/practitioner) who requested the medication
* **reason\_reference**: links to [conditions](/medical-api/handling-data/schema-v000/condition) or other reasons for the medication request

### [Medication Statement References](/medical-api/handling-data/schema-v000/medication-statement)

The `medication_statement_references` table supports the following reference properties:

* **medication\_reference** (required): links to the [medication](/medical-api/handling-data/schema-v000/medication) referenced in the statement
* **subject** (required): links to the [patient](/medical-api/handling-data/schema-v000/patient) who made the statement about the medication
