PATCH
/
v3
/
order
/
{order_id}
/
draw_completed
from vital.client import Vital
from vital.environment import VitalEnvironment
from vital.types.gender import Gender
from vital.types.patient_address_compatible import PatientAddressCompatible
from vital.types.patient_details import PatientDetails
from datetime import datetime

client = Vital(
  api_key="YOUR_API_KEY",
  environment=VitalEnvironment.SANDBOX
)

data = client.lab_tests.update_on_site_collection_order_draw_completed(
    order_id="order_id",
)
{
   "order": {
      "id": "ea7eae96-2c25-404f-b043-bfc08584610d",
      "team_id": "c26a9cc7-cdff-4f23-a5f6-74d40088c16a",
      "user_id": "63661a2b-2bb3-4125-bb1a-b590f64f057f",
      "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": "+1123456789"
      },
      "priority": false,
      "health_insurance_id": "33ec11aa-d8bf-4f46-950d-c9171be3c22f",
      "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",
      "notes": "This is a note",
      "created_at": "2020-01-01T00:00:00Z",
      "updated_at": "2020-01-01T00:00:00Z",
      "status": "collecting_sample",
      "events": [
         {
         "id": 1,
         "created_at": "2022-01-01T00:00:00Z",
         "status": "received.on_site_collection.ordered"
         },
         {
         "id": 2,
         "created_at": "2022-01-02T00:00:00Z",
         "status": "received.on_site_collection.requisition_created"
         },
         {
         "id": 3,
         "created_at": "2022-01-03T00:00:00Z",
         "status": "sample_with_lab.on_site_collection.draw_completed"
         }
      ]
   },
   "status": "string",
   "message": "string"
}

This feature is in closed beta.

Interested in this feature? Get in touch with your Customer Success Manager.

Update an on-site collection order when the draw has been completed.

from vital.client import Vital
from vital.environment import VitalEnvironment
from vital.types.gender import Gender
from vital.types.patient_address_compatible import PatientAddressCompatible
from vital.types.patient_details import PatientDetails
from datetime import datetime

client = Vital(
  api_key="YOUR_API_KEY",
  environment=VitalEnvironment.SANDBOX
)

data = client.lab_tests.update_on_site_collection_order_draw_completed(
    order_id="order_id",
)
{
   "order": {
      "id": "ea7eae96-2c25-404f-b043-bfc08584610d",
      "team_id": "c26a9cc7-cdff-4f23-a5f6-74d40088c16a",
      "user_id": "63661a2b-2bb3-4125-bb1a-b590f64f057f",
      "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": "+1123456789"
      },
      "priority": false,
      "health_insurance_id": "33ec11aa-d8bf-4f46-950d-c9171be3c22f",
      "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",
      "notes": "This is a note",
      "created_at": "2020-01-01T00:00:00Z",
      "updated_at": "2020-01-01T00:00:00Z",
      "status": "collecting_sample",
      "events": [
         {
         "id": 1,
         "created_at": "2022-01-01T00:00:00Z",
         "status": "received.on_site_collection.ordered"
         },
         {
         "id": 2,
         "created_at": "2022-01-02T00:00:00Z",
         "status": "received.on_site_collection.requisition_created"
         },
         {
         "id": 3,
         "created_at": "2022-01-03T00:00:00Z",
         "status": "sample_with_lab.on_site_collection.draw_completed"
         }
      ]
   },
   "status": "string",
   "message": "string"
}

Authorizations

x-vital-api-key
string
header
required

Vital Team API Key

Path Parameters

order_id
string
required

Your Order ID.

Response

200
application/json

Successful Response

The response is of type object.