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

# Lab Results

> Event payload details and trigger documentation for Lab Results data from Axle Health

<img src="https://mintcdn.com/morfhealth/EU2WCxuXGIUQcziR/images/axle_health.svg?fit=max&auto=format&n=EU2WCxuXGIUQcziR&q=85&s=96cdb854e9d03c30297bf8a5bcc8c0bf" alt="images/axle_health.svg" width="40" height="40" data-path="images/axle_health.svg" />

# Events

## Triggering Webhook Types

The following event types are associated with the Lab Results event payload from Axle Health.

* `Axle Health Lab Order Results Update`

<RequestExample>
  ```json Example theme={null}
  {
    "id": "bb9aebf8-baaa-4c46-9654-51e5a8dafe40",
    "panels": [
      {
        "id": "102525",
        "name": "Hgb A1c with eAG Estimation",
        "results": [
          {
            "abnormal_flag": "really unusual",
            "id": "1481",
            "name": "Hemoglobin A1c",
            "reference_range_high": null,
            "reference_range_low": null,
            "type": "quantity",
            "unit": "ug/ml",
            "value": null
          }
        ]
      }
    ],
    "patient_id": "bb9aebf8-baaa-4c46-9654-51e5a8dafe40lkefbh",
    "reported_at": "2023-04-24T10:07:00",
    "status": "complete",
    "type": "lab_results",
    "visit_id": "bb9aebf8-baaa-4c46-9654-51e5a8dafe40iofy"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Description theme={null}
  {
    "id": "Unique identifier for the lab results",
    "panels": {
      "id": "Unique identifier for the panel",
      "name": "Name of the panel",
      "results": {
        "abnormal_flag": "Flag indicating if the result is abnormal",
        "id": "Unique identifier for the result",
        "name": "Name of the test result",
        "reference_range_high": "The high end of the reference range (in the same units)",
        "reference_range_low": "The low end of the reference range (in the same units)",
        "type": "Type of the result value (e.g., quantity, blood, white blood)",
        "unit": "Unit of measurement for the result",
        "value": "The value of the result (in the given units)"
      }
    },
    "patient_id": "ID of the patient",
    "reported_at": "When these lab results were reported",
    "status": "Status of the lab results",
    "type": "Type of the record, always 'lab_results' for LabResults messages",
    "visit_id": "ID of the associated visit"
  }
  ```
</ResponseExample>

### Payload Field Details

<ResponseField name="Lab Results" type="Event Payload">
  <Expandable title="fields" defaultOpen="true">
    <ResponseField name="type" type="string" required>
      Type of the record, always 'lab\_results' for LabResults messages

      ```json CEL theme={null}
      type
      ```

      ```json Example theme={null}
      "lab_results"
      ```
    </ResponseField>

    <ResponseField name="id" type="string" required>
      Unique identifier for the lab results

      ```json CEL theme={null}
      id
      ```

      ```json Example theme={null}
      "bb9aebf8-baaa-4c46-9654-51e5a8dafe40"
      ```
    </ResponseField>

    <ResponseField name="visit_id" type="string" required>
      ID of the associated visit

      ```json CEL theme={null}
      visit_id
      ```

      ```json Example theme={null}
      "bb9aebf8-baaa-4c46-9654-51e5a8dafe40iofy"
      ```
    </ResponseField>

    <ResponseField name="patient_id" type="string" required>
      ID of the patient

      ```json CEL theme={null}
      patient_id
      ```

      ```json Example theme={null}
      "bb9aebf8-baaa-4c46-9654-51e5a8dafe40lkefbh"
      ```
    </ResponseField>

    <ResponseField name="status" type="string">
      Status of the lab results

      ```json CEL theme={null}
      status
      ```

      ```json Example theme={null}
      "complete"
      ```
    </ResponseField>

    <ResponseField name="reported_at" type="timing.v1.Timestamp">
      When these lab results were reported

      ```json CEL theme={null}
      reported_at
      ```

      ```json Example theme={null}
      "2023-04-24T10:07:00"
      ```
    </ResponseField>

    <ResponseField name="panels" type="[]object" required>
      *Description coming soon*

      ```json CEL theme={null}
      panels
      ```

      ```json Example theme={null}
      [
      {
      "id": "102525",
      "name": "Hgb A1c with eAG Estimation",
      "results": [
      {
        "abnormal_flag": "really unusual",
        "id": "1481",
        "name": "Hemoglobin A1c",
        "reference_range_high": null,
        "reference_range_low": null,
        "type": "quantity",
        "unit": "ug/ml",
        "value": null
      }
      ]
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="panels.map(x, x.id)" type="[]string" required>
      Mapped array of: Unique identifier for the panel

      ```json CEL theme={null}
      panels.map(x, x.id)
      ```

      ```json Example theme={null}
      [
      "102525"
      ]
      ```
    </ResponseField>

    <ResponseField name="panels.map(x, x.name)" type="[]string" required>
      Mapped array of: Name of the panel

      ```json CEL theme={null}
      panels.map(x, x.name)
      ```

      ```json Example theme={null}
      [
      "Hgb A1c with eAG Estimation"
      ]
      ```
    </ResponseField>

    <ResponseField name="panels.map(x, x.results)" type="[]bool" required>
      *Description coming soon*

      ```json CEL theme={null}
      panels.map(x, x.results)
      ```

      ```json Example theme={null}
      [
      [
      {
      "abnormal_flag": "really unusual",
      "id": "1481",
      "name": "Hemoglobin A1c",
      "reference_range_high": null,
      "reference_range_low": null,
      "type": "quantity",
      "unit": "ug/ml",
      "value": null
      }
      ]
      ]
      ```
    </ResponseField>
  </Expandable>
</ResponseField>
