In order to standardize medical data coming from a variety of sources, Metriport makes use of the HL7 FHIR R4 data standard.

What is FHIR?

FHIR (pronounced fire🔥) is a data standard that represents various healhcare concepts, and is used to facilitate interoperability between healthcare IT systems.

You can think of it like this: every API has a spec, along with some data models, so that different systems can communicate with the API - FHIR is the modern spec that allows healthcare IT systems to communicate with each other.

Resources & Data Types

After you initiate a new document query for a given patient, Metriport will automatically convert any newly found C-CDA documents from XML to the corresponding FHIR Resources in JSON.

A FHIR Resource is a representation of some concept related to healthcare. Some examples include:

  • Encounter: an interaction between a patient and healthcare provider(s).
  • MedicationRequest: an order or request for both supply of the medication and the instructions for administration of the medication to a patient.
  • Observation: measurements about a patient - ie weight, height, blood pressure, etc.

In JSON, an Observation Resource would look like this, for example:

{
  "resourceType": "Observation",
  "id": "D19DA918-0F16-11EE-B2A6-A2F55214B7C1",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2023-06-19T15:37:06.127+00:00",
    "source": "https://api.metriport.com/cda/to/fhir#flkjasdfoiueh"
  },
  "extension": [
    {
      "url": "https://public.metriport.com/fhirextensions#observation-documentDate",
      "valueDateTime": "2019-02-22T16:24:00+00:00"
    },
    {
      "url": "https://public.metriport.com/fhirextensions#observation-documentType",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "https://public.metriport.com/codes/Proprietary/DocumentType",
            "code": "CCD Vitals",
            "display": "CCD Vitals",
            "userSelected": true
          }
        ]
      }
    },
    {
      "url": "https://public.metriport.com/fhir/StructureDefinition/doc-id-extension.json",
      "valueString": "1A5512D2-0EE9-11EE-B2A6-A2F55214B7C1-MLKJ392874kjshhKJSHDFdskjfh98234uiy"
    }
  ],
  "status": "unknown",
  "category": [
    {
      "coding": [
        {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "vital-signs",
          "userSelected": false
        }
      ],
      "text": "vital-signs"
    }
  ],
  "code": {
    "coding": [
      {
        "system": "urn:oid:2.16.840.1.113883.6.1",
        "code": "8302-2",
        "display": "Body height",
        "userSelected": true
      },
      {
        "system": "http://loinc.org",
        "code": "8302-2",
        "display": "Body height",
        "userSelected": false
      }
    ]
  },
  "subject": {
    "reference": "Patient/2.16.840.1.113883.3.9621.666"
  },
  "encounter": {
    "reference": "Encounter/D19DA9AE-0F16-11EE-B2A6-A2F55214B7C1"
  },
  "effectiveDateTime": "2019-02-22T16:24:00+00:00",
  "issued": "2019-02-22T16:24:00+00:00",
  "valueQuantity": {
    "value": 167.6,
    "unit": "centimeter",
    "system": "http://unitsofmeasure.org",
    "code": "cm"
  }
}

You’re able to query for a Patient’s FHIR Resources using the Get Patient’s Consolidated Data Endpoint.

Additionally, to meet data contribution requirements, you’re able to provide new data about a Patient using the Add Patient Data endpoint.

You can see the HL7 FHIR Resource Index for an overview of various FHIR Resources by category, as well as our Resource List.

FHIR Resources each have their own specification for properties that may be included in the Resource, and they may contain one or more of the defined Data Types.

Extensions

The FHIR specification is fairly flexible, and it allows for additions on every base resource through “Extensions”. This allows healthcare IT systems to provide more information to the resource, that may be relevant to their specific implementation.

Extensions can be available under the extension property on any FHIR Resource, and also have their own specification for data they can contain.

For example, Metriport introduces a Document ID extension that allows you to get the C-CDA Document ID for which any given FHIR Resource is derived from.