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

> Event payload details and trigger documentation for Lab Order data from Elation

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

# Events

## Triggering Webhook Types

The following event types are associated with the Lab Order event payload from Elation.

* `Elation Lab Order Outstanding`
* `Elation Lab Order Fulfilled`
* `Elation Lab Order Cancelled`
* `Elation Lab Order Deleted`

<RequestExample>
  ```json Example theme={null}
  {
    "answers": [
      {
        "created_at": "2021-03-25T04:33:40Z",
        "deleted_at": "2021-03-26T04:33:40Z",
        "question": "123",
        "test": "140748306251838",
        "value": "Yes"
      }
    ],
    "bill_type": "thirdparty",
    "ccs": "131074",
    "chart_date": "2021-03-25T04:33:40Z",
    "confidential": false,
    "content": {
      "collection_datetime": null,
      "fasting_method": "fasting_random",
      "icd10_codes": [
        {
          "code": "D72.9",
          "description": "Disorder of white blood cells, unspecified"
        }
      ],
      "id": "140754512117861",
      "patient_instructions": "",
      "standing_order_end_date": null,
      "standing_order_frequency": "",
      "stat_method": "LAB_STAT_METHOD_WET_READING_PHONE",
      "test_center_notes": "",
      "tests": [
        {
          "code": "",
          "compendium_id": "3",
          "cpt_codes": 1,
          "created_at": "2020-01-27T16:17:43Z",
          "deleted_at": "2020-01-28T13:11:23Z",
          "id": "140748306251838",
          "lab_vendor_id": "3",
          "name": "TSH",
          "practice_created_id": "42",
          "procedure_class": "123",
          "questions": {
            "answers": [
              {
                "response": "5 cups"
              }
            ],
            "question": "Briefly describe any caffeine use - e.g. how many cups of coffee a day?"
          },
          "test_synonyms": "TSH"
        }
      ]
    },
    "created_at": "2021-03-25T04:33:40Z",
    "document_created_at": "2021-03-25T04:33:40Z",
    "facility": "123456",
    "facility_identifier": {
      "active": true,
      "bidi_connection": {
        "alias": "main-quest-conn",
        "id": "42",
        "priority": 1,
        "protocol": "HL7"
      },
      "compendium": "234900800000002",
      "created_date": "2023-01-01T12:00:00Z",
      "deleted_date": "2023-12-31T12:00:00Z",
      "description": "Main Lab Facility for Quest",
      "id": "123456",
      "lab_connection": "7890",
      "lab_facility": "QST123",
      "practice": "555555",
      "practice_facility": "ACCT98765",
      "practice_secondary_id": "SECID123",
      "user_facing": true,
      "vendor": {
        "display_name": "Quest Diagnostics",
        "id": "1001",
        "name": "quest"
      }
    },
    "follow_up_method": "phone",
    "id": "140754512183329",
    "ordering_physician_id": "140754510217218",
    "patient_id": "140754511659009",
    "practice_id": "140754506678276",
    "requisition_id": "140754512183329",
    "resolution": {
      "created_at": "2021-03-25T04:33:40Z",
      "deleted_at": "2021-03-26T04:33:40Z",
      "document": "140754512183329",
      "id": "140754511659009",
      "note": "Test cancelled due to insurance",
      "resolving_document": "140754512183329",
      "state": "LAB_ORDER_RESOLUTION_STATE_OUTSTANDING"
    },
    "signed_by": "140754510217218",
    "signed_date": "2021-03-25T04:33:40Z",
    "site": {
      "address": {
        "international_address": {
          "city_state_county_or_districts": [],
          "country": null,
          "lines": [],
          "postal_code": null
        },
        "us_address": {
          "city": null,
          "line1": null,
          "line2": null,
          "state": null,
          "zip_code": null
        }
      },
      "fax_number": "415-555-5678",
      "name": "Quest Diagnostics",
      "phone_number": "415-555-1234"
    },
    "special_insurance": {
      "code": "ABC12",
      "name": "Special Insurance Name"
    },
    "specimens": [
      {
        "body_site": {
          "code": "LA",
          "deleted_at": "2021-03-26T04:33:40Z",
          "text": "Left Arm"
        },
        "container_id": "12345",
        "description": "Blood sample",
        "modifiers": [
          {
            "code": "ANT",
            "sequence": 1,
            "text": "Anterior"
          }
        ],
        "test": "140748306251838"
      }
    ],
    "submissions": [
      {
        "state": "submitted",
        "state_metadata": "ERROR: Invalid insurance information",
        "time_acknowledged": "2021-03-25T04:34:00Z",
        "time_submitted": "2021-03-25T04:33:40Z"
      }
    ],
    "tags": [],
    "test_date": "2021-03-25",
    "vendor": "67191701750"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Description theme={null}
  {
    "answers": {
      "created_at": "When the answer was created.",
      "deleted_at": "When the answer was deleted.",
      "question": "The id of the AOE question for which this answer pertains.",
      "test": "The id of the test for which this answer pertains.",
      "value": "The value entered by freetext or chosen by the ordering physician."
    },
    "bill_type": "Who is financially responsible for the order.",
    "ccs": "List of physician ids who should be cc'd on any reports.",
    "chart_date": "Date at which this order was seen in the patient's chart.",
    "confidential": "Whether the provider has marked this order as confidential. Should not be shared with a patient.",
    "content": {
      "collection_datetime": "Date and time when the specimen was collected.",
      "fasting_method": "Indicates whether the patient should be fasting for the test.",
      "icd10_codes": {
        "code": "The code of the ICD-10 diagnosis.",
        "description": "The description of the ICD-10 diagnosis."
      },
      "id": "Unique identifier for the lab order content.",
      "patient_instructions": "Instructions for the patient regarding the lab order.",
      "standing_order_end_date": "End date for a standing order, if applicable.",
      "standing_order_frequency": "Frequency of a standing order, if applicable.",
      "stat_method": "Indicates if the order is marked as stat (urgent).",
      "test_center_notes": "Notes for the test center performing the lab work.",
      "tests": {
        "code": "Code identifier for the test, if available.",
        "compendium_id": "Compendium identifier for the test, if available.",
        "cpt_codes": "List of CPT codes associated with the test.",
        "created_at": "Timestamp when the test was created.",
        "deleted_at": "Timestamp when the test was deleted, if applicable.",
        "id": "Unique identifier for the test.",
        "lab_vendor_id": "Lab vendor identifier for the test, if available.",
        "name": "Name of the test.",
        "practice_created_id": "Practice-specific identifier for the test, if available.",
        "procedure_class": "Procedure class of the test, if applicable.",
        "questions": "List of questions associated with the test.",
        "test_synonyms": "List of alternative names or synonyms for the test."
      }
    },
    "created_at": "Time at which elation created this order.",
    "document_created_at": "Time at which this order was created in whichever system created it. Could be historical or same as the created_at.",
    "facility": "An identifier that represents the facility placing the order.",
    "facility_identifier": {
      "active": "Whether the facility identifier should be used. Should be true in most cases.",
      "bidi_connection": {
        "alias": "Get the alias of the connection.",
        "id": "ID of the connection.",
        "priority": "Priority of the connection (0-65535).",
        "protocol": "Get the protocol of the connection."
      },
      "compendium": "The id of the compendium that will be used when the user selects this facility identifier.",
      "created_date": "Created date, if available.",
      "deleted_date": "Deleted date, if available.",
      "description": "The text that will displayed to users in the lab order dialog.",
      "id": "Unique identifier for the facility identifier.",
      "lab_connection": "Lab connection id, if available.",
      "lab_facility": "The id that represents the lab.",
      "practice": "Practice id.",
      "practice_facility": "The id that represents the practice; often an account number provided by the lab vendor.",
      "practice_secondary_id": "Secondary id for the practice, if available.",
      "user_facing": "Whether this facility identifier will be visible in the lab order dialog. Should be true for most cases.",
      "vendor": {
        "display_name": "Display name of the vendor.",
        "id": "ID of the vendor.",
        "name": "Name of the vendor."
      }
    },
    "follow_up_method": "Freetext field communicating how the patient should receive their results.",
    "id": "The id of the lab order in Elation's systems.",
    "ordering_physician_id": "The id of the physician who created the order.",
    "patient_id": "The id of the patient.",
    "practice_id": "The id of the practice.",
    "requisition_id": "The requisition id of the order. Can be different from the order id if and when the order was created outside of elation.",
    "resolution": {
      "created_at": "The datetime when this resolution state was created.",
      "deleted_at": "The datetime when this resolution was deleted. Should never be null because we're providing the most updated resolution.",
      "document": "Will be the same as the id of the lab order.",
      "id": "Internal id to represent the resolution state.",
      "note": "Any note that was added to represent why an order was cancelled.",
      "resolving_document": "If the order is fulfilled will indicate the document referenced. For lab orders will usually be a report.",
      "state": "The resolution state of the order."
    },
    "signed_by": "The id of the physician who signed off on the order.",
    "signed_date": "The time when the order was signed.",
    "site": {
      "address": {
        "international_address": {
          "city_state_county_or_districts": null,
          "country": null,
          "lines": null,
          "postal_code": null
        },
        "us_address": {
          "city": null,
          "line1": null,
          "line2": null,
          "state": null,
          "zip_code": null
        }
      },
      "fax_number": "The fax number of the lab site.",
      "name": "The name of the site.",
      "phone_number": "The phone number of the lab site."
    },
    "special_insurance": {
      "code": "Special insurance code.",
      "name": "Special insurance name."
    },
    "specimens": {
      "body_site": {
        "code": "The HL7 code representing the body site from which a specimen was collected",
        "deleted_at": "Represents if the body site was removed from the specimen.",
        "text": "A textual description of the body site from which the specimen was collected."
      },
      "container_id": "An identifier representing the container used to store the specimen.",
      "description": "A freetext description of the specimen.",
      "modifiers": {
        "code": "The HL7 code representing the modifier on the body site from which a specimen was collected",
        "sequence": "The cardinal position in which the modifiers should be listed.",
        "text": "A textual description of the modifier of the body site from which the specimen was collected."
      },
      "test": "The lab order test for which the specimen was collected."
    },
    "submissions": {
      "state": "The state of the electronic order submission.",
      "state_metadata": "Useful error information collected as part of the submission. Including ERRORs or ACKs.",
      "time_acknowledged": "The time at which vendor acknowledged any error shown to them about the electronic submission.",
      "time_submitted": "The time the electronic order was submitted to the lab vendor."
    },
    "tags": "Any tags associated with the lab order.",
    "test_date": "The date on which the tests should be performed, or were performed. Can be different than document_date, create_date",
    "vendor": "The id of the lab vendor."
  }
  ```
