> ## 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 Result

> Event payload details and trigger documentation for Lab Result data from Healthie

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

# Events

## Triggering Webhook Types

The following event types are associated with the Lab Result event payload from Healthie.

* `Healthie Lab Result Created`
* `Healthie Lab Result Updated`

<RequestExample>
  ```json Example theme={null}
  {
    "created_at": "2024-07-01T11:29:19+00:00",
    "document": {
      "id": "3265"
    },
    "id": "8492013",
    "interpretation": null,
    "lab_observation_requests": [
      {
        "id": "1827364",
        "lab_analyte": "005009^CBC With Differential/Platelet^RN",
        "lab_observation_results": [
          {
            "abnormal_flag": "H",
            "id": "9182734",
            "interpretation": null,
            "is_abnormal": false,
            "notes": "Sample was hemolyzed",
            "qualitative_result": "Positive",
            "quantitative_result": "5.4",
            "reference_range": "4.0-6.0",
            "units": "mg/dL"
          }
        ]
      }
    ],
    "lab_order_id": "1029384",
    "ordering_physician_id": "131391",
    "patient_id": "131392",
    "result_type": "Complete Blood Count",
    "status_flag": "final"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Description theme={null}
  {
    "created_at": "The time the lab result record was created",
    "document": {
      "id": "ID of the document"
    },
    "id": "The unique identifier of the lab result",
    "interpretation": "The interpretation of the lab result",
    "lab_observation_requests": {
      "id": "The unique identifier of the lab observation request",
      "lab_analyte": "The name of the lab analyte",
      "lab_observation_results": {
        "abnormal_flag": "The flag of abnormality in the observation",
        "id": "The unique identifier of the lab observation result",
        "interpretation": "The interpretation of the lab observation result",
        "is_abnormal": "True indicates the result is abnormal",
        "notes": "The notes of the lab observation",
        "qualitative_result": "The qualitative result of the lab observation",
        "quantitative_result": "The quantitative result of the lab observation",
        "reference_range": "The reference range of the lab observation",
        "units": "The units of the lab observation measurement"
      }
    },
    "lab_order_id": "The ID of the corresponding lab order",
    "ordering_physician_id": "ID of the Ordering Physician for the lab result",
    "patient_id": "ID of the Patient for the lab result",
    "result_type": "The type of the lab result",
    "status_flag": "The status of the result"
  }
  ```
</ResponseExample>

### Payload Field Details

<ResponseField name="Lab Result" type="Event Payload">
  <Expandable title="fields" defaultOpen="true">
    <ResponseField name="id" type="string" required>
      The unique identifier of the lab result

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

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

    <ResponseField name="created_at" type="timing.v1.Timestamp" required>
      The time the lab result record was created

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

      ```json Example theme={null}
      "2024-07-01T11:29:19+00:00"
      ```
    </ResponseField>

    <ResponseField name="document" type="object">
      Document for the lab result

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

      ```json Example theme={null}
      {
      "id": "3265"
      }
      ```
    </ResponseField>

    <ResponseField name="document.id" type="string">
      ID of the document

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

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

    <ResponseField name="interpretation" type="healthie.v1.LabOrderInterpretation" required>
      The interpretation of the lab result

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

      ```json Example theme={null}
      healthie.v1.LabOrderInterpretation.LAB_ORDER_INTERPRETATION_UNKNOWN
      healthie.v1.LabOrderInterpretation.LAB_ORDER_INTERPRETATION_NORMAL
      healthie.v1.LabOrderInterpretation.LAB_ORDER_INTERPRETATION_ABNORMAL
      healthie.v1.LabOrderInterpretation.LAB_ORDER_INTERPRETATION_CRITICAL
      ```
    </ResponseField>

    <ResponseField name="lab_observation_requests" type="[]object" required>
      Lab observation requests for the lab result

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

      ```json Example theme={null}
      [
      {
      "id": "1827364",
      "lab_analyte": "005009^CBC With Differential/Platelet^RN",
      "lab_observation_results": [
      {
        "abnormal_flag": "H",
        "id": "9182734",
        "interpretation": null,
        "is_abnormal": false,
        "notes": "Sample was hemolyzed",
        "qualitative_result": "Positive",
        "quantitative_result": "5.4",
        "reference_range": "4.0-6.0",
        "units": "mg/dL"
      }
      ]
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="lab_observation_requests.map(x, x.id)" type="[]string" required>
      Mapped array of: The unique identifier of the lab observation request

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

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

    <ResponseField name="lab_observation_requests.map(x, x.lab_analyte)" type="[]string" required>
      Mapped array of: The name of the lab analyte

      ```json CEL theme={null}
      lab_observation_requests.map(x, x.lab_analyte)
      ```

      ```json Example theme={null}
      [
      "005009^CBC With Differential/Platelet^RN"
      ]
      ```
    </ResponseField>

    <ResponseField name="lab_observation_requests.map(x, x.lab_observation_results)" type="[]bool" required>
      Mapped array of: Lab observation results for the lab observation request

      ```json CEL theme={null}
      lab_observation_requests.map(x, x.lab_observation_results)
      ```

      ```json Example theme={null}
      [
      [
      {
      "abnormal_flag": "H",
      "id": "9182734",
      "interpretation": null,
      "is_abnormal": false,
      "notes": "Sample was hemolyzed",
      "qualitative_result": "Positive",
      "quantitative_result": "5.4",
      "reference_range": "4.0-6.0",
      "units": "mg/dL"
      }
      ]
      ]
      ```
    </ResponseField>

    <ResponseField name="interpretation" type="healthie.v1.LabOrderInterpretation" required>
      Mapped array of: Lab observation results for the lab observation request

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

      ```json Example theme={null}
      healthie.v1.LabOrderInterpretation.LAB_ORDER_INTERPRETATION_UNKNOWN
      healthie.v1.LabOrderInterpretation.LAB_ORDER_INTERPRETATION_NORMAL
      healthie.v1.LabOrderInterpretation.LAB_ORDER_INTERPRETATION_ABNORMAL
      healthie.v1.LabOrderInterpretation.LAB_ORDER_INTERPRETATION_CRITICAL
      ```
    </ResponseField>

    <ResponseField name="lab_order_id" type="string" required>
      The ID of the corresponding lab order

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

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

    <ResponseField name="ordering_physician_id" type="string">
      `ID` ID of the Ordering Physician for the lab result

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

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

    <ResponseField name="patient_id" type="string">
      `ID` ID of the Patient for the lab result

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

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

    <ResponseField name="result_type" type="string">
      The type of the lab result

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

      ```json Example theme={null}
      "Complete Blood Count"
      ```
    </ResponseField>

    <ResponseField name="status_flag" type="string">
      The status of the result

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

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