oro-sdk-apis 1.28.0 → 1.29.0
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/dist/models/practice.d.ts +135 -32
- package/dist/oro-sdk-apis.cjs.development.js +406 -820
- package/dist/oro-sdk-apis.cjs.development.js.map +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk-apis.esm.js +418 -820
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/models/practice.ts +165 -55
package/package.json
CHANGED
package/src/models/practice.ts
CHANGED
|
@@ -122,85 +122,194 @@ export interface PracticeAccount {
|
|
|
122
122
|
urlSubdomain?: string
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Defines all the practice config kind.
|
|
127
|
+
*
|
|
128
|
+
* Please respect the following when defining a new practice config:
|
|
129
|
+
* - be really specific on its role
|
|
130
|
+
* - all configs needs to have default values in app
|
|
131
|
+
* - the default behavior should always to be display the feature.
|
|
132
|
+
* In other words, practice configs should either be used to hide a functionnality or overwrite a default behavior.
|
|
133
|
+
* To be extra explicit, if you want to show a functionnality only in one practice, you will have to add a practice configs in all other practice to hide it (yes it is cumbersome).
|
|
134
|
+
*
|
|
135
|
+
*/
|
|
125
136
|
export enum PracticeConfigKind {
|
|
126
|
-
|
|
127
|
-
PractitionerChatbox = 'PractitionerChatbox',
|
|
137
|
+
PracticeCloseConsultationTypes = 'PracticeCloseConsultationTypes',
|
|
128
138
|
PracticeConfigExample = 'PracticeConfigExample',
|
|
129
|
-
PracticeLocaleSwitcher = 'PracticeLocaleSwitcher',
|
|
130
139
|
PracticeCookieBanner = 'PracticeCookieBanner',
|
|
131
|
-
PracticePharmacyPicker = 'PracticePharmacyPicker',
|
|
132
140
|
PracticeCssVariables = 'PracticeCssVariables',
|
|
133
141
|
PracticeFontsLinks = 'PracticeFontsLinks',
|
|
142
|
+
PracticeLocaleSwitcher = 'PracticeLocaleSwitcher',
|
|
143
|
+
PracticePharmacyPicker = 'PracticePharmacyPicker',
|
|
144
|
+
PractitionerChatbox = 'PractitionerChatbox',
|
|
145
|
+
PractitionerConsultList = 'PractitionerConsultList',
|
|
134
146
|
}
|
|
135
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Defines the close consultation types to hide in the close consultation modal of a practice
|
|
150
|
+
*/
|
|
151
|
+
export type PracticeConfigPracticeCloseConsultationTypes = PracticeConfig<
|
|
152
|
+
PracticeConfigKind.PracticeCloseConsultationTypes,
|
|
153
|
+
{
|
|
154
|
+
/**
|
|
155
|
+
* Should hide item with value "Completed"
|
|
156
|
+
*/
|
|
157
|
+
hideCompleted?: boolean
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Should hide item with value "Requires-in-person"
|
|
161
|
+
*/
|
|
162
|
+
hideRequiresInPerson?: boolean
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Should hide item with value "Other"
|
|
166
|
+
*/
|
|
167
|
+
hideOther?: boolean
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Should hide item with value "Not-a-disease"
|
|
171
|
+
*/
|
|
172
|
+
hideNotADisease?: boolean
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Should hide item with value "Appropriate-for-virtual"
|
|
176
|
+
*/
|
|
177
|
+
hideNotAppropriateForVirtual?: boolean
|
|
178
|
+
}
|
|
179
|
+
>
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Generic interface of a practice config
|
|
183
|
+
*
|
|
184
|
+
* Practice configs needs to have a JSDoc for **all** interface and fields.
|
|
185
|
+
*
|
|
186
|
+
*/
|
|
136
187
|
export interface PracticeConfig<K, T> {
|
|
188
|
+
/**
|
|
189
|
+
* The uuid of the practice to apply the config
|
|
190
|
+
*/
|
|
137
191
|
uuidPractice: string
|
|
138
|
-
|
|
192
|
+
/**
|
|
193
|
+
* The kind of the practice config. Used as a discriminator to help auto-completion.
|
|
194
|
+
*/
|
|
195
|
+
kind: PracticeConfigKind
|
|
196
|
+
/**
|
|
197
|
+
* The actual interface of the config
|
|
198
|
+
*/
|
|
139
199
|
config: T
|
|
140
200
|
}
|
|
141
201
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
showExpirationInDays?: boolean
|
|
149
|
-
}
|
|
202
|
+
/**
|
|
203
|
+
* This type is for test (do not remove without updating the integration tests)
|
|
204
|
+
*/
|
|
205
|
+
export type PracticeConfigPracticeConfigExample = PracticeConfig<
|
|
206
|
+
PracticeConfigKind.PracticeConfigExample,
|
|
207
|
+
{ primaryColor?: string }
|
|
150
208
|
>
|
|
151
209
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
210
|
+
/**
|
|
211
|
+
* Defines the practice cookie banner
|
|
212
|
+
*/
|
|
213
|
+
export type PracticeConfigPracticeCookieBanner = PracticeConfig<
|
|
214
|
+
PracticeConfigKind.PracticeCookieBanner,
|
|
215
|
+
{
|
|
216
|
+
showCookieBanner?: boolean
|
|
217
|
+
policyLink?: string
|
|
218
|
+
useOfCookieLink?: string
|
|
219
|
+
}
|
|
157
220
|
>
|
|
158
221
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
222
|
+
/**
|
|
223
|
+
* This interface describes all practice css variables
|
|
224
|
+
* The keys should reflect the exact css name
|
|
225
|
+
*/
|
|
226
|
+
export type PracticeConfigPracticeCssVariables = PracticeConfig<
|
|
227
|
+
PracticeConfigKind.PracticeCssVariables,
|
|
228
|
+
Record<string, string>
|
|
166
229
|
>
|
|
167
230
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
231
|
+
/**
|
|
232
|
+
* Defines the font of the practice css url
|
|
233
|
+
*/
|
|
234
|
+
export type PracticeConfigPracticeFontsLinks = PracticeConfig<
|
|
235
|
+
PracticeConfigKind.PracticeFontsLinks,
|
|
236
|
+
{
|
|
237
|
+
/**
|
|
238
|
+
* sans serif font family
|
|
239
|
+
*/
|
|
240
|
+
sansSerif?: string
|
|
241
|
+
/**
|
|
242
|
+
* serif font family
|
|
243
|
+
*/
|
|
244
|
+
serif?: string
|
|
245
|
+
}
|
|
173
246
|
>
|
|
174
247
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
248
|
+
/**
|
|
249
|
+
* Defines the locale switcher config
|
|
250
|
+
*/
|
|
251
|
+
export type PracticeConfigPracticeLocaleSwitcher = PracticeConfig<
|
|
252
|
+
PracticeConfigKind.PracticeLocaleSwitcher,
|
|
253
|
+
{
|
|
254
|
+
/**
|
|
255
|
+
* Should hide the locale switcher
|
|
256
|
+
*/
|
|
257
|
+
hideLocaleSwitcher?: boolean
|
|
258
|
+
}
|
|
182
259
|
>
|
|
183
260
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
261
|
+
/**
|
|
262
|
+
* Defines the online pharmacy address of the practice
|
|
263
|
+
*/
|
|
264
|
+
export type PracticeConfigPracticeOnlinePharmacy = PracticeConfig<
|
|
265
|
+
PracticeConfigKind.PracticePharmacyPicker,
|
|
266
|
+
{
|
|
267
|
+
/**
|
|
268
|
+
* The address of the online pharmacy
|
|
269
|
+
*/
|
|
270
|
+
onlinePharmacy?: PlaceData
|
|
271
|
+
}
|
|
188
272
|
>
|
|
189
273
|
|
|
190
274
|
/**
|
|
191
|
-
*
|
|
192
|
-
* The keys should reflect the exact css name
|
|
275
|
+
* Defines the consultation chatbox configs
|
|
193
276
|
*/
|
|
194
|
-
export type
|
|
195
|
-
|
|
196
|
-
|
|
277
|
+
export type PracticeConfigPractitionerChatbox = PracticeConfig<
|
|
278
|
+
PracticeConfigKind.PractitionerChatbox,
|
|
279
|
+
{
|
|
280
|
+
/**
|
|
281
|
+
* If defined will replace the automatic chatbox comment notifiying the patient a new treatment plan has been added. Indexed by locale.
|
|
282
|
+
*/
|
|
283
|
+
planAddedMessage?: { [languageISO639_3: string]: string }
|
|
284
|
+
/**
|
|
285
|
+
* If defined will replace the automatic chatbox comment notifiying the patient a new treatment plan has been updated. Indexed by locale.
|
|
286
|
+
*/
|
|
287
|
+
planUpdatedMessage?: { [languageISO639_3: string]: string }
|
|
288
|
+
/**
|
|
289
|
+
* If defined will replace the automatic chatbox comment notifiying the patient a new exam has been dispatched. Indexed by locale.
|
|
290
|
+
*/
|
|
291
|
+
examsUpdatedMessage?: { [languageISO639_3: string]: string }
|
|
292
|
+
}
|
|
197
293
|
>
|
|
198
294
|
|
|
199
|
-
|
|
200
|
-
|
|
295
|
+
/**
|
|
296
|
+
* This config is used to configure the layout of the consult list for practitioners
|
|
297
|
+
*/
|
|
298
|
+
export type PracticeConfigPractitionerConsultList = PracticeConfig<
|
|
299
|
+
PracticeConfigKind.PractitionerConsultList,
|
|
201
300
|
{
|
|
202
|
-
|
|
203
|
-
|
|
301
|
+
/**
|
|
302
|
+
* Should hide the locality column
|
|
303
|
+
*/
|
|
304
|
+
hideLocality?: boolean
|
|
305
|
+
/**
|
|
306
|
+
* Should hide the fax column
|
|
307
|
+
*/
|
|
308
|
+
hideFax?: boolean
|
|
309
|
+
/**
|
|
310
|
+
* Should hide the expires at column
|
|
311
|
+
*/
|
|
312
|
+
hideExpiresAt?: boolean
|
|
204
313
|
}
|
|
205
314
|
>
|
|
206
315
|
|
|
@@ -212,7 +321,7 @@ export type PracticeConfigs =
|
|
|
212
321
|
| PracticeConfigPracticeOnlinePharmacy
|
|
213
322
|
| PracticeConfigPracticeCssVariables
|
|
214
323
|
| PracticeConfigPracticeFontsLinks
|
|
215
|
-
| PracticeConfigPracticeConfigExample // Here for
|
|
324
|
+
| PracticeConfigPracticeConfigExample // Here for integration tests only
|
|
216
325
|
|
|
217
326
|
export interface PracticeWorkflow {
|
|
218
327
|
id?: number ///optional for insertion
|
|
@@ -411,14 +520,15 @@ export interface Practitioner {
|
|
|
411
520
|
}
|
|
412
521
|
|
|
413
522
|
export interface HydratedPracticeConfigs {
|
|
414
|
-
[PracticeConfigKind.
|
|
415
|
-
[PracticeConfigKind.PractitionerChatbox]?: PracticeConfigPractitionerChatbox
|
|
523
|
+
[PracticeConfigKind.PracticeCloseConsultationTypes]?: PracticeConfigPracticeCloseConsultationTypes
|
|
416
524
|
[PracticeConfigKind.PracticeConfigExample]?: PracticeConfigPracticeConfigExample
|
|
417
|
-
[PracticeConfigKind.PracticeLocaleSwitcher]?: PracticeConfigPracticeLocaleSwitcher
|
|
418
525
|
[PracticeConfigKind.PracticeCookieBanner]?: PracticeConfigPracticeCookieBanner
|
|
419
|
-
[PracticeConfigKind.PracticePharmacyPicker]?: PracticeConfigPracticeOnlinePharmacy
|
|
420
526
|
[PracticeConfigKind.PracticeCssVariables]?: PracticeConfigPracticeCssVariables
|
|
421
527
|
[PracticeConfigKind.PracticeFontsLinks]?: PracticeConfigPracticeFontsLinks
|
|
528
|
+
[PracticeConfigKind.PracticeLocaleSwitcher]?: PracticeConfigPracticeLocaleSwitcher
|
|
529
|
+
[PracticeConfigKind.PracticePharmacyPicker]?: PracticeConfigPracticeOnlinePharmacy
|
|
530
|
+
[PracticeConfigKind.PractitionerChatbox]?: PracticeConfigPractitionerChatbox
|
|
531
|
+
[PracticeConfigKind.PractitionerConsultList]?: PracticeConfigPractitionerConsultList
|
|
422
532
|
}
|
|
423
533
|
|
|
424
534
|
export interface Practice {
|