Properties

event_type
const string
required

Constant: labtest.order.updated

data
ClientFacingOrder
required
user_id
string
required

User id returned by vital create user request. This id should be stored in your database against the user and used for all interactions with the vital api.

id
string
required

The Vital Order ID

team_id
string
required

Your team id.

patient_details
ClientFacingPatientDetailsCompatible | null

Patient Details

first_name
string | null
last_name
string | null
dob
string
required
gender
string
required
phone_number
string | null
email
string | null
patient_address
PatientAddressCompatible | null

Patient Address

receiver_name
string | null
first_line
string
required
second_line
string | null
city
string
required
state
string
required
zip
string
required
country
string
required
phone_number
string | null
lab_test
ClientFacingLabTest
required

The Vital Test associated with the order

id
string
required
slug
string
required
name
string
required
sample_type
LabTestSampleType
required
method
LabTestCollectionMethod
required
price
number
required
is_active
boolean
required

Deprecated. Use status instead.

status
LabTestStatus
required
fasting
boolean | null

Defines whether a lab test requires fasting.

lab
ClientFacingLab | null
id
integer
required
slug
string
required
name
string
required
first_line_address
string
required
city
string
required
zipcode
string
required
collection_methods
LabTestCollectionMethod[]
required
sample_types
LabTestSampleType[]
required
markers
ClientFacingMarker[] | null
id
integer
required
name
string
required
slug
string
required
description
string | null
lab_id
integer | null
provider_id
string | null
type
MarkerType | null
unit
string | null
price
string | null
is_delegated
boolean | null

Denotes whether a lab test requires using non-Vital physician networks. If it does then it’s delegated - no otherwise.

details
anyOf
required
sample_id
string | null

Sample ID

notes
string | null

Notes associated with the order

created_at
string
required

When your order was created

updated_at
string
required

When your order was last updated.

events
ClientFacingOrderEvent[]
required
id
integer
required
created_at
string
required
status
OrderStatus
required
status
OrderTopLevelStatus | null
physician
ClientFacingPhysician | null
first_name
string
required
last_name
string
required
npi
string
required
health_insurance_id
string | null

Vital ID of the health insurance.

requisition_form_url
string | null

DEPRECATED. Requistion form url.

priority
boolean | null

Defines whether order is priority or not. For some labs, this refers to a STAT order.

shipping_details
ShippingAddress | null

Shipping Details. For unregistered testkit orders.

receiver_name
string
required
first_line
string
required
second_line
string | null
city
string
required
state
string
required
zip
string
required
country
string
required
phone_number
string
required
activate_by
string | null

Defines when an Order should be activated, making it a Delayed Order.

Examples

{
  "event_type": "labtest.order.updated",
  "data": {
    "id": "4764c9d3-d10b-466e-a04f-d9facce60c11",
    "team_id": "bddd1afd-e7cf-4e97-825b-76926b54a95b",
    "user_id": "91cbe90e-9b7d-470b-8632-a997f2194ce9",
    "patient_details": {
      "dob": "2020-01-01",
      "gender": "male"
    },
    "patient_address": {
      "receiver_name": "John Doe",
      "first_line": "123 Main St.",
      "second_line": "Apt. 208",
      "city": "San Francisco",
      "state": "CA",
      "zip": "91189",
      "country": "United States",
      "phone_number": "+11234567890"
    },
    "details": {
      "type": "testkit",
      "data": {
        "id": "a655f0e4-6405-4a1d-80b7-66f06c2108a7",
        "shipment": {
          "id": "d55210cc-3d9f-4115-8262-5013f700c7be",
          "outbound_tracking_number": "<outbound_tracking_number>",
          "outbound_tracking_url": "<outbound_tracking_url>",
          "inbound_tracking_number": "<inbound_tracking_number>",
          "inbound_tracking_url": "<inbound_tracking_url>",
          "outbound_courier": "usps",
          "inbound_courier": "usps",
          "notes": "<notes>",
          "created_at": "2020-01-01T00:00:00.000Z",
          "updated_at": "2020-01-01T00:00:00.000Z"
        },
        "created_at": "2020-01-01T00:00:00Z",
        "updated_at": "2020-01-01T00:00:00Z"
      }
    },
    "lab_test": {
      "name": "Lipids Panel",
      "description": "Cholesterol test",
      "method": "testkit"
    },
    "sample_id": "123456789",
    "health_insurace_id": "a1af8ec3-eca7-45ec-8dcd-46c25624b75c",
    "requisition_form_url": "https://www.example.com",
    "notes": "This is a note",
    "created_at": "2020-01-01T00:00:00Z",
    "updated_at": "2020-01-01T00:00:00Z",
    "activate_by": "2020-01-01",
    "status": "collecting_sample",
    "events": [
      {
        "id": 1,
        "created_at": "2022-01-01T00:00:00Z",
        "status": "received.testkit.ordered"
      },
      {
        "id": 2,
        "created_at": "2022-01-02T00:00:00Z",
        "status": "received.testkit.requisition_created"
      },
      {
        "id": 3,
        "created_at": "2022-01-03T00:00:00Z",
        "status": "collecting_sample.testkit.transit_customer"
      }
    ]
  }
}