oro-sdk 2.1.4
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/LICENSE +21 -0
- package/README.md +72 -0
- package/dist/client.d.ts +464 -0
- package/dist/helpers/client.d.ts +23 -0
- package/dist/helpers/index.d.ts +4 -0
- package/dist/helpers/patient-registration.d.ts +16 -0
- package/dist/helpers/vault-grants.d.ts +20 -0
- package/dist/helpers/workflow.d.ts +23 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +8 -0
- package/dist/models/client.d.ts +28 -0
- package/dist/models/consult.d.ts +102 -0
- package/dist/models/diagnosis.d.ts +122 -0
- package/dist/models/error.d.ts +26 -0
- package/dist/models/guard.d.ts +119 -0
- package/dist/models/index.d.ts +9 -0
- package/dist/models/practice.d.ts +353 -0
- package/dist/models/shared.d.ts +8 -0
- package/dist/models/vault.d.ts +124 -0
- package/dist/models/workflow.d.ts +106 -0
- package/dist/oro-sdk.cjs.development.js +7675 -0
- package/dist/oro-sdk.cjs.development.js.map +1 -0
- package/dist/oro-sdk.cjs.production.min.js +2 -0
- package/dist/oro-sdk.cjs.production.min.js.map +1 -0
- package/dist/oro-sdk.esm.js +7682 -0
- package/dist/oro-sdk.esm.js.map +1 -0
- package/dist/sdk-revision/client.d.ts +21 -0
- package/dist/sdk-revision/index.d.ts +1 -0
- package/dist/services/api.d.ts +11 -0
- package/dist/services/axios.d.ts +14 -0
- package/dist/services/consult.d.ts +54 -0
- package/dist/services/diagnosis.d.ts +38 -0
- package/dist/services/external/clinia.d.ts +82 -0
- package/dist/services/external/index.d.ts +1 -0
- package/dist/services/guard.d.ts +92 -0
- package/dist/services/index.d.ts +10 -0
- package/dist/services/practice.d.ts +100 -0
- package/dist/services/teller.d.ts +9 -0
- package/dist/services/vault.d.ts +54 -0
- package/dist/services/workflow.d.ts +21 -0
- package/package.json +63 -0
- package/src/client.ts +1843 -0
- package/src/helpers/client.ts +199 -0
- package/src/helpers/index.ts +4 -0
- package/src/helpers/patient-registration.ts +490 -0
- package/src/helpers/vault-grants.ts +51 -0
- package/src/helpers/workflow.ts +261 -0
- package/src/index.ts +61 -0
- package/src/models/client.ts +33 -0
- package/src/models/consult.ts +110 -0
- package/src/models/diagnosis.ts +141 -0
- package/src/models/error.ts +13 -0
- package/src/models/guard.ts +136 -0
- package/src/models/index.ts +9 -0
- package/src/models/practice.ts +411 -0
- package/src/models/shared.ts +6 -0
- package/src/models/vault.ts +158 -0
- package/src/models/workflow.ts +142 -0
- package/src/sdk-revision/client.ts +62 -0
- package/src/sdk-revision/index.ts +1 -0
- package/src/services/api.ts +77 -0
- package/src/services/axios.ts +91 -0
- package/src/services/consult.ts +265 -0
- package/src/services/diagnosis.ts +132 -0
- package/src/services/external/clinia.ts +133 -0
- package/src/services/external/index.ts +1 -0
- package/src/services/guard.ts +228 -0
- package/src/services/index.ts +10 -0
- package/src/services/practice.ts +537 -0
- package/src/services/teller.ts +39 -0
- package/src/services/vault.ts +178 -0
- package/src/services/workflow.ts +36 -0
@@ -0,0 +1,353 @@
|
|
1
|
+
export declare enum WorkflowType {
|
2
|
+
Onboard = "Onboard",
|
3
|
+
Followup = "Followup",
|
4
|
+
Renew = "Renew",
|
5
|
+
DataRetrieve = "DataRetrieve"
|
6
|
+
}
|
7
|
+
export declare enum RateDimension {
|
8
|
+
RatioOnTotal = "RatioOnTotal",
|
9
|
+
FixedOnTotal = "FixedOnTotal",
|
10
|
+
RatioPlatformFee = "RatioPlatformFee",
|
11
|
+
FixedPlatformFee = "FixedPlatformFee",
|
12
|
+
RatioOnPlatformFeeTotal = "RatioOnPlatformFeeTotal",
|
13
|
+
FixedOnPlatformFeeTotal = "FixedOnPlatformFeeTotal",
|
14
|
+
RatioOnItem = "RatioOnItem",
|
15
|
+
FixedOnItem = "FixedOnItem"
|
16
|
+
}
|
17
|
+
export declare enum PlanType {
|
18
|
+
Onboard = "Onboard",
|
19
|
+
Followup = "Followup",
|
20
|
+
Renew = "Renew",
|
21
|
+
DataRetrieve = "DataRetrieve"
|
22
|
+
}
|
23
|
+
export declare enum PaymentStatus {
|
24
|
+
Pending = "Pending",
|
25
|
+
Success = "Success",
|
26
|
+
Failure = "Failure",
|
27
|
+
Canceled = "Canceled"
|
28
|
+
}
|
29
|
+
export declare enum PractitionerStatus {
|
30
|
+
Practicing = "Practicing",
|
31
|
+
Retired = "Retired",
|
32
|
+
NotInvolvedAnymore = "NotInvolvedAnymore",
|
33
|
+
Deactivated = "Deactivated",
|
34
|
+
Flagged = "Flagged",
|
35
|
+
InConflict = "InConflict",
|
36
|
+
Delicensed = "Delicensed"
|
37
|
+
}
|
38
|
+
export declare enum AssignmentStatus {
|
39
|
+
Assigned = "Assigned",
|
40
|
+
Reassigned = "Reassigned",
|
41
|
+
Cancelled = "Cancelled"
|
42
|
+
}
|
43
|
+
export declare enum PractitionnerRoleType {
|
44
|
+
Doctor = "Doctor",
|
45
|
+
MedicalAssistant = "MedicalAssistant",
|
46
|
+
MedicalSecretary = "MedicalSecretary",
|
47
|
+
Nurse = "Nurse",
|
48
|
+
Specialist = "Specialist",
|
49
|
+
LabAssistant = "LabAssistant",
|
50
|
+
Administrative = "Administrative",
|
51
|
+
ManualDispatcher = "ManualDispatcher",
|
52
|
+
Other = "Other"
|
53
|
+
}
|
54
|
+
export declare enum OtherRoleType {
|
55
|
+
Patient = "Patient",
|
56
|
+
User = "User",
|
57
|
+
System = "System"
|
58
|
+
}
|
59
|
+
export declare type AllRoleType = OtherRoleType | PractitionnerRoleType;
|
60
|
+
export declare enum LicenseStatus {
|
61
|
+
Valid = "Valid",
|
62
|
+
Invalid = "Invalid",
|
63
|
+
Expired = "Expired",
|
64
|
+
NA = "NA",
|
65
|
+
Removed = "Removed"
|
66
|
+
}
|
67
|
+
export declare enum PeriodType {
|
68
|
+
PerYear = "PerYear",
|
69
|
+
PerQuarter = "PerQuarter",
|
70
|
+
PerMonth = "PerMonth",
|
71
|
+
PerWeek = "PerWeek",
|
72
|
+
PerBusinessDay = "PerBusinessDay",
|
73
|
+
PerDay = "PerDay",
|
74
|
+
PerHour = "PerHour"
|
75
|
+
}
|
76
|
+
export declare enum SyncStatus {
|
77
|
+
Requested = "Requested",
|
78
|
+
Started = "Started",
|
79
|
+
Succeeded = "Succeeded",
|
80
|
+
Failed = "Failed",
|
81
|
+
Cancelled = "Cancelled"
|
82
|
+
}
|
83
|
+
export declare enum PracticeEmailKind {
|
84
|
+
SignedUp = "SignedUp",
|
85
|
+
Onboarded = "Onboarded",
|
86
|
+
OnboardedPractitioner = "OnboardedPractitioner",
|
87
|
+
OnboardedPatient = "OnboardedPatient",
|
88
|
+
Answered = "Answered",
|
89
|
+
ToAnswer = "ToAnswer",
|
90
|
+
FollowedUp = "FollowedUp",
|
91
|
+
Renewed = "Renewed",
|
92
|
+
DataRetrieved = "DataRetrieved"
|
93
|
+
}
|
94
|
+
export interface PracticeAccount {
|
95
|
+
id?: number;
|
96
|
+
uuidPractice: string;
|
97
|
+
isoLocality?: string;
|
98
|
+
idStripeAccount?: string;
|
99
|
+
emailBillingContact: string;
|
100
|
+
urlSubdomain?: string;
|
101
|
+
}
|
102
|
+
export declare enum PracticeConfigKind {
|
103
|
+
PractitionerConsultList = "PractitionerConsultList",
|
104
|
+
PractitionerChatbox = "PractitionerChatbox",
|
105
|
+
PracticeTheme = "PracticeTheme",
|
106
|
+
PracticeLocaleSwitcher = "PracticeLocaleSwitcher",
|
107
|
+
PracticeCookieBanner = "PracticeCookieBanner"
|
108
|
+
}
|
109
|
+
export interface PracticeConfig<K, T> {
|
110
|
+
uuidPractice: string;
|
111
|
+
kind: K;
|
112
|
+
config: T;
|
113
|
+
}
|
114
|
+
export declare type PracticeConfigPractitionerConsultList = PracticeConfig<PracticeConfigKind.PractitionerConsultList, {
|
115
|
+
hideLocality?: boolean;
|
116
|
+
hideFax?: boolean;
|
117
|
+
hideExpiresAt?: boolean;
|
118
|
+
}>;
|
119
|
+
export declare type PracticeConfigPracticeLocaleSwitcher = PracticeConfig<PracticeConfigKind.PracticeLocaleSwitcher, {
|
120
|
+
hideLocaleSwitcher?: boolean;
|
121
|
+
}>;
|
122
|
+
export declare type PracticeConfigPractitionerChatbox = PracticeConfig<PracticeConfigKind.PractitionerChatbox, {
|
123
|
+
planAddedMessage?: {
|
124
|
+
[languageISO639_3: string]: string;
|
125
|
+
};
|
126
|
+
planUpdatedMessage?: {
|
127
|
+
[languageISO639_3: string]: string;
|
128
|
+
};
|
129
|
+
}>;
|
130
|
+
export declare type PracticeConfigPracticeCookieBanner = PracticeConfig<PracticeConfigKind.PracticeCookieBanner, {
|
131
|
+
showCookieBanner?: boolean;
|
132
|
+
policyLink?: string;
|
133
|
+
useOfCookieLink?: string;
|
134
|
+
}>;
|
135
|
+
export declare type PracticeConfigPracticeTheme = PracticeConfig<PracticeConfigKind.PracticeTheme, {
|
136
|
+
primaryColor?: string;
|
137
|
+
}>;
|
138
|
+
export declare type PracticeConfigs = PracticeConfigPractitionerConsultList | PracticeConfigPractitionerChatbox | PracticeConfigPracticeLocaleSwitcher | PracticeConfigPracticeCookieBanner | PracticeConfigPracticeTheme;
|
139
|
+
export interface PracticeWorkflow {
|
140
|
+
id?: number;
|
141
|
+
uuidPractice: string;
|
142
|
+
uuidWorkflow: string;
|
143
|
+
typeWorkflow: WorkflowType;
|
144
|
+
tagSpecialty?: string;
|
145
|
+
}
|
146
|
+
export declare type PracticeWorkflowWithTagSpecialty = PracticeWorkflow & {
|
147
|
+
tagSpecialty: string;
|
148
|
+
};
|
149
|
+
export interface PracticePlan {
|
150
|
+
id?: number;
|
151
|
+
uuidPractice: string;
|
152
|
+
isoLocality?: string;
|
153
|
+
nameDefault: string;
|
154
|
+
descDefault: string;
|
155
|
+
hoursExpiration: number;
|
156
|
+
active: boolean;
|
157
|
+
namePriceCurrency: string;
|
158
|
+
numPriceAmount: number;
|
159
|
+
numPriceExtDecimal?: number;
|
160
|
+
numPriceExtNegativeExponential?: number;
|
161
|
+
kind: PlanType;
|
162
|
+
idStripeProduct: string;
|
163
|
+
idStripePrice: string;
|
164
|
+
dateCreatedAt: Date;
|
165
|
+
dateUpdateAt: Date;
|
166
|
+
ratePerThousandOverride: number;
|
167
|
+
}
|
168
|
+
export declare enum StripePriceType {
|
169
|
+
Default = "Default",
|
170
|
+
Discount = "Discount"
|
171
|
+
}
|
172
|
+
export interface PracticePrice {
|
173
|
+
/**
|
174
|
+
* Unique identifier for the object in Stripe.
|
175
|
+
*/
|
176
|
+
idStripePrice: string;
|
177
|
+
/**
|
178
|
+
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
179
|
+
*/
|
180
|
+
currency: string;
|
181
|
+
/**
|
182
|
+
* The unit amount in %s to be charged, represented as a whole integer if possible.
|
183
|
+
*/
|
184
|
+
unitAmount: number;
|
185
|
+
}
|
186
|
+
export interface PracticePlanPrices {
|
187
|
+
idPlan: number;
|
188
|
+
default: PracticePrice;
|
189
|
+
discount?: PracticePrice;
|
190
|
+
}
|
191
|
+
export interface PracticeRate {
|
192
|
+
id?: number;
|
193
|
+
uuidPractice: string;
|
194
|
+
idPlan: number;
|
195
|
+
isoLocality?: string;
|
196
|
+
dimension: RateDimension;
|
197
|
+
description: string;
|
198
|
+
uidTaxRate: string;
|
199
|
+
idStripeTaxRate: string;
|
200
|
+
}
|
201
|
+
export interface PracticePlatformFee {
|
202
|
+
uuidPractice: string;
|
203
|
+
idPlan: number;
|
204
|
+
isoLocality?: string;
|
205
|
+
numPlatformFinalFee: number;
|
206
|
+
}
|
207
|
+
export interface PracticePayment {
|
208
|
+
id?: number;
|
209
|
+
uuidPractice: string;
|
210
|
+
idPlan: number;
|
211
|
+
uuidConsult: string;
|
212
|
+
hoursConsultExpiration: number;
|
213
|
+
idStripeInvoiceOrPaymentIntent: string;
|
214
|
+
status: PaymentStatus;
|
215
|
+
dateCreatedAt: Date;
|
216
|
+
dateUpdateAt: Date;
|
217
|
+
}
|
218
|
+
export interface PracticePaymentIntent {
|
219
|
+
id?: number;
|
220
|
+
uuidPractice: string;
|
221
|
+
idPlan: number;
|
222
|
+
idPayment: number;
|
223
|
+
hoursPlanExpiration: number;
|
224
|
+
isoLocality?: string;
|
225
|
+
textPaymentMethodOptions: string;
|
226
|
+
nameCurrency: string;
|
227
|
+
numTotalAmount: number;
|
228
|
+
numPlatformFeeAmount: number;
|
229
|
+
idStripeInvoice: string;
|
230
|
+
idStripePaymtIntent: string;
|
231
|
+
stripeClientSecret: string;
|
232
|
+
dateCreatedAt?: Date;
|
233
|
+
dateUpdateAt?: Date;
|
234
|
+
}
|
235
|
+
export interface Assignment {
|
236
|
+
id?: number;
|
237
|
+
uuidPractice: string;
|
238
|
+
uuidAssignor: string;
|
239
|
+
uuidPractitioner?: string;
|
240
|
+
status?: AssignmentStatus;
|
241
|
+
uuidConsult?: string;
|
242
|
+
tagSpecialty?: string;
|
243
|
+
timeAssigned?: string;
|
244
|
+
}
|
245
|
+
export interface PractitionerRole {
|
246
|
+
id?: number;
|
247
|
+
uuidPractice: string;
|
248
|
+
uuidPractitioner: string;
|
249
|
+
role: PractitionnerRoleType;
|
250
|
+
dateGiven?: Date;
|
251
|
+
}
|
252
|
+
export interface PractitionerLicense {
|
253
|
+
id?: number;
|
254
|
+
uuidPractitioner: string;
|
255
|
+
country: string;
|
256
|
+
tagSpecialty: string;
|
257
|
+
isoLocality: string;
|
258
|
+
txtLicenseNumber: string;
|
259
|
+
txtComplementary?: string;
|
260
|
+
dateProvidedAt?: Date;
|
261
|
+
dateObtainedAt?: Date;
|
262
|
+
dateRenewedAt?: Date;
|
263
|
+
status?: LicenseStatus;
|
264
|
+
}
|
265
|
+
export interface PractitionerPreference {
|
266
|
+
id?: number;
|
267
|
+
uuidPractitioner: string;
|
268
|
+
uuidPractice: string;
|
269
|
+
tagSpecialties: string;
|
270
|
+
isoLocalityConsult?: string;
|
271
|
+
periodQuotaConsult?: PeriodType;
|
272
|
+
quantityQuotaConsult?: number;
|
273
|
+
tagConsultLanguages?: string;
|
274
|
+
}
|
275
|
+
export interface PractitionerQuota {
|
276
|
+
id?: number;
|
277
|
+
uuidPractitioner: string;
|
278
|
+
uuidPractice: string;
|
279
|
+
tagSpecialty: string;
|
280
|
+
isoLocality: string;
|
281
|
+
quantityLeft?: number;
|
282
|
+
dateRenewal?: Date;
|
283
|
+
dateLastUpdate?: Date;
|
284
|
+
}
|
285
|
+
export interface Practitioner {
|
286
|
+
uuid: string;
|
287
|
+
uuidPractice: string;
|
288
|
+
txtFirstName: string;
|
289
|
+
txtLastName: string;
|
290
|
+
txtTitle: string;
|
291
|
+
emailAddress: string;
|
292
|
+
tagsSpecialties: string;
|
293
|
+
arrLanguages: string;
|
294
|
+
dateAddedAt?: Date;
|
295
|
+
status?: PractitionerStatus;
|
296
|
+
txtAddressTransmission?: string;
|
297
|
+
}
|
298
|
+
export interface HydratedPracticeConfigs {
|
299
|
+
[PracticeConfigKind.PractitionerConsultList]?: PracticeConfigPractitionerConsultList;
|
300
|
+
[PracticeConfigKind.PractitionerChatbox]?: PracticeConfigPractitionerChatbox;
|
301
|
+
[PracticeConfigKind.PracticeTheme]?: PracticeConfigPracticeTheme;
|
302
|
+
[PracticeConfigKind.PracticeLocaleSwitcher]?: PracticeConfigPracticeLocaleSwitcher;
|
303
|
+
[PracticeConfigKind.PracticeCookieBanner]?: PracticeConfigPracticeCookieBanner;
|
304
|
+
}
|
305
|
+
export interface Practice {
|
306
|
+
uuid: string;
|
307
|
+
name: string;
|
308
|
+
countryOperating: string;
|
309
|
+
urlPractice: string;
|
310
|
+
urlLinkedPage?: string;
|
311
|
+
urlTos?: string;
|
312
|
+
urlConfidentiality?: string;
|
313
|
+
uuidAdmin: string;
|
314
|
+
uuidDefaultAssigned: string;
|
315
|
+
uuidDefaultFallback: string;
|
316
|
+
prefDefaultLang: string;
|
317
|
+
keyGoogleTagNonProd: string;
|
318
|
+
keyGoogleTagProd: string;
|
319
|
+
txtAddress?: string;
|
320
|
+
phoneBusiness?: string;
|
321
|
+
urlSupport?: string;
|
322
|
+
emailSupport?: string;
|
323
|
+
phoneSupport?: string;
|
324
|
+
phoneFax?: string;
|
325
|
+
txtTaxID?: string;
|
326
|
+
txtVATID?: string;
|
327
|
+
txtRegistrationID?: string;
|
328
|
+
txtLegalInfos?: string;
|
329
|
+
txtDefaultTransmissionDriver?: string;
|
330
|
+
accounts?: PracticeAccount[];
|
331
|
+
configs?: HydratedPracticeConfigs;
|
332
|
+
}
|
333
|
+
export interface Sync {
|
334
|
+
id?: number;
|
335
|
+
status?: SyncStatus;
|
336
|
+
descriptionStep: string;
|
337
|
+
dateStarted?: Date;
|
338
|
+
dateFinished?: Date;
|
339
|
+
}
|
340
|
+
export interface PracticeEmail {
|
341
|
+
id?: number;
|
342
|
+
uuidPractice: string;
|
343
|
+
kind: PracticeEmailKind;
|
344
|
+
idMailgunTemplate: string;
|
345
|
+
isoLanguage: string;
|
346
|
+
tags: string;
|
347
|
+
}
|
348
|
+
export interface PracticeSubscription {
|
349
|
+
id?: number;
|
350
|
+
uuidPractice: string;
|
351
|
+
idMailChimpAudience: string;
|
352
|
+
isoLanguage: string;
|
353
|
+
}
|
@@ -0,0 +1,124 @@
|
|
1
|
+
import { Uuid, Base64String, Metadata } from './shared';
|
2
|
+
import { MetadataCategory } from './workflow';
|
3
|
+
export interface LockboxCreateResponse {
|
4
|
+
lockboxUuid: Uuid;
|
5
|
+
}
|
6
|
+
export interface SharedSecretResponse {
|
7
|
+
sharedSecret: Base64String;
|
8
|
+
}
|
9
|
+
export interface LockboxGrantRequest {
|
10
|
+
granteeUuid: Uuid;
|
11
|
+
encryptedSecret: Base64String;
|
12
|
+
}
|
13
|
+
export interface LockboxDataRequest {
|
14
|
+
publicMetadata?: Metadata;
|
15
|
+
privateMetadata?: Base64String;
|
16
|
+
data: Base64String;
|
17
|
+
}
|
18
|
+
export declare type LockboxManifest = ManifestEntry[];
|
19
|
+
export interface ManifestEntry {
|
20
|
+
dataUuid: Uuid;
|
21
|
+
metadata: Metadata;
|
22
|
+
}
|
23
|
+
export interface GrantedLockboxes {
|
24
|
+
grants: Grant[];
|
25
|
+
}
|
26
|
+
export interface Grant {
|
27
|
+
lockboxOwnerUuid?: Uuid;
|
28
|
+
encryptedLockbox?: Base64String;
|
29
|
+
lockboxUuid?: Uuid;
|
30
|
+
}
|
31
|
+
export interface DataCreateResponse {
|
32
|
+
dataUuid: Uuid;
|
33
|
+
}
|
34
|
+
export interface DataResponse {
|
35
|
+
data: Base64String;
|
36
|
+
}
|
37
|
+
export interface IndexEntry {
|
38
|
+
uuid?: Uuid;
|
39
|
+
uniqueHash?: Base64String;
|
40
|
+
timestamp?: Date;
|
41
|
+
}
|
42
|
+
export interface IndexConsultLockbox extends IndexEntry {
|
43
|
+
consultationId: Uuid;
|
44
|
+
grant: Grant;
|
45
|
+
}
|
46
|
+
export interface VaultIndex extends IndexEntry {
|
47
|
+
[IndexKey.ConsultationLockbox]?: IndexConsultLockbox[];
|
48
|
+
[IndexKey.Consultation]?: IndexConsultLockbox[];
|
49
|
+
}
|
50
|
+
export interface EncryptedVaultIndex {
|
51
|
+
[IndexKey.Consultation]?: EncryptedIndexEntry[];
|
52
|
+
[IndexKey.ConsultationLockbox]?: EncryptedIndexEntry[];
|
53
|
+
[IndexKey.IndexSnapshot]?: EncryptedIndexEntry[];
|
54
|
+
}
|
55
|
+
export interface EncryptedIndexEntry extends IndexEntry {
|
56
|
+
encryptedIndexEntry: Base64String;
|
57
|
+
}
|
58
|
+
export declare enum IndexKey {
|
59
|
+
Consultation = "Consultation",
|
60
|
+
IndexSnapshot = "IndexSnapshot",
|
61
|
+
ConsultationLockbox = "ConsultationLockbox"
|
62
|
+
}
|
63
|
+
export interface Document extends ManifestEntry {
|
64
|
+
lockboxOwnerUuid?: Uuid;
|
65
|
+
lockboxUuid: Uuid;
|
66
|
+
}
|
67
|
+
export interface Meta {
|
68
|
+
documentType?: DocumentType;
|
69
|
+
category: MetadataCategory;
|
70
|
+
contentType?: string;
|
71
|
+
}
|
72
|
+
export interface PreferenceMeta extends Meta {
|
73
|
+
category: MetadataCategory.Preference;
|
74
|
+
contentType: 'application/json';
|
75
|
+
}
|
76
|
+
export interface RecoveryMeta extends Meta {
|
77
|
+
category: MetadataCategory.Recovery;
|
78
|
+
contentType: 'application/json';
|
79
|
+
}
|
80
|
+
export interface RawConsultationMeta extends Meta {
|
81
|
+
category: MetadataCategory.Raw;
|
82
|
+
contentType: 'application/json';
|
83
|
+
consultationId?: Uuid;
|
84
|
+
}
|
85
|
+
export interface ConsultationMeta extends Meta {
|
86
|
+
documentType: DocumentType;
|
87
|
+
category: MetadataCategory.Consultation;
|
88
|
+
consultationId?: Uuid;
|
89
|
+
}
|
90
|
+
export interface ConsultationImageMeta extends ConsultationMeta {
|
91
|
+
idbId: Uuid;
|
92
|
+
}
|
93
|
+
export interface MedicalMeta extends Meta {
|
94
|
+
documentType: DocumentType.PopulatedWorkflowData | DocumentType.Result | DocumentType.Prescription | DocumentType.DoctorsNote;
|
95
|
+
category: MetadataCategory.Medical;
|
96
|
+
consultationIds?: Uuid[];
|
97
|
+
}
|
98
|
+
export interface PersonalMeta {
|
99
|
+
documentType: DocumentType.PopulatedWorkflowData | DocumentType.Note;
|
100
|
+
category: MetadataCategory.Personal | MetadataCategory.ChildPersonal | MetadataCategory.OtherPersonal;
|
101
|
+
consultationIds?: Uuid[];
|
102
|
+
}
|
103
|
+
export declare enum DocumentType {
|
104
|
+
Message = "Message",
|
105
|
+
Note = "Note",
|
106
|
+
DoctorsNote = "DoctorsNote",
|
107
|
+
Prescription = "Prescription",
|
108
|
+
ExamRequest = "ExamRequest",
|
109
|
+
Result = "Result",
|
110
|
+
Attachment = "Attachment",
|
111
|
+
BigFile = "BigFile",
|
112
|
+
MeetingRequest = "MeetingRequest",
|
113
|
+
AudioNote = "AudioNote",
|
114
|
+
VideoNote = "VideoNote",
|
115
|
+
PopulatedWorkflowData = "PopulatedWorkflowData",
|
116
|
+
TreatmentPlan = "TreatmentPlan",
|
117
|
+
ImageAlias = "ImageAlias"
|
118
|
+
}
|
119
|
+
export interface LocalizedData<T = any> {
|
120
|
+
lockboxOwnerUuid?: string;
|
121
|
+
lockboxUuid: string;
|
122
|
+
dataUuid: string;
|
123
|
+
data: T;
|
124
|
+
}
|
@@ -0,0 +1,106 @@
|
|
1
|
+
export interface IndexedData<T> {
|
2
|
+
[key: string]: T;
|
3
|
+
}
|
4
|
+
export declare type SelectedAnswerData = string | string[];
|
5
|
+
export declare type SelectedAnswersData = IndexedData<SelectedAnswerData>[];
|
6
|
+
export interface ChoiceInputData {
|
7
|
+
text: string;
|
8
|
+
className?: string;
|
9
|
+
order?: number;
|
10
|
+
}
|
11
|
+
export interface RadioInputIconOptionsData {
|
12
|
+
variant: 'icon';
|
13
|
+
icon: string;
|
14
|
+
}
|
15
|
+
export interface RadioInputData extends ChoiceInputData {
|
16
|
+
options?: RadioInputIconOptionsData;
|
17
|
+
}
|
18
|
+
export interface RadioCardInputData extends RadioInputData {
|
19
|
+
bodyText: string;
|
20
|
+
}
|
21
|
+
export interface EntryData {
|
22
|
+
id?: number;
|
23
|
+
label?: string;
|
24
|
+
summaryLabel?: string;
|
25
|
+
summaryHidden?: boolean;
|
26
|
+
className?: string;
|
27
|
+
triggers?: string[];
|
28
|
+
}
|
29
|
+
export declare enum MetadataCategory {
|
30
|
+
ChildPersonal = "ChildPersonal",
|
31
|
+
Consultation = "Consultation",
|
32
|
+
DataRetrieval = "DataRetrieval",
|
33
|
+
Followup = "Followup",
|
34
|
+
Recovery = "Recovery",
|
35
|
+
Medical = "Medical",
|
36
|
+
OtherPersonal = "OtherPersonal",
|
37
|
+
Personal = "Personal",
|
38
|
+
Preference = "Preference",
|
39
|
+
Prescription = "Prescription",
|
40
|
+
Raw = "Raw"
|
41
|
+
}
|
42
|
+
export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>> extends EntryData {
|
43
|
+
kind: T;
|
44
|
+
metaCategory: MetadataCategory;
|
45
|
+
answers?: A;
|
46
|
+
formValidation?: any[];
|
47
|
+
placeholder?: string;
|
48
|
+
defaultValue?: any;
|
49
|
+
value?: string;
|
50
|
+
}
|
51
|
+
export interface GroupedGenericQuestionData<T, A = IndexedData<ChoiceInputData>> extends GenericQuestionData<T, A> {
|
52
|
+
inline?: boolean;
|
53
|
+
inlineLabel?: boolean;
|
54
|
+
order?: number;
|
55
|
+
}
|
56
|
+
export declare type QuestionData = GenericQuestionData<'title' | 'paragraph' | 'checkbox', void> | GenericQuestionData<'text' | 'date' | 'number' | 'images' | 'images-alias' | 'body-parts' | 'pharmacy-picker' | 'place-address'> | GenericQuestionData<'checkbox-group' | 'select' | 'multiple', IndexedData<ChoiceInputData>> | GroupedGenericQuestionData<'radio', IndexedData<RadioInputData>> | GroupedGenericQuestionData<'radio-card', IndexedData<RadioCardInputData>>;
|
57
|
+
export interface FieldData {
|
58
|
+
type: 'field';
|
59
|
+
className?: string;
|
60
|
+
id: string;
|
61
|
+
}
|
62
|
+
export interface FieldGroupData {
|
63
|
+
type: 'field-group';
|
64
|
+
className?: string;
|
65
|
+
fieldsAndGroups: (FieldData | FieldGroupData)[];
|
66
|
+
name?: string;
|
67
|
+
inline?: boolean;
|
68
|
+
fullWidth?: boolean;
|
69
|
+
}
|
70
|
+
export interface WorkflowPageData {
|
71
|
+
className?: string;
|
72
|
+
groups?: FieldGroupData[];
|
73
|
+
highlightMsg?: string;
|
74
|
+
questions: IndexedData<QuestionData>;
|
75
|
+
title?: string;
|
76
|
+
triggers?: string[];
|
77
|
+
}
|
78
|
+
export interface WorkflowData {
|
79
|
+
createdAt: string;
|
80
|
+
culDeSacs: EntryData[];
|
81
|
+
id: string;
|
82
|
+
locale?: string;
|
83
|
+
pages: WorkflowPageData[];
|
84
|
+
summaryImageFieldName?: string;
|
85
|
+
summarySymptomsFieldName?: string;
|
86
|
+
selectedAnswers?: SelectedAnswersData;
|
87
|
+
}
|
88
|
+
/**
|
89
|
+
* This interface describes a workflow prepared and ready to be sent to vault
|
90
|
+
*/
|
91
|
+
export interface WorkflowUploadedImage {
|
92
|
+
idbId?: string;
|
93
|
+
name: string;
|
94
|
+
imageData?: string;
|
95
|
+
}
|
96
|
+
export interface PopulatedWorkflowField {
|
97
|
+
answer: SelectedAnswerData | WorkflowUploadedImage[];
|
98
|
+
displayedAnswer?: any;
|
99
|
+
kind: string;
|
100
|
+
}
|
101
|
+
export interface PopulatedWorkflowData {
|
102
|
+
workflowId: string;
|
103
|
+
workflowCreatedAt: string;
|
104
|
+
locale?: string;
|
105
|
+
fields: Record<string, PopulatedWorkflowField>;
|
106
|
+
}
|