@tryvital/vital-node
Advanced tools
Comparing version 2.1.14 to 2.1.15
@@ -5,3 +5,3 @@ import { AxiosInstance } from 'axios'; | ||
ClientFacingLabTest, | ||
Consent, | ||
Consent, Diagnosis, | ||
HealthInsurance, | ||
@@ -13,3 +13,3 @@ LabResultsMetadata, | ||
PatientAdress, | ||
PatientDetails, | ||
PatientDetails, Payor, | ||
Physician, | ||
@@ -105,2 +105,21 @@ ShippingDetails, | ||
//Get order status. | ||
public async searchPayor(insurance_name: string, insurance_state?: string): Promise<Payor> { | ||
const resp = await this.client.post( | ||
this.baseURL.concat(`/insurance/search/payor`), { | ||
insurance_name: insurance_name, | ||
insurance_state: insurance_state ?? null | ||
} | ||
); | ||
return resp.data; | ||
} | ||
public async searchDiagnosis(diagnosis_query: string): Promise<Diagnosis[]> { | ||
const resp = await this.client.get( | ||
this.baseURL.concat('/insurance/search/diagnosis?') + | ||
new URLSearchParams({ diagnosis_query: diagnosis_query }) | ||
); | ||
return resp.data; | ||
} | ||
public async getOrders(page?: number, size?: number): Promise<Order[]> { | ||
@@ -107,0 +126,0 @@ const resp = await this.client.get( |
@@ -0,1 +1,3 @@ | ||
import {USAddress} from "./athome_phlebotomy_models"; | ||
export type ConsentType = "terms-of-use" | "telehealth-informed-consent" | "mobile-terms-and-conditions" | "notice-of-privacy-practices" | "privacy-policy" | "hipaa-authorization"; | ||
@@ -74,2 +76,21 @@ | ||
export interface PayorAddress{ | ||
city: string; | ||
state: string; | ||
zip: string; | ||
country: string; | ||
first_line: string; | ||
} | ||
export interface Payor { | ||
code: string; | ||
name: string; | ||
org_address: PayorAddress; | ||
} | ||
export interface Diagnosis { | ||
diagnosis_code: string; | ||
description: string; | ||
} | ||
export interface Order { | ||
@@ -76,0 +97,0 @@ user_id: string; |
import { AxiosInstance } from 'axios'; | ||
import { AreaInfo, ClientFacingLabTest, Consent, HealthInsurance, LabResultsMetadata, LabResultsResponse, Order, OrderRequestResponse, PatientAdress, PatientDetails, Physician, ShippingDetails } from './models/lab_tests_model'; | ||
import { AreaInfo, ClientFacingLabTest, Consent, Diagnosis, HealthInsurance, LabResultsMetadata, LabResultsResponse, Order, OrderRequestResponse, PatientAdress, PatientDetails, Payor, Physician, ShippingDetails } from './models/lab_tests_model'; | ||
export declare class OrdersApi { | ||
@@ -12,2 +12,4 @@ baseURL: string; | ||
getOrder(orderId: string): Promise<Order>; | ||
searchPayor(insurance_name: string, insurance_state?: string): Promise<Payor>; | ||
searchDiagnosis(diagnosis_query: string): Promise<Diagnosis[]>; | ||
getOrders(page?: number, size?: number): Promise<Order[]>; | ||
@@ -14,0 +16,0 @@ cancelOrder(orderId: string): Promise<OrderRequestResponse>; |
@@ -132,2 +132,33 @@ "use strict"; | ||
}; | ||
//Get order status. | ||
OrdersApi.prototype.searchPayor = function (insurance_name, insurance_state) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var resp; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, this.client.post(this.baseURL.concat("/insurance/search/payor"), { | ||
insurance_name: insurance_name, | ||
insurance_state: insurance_state !== null && insurance_state !== void 0 ? insurance_state : null | ||
})]; | ||
case 1: | ||
resp = _a.sent(); | ||
return [2 /*return*/, resp.data]; | ||
} | ||
}); | ||
}); | ||
}; | ||
OrdersApi.prototype.searchDiagnosis = function (diagnosis_query) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var resp; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, this.client.get(this.baseURL.concat('/insurance/search/diagnosis?') + | ||
new URLSearchParams({ diagnosis_query: diagnosis_query }))]; | ||
case 1: | ||
resp = _a.sent(); | ||
return [2 /*return*/, resp.data]; | ||
} | ||
}); | ||
}); | ||
}; | ||
OrdersApi.prototype.getOrders = function (page, size) { | ||
@@ -134,0 +165,0 @@ return __awaiter(this, void 0, void 0, function () { |
@@ -64,2 +64,18 @@ export declare type ConsentType = "terms-of-use" | "telehealth-informed-consent" | "mobile-terms-and-conditions" | "notice-of-privacy-practices" | "privacy-policy" | "hipaa-authorization"; | ||
} | ||
export interface PayorAddress { | ||
city: string; | ||
state: string; | ||
zip: string; | ||
country: string; | ||
first_line: string; | ||
} | ||
export interface Payor { | ||
code: string; | ||
name: string; | ||
org_address: PayorAddress; | ||
} | ||
export interface Diagnosis { | ||
diagnosis_code: string; | ||
description: string; | ||
} | ||
export interface Order { | ||
@@ -66,0 +82,0 @@ user_id: string; |
{ | ||
"name": "@tryvital/vital-node", | ||
"version": "2.1.14", | ||
"version": "2.1.15", | ||
"description": "Node client for Vital", | ||
@@ -5,0 +5,0 @@ "author": "maitham", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
246010
6914