@tryvital/vital-node 2.1.11 → 2.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/LabTests.ts +8 -0
- package/dist/client/LabTests.d.ts +1 -0
- package/dist/client/LabTests.js +13 -0
- package/package.json +1 -1
package/client/LabTests.ts
CHANGED
@@ -21,6 +21,14 @@ export class OrdersApi {
|
|
21
21
|
this.baseURL = baseURL;
|
22
22
|
this.client = axios;
|
23
23
|
}
|
24
|
+
|
25
|
+
public async getRequisitionPdf(orderId: string): Promise<string> {
|
26
|
+
const resp = await this.client.get(
|
27
|
+
this.baseURL.concat(`/order/${orderId}/requisition/pdf`),
|
28
|
+
{ headers: { 'Accept': 'application/pdf' } }
|
29
|
+
);
|
30
|
+
return resp.data;
|
31
|
+
}
|
24
32
|
|
25
33
|
public async create_unregistered_testkit_order(
|
26
34
|
user_id: string,
|
@@ -4,6 +4,7 @@ export declare class OrdersApi {
|
|
4
4
|
baseURL: string;
|
5
5
|
client: AxiosInstance;
|
6
6
|
constructor(baseURL: string, axios: AxiosInstance);
|
7
|
+
getRequisitionPdf(orderId: string): Promise<string>;
|
7
8
|
create_unregistered_testkit_order(user_id: string, lab_test_id: string, shipping_details: ShippingDetails): Promise<OrderRequestResponse>;
|
8
9
|
register_testkit_order(user_id: string, sample_id: string, patient_details: PatientDetails, patient_address: PatientAdress, physician?: Physician, consents?: [Consent]): Promise<OrderRequestResponse>;
|
9
10
|
create_order(user_id: string, patient_details: PatientDetails, patient_address: PatientAdress, lab_test_id: string, physician?: Physician, health_insurance?: HealthInsurance, priority?: boolean, consents?: [Consent]): Promise<OrderRequestResponse>;
|
package/dist/client/LabTests.js
CHANGED
@@ -42,6 +42,19 @@ var OrdersApi = /** @class */ (function () {
|
|
42
42
|
this.baseURL = baseURL;
|
43
43
|
this.client = axios;
|
44
44
|
}
|
45
|
+
OrdersApi.prototype.getRequisitionPdf = function (orderId) {
|
46
|
+
return __awaiter(this, void 0, void 0, function () {
|
47
|
+
var resp;
|
48
|
+
return __generator(this, function (_a) {
|
49
|
+
switch (_a.label) {
|
50
|
+
case 0: return [4 /*yield*/, this.client.get(this.baseURL.concat("/order/" + orderId + "/requisition/pdf"), { headers: { 'Accept': 'application/pdf' } })];
|
51
|
+
case 1:
|
52
|
+
resp = _a.sent();
|
53
|
+
return [2 /*return*/, resp.data];
|
54
|
+
}
|
55
|
+
});
|
56
|
+
});
|
57
|
+
};
|
45
58
|
OrdersApi.prototype.create_unregistered_testkit_order = function (user_id, lab_test_id, shipping_details) {
|
46
59
|
return __awaiter(this, void 0, void 0, function () {
|
47
60
|
var resp;
|