@tryvital/vital-node 2.1.6 → 2.1.7
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 +15 -1
- package/client/Vitals.ts +114 -11
- package/client/models/activity.ts +19 -0
- package/client/models/lab_tests_model.ts +20 -1
- package/client/models/sleep_models.ts +13 -0
- package/client/models/workout_models.ts +12 -0
- package/dist/client/LabTests.d.ts +3 -2
- package/dist/client/LabTests.js +18 -1
- package/dist/client/Vitals.d.ts +10 -3
- package/dist/client/Vitals.js +55 -6
- package/dist/client/models/activity.d.ts +21 -2
- package/dist/client/models/lab_tests_model.d.ts +15 -0
- package/dist/client/models/sleep_models.d.ts +13 -0
- package/dist/client/models/workout_models.d.ts +12 -0
- package/package.json +2 -2
package/client/LabTests.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
2
|
import {
|
3
|
+
AreaInfo,
|
3
4
|
ClientFacingLabTest,
|
5
|
+
HealthInsurance,
|
4
6
|
LabResultsMetadata,
|
5
7
|
LabResultsResponse,
|
6
8
|
Order,
|
@@ -24,7 +26,8 @@ export class OrdersApi {
|
|
24
26
|
patient_details: PatientDetails,
|
25
27
|
patient_address: PatientAdress,
|
26
28
|
lab_test_id: string,
|
27
|
-
physician?: Physician
|
29
|
+
physician?: Physician,
|
30
|
+
health_insurance?: HealthInsurance
|
28
31
|
): Promise<OrderRequestResponse> {
|
29
32
|
const resp = await this.client.post(this.baseURL.concat('/order'), {
|
30
33
|
user_id: user_id,
|
@@ -32,6 +35,7 @@ export class OrdersApi {
|
|
32
35
|
patient_address: patient_address,
|
33
36
|
lab_test_id: lab_test_id,
|
34
37
|
physician: physician ? physician : null,
|
38
|
+
health_insurance: health_insurance ? health_insurance : null,
|
35
39
|
});
|
36
40
|
return resp.data;
|
37
41
|
}
|
@@ -87,6 +91,16 @@ export class ResultsApi {
|
|
87
91
|
);
|
88
92
|
return resp.data;
|
89
93
|
}
|
94
|
+
|
95
|
+
// GET lab-testing information about a geographical area,
|
96
|
+
// such as whether the area is served by our Phlebotomy network.
|
97
|
+
public async getAreaInfo(zip_code: string): Promise<AreaInfo> {
|
98
|
+
const resp = await this.client.get(
|
99
|
+
this.baseURL.concat('/area/info?') +
|
100
|
+
new URLSearchParams({ zip_code: zip_code })
|
101
|
+
);
|
102
|
+
return resp.data;
|
103
|
+
}
|
90
104
|
}
|
91
105
|
|
92
106
|
export class LabTestsApi {
|
package/client/Vitals.ts
CHANGED
@@ -25,6 +25,51 @@ export class VitalsApi {
|
|
25
25
|
return resp.data;
|
26
26
|
}
|
27
27
|
|
28
|
+
public async bloodOxygen(
|
29
|
+
userId: string,
|
30
|
+
startDate: Date,
|
31
|
+
endDate?: Date,
|
32
|
+
provider?: string,
|
33
|
+
): Promise<TimeseriesPoint[]> {
|
34
|
+
return this.timeseriesData(
|
35
|
+
userId,
|
36
|
+
'blood_oxygen',
|
37
|
+
startDate,
|
38
|
+
endDate,
|
39
|
+
provider
|
40
|
+
);
|
41
|
+
}
|
42
|
+
|
43
|
+
public async bloodPressure(
|
44
|
+
userId: string,
|
45
|
+
startDate: Date,
|
46
|
+
endDate?: Date,
|
47
|
+
provider?: string,
|
48
|
+
): Promise<TimeseriesBloodPressurePoint[]> {
|
49
|
+
return this.timeseriesData<TimeseriesBloodPressurePoint>(
|
50
|
+
userId,
|
51
|
+
'blood_pressure',
|
52
|
+
startDate,
|
53
|
+
endDate,
|
54
|
+
provider
|
55
|
+
);
|
56
|
+
}
|
57
|
+
|
58
|
+
public async caffeine(
|
59
|
+
userId: string,
|
60
|
+
startDate: Date,
|
61
|
+
endDate?: Date,
|
62
|
+
provider?: string
|
63
|
+
): Promise<TimeseriesPoint[]> {
|
64
|
+
return this.timeseriesData(
|
65
|
+
userId,
|
66
|
+
'caffeine',
|
67
|
+
startDate,
|
68
|
+
endDate,
|
69
|
+
provider
|
70
|
+
);
|
71
|
+
}
|
72
|
+
|
28
73
|
public async cholesterol(
|
29
74
|
type: 'ldl' | 'total' | 'triglycerides' | 'hdl',
|
30
75
|
userId: string,
|
@@ -56,6 +101,51 @@ export class VitalsApi {
|
|
56
101
|
);
|
57
102
|
}
|
58
103
|
|
104
|
+
public async heartrate(
|
105
|
+
userId: string,
|
106
|
+
startDate: Date,
|
107
|
+
endDate?: Date,
|
108
|
+
provider?: string
|
109
|
+
): Promise<TimeseriesPoint[]> {
|
110
|
+
return this.timeseriesData(
|
111
|
+
userId,
|
112
|
+
'heartrate',
|
113
|
+
startDate,
|
114
|
+
endDate,
|
115
|
+
provider
|
116
|
+
);
|
117
|
+
}
|
118
|
+
|
119
|
+
public async hrv(
|
120
|
+
userId: string,
|
121
|
+
startDate: Date,
|
122
|
+
endDate?: Date,
|
123
|
+
provider?: string
|
124
|
+
): Promise<TimeseriesPoint[]> {
|
125
|
+
return this.timeseriesData(
|
126
|
+
userId,
|
127
|
+
'hrv',
|
128
|
+
startDate,
|
129
|
+
endDate,
|
130
|
+
provider
|
131
|
+
);
|
132
|
+
}
|
133
|
+
|
134
|
+
public async hypnogram(
|
135
|
+
userId: string,
|
136
|
+
startDate: Date,
|
137
|
+
endDate?: Date,
|
138
|
+
provider?: string
|
139
|
+
): Promise<TimeseriesPoint[]> {
|
140
|
+
return this.timeseriesData(
|
141
|
+
userId,
|
142
|
+
'hypnogram',
|
143
|
+
startDate,
|
144
|
+
endDate,
|
145
|
+
provider
|
146
|
+
);
|
147
|
+
}
|
148
|
+
|
59
149
|
public async ige(
|
60
150
|
userId: string,
|
61
151
|
startDate: Date,
|
@@ -74,7 +164,7 @@ export class VitalsApi {
|
|
74
164
|
return this.timeseriesData(userId, 'igg', startDate, endDate, provider);
|
75
165
|
}
|
76
166
|
|
77
|
-
public async
|
167
|
+
public async mindfulnessMinutes(
|
78
168
|
userId: string,
|
79
169
|
startDate: Date,
|
80
170
|
endDate?: Date,
|
@@ -82,39 +172,52 @@ export class VitalsApi {
|
|
82
172
|
): Promise<TimeseriesPoint[]> {
|
83
173
|
return this.timeseriesData(
|
84
174
|
userId,
|
85
|
-
'
|
175
|
+
'mindfulness_minutes',
|
86
176
|
startDate,
|
87
177
|
endDate,
|
88
178
|
provider
|
89
179
|
);
|
90
180
|
}
|
91
181
|
|
92
|
-
public async
|
182
|
+
public async respiratoryRate(
|
93
183
|
userId: string,
|
94
184
|
startDate: Date,
|
95
185
|
endDate?: Date,
|
96
|
-
provider?: string
|
97
|
-
|
186
|
+
provider?: string
|
98
187
|
): Promise<TimeseriesPoint[]> {
|
99
188
|
return this.timeseriesData(
|
100
189
|
userId,
|
101
|
-
'
|
190
|
+
'respiratory_rate',
|
102
191
|
startDate,
|
103
192
|
endDate,
|
104
193
|
provider
|
105
194
|
);
|
106
195
|
}
|
107
196
|
|
108
|
-
public async
|
197
|
+
public async steps(
|
109
198
|
userId: string,
|
110
199
|
startDate: Date,
|
111
200
|
endDate?: Date,
|
112
|
-
provider?: string
|
201
|
+
provider?: string
|
202
|
+
): Promise<TimeseriesPoint[]> {
|
203
|
+
return this.timeseriesData(
|
204
|
+
userId,
|
205
|
+
'steps',
|
206
|
+
startDate,
|
207
|
+
endDate,
|
208
|
+
provider
|
209
|
+
);
|
210
|
+
}
|
113
211
|
|
114
|
-
|
115
|
-
|
212
|
+
public async water(
|
213
|
+
userId: string,
|
214
|
+
startDate: Date,
|
215
|
+
endDate?: Date,
|
216
|
+
provider?: string
|
217
|
+
): Promise<TimeseriesPoint[]> {
|
218
|
+
return this.timeseriesData(
|
116
219
|
userId,
|
117
|
-
'
|
220
|
+
'water',
|
118
221
|
startDate,
|
119
222
|
endDate,
|
120
223
|
provider
|
@@ -11,8 +11,15 @@ export interface ClientFacingActivity {
|
|
11
11
|
* Date for specified record
|
12
12
|
* @type {Date}
|
13
13
|
* @memberof ClientFacingActivity
|
14
|
+
* @deprecated Use calendar_date instead
|
14
15
|
*/
|
15
16
|
date: Date;
|
17
|
+
/**
|
18
|
+
* Date for specified record (YYYY-MM-DD)
|
19
|
+
* @type {String}
|
20
|
+
* @memberof ClientFacingActivity
|
21
|
+
*/
|
22
|
+
calendar_date: string;
|
16
23
|
/**
|
17
24
|
* Total energy consumption during the day including Basal Metabolic Rate in kilocalories.::kilocalories
|
18
25
|
* @type {number}
|
@@ -25,6 +32,12 @@ export interface ClientFacingActivity {
|
|
25
32
|
* @memberof ClientFacingActivity
|
26
33
|
*/
|
27
34
|
calories_active: number;
|
35
|
+
/**
|
36
|
+
* Number of floors climbed by the user::count
|
37
|
+
* @type {number}
|
38
|
+
* @memberof ClientFacingActivity
|
39
|
+
*/
|
40
|
+
floors_climbed?: number;
|
28
41
|
/**
|
29
42
|
* Total number of steps registered during the day.::steps
|
30
43
|
* @type {number}
|
@@ -56,6 +69,12 @@ export interface ClientFacingActivity {
|
|
56
69
|
*/
|
57
70
|
high?: number;
|
58
71
|
/**
|
72
|
+
* Timezone offset from UTC as seconds. For example, EEST (Eastern European Summer Time, +3h) is 10800. PST (Pacific Standard Time, -8h) is -28800::seconds
|
73
|
+
* @type {number}
|
74
|
+
* @memberof ClientFacingActivity
|
75
|
+
*/
|
76
|
+
timezone_offset?: number;
|
77
|
+
/**
|
59
78
|
* Source the data has come from.
|
60
79
|
* @type {SourceClientFacing}
|
61
80
|
* @memberof ClientFacingActivity
|
@@ -17,6 +17,16 @@ export interface PatientDetails {
|
|
17
17
|
last_name: string;
|
18
18
|
}
|
19
19
|
|
20
|
+
export interface HealthInsurance {
|
21
|
+
front_image: Image;
|
22
|
+
back_image: Image;
|
23
|
+
}
|
24
|
+
|
25
|
+
export interface Image {
|
26
|
+
content: string;
|
27
|
+
content_type: 'image/jpeg' | 'image/jpg' | 'image/png';
|
28
|
+
}
|
29
|
+
|
20
30
|
export interface Physician {
|
21
31
|
first_name: string;
|
22
32
|
last_name: string;
|
@@ -51,7 +61,7 @@ export interface Order {
|
|
51
61
|
team_id: string;
|
52
62
|
patient_details: PatientDetails;
|
53
63
|
patient_address: PatientAdress;
|
54
|
-
physician: Physician
|
64
|
+
physician: Physician;
|
55
65
|
lab_test: Testkit;
|
56
66
|
// TODO CHECK WHAT DETAILS IS
|
57
67
|
details: Object;
|
@@ -125,3 +135,12 @@ export interface LabResultsResponse {
|
|
125
135
|
metadata: LabResultsMetadata;
|
126
136
|
results: Object;
|
127
137
|
}
|
138
|
+
|
139
|
+
export interface AreaInfo {
|
140
|
+
zip_code: string;
|
141
|
+
phlebotomy: PhlebotomyAreaInfo;
|
142
|
+
}
|
143
|
+
|
144
|
+
export interface PhlebotomyAreaInfo {
|
145
|
+
is_served: boolean;
|
146
|
+
}
|
@@ -17,8 +17,15 @@ export interface ClientFacingSleep {
|
|
17
17
|
* Date for specified record
|
18
18
|
* @type {Date}
|
19
19
|
* @memberof ClientFacingSleep
|
20
|
+
* @deprecated Use calendar_date instead
|
20
21
|
*/
|
21
22
|
date: Date;
|
23
|
+
/**
|
24
|
+
* Date for specified record (YYYY-MM-DD). This generally matches the sleep end date.
|
25
|
+
* @type {String}
|
26
|
+
* @memberof ClientFacingSleep
|
27
|
+
*/
|
28
|
+
calendar_date: string;
|
22
29
|
/**
|
23
30
|
* UTC Time when the sleep period started
|
24
31
|
* @type {Date}
|
@@ -115,6 +122,12 @@ export interface ClientFacingSleep {
|
|
115
122
|
* @memberof ClientFacingSleep
|
116
123
|
*/
|
117
124
|
respiratory_rate?: number;
|
125
|
+
/**
|
126
|
+
* Average skin temperature.::celcius
|
127
|
+
* @type {number}
|
128
|
+
* @memberof ClientFacingSleep
|
129
|
+
*/
|
130
|
+
skin_temperature?: number;
|
118
131
|
/**
|
119
132
|
* Source the data has come from.
|
120
133
|
* @type {SourceClientFacing}
|
@@ -57,6 +57,12 @@ export interface ClientFacingWorkout {
|
|
57
57
|
* @memberof ClientFacingWorkout
|
58
58
|
*/
|
59
59
|
time_end: Date;
|
60
|
+
/**
|
61
|
+
* Date for specified record (YYYY-MM-DD)
|
62
|
+
* @type {String}
|
63
|
+
* @memberof ClientFacingWorkout
|
64
|
+
*/
|
65
|
+
calendar_date: string;
|
60
66
|
/**
|
61
67
|
* Calories burned during the workout::kCal
|
62
68
|
* @type {number}
|
@@ -153,6 +159,12 @@ export interface ClientFacingWorkout {
|
|
153
159
|
* @memberof ClientFacingWorkout
|
154
160
|
*/
|
155
161
|
map?: string;
|
162
|
+
/**
|
163
|
+
* Timezone offset from UTC as seconds. For example, EEST (Eastern European Summer Time, +3h) is 10800. PST (Pacific Standard Time, -8h) is -28800::seconds
|
164
|
+
* @type {number}
|
165
|
+
* @memberof ClientFacingActivity
|
166
|
+
*/
|
167
|
+
timezone_offset?: number;
|
156
168
|
}
|
157
169
|
|
158
170
|
export interface ClientWorkoutResponse {
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
|
-
import { ClientFacingLabTest, LabResultsMetadata, LabResultsResponse, Order, OrderRequestResponse, PatientAdress, PatientDetails, Physician } from './models/lab_tests_model';
|
2
|
+
import { AreaInfo, ClientFacingLabTest, HealthInsurance, LabResultsMetadata, LabResultsResponse, Order, OrderRequestResponse, PatientAdress, PatientDetails, Physician } from './models/lab_tests_model';
|
3
3
|
export declare class OrdersApi {
|
4
4
|
baseURL: string;
|
5
5
|
client: AxiosInstance;
|
6
6
|
constructor(baseURL: string, axios: AxiosInstance);
|
7
|
-
create_order(user_id: string, patient_details: PatientDetails, patient_address: PatientAdress, lab_test_id: string, physician?: Physician): Promise<OrderRequestResponse>;
|
7
|
+
create_order(user_id: string, patient_details: PatientDetails, patient_address: PatientAdress, lab_test_id: string, physician?: Physician, health_insurance?: HealthInsurance): Promise<OrderRequestResponse>;
|
8
8
|
getOrder(orderId: string): Promise<Order>;
|
9
9
|
cancelOrder(orderId: string): Promise<OrderRequestResponse>;
|
10
10
|
}
|
@@ -15,6 +15,7 @@ export declare class ResultsApi {
|
|
15
15
|
getResults(orderId: string): Promise<LabResultsResponse>;
|
16
16
|
getResultsPdf(orderId: string): Promise<string>;
|
17
17
|
getResultsMetadata(orderId: string): Promise<LabResultsMetadata>;
|
18
|
+
getAreaInfo(zip_code: string): Promise<AreaInfo>;
|
18
19
|
}
|
19
20
|
export declare class LabTestsApi {
|
20
21
|
baseURL: string;
|
package/dist/client/LabTests.js
CHANGED
@@ -43,7 +43,7 @@ var OrdersApi = /** @class */ (function () {
|
|
43
43
|
this.client = axios;
|
44
44
|
}
|
45
45
|
// Create new order
|
46
|
-
OrdersApi.prototype.create_order = function (user_id, patient_details, patient_address, lab_test_id, physician) {
|
46
|
+
OrdersApi.prototype.create_order = function (user_id, patient_details, patient_address, lab_test_id, physician, health_insurance) {
|
47
47
|
return __awaiter(this, void 0, void 0, function () {
|
48
48
|
var resp;
|
49
49
|
return __generator(this, function (_a) {
|
@@ -54,6 +54,7 @@ var OrdersApi = /** @class */ (function () {
|
|
54
54
|
patient_address: patient_address,
|
55
55
|
lab_test_id: lab_test_id,
|
56
56
|
physician: physician ? physician : null,
|
57
|
+
health_insurance: health_insurance ? health_insurance : null,
|
57
58
|
})];
|
58
59
|
case 1:
|
59
60
|
resp = _a.sent();
|
@@ -142,6 +143,22 @@ var ResultsApi = /** @class */ (function () {
|
|
142
143
|
});
|
143
144
|
});
|
144
145
|
};
|
146
|
+
// GET lab-testing information about a geographical area,
|
147
|
+
// such as whether the area is served by our Phlebotomy network.
|
148
|
+
ResultsApi.prototype.getAreaInfo = function (zip_code) {
|
149
|
+
return __awaiter(this, void 0, void 0, function () {
|
150
|
+
var resp;
|
151
|
+
return __generator(this, function (_a) {
|
152
|
+
switch (_a.label) {
|
153
|
+
case 0: return [4 /*yield*/, this.client.get(this.baseURL.concat('/area/info?') +
|
154
|
+
new URLSearchParams({ zip_code: zip_code }))];
|
155
|
+
case 1:
|
156
|
+
resp = _a.sent();
|
157
|
+
return [2 /*return*/, resp.data];
|
158
|
+
}
|
159
|
+
});
|
160
|
+
});
|
161
|
+
};
|
145
162
|
return ResultsApi;
|
146
163
|
}());
|
147
164
|
exports.ResultsApi = ResultsApi;
|
package/dist/client/Vitals.d.ts
CHANGED
@@ -5,11 +5,18 @@ export declare class VitalsApi {
|
|
5
5
|
client: AxiosInstance;
|
6
6
|
constructor(baseURL: string, axios: AxiosInstance);
|
7
7
|
private timeseriesData;
|
8
|
+
bloodOxygen(userId: string, startDate: Date, endDate?: Date, provider?: string): Promise<TimeseriesPoint[]>;
|
9
|
+
bloodPressure(userId: string, startDate: Date, endDate?: Date, provider?: string): Promise<TimeseriesBloodPressurePoint[]>;
|
10
|
+
caffeine(userId: string, startDate: Date, endDate?: Date, provider?: string): Promise<TimeseriesPoint[]>;
|
8
11
|
cholesterol(type: 'ldl' | 'total' | 'triglycerides' | 'hdl', userId: string, startDate: Date, endDate?: Date, provider?: string): Promise<TimeseriesPoint[]>;
|
9
12
|
glucose(userId: string, startDate: Date, endDate?: Date, provider?: string): Promise<TimeseriesPoint[]>;
|
13
|
+
heartrate(userId: string, startDate: Date, endDate?: Date, provider?: string): Promise<TimeseriesPoint[]>;
|
14
|
+
hrv(userId: string, startDate: Date, endDate?: Date, provider?: string): Promise<TimeseriesPoint[]>;
|
15
|
+
hypnogram(userId: string, startDate: Date, endDate?: Date, provider?: string): Promise<TimeseriesPoint[]>;
|
10
16
|
ige(userId: string, startDate: Date, endDate?: Date, provider?: string): Promise<TimeseriesPoint[]>;
|
11
17
|
igg(userId: string, startDate: Date, endDate?: Date, provider?: string): Promise<TimeseriesPoint[]>;
|
12
|
-
|
13
|
-
|
14
|
-
|
18
|
+
mindfulnessMinutes(userId: string, startDate: Date, endDate?: Date, provider?: string): Promise<TimeseriesPoint[]>;
|
19
|
+
respiratoryRate(userId: string, startDate: Date, endDate?: Date, provider?: string): Promise<TimeseriesPoint[]>;
|
20
|
+
steps(userId: string, startDate: Date, endDate?: Date, provider?: string): Promise<TimeseriesPoint[]>;
|
21
|
+
water(userId: string, startDate: Date, endDate?: Date, provider?: string): Promise<TimeseriesPoint[]>;
|
15
22
|
}
|
package/dist/client/Vitals.js
CHANGED
@@ -57,6 +57,27 @@ var VitalsApi = /** @class */ (function () {
|
|
57
57
|
});
|
58
58
|
});
|
59
59
|
};
|
60
|
+
VitalsApi.prototype.bloodOxygen = function (userId, startDate, endDate, provider) {
|
61
|
+
return __awaiter(this, void 0, void 0, function () {
|
62
|
+
return __generator(this, function (_a) {
|
63
|
+
return [2 /*return*/, this.timeseriesData(userId, 'blood_oxygen', startDate, endDate, provider)];
|
64
|
+
});
|
65
|
+
});
|
66
|
+
};
|
67
|
+
VitalsApi.prototype.bloodPressure = function (userId, startDate, endDate, provider) {
|
68
|
+
return __awaiter(this, void 0, void 0, function () {
|
69
|
+
return __generator(this, function (_a) {
|
70
|
+
return [2 /*return*/, this.timeseriesData(userId, 'blood_pressure', startDate, endDate, provider)];
|
71
|
+
});
|
72
|
+
});
|
73
|
+
};
|
74
|
+
VitalsApi.prototype.caffeine = function (userId, startDate, endDate, provider) {
|
75
|
+
return __awaiter(this, void 0, void 0, function () {
|
76
|
+
return __generator(this, function (_a) {
|
77
|
+
return [2 /*return*/, this.timeseriesData(userId, 'caffeine', startDate, endDate, provider)];
|
78
|
+
});
|
79
|
+
});
|
80
|
+
};
|
60
81
|
VitalsApi.prototype.cholesterol = function (type, userId, startDate, endDate, provider) {
|
61
82
|
return __awaiter(this, void 0, void 0, function () {
|
62
83
|
return __generator(this, function (_a) {
|
@@ -71,6 +92,27 @@ var VitalsApi = /** @class */ (function () {
|
|
71
92
|
});
|
72
93
|
});
|
73
94
|
};
|
95
|
+
VitalsApi.prototype.heartrate = function (userId, startDate, endDate, provider) {
|
96
|
+
return __awaiter(this, void 0, void 0, function () {
|
97
|
+
return __generator(this, function (_a) {
|
98
|
+
return [2 /*return*/, this.timeseriesData(userId, 'heartrate', startDate, endDate, provider)];
|
99
|
+
});
|
100
|
+
});
|
101
|
+
};
|
102
|
+
VitalsApi.prototype.hrv = function (userId, startDate, endDate, provider) {
|
103
|
+
return __awaiter(this, void 0, void 0, function () {
|
104
|
+
return __generator(this, function (_a) {
|
105
|
+
return [2 /*return*/, this.timeseriesData(userId, 'hrv', startDate, endDate, provider)];
|
106
|
+
});
|
107
|
+
});
|
108
|
+
};
|
109
|
+
VitalsApi.prototype.hypnogram = function (userId, startDate, endDate, provider) {
|
110
|
+
return __awaiter(this, void 0, void 0, function () {
|
111
|
+
return __generator(this, function (_a) {
|
112
|
+
return [2 /*return*/, this.timeseriesData(userId, 'hypnogram', startDate, endDate, provider)];
|
113
|
+
});
|
114
|
+
});
|
115
|
+
};
|
74
116
|
VitalsApi.prototype.ige = function (userId, startDate, endDate, provider) {
|
75
117
|
return __awaiter(this, void 0, void 0, function () {
|
76
118
|
return __generator(this, function (_a) {
|
@@ -85,24 +127,31 @@ var VitalsApi = /** @class */ (function () {
|
|
85
127
|
});
|
86
128
|
});
|
87
129
|
};
|
88
|
-
VitalsApi.prototype.
|
130
|
+
VitalsApi.prototype.mindfulnessMinutes = function (userId, startDate, endDate, provider) {
|
89
131
|
return __awaiter(this, void 0, void 0, function () {
|
90
132
|
return __generator(this, function (_a) {
|
91
|
-
return [2 /*return*/, this.timeseriesData(userId, '
|
133
|
+
return [2 /*return*/, this.timeseriesData(userId, 'mindfulness_minutes', startDate, endDate, provider)];
|
92
134
|
});
|
93
135
|
});
|
94
136
|
};
|
95
|
-
VitalsApi.prototype.
|
137
|
+
VitalsApi.prototype.respiratoryRate = function (userId, startDate, endDate, provider) {
|
96
138
|
return __awaiter(this, void 0, void 0, function () {
|
97
139
|
return __generator(this, function (_a) {
|
98
|
-
return [2 /*return*/, this.timeseriesData(userId, '
|
140
|
+
return [2 /*return*/, this.timeseriesData(userId, 'respiratory_rate', startDate, endDate, provider)];
|
99
141
|
});
|
100
142
|
});
|
101
143
|
};
|
102
|
-
VitalsApi.prototype.
|
144
|
+
VitalsApi.prototype.steps = function (userId, startDate, endDate, provider) {
|
103
145
|
return __awaiter(this, void 0, void 0, function () {
|
104
146
|
return __generator(this, function (_a) {
|
105
|
-
return [2 /*return*/, this.timeseriesData(userId, '
|
147
|
+
return [2 /*return*/, this.timeseriesData(userId, 'steps', startDate, endDate, provider)];
|
148
|
+
});
|
149
|
+
});
|
150
|
+
};
|
151
|
+
VitalsApi.prototype.water = function (userId, startDate, endDate, provider) {
|
152
|
+
return __awaiter(this, void 0, void 0, function () {
|
153
|
+
return __generator(this, function (_a) {
|
154
|
+
return [2 /*return*/, this.timeseriesData(userId, 'water', startDate, endDate, provider)];
|
106
155
|
});
|
107
156
|
});
|
108
157
|
};
|
@@ -10,8 +10,15 @@ export interface ClientFacingActivity {
|
|
10
10
|
* Date for specified record
|
11
11
|
* @type {Date}
|
12
12
|
* @memberof ClientFacingActivity
|
13
|
+
* @deprecated Use calendar_date instead
|
13
14
|
*/
|
14
15
|
date: Date;
|
16
|
+
/**
|
17
|
+
* Date for specified record (YYYY-MM-DD)
|
18
|
+
* @type {String}
|
19
|
+
* @memberof ClientFacingActivity
|
20
|
+
*/
|
21
|
+
calendar_date: string;
|
15
22
|
/**
|
16
23
|
* Total energy consumption during the day including Basal Metabolic Rate in kilocalories.::kilocalories
|
17
24
|
* @type {number}
|
@@ -24,6 +31,12 @@ export interface ClientFacingActivity {
|
|
24
31
|
* @memberof ClientFacingActivity
|
25
32
|
*/
|
26
33
|
calories_active: number;
|
34
|
+
/**
|
35
|
+
* Number of floors climbed by the user::count
|
36
|
+
* @type {number}
|
37
|
+
* @memberof ClientFacingActivity
|
38
|
+
*/
|
39
|
+
floors_climbed?: number;
|
27
40
|
/**
|
28
41
|
* Total number of steps registered during the day.::steps
|
29
42
|
* @type {number}
|
@@ -55,10 +68,16 @@ export interface ClientFacingActivity {
|
|
55
68
|
*/
|
56
69
|
high?: number;
|
57
70
|
/**
|
58
|
-
*
|
59
|
-
* @type {
|
71
|
+
* Timezone offset from UTC as seconds. For example, EEST (Eastern European Summer Time, +3h) is 10800. PST (Pacific Standard Time, -8h) is -28800::seconds
|
72
|
+
* @type {number}
|
60
73
|
* @memberof ClientFacingActivity
|
61
74
|
*/
|
75
|
+
timezone_offset?: number;
|
76
|
+
/**
|
77
|
+
* Source the data has come from.
|
78
|
+
* @type {SourceClientFacing}
|
79
|
+
* @memberof ClientFacingActivity
|
80
|
+
*/
|
62
81
|
source: SourceClientFacing;
|
63
82
|
user_id: string;
|
64
83
|
}
|
@@ -15,6 +15,14 @@ export interface PatientDetails {
|
|
15
15
|
phone_number: string;
|
16
16
|
last_name: string;
|
17
17
|
}
|
18
|
+
export interface HealthInsurance {
|
19
|
+
front_image: Image;
|
20
|
+
back_image: Image;
|
21
|
+
}
|
22
|
+
export interface Image {
|
23
|
+
content: string;
|
24
|
+
content_type: 'image/jpeg' | 'image/jpg' | 'image/png';
|
25
|
+
}
|
18
26
|
export interface Physician {
|
19
27
|
first_name: string;
|
20
28
|
last_name: string;
|
@@ -98,3 +106,10 @@ export interface LabResultsResponse {
|
|
98
106
|
metadata: LabResultsMetadata;
|
99
107
|
results: Object;
|
100
108
|
}
|
109
|
+
export interface AreaInfo {
|
110
|
+
zip_code: string;
|
111
|
+
phlebotomy: PhlebotomyAreaInfo;
|
112
|
+
}
|
113
|
+
export interface PhlebotomyAreaInfo {
|
114
|
+
is_served: boolean;
|
115
|
+
}
|
@@ -16,8 +16,15 @@ export interface ClientFacingSleep {
|
|
16
16
|
* Date for specified record
|
17
17
|
* @type {Date}
|
18
18
|
* @memberof ClientFacingSleep
|
19
|
+
* @deprecated Use calendar_date instead
|
19
20
|
*/
|
20
21
|
date: Date;
|
22
|
+
/**
|
23
|
+
* Date for specified record (YYYY-MM-DD). This generally matches the sleep end date.
|
24
|
+
* @type {String}
|
25
|
+
* @memberof ClientFacingSleep
|
26
|
+
*/
|
27
|
+
calendar_date: string;
|
21
28
|
/**
|
22
29
|
* UTC Time when the sleep period started
|
23
30
|
* @type {Date}
|
@@ -114,6 +121,12 @@ export interface ClientFacingSleep {
|
|
114
121
|
* @memberof ClientFacingSleep
|
115
122
|
*/
|
116
123
|
respiratory_rate?: number;
|
124
|
+
/**
|
125
|
+
* Average skin temperature.::celcius
|
126
|
+
* @type {number}
|
127
|
+
* @memberof ClientFacingSleep
|
128
|
+
*/
|
129
|
+
skin_temperature?: number;
|
117
130
|
/**
|
118
131
|
* Source the data has come from.
|
119
132
|
* @type {SourceClientFacing}
|
@@ -55,6 +55,12 @@ export interface ClientFacingWorkout {
|
|
55
55
|
* @memberof ClientFacingWorkout
|
56
56
|
*/
|
57
57
|
time_end: Date;
|
58
|
+
/**
|
59
|
+
* Date for specified record (YYYY-MM-DD)
|
60
|
+
* @type {String}
|
61
|
+
* @memberof ClientFacingWorkout
|
62
|
+
*/
|
63
|
+
calendar_date: string;
|
58
64
|
/**
|
59
65
|
* Calories burned during the workout::kCal
|
60
66
|
* @type {number}
|
@@ -146,6 +152,12 @@ export interface ClientFacingWorkout {
|
|
146
152
|
* @memberof ClientFacingWorkout
|
147
153
|
*/
|
148
154
|
map?: string;
|
155
|
+
/**
|
156
|
+
* Timezone offset from UTC as seconds. For example, EEST (Eastern European Summer Time, +3h) is 10800. PST (Pacific Standard Time, -8h) is -28800::seconds
|
157
|
+
* @type {number}
|
158
|
+
* @memberof ClientFacingActivity
|
159
|
+
*/
|
160
|
+
timezone_offset?: number;
|
149
161
|
}
|
150
162
|
export interface ClientWorkoutResponse {
|
151
163
|
/**
|
package/package.json
CHANGED