</ResponseExample>

### Payload Field Details

<ResponseField name="Lab Order" type="Event Payload">
  <Expandable title="fields" defaultOpen="true">
    <ResponseField name="id" type="string" required>
      The id of the lab order in Elation's systems.

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

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

    <ResponseField name="answers" type="[]object" required>
      List of the answers provided for the Ask on Entry (AOE) questions if required by any lab order tests.

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

      ```json Example theme={null}
      [
      {
      "created_at": "2021-03-25T04:33:40Z",
      "deleted_at": "2021-03-26T04:33:40Z",
      "question": "123",
      "test": "140748306251838",
      "value": "Yes"
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="answers.map(x, x.test)" type="[]string" required>
      Mapped array of: The id of the test for which this answer pertains.

      ```json CEL theme={null}
      answers.map(x, x.test)
      ```

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

    <ResponseField name="answers.map(x, x.question)" type="[]string" required>
      Mapped array of: The id of the AOE question for which this answer pertains.

      ```json CEL theme={null}
      answers.map(x, x.question)
      ```

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

    <ResponseField name="answers.map(x, x.value)" type="[]string" required>
      Mapped array of: The value entered by freetext or chosen by the ordering physician.

      ```json CEL theme={null}
      answers.map(x, x.value)
      ```

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

    <ResponseField name="answers.map(x, x.created_at)" type="[]timing.v1.Timestamp" required>
      Mapped array of: When the answer was created.

      ```json CEL theme={null}
      answers.map(x, x.created_at)
      ```

      ```json Example theme={null}
      [
      "2021-03-25T04:33:40Z"
      ]
      ```
    </ResponseField>

    <ResponseField name="answers.map(x, x.deleted_at)" type="[]timing.v1.Timestamp" required>
      Mapped array of: When the answer was deleted.

      ```json CEL theme={null}
      answers.map(x, x.deleted_at)
      ```

      ```json Example theme={null}
      [
      "2021-03-26T04:33:40Z"
      ]
      ```
    </ResponseField>

    <ResponseField name="bill_type" type="string">
      Who is financially responsible for the order.

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

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

    <ResponseField name="ccs" type="[]string" required>
      List of physician ids who should be cc'd on any reports.

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

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

    <ResponseField name="chart_date" type="timing.v1.Timestamp" required>
      Date at which this order was seen in the patient's chart.

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

      ```json Example theme={null}
      "2021-03-25T04:33:40Z"
      ```
    </ResponseField>

    <ResponseField name="confidential" type="bool" required>
      Whether the provider has marked this order as confidential. Should not be shared with a patient.

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

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

    <ResponseField name="content" type="object" required>
      Represents the content of the lab order report.

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

      ```json Example theme={null}
      {
      "collection_datetime": null,
      "fasting_method": "fasting_random",
      "icd10_codes": [
      {
      "code": "D72.9",
      "description": "Disorder of white blood cells, unspecified"
      }
      ],
      "id": "140754512117861",
      "patient_instructions": "",
      "standing_order_end_date": null,
      "standing_order_frequency": "",
      "stat_method": "LAB_STAT_METHOD_WET_READING_PHONE",
      "test_center_notes": "",
      "tests": [
      {
      "code": "",
      "compendium_id": "3",
      "cpt_codes": 1,
      "created_at": "2020-01-27T16:17:43Z",
      "deleted_at": "2020-01-28T13:11:23Z",
      "id": "140748306251838",
      "lab_vendor_id": "3",
      "name": "TSH",
      "practice_created_id": "42",
      "procedure_class": "123",
      "questions": {
        "answers": [
          {
            "response": "5 cups"
          }
        ],
        "question": "Briefly describe any caffeine use - e.g. how many cups of coffee a day?"
      },
      "test_synonyms": "TSH"
      }
      ]
      }
      ```
    </ResponseField>

    <ResponseField name="content.id" type="string" required>
      `ID` Unique identifier for the lab order content.

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

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

    <ResponseField name="content.stat_method" type="elation.v1.LabStatMethod">
      Indicates if the order is marked as stat (urgent).

      ```json CEL theme={null}
      content.stat_method
      ```

      ```json Example theme={null}
      elation.v1.LabStatMethod.LAB_STAT_METHOD_WET_READING_PHONE
      elation.v1.LabStatMethod.LAB_STAT_METHOD_WET_READING_FAX
      elation.v1.LabStatMethod.LAB_STAT_METHOD_STAT_PHONE
      elation.v1.LabStatMethod.LAB_STAT_METHOD_STAT_FAX
      elation.v1.LabStatMethod.LAB_STAT_METHOD_STAT_PHONE_FAX
      ```
    </ResponseField>

    <ResponseField name="content.patient_instructions" type="string">
      Instructions for the patient regarding the lab order.

      ```json CEL theme={null}
      content.patient_instructions
      ```

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

    <ResponseField name="content.test_center_notes" type="string">
      Notes for the test center performing the lab work.

      ```json CEL theme={null}
      content.test_center_notes
      ```

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

    <ResponseField name="content.fasting_method" type="elation.v1.LabFastingMethod">
      Indicates whether the patient should be fasting for the test.

      ```json CEL theme={null}
      content.fasting_method
      ```

      ```json Example theme={null}
      elation.v1.LabFastingMethod.LAB_FASTING_METHOD_FASTING_12_HOUR
      elation.v1.LabFastingMethod.LAB_FASTING_METHOD_FASTING_8_HOUR
      elation.v1.LabFastingMethod.LAB_FASTING_METHOD_FASTING_2_HOUR
      elation.v1.LabFastingMethod.LAB_FASTING_METHOD_FASTING_NONE
      elation.v1.LabFastingMethod.LAB_FASTING_METHOD_FASTING_RANDOM
      ```
    </ResponseField>

    <ResponseField name="content.standing_order_frequency" type="string">
      Frequency of a standing order, if applicable.

      ```json CEL theme={null}
      content.standing_order_frequency
      ```

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

    <ResponseField name="content.standing_order_end_date" type="values.v1.Date">
      End date for a standing order, if applicable.

      ```json CEL theme={null}
      content.standing_order_end_date
      ```

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

    <ResponseField name="content.collection_datetime" type="timing.v1.Timestamp">
      Date and time when the specimen was collected.

      ```json CEL theme={null}
      content.collection_datetime
      ```

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

    <ResponseField name="content.icd10_codes" type="[]object" required>
      List of ICD-10 diagnosis codes associated with the lab order.

      ```json CEL theme={null}
      content.icd10_codes
      ```

      ```json Example theme={null}
      [
      {
      "code": "D72.9",
      "description": "Disorder of white blood cells, unspecified"
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="content.icd10_codes.map(x, x.code)" type="[]string" required>
      Mapped array of: The code of the ICD-10 diagnosis.

      ```json CEL theme={null}
      content.icd10_codes.map(x, x.code)
      ```

      ```json Example theme={null}
      [
      "D72.9"
      ]
      ```
    </ResponseField>

    <ResponseField name="content.icd10_codes.map(x, x.description)" type="[]string" required>
      Mapped array of: The description of the ICD-10 diagnosis.

      ```json CEL theme={null}
      content.icd10_codes.map(x, x.description)
      ```

      ```json Example theme={null}
      [
      "Disorder of white blood cells, unspecified"
      ]
      ```
    </ResponseField>

    <ResponseField name="content.tests" type="[]object" required>
      List of tests included in this lab order.

      ```json CEL theme={null}
      content.tests
      ```

      ```json Example theme={null}
      [
      {
      "code": "",
      "compendium_id": "3",
      "cpt_codes": 1,
      "created_at": "2020-01-27T16:17:43Z",
      "deleted_at": "2020-01-28T13:11:23Z",
      "id": "140748306251838",
      "lab_vendor_id": "3",
      "name": "TSH",
      "practice_created_id": "42",
      "procedure_class": "123",
      "questions": {
      "answers": [
        {
          "response": "5 cups"
        }
      ],
      "question": "Briefly describe any caffeine use - e.g. how many cups of coffee a day?"
      },
      "test_synonyms": "TSH"
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="content.tests.map(x, x.id)" type="[]string" required>
      `ID` Mapped array of: Unique identifier for the test.

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

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

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

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

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

    <ResponseField name="content.tests.map(x, x.code)" type="[]string" required>
      Mapped array of: Code identifier for the test, if available.

      ```json CEL theme={null}
      content.tests.map(x, x.code)
      ```

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

    <ResponseField name="content.tests.map(x, x.procedure_class)" type="[]string" required>
      Mapped array of: Procedure class of the test, if applicable.

      ```json CEL theme={null}
      content.tests.map(x, x.procedure_class)
      ```

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

    <ResponseField name="content.tests.map(x, x.practice_created_id)" type="[]string" required>
      Mapped array of: Practice-specific identifier for the test, if available.

      ```json CEL theme={null}
      content.tests.map(x, x.practice_created_id)
      ```

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

    <ResponseField name="content.tests.map(x, x.lab_vendor_id)" type="[]string" required>
      Mapped array of: Lab vendor identifier for the test, if available.

      ```json CEL theme={null}
      content.tests.map(x, x.lab_vendor_id)
      ```

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

    <ResponseField name="content.tests.map(x, x.compendium_id)" type="[]string" required>
      Mapped array of: Compendium identifier for the test, if available.

      ```json CEL theme={null}
      content.tests.map(x, x.compendium_id)
      ```

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

    <ResponseField name="content.tests.map(x, x.cpt_codes)" type="[]bool" required>
      Mapped array of: List of CPT codes associated with the test.

      ```json CEL theme={null}
      content.tests.map(x, x.cpt_codes)
      ```

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

    <ResponseField name="content.tests.map(x, x.test_synonyms)" type="[]bool" required>
      Mapped array of: List of alternative names or synonyms for the test.

      ```json CEL theme={null}
      content.tests.map(x, x.test_synonyms)
      ```

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

    <ResponseField name="content.tests.map(x, x.questions)" type="[]bool" required>
      Mapped array of: List of questions associated with the test.

      ```json CEL theme={null}
      content.tests.map(x, x.questions)
      ```

      ```json Example theme={null}
      [
      {
      "answers": [
      {
        "response": "5 cups"
      }
      ],
      "question": "Briefly describe any caffeine use - e.g. how many cups of coffee a day?"
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="content.tests.map(x, x.created_at)" type="[]timing.v1.Timestamp" required>
      Mapped array of: Timestamp when the test was created.

      ```json CEL theme={null}
      content.tests.map(x, x.created_at)
      ```

      ```json Example theme={null}
      [
      "2020-01-27T16:17:43Z"
      ]
      ```
    </ResponseField>

    <ResponseField name="content.tests.map(x, x.deleted_at)" type="[]timing.v1.Timestamp" required>
      Mapped array of: Timestamp when the test was deleted, if applicable.

      ```json CEL theme={null}
      content.tests.map(x, x.deleted_at)
      ```

      ```json Example theme={null}
      [
      "2020-01-28T13:11:23Z"
      ]
      ```
    </ResponseField>

    <ResponseField name="created_at" type="timing.v1.Timestamp" required>
      Time at which elation created this order.

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

      ```json Example theme={null}
      "2021-03-25T04:33:40Z"
      ```
    </ResponseField>

    <ResponseField name="document_created_at" type="timing.v1.Timestamp" required>
      Time at which this order was created in whichever system created it. Could be historical or same as the created\_at.

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

      ```json Example theme={null}
      "2021-03-25T04:33:40Z"
      ```
    </ResponseField>

    <ResponseField name="facility" type="string">
      An identifier that represents the facility placing the order.

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

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

    <ResponseField name="follow_up_method" type="string">
      Freetext field communicating how the patient should receive their results.

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

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

    <ResponseField name="ordering_physician_id" type="string" required>
      The id of the physician who created the order.

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

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

    <ResponseField name="patient_id" type="string" required>
      `ID` The id of the patient.

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

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

    <ResponseField name="practice_id" type="string" required>
      The id of the practice.

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

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

    <ResponseField name="requisition_id" type="string" required>
      The requisition id of the order. Can be different from the order id if and when the order was created outside of elation.

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

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

    <ResponseField name="resolution" type="object">
      Information about the resolution state of the order.

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

      ```json Example theme={null}
      {
      "created_at": "2021-03-25T04:33:40Z",
      "deleted_at": "2021-03-26T04:33:40Z",
      "document": "140754512183329",
      "id": "140754511659009",
      "note": "Test cancelled due to insurance",
      "resolving_document": "140754512183329",
      "state": "LAB_ORDER_RESOLUTION_STATE_OUTSTANDING"
      }
      ```
    </ResponseField>

    <ResponseField name="resolution.id" type="string">
      `ID` Internal id to represent the resolution state.

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

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

    <ResponseField name="resolution.document" type="string">
      Will be the same as the id of the lab order.

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

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

    <ResponseField name="resolution.resolving_document" type="string">
      If the order is fulfilled will indicate the document referenced. For lab orders will usually be a report.

      ```json CEL theme={null}
      resolution.resolving_document
      ```

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

    <ResponseField name="resolution.state" type="elation.v1.LabOrderResolutionState">
      The resolution state of the order.

      ```json CEL theme={null}
      resolution.state
      ```

      ```json Example theme={null}
      elation.v1.LabOrderResolutionState.LAB_ORDER_RESOLUTION_STATE_OUTSTANDING
      elation.v1.LabOrderResolutionState.LAB_ORDER_RESOLUTION_STATE_FULFILLED
      elation.v1.LabOrderResolutionState.LAB_ORDER_RESOLUTION_STATE_CANCELLED
      ```
    </ResponseField>

    <ResponseField name="resolution.note" type="string">
      Any note that was added to represent why an order was cancelled.

      ```json CEL theme={null}
      resolution.note
      ```

      ```json Example theme={null}
      "Test cancelled due to insurance"
      ```
    </ResponseField>

    <ResponseField name="resolution.created_at" type="timing.v1.Timestamp">
      The datetime when this resolution state was created.

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

      ```json Example theme={null}
      "2021-03-25T04:33:40Z"
      ```
    </ResponseField>

    <ResponseField name="resolution.deleted_at" type="timing.v1.Timestamp">
      The datetime when this resolution was deleted. Should never be null because we're providing the most updated resolution.

      ```json CEL theme={null}
      resolution.deleted_at
      ```

      ```json Example theme={null}
      "2021-03-26T04:33:40Z"
      ```
    </ResponseField>

    <ResponseField name="signed_by" type="string" required>
      The id of the physician who signed off on the order.

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

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

    <ResponseField name="signed_date" type="timing.v1.Timestamp" required>
      The time when the order was signed.

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

      ```json Example theme={null}
      "2021-03-25T04:33:40Z"
      ```
    </ResponseField>

    <ResponseField name="site" type="object">
      The location where the patient will have the lab performed. Sites are specific to their lab vendor.

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

      ```json Example theme={null}
      {
      "address": {
      "international_address": {
      "city_state_county_or_districts": [],
      "country": null,
      "lines": [],
      "postal_code": null
      },
      "us_address": {
      "city": null,
      "line1": null,
      "line2": null,
      "state": null,
      "zip_code": null
      }
      },
      "fax_number": "415-555-5678",
      "name": "Quest Diagnostics",
      "phone_number": "415-555-1234"
      }
      ```
    </ResponseField>

    <ResponseField name="site.name" type="string">
      The name of the site.

      ```json CEL theme={null}
      site.name
      ```

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

    <ResponseField name="site.address" type="object">
      The address of the lab site.

      ```json CEL theme={null}
      site.address
      ```

      ```json Example theme={null}
      {
      "international_address": {
      "city_state_county_or_districts": [],
      "country": null,
      "lines": [],
      "postal_code": null
      },
      "us_address": {
      "city": null,
      "line1": null,
      "line2": null,
      "state": null,
      "zip_code": null
      }
      }
      ```
    </ResponseField>

    <ResponseField name="site.address.us_address" type="object">
      *Description coming soon*

      ```json CEL theme={null}
      site.address.us_address
      ```

      ```json Example theme={null}
      {
      "city": null,
      "line1": null,
      "line2": null,
      "state": null,
      "zip_code": null
      }
      ```
    </ResponseField>

    <ResponseField name="site.address.us_address.line1" type="string">
      *Description coming soon*

      ```json CEL theme={null}
      site.address.us_address.line1
      ```

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

    <ResponseField name="site.address.us_address.line2" type="string">
      *Description coming soon*

      ```json CEL theme={null}
      site.address.us_address.line2
      ```

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

    <ResponseField name="site.address.us_address.city" type="string">
      *Description coming soon*

      ```json CEL theme={null}
      site.address.us_address.city
      ```

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

    <ResponseField name="site.address.us_address.state" type="string">
      *Description coming soon*

      ```json CEL theme={null}
      site.address.us_address.state
      ```

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

    <ResponseField name="site.address.us_address.zip_code" type="string">
      *Description coming soon*

      ```json CEL theme={null}
      site.address.us_address.zip_code
      ```

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

    <ResponseField name="site.address.international_address" type="object">
      *Description coming soon*

      ```json CEL theme={null}
      site.address.international_address
      ```

      ```json Example theme={null}
      {
      "city_state_county_or_districts": [],
      "country": null,
      "lines": [],
      "postal_code": null
      }
      ```
    </ResponseField>

    <ResponseField name="site.address.international_address.lines" type="[]string">
      *Description coming soon*

      ```json CEL theme={null}
      site.address.international_address.lines
      ```

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

    <ResponseField name="site.address.international_address.city_state_county_or_districts" type="[]string">
      *Description coming soon*

      ```json CEL theme={null}
      site.address.international_address.city_state_county_or_districts
      ```

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

    <ResponseField name="site.address.international_address.postal_code" type="string">
      *Description coming soon*

      ```json CEL theme={null}
      site.address.international_address.postal_code
      ```

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

    <ResponseField name="site.address.international_address.country" type="string">
      *Description coming soon*

      ```json CEL theme={null}
      site.address.international_address.country
      ```

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

    <ResponseField name="site.phone_number" type="string">
      The phone number of the lab site.

      ```json CEL theme={null}
      site.phone_number
      ```

      ```json Example theme={null}
      "415-555-1234"
      ```
    </ResponseField>

    <ResponseField name="site.fax_number" type="string">
      The fax number of the lab site.

      ```json CEL theme={null}
      site.fax_number
      ```

      ```json Example theme={null}
      "415-555-5678"
      ```
    </ResponseField>

    <ResponseField name="special_insurance" type="object">
      Used primarily to support specific electronic lab order integrations.

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

      ```json Example theme={null}
      {
      "code": "ABC12",
      "name": "Special Insurance Name"
      }
      ```
    </ResponseField>

    <ResponseField name="special_insurance.code" type="string">
      Special insurance code.

      ```json CEL theme={null}
      special_insurance.code
      ```

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

    <ResponseField name="special_insurance.name" type="string">
      Special insurance name.

      ```json CEL theme={null}
      special_insurance.name
      ```

      ```json Example theme={null}
      "Special Insurance Name"
      ```
    </ResponseField>

    <ResponseField name="submissions" type="[]object" required>
      Record of the attempts to submit the electronic order.

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

      ```json Example theme={null}
      [
      {
      "state": "submitted",
      "state_metadata": "ERROR: Invalid insurance information",
      "time_acknowledged": "2021-03-25T04:34:00Z",
      "time_submitted": "2021-03-25T04:33:40Z"
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="submissions.map(x, x.state)" type="[]string" required>
      Mapped array of: The state of the electronic order submission.

      ```json CEL theme={null}
      submissions.map(x, x.state)
      ```

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

    <ResponseField name="submissions.map(x, x.time_submitted)" type="[]timing.v1.Timestamp" required>
      Mapped array of: The time the electronic order was submitted to the lab vendor.

      ```json CEL theme={null}
      submissions.map(x, x.time_submitted)
      ```

      ```json Example theme={null}
      [
      "2021-03-25T04:33:40Z"
      ]
      ```
    </ResponseField>

    <ResponseField name="submissions.map(x, x.time_acknowledged)" type="[]timing.v1.Timestamp" required>
      Mapped array of: The time at which vendor acknowledged any error shown to them about the electronic submission.

      ```json CEL theme={null}
      submissions.map(x, x.time_acknowledged)
      ```

      ```json Example theme={null}
      [
      "2021-03-25T04:34:00Z"
      ]
      ```
    </ResponseField>

    <ResponseField name="submissions.map(x, x.state_metadata)" type="[]string" required>
      Mapped array of: Useful error information collected as part of the submission. Including ERRORs or ACKs.

      ```json CEL theme={null}
      submissions.map(x, x.state_metadata)
      ```

      ```json Example theme={null}
      [
      "ERROR: Invalid insurance information"
      ]
      ```
    </ResponseField>

    <ResponseField name="specimens" type="[]object" required>
      Record of any specimens collected when creating the order.

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

      ```json Example theme={null}
      [
      {
      "body_site": {
      "code": "LA",
      "deleted_at": "2021-03-26T04:33:40Z",
      "text": "Left Arm"
      },
      "container_id": "12345",
      "description": "Blood sample",
      "modifiers": [
      {
        "code": "ANT",
        "sequence": 1,
        "text": "Anterior"
      }
      ],
      "test": "140748306251838"
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="specimens.map(x, x.test)" type="[]string" required>
      Mapped array of: The lab order test for which the specimen was collected.

      ```json CEL theme={null}
      specimens.map(x, x.test)
      ```

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

    <ResponseField name="specimens.map(x, x.body_site)" type="[]bool" required>
      Mapped array of: Information about the body site where the specimen was collected.

      ```json CEL theme={null}
      specimens.map(x, x.body_site)
      ```

      ```json Example theme={null}
      [
      {
      "code": "LA",
      "deleted_at": "2021-03-26T04:33:40Z",
      "text": "Left Arm"
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="specimens.map(x, x.description)" type="[]string" required>
      Mapped array of: A freetext description of the specimen.

      ```json CEL theme={null}
      specimens.map(x, x.description)
      ```

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

    <ResponseField name="specimens.map(x, x.container_id)" type="[]string" required>
      Mapped array of: An identifier representing the container used to store the specimen.

      ```json CEL theme={null}
      specimens.map(x, x.container_id)
      ```

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

    <ResponseField name="specimens.map(x, x.modifiers)" type="[]bool" required>
      Mapped array of: Coded Modifiers indicating more information about the body site from which the specimen was collected.

      ```json CEL theme={null}
      specimens.map(x, x.modifiers)
      ```

      ```json Example theme={null}
      [
      [
      {
      "code": "ANT",
      "sequence": 1,
      "text": "Anterior"
      }
      ]
      ]
      ```
    </ResponseField>

    <ResponseField name="tags" type="[]string" required>
      Any tags associated with the lab order.

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

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

    <ResponseField name="test_date" type="values.v1.Date">
      The date on which the tests should be performed, or were performed. Can be different than document\_date, create\_date

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

      ```json Example theme={null}
      "2021-03-25"
      ```
    </ResponseField>

    <ResponseField name="vendor" type="string" required>
      The id of the lab vendor.

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

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

    <ResponseField name="facility_identifier" type="object">
      Information about the facility placing the order.

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

      ```json Example theme={null}
      {
      "active": true,
      "bidi_connection": {
      "alias": "main-quest-conn",
      "id": "42",
      "priority": 1,
      "protocol": "HL7"
      },
      "compendium": "234900800000002",
      "created_date": "2023-01-01T12:00:00Z",
      "deleted_date": "2023-12-31T12:00:00Z",
      "description": "Main Lab Facility for Quest",
      "id": "123456",
      "lab_connection": "7890",
      "lab_facility": "QST123",
      "practice": "555555",
      "practice_facility": "ACCT98765",
      "practice_secondary_id": "SECID123",
      "user_facing": true,
      "vendor": {
      "display_name": "Quest Diagnostics",
      "id": "1001",
      "name": "quest"
      }
      }
      ```
    </ResponseField>

    <ResponseField name="facility_identifier.active" type="bool">
      Whether the facility identifier should be used. Should be true in most cases.

      ```json CEL theme={null}
      facility_identifier.active
      ```

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

    <ResponseField name="facility_identifier.bidi_connection" type="object">
      Bi-directional lab connection info, if available.

      ```json CEL theme={null}
      facility_identifier.bidi_connection
      ```

      ```json Example theme={null}
      {
      "alias": "main-quest-conn",
      "id": "42",
      "priority": 1,
      "protocol": "HL7"
      }
      ```
    </ResponseField>

    <ResponseField name="facility_identifier.bidi_connection.alias" type="string">
      Get the alias of the connection.

      ```json CEL theme={null}
      facility_identifier.bidi_connection.alias
      ```

      ```json Example theme={null}
      "main-quest-conn"
      ```
    </ResponseField>

    <ResponseField name="facility_identifier.bidi_connection.id" type="string">
      ID of the connection.

      ```json CEL theme={null}
      facility_identifier.bidi_connection.id
      ```

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

    <ResponseField name="facility_identifier.bidi_connection.priority" type="int64">
      Priority of the connection (0-65535).

      ```json CEL theme={null}
      facility_identifier.bidi_connection.priority
      ```

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

    <ResponseField name="facility_identifier.bidi_connection.protocol" type="string">
      Get the protocol of the connection.

      ```json CEL theme={null}
      facility_identifier.bidi_connection.protocol
      ```

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

    <ResponseField name="facility_identifier.compendium" type="string">
      The id of the compendium that will be used when the user selects this facility identifier.

      ```json CEL theme={null}
      facility_identifier.compendium
      ```

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

    <ResponseField name="facility_identifier.created_date" type="timing.v1.Timestamp">
      Created date, if available.

      ```json CEL theme={null}
      facility_identifier.created_date
      ```

      ```json Example theme={null}
      "2023-01-01T12:00:00Z"
      ```
    </ResponseField>

    <ResponseField name="facility_identifier.deleted_date" type="timing.v1.Timestamp">
      Deleted date, if available.

      ```json CEL theme={null}
      facility_identifier.deleted_date
      ```

      ```json Example theme={null}
      "2023-12-31T12:00:00Z"
      ```
    </ResponseField>

    <ResponseField name="facility_identifier.description" type="string">
      The text that will displayed to users in the lab order dialog.

      ```json CEL theme={null}
      facility_identifier.description
      ```

      ```json Example theme={null}
      "Main Lab Facility for Quest"
      ```
    </ResponseField>

    <ResponseField name="facility_identifier.id" type="string">
      Unique identifier for the facility identifier.

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

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

    <ResponseField name="facility_identifier.lab_connection" type="string">
      Lab connection id, if available.

      ```json CEL theme={null}
      facility_identifier.lab_connection
      ```

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

    <ResponseField name="facility_identifier.lab_facility" type="string">
      The id that represents the lab.

      ```json CEL theme={null}
      facility_identifier.lab_facility
      ```

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

    <ResponseField name="facility_identifier.practice" type="string">
      Practice id.

      ```json CEL theme={null}
      facility_identifier.practice
      ```

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

    <ResponseField name="facility_identifier.practice_facility" type="string">
      The id that represents the practice; often an account number provided by the lab vendor.

      ```json CEL theme={null}
      facility_identifier.practice_facility
      ```

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

    <ResponseField name="facility_identifier.practice_secondary_id" type="string">
      Secondary id for the practice, if available.

      ```json CEL theme={null}
      facility_identifier.practice_secondary_id
      ```

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

    <ResponseField name="facility_identifier.user_facing" type="bool">
      Whether this facility identifier will be visible in the lab order dialog. Should be true for most cases.

      ```json CEL theme={null}
      facility_identifier.user_facing
      ```

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

    <ResponseField name="facility_identifier.vendor" type="object">
      Vendor information.

      ```json CEL theme={null}
      facility_identifier.vendor
      ```

      ```json Example theme={null}
      {
      "display_name": "Quest Diagnostics",
      "id": "1001",
      "name": "quest"
      }
      ```
    </ResponseField>

    <ResponseField name="facility_identifier.vendor.display_name" type="string">
      Display name of the vendor.

      ```json CEL theme={null}
      facility_identifier.vendor.display_name
      ```

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

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

      ```json CEL theme={null}
      facility_identifier.vendor.id
      ```

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

    <ResponseField name="facility_identifier.vendor.name" type="string">
      Name of the vendor.

      ```json CEL theme={null}
      facility_identifier.vendor.name
      ```

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