",
"patientId": "metriport-patient-uuid",
"externalId": "your-first-party-id",
"whenSourceSent": "2025-01-30T22:58:45.000Z",
"additionalIds": {
"athenahealth": ["00000"]
},
"admitTimestamp": "2025-01-28T23:00:00.000Z",
"dischargeTimestamp": "2025-01-30T23:00:00.000Z"
}
}
```
## Additional Resources
### FHIR Encounter
For ADT notifications, the Encounter is the core resource in a
[Patient Encounter Bundle](/medical-api/handling-data/patient-encounter-bundle). Below is an
example of a FHIR Encounter resource, which is one piece of the data you'll receive when
downloading the bundle from the notification `url`.
# Scheduled Queries
Source: https://docs.metriport.com/medical-api/handling-data/scheduled-queries
Query the networks on your schedule.
# Overview
Scheduled Queries is an automated and scheduled version of adhoc queries (e.g., [Start Network Query](/medical-api/api-reference/network/start-network-query)).
It allows you to specify a schedule in which queries should be executed automatically.
You can choose one of the frequencies below for each of the query source:
* `daily`: runs every day. (**HIE only**.)
* `weekly`: runs every Saturday.
* `biweekly`: runs every other Saturday, starting with the first Saturday of the month.
* `monthly`: runs the last weekend of the month.
The available data sources are:
* `hie`: health information networks, nation-wide networks that provide access to general medical data.
* `pharmacy`: networks that provide medication-specific information.
To enable scheduled queries, create [one or more Cohorts](/medical-api/handling-data/cohorts) and add the patients you want to have scheduled queries enabled for.
# Tables by Resource
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/README
This page lists all core tables in the Metriport data model, grouped by main resource type. The list and linked docs are aligned with the core pipeline (`packages/data-transformation/raw-to-core`). Every table has its own doc file.
Within each resource, tables follow **FHIR property order** where practical.
\*`vcc` stands for valueCodeableConcept
## AllergyIntolerance
Patient allergies and intolerances, with reaction and manifestation details.
* [allergyintolerance](/medical-api/handling-data/schema-v100/allergyintolerance/base) – Main allergy/intolerance record
* [allergyintolerance\_code\_coding](/medical-api/handling-data/schema-v100/allergyintolerance/code_coding)
* [allergyintolerance\_clinicalstatus\_coding](/medical-api/handling-data/schema-v100/allergyintolerance/clinicalstatus_coding)
* [allergyintolerance\_reaction](/medical-api/handling-data/schema-v100/allergyintolerance/reaction) – Reactions
* [allergyintolerance\_reaction\_substance\_coding](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_substance_coding)
* [allergyintolerance\_reaction\_manifestation](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_manifestation) – Manifestations
* [allergyintolerance\_reaction\_manifestation\_coding](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_manifestation_coding)
* [allergyintolerance\_extension](/medical-api/handling-data/schema-v100/allergyintolerance/extension)
* [allergyintolerance\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/allergyintolerance/extension_vcc_coding)
* allergyintolerance\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## Binary
Binary content (e.g., documents, images) referenced by the system.
* [binary](/medical-api/handling-data/schema-v100/binary)
## CarePlan
Patient care plans and activities.
* [careplan](/medical-api/handling-data/schema-v100/careplan/base) – Main care plan record
* [careplan\_category](/medical-api/handling-data/schema-v100/careplan/category)
* [careplan\_category\_coding](/medical-api/handling-data/schema-v100/careplan/category_coding)
* [careplan\_activity](/medical-api/handling-data/schema-v100/careplan/activity) – Activities
* [careplan\_activity\_detail\_code\_coding](/medical-api/handling-data/schema-v100/careplan/activity_detail_code_coding)
* [careplan\_activity\_detail\_performer](/medical-api/handling-data/schema-v100/careplan/activity_detail_performer) – Performers per activity
* [careplan\_extension](/medical-api/handling-data/schema-v100/careplan/extension)
* [careplan\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/careplan/extension_vcc_coding)
* careplan\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## Communication
Communications (e.g., messages, notifications) associated with the patient.
* [communication](/medical-api/handling-data/schema-v100/communication/base) – Main communication record
* [communication\_category](/medical-api/handling-data/schema-v100/communication/category)
* [communication\_category\_coding](/medical-api/handling-data/schema-v100/communication/category_coding)
* [communication\_extension](/medical-api/handling-data/schema-v100/communication/extension)
* [communication\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/communication/extension_vcc_coding)
* communication\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## Composition
Clinical documents (e.g., discharge summary) with sections, attestation, and events.
* [composition](/medical-api/handling-data/schema-v100/composition/base) – Main composition record
* [composition\_type\_coding](/medical-api/handling-data/schema-v100/composition/type_coding)
* [composition\_section](/medical-api/handling-data/schema-v100/composition/section) – Sections
* [composition\_section\_code\_coding](/medical-api/handling-data/schema-v100/composition/section_code_coding)
* [composition\_attester](/medical-api/handling-data/schema-v100/composition/attester) – Attestation
* [composition\_event](/medical-api/handling-data/schema-v100/composition/event) – Event/period
* [composition\_section\_entry](/medical-api/handling-data/schema-v100/composition/section_entry) – Section entries
* [composition\_extension](/medical-api/handling-data/schema-v100/composition/extension)
* [composition\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/composition/extension_vcc_coding)
* composition\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## Condition
Symptoms, problems, complaints, and diagnoses reported during encounters.
* [condition](/medical-api/handling-data/schema-v100/condition/base) – Main condition record
* [condition\_clinicalstatus\_coding](/medical-api/handling-data/schema-v100/condition/clinicalstatus_coding)
* [condition\_verificationstatus\_coding](/medical-api/handling-data/schema-v100/condition/verificationstatus_coding)
* [condition\_category](/medical-api/handling-data/schema-v100/condition/category)
* [condition\_category\_coding](/medical-api/handling-data/schema-v100/condition/category_coding)
* [condition\_code\_coding](/medical-api/handling-data/schema-v100/condition/code_coding)
* [condition\_extension](/medical-api/handling-data/schema-v100/condition/extension)
* [condition\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/condition/extension_vcc_coding)
* condition\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## Consent
Patient consent and provision/category codings.
* [consent](/medical-api/handling-data/schema-v100/consent/base) – Main consent record
* [consent\_scope\_coding](/medical-api/handling-data/schema-v100/consent/scope_coding)
* [consent\_policyrule\_coding](/medical-api/handling-data/schema-v100/consent/policyrule_coding)
* [consent\_category](/medical-api/handling-data/schema-v100/consent/category)
* [consent\_category\_coding](/medical-api/handling-data/schema-v100/consent/category_coding)
* [consent\_provision\_code](/medical-api/handling-data/schema-v100/consent/provision_code)
* [consent\_provision\_code\_coding](/medical-api/handling-data/schema-v100/consent/provision_code_coding)
* [consent\_extension](/medical-api/handling-data/schema-v100/consent/extension)
* [consent\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/consent/extension_vcc_coding)
* consent\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## Coverage
Insurance and payment coverage.
* [coverage](/medical-api/handling-data/schema-v100/coverage/base) – Main coverage record
* [coverage\_type\_coding](/medical-api/handling-data/schema-v100/coverage/type_coding)
* [coverage\_relationship\_coding](/medical-api/handling-data/schema-v100/coverage/relationship_coding)
* [coverage\_class](/medical-api/handling-data/schema-v100/coverage/class)
* [coverage\_class\_type\_coding](/medical-api/handling-data/schema-v100/coverage/class_type_coding)
* [coverage\_extension](/medical-api/handling-data/schema-v100/coverage/extension)
* [coverage\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/coverage/extension_vcc_coding)
* coverage\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## Device
Devices (e.g., implants, equipment) with optional version detail.
* [device](/medical-api/handling-data/schema-v100/device/base) – Main device record
* [device\_type\_coding](/medical-api/handling-data/schema-v100/device/type_coding)
* [device\_version](/medical-api/handling-data/schema-v100/device/version) – Version information
* [device\_extension](/medical-api/handling-data/schema-v100/device/extension)
* [device\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/device/extension_vcc_coding)
* device\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## DiagnosticReport
Diagnostic reports containing test results and clinical findings.
* [diagnosticreport](/medical-api/handling-data/schema-v100/diagnosticreport/base) – Main diagnostic report record
* [diagnosticreport\_code\_coding](/medical-api/handling-data/schema-v100/diagnosticreport/code_coding)
* [diagnosticreport\_category\_coding](/medical-api/handling-data/schema-v100/diagnosticreport/category_coding)
* [diagnosticreport\_presentedform](/medical-api/handling-data/schema-v100/diagnosticreport/presentedform) – Attachment content
* [diagnosticreport\_extension](/medical-api/handling-data/schema-v100/diagnosticreport/extension)
* [diagnosticreport\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/diagnosticreport/extension_vcc_coding)
* diagnosticreport\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## DocumentReference
References to clinical documents and their content/attachments.
* [documentreference](/medical-api/handling-data/schema-v100/documentreference/base) – Main document reference record
* [documentreference\_type\_coding](/medical-api/handling-data/schema-v100/documentreference/type_coding)
* [documentreference\_content](/medical-api/handling-data/schema-v100/documentreference/content) – Attachment metadata
* [documentreference\_extension](/medical-api/handling-data/schema-v100/documentreference/extension)
* [documentreference\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/documentreference/extension_vcc_coding)
* documentreference\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## Encounter
Unique patient interactions with the healthcare system.
* [encounter](/medical-api/handling-data/schema-v100/encounter/base) – Main encounter record
* [encounter\_diagnosis](/medical-api/handling-data/schema-v100/encounter/diagnosis) – Diagnoses per encounter
* [encounter\_type](/medical-api/handling-data/schema-v100/encounter/type)
* [encounter\_type\_coding](/medical-api/handling-data/schema-v100/encounter/type_coding)
* [encounter\_reasoncode](/medical-api/handling-data/schema-v100/encounter/reasoncode)
* [encounter\_reasoncode\_coding](/medical-api/handling-data/schema-v100/encounter/reasoncode_coding)
* [encounter\_priority\_coding](/medical-api/handling-data/schema-v100/encounter/priority_coding)
* [encounter\_hospitalization\_dischargedisposition\_coding](/medical-api/handling-data/schema-v100/encounter/hospitalization_dischargedisposition_coding)
* [encounter\_extension](/medical-api/handling-data/schema-v100/encounter/extension)
* [encounter\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/encounter/extension_vcc_coding)
* encounter\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## FamilyMemberHistory
Family member history and conditions.
* [familymemberhistory](/medical-api/handling-data/schema-v100/familymemberhistory/base) – Main family member history record
* [familymemberhistory\_condition](/medical-api/handling-data/schema-v100/familymemberhistory/condition) – Conditions per family member
* [familymemberhistory\_condition\_code\_coding](/medical-api/handling-data/schema-v100/familymemberhistory/condition_code_coding)
* [familymemberhistory\_relationship\_coding](/medical-api/handling-data/schema-v100/familymemberhistory/relationship_coding)
* [familymemberhistory\_sex\_coding](/medical-api/handling-data/schema-v100/familymemberhistory/sex_coding)
* [familymemberhistory\_extension](/medical-api/handling-data/schema-v100/familymemberhistory/extension)
* [familymemberhistory\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/familymemberhistory/extension_vcc_coding)
* familymemberhistory\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## Goal
Patient goals and targets.
* [goal](/medical-api/handling-data/schema-v100/goal/base) – Main goal record
* [goal\_description\_coding](/medical-api/handling-data/schema-v100/goal/description_coding)
* [goal\_priority\_coding](/medical-api/handling-data/schema-v100/goal/priority_coding)
* [goal\_target](/medical-api/handling-data/schema-v100/goal/target) – Targets per goal
* [goal\_target\_measure\_coding](/medical-api/handling-data/schema-v100/goal/target_measure_coding)
* [goal\_extension](/medical-api/handling-data/schema-v100/goal/extension)
* [goal\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/goal/extension_vcc_coding)
* goal\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## Immunization
Vaccines administered to patients.
* [immunization](/medical-api/handling-data/schema-v100/immunization/base) – Main immunization record
* [immunization\_vaccinecode\_coding](/medical-api/handling-data/schema-v100/immunization/vaccinecode_coding)
* [immunization\_statusreason\_coding](/medical-api/handling-data/schema-v100/immunization/statusreason_coding)
* [immunization\_route\_coding](/medical-api/handling-data/schema-v100/immunization/route_coding)
* [immunization\_site\_coding](/medical-api/handling-data/schema-v100/immunization/site_coding)
* [immunization\_extension](/medical-api/handling-data/schema-v100/immunization/extension)
* [immunization\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/immunization/extension_vcc_coding)
* immunization\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## Location
Practice and facility locations where care is provided. Address is on the main location record (single in FHIR); telecom is normalized.
* [location](/medical-api/handling-data/schema-v100/location/base) – Main location record (includes address)
* [location\_type](/medical-api/handling-data/schema-v100/location/type)
* [location\_type\_coding](/medical-api/handling-data/schema-v100/location/type_coding)
* [location\_telecom](/medical-api/handling-data/schema-v100/location/telecom) – Contact details per location
* [location\_extension](/medical-api/handling-data/schema-v100/location/extension)
* [location\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/location/extension_vcc_coding)
* location\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## Medication
Medications ordered or administered during encounters.
* [medication](/medical-api/handling-data/schema-v100/medication/base) – Main medication record
* [medication\_code\_coding](/medical-api/handling-data/schema-v100/medication/code_coding)
* [medication\_extension](/medical-api/handling-data/schema-v100/medication/extension)
* [medication\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medication/extension_vcc_coding)
## MedicationAdministration
Records of medications actually administered to patients.
* [medicationadministration](/medical-api/handling-data/schema-v100/medicationadministration/base) – Main medication administration record
* [medicationadministration\_dosage\_route\_coding](/medical-api/handling-data/schema-v100/medicationadministration/dosage_route_coding)
* [medicationadministration\_extension](/medical-api/handling-data/schema-v100/medicationadministration/extension)
* [medicationadministration\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medicationadministration/extension_vcc_coding)
* medicationadministration\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## MedicationDispense
Records of medications dispensed to patients.
* [medicationdispense](/medical-api/handling-data/schema-v100/medicationdispense/base) – Main medication dispense record
* [medicationdispense\_extension](/medical-api/handling-data/schema-v100/medicationdispense/extension)
* [medicationdispense\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medicationdispense/extension_vcc_coding)
* medicationdispense\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## MedicationRequest
Medication orders and prescriptions.
* [medicationrequest](/medical-api/handling-data/schema-v100/medicationrequest/base) – Main medication request record
* [medicationrequest\_extension](/medical-api/handling-data/schema-v100/medicationrequest/extension)
* [medicationrequest\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medicationrequest/extension_vcc_coding)
* medicationrequest\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## MedicationStatement
Patient-reported medication information with dosage instructions.
* [medicationstatement](/medical-api/handling-data/schema-v100/medicationstatement/base) – Main medication statement record
* [medicationstatement\_dosage](/medical-api/handling-data/schema-v100/medicationstatement/dosage) – Dosage instructions per statement
* [medicationstatement\_dosage\_route\_coding](/medical-api/handling-data/schema-v100/medicationstatement/dosage_route_coding)
* [medicationstatement\_dosage\_doseandrate](/medical-api/handling-data/schema-v100/medicationstatement/dosage_doseandrate) – Dose/rate quantities per dosage
* [medicationstatement\_extension](/medical-api/handling-data/schema-v100/medicationstatement/extension)
* [medicationstatement\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medicationstatement/extension_vcc_coding)
* medicationstatement\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## Observation
Clinical measurements (e.g., blood pressure, height, weight) with reference ranges and interpretations.
* [observation](/medical-api/handling-data/schema-v100/observation/base) – Main observation record
* [observation\_code\_coding](/medical-api/handling-data/schema-v100/observation/code_coding)
* [observation\_category](/medical-api/handling-data/schema-v100/observation/category)
* [observation\_category\_coding](/medical-api/handling-data/schema-v100/observation/category_coding)
* [observation\_bodysite\_coding](/medical-api/handling-data/schema-v100/observation/bodysite_coding)
* [observation\_interpretation](/medical-api/handling-data/schema-v100/observation/interpretation) – Interpretation per observation (text)
* [observation\_interpretation\_coding](/medical-api/handling-data/schema-v100/observation/interpretation_coding)
* [observation\_referencerange](/medical-api/handling-data/schema-v100/observation/referencerange) – Reference ranges per observation
* [observation\_extension](/medical-api/handling-data/schema-v100/observation/extension)
* [observation\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/observation/extension_vcc_coding)
* observation\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## Organization
Healthcare organizations and facilities, with normalized addresses and telecom.
* [organization](/medical-api/handling-data/schema-v100/organization/base) – Main organization record
* [organization\_address](/medical-api/handling-data/schema-v100/organization/address) – Addresses per organization
* [organization\_telecom](/medical-api/handling-data/schema-v100/organization/telecom) – Contact details per organization
* [organization\_extension](/medical-api/handling-data/schema-v100/organization/extension)
* [organization\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/organization/extension_vcc_coding)
* organization\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## Patient
Patient demographic information and core patient data.
* [patient](/medical-api/handling-data/schema-v100/patient/base) – Main patient record
* [patient\_identifier](/medical-api/handling-data/schema-v100/patient/identifier)
* [patient\_identifier\_type\_coding](/medical-api/handling-data/schema-v100/patient/identifier_type_coding)
* [patient\_name](/medical-api/handling-data/schema-v100/patient/name)
* [patient\_telecom](/medical-api/handling-data/schema-v100/patient/telecom)
* [patient\_address](/medical-api/handling-data/schema-v100/patient/address)
* [patient\_communication](/medical-api/handling-data/schema-v100/patient/communication) – Patient communication and language
* [patient\_communication\_language\_coding](/medical-api/handling-data/schema-v100/patient/communication_language_coding)
* [patient\_mapping](/medical-api/handling-data/schema-v100/patient/mapping) – External ID mapping
* [patient\_extension](/medical-api/handling-data/schema-v100/patient/extension)
* [patient\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/patient/extension_vcc_coding)
* patient\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables#patient-references) (managingOrganization)
## Practitioner
Healthcare providers who deliver care, with normalized names, addresses, telecom, and qualifications.
* [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) – Main practitioner record
* [practitioner\_address](/medical-api/handling-data/schema-v100/practitioner/address) – Addresses per practitioner
* [practitioner\_name](/medical-api/handling-data/schema-v100/practitioner/name) – Names per practitioner
* [practitioner\_telecom](/medical-api/handling-data/schema-v100/practitioner/telecom) – Contact details per practitioner
* [practitioner\_qualification](/medical-api/handling-data/schema-v100/practitioner/qualification) – Qualifications per practitioner
* [practitioner\_qualification\_code\_coding](/medical-api/handling-data/schema-v100/practitioner/qualification_code_coding)
* [practitioner\_extension](/medical-api/handling-data/schema-v100/practitioner/extension)
* [practitioner\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/practitioner/extension_vcc_coding)
## Procedure
Procedures performed on patients.
* [procedure](/medical-api/handling-data/schema-v100/procedure/base) – Main procedure record
* [procedure\_code\_coding](/medical-api/handling-data/schema-v100/procedure/code_coding)
* [procedure\_bodysite](/medical-api/handling-data/schema-v100/procedure/bodysite)
* [procedure\_bodysite\_coding](/medical-api/handling-data/schema-v100/procedure/bodysite_coding)
* [procedure\_reasoncode](/medical-api/handling-data/schema-v100/procedure/reasoncode)
* [procedure\_reasoncode\_coding](/medical-api/handling-data/schema-v100/procedure/reasoncode_coding)
* [procedure\_note](/medical-api/handling-data/schema-v100/procedure/note)
* [procedure\_extension](/medical-api/handling-data/schema-v100/procedure/extension)
* [procedure\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/procedure/extension_vcc_coding)
* procedure\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
## RelatedPerson
A person related to the patient (e.g., family) with demographics and relationship codings.
* [relatedperson](/medical-api/handling-data/schema-v100/relatedperson/base) – Main related person record
* [relatedperson\_relationship](/medical-api/handling-data/schema-v100/relatedperson/relationship)
* [relatedperson\_relationship\_coding](/medical-api/handling-data/schema-v100/relatedperson/relationship_coding)
* [relatedperson\_name](/medical-api/handling-data/schema-v100/relatedperson/name)
* [relatedperson\_address](/medical-api/handling-data/schema-v100/relatedperson/address)
* [relatedperson\_telecom](/medical-api/handling-data/schema-v100/relatedperson/telecom)
* [relatedperson\_communication](/medical-api/handling-data/schema-v100/relatedperson/communication)
* [relatedperson\_communication\_language\_coding](/medical-api/handling-data/schema-v100/relatedperson/communication_language_coding)
* [relatedperson\_extension](/medical-api/handling-data/schema-v100/relatedperson/extension)
* [relatedperson\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/relatedperson/extension_vcc_coding)
## ServiceRequest
Orders and referrals for procedures, labs, or other services.
* [servicerequest](/medical-api/handling-data/schema-v100/servicerequest/base) – Main service request record
* [servicerequest\_code\_coding](/medical-api/handling-data/schema-v100/servicerequest/code_coding)
* [servicerequest\_extension](/medical-api/handling-data/schema-v100/servicerequest/extension)
* [servicerequest\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/servicerequest/extension_vcc_coding)
* servicerequest\_references – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
# allergyintolerance
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/allergyintolerance/base
A record of a clinical assessment of an allergy or intolerance; a propensity, or a potential risk to an individual, to have an adverse reaction on future exposure to the specified substance, or class of substance. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/allergyintolerance.html) for full details.
**Previous version:** [allergy\_intolerance](/medical-api/handling-data/schema-v000/allergy-intolerance/base)
**Tables in this resource:**
* **allergyintolerance** – Main allergy/intolerance record (this page)
* [allergyintolerance\_code\_coding](/medical-api/handling-data/schema-v100/allergyintolerance/code_coding)
* [allergyintolerance\_clinicalstatus\_coding](/medical-api/handling-data/schema-v100/allergyintolerance/clinicalstatus_coding)
* [allergyintolerance\_reaction](/medical-api/handling-data/schema-v100/allergyintolerance/reaction) – Reactions
* [allergyintolerance\_reaction\_substance\_coding](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_substance_coding)
* [allergyintolerance\_reaction\_manifestation](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_manifestation) – Manifestations
* [allergyintolerance\_reaction\_manifestation\_coding](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_manifestation_coding)
* [allergyintolerance\_extension](/medical-api/handling-data/schema-v100/allergyintolerance/extension)
* [allergyintolerance\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/allergyintolerance/extension_vcc_coding)
* **allergyintolerance\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Reference Table:**
The `allergyintolerance_references` table contains normalized references from the allergy/intolerance to other entities. It supports the following reference properties:
* **patient** (required): links to the [patient](/medical-api/handling-data/schema-v100/patient/base) who has the allergy/intolerance
* **recorder**: links to the [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) who recorded the allergy/intolerance
For detailed information about reference table structure and indexing, see the [Reference Tables documentation](/medical-api/handling-data/schema-v100/reference_tables).
**Main table**:
**Primary Keys:**
* allergyintolerance\_id
**Foreign Keys:**
* patient\_id – links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------- | --------- | ---------------------------------------------------------- |
| allergyintolerance\_id | varchar | Unique identifier for the allergy/intolerance |
| patient\_id | varchar | Unique identifier for the patient (subject) |
| onsetdatetime | datetime | Onset date/time if provided directly |
| onsetperiod\_start | datetime | Start of onset period |
| onset\_date† | datetime | Coalesced onset date (onsetdatetime or onsetperiod\_start) |
| code\_text | varchar | Free-text description of the allergy/intolerance code |
| code\_snomed\_code† | varchar | SNOMED CT code for the allergy/intolerance |
| code\_snomed\_display† | varchar | Human-readable SNOMED CT description |
| criticality | varchar | Criticality of the reaction (low, high, unable-to-assess) |
| clinicalstatus\_text | varchar | Free-text clinical status |
| clinicalstatus\_hl7\_code† | varchar | HL7 clinical status code |
| clinicalstatus\_hl7\_display† | varchar | Human-readable HL7 description |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [allergyintolerance\_clinicalstatus\_coding](/medical-api/handling-data/schema-v100/allergyintolerance/clinicalstatus_coding)
* [allergyintolerance\_code\_coding](/medical-api/handling-data/schema-v100/allergyintolerance/code_coding)
* [allergyintolerance\_extension](/medical-api/handling-data/schema-v100/allergyintolerance/extension)
* [allergyintolerance\_reaction](/medical-api/handling-data/schema-v100/allergyintolerance/reaction)
## Version diff
**Renamed**
* `allergy_intolerance_id` → `allergyintolerance_id`
* `snomed_code` → `code_snomed_code`
* `snomed_display` → `code_snomed_display`
* `clinical_status_hl7_code` → `clinicalstatus_hl7_code`
* `clinical_status_hl7_display` → `clinicalstatus_hl7_display`
**Moved to separate tables**
* `source_code_code` → [`allergyintolerance_code_coding.code`](/medical-api/handling-data/schema-v100/allergyintolerance/code_coding) w/ `code_rank = 1`
* `source_code_display` → [`allergyintolerance_code_coding.display`](/medical-api/handling-data/schema-v100/allergyintolerance/code_coding) w/ `code_rank = 1`
* `source_code_system` → [`allergyintolerance_code_coding.system`](/medical-api/handling-data/schema-v100/allergyintolerance/code_coding) w/ `code_rank = 1`
* `source_clinical_status_code` → [`allergyintolerance_clinicalstatus_coding.code`](/medical-api/handling-data/schema-v100/allergyintolerance/clinicalstatus_coding) w/ `code_rank = 1`
* `source_clinical_status_display` → [`allergyintolerance_clinicalstatus_coding.display`](/medical-api/handling-data/schema-v100/allergyintolerance/clinicalstatus_coding) w/ `code_rank = 1`
* `source_clinical_status_system` → [`allergyintolerance_clinicalstatus_coding.system`](/medical-api/handling-data/schema-v100/allergyintolerance/clinicalstatus_coding) w/ `code_rank = 1`
# allergyintolerance_clinicalstatus_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/allergyintolerance/clinicalstatus_coding
Normalized `AllergyIntolerance.clinicalStatus.coding[]` property on the [AllergyIntolerance](https://hl7.org/fhir/R4/allergyintolerance.html) FHIR resource.
**Primary Keys:**
* allergyintolerance\_clinicalstatus\_coding\_id
**Foreign Keys:**
* allergyintolerance\_id - links to the [allergyintolerance](/medical-api/handling-data/schema-v100/allergyintolerance/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------------------- | --------- | --------------------------------------------------- |
| allergyintolerance\_clinicalstatus\_coding\_id | varchar | Unique identifier for the coding row |
| allergyintolerance\_id | varchar | FK to the parent allergyintolerance record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [allergyintolerance](/medical-api/handling-data/schema-v100/allergyintolerance/base)
# allergyintolerance_code_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/allergyintolerance/code_coding
Normalized `AllergyIntolerance.code.coding[]` property on the [AllergyIntolerance](https://hl7.org/fhir/R4/allergyintolerance.html) FHIR resource.
**Primary Keys:**
* allergyintolerance\_code\_coding\_id
**Foreign Keys:**
* allergyintolerance\_id - links to the [allergyintolerance](/medical-api/handling-data/schema-v100/allergyintolerance/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------------ | --------- | --------------------------------------------------- |
| allergyintolerance\_code\_coding\_id | varchar | Unique identifier for the coding row |
| allergyintolerance\_id | varchar | FK to the parent allergyintolerance record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [allergyintolerance](/medical-api/handling-data/schema-v100/allergyintolerance/base)
# allergyintolerance_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/allergyintolerance/extension
Normalized `AllergyIntolerance.extension[]` property on the [AllergyIntolerance](https://hl7.org/fhir/R4/allergyintolerance.html) FHIR resource.
**Primary Keys:**
* allergyintolerance\_extension\_id
**Foreign Keys:**
* allergyintolerance\_id - links to the [allergyintolerance](/medical-api/handling-data/schema-v100/allergyintolerance/base) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------- | --------- | ------------------------------------------------------ |
| allergyintolerance\_extension\_id | varchar | Unique identifier for the extension row |
| allergyintolerance\_id | varchar | FK to the parent allergyintolerance record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | Free-text description of the value |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [allergyintolerance](/medical-api/handling-data/schema-v100/allergyintolerance/base)
**Child:**
* [allergyintolerance\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/allergyintolerance/extension_vcc_coding)
# allergyintolerance_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/allergyintolerance/extension_vcc_coding
Normalized `AllergyIntolerance.extension[].valueCodeableConcept.coding[]` property on the [AllergyIntolerance](https://hl7.org/fhir/R4/allergyintolerance.html) FHIR resource.
**Primary Keys:**
* allergyintolerance\_extension\_vcc\_coding\_id
**Foreign Keys:**
* allergyintolerance\_extension\_id - links to the [allergyintolerance\_extension](/medical-api/handling-data/schema-v100/allergyintolerance/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------------------- | --------- | --------------------------------------------------- |
| allergyintolerance\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| allergyintolerance\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [allergyintolerance\_extension](/medical-api/handling-data/schema-v100/allergyintolerance/extension)
# allergyintolerance_reaction
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/allergyintolerance/reaction
Details about each adverse reaction event linked to the allergy/intolerance (`AllergyIntolerance.reaction[]`).
**Previous version:** [allergy\_intolerance\_reaction](/medical-api/handling-data/schema-v000/allergy-intolerance/reaction)
**Primary Keys:**
* allergyintolerance\_reaction\_id
**Foreign Keys:**
* allergyintolerance\_id - links to the [allergyintolerance](/medical-api/handling-data/schema-v100/allergyintolerance/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------------- | --------- | ---------------------------------------------------------- |
| allergyintolerance\_reaction\_id | varchar | Unique identifier for the reaction |
| allergyintolerance\_id | varchar | FK to the parent allergyintolerance record |
| onset | datetime | Date when the reaction began |
| substance\_text | varchar | Free-text description of the substance |
| substance\_snomed\_code† | varchar | SNOMED CT code for the substance responsible for the event |
| substance\_snomed\_display† | varchar | Human-readable SNOMED CT description of the substance |
| severity | varchar | Severity of the reaction (mild, moderate, severe) |
**Related Tables:**
**Parent:**
* [allergyintolerance](/medical-api/handling-data/schema-v100/allergyintolerance/base)
**Child:**
* [allergyintolerance\_reaction\_manifestation](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_manifestation)
* [allergyintolerance\_reaction\_substance\_coding](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_substance_coding)
## Version diff
**Renamed**
* `allergy_intolerance_reaction_id` → `allergyintolerance_reaction_id`
* `allergy_intolerance_id` → `allergyintolerance_id`
* `onset_date` → `onset`
* `snomed_code` → `substance_snomed_code`
* `snomed_display` → `substance_snomed_display`
**Moved to separate tables**
* `source_substance_code` → [`allergyintolerance_reaction_substance_coding.code`](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_substance_coding) w/ `code_rank = 1`
* `source_substance_display` → [`allergyintolerance_reaction_substance_coding.display`](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_substance_coding) w/ `code_rank = 1`
* `source_substance_system` → [`allergyintolerance_reaction_substance_coding.system`](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_substance_coding) w/ `code_rank = 1`
# allergyintolerance_reaction_manifestation
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/allergyintolerance/reaction_manifestation
Clinical symptoms/signs associated with an adverse reaction event (`AllergyIntolerance.reaction[].manifestation[]`).
**Previous version:** [allergy\_intolerance\_reaction\_manifestation](/medical-api/handling-data/schema-v000/allergy-intolerance/reaction-manifestation)
**Primary Keys:**
* allergyintolerance\_reaction\_manifestation\_id
**Foreign Keys:**
* allergyintolerance\_reaction\_id - links to the [allergyintolerance\_reaction](/medical-api/handling-data/schema-v100/allergyintolerance/reaction) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------------------------- | --------- | ---------------------------------------------------- |
| allergyintolerance\_reaction\_manifestation\_id | varchar | Unique identifier for the manifestation |
| allergyintolerance\_reaction\_id | varchar | FK to the parent allergyintolerance\_reaction record |
| text | varchar | Free-text description of the manifestation |
| snomed\_code† | varchar | SNOMED CT code for the manifestation |
| snomed\_display† | varchar | Human-readable SNOMED CT description |
**Related Tables:**
**Parent:**
* [allergyintolerance\_reaction](/medical-api/handling-data/schema-v100/allergyintolerance/reaction)
**Child:**
* [allergyintolerance\_reaction\_manifestation\_coding](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_manifestation_coding)
## Version diff
**Renamed**
* `allergy_intolerance_reaction_manifestation_id` → `allergyintolerance_reaction_manifestation_id`
* `allergy_intolerance_reaction_id` → `allergyintolerance_reaction_id`
**Moved to separate tables**
* `source_manifestation_code` → [`allergyintolerance_reaction_manifestation_coding.code`](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_manifestation_coding) w/ `code_rank = 1`
* `source_manifestation_display` → [`allergyintolerance_reaction_manifestation_coding.display`](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_manifestation_coding) w/ `code_rank = 1`
* `source_manifestation_system` → [`allergyintolerance_reaction_manifestation_coding.system`](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_manifestation_coding) w/ `code_rank = 1`
# allergyintolerance_reaction_manifestation_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/allergyintolerance/reaction_manifestation_coding
Normalized `AllergyIntolerance.reaction[].manifestation[].coding[]` property on the [AllergyIntolerance](https://hl7.org/fhir/R4/allergyintolerance.html) FHIR resource.
**Primary Keys:**
* allergyintolerance\_reaction\_manifestation\_coding\_id
**Foreign Keys:**
* allergyintolerance\_reaction\_manifestation\_id - links to the [allergyintolerance\_reaction\_manifestation](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_manifestation) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------------------------------- | --------- | ------------------------------------------------------------------- |
| allergyintolerance\_reaction\_manifestation\_coding\_id | varchar | Unique identifier for the coding row |
| allergyintolerance\_reaction\_manifestation\_id | varchar | FK to the parent allergyintolerance\_reaction\_manifestation record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [allergyintolerance\_reaction\_manifestation](/medical-api/handling-data/schema-v100/allergyintolerance/reaction_manifestation)
# allergyintolerance_reaction_substance_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/allergyintolerance/reaction_substance_coding
Normalized `AllergyIntolerance.reaction[].substance.coding[]` property on the [AllergyIntolerance](https://hl7.org/fhir/R4/allergyintolerance.html) FHIR resource.
**Primary Keys:**
* allergyintolerance\_reaction\_substance\_coding\_id
**Foreign Keys:**
* allergyintolerance\_reaction\_id - links to the [allergyintolerance\_reaction](/medical-api/handling-data/schema-v100/allergyintolerance/reaction) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------------------------- | --------- | ---------------------------------------------------- |
| allergyintolerance\_reaction\_substance\_coding\_id | varchar | Unique identifier for the coding row |
| allergyintolerance\_reaction\_id | varchar | FK to the parent allergyintolerance\_reaction record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [allergyintolerance\_reaction](/medical-api/handling-data/schema-v100/allergyintolerance/reaction)
# binary
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/binary
A resource that represents the data of a single raw artifact as digital content accessible in its native format. A Binary resource can contain any content, whether text, image, pdf, zip archive, etc. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/binary.html) for full details.
**Previous version:** [binary](/medical-api/handling-data/schema-v000/binary)
**Tables in this resource:** **binary** – Binary content (this page).
**Primary Keys:**
* binary\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table
| Column | Data Type | Description |
| ----------------- | --------- | ------------------------------------------------ |
| binary\_id | varchar | Unique identifier for the binary resource |
| patient\_id | varchar | Unique identifier for the patient |
| contenttype | varchar | MIME type of the binary data (e.g., text/plain) |
| data | varchar | Base64-encoded binary data |
| meta\_source | varchar | Data source (e.g., metriport:ai-generated-brief) |
| meta\_lastupdated | datetime | Last update timestamp from FHIR meta |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
## Version diff
**Renamed**
* `content_type` → `contenttype`
* `meta_last_updated` → `meta_lastupdated`
# careplan_activity
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/careplan/activity
Identifies a planned item that is part of the care plan (`CarePlan.activity[]`).
**Primary Keys:**
* careplan\_activity\_id
**Foreign Keys:**
* careplan\_id - links to the [care plan](/medical-api/handling-data/schema-v100/careplan/base) table
| Column | Data Type | Description |
| --------------------------------- | --------- | ----------------------------------------------------------------------------------------- |
| careplan\_activity\_id | varchar | Unique identifier for the activity row |
| careplan\_id | varchar | Parent care plan |
| detail\_status | varchar | Status of the activity detail |
| detail\_scheduledperiod\_start | datetime | Start of scheduled period for the activity (FHIR `activity.detail.scheduledPeriod.start`) |
| detail\_scheduledperiod\_end | datetime | End of scheduled period for the activity (FHIR `activity.detail.scheduledPeriod.end`) |
| detail\_code\_text | varchar | Free-text activity detail code (FHIR `activity.detail.code.text`) |
| detail\_description | varchar | Description of the activity |
| detail\_location\_reference\_id | varchar | Resolved ID of the location where the activity takes place |
| detail\_location\_reference\_type | varchar | Type of referenced resource (e.g. Location) |
**Related Tables:**
**Parent:**
* [careplan](/medical-api/handling-data/schema-v100/careplan/base)
**Child:**
* [careplan\_activity\_detail\_code\_coding](/medical-api/handling-data/schema-v100/careplan/activity_detail_code_coding)
* [careplan\_activity\_detail\_performer](/medical-api/handling-data/schema-v100/careplan/activity_detail_performer)
# careplan_activity_detail_code_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/careplan/activity_detail_code_coding
Normalized `CarePlan.activity[].detail.code.coding[]` property on the [CarePlan](https://hl7.org/fhir/R4/careplan.html) FHIR resource.
**Primary Keys:**
* careplan\_activity\_detail\_code\_coding\_id
**Foreign Keys:**
* careplan\_activity\_id - links to the [careplan\_activity](/medical-api/handling-data/schema-v100/careplan/activity) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------------------------- | --------- | --------------------------------------------------- |
| careplan\_activity\_detail\_code\_coding\_id | varchar | Unique identifier for the coding row |
| careplan\_activity\_id | varchar | FK to the parent careplan\_activity record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [careplan\_activity](/medical-api/handling-data/schema-v100/careplan/activity)
# careplan_activity_detail_performer
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/careplan/activity_detail_performer
Identifies who will be responsible for carrying out the planned activity (`CarePlan.activity.detail.performer[]`).
**Primary Keys:**
* careplan\_activity\_detail\_performer\_id
**Foreign Keys:**
* careplan\_activity\_id - links to the [care plan activity](/medical-api/handling-data/schema-v100/careplan/activity) table
| Column | Data Type | Description |
| ----------------------------------------- | --------- | ---------------------------------------------------------------- |
| careplan\_activity\_detail\_performer\_id | varchar | Unique identifier for the performer row |
| careplan\_activity\_id | varchar | Parent care plan activity |
| reference\_id | varchar | Resolved ID of the performer (e.g. Practitioner or Organization) |
| reference\_type | varchar | Type of referenced resource (e.g. Practitioner, Organization) |
**Related Tables:**
**Parent:**
* [careplan\_activity](/medical-api/handling-data/schema-v100/careplan/activity)
# careplan
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/careplan/base
Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/careplan.html) for full details.
**Tables in this resource:**
* **careplan** – Main care plan record (this page)
* [careplan\_category](/medical-api/handling-data/schema-v100/careplan/category) – Backbone for category
* [careplan\_category\_coding](/medical-api/handling-data/schema-v100/careplan/category_coding)
* [careplan\_activity](/medical-api/handling-data/schema-v100/careplan/activity) – Activities within the care plan
* [careplan\_activity\_detail\_code\_coding](/medical-api/handling-data/schema-v100/careplan/activity_detail_code_coding)
* [careplan\_activity\_detail\_performer](/medical-api/handling-data/schema-v100/careplan/activity_detail_performer) – Performers per activity
* [careplan\_extension](/medical-api/handling-data/schema-v100/careplan/extension)
* [careplan\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/careplan/extension_vcc_coding)
* **careplan\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Primary Keys:**
* careplan\_id
**Foreign Keys:**
* patient\_id – links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------ | --------- | ------------------------------------------------------------ |
| careplan\_id | varchar | Unique identifier for the care plan |
| patient\_id | varchar | Unique identifier for the patient |
| status | varchar | Status of the care plan |
| created | datetime | When the care plan was created (FHIR `CarePlan.created`) |
| period\_start | datetime | Start of the care plan period (FHIR `CarePlan.period.start`) |
| period\_end | datetime | End of the care plan period (FHIR `CarePlan.period.end`) |
| intent | varchar | Intent |
| description | varchar | Narrative description of the care plan |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [careplan\_activity](/medical-api/handling-data/schema-v100/careplan/activity)
* [careplan\_category](/medical-api/handling-data/schema-v100/careplan/category)
* [careplan\_extension](/medical-api/handling-data/schema-v100/careplan/extension)
# careplan_category
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/careplan/category
Identifies the type of plan, such as disease management or surgical management (`CarePlan.category[]`).
**Primary Keys:**
* careplan\_category\_id
**Foreign Keys:**
* careplan\_id - links to the [care plan](/medical-api/handling-data/schema-v100/careplan/base) table
| Column | Data Type | Description |
| ---------------------- | --------- | -------------------------------------- |
| careplan\_category\_id | varchar | Unique identifier for the category row |
| careplan\_id | varchar | FK to the parent careplan record |
| text | varchar | Display text for the category |
**Related Tables:**
**Parent:**
* [careplan](/medical-api/handling-data/schema-v100/careplan/base)
**Child:**
* [careplan\_category\_coding](/medical-api/handling-data/schema-v100/careplan/category_coding)
# careplan_category_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/careplan/category_coding
Normalized `CarePlan.category[].coding[]` property on the [CarePlan](https://hl7.org/fhir/R4/careplan.html) FHIR resource.
**Primary Keys:**
* careplan\_category\_coding\_id
**Foreign Keys:**
* careplan\_category\_id - links to the [careplan\_category](/medical-api/handling-data/schema-v100/careplan/category) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------ | --------- | --------------------------------------------------- |
| careplan\_category\_coding\_id | varchar | Unique identifier for the coding row |
| careplan\_category\_id | varchar | FK to the parent careplan\_category record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [careplan\_category](/medical-api/handling-data/schema-v100/careplan/category)
# careplan_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/careplan/extension
Normalized `CarePlan.extension[]` property on the [CarePlan](https://hl7.org/fhir/R4/careplan.html) FHIR resource.
**Primary Keys:**
* careplan\_extension\_id
**Foreign Keys:**
* careplan\_id - links to the [careplan](/medical-api/handling-data/schema-v100/careplan/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | ------------------------------------------------------ |
| careplan\_extension\_id | varchar | Unique identifier for the extension row |
| careplan\_id | varchar | FK to the parent careplan record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [careplan](/medical-api/handling-data/schema-v100/careplan/base)
**Child:**
* [careplan\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/careplan/extension_vcc_coding)
# careplan_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/careplan/extension_vcc_coding
Normalized `CarePlan.extension[].valueCodeableConcept.coding[]` property on the [CarePlan](https://hl7.org/fhir/R4/careplan.html) FHIR resource.
**Primary Keys:**
* careplan\_extension\_vcc\_coding\_id
**Foreign Keys:**
* careplan\_extension\_id - links to the [careplan\_extension](/medical-api/handling-data/schema-v100/careplan/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------------ | --------- | --------------------------------------------------- |
| careplan\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| careplan\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [careplan\_extension](/medical-api/handling-data/schema-v100/careplan/extension)
# communication
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/communication/base
An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/communication.html) for full details.
**Tables in this resource:**
* **communication** – Communication record (this page)
* [communication\_category](/medical-api/handling-data/schema-v100/communication/category) – Backbone for category
* [communication\_category\_coding](/medical-api/handling-data/schema-v100/communication/category_coding)
* [communication\_extension](/medical-api/handling-data/schema-v100/communication/extension)
* [communication\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/communication/extension_vcc_coding)
* **communication\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Primary Keys:**
* communication\_id
**Foreign Keys:**
* patient\_id – links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table (subject)
† Metriport Platform added
| Column | Data Type | Description |
| ------------------ | --------- | ------------------------------------------------------------------- |
| communication\_id | varchar | Unique identifier for the communication |
| patient\_id | varchar | Unique identifier for the patient |
| status | varchar | Status of the communication |
| sent | datetime | When the communication was sent (FHIR `Communication.sent`) |
| received | datetime | When the communication was received (FHIR `Communication.received`) |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [communication\_category](/medical-api/handling-data/schema-v100/communication/category)
* [communication\_extension](/medical-api/handling-data/schema-v100/communication/extension)
# communication_category
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/communication/category
The type of message conveyed such as alert, notification, reminder, instruction, etc. (`Communication.category[]`).
**Primary Keys:**
* communication\_category\_id
**Foreign Keys:**
* communication\_id - links to the [communication](/medical-api/handling-data/schema-v100/communication/base) table
| Column | Data Type | Description |
| --------------------------- | --------- | -------------------------------------- |
| communication\_category\_id | varchar | Unique identifier for the category row |
| communication\_id | varchar | FK to the parent communication record |
| text | varchar | Display text for the category |
**Related Tables:**
**Parent:**
* [communication](/medical-api/handling-data/schema-v100/communication/base)
**Child:**
* [communication\_category\_coding](/medical-api/handling-data/schema-v100/communication/category_coding)
# communication_category_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/communication/category_coding
Normalized `Communication.category[].coding[]` property on the [Communication](https://hl7.org/fhir/R4/communication.html) FHIR resource.
**Primary Keys:**
* communication\_category\_coding\_id
**Foreign Keys:**
* communication\_category\_id - links to the [communication\_category](/medical-api/handling-data/schema-v100/communication/category) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------------- | --------- | --------------------------------------------------- |
| communication\_category\_coding\_id | varchar | Unique identifier for the coding row |
| communication\_category\_id | varchar | FK to the parent communication\_category record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [communication\_category](/medical-api/handling-data/schema-v100/communication/category)
# communication_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/communication/extension
Normalized `Communication.extension[]` property on the [Communication](https://hl7.org/fhir/R4/communication.html) FHIR resource.
**Primary Keys:**
* communication\_extension\_id
**Foreign Keys:**
* communication\_id - links to the [communication](/medical-api/handling-data/schema-v100/communication/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------- | --------- | ------------------------------------------------------ |
| communication\_extension\_id | varchar | Unique identifier for the extension row |
| communication\_id | varchar | FK to the parent communication record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [communication](/medical-api/handling-data/schema-v100/communication/base)
**Child:**
* [communication\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/communication/extension_vcc_coding)
# communication_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/communication/extension_vcc_coding
Normalized `Communication.extension[].valueCodeableConcept.coding[]` property on the [Communication](https://hl7.org/fhir/R4/communication.html) FHIR resource.
**Primary Keys:**
* communication\_extension\_vcc\_coding\_id
**Foreign Keys:**
* communication\_extension\_id - links to the [communication\_extension](/medical-api/handling-data/schema-v100/communication/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------------------- | --------- | --------------------------------------------------- |
| communication\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| communication\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [communication\_extension](/medical-api/handling-data/schema-v100/communication/extension)
# composition_attester
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/composition/attester
A participant who has attested to the accuracy of the composition/document (`Composition.attester[]`).
**Primary Keys:** composition\_attester\_id
**Foreign Keys:**
* composition\_id - links to the [composition](/medical-api/handling-data/schema-v100/composition/base) table
| Column | Data Type | Description |
| ------------------------- | --------- | ---------------------------------------------------------- |
| composition\_attester\_id | varchar | Unique identifier for the attester row |
| composition\_id | varchar | Parent composition |
| mode | varchar | Attestation mode (e.g., legal, professional) |
| time | datetime | When the attestation occurred |
| party\_reference\_id | varchar | Resolved ID of the attester (e.g. Practitioner or Patient) |
| party\_reference\_type | varchar | Type of referenced resource (e.g. Practitioner, Patient) |
**Related Tables:**
**Parent:**
* [composition](/medical-api/handling-data/schema-v100/composition/base)
# composition
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/composition/base
A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/composition.html) for full details.
**Tables in this resource:**
* **composition** – Main composition record (this page)
* [composition\_type\_coding](/medical-api/handling-data/schema-v100/composition/type_coding)
* [composition\_section](/medical-api/handling-data/schema-v100/composition/section) – Sections within the document
* [composition\_section\_code\_coding](/medical-api/handling-data/schema-v100/composition/section_code_coding)
* [composition\_attester](/medical-api/handling-data/schema-v100/composition/attester) – Attestation information
* [composition\_event](/medical-api/handling-data/schema-v100/composition/event) – Event/period
* [composition\_section\_entry](/medical-api/handling-data/schema-v100/composition/section_entry) – Section entries
* [composition\_extension](/medical-api/handling-data/schema-v100/composition/extension)
* [composition\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/composition/extension_vcc_coding)
* **composition\_references** – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
† Metriport Platform added
**Primary Keys:**
* composition\_id
**Foreign Keys:**
* patient\_id – links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table (`Composition.subject`)
| Column | Data Type | Description |
| --------------------- | --------- | --------------------------------------------------------------- |
| composition\_id | varchar | Unique identifier for the composition |
| patient\_id | varchar | Unique identifier for the patient (`Composition.subject`) |
| status | varchar | Status of the composition |
| date | datetime | Composition date (`Composition.date`) |
| type\_text | varchar | Free-text type of the composition (`Composition.type.text`) |
| type\_loinc\_code† | varchar | LOINC type code (`Composition.type.coding` preferred binding) |
| type\_loinc\_display† | varchar | Human-readable description of LOINC type |
| title | varchar | Title of the composition (`Composition.title`) |
| identifier\_use | varchar | Identifier use (`Composition.identifier.use`) |
| identifier\_value | varchar | Identifier value (`Composition.identifier.value`) |
| confidentiality | varchar | Confidentiality code (`Composition.confidentiality`) |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source derived from Metriport data-source extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [composition\_attester](/medical-api/handling-data/schema-v100/composition/attester)
* [composition\_event](/medical-api/handling-data/schema-v100/composition/event)
* [composition\_extension](/medical-api/handling-data/schema-v100/composition/extension)
* [composition\_section](/medical-api/handling-data/schema-v100/composition/section)
* [composition\_type\_coding](/medical-api/handling-data/schema-v100/composition/type_coding)
# composition_event
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/composition/event
The clinical service, such as a colonoscopy or an appendectomy, being documented (`Composition.event[]`).
**Primary Keys:**
* composition\_event\_id
**Foreign Keys:**
* composition\_id - links to the [composition](/medical-api/handling-data/schema-v100/composition/base) table
| Column | Data Type | Description |
| ---------------------- | --------- | ----------------------------------- |
| composition\_event\_id | varchar | Unique identifier for the event row |
| composition\_id | varchar | Parent composition |
| period\_start | datetime | Start of the event period |
| period\_end | datetime | End of the event period |
**Related Tables:**
**Parent:**
* [composition](/medical-api/handling-data/schema-v100/composition/base)
# composition_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/composition/extension
Normalized `Composition.extension[]` property on the [Composition](https://hl7.org/fhir/R4/composition.html) FHIR resource.
**Primary Keys:**
* composition\_extension\_id
**Foreign Keys:**
* composition\_id - links to the [composition](/medical-api/handling-data/schema-v100/composition/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | ------------------------------------------------------ |
| composition\_extension\_id | varchar | Unique identifier for the extension row |
| composition\_id | varchar | FK to the parent composition record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [composition](/medical-api/handling-data/schema-v100/composition/base)
**Child:**
* [composition\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/composition/extension_vcc_coding)
# composition_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/composition/extension_vcc_coding
Normalized `Composition.extension[].valueCodeableConcept.coding[]` property on the [Composition](https://hl7.org/fhir/R4/composition.html) FHIR resource.
**Primary Keys:**
* composition\_extension\_vcc\_coding\_id
**Foreign Keys:**
* composition\_extension\_id - links to the [composition\_extension](/medical-api/handling-data/schema-v100/composition/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------------- | --------- | --------------------------------------------------- |
| composition\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| composition\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [composition\_extension](/medical-api/handling-data/schema-v100/composition/extension)
# composition_section
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/composition/section
A nested sub-section within the composition (`Composition.section[]`).
**Primary Keys:**
* composition\_section\_id
**Foreign Keys:**
* composition\_id - links to the [composition](/medical-api/handling-data/schema-v100/composition/base) table
| Column | Data Type | Description |
| ------------------------ | --------- | -------------------------------------- |
| composition\_section\_id | varchar | Unique identifier for the section |
| composition\_id | varchar | Parent composition |
| code\_text | varchar | Free-text section code |
| title | varchar | Section title |
| text\_div | varchar | Section narrative as div |
| text\_status | varchar | Status of the narrative text |
| mode | varchar | Section mode (e.g., working, snapshot) |
**Related Tables:**
**Parent:**
* [composition](/medical-api/handling-data/schema-v100/composition/base)
**Child:**
* [composition\_section\_code\_coding](/medical-api/handling-data/schema-v100/composition/section_code_coding)
* [composition\_section\_entry](/medical-api/handling-data/schema-v100/composition/section_entry)
# composition_section_code_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/composition/section_code_coding
Normalized `Composition.section[].code.coding[]` property on the [Composition](https://hl7.org/fhir/R4/composition.html) FHIR resource.
**Primary Keys:**
* composition\_section\_code\_coding\_id
**Foreign Keys:**
* composition\_section\_id - links to the [composition section](/medical-api/handling-data/schema-v100/composition/section) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------------------- | --------- | --------------------------------------------------- |
| composition\_section\_code\_coding\_id | varchar | Unique identifier for the coding row |
| composition\_section\_id | varchar | FK to the parent composition\_section record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [composition\_section](/medical-api/handling-data/schema-v100/composition/section)
# composition_section_entry
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/composition/section_entry
A reference to the actual resource from which the narrative in the section is derived (`Composition.section.entry[]`).
**Primary Keys:** composition\_section\_entry\_id
**Foreign Keys:**
* composition\_section\_id - links to the [composition section](/medical-api/handling-data/schema-v100/composition/section) table
| Column | Data Type | Description |
| ------------------------------- | --------- | --------------------------------------------------------------------------- |
| composition\_section\_entry\_id | varchar | Unique identifier for the entry row |
| composition\_section\_id | varchar | Parent composition section |
| reference\_id | varchar | Resolved ID of the referenced resource (e.g. Observation, DiagnosticReport) |
| reference\_type | varchar | Type of referenced resource (e.g. Observation, DiagnosticReport) |
**Related Tables:**
**Parent:**
* [composition\_section](/medical-api/handling-data/schema-v100/composition/section)
# composition_type_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/composition/type_coding
Normalized `Composition.type.coding[]` property on the [Composition](https://hl7.org/fhir/R4/composition.html) FHIR resource.
**Primary Keys:**
* composition\_type\_coding\_id
**Foreign Keys:**
* composition\_id - links to the [composition](/medical-api/handling-data/schema-v100/composition/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------- | --------- | --------------------------------------------------- |
| composition\_type\_coding\_id | varchar | Unique identifier for the coding row |
| composition\_id | varchar | FK to the parent composition record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [composition](/medical-api/handling-data/schema-v100/composition/base)
# condition
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/condition/base
A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/condition.html) for full details.
**Previous version:** [condition](/medical-api/handling-data/schema-v000/condition)
**Tables in this resource:**
* **condition** – Main condition record (this page)
* [condition\_clinicalstatus\_coding](/medical-api/handling-data/schema-v100/condition/clinicalstatus_coding)
* [condition\_verificationstatus\_coding](/medical-api/handling-data/schema-v100/condition/verificationstatus_coding)
* [condition\_category](/medical-api/handling-data/schema-v100/condition/category) – Backbone for category; codings in condition\_category\_coding
* [condition\_category\_coding](/medical-api/handling-data/schema-v100/condition/category_coding)
* [condition\_code\_coding](/medical-api/handling-data/schema-v100/condition/code_coding)
* [condition\_extension](/medical-api/handling-data/schema-v100/condition/extension)
* [condition\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/condition/extension_vcc_coding)
* **condition\_references** – Normalized references to patient, encounter, recorder; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Reference Table:**
The `condition_references` table contains normalized references from the condition to other entities. It supports the following reference properties:
* **subject** (required): links to the patient who has the condition
* **encounter**: links to the encounter where the condition was recorded
* **recorder**: links to the practitioner who recorded the condition
For detailed information about reference table structure and indexing, see the [Reference Tables documentation](/medical-api/handling-data/schema-v100/reference_tables).
**Primary Keys:**
* condition\_id
**Foreign Keys:**
* patient\_id – links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table (subject)
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------- | --------- | ------------------------------------------------------------------ |
| condition\_id | varchar | Unique identifier for the condition |
| patient\_id | varchar | Unique identifier for the patient |
| recordeddate | datetime | Date when the condition was recorded (FHIR-compliant name) |
| onsetdatetime | datetime | Onset date/time if provided directly |
| onsetperiod\_start | datetime | Start of onset period |
| onset\_date† | datetime | Coalesced onset date (onsetdatetime or onsetperiod\_start) |
| onsetperiod\_end | datetime | End of onset period |
| onsetage\_value | varchar | Onset age value |
| onsetage\_unit | varchar | Unit for onset age (e.g. a for years) |
| code\_text | varchar | Free-text description of the condition |
| code\_icd\_10\_cm\_code† | varchar | ICD-10-CM code for the condition |
| code\_icd\_10\_cm\_display† | varchar | Human-readable description of ICD-10-CM code |
| code\_snomed\_code† | varchar | SNOMED CT code for the condition |
| code\_snomed\_display† | varchar | Human-readable description of SNOMED CT code |
| code\_icd\_9\_cm\_code† | varchar | ICD-9-CM code for the condition |
| code\_icd\_9\_cm\_display† | varchar | Human-readable description of ICD-9-CM code |
| code\_ccsr\_code† | varchar | AHRQ CCSR (Clinical Classifications Software Refined) code |
| code\_ccsr\_display† | varchar | Human-readable description of the AHRQ CCSR code |
| clinicalstatus\_text | varchar | Free-text clinical status of the condition |
| clinicalstatus\_hl7\_code† | varchar | HL7 clinical status code (condition-clinical) |
| clinicalstatus\_hl7\_display† | varchar | Human-readable description of clinical status |
| verificationstatus\_text | varchar | Verification status text (e.g. confirmed, unconfirmed) |
| verificationstatus\_hl7\_code† | varchar | HL7 verification status code (condition-ver-status) |
| verificationstatus\_hl7\_display† | varchar | Human-readable description of verification status |
| category\_hl7\_code† | varchar | HL7 category code (condition-category, extensible binding) |
| category\_hl7\_display† | varchar | Human-readable description of HL7 category |
| note\_text† | varchar | Additional notes about the condition (first note) |
| chronicity\_code | varchar | Chronicity code indicating if the condition is acute or chronic |
| hcc\_code | varchar | CMS HCC (Hierarchical Condition Category) code for risk adjustment |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [condition\_category](/medical-api/handling-data/schema-v100/condition/category)
* [condition\_clinicalstatus\_coding](/medical-api/handling-data/schema-v100/condition/clinicalstatus_coding)
* [condition\_code\_coding](/medical-api/handling-data/schema-v100/condition/code_coding)
* [condition\_extension](/medical-api/handling-data/schema-v100/condition/extension)
* [condition\_verificationstatus\_coding](/medical-api/handling-data/schema-v100/condition/verificationstatus_coding)
* [encounter\_diagnosis](/medical-api/handling-data/schema-v100/encounter/diagnosis)
## Version diff
**Renamed**
* `end_date` → `onsetperiod_end`
* `recorded_date` → `recordeddate`
* `icd_10_cm_code` → `code_icd_10_cm_code`
* `icd_10_cm_display` → `code_icd_10_cm_display`
* `snomed_code` → `code_snomed_code`
* `snomed_display` → `code_snomed_display`
* `icd_9_cm_code` → `code_icd_9_cm_code`
* `icd_9_cm_display` → `code_icd_9_cm_display`
* `ccsr_code` → `code_ccsr_code`
* `ccsr_display` → `code_ccsr_display`
* `clinical_status_hl7_code` → `clinicalstatus_hl7_code`
* `clinical_status_hl7_display` → `clinicalstatus_hl7_display`
* `data_source` → `meta_source`
**Moved to separate tables**
* `source_clinical_status_code` → [`condition_clinicalstatus_coding.code`](/medical-api/handling-data/schema-v100/condition/clinicalstatus_coding) w/ `code_rank = 1`
* `source_clinical_status_display` → [`condition_clinicalstatus_coding.display`](/medical-api/handling-data/schema-v100/condition/clinicalstatus_coding) w/ `code_rank = 1`
* `source_clinical_status_system` → [`condition_clinicalstatus_coding.system`](/medical-api/handling-data/schema-v100/condition/clinicalstatus_coding) w/ `code_rank = 1`
* `source_code_code` → [`condition_code_coding.code`](/medical-api/handling-data/schema-v100/condition/code_coding) w/ `code_rank = 1`
* `source_code_display` → [`condition_code_coding.display`](/medical-api/handling-data/schema-v100/condition/code_coding) w/ `code_rank = 1`
* `source_code_system` → [`condition_code_coding.system`](/medical-api/handling-data/schema-v100/condition/code_coding) w/ `code_rank = 1`
* `source_category_code` → [`condition_category_coding.code`](/medical-api/handling-data/schema-v100/condition/category_coding) w/ `code_rank = 1`
* `source_category_display` → [`condition_category_coding.display`](/medical-api/handling-data/schema-v100/condition/category_coding) w/ `code_rank = 1`
* `source_category_system` → [`condition_category_coding.system`](/medical-api/handling-data/schema-v100/condition/category_coding) w/ `code_rank = 1`
# condition_category
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/condition/category
A category assigned to the condition, such as problem-list-item or encounter-diagnosis (`Condition.category[]`). One row per `anchor_index` on the normalized stage table.
**Primary Keys:**
* condition\_category\_id (surrogate)
**Foreign Keys:**
* condition\_id – links to the [condition](/medical-api/handling-data/schema-v100/condition/base) table
| Column | Data Type | Description |
| ----------------------- | --------- | ------------------------------------------------ |
| condition\_category\_id | varchar | Surrogate key for this category row |
| condition\_id | varchar | Parent condition |
| text | varchar | Category narrative (`Condition.category[].text`) |
**Related Tables:**
**Parent:**
* [condition](/medical-api/handling-data/schema-v100/condition/base)
**Child:**
* [condition\_category\_coding](/medical-api/handling-data/schema-v100/condition/category_coding)
# condition_category_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/condition/category_coding
Normalized `Condition.category[].coding[]` property on the [Condition](https://hl7.org/fhir/R4/condition.html) FHIR resource.
**Primary Keys:**
* condition\_category\_coding\_id
**Foreign Keys:**
* condition\_category\_id – links to the [condition\_category](/medical-api/handling-data/schema-v100/condition/category) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------- | --------- | ------------------------------------------- |
| condition\_category\_coding\_id | varchar | Unique identifier for the coding row |
| condition\_category\_id | varchar | FK to the parent condition\_category record |
| code\_rank† | int | 1-based index |
| code | varchar | Code value |
| display | varchar | Human-readable display |
| system | varchar | Code system URI |
**Related Tables:**
**Parent:**
* [condition\_category](/medical-api/handling-data/schema-v100/condition/category)
# condition_clinicalstatus_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/condition/clinicalstatus_coding
Normalized `Condition.clinicalStatus.coding[]` property on the [Condition](https://hl7.org/fhir/R4/condition.html) FHIR resource.
**Primary Keys:**
* condition\_clinicalstatus\_coding\_id
**Foreign Keys:**
* condition\_id - links to the [condition](/medical-api/handling-data/schema-v100/condition/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------------- | --------- | --------------------------------------------------- |
| condition\_clinicalstatus\_coding\_id | varchar | Unique identifier for the coding row |
| condition\_id | varchar | FK to the parent condition record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [condition](/medical-api/handling-data/schema-v100/condition/base)
# condition_code_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/condition/code_coding
Normalized `Condition.code.coding[]` property on the [Condition](https://hl7.org/fhir/R4/condition.html) FHIR resource.
**Primary Keys:**
* condition\_code\_coding\_id
**Foreign Keys:**
* condition\_id - links to the [condition](/medical-api/handling-data/schema-v100/condition/base) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------- | --------- | -------------------------------------------------- |
| condition\_code\_coding\_id | varchar | Unique identifier for the coding row |
| condition\_id | varchar | Parent condition |
| code\_rank† | int | 1-based index of this coding on the condition code |
| code | varchar | Code value |
| display | varchar | Human-readable display |
| system | varchar | Code system URI |
**Related Tables:**
**Parent:**
* [condition](/medical-api/handling-data/schema-v100/condition/base)
# condition_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/condition/extension
Normalized `Condition.extension[]` property on the [Condition](https://hl7.org/fhir/R4/condition.html) FHIR resource.
**Primary Keys:**
* condition\_extension\_id
**Foreign Keys:**
* condition\_id - links to the [condition](/medical-api/handling-data/schema-v100/condition/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | ------------------------------------------------------ |
| condition\_extension\_id | varchar | Unique identifier for the extension row |
| condition\_id | varchar | FK to the parent condition record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [condition](/medical-api/handling-data/schema-v100/condition/base)
**Child:**
* [condition\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/condition/extension_vcc_coding)
# condition_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/condition/extension_vcc_coding
Normalized `Condition.extension[].valueCodeableConcept.coding[]` property on the [Condition](https://hl7.org/fhir/R4/condition.html) FHIR resource.
**Primary Keys:**
* condition\_extension\_vcc\_coding\_id
**Foreign Keys:**
* condition\_extension\_id - links to the [condition\_extension](/medical-api/handling-data/schema-v100/condition/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------------- | --------- | --------------------------------------------------- |
| condition\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| condition\_extension\_id | varchar | FK to the parent condition\_extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [condition\_extension](/medical-api/handling-data/schema-v100/condition/extension)
# condition_verificationstatus_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/condition/verificationstatus_coding
Normalized `Condition.verificationStatus.coding[]` property on the [Condition](https://hl7.org/fhir/R4/condition.html) FHIR resource.
**Primary Keys:**
* condition\_verificationstatus\_coding\_id
**Foreign Keys:**
* condition\_id - links to the [condition](/medical-api/handling-data/schema-v100/condition/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------------------- | --------- | ------------------------------------------------------------- |
| condition\_verificationstatus\_coding\_id | varchar | Unique identifier for the coding row |
| condition\_id | varchar | Parent condition |
| code\_rank† | int | 1-based index of this coding in the verification status array |
| code | varchar | Code value (e.g., confirmed, unconfirmed, refuted) |
| display | varchar | Human-readable display |
| system | varchar | Code system URI |
**Related Tables:**
**Parent:**
* [condition](/medical-api/handling-data/schema-v100/condition/base)
# consent
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/consent/base
A record of a healthcare consumer's choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/consent.html) for full details.
**Tables in this resource:**
* **consent** – Main consent record (this page)
* [consent\_scope\_coding](/medical-api/handling-data/schema-v100/consent/scope_coding)
* [consent\_policyrule\_coding](/medical-api/handling-data/schema-v100/consent/policyrule_coding)
* [consent\_category](/medical-api/handling-data/schema-v100/consent/category) – Backbone for category
* [consent\_category\_coding](/medical-api/handling-data/schema-v100/consent/category_coding)
* [consent\_provision\_code](/medical-api/handling-data/schema-v100/consent/provision_code) – Backbone for provision code
* [consent\_provision\_code\_coding](/medical-api/handling-data/schema-v100/consent/provision_code_coding)
* [consent\_extension](/medical-api/handling-data/schema-v100/consent/extension)
* [consent\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/consent/extension_vcc_coding)
* **consent\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Primary Keys:**
* consent\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------- | --------- | ----------------------------------------------------------- |
| consent\_id | varchar | Unique identifier for the consent |
| patient\_id | varchar | Unique identifier for the patient |
| status | varchar | Status of the consent |
| datetime | datetime | When the consent was communicated (FHIR Consent.dateTime) |
| scope\_text | varchar | Free-text scope of the consent |
| scope\_hl7\_code† | varchar | Scope: HL7 code (consentscope) |
| scope\_hl7\_display† | varchar | Scope: HL7 display |
| category\_hl7\_code† | varchar | Category: HL7 code (consentcategorycodes) |
| category\_hl7\_display† | varchar | Category: HL7 display |
| policyrule\_text | varchar | Free-text policy rule |
| policyrule\_hl7\_code† | varchar | Policy rule: HL7 code (consentpolicycodes) |
| policyrule\_hl7\_display† | varchar | Policy rule: HL7 display |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [consent\_category](/medical-api/handling-data/schema-v100/consent/category)
* [consent\_category\_coding](/medical-api/handling-data/schema-v100/consent/category_coding)
* [consent\_extension](/medical-api/handling-data/schema-v100/consent/extension)
* [consent\_policyrule\_coding](/medical-api/handling-data/schema-v100/consent/policyrule_coding)
* [consent\_provision\_code](/medical-api/handling-data/schema-v100/consent/provision_code)
* [consent\_scope\_coding](/medical-api/handling-data/schema-v100/consent/scope_coding)
# consent_category
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/consent/category
A classification of the type of consents found in the statement (`Consent.category[]`).
**Primary Keys:**
* consent\_category\_id
**Foreign Keys:**
* consent\_id - links to the [consent](/medical-api/handling-data/schema-v100/consent) table
| Column | Data Type | Description |
| --------------------- | --------- | -------------------------------------- |
| consent\_category\_id | varchar | Unique identifier for the category row |
| consent\_id | varchar | FK to the parent consent record |
| text | varchar | Display text for the category |
**Related Tables:**
**Parent:**
* [consent](/medical-api/handling-data/schema-v100/consent/base)
# consent_category_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/consent/category_coding
Normalized `Consent.category[].coding[]` property on the [Consent](https://hl7.org/fhir/R4/consent.html) FHIR resource.
**Primary Keys:**
* consent\_category\_coding\_id
**Foreign Keys:**
* consent\_category\_id - links to the [consent\_category](/medical-api/handling-data/schema-v100/consent/category) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------- | --------- | --------------------------------------------------- |
| consent\_category\_coding\_id | varchar | Unique identifier for the coding row |
| consent\_category\_id | varchar | FK to the parent consent\_category record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [consent\_category](/medical-api/handling-data/schema-v100/consent/category)
# consent_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/consent/extension
Normalized `Consent.extension[]` property on the [Consent](https://hl7.org/fhir/R4/consent.html) FHIR resource.
**Primary Keys:**
* consent\_extension\_id
**Foreign Keys:**
* consent\_id - links to the [consent](/medical-api/handling-data/schema-v100/consent/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | ------------------------------------------------------ |
| consent\_extension\_id | varchar | Unique identifier for the extension row |
| consent\_id | varchar | FK to the parent consent record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [consent](/medical-api/handling-data/schema-v100/consent/base)
**Child:**
* [consent\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/consent/extension_vcc_coding)
# consent_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/consent/extension_vcc_coding
Normalized `Consent.extension[].valueCodeableConcept.coding[]` property on the [Consent](https://hl7.org/fhir/R4/consent.html) FHIR resource.
**Primary Keys:**
* consent\_extension\_vcc\_coding\_id
**Foreign Keys:**
* consent\_extension\_id - links to the [consent\_extension](/medical-api/handling-data/schema-v100/consent/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------------- | --------- | --------------------------------------------------- |
| consent\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| consent\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [consent\_extension](/medical-api/handling-data/schema-v100/consent/extension)
# consent_policyrule_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/consent/policyrule_coding
Normalized `Consent.policyRule.coding[]` property on the [Consent](https://hl7.org/fhir/R4/consent.html) FHIR resource.
**Primary Keys:**
* consent\_policyrule\_coding\_id
**Foreign Keys:**
* consent\_id - links to the [consent](/medical-api/handling-data/schema-v100/consent) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------- | --------- | --------------------------------------------------- |
| consent\_policyrule\_coding\_id | varchar | Unique identifier for the coding row |
| consent\_id | varchar | FK to the parent consent record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [consent](/medical-api/handling-data/schema-v100/consent/base)
# consent_provision_code
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/consent/provision_code
If this code is found in an instance, then the provision applies (`Consent.provision.code[]`).
**Primary Keys:**
* consent\_provision\_code\_id
**Foreign Keys:**
* consent\_id - links to the [consent](/medical-api/handling-data/schema-v100/consent) table
| Column | Data Type | Description |
| ---------------------------- | --------- | -------------------------------------------- |
| consent\_provision\_code\_id | varchar | Unique identifier for the provision code row |
| consent\_id | varchar | FK to the parent consent record |
| text | varchar | Display text for the provision code |
**Related Tables:**
**Parent:**
* [consent](/medical-api/handling-data/schema-v100/consent/base)
**Child:**
* [consent\_provision\_code\_coding](/medical-api/handling-data/schema-v100/consent/provision_code_coding)
# consent_provision_code_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/consent/provision_code_coding
Normalized `Consent.provision.code[].coding[]` property on the [Consent](https://hl7.org/fhir/R4/consent.html) FHIR resource.
**Primary Keys:**
* consent\_provision\_code\_coding\_id
**Foreign Keys:**
* consent\_provision\_code\_id - links to the [consent\_provision\_code](/medical-api/handling-data/schema-v100/consent/provision_code) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------------ | --------- | --------------------------------------------------- |
| consent\_provision\_code\_coding\_id | varchar | Unique identifier for the coding row |
| consent\_provision\_code\_id | varchar | FK to the parent consent\_provision\_code record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [consent\_provision\_code](/medical-api/handling-data/schema-v100/consent/provision_code)
# consent_scope_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/consent/scope_coding
Normalized `Consent.scope.coding[]` property on the [Consent](https://hl7.org/fhir/R4/consent.html) FHIR resource.
**Primary Keys:**
* consent\_scope\_coding\_id
**Foreign Keys:**
* consent\_id - links to the [consent](/medical-api/handling-data/schema-v100/consent) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | --------------------------------------------------- |
| consent\_scope\_coding\_id | varchar | Unique identifier for the coding row |
| consent\_id | varchar | FK to the parent consent record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [consent](/medical-api/handling-data/schema-v100/consent/base)
# coverage
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/coverage/base
Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/coverage.html) for full details.
**Previous version:** [coverage](/medical-api/handling-data/schema-v000/coverage)
**Tables in this resource:**
* **coverage** – Main coverage record (this page)
* [coverage\_type\_coding](/medical-api/handling-data/schema-v100/coverage/type_coding)
* [coverage\_relationship\_coding](/medical-api/handling-data/schema-v100/coverage/relationship_coding)
* [coverage\_class](/medical-api/handling-data/schema-v100/coverage/class) – Backbone for class
* [coverage\_class\_type\_coding](/medical-api/handling-data/schema-v100/coverage/class_type_coding)
* [coverage\_extension](/medical-api/handling-data/schema-v100/coverage/extension)
* [coverage\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/coverage/extension_vcc_coding)
* **coverage\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Primary Keys:**
* coverage\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table (beneficiary)
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------- | --------- | ------------------------------------------------------------------------ |
| coverage\_id | varchar | Unique identifier for the coverage |
| patient\_id | varchar | Unique identifier for the patient (beneficiary) |
| status | varchar | Status of the coverage (e.g. active, cancelled, draft, entered-in-error) |
| period\_start | datetime | Start of the coverage period |
| period\_end | datetime | End of the coverage period |
| type\_text | varchar | Free-text coverage type |
| type\_hl7\_code† | varchar | Coverage type: HL7 ActCode (v3-ActCode) |
| type\_hl7\_display† | varchar | Coverage type: HL7 ActCode display |
| relationship\_text | varchar | Free-text subscriber relationship |
| relationship\_hl7\_code† | varchar | Subscriber relationship: HL7 code (subscriber-relationship) |
| relationship\_hl7\_display† | varchar | Subscriber relationship: HL7 display |
| subscriberid | varchar | Subscriber identifier |
| dependent | varchar | Dependent number |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [coverage\_class](/medical-api/handling-data/schema-v100/coverage/class)
* [coverage\_extension](/medical-api/handling-data/schema-v100/coverage/extension)
* [coverage\_relationship\_coding](/medical-api/handling-data/schema-v100/coverage/relationship_coding)
* [coverage\_type\_coding](/medical-api/handling-data/schema-v100/coverage/type_coding)
## Version diff
**Renamed**
* `subscriber_member_id` → `subscriberid`
* `data_source` → `meta_source`
**Moved to separate tables**
* `source_type_code` → [`coverage_type_coding.code`](/medical-api/handling-data/schema-v100/coverage/type_coding) w/ `code_rank = 1`
* `source_type_display` → [`coverage_type_coding.display`](/medical-api/handling-data/schema-v100/coverage/type_coding) w/ `code_rank = 1`
* `source_type_system` → [`coverage_type_coding.system`](/medical-api/handling-data/schema-v100/coverage/type_coding) w/ `code_rank = 1`
* `source_relationship_code` → [`coverage_relationship_coding.code`](/medical-api/handling-data/schema-v100/coverage/relationship_coding) w/ `code_rank = 1`
* `source_relationship_display` → [`coverage_relationship_coding.display`](/medical-api/handling-data/schema-v100/coverage/relationship_coding) w/ `code_rank = 1`
* `source_relationship_system` → [`coverage_relationship_coding.system`](/medical-api/handling-data/schema-v100/coverage/relationship_coding) w/ `code_rank = 1`
* `class_group_code`, `class_group_display`, `class_group_system` → [`coverage_class`](/medical-api/handling-data/schema-v100/coverage/class) w/ `type_code = group`
* `class_plan_code`, `class_plan_display`, `class_plan_system` → [`coverage_class`](/medical-api/handling-data/schema-v100/coverage/class) w/ `type_code = plan`
# coverage_class
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/coverage/class
A suite of underwriter-specific classifiers (`Coverage.class[]`).
**Primary Keys:**
* coverage\_class\_id
**Foreign Keys:**
* coverage\_id - links to the [coverage](/medical-api/handling-data/schema-v100/coverage) table
| Column | Data Type | Description |
| ------------------- | --------- | ------------------------------------------ |
| coverage\_class\_id | varchar | Unique identifier for the class row |
| coverage\_id | varchar | FK to the parent coverage record |
| type\_text | varchar | Display text for the class type |
| value | varchar | Class identifier value (e.g. group number) |
| name | varchar | Human-readable name for the class |
**Related Tables:**
**Parent:**
* [coverage](/medical-api/handling-data/schema-v100/coverage/base)
**Child:**
* [coverage\_class\_type\_coding](/medical-api/handling-data/schema-v100/coverage/class_type_coding)
# coverage_class_type_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/coverage/class_type_coding
Normalized `Coverage.class[].type.coding[]` property on the [Coverage](https://hl7.org/fhir/R4/coverage.html) FHIR resource.
**Primary Keys:**
* coverage\_class\_type\_coding\_id
**Foreign Keys:**
* coverage\_class\_id - links to the [coverage\_class](/medical-api/handling-data/schema-v100/coverage/class) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------- | --------- | --------------------------------------------------- |
| coverage\_class\_type\_coding\_id | varchar | Unique identifier for the coding row |
| coverage\_class\_id | varchar | FK to the parent coverage\_class record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [coverage\_class](/medical-api/handling-data/schema-v100/coverage/class)
# coverage_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/coverage/extension
Normalized `Coverage.extension[]` property on the [Coverage](https://hl7.org/fhir/R4/coverage.html) FHIR resource.
**Primary Keys:**
* coverage\_extension\_id
**Foreign Keys:**
* coverage\_id - links to the [coverage](/medical-api/handling-data/schema-v100/coverage/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | ------------------------------------------------------ |
| coverage\_extension\_id | varchar | Unique identifier for the extension row |
| coverage\_id | varchar | FK to the parent coverage record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [coverage](/medical-api/handling-data/schema-v100/coverage/base)
**Child:**
* [coverage\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/coverage/extension_vcc_coding)
# coverage_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/coverage/extension_vcc_coding
Normalized `Coverage.extension[].valueCodeableConcept.coding[]` property on the [Coverage](https://hl7.org/fhir/R4/coverage.html) FHIR resource.
**Primary Keys:**
* coverage\_extension\_vcc\_coding\_id
**Foreign Keys:**
* coverage\_extension\_id - links to the [coverage\_extension](/medical-api/handling-data/schema-v100/coverage/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------------ | --------- | --------------------------------------------------- |
| coverage\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| coverage\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [coverage\_extension](/medical-api/handling-data/schema-v100/coverage/extension)
# coverage_relationship_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/coverage/relationship_coding
Normalized `Coverage.relationship.coding[]` property on the [Coverage](https://hl7.org/fhir/R4/coverage.html) FHIR resource.
**Primary Keys:**
* coverage\_relationship\_coding\_id
**Foreign Keys:**
* coverage\_id - links to the [coverage](/medical-api/handling-data/schema-v100/coverage) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------- | --------- | --------------------------------------------------- |
| coverage\_relationship\_coding\_id | varchar | Unique identifier for the coding row |
| coverage\_id | varchar | FK to the parent coverage record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [coverage](/medical-api/handling-data/schema-v100/coverage/base)
# coverage_type_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/coverage/type_coding
Normalized `Coverage.type.coding[]` property on the [Coverage](https://hl7.org/fhir/R4/coverage.html) FHIR resource.
**Primary Keys:**
* coverage\_type\_coding\_id
**Foreign Keys:**
* coverage\_id - links to the [coverage](/medical-api/handling-data/schema-v100/coverage) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | --------------------------------------------------- |
| coverage\_type\_coding\_id | varchar | Unique identifier for the coding row |
| coverage\_id | varchar | FK to the parent coverage record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [coverage](/medical-api/handling-data/schema-v100/coverage/base)
# device
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/device/base
A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/device.html) for full details.
**Tables in this resource:**
* **device** – Main device record (this page)
* [device\_type\_coding](/medical-api/handling-data/schema-v100/device/type_coding)
* [device\_version](/medical-api/handling-data/schema-v100/device/version) – Version information per device
* [device\_extension](/medical-api/handling-data/schema-v100/device/extension)
* [device\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/device/extension_vcc_coding)
* **device\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Primary Keys:**
* device\_id
† Metriport Platform added
| Column | Data Type | Description |
| ------------------ | --------- | ----------------------------------------------------------- |
| device\_id | varchar | Unique identifier for the device |
| manufacturedate | datetime | Date of manufacture |
| type\_text | varchar | Free-text device type |
| manufacturer | varchar | Name of the device manufacturer |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Child:**
* [device\_extension](/medical-api/handling-data/schema-v100/device/extension)
* [device\_type\_coding](/medical-api/handling-data/schema-v100/device/type_coding)
* [device\_version](/medical-api/handling-data/schema-v100/device/version)
# device_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/device/extension
Normalized `Device.extension[]` property on the [Device](https://hl7.org/fhir/R4/device.html) FHIR resource.
**Primary Keys:**
* device\_extension\_id
**Foreign Keys:**
* device\_id - links to the [device](/medical-api/handling-data/schema-v100/device/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | ------------------------------------------------------ |
| device\_extension\_id | varchar | Unique identifier for the extension row |
| device\_id | varchar | FK to the parent device record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [device](/medical-api/handling-data/schema-v100/device/base)
**Child:**
* [device\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/device/extension_vcc_coding)
# device_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/device/extension_vcc_coding
Normalized `Device.extension[].valueCodeableConcept.coding[]` property on the [Device](https://hl7.org/fhir/R4/device.html) FHIR resource.
**Primary Keys:**
* device\_extension\_vcc\_coding\_id
**Foreign Keys:**
* device\_extension\_id - links to the [device\_extension](/medical-api/handling-data/schema-v100/device/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------- | --------- | --------------------------------------------------- |
| device\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| device\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [device\_extension](/medical-api/handling-data/schema-v100/device/extension)
# device_type_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/device/type_coding
Normalized `Device.type.coding[]` property on the [Device](https://hl7.org/fhir/R4/device.html) FHIR resource.
**Primary Keys:**
* device\_type\_coding\_id
**Foreign Keys:**
* device\_id - links to the [device](/medical-api/handling-data/schema-v100/device/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------ | --------- | --------------------------------------------------- |
| device\_type\_coding\_id | varchar | Unique identifier for the coding row |
| device\_id | varchar | FK to the parent device record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [device](/medical-api/handling-data/schema-v100/device/base)
# device_version
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/device/version
The actual design of the device or software version running on the device (`Device.version[]`).
**Primary Keys:** device\_version\_id
**Foreign Keys:**
* device\_id - links to the [device](/medical-api/handling-data/schema-v100/device/base) table
| Column | Data Type | Description |
| ------------------- | --------- | --------------------------------------------- |
| device\_version\_id | varchar | Unique identifier for the version row |
| device\_id | varchar | Parent device |
| version | varchar | Version value (e.g., model or version string) |
**Related Tables:**
**Parent:**
* [device](/medical-api/handling-data/schema-v100/device/base)
# diagnosticreport
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/diagnosticreport/base
The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/diagnosticreport.html) for full details.
**Previous version:** [diagnostic\_report](/medical-api/handling-data/schema-v000/diagnostic-report)
**Tables in this resource:**
* **diagnosticreport** – Main diagnostic report record (this page)
* [diagnosticreport\_category](/medical-api/handling-data/schema-v100/diagnosticreport/category) – Backbone for category; codings in diagnosticreport\_category\_coding
* [diagnosticreport\_category\_coding](/medical-api/handling-data/schema-v100/diagnosticreport/category_coding)
* [diagnosticreport\_code\_coding](/medical-api/handling-data/schema-v100/diagnosticreport/code_coding)
* [diagnosticreport\_presentedform](/medical-api/handling-data/schema-v100/diagnosticreport/presentedform) – Attachment content
* [diagnosticreport\_extension](/medical-api/handling-data/schema-v100/diagnosticreport/extension)
* [diagnosticreport\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/diagnosticreport/extension_vcc_coding)
* **diagnosticreport\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Primary Keys:**
* diagnosticreport\_id
**Foreign Keys:**
* patient\_id – links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table (subject)
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| diagnosticreport\_id | varchar | Unique identifier for the diagnostic report |
| patient\_id | varchar | Unique identifier for the patient (subject) |
| status | varchar | Status of the report (e.g. registered, partial, preliminary, final, amended, corrected, appended, cancelled, entered-in-error, unknown) |
| effectivedatetime | datetime | Effective date/time if provided directly |
| effectiveperiod\_start | datetime | Start of effective period |
| effective\_date† | datetime | Coalesced effective date (effectivedatetime or effectiveperiod\_start) |
| effectiveperiod\_end | datetime | End of effective period |
| code\_text | varchar | Free-text description of the report |
| code\_loinc\_code† | varchar | LOINC code for the report type |
| code\_loinc\_display† | varchar | Human-readable LOINC description |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [diagnosticreport\_category](/medical-api/handling-data/schema-v100/diagnosticreport/category)
* [diagnosticreport\_code\_coding](/medical-api/handling-data/schema-v100/diagnosticreport/code_coding)
* [diagnosticreport\_extension](/medical-api/handling-data/schema-v100/diagnosticreport/extension)
* [diagnosticreport\_presentedform](/medical-api/handling-data/schema-v100/diagnosticreport/presentedform)
## Version diff
**Renamed**
* `diagnostic_report_id` → `diagnosticreport_id`
* `end_date` → `effectiveperiod_end`
* `loinc_code` → `code_loinc_code`
* `loinc_display` → `code_loinc_display`
* `data_source` → `meta_source`
**Moved to separate tables**
* `category_hl7_code` → [`diagnosticreport_category_coding.code`](/medical-api/handling-data/schema-v100/diagnosticreport/category_coding) w/ `system = 'http://terminology.hl7.org/CodeSystem/v2-0074'`
* `category_hl7_display` → [`diagnosticreport_category_coding.display`](/medical-api/handling-data/schema-v100/diagnosticreport/category_coding) w/ `system = 'http://terminology.hl7.org/CodeSystem/v2-0074'`
* `source_category_code` → [`diagnosticreport_category_coding.code`](/medical-api/handling-data/schema-v100/diagnosticreport/category_coding) w/ `code_rank = 1`
* `source_category_display` → [`diagnosticreport_category_coding.display`](/medical-api/handling-data/schema-v100/diagnosticreport/category_coding) w/ `code_rank = 1`
* `source_category_system` → [`diagnosticreport_category_coding.system`](/medical-api/handling-data/schema-v100/diagnosticreport/category_coding) w/ `code_rank = 1`
* `source_code_code` → [`diagnosticreport_code_coding.code`](/medical-api/handling-data/schema-v100/diagnosticreport/code_coding) w/ `code_rank = 1`
* `source_code_display` → [`diagnosticreport_code_coding.display`](/medical-api/handling-data/schema-v100/diagnosticreport/code_coding) w/ `code_rank = 1`
* `source_code_system` → [`diagnosticreport_code_coding.system`](/medical-api/handling-data/schema-v100/diagnosticreport/code_coding) w/ `code_rank = 1`
# diagnosticreport_category
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/diagnosticreport/category
Normalized `DiagnosticReport.category[]` property on the [DiagnosticReport](https://hl7.org/fhir/R4/diagnosticreport.html) FHIR resource.
**Primary Keys:**
* diagnosticreport\_category\_id
**Foreign Keys:**
* diagnosticreport\_id - links to the [diagnosticreport](/medical-api/handling-data/schema-v100/diagnosticreport/base) table
| Column | Data Type | Description |
| ------------------------------ | --------- | ----------------------------------------- |
| diagnosticreport\_category\_id | varchar | Unique identifier for the category row |
| diagnosticreport\_id | varchar | FK to the parent diagnostic report record |
| text | varchar | Free-text category description |
**Related Tables:**
**Parent:**
* [diagnosticreport](/medical-api/handling-data/schema-v100/diagnosticreport/base)
**Child:**
* [diagnosticreport\_category\_coding](/medical-api/handling-data/schema-v100/diagnosticreport/category_coding)
# diagnosticreport_category_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/diagnosticreport/category_coding
Normalized `DiagnosticReport.category[].coding[]` property on the [DiagnosticReport](https://hl7.org/fhir/R4/diagnosticreport.html) FHIR resource.
**Primary Keys:**
* diagnosticreport\_category\_coding\_id
**Foreign Keys:**
* diagnosticreport\_category\_id - links to the [diagnosticreport\_category](/medical-api/handling-data/schema-v100/diagnosticreport/category) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------------------- | --------- | --------------------------------------------------- |
| diagnosticreport\_category\_coding\_id | varchar | Unique identifier for the coding row |
| diagnosticreport\_category\_id | varchar | FK to the parent diagnosticreport\_category record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [diagnosticreport\_category](/medical-api/handling-data/schema-v100/diagnosticreport/category)
# diagnosticreport_code_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/diagnosticreport/code_coding
Normalized `DiagnosticReport.code.coding[]` property on the [DiagnosticReport](https://hl7.org/fhir/R4/diagnosticreport.html) FHIR resource.
**Primary Keys:**
* diagnosticreport\_code\_coding\_id
**Foreign Keys:**
* diagnosticreport\_id - links to the [diagnosticreport](/medical-api/handling-data/schema-v100/diagnosticreport/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------- | --------- | --------------------------------------------------- |
| diagnosticreport\_code\_coding\_id | varchar | Unique identifier for the coding row |
| diagnosticreport\_id | varchar | FK to the parent diagnosticreport record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [diagnosticreport](/medical-api/handling-data/schema-v100/diagnosticreport/base)
# diagnosticreport_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/diagnosticreport/extension
Normalized `DiagnosticReport.extension[]` property on the [DiagnosticReport](https://hl7.org/fhir/R4/diagnosticreport.html) FHIR resource.
**Primary Keys:**
* diagnosticreport\_extension\_id
**Foreign Keys:**
* diagnosticreport\_id - links to the [diagnosticreport](/medical-api/handling-data/schema-v100/diagnosticreport/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------- | --------- | ------------------------------------------------------ |
| diagnosticreport\_extension\_id | varchar | Unique identifier for the extension row |
| diagnosticreport\_id | varchar | FK to the parent diagnosticreport record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [diagnosticreport](/medical-api/handling-data/schema-v100/diagnosticreport/base)
**Child:**
* [diagnosticreport\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/diagnosticreport/extension_vcc_coding)
# diagnosticreport_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/diagnosticreport/extension_vcc_coding
Normalized `DiagnosticReport.extension[].valueCodeableConcept.coding[]` property on the [DiagnosticReport](https://hl7.org/fhir/R4/diagnosticreport.html) FHIR resource.
**Primary Keys:**
* diagnosticreport\_extension\_vcc\_coding\_id
**Foreign Keys:**
* diagnosticreport\_extension\_id - links to the [diagnosticreport\_extension](/medical-api/handling-data/schema-v100/diagnosticreport/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------------------------- | --------- | --------------------------------------------------- |
| diagnosticreport\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| diagnosticreport\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [diagnosticreport\_extension](/medical-api/handling-data/schema-v100/diagnosticreport/extension)
# diagnosticreport_presentedform
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/diagnosticreport/presentedform
Rich text representation of the entire result as issued by the diagnostic service (`DiagnosticReport.presentedForm[]`).
**Previous version:** [diagnostic\_report\_presented\_forms](/medical-api/handling-data/schema-v000/diagnostic-report-presented-forms)
**Primary Keys:**
* diagnosticreport\_presentedform\_id
**Foreign Keys:**
* diagnosticreport\_id - links to the [diagnosticreport](/medical-api/handling-data/schema-v100/diagnosticreport/base) table
| Column | Data Type | Description |
| ----------------------------------- | --------- | -------------------------------------------------------------- |
| diagnosticreport\_presentedform\_id | varchar | Unique identifier for the presented form row |
| diagnosticreport\_id | varchar | Parent diagnostic report |
| data | varchar | Base64-encoded attachment data |
| contenttype | varchar | MIME type of the attachment (e.g. application/pdf, image/jpeg) |
| creation | datetime | When the attachment was created |
| hash | varchar | Hash of the attachment content |
| language | varchar | Language code of the attachment content |
| size | integer | Size of the attachment in bytes |
| title | varchar | Human-readable title of the attachment |
| url | varchar | URL reference to the attachment (if applicable) |
**Related Tables:**
**Parent:**
* [diagnosticreport](/medical-api/handling-data/schema-v100/diagnosticreport/base)
## Version diff
**Renamed**
* `diagnostic_report_id` → `diagnosticreport_id`
* `content_type` → `contenttype`
# documentreference
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/documentreference/base
A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/documentreference.html) for full details.
**Tables in this resource:**
* **documentreference** – Main document reference record (this page)
* [documentreference\_type\_coding](/medical-api/handling-data/schema-v100/documentreference/type_coding)
* [documentreference\_content](/medical-api/handling-data/schema-v100/documentreference/content) – Attachment metadata
* [documentreference\_extension](/medical-api/handling-data/schema-v100/documentreference/extension)
* [documentreference\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/documentreference/extension_vcc_coding)
* **documentreference\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Primary Keys:**
* documentreference\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table (subject)
† Metriport Platform added
| Column | Data Type | Description |
| --------------------- | --------- | ----------------------------------------------------------- |
| documentreference\_id | varchar | Unique identifier for the document reference |
| patient\_id | varchar | Unique identifier for the patient (subject) |
| status | varchar | Status of the document reference |
| date | datetime | When the document was created or authored |
| type\_text | varchar | Free-text type of the document |
| type\_loinc\_code† | varchar | Document type: LOINC code |
| type\_loinc\_display† | varchar | Document type: human-readable description of LOINC code |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [documentreference\_content](/medical-api/handling-data/schema-v100/documentreference/content)
* [documentreference\_extension](/medical-api/handling-data/schema-v100/documentreference/extension)
* [documentreference\_type\_coding](/medical-api/handling-data/schema-v100/documentreference/type_coding)
# documentreference_content
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/documentreference/content
The document and format referenced; there may be multiple content element repetitions, each with a different format (`DocumentReference.content[]`).
**Primary Keys:**
* documentreference\_content\_id
**Foreign Keys:**
* documentreference\_id - links to the [document reference](/medical-api/handling-data/schema-v100/documentreference/base) table
| Column | Data Type | Description |
| ------------------------------ | --------- | ------------------------------------- |
| documentreference\_content\_id | varchar | Unique identifier for the content row |
| documentreference\_id | varchar | Parent document reference |
| attachment\_data | varchar | Inline attachment data (e.g. base64) |
| attachment\_contenttype | varchar | MIME type of the attachment |
| attachment\_creation | datetime | When the attachment was created |
| attachment\_hash | varchar | Hash of the attachment content |
| attachment\_language | varchar | Language of the attachment content |
| attachment\_size | integer | Size of the attachment in bytes |
| attachment\_title | varchar | Title of the attachment |
| attachment\_url | varchar | URL of the attachment content |
**Related Tables:**
**Parent:**
* [documentreference](/medical-api/handling-data/schema-v100/documentreference/base)
# documentreference_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/documentreference/extension
Normalized `DocumentReference.extension[]` property on the [DocumentReference](https://hl7.org/fhir/R4/documentreference.html) FHIR resource.
**Primary Keys:**
* documentreference\_extension\_id
**Foreign Keys:**
* documentreference\_id - links to the [documentreference](/medical-api/handling-data/schema-v100/documentreference/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------------- | --------- | ------------------------------------------------------ |
| documentreference\_extension\_id | varchar | Unique identifier for the extension row |
| documentreference\_id | varchar | FK to the parent documentreference record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [documentreference](/medical-api/handling-data/schema-v100/documentreference/base)
**Child:**
* [documentreference\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/documentreference/extension_vcc_coding)
# documentreference_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/documentreference/extension_vcc_coding
Normalized `DocumentReference.extension[].valueCodeableConcept.coding[]` property on the [DocumentReference](https://hl7.org/fhir/R4/documentreference.html) FHIR resource.
**Primary Keys:**
* documentreference\_extension\_vcc\_coding\_id
**Foreign Keys:**
* documentreference\_extension\_id - links to the [documentreference\_extension](/medical-api/handling-data/schema-v100/documentreference/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------------------- | --------- | --------------------------------------------------- |
| documentreference\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| documentreference\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [documentreference\_extension](/medical-api/handling-data/schema-v100/documentreference/extension)
# documentreference_type_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/documentreference/type_coding
Normalized `DocumentReference.type.coding[]` property on the [DocumentReference](https://hl7.org/fhir/R4/documentreference.html) FHIR resource.
**Primary Keys:**
* documentreference\_type\_coding\_id
**Foreign Keys:**
* documentreference\_id - links to the [document reference](/medical-api/handling-data/schema-v100/documentreference/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------------- | --------- | --------------------------------------------------- |
| documentreference\_type\_coding\_id | varchar | Unique identifier for the coding row |
| documentreference\_id | varchar | FK to the parent documentreference record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [documentreference](/medical-api/handling-data/schema-v100/documentreference/base)
# encounter
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/encounter/base
An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/encounter.html) for full details.
**Previous version:** [encounter](/medical-api/handling-data/schema-v000/encounter)
**Tables in this resource:**
* **encounter** – Main encounter record (this page)
* [encounter\_diagnosis](/medical-api/handling-data/schema-v100/encounter/diagnosis) – Diagnoses (condition ref) per encounter
* [encounter\_type](/medical-api/handling-data/schema-v100/encounter/type) – Backbone for encounter type
* [encounter\_type\_coding](/medical-api/handling-data/schema-v100/encounter/type_coding)
* [encounter\_reasoncode](/medical-api/handling-data/schema-v100/encounter/reasoncode) – Backbone for reason code
* [encounter\_reasoncode\_coding](/medical-api/handling-data/schema-v100/encounter/reasoncode_coding)
* [encounter\_priority\_coding](/medical-api/handling-data/schema-v100/encounter/priority_coding)
* [encounter\_hospitalization\_dischargedisposition\_coding](/medical-api/handling-data/schema-v100/encounter/hospitalization_dischargedisposition_coding)
* [encounter\_extension](/medical-api/handling-data/schema-v100/encounter/extension)
* [encounter\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/encounter/extension_vcc_coding)
* **encounter\_references** – All refs; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Reference table:** `encounter_references` holds the following reference properties: **subject** (→ patient), **location.location** (→ location), **participant.individual** (→ practitioner), **diagnosis.condition** (from `encounter_diagnosis` stage table, → condition). See [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables).
**Primary Keys:**
* encounter\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table (subject)
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------------------------- | --------- | ------------------------------------------------------------- |
| encounter\_id | varchar | Unique identifier for the encounter |
| patient\_id | varchar | Unique identifier for the patient (subject) |
| status | varchar | Status of the encounter (e.g. planned, in-progress, finished) |
| period\_start | datetime | Start date/time of the encounter |
| period\_end | datetime | End date/time of the encounter |
| length\_of\_stay† | integer | Length of stay in days |
| act\_code† | varchar | ACT code for encounter class when system is v3-ActCode |
| act\_display† | varchar | Human-readable description of ACT code |
| class\_code | varchar | Encounter class code from source system |
| class\_display | varchar | Encounter class display from source system |
| class\_system | varchar | Encounter class system from source system |
| hospitalization\_dischargedisposition\_text | varchar | Free-text discharge disposition |
| hospitalization\_dischargedisposition\_hl7\_code† | varchar | HL7 discharge disposition code (discharge-disposition) |
| hospitalization\_dischargedisposition\_hl7\_display† | varchar | Human-readable discharge disposition |
| reasoncode\_snomed\_code† | varchar | SNOMED CT code for reason for encounter |
| reasoncode\_snomed\_display† | varchar | Human-readable SNOMED CT reason for encounter |
| priority\_text | varchar | Free-text priority of the encounter |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [encounter\_diagnosis](/medical-api/handling-data/schema-v100/encounter/diagnosis)
* [encounter\_extension](/medical-api/handling-data/schema-v100/encounter/extension)
* [encounter\_hospitalization\_dischargedisposition\_coding](/medical-api/handling-data/schema-v100/encounter/hospitalization_dischargedisposition_coding)
* [encounter\_priority\_coding](/medical-api/handling-data/schema-v100/encounter/priority_coding)
* [encounter\_reasoncode](/medical-api/handling-data/schema-v100/encounter/reasoncode)
* [encounter\_type](/medical-api/handling-data/schema-v100/encounter/type)
## Version diff
**Renamed**
* `start_date` → `period_start`
* `end_date` → `period_end`
* `source_class_code` → `class_code`
* `source_class_display` → `class_display`
* `source_class_system` → `class_system`
* `discharge_disposition_hl7_code` → `hospitalization_dischargedisposition_hl7_code`
* `discharge_disposition_hl7_display` → `hospitalization_dischargedisposition_hl7_display`
* `reason_snomed_code` → `reasoncode_snomed_code`
* `reason_snomed_display` → `reasoncode_snomed_display`
* `data_source` → `meta_source`
**Moved to separate tables**
* `type_hl7_code` → [`encounter_type_coding.code`](/medical-api/handling-data/schema-v100/encounter/type_coding) w/ `system = 'http://terminology.hl7.org/CodeSystem/encounter-type'`
* `type_hl7_display` → [`encounter_type_coding.display`](/medical-api/handling-data/schema-v100/encounter/type_coding) w/ `system = 'http://terminology.hl7.org/CodeSystem/encounter-type'`
* `source_type_code` → [`encounter_type_coding.code`](/medical-api/handling-data/schema-v100/encounter/type_coding) w/ `code_rank = 1`
* `source_type_display` → [`encounter_type_coding.display`](/medical-api/handling-data/schema-v100/encounter/type_coding) w/ `code_rank = 1`
* `source_type_system` → [`encounter_type_coding.system`](/medical-api/handling-data/schema-v100/encounter/type_coding) w/ `code_rank = 1`
* `source_discharge_disposition_code` → [`encounter_hospitalization_dischargedisposition_coding.code`](/medical-api/handling-data/schema-v100/encounter/hospitalization_dischargedisposition_coding) w/ `code_rank = 1`
* `source_discharge_disposition_display` → [`encounter_hospitalization_dischargedisposition_coding.display`](/medical-api/handling-data/schema-v100/encounter/hospitalization_dischargedisposition_coding) w/ `code_rank = 1`
* `source_discharge_disposition_system` → [`encounter_hospitalization_dischargedisposition_coding.system`](/medical-api/handling-data/schema-v100/encounter/hospitalization_dischargedisposition_coding) w/ `code_rank = 1`
* `source_reason_code_code` → [`encounter_reasoncode_coding.code`](/medical-api/handling-data/schema-v100/encounter/reasoncode_coding) w/ `code_rank = 1`
* `source_reason_code_display` → [`encounter_reasoncode_coding.display`](/medical-api/handling-data/schema-v100/encounter/reasoncode_coding) w/ `code_rank = 1`
* `source_reason_code_system` → [`encounter_reasoncode_coding.system`](/medical-api/handling-data/schema-v100/encounter/reasoncode_coding) w/ `code_rank = 1`
* `priority_hl7_code` → [`encounter_priority_coding.code`](/medical-api/handling-data/schema-v100/encounter/priority_coding) w/ `system = 'http://terminology.hl7.org/CodeSystem/v3-ActPriority'`
* `priority_hl7_display` → [`encounter_priority_coding.display`](/medical-api/handling-data/schema-v100/encounter/priority_coding) w/ `system = 'http://terminology.hl7.org/CodeSystem/v3-ActPriority'`
* `source_priority_code` → [`encounter_priority_coding.code`](/medical-api/handling-data/schema-v100/encounter/priority_coding) w/ `code_rank = 1`
* `source_priority_display` → [`encounter_priority_coding.display`](/medical-api/handling-data/schema-v100/encounter/priority_coding) w/ `code_rank = 1`
* `source_priority_system` → [`encounter_priority_coding.system`](/medical-api/handling-data/schema-v100/encounter/priority_coding) w/ `code_rank = 1`
# encounter_diagnosis
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/encounter/diagnosis
The list of diagnosis relevant to this encounter (`Encounter.diagnosis[]`).
**Primary Keys:**
* encounter\_diagnosis\_id
**Foreign Keys:**
* encounter\_id - links to the [encounter](/medical-api/handling-data/schema-v100/encounter/base) table
* condition\_reference\_id - links to the [condition](/medical-api/handling-data/schema-v100/condition/base) table
| Column | Data Type | Description |
| -------------------------- | --------- | ---------------------------------------------------------------------- |
| encounter\_diagnosis\_id | varchar | Unique identifier for the diagnosis row (stable per encounter + index) |
| encounter\_id | varchar | Parent encounter |
| condition\_reference\_id | varchar | Extracted reference ID (Condition resource) |
| condition\_reference\_type | varchar | Resource type (e.g. Condition) |
**Related Tables:**
**Parent:**
* [condition](/medical-api/handling-data/schema-v100/condition/base)
* [encounter](/medical-api/handling-data/schema-v100/encounter/base)
# encounter_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/encounter/extension
Normalized `Encounter.extension[]` property on the [Encounter](https://hl7.org/fhir/R4/encounter.html) FHIR resource.
**Primary Keys:**
* encounter\_extension\_id
**Foreign Keys:**
* encounter\_id - links to the [encounter](/medical-api/handling-data/schema-v100/encounter/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | ------------------------------------------------------ |
| encounter\_extension\_id | varchar | Unique identifier for the extension row |
| encounter\_id | varchar | FK to the parent encounter record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [encounter](/medical-api/handling-data/schema-v100/encounter/base)
**Child:**
* [encounter\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/encounter/extension_vcc_coding)
# encounter_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/encounter/extension_vcc_coding
Normalized `Encounter.extension[].valueCodeableConcept.coding[]` property on the [Encounter](https://hl7.org/fhir/R4/encounter.html) FHIR resource.
**Primary Keys:**
* encounter\_extension\_vcc\_coding\_id
**Foreign Keys:**
* encounter\_extension\_id - links to the [encounter\_extension](/medical-api/handling-data/schema-v100/encounter/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------------- | --------- | --------------------------------------------------- |
| encounter\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| encounter\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [encounter\_extension](/medical-api/handling-data/schema-v100/encounter/extension)
# encounter_hospitalization_dischargedisposition_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/encounter/hospitalization_dischargedisposition_coding
Normalized `Encounter.hospitalization.dischargeDisposition.coding[]` property on the [Encounter](https://hl7.org/fhir/R4/encounter.html) FHIR resource.
**Primary Keys:**
* encounter\_hospitalization\_dischargedisposition\_coding\_id
**Foreign Keys:**
* encounter\_id - links to the [encounter](/medical-api/handling-data/schema-v100/encounter/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------------------------------------ | --------- | --------------------------------------------------- |
| encounter\_hospitalization\_dischargedisposition\_coding\_id | varchar | Unique identifier for the coding row |
| encounter\_id | varchar | FK to the parent encounter record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [encounter](/medical-api/handling-data/schema-v100/encounter/base)
# encounter_priority_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/encounter/priority_coding
Normalized `Encounter.priority.coding[]` property on the [Encounter](https://hl7.org/fhir/R4/encounter.html) FHIR resource.
**Primary Keys:**
* encounter\_priority\_coding\_id
**Foreign Keys:**
* encounter\_id - links to the [encounter](/medical-api/handling-data/schema-v100/encounter/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------- | --------- | --------------------------------------------------- |
| encounter\_priority\_coding\_id | varchar | Unique identifier for the coding row |
| encounter\_id | varchar | FK to the parent encounter record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [encounter](/medical-api/handling-data/schema-v100/encounter/base)
# encounter_reasoncode
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/encounter/reasoncode
Normalized `Encounter.reasonCode[]` property on the [Encounter](https://hl7.org/fhir/R4/encounter.html) FHIR resource.
**Primary Keys:**
* encounter\_reasoncode\_id
**Foreign Keys:**
* encounter\_id - links to the [encounter](/medical-api/handling-data/schema-v100/encounter/base) table
| Column | Data Type | Description |
| ------------------------- | --------- | ----------------------------------------- |
| encounter\_reasoncode\_id | varchar | Unique identifier for the reason code row |
| encounter\_id | varchar | FK to the parent encounter record |
| text | varchar | Free-text reason for the encounter |
**Related Tables:**
**Parent:**
* [encounter](/medical-api/handling-data/schema-v100/encounter/base)
**Child:**
* [encounter\_reasoncode\_coding](/medical-api/handling-data/schema-v100/encounter/reasoncode_coding)
# encounter_reasoncode_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/encounter/reasoncode_coding
Normalized `Encounter.reasonCode[].coding[]` property on the [Encounter](https://hl7.org/fhir/R4/encounter.html) FHIR resource.
**Primary Keys:**
* encounter\_reasoncode\_coding\_id
**Foreign Keys:**
* encounter\_reasoncode\_id - links to the [encounter\_reasoncode](/medical-api/handling-data/schema-v100/encounter/reasoncode) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------- | --------- | --------------------------------------------- |
| encounter\_reasoncode\_coding\_id | varchar | Unique identifier for the coding row |
| encounter\_reasoncode\_id | varchar | FK to the parent encounter\_reasoncode record |
| code\_rank† | int | 1-based index |
| code | varchar | Code value |
| display | varchar | Display |
| system | varchar | Code system URI |
**Related Tables:**
**Parent:**
* [encounter\_reasoncode](/medical-api/handling-data/schema-v100/encounter/reasoncode)
# encounter_type
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/encounter/type
Specific type of encounter, such as e-mail consultation, surgical day-care, etc. (`Encounter.type[]`).
**Primary Keys:**
* encounter\_type\_id
**Foreign Keys:**
* encounter\_id - links to the [encounter](/medical-api/handling-data/schema-v100/encounter/base) table
| Column | Data Type | Description |
| ------------------- | --------- | ----------------------------------- |
| encounter\_type\_id | varchar | Unique identifier for the type row |
| encounter\_id | varchar | FK to the parent encounter record |
| text | varchar | Display text for the encounter type |
**Related Tables:**
**Parent:**
* [encounter](/medical-api/handling-data/schema-v100/encounter/base)
**Child:**
* [encounter\_type\_coding](/medical-api/handling-data/schema-v100/encounter/type_coding)
# encounter_type_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/encounter/type_coding
Normalized `Encounter.type.coding[]` property on the [Encounter](https://hl7.org/fhir/R4/encounter.html) FHIR resource.
**Primary Keys:**
* encounter\_type\_coding\_id
**Foreign Keys:**
* encounter\_type\_id - links to the [encounter\_type](/medical-api/handling-data/schema-v100/encounter/type) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------- | --------- | --------------------------------------- |
| encounter\_type\_coding\_id | varchar | Unique identifier |
| encounter\_type\_id | varchar | FK to the parent encounter\_type record |
| code\_rank† | int | 1-based index |
| code | varchar | Code value |
| display | varchar | Display |
| system | varchar | Code system URI |
**Related Tables:**
**Parent:**
* [encounter\_type](/medical-api/handling-data/schema-v100/encounter/type)
# familymemberhistory
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/familymemberhistory/base
Significant health conditions for a person related to the patient relevant in the context of care for the patient. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/familymemberhistory.html) for full details.
**Tables in this resource:**
* **familymemberhistory** – Main family member history record (this page)
* [familymemberhistory\_condition](/medical-api/handling-data/schema-v100/familymemberhistory/condition) – Conditions per family member
* [familymemberhistory\_condition\_code\_coding](/medical-api/handling-data/schema-v100/familymemberhistory/condition_code_coding)
* [familymemberhistory\_relationship\_coding](/medical-api/handling-data/schema-v100/familymemberhistory/relationship_coding)
* [familymemberhistory\_sex\_coding](/medical-api/handling-data/schema-v100/familymemberhistory/sex_coding)
* [familymemberhistory\_extension](/medical-api/handling-data/schema-v100/familymemberhistory/extension)
* [familymemberhistory\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/familymemberhistory/extension_vcc_coding)
* **familymemberhistory\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Reference Table:**
The `familymemberhistory_references` table contains normalized references from the family member history to other entities. For structure and indexing, see the [Reference Tables documentation](/medical-api/handling-data/schema-v100/reference_tables).
**Primary Keys:**
* familymemberhistory\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------- | --------- | ----------------------------------------------------------- |
| familymemberhistory\_id | varchar | Unique identifier for the family member history record |
| patient\_id | varchar | Unique identifier for the patient |
| status | varchar | Status of the record |
| date | datetime | When the history was recorded or last updated |
| bornstring | varchar | Birth date or age text for the family member |
| relationship\_text | varchar | Free-text relationship to patient |
| sex\_text | varchar | Free-text sex of the family member |
| sex\_hl7\_code† | varchar | HL7 sex code (administrative-gender) |
| sex\_hl7\_display† | varchar | Human-readable description of HL7 sex |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [familymemberhistory\_condition](/medical-api/handling-data/schema-v100/familymemberhistory/condition)
* [familymemberhistory\_extension](/medical-api/handling-data/schema-v100/familymemberhistory/extension)
* [familymemberhistory\_relationship\_coding](/medical-api/handling-data/schema-v100/familymemberhistory/relationship_coding)
* [familymemberhistory\_sex\_coding](/medical-api/handling-data/schema-v100/familymemberhistory/sex_coding)
# familymemberhistory_condition
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/familymemberhistory/condition
The significant conditions that the family member had (`FamilyMemberHistory.condition[]`).
**Primary Keys:**
* familymemberhistory\_condition\_id
**Foreign Keys:**
* familymemberhistory\_id - links to the [familymemberhistory](/medical-api/handling-data/schema-v100/familymemberhistory/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------- | --------- | -------------------------------------------------------------- |
| familymemberhistory\_condition\_id | varchar | Unique identifier for the condition row |
| familymemberhistory\_id | varchar | Parent family member history |
| onsetage\_value | varchar | Onset age value |
| onsetage\_unit | varchar | Unit for onset age (e.g. a for years) |
| code\_text | varchar | Free-text description of the condition |
| code\_icd\_10\_cm\_code† | varchar | ICD-10-CM condition code |
| code\_icd\_10\_cm\_display† | varchar | Human-readable description of ICD-10-CM code |
| code\_snomed\_code† | varchar | SNOMED CT condition code |
| code\_snomed\_display† | varchar | Human-readable description of SNOMED CT code |
| code\_icd\_9\_cm\_code† | varchar | ICD-9-CM condition code |
| code\_icd\_9\_cm\_display† | varchar | Human-readable description of ICD-9-CM code |
| contributed\_to\_death | varchar | Whether the condition contributed to the family member's death |
**Related Tables:**
**Parent:**
* [familymemberhistory](/medical-api/handling-data/schema-v100/familymemberhistory/base)
**Child:**
* [familymemberhistory\_condition\_code\_coding](/medical-api/handling-data/schema-v100/familymemberhistory/condition_code_coding)
# familymemberhistory_condition_code_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/familymemberhistory/condition_code_coding
Normalized `FamilyMemberHistory.condition[].code.coding[]` property on the [FamilyMemberHistory](https://hl7.org/fhir/R4/familymemberhistory.html) FHIR resource.
**Primary Keys:**
* familymemberhistory\_condition\_code\_coding\_id
**Foreign Keys:**
* familymemberhistory\_condition\_id - links to the [familymemberhistory\_condition](/medical-api/handling-data/schema-v100/familymemberhistory/condition) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------------------------ | --------- | ------------------------------------------------------ |
| familymemberhistory\_condition\_code\_coding\_id | varchar | Unique identifier for the coding row |
| familymemberhistory\_condition\_id | varchar | FK to the parent familymemberhistory\_condition record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [familymemberhistory\_condition](/medical-api/handling-data/schema-v100/familymemberhistory/condition)
# familymemberhistory_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/familymemberhistory/extension
Normalized `FamilyMemberHistory.extension[]` property on the [FamilyMemberHistory](https://hl7.org/fhir/R4/familymemberhistory.html) FHIR resource.
**Primary Keys:**
* familymemberhistory\_extension\_id
**Foreign Keys:**
* familymemberhistory\_id - links to the [familymemberhistory](/medical-api/handling-data/schema-v100/familymemberhistory/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------- | --------- | ------------------------------------------------------ |
| familymemberhistory\_extension\_id | varchar | Unique identifier for the extension row |
| familymemberhistory\_id | varchar | FK to the parent familymemberhistory record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [familymemberhistory](/medical-api/handling-data/schema-v100/familymemberhistory/base)
**Child:**
* [familymemberhistory\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/familymemberhistory/extension_vcc_coding)
# familymemberhistory_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/familymemberhistory/extension_vcc_coding
Normalized `FamilyMemberHistory.extension[].valueCodeableConcept.coding[]` property on the [FamilyMemberHistory](https://hl7.org/fhir/R4/familymemberhistory.html) FHIR resource.
**Primary Keys:**
* familymemberhistory\_extension\_vcc\_coding\_id
**Foreign Keys:**
* familymemberhistory\_extension\_id - links to the [familymemberhistory\_extension](/medical-api/handling-data/schema-v100/familymemberhistory/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------------------------- | --------- | --------------------------------------------------- |
| familymemberhistory\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| familymemberhistory\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [familymemberhistory\_extension](/medical-api/handling-data/schema-v100/familymemberhistory/extension)
# familymemberhistory_relationship_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/familymemberhistory/relationship_coding
Normalized `FamilyMemberHistory.relationship.coding[]` property on the [FamilyMemberHistory](https://hl7.org/fhir/R4/familymemberhistory.html) FHIR resource.
**Primary Keys:**
* familymemberhistory\_relationship\_coding\_id
**Foreign Keys:**
* familymemberhistory\_id - links to the [family member history](/medical-api/handling-data/schema-v100/familymemberhistory/base) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------------------- | --------- | --------------------------------------------------- |
| familymemberhistory\_relationship\_coding\_id | varchar | Unique identifier for the coding row |
| familymemberhistory\_id | varchar | FK to the parent familymemberhistory record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [familymemberhistory](/medical-api/handling-data/schema-v100/familymemberhistory/base)
# familymemberhistory_sex_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/familymemberhistory/sex_coding
Normalized `FamilyMemberHistory.sex.coding[]` property on the [FamilyMemberHistory](https://hl7.org/fhir/R4/familymemberhistory.html) FHIR resource.
**Primary Keys:**
* familymemberhistory\_sex\_coding\_id
**Foreign Keys:**
* familymemberhistory\_id - links to the [family member history](/medical-api/handling-data/schema-v100/familymemberhistory/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------------ | --------- | --------------------------------------------------- |
| familymemberhistory\_sex\_coding\_id | varchar | Unique identifier for the coding row |
| familymemberhistory\_id | varchar | FK to the parent familymemberhistory record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [familymemberhistory](/medical-api/handling-data/schema-v100/familymemberhistory/base)
# goal
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/goal/base
A Goal in health care services delivery is generally an expressed desired health state to be achieved by a subject of care (or family/group) over a period or at a specific point of time. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/goal.html) for full details.
**Tables in this resource:**
* **goal** – Main goal record (this page)
* [goal\_description\_coding](/medical-api/handling-data/schema-v100/goal/description_coding)
* [goal\_priority\_coding](/medical-api/handling-data/schema-v100/goal/priority_coding)
* [goal\_target](/medical-api/handling-data/schema-v100/goal/target) – Targets per goal
* [goal\_target\_measure\_coding](/medical-api/handling-data/schema-v100/goal/target_measure_coding)
* [goal\_extension](/medical-api/handling-data/schema-v100/goal/extension)
* [goal\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/goal/extension_vcc_coding)
* **goal\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Primary Keys:**
* goal\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table (subject)
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------- | --------- | ------------------------------------------------------------ |
| goal\_id | varchar | Unique identifier for the goal |
| patient\_id | varchar | Unique identifier for the patient (subject) |
| lifecyclestatus | varchar | Lifecycle status of the goal |
| startdate | datetime | Start date of the goal |
| description\_text | varchar | Free-text description of the goal |
| priority\_text | varchar | Free-text priority of the goal |
| priority\_hl7\_code† | varchar | Code from the preferred goal-priority system when matched |
| priority\_hl7\_display† | varchar | Display from the preferred goal-priority system when matched |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [goal\_description\_coding](/medical-api/handling-data/schema-v100/goal/description_coding)
* [goal\_extension](/medical-api/handling-data/schema-v100/goal/extension)
* [goal\_priority\_coding](/medical-api/handling-data/schema-v100/goal/priority_coding)
* [goal\_target](/medical-api/handling-data/schema-v100/goal/target)
# goal_description_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/goal/description_coding
Normalized `Goal.description.coding[]` property on the [Goal](https://hl7.org/fhir/R4/goal.html) FHIR resource.
**Primary Keys:**
* goal\_description\_coding\_id
**Foreign Keys:**
* goal\_id - links to the [goal](/medical-api/handling-data/schema-v100/goal/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------- | --------- | --------------------------------------------------- |
| goal\_description\_coding\_id | varchar | Unique identifier for the coding row |
| goal\_id | varchar | FK to the parent goal record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [goal](/medical-api/handling-data/schema-v100/goal/base)
# goal_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/goal/extension
Normalized `Goal.extension[]` property on the [Goal](https://hl7.org/fhir/R4/goal.html) FHIR resource.
**Primary Keys:**
* goal\_extension\_id
**Foreign Keys:**
* goal\_id - links to the [goal](/medical-api/handling-data/schema-v100/goal/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | ------------------------------------------------------ |
| goal\_extension\_id | varchar | Unique identifier for the extension row |
| goal\_id | varchar | FK to the parent goal record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [goal](/medical-api/handling-data/schema-v100/goal/base)
**Child:**
* [goal\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/goal/extension_vcc_coding)
# goal_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/goal/extension_vcc_coding
Normalized `Goal.extension[].valueCodeableConcept.coding[]` property on the [Goal](https://hl7.org/fhir/R4/goal.html) FHIR resource.
**Primary Keys:**
* goal\_extension\_vcc\_coding\_id
**Foreign Keys:**
* goal\_extension\_id - links to the [goal\_extension](/medical-api/handling-data/schema-v100/goal/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------------- | --------- | --------------------------------------------------- |
| goal\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| goal\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [goal\_extension](/medical-api/handling-data/schema-v100/goal/extension)
# goal_priority_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/goal/priority_coding
Normalized `Goal.priority.coding[]` property on the [Goal](https://hl7.org/fhir/R4/goal.html) FHIR resource.
**Primary Keys:**
* goal\_priority\_coding\_id
**Foreign Keys:**
* goal\_id - links to the [goal](/medical-api/handling-data/schema-v100/goal/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | --------------------------------------------------- |
| goal\_priority\_coding\_id | varchar | Unique identifier for the coding row |
| goal\_id | varchar | FK to the parent goal record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [goal](/medical-api/handling-data/schema-v100/goal/base)
# goal_target
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/goal/target
Indicates what should be done by when (`Goal.target[]`).
**Primary Keys:**
* goal\_target\_id
**Foreign Keys:**
* goal\_id - links to the [goal](/medical-api/handling-data/schema-v100/goal/base) table
| Column | Data Type | Description |
| --------------------- | --------- | ------------------------------------ |
| goal\_target\_id | varchar | Unique identifier for the target |
| goal\_id | varchar | Parent goal |
| duedate | datetime | Target due date |
| measure\_text | varchar | Free-text measure for the target |
| detailquantity\_value | varchar | Quantity detail value for the target |
**Related Tables:**
**Parent:**
* [goal](/medical-api/handling-data/schema-v100/goal/base)
**Child:**
* [goal\_target\_measure\_coding](/medical-api/handling-data/schema-v100/goal/target_measure_coding)
# goal_target_measure_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/goal/target_measure_coding
Normalized `Goal.target[].measure.coding[]` property on the [Goal](https://hl7.org/fhir/R4/goal.html) FHIR resource.
**Primary Keys:**
* goal\_target\_measure\_coding\_id
**Foreign Keys:**
* goal\_target\_id - links to the [goal target](/medical-api/handling-data/schema-v100/goal/target) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------- | --------- | --------------------------------------------------- |
| goal\_target\_measure\_coding\_id | varchar | Unique identifier for the coding row |
| goal\_target\_id | varchar | FK to the parent goal\_target record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [goal\_target](/medical-api/handling-data/schema-v100/goal/target)
# immunization
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/immunization/base
Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/immunization.html) for full details.
**Previous version:** [immunization](/medical-api/handling-data/schema-v000/immunization)
**Tables in this resource:**
* **immunization** – Main immunization record (this page)
* [immunization\_vaccinecode\_coding](/medical-api/handling-data/schema-v100/immunization/vaccinecode_coding)
* [immunization\_statusreason\_coding](/medical-api/handling-data/schema-v100/immunization/statusreason_coding)
* [immunization\_route\_coding](/medical-api/handling-data/schema-v100/immunization/route_coding)
* [immunization\_site\_coding](/medical-api/handling-data/schema-v100/immunization/site_coding)
* [immunization\_extension](/medical-api/handling-data/schema-v100/immunization/extension)
* [immunization\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/immunization/extension_vcc_coding)
* **immunization\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Reference Table:**
The `immunization_references` table contains normalized references from the immunization to other entities. It supports the following reference properties:
* **patient** (required): links to the [patient](/medical-api/handling-data/schema-v100/patient/base) who received the immunization
* **performer.actor**: links to [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) or [organization](/medical-api/handling-data/schema-v100/organization/base) per `reference_type`
For detailed information about reference table structure and indexing, see the [Reference Tables documentation](/medical-api/handling-data/schema-v100/reference_tables).
**Primary Keys:**
* immunization\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | ------------------------------------------------------------------ |
| immunization\_id | varchar | Unique identifier for the immunization |
| patient\_id | varchar | Unique identifier for the patient |
| status | varchar | Status of the immunization record (e.g. completed, not-done) |
| occurrencedatetime | datetime | Occurrence date/time if provided directly |
| occurrencestring | varchar | Occurrence date/time as a string when not a structured date |
| occurrence\_date† | datetime | Coalesced occurrence date (occurrencedatetime or occurrencestring) |
| vaccinecode\_text | varchar | Free-text vaccine description |
| vaccinecode\_cvx\_code† | varchar | CVX vaccine code |
| vaccinecode\_cvx\_display† | varchar | Human-readable CVX description |
| statusreason\_text | varchar | Free-text status reason |
| route\_text | varchar | Free-text route of administration |
| site\_text | varchar | Free-text administration site |
| dosequantity\_value | varchar | Dose quantity value |
| dosequantity\_unit | varchar | Dose quantity unit |
| lotnumber | varchar | Lot number of the vaccine |
| note\_text† | varchar | Additional notes about the immunization (first note) |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [immunization\_extension](/medical-api/handling-data/schema-v100/immunization/extension)
* [immunization\_route\_coding](/medical-api/handling-data/schema-v100/immunization/route_coding)
* [immunization\_site\_coding](/medical-api/handling-data/schema-v100/immunization/site_coding)
* [immunization\_statusreason\_coding](/medical-api/handling-data/schema-v100/immunization/statusreason_coding)
* [immunization\_vaccinecode\_coding](/medical-api/handling-data/schema-v100/immunization/vaccinecode_coding)
## Version diff
**Renamed**
* `cvx_code` → `vaccinecode_cvx_code`
* `cvx_display` → `vaccinecode_cvx_display`
* `dose_amount` → `dosequantity_value`
* `dose_unit` → `dosequantity_unit`
* `data_source` → `meta_source`
**Moved to separate tables**
* `source_vaccine_code_code` → [`immunization_vaccinecode_coding.code`](/medical-api/handling-data/schema-v100/immunization/vaccinecode_coding) w/ `code_rank = 1`
* `source_vaccine_code_display` → [`immunization_vaccinecode_coding.display`](/medical-api/handling-data/schema-v100/immunization/vaccinecode_coding) w/ `code_rank = 1`
* `source_vaccine_code_system` → [`immunization_vaccinecode_coding.system`](/medical-api/handling-data/schema-v100/immunization/vaccinecode_coding) w/ `code_rank = 1`
# immunization_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/immunization/extension
Normalized `Immunization.extension[]` property on the [Immunization](https://hl7.org/fhir/R4/immunization.html) FHIR resource.
**Primary Keys:**
* immunization\_extension\_id
**Foreign Keys:**
* immunization\_id - links to the [immunization](/medical-api/handling-data/schema-v100/immunization/base) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------- | --------- | ------------------------------------------------------ |
| immunization\_extension\_id | varchar | Unique identifier for the extension row |
| immunization\_id | varchar | FK to the parent immunization record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [immunization](/medical-api/handling-data/schema-v100/immunization/base)
**Child:**
* [immunization\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/immunization/extension_vcc_coding)
# immunization_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/immunization/extension_vcc_coding
Normalized `Immunization.extension[].valueCodeableConcept.coding[]` property on the [Immunization](https://hl7.org/fhir/R4/immunization.html) FHIR resource.
**Primary Keys:**
* immunization\_extension\_vcc\_coding\_id
**Foreign Keys:**
* immunization\_extension\_id - links to the [immunization\_extension](/medical-api/handling-data/schema-v100/immunization/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------------- | --------- | --------------------------------------------------- |
| immunization\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| immunization\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [immunization\_extension](/medical-api/handling-data/schema-v100/immunization/extension)
# immunization_route_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/immunization/route_coding
Normalized `Immunization.route.coding[]` property on the [Immunization](https://hl7.org/fhir/R4/immunization.html) FHIR resource.
**Primary Keys:**
* immunization\_route\_coding\_id
**Foreign Keys:**
* immunization\_id - links to the [immunization](/medical-api/handling-data/schema-v100/immunization) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------- | --------- | --------------------------------------------------- |
| immunization\_route\_coding\_id | varchar | Unique identifier for the coding row |
| immunization\_id | varchar | FK to the parent immunization record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [immunization](/medical-api/handling-data/schema-v100/immunization/base)
# immunization_site_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/immunization/site_coding
Normalized `Immunization.site.coding[]` property on the [Immunization](https://hl7.org/fhir/R4/immunization.html) FHIR resource.
**Primary Keys:**
* immunization\_site\_coding\_id
**Foreign Keys:**
* immunization\_id - links to the [immunization](/medical-api/handling-data/schema-v100/immunization) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------ | --------- | --------------------------------------------------- |
| immunization\_site\_coding\_id | varchar | Unique identifier for the coding row |
| immunization\_id | varchar | FK to the parent immunization record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [immunization](/medical-api/handling-data/schema-v100/immunization/base)
# immunization_statusreason_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/immunization/statusreason_coding
Normalized `Immunization.statusReason.coding[]` property on the [Immunization](https://hl7.org/fhir/R4/immunization.html) FHIR resource.
**Primary Keys:**
* immunization\_statusreason\_coding\_id
**Foreign Keys:**
* immunization\_id - links to the [immunization](/medical-api/handling-data/schema-v100/immunization) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------------------- | --------- | --------------------------------------------------- |
| immunization\_statusreason\_coding\_id | varchar | Unique identifier for the coding row |
| immunization\_id | varchar | FK to the parent immunization record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [immunization](/medical-api/handling-data/schema-v100/immunization/base)
# immunization_vaccinecode_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/immunization/vaccinecode_coding
Normalized `Immunization.vaccineCode.coding[]` property on the [Immunization](https://hl7.org/fhir/R4/immunization.html) FHIR resource.
**Primary Keys:**
* immunization\_vaccinecode\_coding\_id
**Foreign Keys:**
* immunization\_id - links to the [immunization](/medical-api/handling-data/schema-v100/immunization) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------------- | --------- | --------------------------------------------------- |
| immunization\_vaccinecode\_coding\_id | varchar | Unique identifier for the coding row |
| immunization\_id | varchar | FK to the parent immunization record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [immunization](/medical-api/handling-data/schema-v100/immunization/base)
# location
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/location/base
Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/location.html) for full details.
**Previous version:** [location](/medical-api/handling-data/schema-v000/location)
**Note:** `phone` and `email` are the first matching `Location.telecom` entries (`system` phone / email) and stay on this table for convenience. They are not deprecated. Use [`location_telecom`](/medical-api/handling-data/schema-v100/location/telecom) for every telecom row.
**Tables in this resource:**
* **location** – Location record (this page)
* [location\_type](/medical-api/handling-data/schema-v100/location/type) – Backbone for location type
* [location\_type\_coding](/medical-api/handling-data/schema-v100/location/type_coding)
* [location\_telecom](/medical-api/handling-data/schema-v100/location/telecom) – Contact details per location
* [location\_extension](/medical-api/handling-data/schema-v100/location/extension)
* [location\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/location/extension_vcc_coding)
* **location\_references** – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables#location-references) (managingOrganization, partOf)
**Primary Keys:**
* location\_id
† Metriport Platform added
| Column | Data Type | Description |
| ------------------- | --------- | ----------------------------------------------------------- |
| location\_id | varchar | Unique identifier for the location |
| name | varchar | Name of the location |
| type\_hl7\_code† | varchar | HL7 location type code (v3-RoleCode) |
| type\_hl7\_display† | varchar | Human-readable description of HL7 type |
| physicaltype\_text | varchar | Physical type free-text description of the facility |
| address† | varchar | First, second, and third address lines concatenated |
| city† | varchar | City (from `Location.address`) |
| state† | varchar | State or province (from `Location.address`) |
| country† | varchar | Country (from `Location.address`) |
| zip\_code† | varchar | ZIP or postal code (from `Location.address`) |
| phone† | varchar | First phone from telecom |
| email† | varchar | First email from telecom |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [organization](/medical-api/handling-data/schema-v100/organization/base)
**Child:**
* [location\_extension](/medical-api/handling-data/schema-v100/location/extension)
* [location\_telecom](/medical-api/handling-data/schema-v100/location/telecom)
* [location\_type](/medical-api/handling-data/schema-v100/location/type)
* [location\_type\_coding](/medical-api/handling-data/schema-v100/location/type_coding)
## Version diff
**Renamed**
* `address_line` → `address`
* `physical_type_display` → `physicaltype_text`
* `type_display` → `type_hl7_display`
* `data_source` → `meta_source`
**Deprecated**
* `managing_organization_id` → query [`location_references`](/medical-api/handling-data/schema-v100/reference_tables) w/ `reference_type = 'managingorganization'`
# location_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/location/extension
Normalized `Location.extension[]` property on the [Location](https://hl7.org/fhir/R4/location.html) FHIR resource.
**Primary Keys:**
* location\_extension\_id
**Foreign Keys:**
* location\_id - links to the [location](/medical-api/handling-data/schema-v100/location/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | ------------------------------------------------------ |
| location\_extension\_id | varchar | Unique identifier for the extension row |
| location\_id | varchar | FK to the parent location record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [location](/medical-api/handling-data/schema-v100/location/base)
**Child:**
* [location\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/location/extension_vcc_coding)
# location_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/location/extension_vcc_coding
Normalized `Location.extension[].valueCodeableConcept.coding[]` property on the [Location](https://hl7.org/fhir/R4/location.html) FHIR resource.
**Primary Keys:**
* location\_extension\_vcc\_coding\_id
**Foreign Keys:**
* location\_extension\_id - links to the [location\_extension](/medical-api/handling-data/schema-v100/location/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------------ | --------- | --------------------------------------------------- |
| location\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| location\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [location\_extension](/medical-api/handling-data/schema-v100/location/extension)
# location_telecom
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/location/telecom
Normalized contact points for the location (`Location.telecom[]`). Each row is one element of the telecom array; `anchor_index` from stage drives ordering (`telecom_rank`).
**Primary Keys:**
* location\_telecom\_id
**Foreign Keys:**
* location\_id - links to the [location](/medical-api/handling-data/schema-v100/location/base) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------- | --------- | -------------------------------------------------------------- |
| location\_telecom\_id | varchar | Surrogate key for this telecom row |
| location\_id | varchar | Parent location |
| system | varchar | Contact system: e.g. phone, fax, email, pager, url, sms, other |
| use | varchar | Purpose of contact: `home`, `work`, `temp`, `old`, `mobile` |
| value | varchar | The actual phone number, email address, URL, etc. |
| telecom\_rank† | int | Stable order of this telecom within the location |
**Related Tables:**
**Parent:**
* [location](/medical-api/handling-data/schema-v100/location/base)
# location_type
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/location/type
Indicates the type of function performed at the location (`Location.type[]`).
**Primary Keys:**
* location\_type\_id
**Foreign Keys:**
* location\_id - links to the [location](/medical-api/handling-data/schema-v100/location/base) table
| Column | Data Type | Description |
| ------------------ | --------- | ---------------------------------- |
| location\_type\_id | varchar | Unique identifier for the type row |
| location\_id | varchar | FK to the parent location record |
| text | varchar | Display text for the location type |
**Related Tables:**
**Parent:**
* [location](/medical-api/handling-data/schema-v100/location/base)
# location_type_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/location/type_coding
Normalized `Location.type.coding[]` property on the [Location](https://hl7.org/fhir/R4/location.html) FHIR resource.
**Primary Keys:**
* location\_type\_coding\_id
**Foreign Keys:**
* location\_type\_id - links to the [location\_type](/medical-api/handling-data/schema-v100/location/type) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | --------------------------------------------------- |
| location\_type\_coding\_id | varchar | Unique identifier for the coding row |
| location\_type\_id | varchar | FK to the parent location\_type record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [location\_type](/medical-api/handling-data/schema-v100/location/type)
# measure_report
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/measure_report
The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/measurereport.html) for full details.
**Previous version:** [measure\_report](/medical-api/handling-data/schema-v000/measure-report)
**Primary Keys:**
* measure\_report\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table
† Metriport Platform added
† Metriport Platform added
| Column | Data Type | Description |
| ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| measure\_report\_id | varchar | Unique identifier for the measure report (maps to `id`) |
| patient\_id | varchar | The patient identifier (extracted from `subject.reference`) |
| measure | varchar | Reference to the measure (maps to `measure`, e.g., canonical URL) |
| status | varchar | Status of the report (maps to `status`, typically "complete") |
| type | varchar | Type of report (maps to `type`, typically "individual") |
| date | datetime | When the measure was calculated (maps to `date`) |
| period\_start | date | Start date of the measurement period (maps to `period.start`) |
| period\_end | date | End date of the measurement period (maps to `period.end`) |
| contained | variant | Array of contained resources (maps to `contained[]`). **Parameters with detailed calculation parameters and supporting evidence are stored in this column.** |
| group | variant | Array of measure groups with population data (maps to `group[]`) |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Note:** The `contained` column holds the Parameters resource with detailed calculation parameters and supporting evidence. The `group` column holds the population stratifications (initial-population, denominator, numerator, etc.). Both use Snowflake's VARIANT type for JSON array storage.
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
## Version diff
**Renamed**
* `data_source` → `meta_source`
# medication
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medication/base
This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/medication.html) for full details.
**Previous version:** [medication](/medical-api/handling-data/schema-v000/medication)
**Design notes:** Core has no `medication_references` table (Medication is referenced by MedicationAdministration, MedicationDispense, etc.). The FHIR `ingredient` array is not modeled in core by design.
**Tables in this resource:**
* **medication** – Medication record (this page)
* [medication\_code\_coding](/medical-api/handling-data/schema-v100/medication/code_coding)
* [medication\_extension](/medical-api/handling-data/schema-v100/medication/extension)
* [medication\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medication/extension_vcc_coding)
**Primary Keys:**
* medication\_id
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| medication\_id | varchar | Unique identifier for the medication |
| status | varchar | Status of the medication. Possible values:
– active: The medication is currently in use.
– inactive: The medication is not currently in use.
– entered-in-error: The medication record was entered in error. Refer to HL7 FHIR Medication Status for more details. |
| code\_text | varchar | Free-text description of the medication |
| code\_rxnorm\_code† | varchar | RxNorm code for the medication |
| code\_rxnorm\_display† | varchar | Human-readable description from RxNorm |
| code\_ndc\_code† | varchar | National Drug Code for the medication |
| code\_ndc\_display† | varchar | Human-readable description from NDC |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Child:**
* [medication\_code\_coding](/medical-api/handling-data/schema-v100/medication/code_coding)
* [medication\_extension](/medical-api/handling-data/schema-v100/medication/extension)
* [medicationadministration](/medical-api/handling-data/schema-v100/medicationadministration/base)
* [medicationdispense](/medical-api/handling-data/schema-v100/medicationdispense/base)
* [medicationrequest](/medical-api/handling-data/schema-v100/medicationrequest/base)
* [medicationstatement](/medical-api/handling-data/schema-v100/medicationstatement/base)
## Version diff
**Renamed**
* `rxnorm_code` → `code_rxnorm_code`
* `rxnorm_display` → `code_rxnorm_display`
* `ndc_code` → `code_ndc_code`
* `ndc_display` → `code_ndc_display`
* `data_source` → `meta_source`
# medication_code_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medication/code_coding
Normalized `Medication.code.coding[]` property on the [Medication](https://hl7.org/fhir/R4/medication.html) FHIR resource.
**Primary Keys:**
* medication\_code\_coding\_id
**Foreign Keys:**
* medication\_id - links to the [medication](/medical-api/handling-data/schema-v100/medication) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------- | --------- | --------------------------------------------------- |
| medication\_code\_coding\_id | varchar | Unique identifier for the coding row |
| medication\_id | varchar | FK to the parent medication record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [medication](/medical-api/handling-data/schema-v100/medication/base)
# medication_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medication/extension
Normalized `Medication.extension[]` property on the [Medication](https://hl7.org/fhir/R4/medication.html) FHIR resource.
**Primary Keys:**
* medication\_extension\_id
**Foreign Keys:**
* medication\_id - links to the [medication](/medical-api/handling-data/schema-v100/medication/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | ------------------------------------------------------ |
| medication\_extension\_id | varchar | Unique identifier for the extension row |
| medication\_id | varchar | FK to the parent medication record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [medication](/medical-api/handling-data/schema-v100/medication/base)
**Child:**
* [medication\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medication/extension_vcc_coding)
# medication_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medication/extension_vcc_coding
Normalized `Medication.extension[].valueCodeableConcept.coding[]` property on the [Medication](https://hl7.org/fhir/R4/medication.html) FHIR resource.
**Primary Keys:**
* medication\_extension\_vcc\_coding\_id
**Foreign Keys:**
* medication\_extension\_id - links to the [medication\_extension](/medical-api/handling-data/schema-v100/medication/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------------------- | --------- | --------------------------------------------------- |
| medication\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| medication\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [medication\_extension](/medical-api/handling-data/schema-v100/medication/extension)
# medicationadministration
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medicationadministration/base
Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/medicationadministration.html) for full details.
**Previous version:** [medication\_administration](/medical-api/handling-data/schema-v000/medication-administration)
**Tables in this resource:**
* **medicationadministration** – Main medication administration record (this page)
* [medicationadministration\_dosage\_route\_coding](/medical-api/handling-data/schema-v100/medicationadministration/dosage_route_coding)
* [medicationadministration\_extension](/medical-api/handling-data/schema-v100/medicationadministration/extension)
* [medicationadministration\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medicationadministration/extension_vcc_coding)
* **medicationadministration\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Reference Table:**
The `medicationadministration_references` table contains normalized references from the medication administration to other entities. It supports the following reference properties:
* **medication\_reference** (required): links to the medication that was administered
* **subject** (required): links to the patient who received the medication
* **performer.actor**: links to practitioners who performed the administration
* **reasonReference**: links to [condition](/medical-api/handling-data/schema-v100/condition/base) or other clinical resource per `reference_type`
For detailed information about reference table structure and indexing, see the [Reference Tables documentation](/medical-api/handling-data/schema-v100/reference_tables).
**Primary Keys:**
* medicationadministration\_id
**Foreign Keys:**
* patient\_id – links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table (subject)
* medication\_id – links to the [medication](/medical-api/handling-data/schema-v100/medication/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------- | --------- | ---------------------------------------------------------------------- |
| medicationadministration\_id | varchar | Unique identifier for the medication administration |
| patient\_id | varchar | Unique identifier for the patient (subject) |
| medication\_id | varchar | Reference to the medication administered |
| status | varchar | Status of the administration (e.g. completed, in-progress) |
| effectivedatetime | datetime | Effective date/time if provided directly |
| effectiveperiod\_start | datetime | Start of effective period |
| effective\_date† | datetime | Coalesced effective date (effectivedatetime or effectiveperiod\_start) |
| effectiveperiod\_end | datetime | End of effective period |
| dosage\_dose\_unit | varchar | Unit of measurement for the dose |
| dosage\_dose\_value | varchar | Amount of medication administered |
| dosage\_ratequantity\_unit | varchar | Unit for the infusion rate quantity |
| dosage\_ratequantity\_value | varchar | Infusion rate quantity value |
| dosage\_route\_text | varchar | Free-text route of administration |
| note\_text† | varchar | Additional notes about the administration (first note) |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source derived from FHIR extension |
**Related Tables:**
**Parent:**
* [medication](/medical-api/handling-data/schema-v100/medication/base)
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [medicationadministration\_dosage\_route\_coding](/medical-api/handling-data/schema-v100/medicationadministration/dosage_route_coding)
* [medicationadministration\_extension](/medical-api/handling-data/schema-v100/medicationadministration/extension)
## Version diff
**Renamed**
* `medication_administration_id` → `medicationadministration_id`
* `end_date` → `effectiveperiod_end`
* `data_source` → `meta_source`
# medicationadministration_dosage_route_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medicationadministration/dosage_route_coding
Normalized `MedicationAdministration.dosage.route.coding[]` property on the [MedicationAdministration](https://hl7.org/fhir/R4/medicationadministration.html) FHIR resource.
**Primary Keys:**
* medicationadministration\_dosage\_route\_coding\_id
**Foreign Keys:**
* medicationadministration\_id - links to the [medicationadministration](/medical-api/handling-data/schema-v100/medicationadministration/base) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------------------------- | --------- | --------------------------------------------------- |
| medicationadministration\_dosage\_route\_coding\_id | varchar | Unique identifier for the coding row |
| medicationadministration\_id | varchar | FK to the parent medicationadministration record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [medicationadministration](/medical-api/handling-data/schema-v100/medicationadministration/base)
# medicationadministration_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medicationadministration/extension
Normalized `MedicationAdministration.extension[]` property on the [MedicationAdministration](https://hl7.org/fhir/R4/medicationadministration.html) FHIR resource.
**Primary Keys:**
* medicationadministration\_extension\_id
**Foreign Keys:**
* medicationadministration\_id - links to the [medicationadministration](/medical-api/handling-data/schema-v100/medicationadministration/base) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------------- | --------- | ------------------------------------------------------ |
| medicationadministration\_extension\_id | varchar | Unique identifier for the extension row |
| medicationadministration\_id | varchar | FK to the parent medicationadministration record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [medicationadministration](/medical-api/handling-data/schema-v100/medicationadministration/base)
**Child:**
* [medicationadministration\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medicationadministration/extension_vcc_coding)
# medicationadministration_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medicationadministration/extension_vcc_coding
Normalized `MedicationAdministration.extension[].valueCodeableConcept.coding[]` property on the [MedicationAdministration](https://hl7.org/fhir/R4/medicationadministration.html) FHIR resource.
**Primary Keys:**
* medicationadministration\_extension\_vcc\_coding\_id
**Foreign Keys:**
* medicationadministration\_extension\_id - links to the [medicationadministration\_extension](/medical-api/handling-data/schema-v100/medicationadministration/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------------------------- | --------- | --------------------------------------------------- |
| medicationadministration\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| medicationadministration\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [medicationadministration\_extension](/medical-api/handling-data/schema-v100/medicationadministration/extension)
# medicationdispense
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medicationdispense/base
Indicates that a medication product is to be or has been dispensed for a named person/patient. This resource covers the supply of medications to a patient. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/medicationdispense.html) for full details.
**Previous version:** [medication\_dispense](/medical-api/handling-data/schema-v000/medication-dispense)
**Tables in this resource:**
* **medicationdispense** – Main medication dispense record (this page)
* [medicationdispense\_extension](/medical-api/handling-data/schema-v100/medicationdispense/extension)
* [medicationdispense\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medicationdispense/extension_vcc_coding)
* **medicationdispense\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Reference Table:**
The `medicationdispense_references` table contains normalized references from the medication dispense to other entities. It supports the following reference properties:
* **medication\_reference**: links to the [medication](/medical-api/handling-data/schema-v100/medication/base) that was dispensed
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base) who received the medication
* **performer.actor**: links to [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) or [organization](/medical-api/handling-data/schema-v100/organization/base) per `reference_type`
For detailed information about reference table structure and indexing, see the [Reference Tables documentation](/medical-api/handling-data/schema-v100/reference_tables).
**Primary Keys:**
* medicationdispense\_id
**Foreign Keys:**
* patient\_id – links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table
* medication\_id – links to the [medication](/medical-api/handling-data/schema-v100/medication/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| medicationdispense\_id | varchar | Unique identifier for the medication dispense |
| patient\_id | varchar | Unique identifier for the patient (subject) |
| medication\_id | varchar | Reference to the dispensed medication |
| status | varchar | Status of the dispense (e.g. preparation, in-progress, completed, cancelled, on-hold, entered-in-error, stopped, declined, unknown) |
| whenhandedover | datetime | Date/time the medication was handed over |
| whenprepared | datetime | Date/time the medication was prepared |
| quantity\_unit | varchar | Unit of quantity dispensed |
| quantity\_value | varchar | Quantity dispensed |
| dayssupply\_unit | varchar | Unit for days supply |
| dayssupply\_value | varchar | Number of days supply |
| note\_text† | varchar | Additional notes about the dispense (first note) |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source derived from FHIR extension |
**Related Tables:**
**Parent:**
* [medication](/medical-api/handling-data/schema-v100/medication/base)
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [medicationdispense\_extension](/medical-api/handling-data/schema-v100/medicationdispense/extension)
## Version diff
**Renamed**
* `medication_dispense_id` → `medicationdispense_id`
* `when_handed_over` → `whenhandedover`
* `when_prepared` → `whenprepared`
* `days_supply_unit` → `dayssupply_unit`
* `data_source` → `meta_source`
# medicationdispense_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medicationdispense/extension
Normalized `MedicationDispense.extension[]` property on the [MedicationDispense](https://hl7.org/fhir/R4/medicationdispense.html) FHIR resource.
**Primary Keys:**
* medicationdispense\_extension\_id
**Foreign Keys:**
* medicationdispense\_id - links to the [medicationdispense](/medical-api/handling-data/schema-v100/medicationdispense/base) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------- | --------- | ------------------------------------------------------ |
| medicationdispense\_extension\_id | varchar | Unique identifier for the extension row |
| medicationdispense\_id | varchar | FK to the parent medicationdispense record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [medicationdispense](/medical-api/handling-data/schema-v100/medicationdispense/base)
**Child:**
* [medicationdispense\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medicationdispense/extension_vcc_coding)
# medicationdispense_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medicationdispense/extension_vcc_coding
Normalized `MedicationDispense.extension[].valueCodeableConcept.coding[]` property on the [MedicationDispense](https://hl7.org/fhir/R4/medicationdispense.html) FHIR resource.
**Primary Keys:**
* medicationdispense\_extension\_vcc\_coding\_id
**Foreign Keys:**
* medicationdispense\_extension\_id - links to the [medicationdispense\_extension](/medical-api/handling-data/schema-v100/medicationdispense/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------------------- | --------- | --------------------------------------------------- |
| medicationdispense\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| medicationdispense\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [medicationdispense\_extension](/medical-api/handling-data/schema-v100/medicationdispense/extension)
# medicationrequest
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medicationrequest/base
An order or request for both supply of the medication and the instructions for administration of the medication to a patient. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/medicationrequest.html) for full details.
**Previous version:** [medication\_request](/medical-api/handling-data/schema-v000/medication-request)
**Tables in this resource:**
* **medicationrequest** – Main medication request record (this page)
* [medicationrequest\_extension](/medical-api/handling-data/schema-v100/medicationrequest/extension)
* [medicationrequest\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medicationrequest/extension_vcc_coding)
* **medicationrequest\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Reference Table:**
The `medicationrequest_references` table contains normalized references from the medication request to other entities. It supports the following reference properties:
* **medication\_reference** (required): links to the medication that was requested
* **subject** (required): links to the patient for whom the medication was requested
* **encounter**: links to the encounter where the request was made
* **requester**: links to the practitioner who made the request
* **reasonReference**: links to conditions or other reasons for the medication request
For detailed information about reference table structure and indexing, see the [Reference Tables documentation](/medical-api/handling-data/schema-v100/reference_tables).
**Primary Keys:**
* medicationrequest\_id
**Foreign Keys:**
* patient\_id – links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table (subject)
* medication\_id – links to the [medication](/medical-api/handling-data/schema-v100/medication/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------------------------- | --------- | --------------------------------------------------------- |
| medicationrequest\_id | varchar | Unique identifier for the medication request |
| patient\_id | varchar | Unique identifier for the patient (subject) |
| medication\_id | varchar | Reference to the requested medication |
| status | varchar | Status of the request (e.g. active, completed, cancelled) |
| authoredon | datetime | Date/time the request was authored |
| dosageinstruction\_doseandrate\_dosequantity\_unit | varchar | Unit for the prescribed dose quantity |
| dosageinstruction\_doseandrate\_dosequantity\_amount | varchar | Prescribed dose quantity |
| intent | varchar | Intent of the request (e.g. order, plan) |
| note\_text† | varchar | Additional notes about the request (first note) |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source derived from FHIR extension |
**Related Tables:**
**Parent:**
* [medication](/medical-api/handling-data/schema-v100/medication/base)
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [medicationrequest\_extension](/medical-api/handling-data/schema-v100/medicationrequest/extension)
## Version diff
**Renamed**
* `medication_request_id` → `medicationrequest_id`
* `authored_on` → `authoredon`
* `data_source` → `meta_source`
# medicationrequest_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medicationrequest/extension
Normalized `MedicationRequest.extension[]` property on the [MedicationRequest](https://hl7.org/fhir/R4/medicationrequest.html) FHIR resource.
**Primary Keys:**
* medicationrequest\_extension\_id
**Foreign Keys:**
* medicationrequest\_id - links to the [medicationrequest](/medical-api/handling-data/schema-v100/medicationrequest/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------------- | --------- | ------------------------------------------------------ |
| medicationrequest\_extension\_id | varchar | Unique identifier for the extension row |
| medicationrequest\_id | varchar | FK to the parent medicationrequest record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [medicationrequest](/medical-api/handling-data/schema-v100/medicationrequest/base)
**Child:**
* [medicationrequest\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medicationrequest/extension_vcc_coding)
# medicationrequest_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medicationrequest/extension_vcc_coding
Normalized `MedicationRequest.extension[].valueCodeableConcept.coding[]` property on the [MedicationRequest](https://hl7.org/fhir/R4/medicationrequest.html) FHIR resource.
**Primary Keys:**
* medicationrequest\_extension\_vcc\_coding\_id
**Foreign Keys:**
* medicationrequest\_extension\_id - links to the [medicationrequest\_extension](/medical-api/handling-data/schema-v100/medicationrequest/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------------------- | --------- | --------------------------------------------------- |
| medicationrequest\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| medicationrequest\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [medicationrequest\_extension](/medical-api/handling-data/schema-v100/medicationrequest/extension)
# medicationstatement
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medicationstatement/base
A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/medicationstatement.html) for full details.
**Previous version:** [medication\_statement](/medical-api/handling-data/schema-v000/medication-statement)
**Tables in this resource:**
* **medicationstatement** – Main medication statement record (this page)
* [medicationstatement\_dosage](/medical-api/handling-data/schema-v100/medicationstatement/dosage) – Dosage instructions per statement
* [medicationstatement\_dosage\_doseandrate](/medical-api/handling-data/schema-v100/medicationstatement/dosage_doseandrate) – Dose/rate quantities per dosage
* [medicationstatement\_dosage\_route\_coding](/medical-api/handling-data/schema-v100/medicationstatement/dosage_route_coding)
* [medicationstatement\_extension](/medical-api/handling-data/schema-v100/medicationstatement/extension)
* [medicationstatement\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medicationstatement/extension_vcc_coding)
* **medicationstatement\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Reference Table:**
The `medicationstatement_references` table contains normalized references from the medication statement to other entities. It supports the following reference properties:
* **medication\_reference** (required): links to the medication being taken
* **subject** (required): links to the patient who is taking the medication
For detailed information about reference table structure and indexing, see the [Reference Tables documentation](/medical-api/handling-data/schema-v100/reference_tables).
**Primary Keys:**
* medicationstatement\_id
**Foreign Keys:**
* patient\_id – links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table
* medication\_id – links to the [medication](/medical-api/handling-data/schema-v100/medication/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------ |
| medicationstatement\_id | varchar | Unique identifier for the medication statement |
| patient\_id | varchar | Unique identifier for the patient (subject) |
| medication\_id | varchar | Reference to the medication |
| status | varchar | Status of the statement (e.g. active, completed, entered-in-error, intended, stopped, on-hold, unknown, not-taken) |
| effectivedatetime | datetime | Effective date/time if provided directly |
| effectiveperiod\_start | datetime | Start of effective period |
| effective\_date† | datetime | Coalesced effective date (effectivedatetime or effectiveperiod\_start) |
| effectiveperiod\_end | datetime | End of effective period |
| dosage\_doseandrate\_dosequantity\_unit | varchar | Unit for the dose quantity |
| dosage\_doseandrate\_dosequantity\_value | varchar | Dose quantity value |
| note\_text† | varchar | Additional notes about the statement (first note) |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source derived from FHIR extension |
**Related Tables:**
**Parent:**
* [medication](/medical-api/handling-data/schema-v100/medication/base)
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [medicationstatement\_dosage](/medical-api/handling-data/schema-v100/medicationstatement/dosage)
* [medicationstatement\_extension](/medical-api/handling-data/schema-v100/medicationstatement/extension)
## Version diff
**Renamed**
* `medication_statement_id` → `medicationstatement_id`
* `data_source` → `meta_source`
# medicationstatement_dosage
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medicationstatement/dosage
Indicates how the medication is/was or should be taken by the patient (`MedicationStatement.dosage[]`).
**Primary Keys:**
* medicationstatement\_dosage\_id
**Foreign Keys:**
* medicationstatement\_id - links to the [medicationstatement](/medical-api/handling-data/schema-v100/medicationstatement/base) table
| Column | Data Type | Description |
| ------------------------------- | --------- | ------------------------------------------- |
| medicationstatement\_dosage\_id | varchar | Unique identifier for the dosage row |
| medicationstatement\_id | varchar | FK to the parent medicationstatement record |
| route\_text | varchar | Free-text route of administration |
| text | varchar | Free-text dosage instructions |
**Related Tables:**
**Parent:**
* [medicationstatement](/medical-api/handling-data/schema-v100/medicationstatement/base)
**Child:**
* [medicationstatement\_dosage\_doseandrate](/medical-api/handling-data/schema-v100/medicationstatement/dosage_doseandrate)
* [medicationstatement\_dosage\_route\_coding](/medical-api/handling-data/schema-v100/medicationstatement/dosage_route_coding)
# medicationstatement_dosage_doseandrate
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medicationstatement/dosage_doseandrate
The amount of medication administered per dose (`MedicationStatement.dosage.doseAndRate[]`).
**Primary Keys:**
* medicationstatement\_dosage\_doseandrate\_id
**Foreign Keys:**
* medicationstatement\_dosage\_id - links to the [medicationstatement\_dosage](/medical-api/handling-data/schema-v100/medicationstatement/dosage) table
| Column | Data Type | Description |
| -------------------------------------------- | --------- | --------------------------------------------------- |
| medicationstatement\_dosage\_doseandrate\_id | varchar | Unique identifier for the row |
| medicationstatement\_dosage\_id | varchar | FK to the parent medicationstatement\_dosage record |
| dosequantity\_amount | varchar | Dose amount value |
| dosequantity\_unit | varchar | Dose amount unit |
| doserange\_low\_amount | varchar | Low bound of dose range |
| doserange\_low\_unit | varchar | Unit for dose range low |
| doserange\_high\_amount | varchar | High bound of dose range |
| doserange\_high\_unit | varchar | Unit for dose range high |
**Related Tables:**
**Parent:**
* [medicationstatement\_dosage](/medical-api/handling-data/schema-v100/medicationstatement/dosage)
# medicationstatement_dosage_route_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medicationstatement/dosage_route_coding
Normalized `MedicationStatement.dosage[].route.coding[]` property on the [MedicationStatement](https://hl7.org/fhir/R4/medicationstatement.html) FHIR resource.
**Primary Keys:**
* medicationstatement\_dosage\_route\_coding\_id
**Foreign Keys:**
* medicationstatement\_dosage\_id - links to the [medicationstatement\_dosage](/medical-api/handling-data/schema-v100/medicationstatement/dosage) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------------------- | --------- | --------------------------------------------------- |
| medicationstatement\_dosage\_route\_coding\_id | varchar | Unique identifier for the coding row |
| medicationstatement\_dosage\_id | varchar | FK to the parent medicationstatement\_dosage record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [medicationstatement\_dosage](/medical-api/handling-data/schema-v100/medicationstatement/dosage)
# medicationstatement_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medicationstatement/extension
Normalized `MedicationStatement.extension[]` property on the [MedicationStatement](https://hl7.org/fhir/R4/medicationstatement.html) FHIR resource.
**Primary Keys:**
* medicationstatement\_extension\_id
**Foreign Keys:**
* medicationstatement\_id - links to the [medicationstatement](/medical-api/handling-data/schema-v100/medicationstatement/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------- | --------- | ------------------------------------------------------ |
| medicationstatement\_extension\_id | varchar | Unique identifier for the extension row |
| medicationstatement\_id | varchar | FK to the parent medicationstatement record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [medicationstatement](/medical-api/handling-data/schema-v100/medicationstatement/base)
**Child:**
* [medicationstatement\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medicationstatement/extension_vcc_coding)
# medicationstatement_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/medicationstatement/extension_vcc_coding
Normalized `MedicationStatement.extension[].valueCodeableConcept.coding[]` property on the [MedicationStatement](https://hl7.org/fhir/R4/medicationstatement.html) FHIR resource.
**Primary Keys:**
* medicationstatement\_extension\_vcc\_coding\_id
**Foreign Keys:**
* medicationstatement\_extension\_id - links to the [medicationstatement\_extension](/medical-api/handling-data/schema-v100/medicationstatement/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------------------------- | --------- | --------------------------------------------------- |
| medicationstatement\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| medicationstatement\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [medicationstatement\_extension](/medical-api/handling-data/schema-v100/medicationstatement/extension)
# observation
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/observation/base
Measurements and simple assertions made about a patient, device or other subject. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/observation.html) for full details.
**Previous version:** [observation](/medical-api/handling-data/schema-v000/observation)
**Tables in this resource:**
* **observation** – Main observation record (this page)
* [observation\_category](/medical-api/handling-data/schema-v100/observation/category) – Backbone for category
* [observation\_category\_coding](/medical-api/handling-data/schema-v100/observation/category_coding)
* [observation\_code\_coding](/medical-api/handling-data/schema-v100/observation/code_coding)
* [observation\_interpretation](/medical-api/handling-data/schema-v100/observation/interpretation) – Interpretation per observation (text)
* [observation\_interpretation\_coding](/medical-api/handling-data/schema-v100/observation/interpretation_coding)
* [observation\_bodysite\_coding](/medical-api/handling-data/schema-v100/observation/bodysite_coding)
* [observation\_referencerange](/medical-api/handling-data/schema-v100/observation/referencerange) – Reference ranges per observation
* [observation\_vcc\_coding](/medical-api/handling-data/schema-v100/observation/vcc_coding) – valueCodeableConcept.coding\[] entries
* [observation\_extension](/medical-api/handling-data/schema-v100/observation/extension)
* [observation\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/observation/extension_vcc_coding)
* **observation\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Reference Table:**
The `observation_references` table contains normalized references from the observation to other entities. It supports the following reference properties:
* **subject** (required): links to the patient who is the subject of the observation
* **encounter**: links to the encounter where the observation was made
* **performer**: links to practitioners who performed the observation
For detailed information about reference table structure and indexing, see the [Reference Tables documentation](/medical-api/handling-data/schema-v100/reference_tables).
**Primary Keys:**
* observation\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table (subject)
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------- | --------- | ---------------------------------------------------------------------- |
| observation\_id | varchar | Unique identifier for the observation |
| patient\_id | varchar | Unique identifier for the patient (subject) |
| status | varchar | Status of the observation (e.g. final, preliminary) |
| effectivedatetime | datetime | Effective date/time if provided directly |
| effectiveperiod\_start | datetime | Start of effective period |
| effective\_date† | datetime | Coalesced effective date (effectivedatetime or effectiveperiod\_start) |
| effectiveperiod\_end | datetime | End of effective period |
| code\_text | varchar | Free-text description of the observation type |
| code\_loinc\_code† | varchar | LOINC code for the observation |
| code\_loinc\_display† | varchar | Human-readable LOINC description |
| valuequantity\_value | varchar | Quantity value when observation value is a Quantity |
| valuequantity\_comparator | varchar | Comparator for quantity value (e.g. \<, \<=, >=, >) |
| valuestring | varchar | String value when observation value is a string |
| valuecodeableconcept\_text | varchar | Text when observation value is a CodeableConcept |
| value† | varchar | Coalesced value (quantity, string, or codeable concept text) |
| valuerange\_high\_value | varchar | High value when the observation value is a Range |
| valuerange\_high\_unit | varchar | Unit for high range value |
| valuerange\_low\_value | varchar | Low value when the observation value is a Range |
| valuerange\_low\_unit | varchar | Unit for low range value |
| valuequantity\_unit | varchar | Unit when observation value is a Quantity |
| units† | varchar | Coalesced unit of measurement |
| referencerange\_low\_value† | varchar | Lower bound of the reference range (first range) |
| referencerange\_high\_value† | varchar | Upper bound of the reference range (first range) |
| interpretation\_hl7\_code† | varchar | HL7 interpretation code (ObservationInterpretation) |
| interpretation\_hl7\_display† | varchar | Human-readable description of HL7 interpretation |
| category\_hl7\_code† | varchar | HL7 category code (observation-category, preferred binding) |
| category\_hl7\_display† | varchar | Human-readable description of HL7 category |
| bodysite\_text | varchar | Free-text body site |
| note\_text† | varchar | Additional notes about the observation (first note) |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [observation\_bodysite\_coding](/medical-api/handling-data/schema-v100/observation/bodysite_coding)
* [observation\_category](/medical-api/handling-data/schema-v100/observation/category)
* [observation\_code\_coding](/medical-api/handling-data/schema-v100/observation/code_coding)
* [observation\_extension](/medical-api/handling-data/schema-v100/observation/extension)
* [observation\_interpretation](/medical-api/handling-data/schema-v100/observation/interpretation)
* [observation\_interpretation\_coding](/medical-api/handling-data/schema-v100/observation/interpretation_coding)
* [observation\_referencerange](/medical-api/handling-data/schema-v100/observation/referencerange)
## Version diff
**Renamed**
* `end_date` → `effectiveperiod_end`
* `reference_range_low` → `referencerange_low_value`
* `reference_range_high` → `referencerange_high_value`
* `loinc_code` → `code_loinc_code`
* `loinc_display` → `code_loinc_display`
* `data_source` → `meta_source`
**Moved to separate tables**
* `bodysite_snomed_ct_code` → [`observation_bodysite_coding.code`](/medical-api/handling-data/schema-v100/observation/bodysite_coding) w/ `system = 'http://snomed.info/sct'`
* `bodysite_snomed_ct_display` → [`observation_bodysite_coding.display`](/medical-api/handling-data/schema-v100/observation/bodysite_coding) w/ `system = 'http://snomed.info/sct'`
* `source_code_code` → [`observation_code_coding.code`](/medical-api/handling-data/schema-v100/observation/code_coding) w/ `code_rank = 1`
* `source_code_display` → [`observation_code_coding.display`](/medical-api/handling-data/schema-v100/observation/code_coding) w/ `code_rank = 1`
* `source_code_system` → [`observation_code_coding.system`](/medical-api/handling-data/schema-v100/observation/code_coding) w/ `code_rank = 1`
# observation_bodysite_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/observation/bodysite_coding
Normalized `Observation.bodySite[].coding[]` property on the [Observation](https://hl7.org/fhir/R4/observation.html) FHIR resource.
**Primary Keys:**
* observation\_bodysite\_coding\_id
**Foreign Keys:**
* observation\_id - links to the [observation](/medical-api/handling-data/schema-v100/observation/base) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------- | --------- | ------------------ |
| observation\_bodysite\_coding\_id | varchar | Unique identifier |
| observation\_id | varchar | Parent observation |
| code\_rank† | int | 1-based index |
| code | varchar | Code value |
| display | varchar | Display |
| system | varchar | Code system URI |
**Related Tables:**
**Parent:**
* [observation](/medical-api/handling-data/schema-v100/observation/base)
# observation_category
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/observation/category
A code that classifies the general type of observation being made (`Observation.category[]`).
**Primary Keys:**
* observation\_category\_id
**Foreign Keys:**
* observation\_id - links to the [observation](/medical-api/handling-data/schema-v100/observation/base) table
| Column | Data Type | Description |
| ------------------------- | --------- | -------------------------------------- |
| observation\_category\_id | varchar | Unique identifier for the category row |
| observation\_id | varchar | FK to the parent observation record |
| category\_text | varchar | Display text for the category |
**Related Tables:**
**Parent:**
* [observation](/medical-api/handling-data/schema-v100/observation/base)
**Child:**
* [observation\_category\_coding](/medical-api/handling-data/schema-v100/observation/category_coding)
# observation_category_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/observation/category_coding
Normalized `Observation.category[].coding[]` property on the [Observation](https://hl7.org/fhir/R4/observation.html) FHIR resource.
**Primary Keys:**
* observation\_category\_coding\_id
**Foreign Keys:**
* observation\_category\_id - links to the [observation\_category](/medical-api/handling-data/schema-v100/observation/category) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------- | --------- | --------------------------------------------- |
| observation\_category\_coding\_id | varchar | Unique identifier |
| observation\_category\_id | varchar | FK to the parent observation\_category record |
| code\_rank† | int | 1-based index |
| code | varchar | Code value |
| display | varchar | Display |
| system | varchar | Code system URI |
**Related Tables:**
**Parent:**
* [observation\_category](/medical-api/handling-data/schema-v100/observation/category)
# observation_code_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/observation/code_coding
Normalized `Observation.code.coding[]` property on the [Observation](https://hl7.org/fhir/R4/observation.html) FHIR resource.
**Primary Keys:**
* observation\_code\_coding\_id
**Foreign Keys:**
* observation\_id - links to the [observation](/medical-api/handling-data/schema-v100/observation/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------- | --------- | ------------------------------------ |
| observation\_code\_coding\_id | varchar | Unique identifier for the coding row |
| observation\_id | varchar | Parent observation |
| code\_rank† | int | 1-based index |
| code | varchar | Code value |
| display | varchar | Human-readable display |
| system | varchar | Code system URI |
**Related Tables:**
**Parent:**
* [observation](/medical-api/handling-data/schema-v100/observation/base)
# observation_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/observation/extension
Normalized `Observation.extension[]` property on the [Observation](https://hl7.org/fhir/R4/observation.html) FHIR resource.
**Primary Keys:**
* observation\_extension\_id
**Foreign Keys:**
* observation\_id - links to the [observation](/medical-api/handling-data/schema-v100/observation/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | ------------------------------------------------------ |
| observation\_extension\_id | varchar | Unique identifier for the extension row |
| observation\_id | varchar | FK to the parent observation record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [observation](/medical-api/handling-data/schema-v100/observation/base)
**Child:**
* [observation\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/observation/extension_vcc_coding)
# observation_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/observation/extension_vcc_coding
Normalized `Observation.extension[].valueCodeableConcept.coding[]` property on the [Observation](https://hl7.org/fhir/R4/observation.html) FHIR resource.
**Primary Keys:**
* observation\_extension\_vcc\_coding\_id
**Foreign Keys:**
* observation\_extension\_id - links to the [observation\_extension](/medical-api/handling-data/schema-v100/observation/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------------- | --------- | --------------------------------------------------- |
| observation\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| observation\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [observation\_extension](/medical-api/handling-data/schema-v100/observation/extension)
# observation_interpretation
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/observation/interpretation
A categorical assessment of an observation value, such as high, low, or normal (`Observation.interpretation[]`).
**Primary Keys:**
* observation\_interpretation\_id
**Foreign Keys:**
* observation\_id - links to the [observation](/medical-api/handling-data/schema-v100/observation/base) table
| Column | Data Type | Description |
| ------------------------------- | --------- | ---------------------------------------------------- |
| observation\_interpretation\_id | varchar | Unique identifier for the interpretation row |
| observation\_id | varchar | Parent observation |
| text | varchar | Text for the interpretation (`CodeableConcept.text`) |
**Related Tables:**
**Parent:**
* [observation](/medical-api/handling-data/schema-v100/observation/base)
**Child:**
* [observation\_interpretation\_coding](/medical-api/handling-data/schema-v100/observation/interpretation_coding)
# observation_interpretation_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/observation/interpretation_coding
Normalized `Observation.interpretation[].coding[]` property on the [Observation](https://hl7.org/fhir/R4/observation.html) FHIR resource.
**Primary Keys:**
* observation\_interpretation\_coding\_id
**Foreign Keys:**
* observation\_interpretation\_id - links to the [observation interpretation](/medical-api/handling-data/schema-v100/observation/interpretation) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------------- | --------- | ------------------------- |
| observation\_interpretation\_coding\_id | varchar | Unique identifier |
| observation\_interpretation\_id | varchar | Parent interpretation row |
| code\_rank† | int | 1-based index |
| code | varchar | Code value |
| display | varchar | Display |
| system | varchar | Code system URI |
**Related Tables:**
**Parent:**
* [observation\_interpretation](/medical-api/handling-data/schema-v100/observation/interpretation)
# observation_referencerange
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/observation/referencerange
Guidance on how to interpret the value by comparison to a normal or recommended range (`Observation.referenceRange[]`).
**Primary Keys:**
* observation\_referencerange\_id
**Foreign Keys:**
* observation\_id - links to the [observation](/medical-api/handling-data/schema-v100/observation/base) table
| Column | Data Type | Description |
| ------------------------------- | --------- | --------------------------------------------- |
| observation\_referencerange\_id | varchar | Unique identifier for the reference range row |
| observation\_id | varchar | Parent observation |
| low\_amount | varchar | Lower bound value |
| low\_unit | varchar | Unit for lower bound |
| high\_amount | varchar | Upper bound value |
| high\_unit | varchar | Unit for upper bound |
**Related Tables:**
**Parent:**
* [observation](/medical-api/handling-data/schema-v100/observation/base)
# organization_address
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/organization/address
An address for the organization (`Organization.address[]`).
**Primary Keys:**
* organization\_address\_id
**Foreign Keys:**
* organization\_id - links to the [organization](/medical-api/handling-data/schema-v100/organization/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------- | --------- | --------------------------------------------------------- |
| organization\_address\_id | varchar | Unique identifier for the address row |
| organization\_id | varchar | Parent organization |
| address† | varchar | First and second address lines concatenated |
| city | varchar | City name |
| district | varchar | District name (e.g., county) |
| state | varchar | State or province code |
| zip\_code | varchar | ZIP or postal code |
| country | varchar | Country code |
| lines† | array | Address lines (first through fourth lines, nulls removed) |
| address\_rank† | int | Order of this address within the organization (1-based) |
**Related Tables:**
**Parent:**
* [organization](/medical-api/handling-data/schema-v100/organization/base)
# organization
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/organization/base
A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/organization.html) for full details.
**Previous version:** [organization](/medical-api/handling-data/schema-v000/organization)
**Tables in this resource:**
* **organization** – Organization record (this page)
* [organization\_address](/medical-api/handling-data/schema-v100/organization/address) – Addresses per organization
* [organization\_telecom](/medical-api/handling-data/schema-v100/organization/telecom) – Contact details per organization
* [organization\_extension](/medical-api/handling-data/schema-v100/organization/extension)
* [organization\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/organization/extension_vcc_coding)
* **organization\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables#organization-references) (partOf)
**Primary Keys:**
* organization\_id
† Metriport Platform added
| Column | Data Type | Description |
| ------------------ | --------- | ---------------------------------------------------------------- |
| organization\_id | varchar | Unique identifier for the organization |
| name | varchar | Name of the organization |
| address† | varchar | First and second address lines concatenated (from first address) |
| city† | varchar | City (from first address) |
| state† | varchar | State or province (from first address) |
| country† | varchar | Country (from first address) |
| zip\_code† | varchar | ZIP or postal code (from first address) |
| phone† | varchar | First phone from telecom |
| email† | varchar | First email from telecom |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Child:**
* [location](/medical-api/handling-data/schema-v100/location/base)
* [organization\_address](/medical-api/handling-data/schema-v100/organization/address)
* [organization\_extension](/medical-api/handling-data/schema-v100/organization/extension)
* [organization\_telecom](/medical-api/handling-data/schema-v100/organization/telecom)
## Version diff
**Renamed**
* `address_line` → `address`
* `data_source` → `meta_source`
# organization_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/organization/extension
Normalized `Organization.extension[]` property on the [Organization](https://hl7.org/fhir/R4/organization.html) FHIR resource.
**Primary Keys:**
* organization\_extension\_id
**Foreign Keys:**
* organization\_id - links to the [organization](/medical-api/handling-data/schema-v100/organization/base) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------- | --------- | ------------------------------------------------------ |
| organization\_extension\_id | varchar | Unique identifier for the extension row |
| organization\_id | varchar | FK to the parent organization record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [organization](/medical-api/handling-data/schema-v100/organization/base)
**Child:**
* [organization\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/organization/extension_vcc_coding)
# organization_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/organization/extension_vcc_coding
Normalized `Organization.extension[].valueCodeableConcept.coding[]` property on the [Organization](https://hl7.org/fhir/R4/organization.html) FHIR resource.
**Primary Keys:**
* organization\_extension\_vcc\_coding\_id
**Foreign Keys:**
* organization\_extension\_id - links to the [organization\_extension](/medical-api/handling-data/schema-v100/organization/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------------- | --------- | --------------------------------------------------- |
| organization\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| organization\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [organization\_extension](/medical-api/handling-data/schema-v100/organization/extension)
# organization_telecom
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/organization/telecom
A contact detail for the organization (`Organization.telecom[]`). Each row is one element of the telecom array.
**Primary Keys:**
* organization\_telecom\_id
**Foreign Keys:**
* organization\_id - links to the [organization](/medical-api/handling-data/schema-v100/organization/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------- | --------- | -------------------------------------------------------------- |
| organization\_telecom\_id | varchar | Unique identifier for the telecom row |
| organization\_id | varchar | Parent organization |
| system | varchar | Contact system: e.g. phone, fax, email, pager, url, sms, other |
| use | varchar | Purpose of contact: `home`, `work`, `temp`, `old`, `mobile` |
| value | varchar | The actual phone number, email address, URL, etc. |
| telecom\_rank† | int | Stable order of this telecom within the location |
**Related Tables:**
**Parent:**
* [organization](/medical-api/handling-data/schema-v100/organization/base)
# patient_address
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/patient/address
An address for the individual (`Patient.address[]`).
**Previous version:** [patient\_address](/medical-api/handling-data/schema-v000/patient-address)
**Primary Keys:**
* patient\_address\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------- | --------- | ----------------------------------------------------------- |
| patient\_address\_id | varchar | Unique identifier for the address row |
| patient\_id | varchar | Parent patient |
| address† | varchar | First and second address lines concatenated |
| city | varchar | City name |
| district | varchar | District name (e.g., county) |
| state | varchar | State or province code |
| zip\_code | varchar | ZIP or postal code |
| country | varchar | Country code |
| lines† | array | Address lines (first through fourth lines, nulls removed) |
| address\_rank† | int | Order of this address within the patient (1-based) |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
# patient
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/patient/base
Demographics and other administrative information about an individual or animal receiving care or other health-related services. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/patient.html) for full details.
**Previous version:** [patient](/medical-api/handling-data/schema-v000/patient)
**Tables in this resource:**
* **patient** – Main patient record (this page)
* [patient\_address](/medical-api/handling-data/schema-v100/patient/address) – Address components
* [patient\_communication](/medical-api/handling-data/schema-v100/patient/communication) – Communication and language
* [patient\_communication\_language\_coding](/medical-api/handling-data/schema-v100/patient/communication_language_coding)
* [patient\_identifier](/medical-api/handling-data/schema-v100/patient/identifier) – External identifiers
* [patient\_identifier\_type\_coding](/medical-api/handling-data/schema-v100/patient/identifier_type_coding) – Type codings per identifier
* [patient\_mapping](/medical-api/handling-data/schema-v100/patient/mapping) – External ID mapping
* [patient\_name](/medical-api/handling-data/schema-v100/patient/name) – Name components
* [patient\_telecom](/medical-api/handling-data/schema-v100/patient/telecom) – Telecom (phone, email)
* [patient\_extension](/medical-api/handling-data/schema-v100/patient/extension)
* [patient\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/patient/extension_vcc_coding)
* **patient\_references** – [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables#patient-references) (managingOrganization)
**Primary Keys:**
* patient\_id
† Metriport Platform added
| Column | Data Type | Description |
| ------------------- | --------- | ---------------------------------------------------------------- |
| patient\_id | varchar | Unique identifier for the patient |
| first\_name† | varchar | First given name (from first name row) |
| last\_name† | varchar | Family name (from first name row) |
| gender | varchar | Gender |
| birthdate | date | Date of birth |
| maritalstatus\_text | varchar | Marital status as text |
| address† | varchar | First and second address lines concatenated (from first address) |
| city† | varchar | City (from first address) |
| state† | varchar | State or province (from first address) |
| country† | varchar | Country (from first address) |
| zip\_code† | varchar | ZIP or postal code (from first address) |
| email† | varchar | First email from telecom |
| phone† | varchar | First phone from telecom |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Child:**
* [allergyintolerance](/medical-api/handling-data/schema-v100/allergyintolerance/base)
* [binary](/medical-api/handling-data/schema-v100/binary)
* [careplan](/medical-api/handling-data/schema-v100/careplan/base)
* [communication](/medical-api/handling-data/schema-v100/communication/base)
* [composition](/medical-api/handling-data/schema-v100/composition/base)
* [condition](/medical-api/handling-data/schema-v100/condition/base)
* [consent](/medical-api/handling-data/schema-v100/consent/base)
* [coverage](/medical-api/handling-data/schema-v100/coverage/base)
* [diagnosticreport](/medical-api/handling-data/schema-v100/diagnosticreport/base)
* [documentreference](/medical-api/handling-data/schema-v100/documentreference/base)
* [encounter](/medical-api/handling-data/schema-v100/encounter/base)
* [familymemberhistory](/medical-api/handling-data/schema-v100/familymemberhistory/base)
* [goal](/medical-api/handling-data/schema-v100/goal/base)
* [immunization](/medical-api/handling-data/schema-v100/immunization/base)
* [measure\_report](/medical-api/handling-data/schema-v100/measure_report)
* [medicationadministration](/medical-api/handling-data/schema-v100/medicationadministration/base)
* [medicationdispense](/medical-api/handling-data/schema-v100/medicationdispense/base)
* [medicationrequest](/medical-api/handling-data/schema-v100/medicationrequest/base)
* [medicationstatement](/medical-api/handling-data/schema-v100/medicationstatement/base)
* [observation](/medical-api/handling-data/schema-v100/observation/base)
* [patient\_address](/medical-api/handling-data/schema-v100/patient/address)
* [patient\_communication](/medical-api/handling-data/schema-v100/patient/communication)
* [patient\_extension](/medical-api/handling-data/schema-v100/patient/extension)
* [patient\_identifier](/medical-api/handling-data/schema-v100/patient/identifier)
* [patient\_mapping](/medical-api/handling-data/schema-v100/patient/mapping)
* [patient\_name](/medical-api/handling-data/schema-v100/patient/name)
* [patient\_telecom](/medical-api/handling-data/schema-v100/patient/telecom)
* [procedure](/medical-api/handling-data/schema-v100/procedure/base)
* [servicerequest](/medical-api/handling-data/schema-v100/servicerequest/base)
## Version diff
**Renamed**
* `birth_date` → `birthdate`
* `data_source` → `meta_source`
# patient_communication
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/patient/communication
A language which may be used to communicate with the patient about his or her health (`Patient.communication[]`).
**Primary Keys:**
* patient\_communication\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table
| Column | Data Type | Description |
| -------------------------- | --------- | ---------------------------------------------------------- |
| patient\_communication\_id | varchar | Unique identifier for the communication row |
| patient\_id | varchar | Parent patient |
| language\_text | varchar | Language for communication (`Communication.language.text`) |
| preferred | varchar | Whether this is the preferred communication |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [patient\_communication\_language\_coding](/medical-api/handling-data/schema-v100/patient/communication_language_coding)
# patient_communication_language_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/patient/communication_language_coding
Normalized `Patient.communication[].language.coding[]` property on the [Patient](https://hl7.org/fhir/R4/patient.html) FHIR resource.
**Primary Keys:**
* patient\_communication\_language\_coding\_id
**Foreign Keys:**
* patient\_communication\_id - links to the [patient communication](/medical-api/handling-data/schema-v100/patient/communication) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------------------------- | --------- | --------------------------------------------------- |
| patient\_communication\_language\_coding\_id | varchar | Unique identifier for the coding row |
| patient\_communication\_id | varchar | FK to the parent patient\_communication record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [patient\_communication](/medical-api/handling-data/schema-v100/patient/communication)
# patient_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/patient/extension
Normalized `Patient.extension[]` property on the [Patient](https://hl7.org/fhir/R4/patient.html) FHIR resource.
**Primary Keys:**
* patient\_extension\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | ------------------------------------------------------ |
| patient\_extension\_id | varchar | Unique identifier for the extension row |
| patient\_id | varchar | FK to the parent patient record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [patient\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/patient/extension_vcc_coding)
# patient_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/patient/extension_vcc_coding
Normalized `Patient.extension[].valueCodeableConcept.coding[]` property on the [Patient](https://hl7.org/fhir/R4/patient.html) FHIR resource.
**Primary Keys:**
* patient\_extension\_vcc\_coding\_id
**Foreign Keys:**
* patient\_extension\_id - links to the [patient\_extension](/medical-api/handling-data/schema-v100/patient/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------------- | --------- | --------------------------------------------------- |
| patient\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| patient\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [patient\_extension](/medical-api/handling-data/schema-v100/patient/extension)
# patient_identifier
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/patient/identifier
An identifier for this patient, such as MRN or SSN (`Patient.identifier[]`).
**Primary Keys:**
* patient\_identifier\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table
| Column | Data Type | Description |
| ----------------------- | --------- | ------------------------------------------------------------ |
| patient\_identifier\_id | varchar | Unique identifier for the identifier row |
| patient\_id | varchar | Parent patient |
| system | varchar | Namespace/URI that defines the identifier value |
| value | varchar | The identifier value |
| use | varchar | Intended use of the identifier (e.g., official, usual, temp) |
| type\_text | varchar | Human-readable type description |
| period\_start | datetime | Start of the period when the identifier was valid |
| period\_end | datetime | End of the period when the identifier was valid |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [patient\_identifier\_type\_coding](/medical-api/handling-data/schema-v100/patient/identifier_type_coding)
# patient_identifier_type_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/patient/identifier_type_coding
Normalized `Patient.identifier[].type.coding[]` property on the [Patient](https://hl7.org/fhir/R4/patient.html) FHIR resource.
**Primary Keys:**
* patient\_identifier\_type\_coding\_id
**Foreign Keys:**
* patient\_identifier\_id – links to [patient\_identifier](/medical-api/handling-data/schema-v100/patient/identifier)
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------------- | --------- | ------------------------------------------------------------- |
| patient\_identifier\_type\_coding\_id | varchar | Unique identifier for the coding row |
| patient\_identifier\_id | varchar | FK to the parent patient\_identifier row |
| code\_rank† | int | 1-based position of this coding in `identifier.type.coding[]` |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [patient\_identifier](/medical-api/handling-data/schema-v100/patient/identifier)
# patient_mapping
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/patient/mapping
Cross-patient deduplication mapping for this patient record.
**Previous version:** [patient\_mapping](/medical-api/handling-data/schema-v000/patient-mapping)
**Primary Keys:**
* id
**Foreign Keys:**
* id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table (patient\_id)
† Metriport Platform added
| Column | Data Type | Description |
| ------------- | --------- | ----------------------------------------- |
| id | varchar | Metriport patient identifier |
| patient\_id | varchar | Metriport patient identifier (same as id) |
| external\_id† | varchar | Customer-provided external identifier |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
# patient_name
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/patient/name
A name associated with the individual (`Patient.name[]`).
**Previous version:** [patient\_name](/medical-api/handling-data/schema-v000/patient-name)
**Primary Keys:**
* patient\_name\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------ | --------- | ----------------------------------------------------------- |
| patient\_name\_id | varchar | Unique identifier for the name row |
| patient\_id | varchar | Parent patient |
| last\_name† | varchar | Family name (FHIR family) |
| first\_name† | varchar | First given name |
| given\_names† | array | All given names as array (nulls removed) |
| suffixes† | array | Name suffixes as array (nulls removed) |
| prefixes† | array | Name prefixes as array (nulls removed) |
| name\_rank† | int | Order of this name within the patient (1-based) |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
# patient_telecom
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/patient/telecom
A contact detail, such as a telephone number or email address, for the individual (`Patient.telecom[]`).
**Previous version:** [patient\_telecom](/medical-api/handling-data/schema-v000/patient-telecom)
**Primary Keys:**
* patient\_telecom\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------- | --------- | -------------------------------------------------------------- |
| patient\_telecom\_id | varchar | Unique identifier for the telecom row |
| patient\_id | varchar | Parent patient |
| system | varchar | Contact system: e.g. phone, fax, email, pager, url, sms, other |
| use | varchar | Purpose of contact: `home`, `work`, `temp`, `old`, `mobile` |
| value | varchar | The actual phone number, email address, URL, etc. |
| telecom\_rank† | int | Stable order of this telecom within the location |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
# practitioner_address
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/practitioner/address
Address(es) of the practitioner that are not role specific (`Practitioner.address[]`).
**Primary Keys:**
* practitioner\_address\_id
**Foreign Keys:**
* practitioner\_id - links to the [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------- | --------- | --------------------------------------------------------- |
| practitioner\_address\_id | varchar | Unique identifier for the address row |
| practitioner\_id | varchar | Parent practitioner |
| address† | varchar | First and second address lines concatenated |
| city | varchar | City name |
| district | varchar | District name (e.g., county) |
| state | varchar | State or province code |
| zip\_code | varchar | ZIP or postal code |
| country | varchar | Country code |
| lines† | array | Address lines (first through fourth lines, nulls removed) |
| address\_rank† | int | Order of this address within the practitioner (1-based) |
**Related Tables:**
**Parent:**
* [practitioner](/medical-api/handling-data/schema-v100/practitioner/base)
# practitioner
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/practitioner/base
A person who is directly or indirectly involved in the provisioning of healthcare. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/practitioner.html) for full details.
**Previous version:** [practitioner](/medical-api/handling-data/schema-v000/practitioner)
**Tables in this resource:**
* **practitioner** – Practitioner record (this page)
* [practitioner\_address](/medical-api/handling-data/schema-v100/practitioner/address) – Addresses per practitioner
* [practitioner\_name](/medical-api/handling-data/schema-v100/practitioner/name) – Names per practitioner
* [practitioner\_telecom](/medical-api/handling-data/schema-v100/practitioner/telecom) – Contact details per practitioner
* [practitioner\_qualification](/medical-api/handling-data/schema-v100/practitioner/qualification) – Qualifications per practitioner
* [practitioner\_qualification\_code\_coding](/medical-api/handling-data/schema-v100/practitioner/qualification_code_coding)
* [practitioner\_extension](/medical-api/handling-data/schema-v100/practitioner/extension)
* [practitioner\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/practitioner/extension_vcc_coding)
**Primary Keys:**
* practitioner\_id
† Metriport Platform added
| Column | Data Type | Description |
| ------------------ | --------- | ---------------------------------------------------------------- |
| practitioner\_id | varchar | Unique identifier for the practitioner |
| first\_name† | varchar | First given name (from first name row) |
| last\_name† | varchar | Family name (from first name row) |
| address† | varchar | First and second address lines concatenated (from first address) |
| city† | varchar | City (from first address) |
| state† | varchar | State or province (from first address) |
| country† | varchar | Country (from first address) |
| zip\_code† | varchar | ZIP or postal code (from first address) |
| email† | varchar | First email from telecom |
| phone† | varchar | First phone from telecom |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Child:**
* [practitioner\_address](/medical-api/handling-data/schema-v100/practitioner/address)
* [practitioner\_extension](/medical-api/handling-data/schema-v100/practitioner/extension)
* [practitioner\_name](/medical-api/handling-data/schema-v100/practitioner/name)
* [practitioner\_qualification](/medical-api/handling-data/schema-v100/practitioner/qualification)
* [practitioner\_telecom](/medical-api/handling-data/schema-v100/practitioner/telecom)
## Version diff
**Renamed**
* `data_source` → `meta_source`
**Deprecated**
* `specialty` — query from `practitioner_qualification_code_coding` with `code_rank = 1`
# practitioner_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/practitioner/extension
Normalized `Practitioner.extension[]` property on the [Practitioner](https://hl7.org/fhir/R4/practitioner.html) FHIR resource.
**Primary Keys:**
* practitioner\_extension\_id
**Foreign Keys:**
* practitioner\_id - links to the [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------- | --------- | ------------------------------------------------------ |
| practitioner\_extension\_id | varchar | Unique identifier for the extension row |
| practitioner\_id | varchar | FK to the parent practitioner record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [practitioner](/medical-api/handling-data/schema-v100/practitioner/base)
**Child:**
* [practitioner\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/practitioner/extension_vcc_coding)
# practitioner_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/practitioner/extension_vcc_coding
Normalized `Practitioner.extension[].valueCodeableConcept.coding[]` property on the [Practitioner](https://hl7.org/fhir/R4/practitioner.html) FHIR resource.
**Primary Keys:**
* practitioner\_extension\_vcc\_coding\_id
**Foreign Keys:**
* practitioner\_extension\_id - links to the [practitioner\_extension](/medical-api/handling-data/schema-v100/practitioner/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------------------- | --------- | --------------------------------------------------- |
| practitioner\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| practitioner\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [practitioner\_extension](/medical-api/handling-data/schema-v100/practitioner/extension)
# practitioner_name
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/practitioner/name
The name(s) associated with the practitioner (`Practitioner.name[]`).
**Primary Keys:**
* practitioner\_name\_id
**Foreign Keys:**
* practitioner\_id - links to the [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------- | --------- | ---------------------------------------------------- |
| practitioner\_name\_id | varchar | Unique identifier for the name row |
| practitioner\_id | varchar | Parent practitioner |
| last\_name† | varchar | Family name (FHIR family) |
| first\_name† | varchar | First given name |
| given\_names† | array | All given names as array (nulls removed) |
| suffixes† | array | Name suffixes as array (nulls removed) |
| prefixes† | array | Name prefixes as array (nulls removed) |
| name\_rank† | int | Order of this name within the practitioner (1-based) |
**Related Tables:**
**Parent:**
* [practitioner](/medical-api/handling-data/schema-v100/practitioner/base)
# practitioner_qualification
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/practitioner/qualification
The official certifications, training, and licenses that authorize or otherwise pertain to the provision of care by the practitioner (`Practitioner.qualification[]`).
**Primary Keys:**
* practitioner\_qualification\_id
**Foreign Keys:**
* practitioner\_id - links to the [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) table
| Column | Data Type | Description |
| ------------------------------- | --------- | ------------------------------------------------------------------------------------------- |
| practitioner\_qualification\_id | varchar | Unique identifier for the qualification row |
| practitioner\_id | varchar | Parent practitioner |
| code\_text | varchar | Free-text description of the qualification (`CodeableConcept.text` on `qualification.code`) |
**Related Tables:**
**Parent:**
* [practitioner](/medical-api/handling-data/schema-v100/practitioner/base)
**Child:**
* [practitioner\_qualification\_code\_coding](/medical-api/handling-data/schema-v100/practitioner/qualification_code_coding)
# practitioner_qualification_code_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/practitioner/qualification_code_coding
Normalized `Practitioner.qualification[].code.coding[]` property on the [Practitioner](https://hl7.org/fhir/R4/practitioner.html) FHIR resource.
**Primary Keys:**
* practitioner\_qualification\_code\_coding\_id
**Foreign Keys:**
* practitioner\_qualification\_id - links to the [practitioner qualification](/medical-api/handling-data/schema-v100/practitioner/qualification) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------------------- | --------- | --------------------------------------------------- |
| practitioner\_qualification\_code\_coding\_id | varchar | Unique identifier for the coding row |
| practitioner\_qualification\_id | varchar | FK to the parent practitioner\_qualification record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [practitioner\_qualification](/medical-api/handling-data/schema-v100/practitioner/qualification)
# practitioner_telecom
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/practitioner/telecom
A contact detail for the practitioner, e.g. a telephone number or an email address (`Practitioner.telecom[]`).
**Primary Keys:**
* practitioner\_telecom\_id
**Foreign Keys:**
* practitioner\_id - links to the [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------- | --------- | -------------------------------------------------------------- |
| practitioner\_telecom\_id | varchar | Unique identifier for the telecom row |
| practitioner\_id | varchar | Parent practitioner |
| system | varchar | Contact system: e.g. phone, fax, email, pager, url, sms, other |
| use | varchar | Purpose of contact: `home`, `work`, `temp`, `old`, `mobile` |
| value | varchar | The actual phone number, email address, URL, etc. |
| telecom\_rank† | int | Stable order of this telecom within the location |
**Related Tables:**
**Parent:**
* [practitioner](/medical-api/handling-data/schema-v100/practitioner/base)
# procedure
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/procedure/base
An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/procedure.html) for full details.
**Previous version:** [procedure](/medical-api/handling-data/schema-v000/procedure)
**Tables in this resource:**
* **procedure** – Main procedure record (this page)
* [procedure\_code\_coding](/medical-api/handling-data/schema-v100/procedure/code_coding)
* [procedure\_bodysite](/medical-api/handling-data/schema-v100/procedure/bodysite) – Backbone for body site
* [procedure\_bodysite\_coding](/medical-api/handling-data/schema-v100/procedure/bodysite_coding)
* [procedure\_reasoncode](/medical-api/handling-data/schema-v100/procedure/reasoncode) – Backbone for reason code
* [procedure\_reasoncode\_coding](/medical-api/handling-data/schema-v100/procedure/reasoncode_coding)
* [procedure\_note](/medical-api/handling-data/schema-v100/procedure/note) – Notes per procedure
* [procedure\_extension](/medical-api/handling-data/schema-v100/procedure/extension)
* [procedure\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/procedure/extension_vcc_coding)
* **procedure\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Primary Keys:**
* procedure\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table (subject)
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------- | --------- | ---------------------------------------------------------------------- |
| procedure\_id | varchar | Unique identifier for the procedure |
| patient\_id | varchar | Unique identifier for the patient (subject) |
| status | varchar | Status of the procedure (e.g. completed, in-progress) |
| performeddatetime | datetime | Performed date/time if provided directly |
| performedperiod\_start | datetime | Start of performed period |
| performed\_date† | datetime | Coalesced performed date (performeddatetime or performedperiod\_start) |
| performedperiod\_end | datetime | End of performed period |
| code\_text | varchar | Free-text description of the procedure |
| code\_cpt\_code† | varchar | CPT code for the procedure |
| code\_cpt\_display† | varchar | Human-readable CPT description |
| code\_snomed\_code† | varchar | SNOMED CT code for the procedure |
| code\_snomed\_display† | varchar | Human-readable SNOMED CT description |
| note\_text† | varchar | Additional notes about the procedure (first note) |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [procedure\_bodysite](/medical-api/handling-data/schema-v100/procedure/bodysite)
* [procedure\_code\_coding](/medical-api/handling-data/schema-v100/procedure/code_coding)
* [procedure\_extension](/medical-api/handling-data/schema-v100/procedure/extension)
* [procedure\_note](/medical-api/handling-data/schema-v100/procedure/note)
* [procedure\_reasoncode](/medical-api/handling-data/schema-v100/procedure/reasoncode)
* [procedure\_reasoncode\_coding](/medical-api/handling-data/schema-v100/procedure/reasoncode_coding)
## Version diff
**Renamed**
* `end_date` → `performedperiod_end`
* `cpt_code` → `code_cpt_code`
* `cpt_display` → `code_cpt_display`
* `snomed_code` → `code_snomed_code`
* `snomed_display` → `code_snomed_display`
* `data_source` → `meta_source`
**Moved to separate tables**
* `source_code_code` → [`procedure_code_coding.code`](/medical-api/handling-data/schema-v100/procedure/code_coding) w/ `code_rank = 1`
* `source_code_display` → [`procedure_code_coding.display`](/medical-api/handling-data/schema-v100/procedure/code_coding) w/ `code_rank = 1`
* `source_code_system` → [`procedure_code_coding.system`](/medical-api/handling-data/schema-v100/procedure/code_coding) w/ `code_rank = 1`
* `bodysite_snomed_code` → [`procedure_bodysite_coding.code`](/medical-api/handling-data/schema-v100/procedure/bodysite_coding) w/ `system = 'http://snomed.info/sct'`
* `bodysite_snomed_display` → [`procedure_bodysite_coding.display`](/medical-api/handling-data/schema-v100/procedure/bodysite_coding) w/ `system = 'http://snomed.info/sct'`
* `source_bodysite_code` → [`procedure_bodysite_coding.code`](/medical-api/handling-data/schema-v100/procedure/bodysite_coding) w/ `code_rank = 1`
* `source_bodysite_display` → [`procedure_bodysite_coding.display`](/medical-api/handling-data/schema-v100/procedure/bodysite_coding) w/ `code_rank = 1`
* `source_bodysite_system` → [`procedure_bodysite_coding.system`](/medical-api/handling-data/schema-v100/procedure/bodysite_coding) w/ `code_rank = 1`
* `source_reason_code` → [`procedure_reasoncode_coding.code`](/medical-api/handling-data/schema-v100/procedure/reasoncode_coding) w/ `code_rank = 1`
* `source_reason_display` → [`procedure_reasoncode_coding.display`](/medical-api/handling-data/schema-v100/procedure/reasoncode_coding) w/ `code_rank = 1`
* `source_reason_system` → [`procedure_reasoncode_coding.system`](/medical-api/handling-data/schema-v100/procedure/reasoncode_coding) w/ `code_rank = 1`
* `reason_snomed_code` → [`procedure_reasoncode_coding.code`](/medical-api/handling-data/schema-v100/procedure/reasoncode_coding) (deprecated SQL column on base table; filter by `system` as needed)
* `reason_snomed_display` → [`procedure_reasoncode_coding.display`](/medical-api/handling-data/schema-v100/procedure/reasoncode_coding) (same)
* `reasoncode_snomed_code` → [`procedure_reasoncode_coding.code`](/medical-api/handling-data/schema-v100/procedure/reasoncode_coding) (preferred base-table snapshot; filter by `system` as needed)
* `reasoncode_snomed_display` → [`procedure_reasoncode_coding.display`](/medical-api/handling-data/schema-v100/procedure/reasoncode_coding) (same)
# procedure_bodysite
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/procedure/bodysite
Detailed and structured anatomical location information (`Procedure.bodySite[]`).
**Primary Keys:**
* procedure\_bodysite\_id
**Foreign Keys:**
* procedure\_id - links to the [procedure](/medical-api/handling-data/schema-v100/procedure/base) table
| Column | Data Type | Description |
| ----------------------- | --------- | --------------------------------------- |
| procedure\_bodysite\_id | varchar | Unique identifier for the body site row |
| procedure\_id | varchar | FK to the parent procedure record |
| text | varchar | Display text for the body site |
**Related Tables:**
**Parent:**
* [procedure](/medical-api/handling-data/schema-v100/procedure/base)
**Child:**
* [procedure\_bodysite\_coding](/medical-api/handling-data/schema-v100/procedure/bodysite_coding)
# procedure_bodysite_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/procedure/bodysite_coding
Normalized `Procedure.bodySite[].coding[]` property on the [Procedure](https://hl7.org/fhir/R4/procedure.html) FHIR resource.
**Primary Keys:**
* procedure\_bodysite\_coding\_id
**Foreign Keys:**
* procedure\_bodysite\_id - links to the [procedure\_bodysite](/medical-api/handling-data/schema-v100/procedure/bodysite) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------- | --------- | ------------------------------------------- |
| procedure\_bodysite\_coding\_id | varchar | Unique identifier |
| procedure\_bodysite\_id | varchar | FK to the parent procedure\_bodysite record |
| code\_rank† | int | 1-based index |
| code | varchar | Code value |
| display | varchar | Display |
| system | varchar | Code system URI |
**Related Tables:**
**Parent:**
* [procedure\_bodysite](/medical-api/handling-data/schema-v100/procedure/bodysite)
# procedure_code_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/procedure/code_coding
Normalized `Procedure.code.coding[]` property on the [Procedure](https://hl7.org/fhir/R4/procedure.html) FHIR resource.
**Primary Keys:**
* procedure\_code\_coding\_id
**Foreign Keys:**
* procedure\_id - links to the [procedure](/medical-api/handling-data/schema-v100/procedure) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------- | --------- | ----------------- |
| procedure\_code\_coding\_id | varchar | Unique identifier |
| procedure\_id | varchar | Parent procedure |
| code\_rank† | int | 1-based index |
| code | varchar | Code value |
| display | varchar | Display |
| system | varchar | Code system URI |
**Related Tables:**
**Parent:**
* [procedure](/medical-api/handling-data/schema-v100/procedure/base)
# procedure_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/procedure/extension
Normalized `Procedure.extension[]` property on the [Procedure](https://hl7.org/fhir/R4/procedure.html) FHIR resource.
**Primary Keys:**
* procedure\_extension\_id
**Foreign Keys:**
* procedure\_id - links to the [procedure](/medical-api/handling-data/schema-v100/procedure/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | ------------------------------------------------------ |
| procedure\_extension\_id | varchar | Unique identifier for the extension row |
| procedure\_id | varchar | FK to the parent procedure record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [procedure](/medical-api/handling-data/schema-v100/procedure/base)
**Child:**
* [procedure\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/procedure/extension_vcc_coding)
# procedure_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/procedure/extension_vcc_coding
Normalized `Procedure.extension[].valueCodeableConcept.coding[]` property on the [Procedure](https://hl7.org/fhir/R4/procedure.html) FHIR resource.
**Primary Keys:**
* procedure\_extension\_vcc\_coding\_id
**Foreign Keys:**
* procedure\_extension\_id - links to the [procedure\_extension](/medical-api/handling-data/schema-v100/procedure/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------------- | --------- | --------------------------------------------------- |
| procedure\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| procedure\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [procedure\_extension](/medical-api/handling-data/schema-v100/procedure/extension)
# procedure_note
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/procedure/note
Any other notes and comments made about the procedure (`Procedure.note[]`).
**Primary Keys:**
* procedure\_note\_id
**Foreign Keys:**
* procedure\_id - links to the [procedure](/medical-api/handling-data/schema-v100/procedure) table
| Column | Data Type | Description |
| ------------------- | --------- | ---------------------------------- |
| procedure\_note\_id | varchar | Unique identifier for the note row |
| procedure\_id | varchar | Parent procedure |
| text | varchar | Free-text note content |
**Related Tables:**
**Parent:**
* [procedure](/medical-api/handling-data/schema-v100/procedure/base)
# procedure_reasoncode
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/procedure/reasoncode
The coded reason why the procedure was performed (`Procedure.reasonCode[]`).
**Primary Keys:**
* procedure\_reasoncode\_id
**Foreign Keys:**
* procedure\_id - links to the [procedure](/medical-api/handling-data/schema-v100/procedure/base) table
| Column | Data Type | Description |
| ------------------------- | --------- | ----------------------------------------- |
| procedure\_reasoncode\_id | varchar | Unique identifier for the reason code row |
| procedure\_id | varchar | FK to the parent procedure record |
| text | varchar | Display text for the reason code |
**Related Tables:**
**Parent:**
* [procedure](/medical-api/handling-data/schema-v100/procedure/base)
**Child:**
* [procedure\_reasoncode\_coding](/medical-api/handling-data/schema-v100/procedure/reasoncode_coding)
# procedure_reasoncode_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/procedure/reasoncode_coding
Normalized `Procedure.reasonCode[].coding[]` property on the [Procedure](https://hl7.org/fhir/R4/procedure.html) FHIR resource.
**Primary Keys:**
* procedure\_reasoncode\_coding\_id
**Foreign Keys:**
* procedure\_reasoncode\_id - links to the [procedure reasoncode](/medical-api/handling-data/schema-v100/procedure/reasoncode) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------- | --------- | ---------------------- |
| procedure\_reasoncode\_coding\_id | varchar | Unique identifier |
| procedure\_reasoncode\_id | varchar | Parent reason code row |
| code\_rank† | int | 1-based index |
| code | varchar | Code value |
| display | varchar | Display |
| system | varchar | Code system URI |
**Related Tables:**
**Parent:**
* [procedure\_reasoncode](/medical-api/handling-data/schema-v100/procedure/reasoncode)
# Reference Tables
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/reference_tables
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. Each reference table is named `{resource}_references` (e.g., `encounter_references`). The parent ID column name varies by resource (e.g., `encounter_id`, `diagnosticreport_id`).
**Policy:** All references for a resource (first-level and nested) are in the resource's **main reference table**. Backbone tables hold their own reference columns.
**Resources without a `*_references` model in core:** Binary, Medication, and Practitioner. Every other resource in the [v100 table index](/medical-api/handling-data/schema-v100) has a `*_references` dbt model under `packages/data-transformation/raw-to-core/models/core_pipeline/core/`. Some models use an empty reference list in SQL today (reserved for future stage columns); the table still exists for pipeline consistency.
**Standard columns** (parent ID column name varies by resource):
| Column | Data Type | Description |
| --------------- | --------- | ----------------------------------------------------------------------------------- |
| `{parent_id}` | varchar | The ID of the parent resource (e.g., `encounter_id`, `diagnosticreport_id`) |
| property | varchar | The FHIR property name (e.g., `subject`, `performer`, `participant.individual`) |
| 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`) |
Core schema validates `reference_id` against specific target tables when `property` and `reference_type` match the defined relationships below. Other rows are stored but not necessarily FK-validated.
## Reference Tables by Resource Type
### AllergyIntolerance References
Parent ID column: `allergyintolerance_id`. Parent table: [allergyintolerance](/medical-api/handling-data/schema-v100/allergyintolerance/base).
* **patient**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
* **encounter**: links to the [encounter](/medical-api/handling-data/schema-v100/encounter/base)
* **recorder**: links to the [practitioner](/medical-api/handling-data/schema-v100/practitioner/base)
* **asserter**: links to the [practitioner](/medical-api/handling-data/schema-v100/practitioner/base)
### CarePlan References
Parent ID column: `careplan_id`. Parent table: [careplan](/medical-api/handling-data/schema-v100/careplan/base).
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
* **author**: links to [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) or other per `reference_type`
* **addresses**: links to the resource (e.g., [condition](/medical-api/handling-data/schema-v100/condition)) that this care plan addresses (sourced from `careplan_addresses` stage table)
### Communication References
Parent ID column: `communication_id`. Parent table: [communication](/medical-api/handling-data/schema-v100/communication).
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
### Composition References
Parent ID column: `composition_id`. Parent table: [composition](/medical-api/handling-data/schema-v100/composition/base).
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
**Note:** `attester.party`, `section.entry`, and other composition references are not yet in the stage pipeline and are therefore absent from this table.
### Condition References
Parent ID column: `condition_id`. Parent table: [condition](/medical-api/handling-data/schema-v100/condition).
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
* **encounter**: links to the [encounter](/medical-api/handling-data/schema-v100/encounter/base)
* **recorder**: links to the [practitioner](/medical-api/handling-data/schema-v100/practitioner/base)
* **asserter**: links to the [practitioner](/medical-api/handling-data/schema-v100/practitioner/base)
### Consent References
Parent ID column: `consent_id`. Parent table: [consent](/medical-api/handling-data/schema-v100/consent).
* **patient**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
* **performer**: links to [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) or [organization](/medical-api/handling-data/schema-v100/organization/base) per `reference_type`
### Coverage References
Parent ID column: `coverage_id`. Parent table: [coverage](/medical-api/handling-data/schema-v100/coverage).
* **beneficiary**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
* **payor**: links to [organization](/medical-api/handling-data/schema-v100/organization/base) or [patient](/medical-api/handling-data/schema-v100/patient/base) per `reference_type` (one row per payor, sourced from `coverage_payor` stage table)
### Device References
Parent ID column: `device_id`. Parent table: [device](/medical-api/handling-data/schema-v100/device).
* **patient**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
* **definition**: links to the device definition resource per `reference_type`
* **location**: links to the [location](/medical-api/handling-data/schema-v100/location/base)
* **owner**: links to the [organization](/medical-api/handling-data/schema-v100/organization/base)
* **parent**: links to the parent [device](/medical-api/handling-data/schema-v100/device) per `reference_type`
### DiagnosticReport References
Parent ID column: `diagnosticreport_id`. Parent table: [diagnosticreport](/medical-api/handling-data/schema-v100/diagnosticreport/base).
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
* **encounter**: links to the [encounter](/medical-api/handling-data/schema-v100/encounter/base)
* **performer**: links to [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) or [organization](/medical-api/handling-data/schema-v100/organization/base) per `reference_type`
* **result**: links to [observation](/medical-api/handling-data/schema-v100/observation/base) when `reference_type = 'Observation'`
### DocumentReference References
Parent ID column: `documentreference_id`. Parent table: [documentreference](/medical-api/handling-data/schema-v100/documentreference/base).
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
* **authenticator**: links to [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) or [organization](/medical-api/handling-data/schema-v100/organization/base) per `reference_type`
* **custodian**: links to the [organization](/medical-api/handling-data/schema-v100/organization/base)
* **context\_sourcepatientinfo**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base) per `reference_type`
* **masteridentifier\_assigner**: links to the [organization](/medical-api/handling-data/schema-v100/organization/base)
### Encounter References
Parent ID column: `encounter_id`. Parent table: [encounter](/medical-api/handling-data/schema-v100/encounter/base).
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
* **partof**: links to a parent [encounter](/medical-api/handling-data/schema-v100/encounter/base)
* **serviceprovider**: links to the [organization](/medical-api/handling-data/schema-v100/organization/base)
* **location.location**: links to the [location](/medical-api/handling-data/schema-v100/location/base)
* **participant.individual**: links to [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) per `reference_type`
* **diagnosis.condition**: links to [condition](/medical-api/handling-data/schema-v100/condition) (sourced from `encounter_diagnosis` stage table); see also backbone [encounter\_diagnosis](/medical-api/handling-data/schema-v100/encounter/diagnosis)
* **hospitalization.destination**: links to the [location](/medical-api/handling-data/schema-v100/location/base)
* **hospitalization.origin**: links to the [location](/medical-api/handling-data/schema-v100/location/base)
### FamilyMemberHistory References
Parent ID column: `familymemberhistory_id`. Parent table: [familymemberhistory](/medical-api/handling-data/schema-v100/familymemberhistory/base).
* **patient**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
### Goal References
Parent ID column: `goal_id`. Parent table: [goal](/medical-api/handling-data/schema-v100/goal/base).
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
### Immunization References
Parent ID column: `immunization_id`. Parent table: [immunization](/medical-api/handling-data/schema-v100/immunization).
* **patient**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
* **performer.actor**: links to [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) or [organization](/medical-api/handling-data/schema-v100/organization/base) per `reference_type`
### Location References
Parent ID column: `location_id`. Parent table: [location](/medical-api/handling-data/schema-v100/location/base).
* **managingorganization**: links to the [organization](/medical-api/handling-data/schema-v100/organization/base)
* **partof**: links to a parent [location](/medical-api/handling-data/schema-v100/location/base)
### MedicationAdministration References
Parent ID column: `medicationadministration_id`. Parent table: [medicationadministration](/medical-api/handling-data/schema-v100/medicationadministration/base).
* **medication\_reference**: links to the [medication](/medical-api/handling-data/schema-v100/medication)
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
* **performer.actor**: links to [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) or [organization](/medical-api/handling-data/schema-v100/organization/base) per `reference_type`
* **reasonReference**: links to [condition](/medical-api/handling-data/schema-v100/condition) or other clinical resource per `reference_type`
### MedicationDispense References
Parent ID column: `medicationdispense_id`. Parent table: [medicationdispense](/medical-api/handling-data/schema-v100/medicationdispense/base).
* **medication\_reference**: links to the [medication](/medical-api/handling-data/schema-v100/medication)
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
* **performer.actor**: links to [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) or [organization](/medical-api/handling-data/schema-v100/organization/base) per `reference_type`
### MedicationRequest References
Parent ID column: `medicationrequest_id`. Parent table: [medicationrequest](/medical-api/handling-data/schema-v100/medicationrequest/base).
* **medication\_reference**: links to the [medication](/medical-api/handling-data/schema-v100/medication)
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
* **requester**: links to [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) or [organization](/medical-api/handling-data/schema-v100/organization/base) per `reference_type`
* **reasonReference**: links to [condition](/medical-api/handling-data/schema-v100/condition) or other clinical resource per `reference_type`
### MedicationStatement References
Parent ID column: `medicationstatement_id`. Parent table: [medicationstatement](/medical-api/handling-data/schema-v100/medicationstatement/base).
* **medication\_reference**: links to the [medication](/medical-api/handling-data/schema-v100/medication)
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
### Observation References
Parent ID column: `observation_id`. Parent table: [observation](/medical-api/handling-data/schema-v100/observation/base).
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
* **encounter**: links to the [encounter](/medical-api/handling-data/schema-v100/encounter/base)
* **performer**: links to [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) or [organization](/medical-api/handling-data/schema-v100/organization/base) per `reference_type`
* **device**: links to the [device](/medical-api/handling-data/schema-v100/device) per `reference_type`
* **specimen**: links to the specimen resource per `reference_type`
### Organization References
Parent ID column: `organization_id`. Parent table: [organization](/medical-api/handling-data/schema-v100/organization/base).
* **partof**: links to a parent [organization](/medical-api/handling-data/schema-v100/organization/base)
### Patient References
Parent ID column: `patient_id`. Parent table: [patient](/medical-api/handling-data/schema-v100/patient/base).
* **managingorganization**: links to the [organization](/medical-api/handling-data/schema-v100/organization/base)
### Procedure References
Parent ID column: `procedure_id`. Parent table: [procedure](/medical-api/handling-data/schema-v100/procedure).
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
* **encounter**: links to the [encounter](/medical-api/handling-data/schema-v100/encounter/base)
* **location**: links to the [location](/medical-api/handling-data/schema-v100/location/base)
* **recorder**: links to the [practitioner](/medical-api/handling-data/schema-v100/practitioner/base)
* **asserter**: links to the [practitioner](/medical-api/handling-data/schema-v100/practitioner/base)
* **report**: links to [diagnosticreport](/medical-api/handling-data/schema-v100/diagnosticreport/base) when `reference_type = 'DiagnosticReport'` (sourced from `procedure_report` stage table)
### RelatedPerson References
Parent ID column: `relatedperson_id`. Parent table: [relatedperson](/medical-api/handling-data/schema-v100/relatedperson/base).
* **patient**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
### ServiceRequest References
Parent ID column: `servicerequest_id`. Parent table: [servicerequest](/medical-api/handling-data/schema-v100/servicerequest).
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base)
* **requester**: links to [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) or [organization](/medical-api/handling-data/schema-v100/organization/base) per `reference_type`
# relatedperson_address
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/relatedperson/address
Address where the related person can be contacted or visited (`RelatedPerson.address[]`).
**Primary Keys:**
* relatedperson\_address\_id
**Foreign Keys:**
* relatedperson\_id - links to the [relatedperson](/medical-api/handling-data/schema-v100/relatedperson/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | --------------------------------------------------------- |
| relatedperson\_address\_id | varchar | Unique identifier for the address row |
| relatedperson\_id | varchar | Parent related person |
| address† | varchar | First and second address lines concatenated |
| city | varchar | City name |
| district | varchar | District name (e.g., county) |
| state | varchar | State or province code |
| zip\_code | varchar | ZIP or postal code |
| country | varchar | Country code |
| lines† | array | Address lines (first through fourth lines, nulls removed) |
| address\_rank† | int | Order of this address within the related person (1-based) |
**Related Tables:**
**Parent:**
* [relatedperson](/medical-api/handling-data/schema-v100/relatedperson/base)
# relatedperson
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/relatedperson/base
Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/relatedperson.html) for full details.
**Tables in this resource:**
* **related\_person** – Main related person record (this page)
* [relatedperson\_address](/medical-api/handling-data/schema-v100/relatedperson/address) – Addresses per related person
* [relatedperson\_communication](/medical-api/handling-data/schema-v100/relatedperson/communication) – Communication and language preferences
* [relatedperson\_communication\_language\_coding](/medical-api/handling-data/schema-v100/relatedperson/communication_language_coding)
* [relatedperson\_name](/medical-api/handling-data/schema-v100/relatedperson/name) – Names per related person
* [relatedperson\_relationship](/medical-api/handling-data/schema-v100/relatedperson/relationship) – Relationship to the patient
* [relatedperson\_relationship\_coding](/medical-api/handling-data/schema-v100/relatedperson/relationship_coding)
* [relatedperson\_telecom](/medical-api/handling-data/schema-v100/relatedperson/telecom) – Telecom (phone, email)
* [relatedperson\_extension](/medical-api/handling-data/schema-v100/relatedperson/extension)
* [relatedperson\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/relatedperson/extension_vcc_coding)
* **relatedperson\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Primary Keys:**
* relatedperson\_id
† Metriport Platform added
| Column | Data Type | Description |
| ------------------ | --------- | ---------------------------------------------------------------- |
| relatedperson\_id | varchar | Unique identifier for the related person |
| first\_name† | varchar | First given name (from first name row) |
| last\_name† | varchar | Family name (from first name row) |
| gender | varchar | Gender |
| birthdate | date | Date of birth |
| address† | varchar | First and second address lines concatenated (from first address) |
| city† | varchar | City (from first address) |
| state† | varchar | State or province (from first address) |
| country† | varchar | Country (from first address) |
| zip\_code† | varchar | ZIP or postal code (from first address) |
| email† | varchar | First email from telecom |
| phone† | varchar | First phone from telecom |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Child:**
* [relatedperson\_address](/medical-api/handling-data/schema-v100/relatedperson/address)
* [relatedperson\_communication](/medical-api/handling-data/schema-v100/relatedperson/communication)
* [relatedperson\_extension](/medical-api/handling-data/schema-v100/relatedperson/extension)
* [relatedperson\_name](/medical-api/handling-data/schema-v100/relatedperson/name)
* [relatedperson\_relationship](/medical-api/handling-data/schema-v100/relatedperson/relationship)
* [relatedperson\_telecom](/medical-api/handling-data/schema-v100/relatedperson/telecom)
# relatedperson_communication
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/relatedperson/communication
A language which may be used to communicate with about the patient's health (`RelatedPerson.communication[]`).
**Primary Keys:**
* relatedperson\_communication\_id
**Foreign Keys:**
* relatedperson\_id - links to the [relatedperson](/medical-api/handling-data/schema-v100/relatedperson/base) table
| Column | Data Type | Description |
| -------------------------------- | --------- | -------------------------------------------------------- |
| relatedperson\_communication\_id | varchar | Unique identifier for the communication row |
| relatedperson\_id | varchar | Parent related person |
| language\_text | varchar | Human-readable language description |
| preferred | varchar | Whether this is the preferred language for communication |
**Related Tables:**
**Parent:**
* [relatedperson](/medical-api/handling-data/schema-v100/relatedperson/base)
**Child:**
* [relatedperson\_communication\_language\_coding](/medical-api/handling-data/schema-v100/relatedperson/communication_language_coding)
# relatedperson_communication_language_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/relatedperson/communication_language_coding
Normalized `RelatedPerson.communication[].language.coding[]` property on the [RelatedPerson](https://hl7.org/fhir/R4/relatedperson.html) FHIR resource.
**Primary Keys:**
* relatedperson\_communication\_language\_coding\_id
**Foreign Keys:**
* relatedperson\_communication\_id - links to the [relatedperson\_communication](/medical-api/handling-data/schema-v100/relatedperson/communication) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------------------------------- | --------- | --------------------------------------------------------- |
| relatedperson\_communication\_language\_coding\_id | varchar | Unique identifier for the coding row |
| relatedperson\_communication\_id | varchar | FK to the parent relatedperson\_communication record |
| code\_rank† | int | 1-based index of this coding in the language coding array |
| code | varchar | Code value (e.g., BCP-47 language tag) |
| display | varchar | Human-readable display |
| system | varchar | Code system URI |
**Related Tables:**
**Parent:**
* [relatedperson\_communication](/medical-api/handling-data/schema-v100/relatedperson/communication)
# relatedperson_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/relatedperson/extension
Normalized `RelatedPerson.extension[]` property on the [RelatedPerson](https://hl7.org/fhir/R4/relatedperson.html) FHIR resource.
**Primary Keys:**
* relatedperson\_extension\_id
**Foreign Keys:**
* relatedperson\_id - links to the [relatedperson](/medical-api/handling-data/schema-v100/relatedperson/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------------- | --------- | ------------------------------------------------------ |
| relatedperson\_extension\_id | varchar | Unique identifier for the extension row |
| relatedperson\_id | varchar | FK to the parent relatedperson record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [relatedperson](/medical-api/handling-data/schema-v100/relatedperson/base)
**Child:**
* [relatedperson\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/relatedperson/extension_vcc_coding)
# relatedperson_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/relatedperson/extension_vcc_coding
Normalized `RelatedPerson.extension[].valueCodeableConcept.coding[]` property on the [RelatedPerson](https://hl7.org/fhir/R4/relatedperson.html) FHIR resource.
**Primary Keys:**
* relatedperson\_extension\_vcc\_coding\_id
**Foreign Keys:**
* relatedperson\_extension\_id - links to the [relatedperson\_extension](/medical-api/handling-data/schema-v100/relatedperson/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------------------- | --------- | --------------------------------------------------- |
| relatedperson\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| relatedperson\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [relatedperson\_extension](/medical-api/handling-data/schema-v100/relatedperson/extension)
# relatedperson_name
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/relatedperson/name
A name associated with the person (`RelatedPerson.name[]`).
**Primary Keys:**
* relatedperson\_name\_id
**Foreign Keys:**
* relatedperson\_id - links to the [relatedperson](/medical-api/handling-data/schema-v100/relatedperson/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------- | --------- | ------------------------------------------------------ |
| relatedperson\_name\_id | varchar | Unique identifier for the name row |
| relatedperson\_id | varchar | Parent related person |
| last\_name† | varchar | Family name (FHIR family) |
| first\_name† | varchar | First given name |
| given\_names† | array | All given names as array (nulls removed) |
| suffixes† | array | Name suffixes as array (nulls removed) |
| prefixes† | array | Name prefixes as array (nulls removed) |
| name\_rank† | int | Order of this name within the related person (1-based) |
**Related Tables:**
**Parent:**
* [relatedperson](/medical-api/handling-data/schema-v100/relatedperson/base)
# relatedperson_relationship
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/relatedperson/relationship
The nature of the relationship between a patient and the related person (`RelatedPerson.relationship[]`).
**Primary Keys:**
* relatedperson\_relationship\_id
**Foreign Keys:**
* relatedperson\_id - links to the [relatedperson](/medical-api/handling-data/schema-v100/relatedperson/base) table
| Column | Data Type | Description |
| ------------------------------- | --------- | ---------------------------------------------- |
| relatedperson\_relationship\_id | varchar | Unique identifier for the relationship row |
| relatedperson\_id | varchar | Parent related person |
| text | varchar | Human-readable description of the relationship |
**Related Tables:**
**Parent:**
* [relatedperson](/medical-api/handling-data/schema-v100/relatedperson/base)
**Child:**
* [relatedperson\_relationship\_coding](/medical-api/handling-data/schema-v100/relatedperson/relationship_coding)
# relatedperson_relationship_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/relatedperson/relationship_coding
Normalized `RelatedPerson.relationship.coding[]` property on the [RelatedPerson](https://hl7.org/fhir/R4/relatedperson.html) FHIR resource.
**Primary Keys:**
* relatedperson\_relationship\_coding\_id
**Foreign Keys:**
* relatedperson\_relationship\_id - links to the [related person relationship](/medical-api/handling-data/schema-v100/relatedperson/relationship) table
† Metriport Platform added
| Column | Data Type | Description |
| --------------------------------------- | --------- | ------------------------------------------------------------- |
| relatedperson\_relationship\_coding\_id | varchar | Unique identifier for the coding row |
| relatedperson\_relationship\_id | varchar | Parent relationship entry |
| code\_rank† | int | 1-based index of this coding in the relationship coding array |
| code | varchar | Code value (e.g., MTH, FTH, GUARD) |
| display | varchar | Human-readable display |
| system | varchar | Code system URI |
**Related Tables:**
**Parent:**
* [relatedperson\_relationship](/medical-api/handling-data/schema-v100/relatedperson/relationship)
# relatedperson_telecom
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/relatedperson/telecom
A contact detail for the person, e.g. a telephone number or an email address (`RelatedPerson.telecom[]`).
**Primary Keys:**
* relatedperson\_telecom\_id
**Foreign Keys:**
* relatedperson\_id - links to the [relatedperson](/medical-api/handling-data/schema-v100/relatedperson/base) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------- | --------- | -------------------------------------------------------------- |
| relatedperson\_telecom\_id | varchar | Unique identifier for the telecom row |
| relatedperson\_id | varchar | Parent related person |
| system | varchar | Contact system: e.g. phone, fax, email, pager, url, sms, other |
| use | varchar | Purpose of contact: `home`, `work`, `temp`, `old`, `mobile` |
| value | varchar | The actual phone number, email address, URL, etc. |
| telecom\_rank† | int | Stable order of this telecom within the location |
**Related Tables:**
**Parent:**
* [relatedperson](/medical-api/handling-data/schema-v100/relatedperson/base)
# servicerequest
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/servicerequest/base
A record of a request for service such as diagnostic investigations, treatments, or operations to be performed. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/servicerequest.html) for full details.
**Tables in this resource:**
* **servicerequest** – Main service request record (this page)
* [servicerequest\_code\_coding](/medical-api/handling-data/schema-v100/servicerequest/code_coding)
* [servicerequest\_extension](/medical-api/handling-data/schema-v100/servicerequest/extension)
* [servicerequest\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/servicerequest/extension_vcc_coding)
* **servicerequest\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)
**Primary Keys:**
* servicerequest\_id
**Foreign Keys:**
* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table (subject)
† Metriport Platform added
| Column | Data Type | Description |
| ---------------------- | --------- | ------------------------------------------------------------------------------------------ |
| servicerequest\_id | varchar | Unique identifier for the service request |
| patient\_id | varchar | Unique identifier for the patient (subject) |
| status | varchar | Status of the request |
| occurrencedatetime | datetime | When the service should occur, if given as date/time (`ServiceRequest.occurrenceDateTime`) |
| code\_text | varchar | Free-text description of the requested service |
| code\_cpt\_code† | varchar | CPT code for the requested service |
| code\_cpt\_display† | varchar | Human-readable CPT description |
| code\_snomed\_code† | varchar | SNOMED CT code for the requested service |
| code\_snomed\_display† | varchar | Human-readable SNOMED CT description |
| intent | varchar | Intent of the request (e.g. order, plan) |
| priority | varchar | Request priority (`ServiceRequest.priority`) |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |
**Related Tables:**
**Parent:**
* [patient](/medical-api/handling-data/schema-v100/patient/base)
**Child:**
* [servicerequest\_code\_coding](/medical-api/handling-data/schema-v100/servicerequest/code_coding)
* [servicerequest\_extension](/medical-api/handling-data/schema-v100/servicerequest/extension)
# servicerequest_code_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/servicerequest/code_coding
Normalized `ServiceRequest.code.coding[]` property on the [ServiceRequest](https://hl7.org/fhir/R4/servicerequest.html) FHIR resource.
**Primary Keys:**
* servicerequest\_code\_coding\_id
**Foreign Keys:**
* servicerequest\_id - links to the [service request](/medical-api/handling-data/schema-v100/servicerequest) table
† Metriport Platform added
| Column | Data Type | Description |
| -------------------------------- | --------- | --------------------------------------------------- |
| servicerequest\_code\_coding\_id | varchar | Unique identifier for the coding row |
| servicerequest\_id | varchar | FK to the parent servicerequest record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [servicerequest](/medical-api/handling-data/schema-v100/servicerequest/base)
# servicerequest_extension
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/servicerequest/extension
Normalized `ServiceRequest.extension[]` property on the [ServiceRequest](https://hl7.org/fhir/R4/servicerequest.html) FHIR resource.
**Primary Keys:**
* servicerequest\_extension\_id
**Foreign Keys:**
* servicerequest\_id - links to the [servicerequest](/medical-api/handling-data/schema-v100/servicerequest/base) table
† Metriport Platform added
| Column | Data Type | Description |
| ----------------------------- | --------- | ------------------------------------------------------ |
| servicerequest\_extension\_id | varchar | Unique identifier for the extension row |
| servicerequest\_id | varchar | FK to the parent servicerequest record |
| extension\_rank† | int | 1-based position of this extension in the source array |
| url | varchar | Extension URL identifying the extension type |
| valuestring | varchar | String value |
| valueboolean | bool | Boolean value |
| valuecode | varchar | Code value |
| valuedatetime | datetime | Datetime value |
| valueinteger | int | Integer value |
| valuedecimal | numeric | Decimal value |
| valuecoding\_code | varchar | Coding code value |
| valuecoding\_display | varchar | Coding display text |
| valuecoding\_system | varchar | Coding system URI |
| valuecodeableconcept\_text | varchar | CodeableConcept text |
| valuereference\_reference | varchar | Reference value |
**Related Tables:**
**Parent:**
* [servicerequest](/medical-api/handling-data/schema-v100/servicerequest/base)
**Child:**
* [servicerequest\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/servicerequest/extension_vcc_coding)
# servicerequest_extension_vcc_coding
Source: https://docs.metriport.com/medical-api/handling-data/schema-v100/servicerequest/extension_vcc_coding
Normalized `ServiceRequest.extension[].valueCodeableConcept.coding[]` property on the [ServiceRequest](https://hl7.org/fhir/R4/servicerequest.html) FHIR resource.
**Primary Keys:**
* servicerequest\_extension\_vcc\_coding\_id
**Foreign Keys:**
* servicerequest\_extension\_id - links to the [servicerequest\_extension](/medical-api/handling-data/schema-v100/servicerequest/extension) table
† Metriport Platform added
| Column | Data Type | Description |
| ------------------------------------------ | --------- | --------------------------------------------------- |
| servicerequest\_extension\_vcc\_coding\_id | varchar | Unique identifier for the coding row |
| servicerequest\_extension\_id | varchar | FK to the parent extension record |
| code\_rank† | int | 1-based position of this coding in the source array |
| code | varchar | Code value |
| display | varchar | Human-readable display text |
| system | varchar | Coding system URI |
**Related Tables:**
**Parent:**
* [servicerequest\_extension](/medical-api/handling-data/schema-v100/servicerequest/extension)
# Suspecting
Source: https://docs.metriport.com/medical-api/handling-data/suspecting
Automated identification of undiagnosed or under-coded conditions from clinical evidence patterns.
Analytics must be enabled for your account to receive this
data. [Contact us](mailto:contact@metriport.com) to get
started.
# Overview
Suspecting automatically identifies patients who may have undiagnosed or under-coded conditions
based on clinical evidence in their medical records. The system analyzes prior medical history
to find patterns that suggest a condition may be present but has not yet been formally coded.
Suspected conditions are represented as **FHIR Condition resources** with a `verificationStatus`
of `unconfirmed`. Each suspected condition includes the ICD-10 code, supporting evidence, and
the clinical rules (definitions) that triggered the suspicion.
When clinical data becomes available in our system for a patient, **suspecting** runs on the next
**analytics cycle** (typically within about **30 minutes**). Data may arrive through a
[Network Query](/medical-api/api-reference/network/start-network-query) or
[real-time patient notifications](/medical-api/handling-data/realtime-patient-notifications) such as **ADTs**. Later cycles keep re-evaluating your
patient population to surface coding opportunities and improve risk adjustment accuracy.
## How It Works
The system uses two detection modes:
* **Suspect** — The patient has clinical evidence suggesting a condition but no existing diagnosis
code on file. For example, two fasting glucose readings above 126 mg/dL without a diabetes
diagnosis.
* **Recapture** — The patient had a diagnosis code in a prior year but it has not been captured in
the current year, and there is supporting clinical evidence.
Each detection rule is called a **definition**. A definition belongs to a **group** (e.g.,
"diabetes") and specifies the exact clinical logic used to identify the suspect. Multiple
definitions within the same group may target the same ICD-10 code through different evidence
pathways.
## Available Condition Groups
The following condition groups are currently supported.
More condition groups are under active development. If
there is a specific condition you'd like added, [get in
touch with us directly](mailto:contact@metriport.com).
### Mental Health
| Condition |
| -------------------- |
| Bipolar Disorder |
| Major Depression |
| Dementia |
| Seizure Disorder |
| Anorexia / Bulimia |
| Alcohol Use Disorder |
### Cardiovascular
| Condition |
| ----------------------------------- |
| Heart Failure |
| Hypertension |
| Coronary Artery Disease |
| Peripheral Arterial Disease |
| Carotid Artery Stenosis |
| Angina |
| Arrhythmia |
| Aortic Aneurysm |
| History of Cerebrovascular Accident |
### Metabolic
| Condition |
| ------------------- |
| Morbid Obesity |
| Diabetes |
| Prediabetes |
| Hyperlipidemia |
| Hyperparathyroidism |
| Hypothyroidism |
### Respiratory
| Condition |
| ----------------------- |
| COPD |
| Obstructive Sleep Apnea |
### Renal / Hepatic
| Condition |
| ---------------------- |
| Chronic Kidney Disease |
| Cirrhosis |
| Chronic Hepatitis C |
### Other
| Condition |
| -------------------------------- |
| Diabetic Retinopathy |
| Retinal Vein Occlusion |
| Age-Related Macular Degeneration |
| Lung Nodule |
| Thyroid Nodule |
| Barrett's Esophagus |
| Benign Carcinoid |
| Bone Density |
| Amputation |
| Ostomy |
| History of Active Cancer |
# Getting Started
Once suspecting is enabled for your account, suspected conditions are available through the
**API** and **Dashboard** as each analytics cycle completes.
# Accessing via API
Suspect results are available through the API:
* **[List Patient Suspects](/medical-api/api-reference/analytics/suspects/list-patient-suspects)** —
paginated suspected conditions for one patient.
Each result is a FHIR `Bundle` that includes a `Patient` resource, the suspected `Condition`, and
supporting evidence resources (Observations, Procedures, MedicationRequests).
# Additional Information
For more information about working with patient data, see the [data analytics](/medical-api/handling-data/data-analytics)
documentation.
# Receiving Webhooks (Legacy)
Source: https://docs.metriport.com/medical-api/handling-data/webhooks
Receive status updates as soon as data becomes available.
**Legacy Webhook Flow:** This page documents webhooks for
the legacy [Document
Query](/medical-api/legacy-api-reference/document/start-document-query)
flow. We recommend migrating to the [Network
Query](/medical-api/api-reference/network/start-network-query)
flow, which provides a unified way to query all health
data networks (HIEs, pharmacies, and laboratories) with
improved webhook events. See the [updated webhooks
guide](/medical-api/handling-data/webhooks-with-nq) for
details.
## Overview
When using the Medical API, Metriport will send Webhook messages to your app as soon as data becomes available.
This is the usual flow to obtain Patient data:
1. You trigger a [document query](/medical-api/legacy-api-reference/document/start-document-query) to retrieve a Patient's medical documents from HIEs;
* XML C-CDA documents will be converted and stored on Metriport's FHIR storage;
* as documents get downloaded and converted, you should get [patient document data](#patient-document-data) webhook messages;
2. Once document conversion is completed, you can [query for patient consolidated data](/medical-api/api-reference/fhir/consolidated-data-query-post);
* depending on the amount of data this can take some time to crunch together, so results are sent through a webhook message:
[patient consolidated data](#patient-consolidated-data)
You should expect to get more than one Webhook message per patient per request (document query and/or consolidated data).
To enable this integration approach with Metriport, and for some prerequesite reading to understand
how the Webhook flow works, see [our Webhooks guide](/medical-api/getting-started/webhooks).
When you receive a webhook message, you should respond
with a `200` status code within 4 seconds. We recommend
processing the webhook request asynchronously.
### Types of Messages
* `medical.document-download`: result of Document Query, containing the newly downloaded documents
for the patient - see [details](#patient-document-data) below;
* `medical.document-conversion`: result of converting the newly downloaded C-CDA documents into FHIR -
see [details](#patient-document-data) below;
* `medical.document-bulk-download-urls`: list of download urls for a patient's documents, see
[details](#bulk-document-download-urls) below;
* `medical.consolidated-data`: result of a Consolidated Data Query, containing the patient's data in FHIR
format - see [details](#patient-consolidated-data) below.
* `medical.bulk-patient-create`: updates for a [Bulk Patient Create](/medical-api/api-reference/patient/bulk-create-patient)
* see [details](#bulk-patient-create) below.
### Workflow
#### Download URLs
Below is a flowchart of the process to download all the raw documents we've received from the networks for a patient:
```mermaid theme={null}
flowchart TB
subgraph s3["Metriport"]
m1["Download Documents"]
m2["Generate Document Download Urls"]
end
subgraph s2["Webhooks Sent"]
w1["medical.document-download"]
w2["medical.document-bulk-download-urls"]
end
subgraph s1["Your Backend"]
c1["Trigger Document Query"]
c2["Handle Download Webhook"]
c3["Trigger Bulk Download Docs"]
c4["Handle Bulk Download Urls"]
end
c1 --> m1
m1 --> w1
w1 --> c2
c2 --> c3
c3 --> m2
m2 --> w2
w2 --> c4
```
#### Consolidated Data
Below is a flowchart of the process to get a patient's consolidated FHIR data:
```mermaid theme={null}
flowchart TB
subgraph s3["Metriport"]
m1["Download Documents"]
m3["Convert Documents to FHIR"]
m4["Generate Patient Consolidated Data"]
end
subgraph s2["Webhooks Sent"]
w3["medical.document-conversion"]
w4["medical.consolidated-data"]
end
subgraph s1["Your Backend"]
c1["Trigger Document Query"]
c5["Handle Convert Webhook"]
c6["Trigger Patient Consolidated"]
c7["Handle Patient Consolidated"]
end
c1 --> m1
m1 --> m3
m3 --> w3
w3 --> c5
c5 --> c6
c6 --> m4
m4 --> w4
w4 --> c7
```
### Passing Metadata
You can pass metadata to endpoints that support webhooks, and you will receive the `meta.data` field of the webhook request.
Metadata holds a record of up to 50 custom string key-value pairs. Key names can be up to 40 characters long and values up to 500 characters long. You may use this to attach whatever metadata is relevant for your use-case - for example, external IDs.
Below is an example payload you could send in the request body of one of those endpoints and how you would use the sdk:
### Patient Document Data
These are messages you can expect to receive in the following scenarios:
1. When [queried documents](/medical-api/legacy-api-reference/document/start-document-query) have completed
downloading, the message `type` will be `medical.document-download`, and at this point
you'll be able to [download the raw files](/medical-api/api-reference/document/get-document);
2. Then when the conversion to FHIR has completed, the message `type` will be `medical.document-conversion`, and at this point
you'll be able to query for [patient consolidated data](/medical-api/api-reference/fhir/consolidated-data-query-post)
in FHIR-compliant format.
Note that the webhooks will only contain updates for new
data fetched in the current document query.
```json theme={null}
{
"meta": {
"messageId": "",
"requestId": "",
"when": "",
"type": "medical.document-download",
"data": {
"youCan": "putAny",
"stringKeyValue": "pairsHere"
}
},
"patients": [
{
"patientId": "eddeefa1-b54a-41d6-854f-0e91b7871d6a",
"externalId": "1234567890",
"additionalIds": {
"athenahealth": ["99992"]
},
"type": "document-download",
"status": "completed",
"documents": [
{
"id": "1.2.543.1.34.1.34.134",
"fileName": "CCDA_Diag.xml",
"description": "Patient Diagnoses",
"status": "current",
"indexed": "2019-09-07T15:50:00.000Z",
"mimeType": "application/xml",
"size": "17344007",
"type": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "62479008",
"display": "Diagnoses"
}
],
"text": "Diagnoses"
}
},
{
"id": "1.2.543.1.224.54.22.540",
"fileName": "Progress_Notes.xml",
"description": "Patient Encounter Progress Notes 2023-03-22",
"status": "current",
"indexed": "2023-03-22T08:34:00.000Z",
"mimeType": "application/xml",
"size": "8675545",
"type": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "371532007",
"display": "Progress Report"
}
],
"text": "Progress Notes"
}
}
]
},
{
"patientId": "",
"type": "document-download",
"status": "completed",
...
}
]
}
```
The format follows:
Metadata about the message. The full format is described [here](/medical-api/getting-started/webhooks#meta-data).
The type of the Medical API webhook data message. Can be one of: `medical.document-download`, `medical.document-conversion`,
`medical.consolidated-data`, `medical.document-bulk-download-urls`.
Array of Document query status updates - where each item corresponds to a specific patient.
The Patient ID.
Specifies what step in the Document query flow this message is for - can be one of
`document-download` | `document-conversion`.
The outcome of the step corresponding to `type` - can be one of `completed` | `failed`.
An array of objects describing the Documents that can be retrieved for the Patient - will only be present for `document-download` messages.
### Patient Consolidated Data
A Patient's consolidated data is the result of converting all C-CDA documents into deduplicated and standardized FHIR, as well as other FHIR data your application
has [inserted into Metriport's FHIR repository](/medical-api/api-reference/fhir/create-patient-consolidated).
This data can be retrieved in either FHIR JSON format, or a rendered PDF or HTML [Medical Record Summary](/medical-api/handling-data/medical-record-summary).
Patients can have a large amount of data, so in order to have access to a Patient's data:
1. [Trigger a consolidated data query](/medical-api/api-reference/fhir/consolidated-data-query-post) - one query per patient at any given time;
2. Your app can check the status by calling [get consolidated query status](/medical-api/api-reference/fhir/consolidated-data-query-get) (optional);
3. When the result is ready, we'll send a webhook message with the results (below).
Note that inside the `Bundle` you'll find a `DocumentReference` resource with attachments in the `content` array:
* The first item contains an attachment with a `url` which can be used to download the data.
* If requested `conversionType` is `json`, an additional attachment with `contentType: "application/gzip"` provides a gzip-compressed copy for faster downloads.
If there was no data available for the Patient, the
`Bundle` will be empty (the `entry` array will have no
elements).
Example payload:
```json theme={null}
{
"meta": {
"messageId": "1e82424a-1220-473d-a0d1-6e5fde15159e",
"requestId": "00000000-0000-0000-0000-000000000000",
"when": "2023-08-23T22:09:11.373Z",
"type": "medical.consolidated-data"
},
"patients": [
{
"patientId": "eddeefa1-b54a-41d6-854f-0e91b7871d6a",
"externalId": "1234567890",
"additionalIds": {
"athenahealth": ["99992"]
},
"status": "completed",
"filters": {
"resources": "Encounter,Observation"
},
"bundle": {
"resourceType": "Bundle",
"total": 1,
"type": "collection",
"entry": [
{
"resource": {
"resourceType": "DocumentReference",
"subject": {
"reference": "Patient/eddeefa1-b54a-41d6-854f-0e91b7871d6a"
},
"content": [
{
"attachment": {
"contentType": "application/json",
"url": "https://documents.s3.amazonaws.com/abc123-Amz-SignedHeaders=host"
}
},
{
"attachment": {
"contentType": "application/gzip",
"url": "https://documents.s3.amazonaws.com/abc123.gz-Amz-SignedHeaders=host"
}
}
]
}
}
]
}
}
]
}
```
The format follows:
Metadata about the message. The full format is described [here](/medical-api/getting-started/webhooks#meta-data).
For Patient Consolidated Data this will always be `medical.consolidated-data`.
Array of consolidated data query results - where each item corresponds to a specific patient.
The Patient ID.
The outcome of consolidated data query - can be one of `completed` | `failed`.
The filters used to obtain the patient's consolidated data.
A comma separated, case sensitive list of resources to be returned. If none are provided all
resources will be included.
The start date (inclusive) for which to filter returned resources - formatted `YYYY-MM-DD` as per
ISO 8601. If not provided, no start date filter will be applied.
The end date (inclusive) for which to filter returned resources - formatted `YYYY-MM-DD` as per
ISO 8601. If not provided, no end date filter will be applied.
A FHIR [Bundle](/medical-api/fhir/resources/bundle) containing a `DocumentReference` resource with attachments in the `content` array.
For JSON requests, two attachments are provided:
- Main attachment with the requested format (JSON, HTML, or PDF)
- Gzip-compressed attachment (JSON only) with `contentType: "application/gzip"` for faster downloads
Each attachment has a `url` which is valid for 10 minutes.
### Bulk Patient Create
During the processing of a [Bulk Patient Create](/medical-api/api-reference/patient/bulk-create-patient),
the Metriport API sends Webhook messages of type `medical.bulk-patient-create` to indicate the status
update and provide relevant information.
You can expect to get two messages of this type for each Bulk Patient Create, with the status
being the main difference between each:
* First message:
* `processing`: the CSV file has been uploaded and is being processed;
* Second message - one of:
* `completed`: the bulk create is completed - includes the [result CSV file](#result-csv-file);
* `failed`: the bulk create failed (likely due to the uploaded file being invalid).
The URL will only be valid for 600 seconds (10 minutes).
Example payload:
```json theme={null}
{
"meta": {
"messageId": "1e82424a-1220-473d-a0d1-6e5fde15159e",
"requestId": "00000000-0000-0000-0000-000000000000",
"when": "2024-12-30T05:05:12.215Z",
"type": "medical.bulk-patient-create"
},
"bulkPatientCreate": {
"requestId": "00000000-00000000-00000000-00000000",
"status": "completed",
"result": ""
}
}
```
The format follows:
Metadata about the message. The full format is described
[here](/medical-api/getting-started/webhooks#meta-data).
For Bulk Patient Create this will always be
`medical.bulk-patient-create`.
The information about the Bulk Patient Create request.
The ID that represents this bulk patient create.
The status of the bulk create. One of `processing`, `failed`, or `completed`.
See all the possible values
[here](/medical-api/api-reference/patient/bulk-create-patient#bulk-patient-create-status).
The reason for a failed bulk create. Only present if the status
is `failed`.
The URL to download the CSV file containing the result of
the Bulk Patient Create. It's valid for 10 minutes. Only present if the
status is `completed`.
#### Result CSV File
The message `medical.bulk-patient-create` with status `completed` includes a URL in the `result`
field, which you can use to download the result of the Bulk Patient Create.
The URL will only be valid for 600 seconds (10 minutes).
The file is based on the same format as the
[input CSV](/medical-api/api-reference/patient/bulk-create-patient#input-csv-file-format), with the
following additional columns:
The ID of the Patient on Metriport - only provided if the
Patient was created successfully.
Whether the respective demographics was accepted and used
to create a Patient. Can be one of `succeeded` or
`failed`.
If the patient failed to be created, this indictes the
reason for failure. Only included if the patient fails to
be created.
An example of a result file can be accessed
[here](https://docs.google.com/spreadsheets/d/1ojBjxya2l3mTjdZhK5DLY7QTZ9SIIkH9vhnacrftqY4/edit?usp=sharing).
### Bulk Document Download URLs
If you want to download all of a patient's documents,
you can start a [Bulk Get Document URL query](/medical-api/api-reference/document/download-url-bulk).
The URLs will only be valid for 600 seconds (10 minutes).
This webhook includes all document metadata and download URLs directly in the payload. Here is an example:
```json theme={null}
{
"meta": {
"messageId": "11111111-1111-1111-1111-111111111111",
"requestId": "00000000-0000-0000-0000-000000000000",
"when": "2023-11-30T05:05:12.215Z",
"type": "medical.document-bulk-download-urls"
},
"patients": [
{
"status": "completed",
"patientId": "22222222-2222-2222-2222-222222222222",
"externalId": "1234567890",
"additionalIds": {
"athenahealth": ["00000"]
},
"documents": [
{
"id": "33333333-3333-3333-3333-333333333333",
"size": 40670,
"fileName": "33333333-3333-3333-3333-333333333333/22222222-2222-2222-2222-222222222222/33333333-3333-3333-3333-333333333333_22222222-2222-2222-2222-222222222222_00000000-0000-0000-0000-000000000000.xml",
"description": "Patient Diagnoses",
"status": "current",
"indexed": "2019-09-07T15:50:00.000Z",
"mimeType": "application/xml",
"type": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "62479008",
"display": "Diagnoses"
}
],
"text": "Diagnoses"
},
"url": "",
"organizationIdentifiers": [
{
"name": "Org1",
"identifierValues": ["1.1.1.1.1.1"]
}
]
}
]
}
]
}
```
The format is as follows:
Metadata about the message. The full format is described [here](/medical-api/getting-started/webhooks#meta-data).
The type of the Medical API webhook data message. In this case, it will be `medical.document-bulk-download-urls`.
An array of Document bulk download URLs, where each item corresponds to the queried patient.
The Patient ID.
The outcome of the step corresponding to `type` - can be one of `completed` | `failed`.
An array of objects describing the Documents that can be retrieved for the Patient along
with the downloadable url to retrieve them.
# Receiving Webhooks
Source: https://docs.metriport.com/medical-api/handling-data/webhooks-with-nq
Receive status updates as soon as data becomes available.
## Overview
Metriport sends webhook messages to your app as data becomes available in our system. This allows you to react to events in real-time rather than polling for updates.
For information on how to set up webhooks, see [Implementing Webhooks](/medical-api/getting-started/webhooks).
When you receive a webhook message, you should respond
with a `200` status code within 4 seconds. We recommend
processing the webhook request asynchronously.
## Webhook Categories
Metriport webhooks are organized into five categories based on their event type prefix:
| Category | Prefix | Purpose |
| -------------------------------------------------------- | ----------------- | ------------------------------------------------------------------------- |
| [Network Query](#network-query-events) | `network-query.*` | Data retrieval from health networks (HIEs, pharmacies, labs) |
| [Medical Data](#medical-data-events) | `medical.*` | Consolidated data, bulk operations, and document downloads |
| [Message](#message-events) | `message.*` | Outbound delivery status and inbound messages from external practitioners |
| [Patient Notifications](#patient-notification-events) | `patient.*` | Real-time notifications (ADTs, pharmacy, laboratory) |
| [Individual Access (IAS)](#individual-access-ias-events) | `ias.*` | Identity verification for [IAS](/medical-api/getting-started/ias) flows |
***
## Network Query Events
**Prefix:** `network-query.*`
Network Query events are emitted when you [start a Network Query](/medical-api/api-reference/network/start-network-query) to retrieve patient data from health networks. You receive one webhook per source as each completes.
**Recommended flow:**
1. Start a [Network Query](/medical-api/api-reference/network/start-network-query) for a patient
2. Receive `network-query.*` webhooks as each source completes
3. Download the patient record from the `consolidatedDataUrl` in the payload
### Event Types
| Event | Description |
| ------------------------ | ------------------------------------------------------------------- |
| `network-query.hie` | HIE data (documents from Health Information Exchanges) is ready |
| `network-query.pharmacy` | Pharmacy data (medication prescription and pickup history) is ready |
| `network-query.lab` | Laboratory data (lab results) is ready |
Each webhook includes a `consolidatedDataUrl` - a
presigned S3 URL to download the patient's aggregated
record, i.e. their 'consolidated data'. This allows you to
reingest the record as soon as any data source is ready.
**HIE Example:**
```json theme={null}
{
"meta": {
"messageId": "11111111-1111-1111-1111-111111111111",
"requestId": "22222222-2222-2222-2222-222222222222",
"when": "2024-12-26T10:03:22.000Z",
"type": "network-query.hie",
"data": {
"youCan": "putAny",
"stringKeyValue": "pairsHere"
}
},
"payload": {
"patientId": "00000000-0000-0000-0000-000000000000",
"externalId": "1234567890",
"consolidatedDataUrl": "https://documents.s3.amazonaws.com/consolidated-abc123-Amz-SignedHeaders=host",
"source": {
"type": "hie",
"status": "completed",
"completedAt": "2024-12-26T10:03:20.000Z"
}
}
}
```
**Pharmacy Example:**
```json theme={null}
{
"meta": {
"messageId": "11111111-1111-1111-1111-111111111111",
"requestId": "22222222-2222-2222-2222-222222222222",
"when": "2024-12-26T10:04:15.000Z",
"type": "network-query.pharmacy",
"data": {
"youCan": "putAny",
"stringKeyValue": "pairsHere"
}
},
"payload": {
"patientId": "00000000-0000-0000-0000-000000000000",
"externalId": "1234567890",
"consolidatedDataUrl": "https://documents.s3.amazonaws.com/consolidated-abc123-Amz-SignedHeaders=host",
"source": {
"type": "pharmacy",
"status": "completed",
"completedAt": "2024-12-26T10:04:12.000Z"
}
}
}
```
**Lab Example:**
```json theme={null}
{
"meta": {
"messageId": "11111111-1111-1111-1111-111111111111",
"requestId": "22222222-2222-2222-2222-222222222222",
"when": "2024-12-26T10:05:30.000Z",
"type": "network-query.lab",
"data": {
"youCan": "putAny",
"stringKeyValue": "pairsHere"
}
},
"payload": {
"patientId": "00000000-0000-0000-0000-000000000000",
"externalId": "1234567890",
"consolidatedDataUrl": "https://documents.s3.amazonaws.com/consolidated-abc123-Amz-SignedHeaders=host",
"source": {
"type": "lab",
"status": "completed",
"completedAt": "2024-12-26T10:05:28.000Z"
}
}
}
```
Metadata about the message. The full format is described [here](/medical-api/getting-started/webhooks#meta-data).
The type of the Network Query webhook message. Can be one of: `network-query.hie`, `network-query.pharmacy`, `network-query.lab`.
The ID of the Network Query request that initiated this webhook. Use this to correlate webhooks with your original query.
The metadata you passed when starting the Network Query.
The network query result payload for the patient.
The Patient ID.
The external ID you provided when creating the patient.
A presigned S3 URL to download the patient's consolidated data. Valid for 3 minutes.
Information about the data source.
The type of source: `hie`, `pharmacy`, or `lab`.
The status of this source: `completed` or `failed`.
ISO 8601 timestamp of when this source query completed.
***
## Medical Data Events
**Prefix:** `medical.*`
Medical Data events are emitted for consolidated data queries, bulk operations, and document downloads. Unlike Network Query events which are triggered automatically after data retrieval, these events are triggered by explicit API calls.
### Event Types
| Event | Description |
| -------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `medical.consolidated-data` | Result of a [Consolidated Data Query](/medical-api/api-reference/fhir/consolidated-data-query-post) |
| `medical.bulk-patient-create` | Status updates for [Bulk Patient Create](/medical-api/api-reference/patient/bulk-create-patient) |
| `medical.document-bulk-download-paged` | Download URLs for [Bulk Document Download](/medical-api/api-reference/document/download-url-bulk) |
***
### `medical.consolidated-data`
You'll receive this webhook after invoking a Consolidated Query via [POST Start Consolidated Data Query](/medical-api/api-reference/fhir/consolidated-data-query-post).
The payload contains the patient's consolidated medical record as deduplicated, standardized FHIR data. This includes all converted documents from network queries plus any FHIR data your application has [inserted directly](/medical-api/api-reference/fhir/create-patient-consolidated).
Note that inside the `Bundle` you'll find a `DocumentReference` resource with attachments in the `content` array:
* The first item contains an attachment with a `url` which can be used to download the data.
* If requested `conversionType` is `json`, an additional attachment with `contentType: "application/gzip"` provides a gzip-compressed copy for faster downloads.
* Download URLs are valid for 3 minutes
If there was no data available for the Patient, the Bundle
will be empty (the entry array will have no elements).
**Recommended flow:**
1. Call [Start Consolidated Data Query](/medical-api/api-reference/fhir/consolidated-data-query-post) for a patient
2. Receive this webhook
3. Download the data from the presigned URLs in the bundle
```json theme={null}
{
"meta": {
"messageId": "11111111-1111-1111-1111-111111111111",
"requestId": "22222222-2222-2222-2222-222222222222",
"when": "2023-08-23T22:09:11.373Z",
"type": "medical.consolidated-data"
},
"patients": [
{
"patientId": "00000000-0000-0000-0000-000000000000",
"externalId": "1234567890",
"additionalIds": {
"athenahealth": ["99992"]
},
"status": "completed",
"filters": {
"resources": "Encounter,Observation"
},
"bundle": {
"resourceType": "Bundle",
"total": 1,
"type": "collection",
"entry": [
{
"resource": {
"resourceType": "DocumentReference",
"subject": {
"reference": "Patient/00000000-0000-0000-0000-000000000000"
},
"content": [
{
"attachment": {
"contentType": "application/json",
"url": "https://documents.s3.amazonaws.com/abc123-Amz-SignedHeaders=host"
}
},
{
"attachment": {
"contentType": "application/gzip",
"url": "https://documents.s3.amazonaws.com/abc123.gz-Amz-SignedHeaders=host"
}
}
]
}
}
]
}
}
]
}
```
Metadata about the message. The full format is described [here](/medical-api/getting-started/webhooks#meta-data).
Always `medical.consolidated-data`.
The ID of the consolidated data query that initiated this webhook.
Array of consolidated data query results - one item per patient.
The Patient ID.
The external ID you provided when creating the patient.
Additional IDs for the patient from integrated EHR systems.
The outcome: `completed` or `failed`.
The filters applied to the query.
Comma-separated list of FHIR resource types returned.
Start date filter - formatted `YYYY-MM-DD`.
End date filter - formatted `YYYY-MM-DD`.
A FHIR [Bundle](/medical-api/fhir/resources/bundle) containing a `DocumentReference` with presigned download URLs.
***
### `medical.bulk-patient-create`
You'll receive this webhook after invoking a bulk patient creation via [POST Bulk Create Patient](/medical-api/api-reference/patient/bulk-create-patient).
The payload reports the status of the bulk creation job, allowing you to process large CSV files of patient demographics asynchronously.
Note that you'll receive multiple webhooks for a single bulk create request:
* First, a webhook with `status: "processing"` confirming the job started
* Then, a webhook with `status: "completed"` containing a presigned URL to download the results CSV with created patient IDs
* Or, a webhook with `status: "failed"` containing a `reason` explaining what went wrong
* Download URLs are valid for 3 minutes
**Recommended flow:**
1. Call [Bulk Create Patient](/medical-api/api-reference/patient/bulk-create-patient) with a CSV file
2. Receive webhooks as the job progresses
3. Download the results CSV from the presigned URL
```json theme={null}
{
"meta": {
"messageId": "11111111-1111-1111-1111-111111111111",
"requestId": "22222222-2222-2222-2222-222222222222",
"when": "2024-12-30T05:05:12.215Z",
"type": "medical.bulk-patient-create"
},
"bulkPatientCreate": {
"requestId": "22222222-2222-2222-2222-222222222222",
"status": "completed",
"result": ""
}
}
```
Metadata about the message. The full format is described [here](/medical-api/getting-started/webhooks#meta-data).
Always `medical.bulk-patient-create`.
The ID of the bulk create request that initiated this webhook.
The bulk patient create job status.
The ID of this bulk patient create job.
One of `processing`, `completed`, or `failed`.
Reason for failure. Only present when status is `failed`.
Presigned URL to download the results CSV. Valid for 3 minutes. Only present when status is `completed`.
***
### `medical.document-bulk-download-paged`
You'll receive this webhook after invoking a bulk document download via [POST Bulk Get Document URL](/medical-api/api-reference/document/download-url-bulk).
The payload provides presigned download URLs for all documents belonging to the specified patients.
When there are many documents, the payload is automatically split into multiple webhook pages to keep each under 200KB.
Each page shares the same `requestId` but has a unique `messageId`. Use the `pagination` field to determine the
current page number and total pages.
* Download URLs are valid for 10 minutes
* Pages are sent sequentially with a 50ms delay between them
If you're receiving the legacy
`medical.document-bulk-download-urls` webhook, please
contact us to migrate to
`medical.document-bulk-download-paged`.
```json theme={null}
{
"meta": {
"messageId": "11111111-1111-1111-1111-111111111111",
"requestId": "22222222-2222-2222-2222-222222222222",
"when": "2023-11-30T05:05:12.215Z",
"type": "medical.document-bulk-download-paged"
},
"patients": [
{
"status": "completed",
"patientId": "00000000-0000-0000-0000-000000000000",
"externalId": "1234567890",
"additionalIds": {
"athenahealth": ["99992"]
},
"documents": [
{
"id": "33333333-3333-3333-3333-333333333333",
"size": 40670,
"fileName": "document.xml",
"description": "Patient Diagnoses",
"status": "current",
"indexed": "2019-09-07T15:50:00.000Z",
"mimeType": "application/xml",
"url": "",
"downloadUrl": "https://api.metriport.com/medical/v1/document/download-url?fileName=..."
}
],
"pagination": {
"page": 1,
"totalPages": 3,
"totalItems": 150
}
}
]
}
```
Metadata about the message. The full format is described [here](/medical-api/getting-started/webhooks#meta-data).
Always `medical.document-bulk-download-paged`.
The ID of the bulk download request that initiated this webhook.
When documents are split across multiple webhook pages,
all pages share the same `requestId` but each has a unique
`messageId` in the `meta` field. Use the `pagination`
field to determine the current page number and the total
number of pages (`totalPages`).
Webhooks are sent sequentially with a 50ms delay between
pages to avoid overwhelming your webhook endpoint.
***
## Message Events
**Prefix:** `message.*`
Message events cover both directions of secure messaging - outbound delivery status for messages you send, and inbound notifications when another practitioner sends a message to you.
### Event Types
| Event | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------------- |
| `message.status` | Final delivery status for an outbound [Send Message](/medical-api/api-reference/message/send-message) request |
| `message.received` | A new message received from another practitioner |
***
### `message.status`
You'll receive this webhook after invoking [POST Send Message](/medical-api/api-reference/message/send-message).
The payload reports the final delivery status of the message — either when the recipient acknowledges receipt, or when delivery fails.
You will receive one webhook per send request, with a status of `completed` or `failed` based on the outcome of the operation.
**Recommended flow:**
1. Call [Send Message](/medical-api/api-reference/message/send-message) for a patient
2. Receive this webhook when delivery completes or fails
3. Optionally confirm status via [Get Message Status](/medical-api/api-reference/message/get-message-status)
**Completed (recipient acknowledged receipt):**
```json theme={null}
{
"meta": {
"requestId": "00000000-0000-0000-0000-000000000000",
"when": "2026-06-16T18:42:11.000Z",
"type": "message.status"
},
"payload": {
"id": "00000000-0000-0000-0000-000000000000",
"patientId": "00000000-0000-0000-0000-000000000000",
"status": "completed",
"updatedAt": "2026-06-16T18:42:11.000Z"
}
}
```
Metadata about the message. The full format is described [here](/medical-api/getting-started/webhooks#meta-data).
Always `message.status`.
The ID of the send message request that initiated this webhook.
Matches the `messageId` returned by [Send Message](/medical-api/api-reference/message/send-message).
The message delivery status.
The ID of the message. Matches the `messageId` returned by [Send Message](/medical-api/api-reference/message/send-message).
The Patient ID the message relates to.
One of `completed` or `failed`. `completed` means the recipient acknowledged receipt.
ISO 8601 timestamp of when the message reached its final status.
Reason for failure. Only present when status is `failed`.
***
### `message.received`
You'll receive this webhook when another practitioner sends a secure message to your organization.
The payload includes the message metadata and a presigned URL to download the full message content and attachments.
**Recommended flow:**
1. Receive this webhook
2. Download the message from the `url` in the payload
3. Process the message and associated patient data in your application
```json theme={null}
{
"meta": {
"requestId": "00000000-0000-0000-0000-000000000000",
"when": "2026-06-16T18:42:11.000Z",
"type": "message.received"
},
"payload": {
"url": "",
"id": "00000000-0000-0000-0000-000000000000",
"patientId": "00000000-0000-0000-0000-000000000000",
"sender": "direct.example@hospital.org",
"intendedRecipients": ["Dr. John Doe", "1234567890"],
"subject": "Consult Summary",
"receivedAt": "2026-06-16T18:42:11.000Z"
}
}
```
Metadata about the message. The full format is described [here](/medical-api/getting-started/webhooks#meta-data).
The ID of the send message request that initiated this webhook.
Matches the `messageId` returned by [Send Message](/medical-api/api-reference/message/send-message).
Always `message.received`.
The received message details.
A presigned URL to download the full message content. Valid for 3 minutes.
The ID of the received message.
The Patient ID the message relates to, if Metriport was able to match the message to a patient in your account.
The Direct address or OID of the sending organization.
The NPIs or short string descriptions of intended recipients
The subject line of the message.
ISO 8601 timestamp of when the message was received.
***
## Patient Notification Events
**Prefix:** `patient.*`
Patient Notification events provide **real-time ADT (Admission, Discharge, Transfer), Pharmacy, and/or Laboratory** updates.
These are part of [Real-time Patient Notifications](/medical-api/handling-data/realtime-patient-notifications).
### Event Types
| Event | Description |
| -------------------- | ------------------------------------------------------ |
| `patient.laboratory` | Patient has received Laboratory data |
| `patient.pharmacy` | Patient has received Medication data |
| `patient.admit` | Patient has been admitted to a healthcare facility |
| `patient.transfer` | Patient has been transferred between locations |
| `patient.discharge` | Patient has been discharged from a healthcare facility |
To enable patient notifications, configure them in a
[Cohort](/medical-api/handling-data/cohorts) and associate
the patients you want to monitor.
Each webhook includes a `url` to download a FHIR Bundle containing the complete encounter data.
```json theme={null}
{
"meta": {
"messageId": "11111111-1111-1111-1111-111111111111",
"requestId": "22222222-2222-2222-2222-222222222222",
"when": "2025-01-30T23:00:01.000Z",
"type": "patient.admit"
},
"payload": {
"url": "",
"patientId": "00000000-0000-0000-0000-000000000000",
"externalId": "1234567890",
"additionalIds": {
"athenahealth": ["99992"]
},
"admitTimestamp": "2025-01-28T23:00:00.000Z"
}
}
```
See the complete Real-time Patient Notifications guide for
detailed schemas, all event types, and the FHIR Encounter
model.
***
## Individual Access (IAS) Events
**Prefix:** `ias.*`
IAS-specific events are delivered to the same webhook URL you configure for the Medical API. For the
full Individual Access flow, see [Individual Access (IAS)](/medical-api/getting-started/ias).
### Event Types
| Event | Description |
| ------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [`ias.identity.verified`](#ias-identity-verified) | The user completed hosted identity verification; includes `proofedIdentityId` for IAS queries |
### `ias.identity.verified`
Sent when the user successfully completes the hosted identity session started with
[Create Identity Session](/medical-api/api-reference/ias/create-identity-session). Store the
`proofedIdentityId` from this payload and pass it on
[Start Network Query](/medical-api/api-reference/network/start-network-query) requests where the
`purposeOfUse` query parameter is `ias`.
**Example payload:**
```json theme={null}
{
"meta": {
"messageId": "33333333-3333-3333-3333-333333333333",
"when": "2026-04-29T14:52:11.000Z",
"type": "ias.identity.verified",
"data": {
"sessionId": "ids_018f7c2f..."
}
},
"payload": {
"patientId": "018f7c31-bbbb-7bbb-7bbb-7bbbbbbbbbbb",
"proofedIdentityId": "pid_018f7c30-aaaa-4aaa-4aaa-4aaaaaaaaaaa",
"status": "active"
}
}
```
| Field | Description |
| ------------------- | ---------------------------------------------------------------- |
| `patientId` | Metriport patient the verified identity is attached to |
| `proofedIdentityId` | Identifier to pass as `proofedIdentityId` on IAS network queries |
| `status` | Identity record status (for example `active`) |
Any `metadata` you supplied when creating the identity session is echoed under `meta.data` when
configured for your integration.
***
## Passing Metadata
You can pass metadata when calling endpoints that support webhooks. This metadata will be returned in the `meta.data` field of the webhook. You may use this to attach whatever metadata is relevant for your use-case - for example, external IDs.
Below is an example payload you could send in the request body of one of those endpoints and how you would use the sdk:
Note that the `metadata` param supports up to 50 custom string key-value pairs, with keys up to 40 chars, and values of up to 500 chars.
# Get Document Query Status (Legacy)
Source: https://docs.metriport.com/medical-api/legacy-api-reference/document/get-document-query
GET /medical/v1/document/query
Returns the document query status for the specified patient.
**Legacy Endpoint:** This endpoint is deprecated. We recommend using the [Network Query](/medical-api/api-reference/network/start-network-query) flow instead, which can query all available health data networks (HIEs, pharmacies, and laboratories) in a single call, and returns a direct URL to the updated patient record.
Returns the document query status and a request ID for the specified patient - use this to check the progress of the document query.
See more on [Start Document Query](/medical-api/legacy-api-reference/document/start-document-query).
To get updates about the document query progress, including download and conversion status, check
out our [webhooks guide](/medical-api/handling-data/webhooks).
## Query Params
The ID of the Patient for which to return the status of document querying across HIEs.
## Response
```json theme={null}
{
"download": {
"status": "completed",
"total": 100,
"successful": 95,
"errors": 5
},
"convert": {
"status": "processing",
"total": 20,
"successful": 15,
"errors": 1
},
"requestId": "018a80c4-292a-7486-a223-6dcbc636c44c"
}
```
```javascript Metriport SDK theme={null}
import { MetriportMedicalApi } from "@metriport/api-sdk";
const metriport = new MetriportMedicalApi("YOUR_API_KEY");
const status = await metriport.getDocumentQueryStatus({
patientId: "018a80c4-292a-7486-a1234-76yuhe23yu14",
});
```
# Start Document Query (Legacy)
Source: https://docs.metriport.com/medical-api/legacy-api-reference/document/start-document-query
POST /medical/v1/document/query
Triggers a document query for the specified patient across HIEs.
**Legacy Endpoint:** This endpoint is deprecated. We recommend using the [Network Query](/medical-api/api-reference/network/start-network-query) endpoint instead, which can query all available health data networks (HIEs, pharmacies, and laboratories) in a single call, and returns a direct url to the updated patient record.
When executed, this endpoint triggers an asynchronous document query across HIEs. This is a two step process where the documents will
first be downloaded from the respective HIE and, if they are C-CDA/XML, then converted to FHIR.
Each process (download, conversion) will contain its own `total` and `status` as well as the count for `successful` operations and `errors`.
When the asynchronous document query finishes, it stores new/updated document references for future requests and
updates the status of download to `completed`. Meanwhile, in the background, files will be converted and the convert count will be
incremented. Once all documents have been converted it too will be marked as `completed`.
If there's no document to be converted, the total will be set to zero and the status to `completed`.
Once each process completes, a webhook request will be sent to [your configured URL](/medical-api/api-reference/settings/post-settings)
containing the available data. **Note:** the webhooks will only contain updates for new data fetched in the current document query.
Webhook message types - see [the respective section on the webhooks page](/medical-api/handling-data/webhooks#patient-document-data)
for more details:
* `medical.document-download`: contains the newly downloaded documents for the patient;
* `medical.document-conversion`: result of converting the newly downloaded C-CDA documents into FHIR.
If you were to trigger this endpoint again while the query is still processing, you will get a
response that reflects the current query progress. So essentially, only a single document query
will be running for a patient at any given time.
## Query Params
The ID of the Patient for which to list available Documents.
The ID of the Facility where the patient is receiving care.
When set to `true`, the document query will also request detailed medication history nationally across pharmacies and PBMs,
including advanced insights like fill data - allowing you to know whether the patient picked up their medications, for example.
This will retrieve up to one year of medication history.
## Body
## Response
```json theme={null}
{
"download": {
"status": "processing"
},
"requestId": "018a80c4-292a-7486-a223-6dcbc636c44c"
}
```
```javascript Metriport SDK theme={null}
import { MetriportMedicalApi } from "@metriport/api-sdk";
const metriport = new MetriportMedicalApi("YOUR_API_KEY");
const status = await metriport.startDocumentQuery(
"018a80c4-292a-7486-a1234-76yuhe23yu14", // Patient
"018a80c4-292a-7486-a1234-9uiu76yhe234", // Facility
{
youCan: "putAny",
stringKeyValue: "pairsHere",
}
);
```
## Rate Limits
See [limits and throttling](/medical-api/more-info/limits#rate-limits)
# Error Responses
Source: https://docs.metriport.com/medical-api/more-info/error-responses
Learn more about our standardized error responses.
## Overview
In the event that there's an issue when making a request to our API, we'll return a
standardized error response that describes the nature of the error in detail.
Read more below to get familiar with the error response format.
Our error responses are based on the [RFC 7807 format](https://www.rfc-editor.org/rfc/rfc7807) - a
widely used standard for HTTP APIs.
## Format
```json theme={null}
{
"status": 404,
"name": "NOT_FOUND",
"title": "NotFoundError",
"detail": "Could not find organization Devault Medical"
}
```
Numeric HTTP status code.
Human-readable description of the status code.
The specific error description - this wont't change between occurences of the same error.
Details about this error occurrence - this might change between occurences.
# Avoid mid-air collisions
Source: https://docs.metriport.com/medical-api/more-info/etag
ETag support to prevent mid-air collisions
To prevent updating stale data - which can lead to data loss, we recommend the usage of
[ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag).
Resources returned by Metriport's Medical API include an `eTag` property, which can later on be sent back to the API
when performing an update on said data.
The API will then compare that ETag with the one on the repository: if they don't
match it means data was updated by another process and the server will abort the update and respond with
[412 - Precondition Failed](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/412); otherwise it will proceed
updating the resource.
To send the ETag to an `update` endpoint, you can use the `If-Match` HTTP header, or include an `eTag` property
on the request body. The header takes precedence if both are informed.
The SDK implements this automatically, as long as the data obtained from a `get` or `list` function is updated and sent to
the respective `update` function. Example:
```typescript theme={null}
const patient = await metriportClient.getPatient("...");
// logic that updates the patient
...
// this update will automatically send the ETag if present on patient
await metriportClient.updatePatient(patient, facilityId);
```
If no ETag is provided the API will perform updates without checking for mid-air collisions.
This technique is also called
[Optimistic Locking](https://en.wikipedia.org/wiki/Optimistic_concurrency_control#Web_usage).
Note that currently we only support ETag to prevent mid-air collisions, not for caching purposes.
# General Information
Source: https://docs.metriport.com/medical-api/more-info/general-info
General information about Metriport's Medical API
These are additional information that might help you get the most out of our Medical API.
The base URL for the API is [https://api.metriport.com](https://api.metriport.com)
The URL for the Sandbox is [https://api.sandbox.metriport.com](https://api.sandbox.metriport.com) (more about Sandbox [here](#sandbox-mode))
# Limits and throttling
Source: https://docs.metriport.com/medical-api/more-info/limits
Information about Metriport's limits related to request size and request frequency.
## Rate Limits
The following table outlines the current limits for certain operations on the Metriport platform.
If your request pattern needs higher limits, please reach out to `support@metriport.com`.
### General Operations
| Operation | Max requests per minute | Request rate |
| :--------------------------------------------------------------------------------------------------------------------------------- | :---------------------: | :---------------: |
| [Patient Create](/medical-api/api-reference/patient/create-patient) or [Update](/medical-api/api-reference/patient/update-patient) | 15 | 1 every 4 seconds |
| [Document Query Start](/medical-api/legacy-api-reference/document/start-document-query) (Legacy) | 20 | 1 every 3 seconds |
| [Consolidated Data Query Start](/medical-api/api-reference/fhir/consolidated-data-query-post) | 120 | 2 every 1 second |
| [Patient Consolidated Create](/medical-api/api-reference/fhir/create-patient-consolidated) | 120 | 2 every 1 second |
### Network Query
| Source | Max requests per minute | Request rate |
| :----------------------------------------------------------------- | :---------------------: | :---------------: |
| [HIE](/medical-api/api-reference/network/start-network-query) | 20 | 1 every 3 seconds |
| [Labs](/medical-api/api-reference/network/start-network-query) | 20 | 1 every 3 seconds |
| [Pharmacy](/medical-api/api-reference/network/start-network-query) | 20 | 1 every 3 seconds |
# SAML/Enterprise SSO
Source: https://docs.metriport.com/medical-api/more-info/sso
Guide to setting up SAML/Enterprise SSO.
SAML SSO support your organization to connect to your own identity provider (e.g. Okta, Azure AD, JumpCloud, etc).
## Setup
First, ask the Metriport team for a link to setup SAML/SSO for your account.
This will be a sensitive, unauthenticated link, so please
only share it with the person who manages your
organization's users, if needed.
We support the following Identity Providers with a step-by-step guide:
* Google
* Okta
* Azure
* OneLogin
* JumpCloud
* Duo
* Rippling
* For Identity Providers not on this list you can choose "other" - we'll guide you through a generic SAML setup guide.
Some tips for setting it up:
* Mapping user attributes from your Identity Provider to Metriport:
* Use these fields for the Metriport side of the user attribute mapping:
* `email`
* `first_name`
* `last_name`
* For details about the user groups/roles available at Metriport, see our documentation: [User Roles](/medical-api/more-info/user-roles)
* At the end, you'll see a "You're almost done" page. Please be sure to test the setup before completing the process:
* Click on "Test connection" - if it's successful, you should see a page with the user attributes mapping for the account you chosen on your Identity Provider.
* It might take a few minutes for the new setup to be available on your Identity Provider.
* When done ("SAML setup complete"), we'll show you a URL that you can use to point your users directly to the account selection when signing into Metriport. This URL is only displayed once, so make sure to copy it before closing the page.
When you open the link, you'll see this page, where you should choose the SAML provider:
## Google Example
Other Identity Providers (IDP) might have different steps,
so use the numbered steps pertaining to Google as a
reference.
These steps will guide you through the process of setting up SAML/SSO for Google, and will be similar for other providers.
### Step 1
The first step is just an introduction to how to create a SAML app on Google:
### Step 2
Here you should copy info from Google into Metriport. Those are easily accessible on Google's SAML setup.
### Step 3
Now it's time to copy some info from Metriport into your SAML server. There should be a fairly equivalent field/property on your SAML server matching the fields `ACS URL` and `SP Entity ID`.
### Step 4
Now, Metriport will display a recommendation for mapping user attributes.
It only includes `email` on the list of fields to copy, but you can safely use the `first_name` and `last_name` to map the respective fields to Metriport.
There are no other fields to be mapped beyond those (groups will be done on the next step).
### Step 5
Here you can map your groups to Metriport groups - for more info about our groups, see [Groups](/medical-api/more-info/user-roles).
### Last Steps
Once the setup is done, Metriport will display a window asking you to validate the SSO setup.
It might take a few minutes after your SAML provider is setup for it to be fully available.
You should `Test connection` before "Finish and go live".
When you click `Test connection` (and your SAML provider is set and enabled), you should see a page like this:
Then, after you click on `Test connection` you should get a page with a link to the SAML/SSO login.
This URL can be used by your users to create an internal URL to login to Metriport bypassing the login page.
Opening the URL above with Google set as the SAML provider returns the Google account selector:
Upon the first login you'll ask your users to confirm their email:
From then on, once your users choose their account on the SAML provider they get directed to the Metriport dashboard.
If your users go straight to [Metriport Dashboard](https://dash.metriport.com/) they'll get the regular login page:
If your users enter an email associated with an Org that has SAML/SSO enabled, then that SAML provider's login/account page will be displayed (Google's in this case).
Otherwise, the `password` field will be displayed:
# User Roles & Permissions
Source: https://docs.metriport.com/medical-api/more-info/user-roles
Manage Users and Roles in Metriport
## Overview
Metriport provides a robust user management system that allows you to control access to your account via the dashboard. This guide will walk you through viewing users, inviting new team members, and understanding the different user roles and their permissions.
## Viewing Users
To view all users in your organization:
1. Navigate to the Users page from the left sidebar
2. You'll see a table listing all users with
their:
* Email address
* Assigned role
* Current status (Active/Pending)
3. Use the search bar at the top to filter users by email address
## Inviting Users
To invite a new user to your Metriport account:
1. Click the "Invite user" button at the top of the Users page
2. Enter the user's email address
3. Select their role from the dropdown menu
4. Click "Invite"
## User Roles & Permissions
Metriport offers several roles to help you manage access levels appropriately. Each role has specific permissions designed to provide the right level of access for different team members:
| Role | Manage users and roles | Access billing and subscription | Access clinical data | Access developer features |
| --------- | :--------------------: | :-----------------------------: | :------------------: | :-----------------------: |
| Owner | ✓ | ✓ | ✓ | ✓ |
| Admin | ✓ | ✓ | ✓ | ✓ |
| Clinical | | | ✓ | |
| Billing | | ✓ | | |
| Developer | | | ✓ | ✓ |
## Removing Users
To permanently remove a user's access:
1. Navigate to the Users page
2. Find the user you want to delete
3. Click on the "..." menu in the row
4. Select "Remove User"
5. Confirm the action when prompted
Removing a user will revoke their access to your Metriport account immediately. They will no
longer be able to log in or access any Metriport features associated with your account.