import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import * as Vital from "../../../index.js"; export declare namespace LabTestsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class LabTestsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: LabTestsClient.Options); /** * GET all the lab tests the team has access to. * * @param {Vital.LabTestsGetRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.get({ * generationMethod: "auto", * labSlug: "lab_slug", * collectionMethod: "testkit", * status: "active", * name: "name", * orderKey: "price", * orderDirection: "asc" * }) */ get(request?: Vital.LabTestsGetRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __get; /** * @param {Vital.CreateLabTestRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.create({ * name: "name", * method: "testkit", * description: "description" * }) */ create(request: Vital.CreateLabTestRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * GET all the lab tests the team has access to. * * @param {string} lab_test_id * @param {Vital.LabTestsGetByIdRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getById("lab_test_id", { * labAccountId: "lab_account_id" * }) */ getById(lab_test_id: string, request?: Vital.LabTestsGetByIdRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getById; /** * @param {string} lab_test_id * @param {Vital.UpdateLabTestRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.updateLabTest("lab_test_id") */ updateLabTest(lab_test_id: string, request?: Vital.UpdateLabTestRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __updateLabTest; /** * GET all the markers for the given lab. * * @param {Vital.LabTestsGetMarkersRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getMarkers({ * name: "name", * aLaCarteEnabled: true, * labAccountId: "lab_account_id", * page: 1, * size: 1 * }) */ getMarkers(request?: Vital.LabTestsGetMarkersRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getMarkers; /** * @param {Vital.LabTestsGetMarkersForOrderSetRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getMarkersForOrderSet({ * page: 1, * size: 1, * body: {} * }) */ getMarkersForOrderSet(request: Vital.LabTestsGetMarkersForOrderSetRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getMarkersForOrderSet; /** * @param {string} lab_test_id * @param {Vital.LabTestsGetMarkersForLabTestRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getMarkersForLabTest("lab_test_id", { * labAccountId: "lab_account_id", * page: 1, * size: 1 * }) */ getMarkersForLabTest(lab_test_id: string, request?: Vital.LabTestsGetMarkersForLabTestRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getMarkersForLabTest; /** * GET a specific marker for the given lab and provider_id * * @param {string} provider_id * @param {number} lab_id * @param {Vital.LabTestsGetMarkersByLabAndProviderIdRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getMarkersByLabAndProviderId("provider_id", 1, { * labAccountId: "lab_account_id" * }) */ getMarkersByLabAndProviderId(provider_id: string, lab_id: number, request?: Vital.LabTestsGetMarkersByLabAndProviderIdRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getMarkersByLabAndProviderId; /** * GET all the labs. * * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.labTests.getLabs() */ getLabs(requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getLabs; /** * GET lab tests the team has access to as a paginated list. * * @param {Vital.LabTestsGetPaginatedRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getPaginated({ * labTestLimit: 1, * nextCursor: "next_cursor", * generationMethod: "auto", * labSlug: "lab_slug", * collectionMethod: "testkit", * status: "active", * name: "name", * orderKey: "price", * orderDirection: "asc" * }) */ getPaginated(request?: Vital.LabTestsGetPaginatedRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getPaginated; /** * @throws {@link Vital.UnprocessableEntityError} */ getLabTestCollectionInstructionPdf(lab_test_id: string, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getLabTestCollectionInstructionPdf; /** * GET many orders with filters. * * @param {Vital.LabTestsGetOrdersRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getOrders({ * searchInput: "search_input", * startDate: new Date("2024-01-15T09:30:00.000Z"), * endDate: new Date("2024-01-15T09:30:00.000Z"), * updatedStartDate: new Date("2024-01-15T09:30:00.000Z"), * updatedEndDate: new Date("2024-01-15T09:30:00.000Z"), * orderKey: "created_at", * orderDirection: "asc", * isCritical: true, * interpretation: "normal", * userId: "user_id", * patientName: "patient_name", * shippingRecipientName: "shipping_recipient_name", * page: 1, * size: 1 * }) */ getOrders(request?: Vital.LabTestsGetOrdersRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getOrders; /** * Return the available time slots to book an appointment with a phlebotomist * for the given address and order. * * @param {Vital.LabTestsGetPhlebotomyAppointmentAvailabilityRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getPhlebotomyAppointmentAvailability({ * startDate: "start_date", * body: { * firstLine: "first_line", * city: "city", * state: "state", * zipCode: "zip_code" * } * }) */ getPhlebotomyAppointmentAvailability(request: Vital.LabTestsGetPhlebotomyAppointmentAvailabilityRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getPhlebotomyAppointmentAvailability; /** * Book an at-home phlebotomy appointment. * * @param {string} order_id - Your Order ID. * @param {Vital.AppointmentBookingRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.bookPhlebotomyAppointment("order_id", { * bookingKey: "booking_key" * }) */ bookPhlebotomyAppointment(order_id: string, request: Vital.AppointmentBookingRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __bookPhlebotomyAppointment; /** * Request an at-home phlebotomy appointment. * * @param {string} order_id - Your Order ID. * @param {Vital.RequestAppointmentRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.requestPhlebotomyAppointment("order_id", { * address: { * firstLine: "first_line", * city: "city", * state: "state", * zipCode: "zip_code" * }, * provider: "getlabs" * }) */ requestPhlebotomyAppointment(order_id: string, request: Vital.RequestAppointmentRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __requestPhlebotomyAppointment; /** * Reschedule a previously booked at-home phlebotomy appointment. * * @param {string} order_id - Your Order ID. * @param {Vital.AppointmentRescheduleRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.reschedulePhlebotomyAppointment("order_id", { * bookingKey: "booking_key" * }) */ reschedulePhlebotomyAppointment(order_id: string, request: Vital.AppointmentRescheduleRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __reschedulePhlebotomyAppointment; /** * Cancel a previously booked at-home phlebotomy appointment. * * @param {string} order_id - Your Order ID. * @param {Vital.ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.cancelPhlebotomyAppointment("order_id", { * cancellationReasonId: "cancellation_reason_id" * }) */ cancelPhlebotomyAppointment(order_id: string, request: Vital.ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __cancelPhlebotomyAppointment; /** * Get the list of reasons for cancelling an at-home phlebotomy appointment. * * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.labTests.getPhlebotomyAppointmentCancellationReason() */ getPhlebotomyAppointmentCancellationReason(requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getPhlebotomyAppointmentCancellationReason; /** * Get the appointment associated with an order. * * @param {string} order_id - Your Order ID. * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getPhlebotomyAppointment("order_id") */ getPhlebotomyAppointment(order_id: string, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getPhlebotomyAppointment; /** * GET information about an area with respect to lab-testing. * * Information returned: * * Whether a given zip code is served by our Phlebotomy network. * * List of Lab locations in the area. * * @param {Vital.LabTestsGetAreaInfoRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getAreaInfo({ * zipCode: "zip_code", * radius: "10", * lab: "quest", * labAccountId: "lab_account_id" * }) */ getAreaInfo(request: Vital.LabTestsGetAreaInfoRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getAreaInfo; /** * @param {Vital.LabTestsGetPscInfoRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getPscInfo({ * zipCode: "zip_code", * labId: 1, * radius: "10", * labAccountId: "lab_account_id" * }) */ getPscInfo(request: Vital.LabTestsGetPscInfoRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getPscInfo; /** * @param {string} order_id - Your Order ID. * @param {Vital.LabTestsGetOrderPscInfoRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getOrderPscInfo("order_id", { * radius: "10" * }) */ getOrderPscInfo(order_id: string, request?: Vital.LabTestsGetOrderPscInfoRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getOrderPscInfo; /** * This endpoint returns the lab results for the order. * @throws {@link Vital.UnprocessableEntityError} */ getResultPdf(order_id: string, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getResultPdf; /** * Return metadata related to order results, such as lab metadata, * provider and sample dates. * * @param {string} order_id * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getResultMetadata("order_id") */ getResultMetadata(order_id: string, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getResultMetadata; /** * Return both metadata and raw json test data * * @param {string} order_id * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getResultRaw("order_id") */ getResultRaw(order_id: string, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getResultRaw; /** * This endpoint returns the printed labels for the order. * @throws {@link Vital.UnprocessableEntityError} */ getLabelsPdf(order_id: string, request: Vital.LabTestsGetLabelsPdfRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getLabelsPdf; /** * @param {Vital.LabTestsGetPscAppointmentAvailabilityRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.NotFoundError} * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getPscAppointmentAvailability({ * lab: "quest", * startDate: "start_date", * zipCode: "zip_code", * radius: "10" * }) */ getPscAppointmentAvailability(request: Vital.LabTestsGetPscAppointmentAvailabilityRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getPscAppointmentAvailability; /** * @param {string} order_id - Your Order ID. * @param {Vital.AppointmentBookingRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.bookPscAppointment("order_id", { * bookingKey: "booking_key" * }) */ bookPscAppointment(order_id: string, request: Vital.AppointmentBookingRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __bookPscAppointment; /** * @param {string} order_id - Your Order ID. * @param {Vital.AppointmentRescheduleRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.reschedulePscAppointment("order_id", { * bookingKey: "booking_key" * }) */ reschedulePscAppointment(order_id: string, request: Vital.AppointmentRescheduleRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __reschedulePscAppointment; /** * @param {string} order_id - Your Order ID. * @param {Vital.VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.cancelPscAppointment("order_id", { * cancellationReasonId: "cancellationReasonId" * }) */ cancelPscAppointment(order_id: string, request: Vital.VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __cancelPscAppointment; /** * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.labTests.getPscAppointmentCancellationReason() */ getPscAppointmentCancellationReason(requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getPscAppointmentCancellationReason; /** * Get the appointment associated with an order. * * @param {string} order_id - Your Order ID. * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getPscAppointment("order_id") */ getPscAppointment(order_id: string, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getPscAppointment; /** * GET collection instructions for an order * @throws {@link Vital.UnprocessableEntityError} */ getOrderCollectionInstructionPdf(order_id: string, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getOrderCollectionInstructionPdf; /** * GET requisition pdf for an order * @throws {@link Vital.UnprocessableEntityError} */ getOrderRequistionPdf(order_id: string, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getOrderRequistionPdf; /** * GET ABN pdf for an order * @throws {@link Vital.UnprocessableEntityError} */ getOrderAbnPdf(order_id: string, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getOrderAbnPdf; /** * GET individual order by ID. * * @param {string} order_id - Your Order ID. * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.getOrder("order_id") */ getOrder(order_id: string, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __getOrder; /** * @param {Vital.CreateOrderRequestCompatible} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.createOrder({ * idempotencyKey: "X-Idempotency-Key", * idempotencyError: "no-cache", * userId: "user_id", * patientDetails: { * firstName: "first_name", * lastName: "last_name", * dob: "dob", * gender: "female", * phoneNumber: "phone_number", * email: "email" * }, * patientAddress: { * firstLine: "first_line", * city: "city", * state: "state", * zip: "zip", * country: "country" * } * }) */ createOrder(request: Vital.CreateOrderRequestCompatible, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __createOrder; /** * @param {Vital.ImportOrderBody} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.importOrder({ * userId: "user_id", * billingType: "client_bill", * orderSet: {}, * collectionMethod: "testkit", * patientDetails: { * firstName: "first_name", * lastName: "last_name", * dob: "dob", * gender: "female", * phoneNumber: "phone_number", * email: "email" * }, * patientAddress: { * receiverName: "receiver_name", * firstLine: "first_line", * city: "city", * state: "state", * zip: "zip", * country: "country" * }, * sampleId: "sample_id" * }) */ importOrder(request: Vital.ImportOrderBody, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __importOrder; /** * POST cancel order * * @param {string} order_id - Your Order ID. * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.cancelOrder("order_id") */ cancelOrder(order_id: string, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __cancelOrder; /** * Get available test kits. * * @param {string} order_id * @param {Vital.LabTestsSimulateOrderProcessRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.simulateOrderProcess("order_id", { * finalStatus: "received.walk_in_test.ordered", * delay: 1, * body: {} * }) */ simulateOrderProcess(order_id: string, request?: Vital.LabTestsSimulateOrderProcessRequest, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __simulateOrderProcess; /** * PATCH update on site collection order when draw is completed * * @param {string} order_id - Your Order ID. * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.updateOnSiteCollectionOrderDrawCompleted("order_id") */ updateOnSiteCollectionOrderDrawCompleted(order_id: string, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __updateOnSiteCollectionOrderDrawCompleted; /** * @param {Vital.ValidateIcdCodesBody} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.validateIcdCodes({ * codes: ["codes"] * }) */ validateIcdCodes(request: Vital.ValidateIcdCodesBody, requestOptions?: LabTestsClient.RequestOptions): core.HttpResponsePromise; private __validateIcdCodes; }