- Home
- Wearables
- Lab Testing
- API Reference
- Event Catalog
- Changelog
Users
Debugging
Orders
At-home Phlebotomy
Tests
Results
Health Insurance
Sleep
Meal
Workouts
Profile
Activity
Body
Vitals
Body
Activity
Wellness
Nutrition
Team
Member
Invite
Org
Team API Keys
Team Custom Credentials
Team ETL Pipeline
Core
Lab Testing
Summary Data
Timeseries Data
Org Management
Register Testkit Order
API key based authentication
An enumeration.
An image of the front of the patient insurance card.
An image of the back of the patient insurance card.
An image of the patient signature for health insurance billing.
Textual description of what are the patient symptoms and attempted treatments.
Textual description of what are the physician assessments and testing plans.
Unique identifier representing a specific Health Insurance.
Insurance unique number assigned to a patient, usually present on the insurance card.
Relationship between the patient and the insurance contractor. Values can be (Self, Spouse, Other Relationship).
Responsible details when the value of responsible_relationship is not 'Self'.
Diagnosis codes for insurance billing.
from datetime import datetime
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
client = Vital(
api_key="YOUR_API_KEY",
environment=VitalEnvironment.SANDBOX
)
patient_details = PatientDetails(
first_name="John",
last_name="Doe",
dob=datetime.fromisoformat("1990-01-01"),
gender=Gender.MALE,
email="email@email.com",
phone_number="123-456-7890",
)
patient_address = PatientAddressCompatible(
receiver_name="John Doe",
first_line="Main St",
second_line="123",
city="San Francisco",
state="CA",
zip="94111",
country="US",
phone_number=""
)
data = client.testkit.register(user_id="<user_id>", sample_id="<sample_id>", patient_details=patient_details, patient_address=patient_address)
{
"order": {
"id": "96edc6ef-3b2c-412b-b9e5-96f361f93aec",
"team_id": "b080b20c-e162-4cf1-9c7d-8faee72ee08e",
"user_id": "9f1e094e-1641-466b-b668-d4d3300e569f",
"patient_details": {
"first_name": "John",
"last_name": "Doe",
"phone_number": "+11234567890",
"email": "doe@email.com"
"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"
},
"shipping_details": {
"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": "7695cc28-f9e5-400d-95d2-ec7d9ec580df",
"notes": "This is a note",
"created_at": "2020-01-01T00:00:00Z",
"updated_at": "2020-01-01T00:00:00Z",
"status": "received",
"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.awaiting_registration"
},
{
"id": 3,
"created_at": "2022-01-02T00:00:00Z",
"status": "received.testkit.requisition_created"
},
{
"id": 4,
"created_at": "2022-01-03T00:00:00Z",
"status": "received.testkit.testkit_registered"
}
]
},
"status": "string",
"message": "string"
}
Authorizations
API key based authentication
Body
An enumeration.
female
, male
, other
, unknown
An image of the front of the patient insurance card.
image/jpeg
An image of the back of the patient insurance card.
image/jpeg
An image of the patient signature for health insurance billing.
image/jpeg
Textual description of what are the patient symptoms and attempted treatments.
Textual description of what are the physician assessments and testing plans.
Unique identifier representing a specific Health Insurance.
Insurance unique number assigned to a patient, usually present on the insurance card.
Relationship between the patient and the insurance contractor. Values can be (Self, Spouse, Other Relationship).
Self
, Spouse
, Other Relationship
Responsible details when the value of responsible_relationship is not 'Self'.
Diagnosis codes for insurance billing.
An enumeration.
terms-of-use
, telehealth-informed-consent
, mobile-terms-and-conditions
, notice-of-privacy-practices
, privacy-policy
, hipaa-authorization
Response
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.
The Vital Order ID
Your team id.
Patient Details
Patient Address
The Vital Test associated with the order
The type of sample used to perform a lab test.
dried_blood_spot
, serum
, saliva
, urine
The method used to perform a lab test.
testkit
, walk_in_test
, at_home_phlebotomy
Deprecated. Use status instead.
An enumeration.
active
, pending_approval
, inactive
Defines whether a lab test requires fasting.
testkit
, walk_in_test
, at_home_phlebotomy
dried_blood_spot
, serum
, saliva
, urine
An enumeration.
biomarker
, panel
Denotes whether a lab test requires using non-Vital physician networks. If it does then it's delegated - no otherwise.
walk_in_test
Schema for a walk-in test order in the client facing API.
To be used as part of a ClientFacingOrder.
The Vital walk-in test Order ID
Sample ID
Notes associated with the order
When your order was created
When your order was last updated.
An enumeration.
received.walk_in_test.ordered
, received.walk_in_test.requisition_created
, completed.walk_in_test.completed
, sample_with_lab.walk_in_test.partial_results
, failed.walk_in_test.sample_error
, cancelled.walk_in_test.cancelled
, received.at_home_phlebotomy.ordered
, received.at_home_phlebotomy.requisition_created
, collecting_sample.at_home_phlebotomy.appointment_pending
, collecting_sample.at_home_phlebotomy.appointment_scheduled
, collecting_sample.at_home_phlebotomy.draw_completed
, collecting_sample.at_home_phlebotomy.appointment_cancelled
, completed.at_home_phlebotomy.completed
, sample_with_lab.at_home_phlebotomy.partial_results
, cancelled.at_home_phlebotomy.cancelled
, failed.at_home_phlebotomy.sample_error
, received.testkit.ordered
, received.testkit.awaiting_registration
, received.testkit.requisition_created
, received.testkit.registered
, collecting_sample.testkit.transit_customer
, collecting_sample.testkit.out_for_delivery
, collecting_sample.testkit.with_customer
, collecting_sample.testkit.transit_lab
, sample_with_lab.testkit.delivered_to_lab
, completed.testkit.completed
, failed.testkit.failure_to_deliver_to_customer
, failed.testkit.failure_to_deliver_to_lab
, failed.testkit.sample_error
, failed.testkit.lost
, cancelled.testkit.cancelled
, cancelled.testkit.do_not_process
An enumeration.
received
, collecting_sample
, sample_with_lab
, completed
, cancelled
, failed
Vital ID of the health insurance.
DEPRECATED. Requistion form url.
Defines whether order is priority or not. For some labs, this refers to a STAT order.
Shipping Details. For unregistered testkit orders.
Schedule an Order to be processed in a future date.
from datetime import datetime
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
client = Vital(
api_key="YOUR_API_KEY",
environment=VitalEnvironment.SANDBOX
)
patient_details = PatientDetails(
first_name="John",
last_name="Doe",
dob=datetime.fromisoformat("1990-01-01"),
gender=Gender.MALE,
email="email@email.com",
phone_number="123-456-7890",
)
patient_address = PatientAddressCompatible(
receiver_name="John Doe",
first_line="Main St",
second_line="123",
city="San Francisco",
state="CA",
zip="94111",
country="US",
phone_number=""
)
data = client.testkit.register(user_id="<user_id>", sample_id="<sample_id>", patient_details=patient_details, patient_address=patient_address)
{
"order": {
"id": "96edc6ef-3b2c-412b-b9e5-96f361f93aec",
"team_id": "b080b20c-e162-4cf1-9c7d-8faee72ee08e",
"user_id": "9f1e094e-1641-466b-b668-d4d3300e569f",
"patient_details": {
"first_name": "John",
"last_name": "Doe",
"phone_number": "+11234567890",
"email": "doe@email.com"
"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"
},
"shipping_details": {
"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": "7695cc28-f9e5-400d-95d2-ec7d9ec580df",
"notes": "This is a note",
"created_at": "2020-01-01T00:00:00Z",
"updated_at": "2020-01-01T00:00:00Z",
"status": "received",
"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.awaiting_registration"
},
{
"id": 3,
"created_at": "2022-01-02T00:00:00Z",
"status": "received.testkit.requisition_created"
},
{
"id": 4,
"created_at": "2022-01-03T00:00:00Z",
"status": "received.testkit.testkit_registered"
}
]
},
"status": "string",
"message": "string"
}