@medplum/react 2.0.21 → 2.0.23
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/cjs/index.cjs +173 -128
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.min.cjs +1 -1
- package/dist/esm/AttachmentButton/AttachmentButton.mjs +1 -2
- package/dist/esm/AttachmentButton/AttachmentButton.mjs.map +1 -1
- package/dist/esm/DateTimeInput/DateTimeInput.mjs +1 -0
- package/dist/esm/DateTimeInput/DateTimeInput.mjs.map +1 -1
- package/dist/esm/FhirPathTable/FhirPathTable.mjs +2 -0
- package/dist/esm/FhirPathTable/FhirPathTable.mjs.map +1 -1
- package/dist/esm/Form/FormUtils.mjs +2 -1
- package/dist/esm/Form/FormUtils.mjs.map +1 -1
- package/dist/esm/GoogleButton/GoogleButton.mjs +2 -2
- package/dist/esm/GoogleButton/GoogleButton.mjs.map +1 -1
- package/dist/esm/MedplumProvider/MedplumProvider.mjs +4 -0
- package/dist/esm/MedplumProvider/MedplumProvider.mjs.map +1 -1
- package/dist/esm/PlanDefinitionBuilder/PlanDefinitionBuilder.mjs +2 -1
- package/dist/esm/PlanDefinitionBuilder/PlanDefinitionBuilder.mjs.map +1 -1
- package/dist/esm/QuestionnaireBuilder/QuestionnaireBuilder.mjs +3 -2
- package/dist/esm/QuestionnaireBuilder/QuestionnaireBuilder.mjs.map +1 -1
- package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.mjs +13 -5
- package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.mjs.map +1 -1
- package/dist/esm/ResourceName/ResourceName.mjs +0 -5
- package/dist/esm/ResourceName/ResourceName.mjs.map +1 -1
- package/dist/esm/ResourcePropertyDisplay/ResourcePropertyDisplay.mjs +6 -3
- package/dist/esm/ResourcePropertyDisplay/ResourcePropertyDisplay.mjs.map +1 -1
- package/dist/esm/SearchControl/SearchControl.mjs +2 -1
- package/dist/esm/SearchControl/SearchControl.mjs.map +1 -1
- package/dist/esm/SearchControl/SearchUtils.mjs +77 -54
- package/dist/esm/SearchControl/SearchUtils.mjs.map +1 -1
- package/dist/esm/SearchFieldEditor/SearchFieldEditor.mjs +6 -7
- package/dist/esm/SearchFieldEditor/SearchFieldEditor.mjs.map +1 -1
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs +3 -0
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs.map +1 -1
- package/dist/esm/auth/SignInForm.mjs +6 -2
- package/dist/esm/auth/SignInForm.mjs.map +1 -1
- package/dist/esm/index.min.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconLogout.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconLogout.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSwitchHorizontal.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSwitchHorizontal.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs.map +1 -1
- package/dist/esm/useResource/useResource.mjs +1 -0
- package/dist/esm/useResource/useResource.mjs.map +1 -1
- package/dist/esm/utils/script.mjs +1 -0
- package/dist/esm/utils/script.mjs.map +1 -1
- package/dist/types/FhirPathTable/FhirPathTable.d.ts +2 -0
- package/dist/types/Form/FormUtils.d.ts +1 -0
- package/dist/types/MedplumProvider/MedplumProvider.d.ts +4 -0
- package/dist/types/ResourceName/ResourceName.d.ts +0 -5
- package/dist/types/ResourcePropertyDisplay/ResourcePropertyDisplay.d.ts +4 -2
- package/dist/types/SearchControl/SearchControl.d.ts +2 -0
- package/dist/types/SearchControl/SearchUtils.d.ts +64 -44
- package/dist/types/ValueSetAutocomplete/ValueSetAutocomplete.d.ts +3 -0
- package/dist/types/auth/SignInForm.d.ts +2 -0
- package/dist/types/useResource/useResource.d.ts +1 -0
- package/dist/types/utils/script.d.ts +1 -0
- package/package.json +12 -12
package/dist/cjs/index.cjs
CHANGED
|
@@ -71,6 +71,8 @@
|
|
|
71
71
|
* Medplum context includes:
|
|
72
72
|
* 1) medplum - Medplum client library
|
|
73
73
|
* 2) profile - The current user profile (if signed in)
|
|
74
|
+
* @param props The MedplumProvider React props.
|
|
75
|
+
* @returns The MedplumProvider React node.
|
|
74
76
|
*/
|
|
75
77
|
function MedplumProvider(props) {
|
|
76
78
|
const medplum = props.medplum;
|
|
@@ -105,6 +107,7 @@
|
|
|
105
107
|
}
|
|
106
108
|
/**
|
|
107
109
|
* Returns the MedplumContext instance.
|
|
110
|
+
* @returns The MedplumContext instance.
|
|
108
111
|
*/
|
|
109
112
|
function useMedplumContext() {
|
|
110
113
|
return React.useContext(reactContext);
|
|
@@ -112,6 +115,7 @@
|
|
|
112
115
|
/**
|
|
113
116
|
* Returns the MedplumClient instance.
|
|
114
117
|
* This is a shortcut for useMedplumContext().medplum.
|
|
118
|
+
* @returns The MedplumClient instance.
|
|
115
119
|
*/
|
|
116
120
|
function useMedplum() {
|
|
117
121
|
return useMedplumContext().medplum;
|
|
@@ -161,7 +165,7 @@
|
|
|
161
165
|
}
|
|
162
166
|
|
|
163
167
|
/**
|
|
164
|
-
* @tabler/icons-react v2.
|
|
168
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
165
169
|
*/
|
|
166
170
|
|
|
167
171
|
var defaultAttributes = {
|
|
@@ -177,7 +181,7 @@
|
|
|
177
181
|
};
|
|
178
182
|
|
|
179
183
|
/**
|
|
180
|
-
* @tabler/icons-react v2.
|
|
184
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
181
185
|
*/
|
|
182
186
|
|
|
183
187
|
|
|
@@ -241,7 +245,7 @@
|
|
|
241
245
|
};
|
|
242
246
|
|
|
243
247
|
/**
|
|
244
|
-
* @tabler/icons-react v2.
|
|
248
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
245
249
|
*/
|
|
246
250
|
|
|
247
251
|
|
|
@@ -262,7 +266,7 @@
|
|
|
262
266
|
);
|
|
263
267
|
|
|
264
268
|
/**
|
|
265
|
-
* @tabler/icons-react v2.
|
|
269
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
266
270
|
*/
|
|
267
271
|
|
|
268
272
|
|
|
@@ -273,7 +277,7 @@
|
|
|
273
277
|
]);
|
|
274
278
|
|
|
275
279
|
/**
|
|
276
|
-
* @tabler/icons-react v2.
|
|
280
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
277
281
|
*/
|
|
278
282
|
|
|
279
283
|
|
|
@@ -289,7 +293,7 @@
|
|
|
289
293
|
]);
|
|
290
294
|
|
|
291
295
|
/**
|
|
292
|
-
* @tabler/icons-react v2.
|
|
296
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
293
297
|
*/
|
|
294
298
|
|
|
295
299
|
|
|
@@ -304,7 +308,7 @@
|
|
|
304
308
|
]);
|
|
305
309
|
|
|
306
310
|
/**
|
|
307
|
-
* @tabler/icons-react v2.
|
|
311
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
308
312
|
*/
|
|
309
313
|
|
|
310
314
|
|
|
@@ -326,7 +330,7 @@
|
|
|
326
330
|
]);
|
|
327
331
|
|
|
328
332
|
/**
|
|
329
|
-
* @tabler/icons-react v2.
|
|
333
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
330
334
|
*/
|
|
331
335
|
|
|
332
336
|
|
|
@@ -339,7 +343,7 @@
|
|
|
339
343
|
]);
|
|
340
344
|
|
|
341
345
|
/**
|
|
342
|
-
* @tabler/icons-react v2.
|
|
346
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
343
347
|
*/
|
|
344
348
|
|
|
345
349
|
|
|
@@ -362,7 +366,7 @@
|
|
|
362
366
|
]);
|
|
363
367
|
|
|
364
368
|
/**
|
|
365
|
-
* @tabler/icons-react v2.
|
|
369
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
366
370
|
*/
|
|
367
371
|
|
|
368
372
|
|
|
@@ -378,7 +382,7 @@
|
|
|
378
382
|
]);
|
|
379
383
|
|
|
380
384
|
/**
|
|
381
|
-
* @tabler/icons-react v2.
|
|
385
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
382
386
|
*/
|
|
383
387
|
|
|
384
388
|
|
|
@@ -398,7 +402,7 @@
|
|
|
398
402
|
]);
|
|
399
403
|
|
|
400
404
|
/**
|
|
401
|
-
* @tabler/icons-react v2.
|
|
405
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
402
406
|
*/
|
|
403
407
|
|
|
404
408
|
|
|
@@ -407,7 +411,7 @@
|
|
|
407
411
|
]);
|
|
408
412
|
|
|
409
413
|
/**
|
|
410
|
-
* @tabler/icons-react v2.
|
|
414
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
411
415
|
*/
|
|
412
416
|
|
|
413
417
|
|
|
@@ -423,7 +427,7 @@
|
|
|
423
427
|
]);
|
|
424
428
|
|
|
425
429
|
/**
|
|
426
|
-
* @tabler/icons-react v2.
|
|
430
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
427
431
|
*/
|
|
428
432
|
|
|
429
433
|
|
|
@@ -432,7 +436,7 @@
|
|
|
432
436
|
]);
|
|
433
437
|
|
|
434
438
|
/**
|
|
435
|
-
* @tabler/icons-react v2.
|
|
439
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
436
440
|
*/
|
|
437
441
|
|
|
438
442
|
|
|
@@ -442,7 +446,7 @@
|
|
|
442
446
|
]);
|
|
443
447
|
|
|
444
448
|
/**
|
|
445
|
-
* @tabler/icons-react v2.
|
|
449
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
446
450
|
*/
|
|
447
451
|
|
|
448
452
|
|
|
@@ -453,7 +457,7 @@
|
|
|
453
457
|
]);
|
|
454
458
|
|
|
455
459
|
/**
|
|
456
|
-
* @tabler/icons-react v2.
|
|
460
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
457
461
|
*/
|
|
458
462
|
|
|
459
463
|
|
|
@@ -470,7 +474,7 @@
|
|
|
470
474
|
]);
|
|
471
475
|
|
|
472
476
|
/**
|
|
473
|
-
* @tabler/icons-react v2.
|
|
477
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
474
478
|
*/
|
|
475
479
|
|
|
476
480
|
|
|
@@ -486,7 +490,7 @@
|
|
|
486
490
|
]);
|
|
487
491
|
|
|
488
492
|
/**
|
|
489
|
-
* @tabler/icons-react v2.
|
|
493
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
490
494
|
*/
|
|
491
495
|
|
|
492
496
|
|
|
@@ -502,7 +506,7 @@
|
|
|
502
506
|
]);
|
|
503
507
|
|
|
504
508
|
/**
|
|
505
|
-
* @tabler/icons-react v2.
|
|
509
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
506
510
|
*/
|
|
507
511
|
|
|
508
512
|
|
|
@@ -513,7 +517,7 @@
|
|
|
513
517
|
]);
|
|
514
518
|
|
|
515
519
|
/**
|
|
516
|
-
* @tabler/icons-react v2.
|
|
520
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
517
521
|
*/
|
|
518
522
|
|
|
519
523
|
|
|
@@ -536,7 +540,7 @@
|
|
|
536
540
|
]);
|
|
537
541
|
|
|
538
542
|
/**
|
|
539
|
-
* @tabler/icons-react v2.
|
|
543
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
540
544
|
*/
|
|
541
545
|
|
|
542
546
|
|
|
@@ -547,7 +551,7 @@
|
|
|
547
551
|
]);
|
|
548
552
|
|
|
549
553
|
/**
|
|
550
|
-
* @tabler/icons-react v2.
|
|
554
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
551
555
|
*/
|
|
552
556
|
|
|
553
557
|
|
|
@@ -557,7 +561,7 @@
|
|
|
557
561
|
]);
|
|
558
562
|
|
|
559
563
|
/**
|
|
560
|
-
* @tabler/icons-react v2.
|
|
564
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
561
565
|
*/
|
|
562
566
|
|
|
563
567
|
|
|
@@ -575,7 +579,7 @@
|
|
|
575
579
|
]);
|
|
576
580
|
|
|
577
581
|
/**
|
|
578
|
-
* @tabler/icons-react v2.
|
|
582
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
579
583
|
*/
|
|
580
584
|
|
|
581
585
|
|
|
@@ -593,7 +597,7 @@
|
|
|
593
597
|
]);
|
|
594
598
|
|
|
595
599
|
/**
|
|
596
|
-
* @tabler/icons-react v2.
|
|
600
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
597
601
|
*/
|
|
598
602
|
|
|
599
603
|
|
|
@@ -608,7 +612,7 @@
|
|
|
608
612
|
]);
|
|
609
613
|
|
|
610
614
|
/**
|
|
611
|
-
* @tabler/icons-react v2.
|
|
615
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
612
616
|
*/
|
|
613
617
|
|
|
614
618
|
|
|
@@ -634,7 +638,7 @@
|
|
|
634
638
|
]);
|
|
635
639
|
|
|
636
640
|
/**
|
|
637
|
-
* @tabler/icons-react v2.
|
|
641
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
638
642
|
*/
|
|
639
643
|
|
|
640
644
|
|
|
@@ -651,7 +655,7 @@
|
|
|
651
655
|
]);
|
|
652
656
|
|
|
653
657
|
/**
|
|
654
|
-
* @tabler/icons-react v2.
|
|
658
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
655
659
|
*/
|
|
656
660
|
|
|
657
661
|
|
|
@@ -660,7 +664,7 @@
|
|
|
660
664
|
]);
|
|
661
665
|
|
|
662
666
|
/**
|
|
663
|
-
* @tabler/icons-react v2.
|
|
667
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
664
668
|
*/
|
|
665
669
|
|
|
666
670
|
|
|
@@ -669,7 +673,7 @@
|
|
|
669
673
|
]);
|
|
670
674
|
|
|
671
675
|
/**
|
|
672
|
-
* @tabler/icons-react v2.
|
|
676
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
673
677
|
*/
|
|
674
678
|
|
|
675
679
|
|
|
@@ -686,7 +690,7 @@
|
|
|
686
690
|
]);
|
|
687
691
|
|
|
688
692
|
/**
|
|
689
|
-
* @tabler/icons-react v2.
|
|
693
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
690
694
|
*/
|
|
691
695
|
|
|
692
696
|
|
|
@@ -703,7 +707,7 @@
|
|
|
703
707
|
]);
|
|
704
708
|
|
|
705
709
|
/**
|
|
706
|
-
* @tabler/icons-react v2.
|
|
710
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
707
711
|
*/
|
|
708
712
|
|
|
709
713
|
|
|
@@ -721,7 +725,7 @@
|
|
|
721
725
|
]);
|
|
722
726
|
|
|
723
727
|
/**
|
|
724
|
-
* @tabler/icons-react v2.
|
|
728
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
725
729
|
*/
|
|
726
730
|
|
|
727
731
|
|
|
@@ -731,7 +735,7 @@
|
|
|
731
735
|
]);
|
|
732
736
|
|
|
733
737
|
/**
|
|
734
|
-
* @tabler/icons-react v2.
|
|
738
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
735
739
|
*/
|
|
736
740
|
|
|
737
741
|
|
|
@@ -741,7 +745,7 @@
|
|
|
741
745
|
]);
|
|
742
746
|
|
|
743
747
|
/**
|
|
744
|
-
* @tabler/icons-react v2.
|
|
748
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
745
749
|
*/
|
|
746
750
|
|
|
747
751
|
|
|
@@ -757,7 +761,7 @@
|
|
|
757
761
|
]);
|
|
758
762
|
|
|
759
763
|
/**
|
|
760
|
-
* @tabler/icons-react v2.
|
|
764
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
761
765
|
*/
|
|
762
766
|
|
|
763
767
|
|
|
@@ -770,7 +774,7 @@
|
|
|
770
774
|
]);
|
|
771
775
|
|
|
772
776
|
/**
|
|
773
|
-
* @tabler/icons-react v2.
|
|
777
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
774
778
|
*/
|
|
775
779
|
|
|
776
780
|
|
|
@@ -783,7 +787,7 @@
|
|
|
783
787
|
]);
|
|
784
788
|
|
|
785
789
|
/**
|
|
786
|
-
* @tabler/icons-react v2.
|
|
790
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
787
791
|
*/
|
|
788
792
|
|
|
789
793
|
|
|
@@ -798,7 +802,7 @@
|
|
|
798
802
|
]);
|
|
799
803
|
|
|
800
804
|
/**
|
|
801
|
-
* @tabler/icons-react v2.
|
|
805
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
802
806
|
*/
|
|
803
807
|
|
|
804
808
|
|
|
@@ -814,7 +818,7 @@
|
|
|
814
818
|
);
|
|
815
819
|
|
|
816
820
|
/**
|
|
817
|
-
* @tabler/icons-react v2.
|
|
821
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
818
822
|
*/
|
|
819
823
|
|
|
820
824
|
|
|
@@ -833,7 +837,7 @@
|
|
|
833
837
|
]);
|
|
834
838
|
|
|
835
839
|
/**
|
|
836
|
-
* @tabler/icons-react v2.
|
|
840
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
837
841
|
*/
|
|
838
842
|
|
|
839
843
|
|
|
@@ -849,7 +853,7 @@
|
|
|
849
853
|
]);
|
|
850
854
|
|
|
851
855
|
/**
|
|
852
|
-
* @tabler/icons-react v2.
|
|
856
|
+
* @tabler/icons-react v2.22.0 - MIT
|
|
853
857
|
*/
|
|
854
858
|
|
|
855
859
|
|
|
@@ -974,6 +978,7 @@
|
|
|
974
978
|
* React Hook to use a FHIR reference.
|
|
975
979
|
* Handles the complexity of resolving references and caching resources.
|
|
976
980
|
* @param value The resource or reference to resource.
|
|
981
|
+
* @param setOutcome Optional callback to set the OperationOutcome.
|
|
977
982
|
* @returns The resolved resource.
|
|
978
983
|
*/
|
|
979
984
|
function useResource(value, setOutcome) {
|
|
@@ -1452,6 +1457,7 @@
|
|
|
1452
1457
|
/**
|
|
1453
1458
|
* Parses an HTML form and returns the result as a JavaScript object.
|
|
1454
1459
|
* @param form The HTML form element.
|
|
1460
|
+
* @returns Form values in key value pairs.
|
|
1455
1461
|
*/
|
|
1456
1462
|
function parseForm(form) {
|
|
1457
1463
|
const result = {};
|
|
@@ -1472,8 +1478,8 @@
|
|
|
1472
1478
|
* Parses an HTML input element.
|
|
1473
1479
|
* Sets the name/value pair in the result,
|
|
1474
1480
|
* but only if the element is enabled and checked.
|
|
1475
|
-
* @param el The input element.
|
|
1476
1481
|
* @param result The result builder.
|
|
1482
|
+
* @param el The input element.
|
|
1477
1483
|
*/
|
|
1478
1484
|
function parseInputElement(result, el) {
|
|
1479
1485
|
if (el.disabled) {
|
|
@@ -1571,6 +1577,9 @@
|
|
|
1571
1577
|
}
|
|
1572
1578
|
/**
|
|
1573
1579
|
* A low-level component to autocomplete based on a FHIR Valueset.
|
|
1580
|
+
* This is the base component for CodeableConceptInput, CodingInput, and CodeInput.
|
|
1581
|
+
* @param props The ValueSetAutocomplete React props.
|
|
1582
|
+
* @returns The ValueSetAutocomplete React node.
|
|
1574
1583
|
*/
|
|
1575
1584
|
function ValueSetAutocomplete(props) {
|
|
1576
1585
|
const medplum = useMedplum();
|
|
@@ -1836,8 +1845,7 @@
|
|
|
1836
1845
|
}
|
|
1837
1846
|
/**
|
|
1838
1847
|
* Processes a single file.
|
|
1839
|
-
*
|
|
1840
|
-
* @param {File} file The file descriptor.
|
|
1848
|
+
* @param file The file descriptor.
|
|
1841
1849
|
*/
|
|
1842
1850
|
function processFile(file) {
|
|
1843
1851
|
if (!file) {
|
|
@@ -2062,7 +2070,9 @@
|
|
|
2062
2070
|
}
|
|
2063
2071
|
|
|
2064
2072
|
/**
|
|
2065
|
-
* Low-level component that renders a property from a given resource, given type information
|
|
2073
|
+
* Low-level component that renders a property from a given resource, given type information.
|
|
2074
|
+
* @param props The ResourcePropertyDisplay React props.
|
|
2075
|
+
* @returns The ResourcePropertyDisplay React node.
|
|
2066
2076
|
*/
|
|
2067
2077
|
function ResourcePropertyDisplay(props) {
|
|
2068
2078
|
const { property, propertyType, value } = props;
|
|
@@ -2076,11 +2086,12 @@
|
|
|
2076
2086
|
case core.PropertyType.boolean:
|
|
2077
2087
|
return React.createElement(React.Fragment, null, value === undefined ? '' : Boolean(value).toString());
|
|
2078
2088
|
case core.PropertyType.SystemString:
|
|
2089
|
+
case core.PropertyType.string:
|
|
2090
|
+
return React.createElement("div", { style: { whiteSpace: 'pre-wrap' } }, value);
|
|
2079
2091
|
case core.PropertyType.code:
|
|
2080
2092
|
case core.PropertyType.date:
|
|
2081
2093
|
case core.PropertyType.integer:
|
|
2082
2094
|
case core.PropertyType.positiveInt:
|
|
2083
|
-
case core.PropertyType.string:
|
|
2084
2095
|
case core.PropertyType.unsignedInt:
|
|
2085
2096
|
case core.PropertyType.uri:
|
|
2086
2097
|
case core.PropertyType.url:
|
|
@@ -2142,7 +2153,7 @@
|
|
|
2142
2153
|
* According to the spec, there can only be one property for a given element definition.
|
|
2143
2154
|
* This function returns the value and the type.
|
|
2144
2155
|
* @param context The base context (usually a FHIR resource).
|
|
2145
|
-
* @param
|
|
2156
|
+
* @param path The property path.
|
|
2146
2157
|
* @returns The value of the property and the property type.
|
|
2147
2158
|
*/
|
|
2148
2159
|
function getValueAndType(context, path) {
|
|
@@ -2467,6 +2478,7 @@
|
|
|
2467
2478
|
* Returns the input type for the requested type.
|
|
2468
2479
|
* JSDOM does not support many of the valid <input> type attributes.
|
|
2469
2480
|
* For example, it won't fire change events for <input type="datetime-local">.
|
|
2481
|
+
* @returns The input type for the current environment.
|
|
2470
2482
|
*/
|
|
2471
2483
|
function getInputType() {
|
|
2472
2484
|
return 'datetime-local';
|
|
@@ -3229,11 +3241,6 @@
|
|
|
3229
3241
|
return (React.createElement(core$1.Stack, { justify: "flex-start", spacing: "xs" }, value.map((note, index) => note.text && (React.createElement(core$1.Blockquote, { key: `note-${index}`, classNames: { cite: classes.noteCite, body: classes.noteBody, root: classes.noteRoot }, cite: note.authorReference?.display || note.authorString, icon: null }, note.text)))));
|
|
3230
3242
|
}
|
|
3231
3243
|
|
|
3232
|
-
/**
|
|
3233
|
-
* Renders the name of a resource, given either the resource itself or a reference to the resource.
|
|
3234
|
-
* @param props
|
|
3235
|
-
* @returns
|
|
3236
|
-
*/
|
|
3237
3244
|
function ResourceName(props) {
|
|
3238
3245
|
const { value, link, ...rest } = props;
|
|
3239
3246
|
const [outcome, setOutcome] = React.useState();
|
|
@@ -4098,8 +4105,9 @@
|
|
|
4098
4105
|
};
|
|
4099
4106
|
/**
|
|
4100
4107
|
* Sets the array of filters.
|
|
4101
|
-
*
|
|
4102
|
-
* @param
|
|
4108
|
+
* @param definition The original search request.
|
|
4109
|
+
* @param filters The new filters.
|
|
4110
|
+
* @returns The updated search request.
|
|
4103
4111
|
*/
|
|
4104
4112
|
function setFilters(definition, filters) {
|
|
4105
4113
|
return {
|
|
@@ -4111,25 +4119,29 @@
|
|
|
4111
4119
|
}
|
|
4112
4120
|
/**
|
|
4113
4121
|
* Clears all of the filters.
|
|
4122
|
+
* @param definition The original search request.
|
|
4123
|
+
* @returns The updated search request.
|
|
4114
4124
|
*/
|
|
4115
4125
|
function clearFilters(definition) {
|
|
4116
4126
|
return setFilters(definition, []);
|
|
4117
4127
|
}
|
|
4118
4128
|
/**
|
|
4119
4129
|
* Clears all of the filters on a certain field.
|
|
4120
|
-
*
|
|
4121
|
-
* @param
|
|
4130
|
+
* @param definition The original search request.
|
|
4131
|
+
* @param code The field key name to clear filters.
|
|
4132
|
+
* @returns The updated search request.
|
|
4122
4133
|
*/
|
|
4123
4134
|
function clearFiltersOnField(definition, code) {
|
|
4124
4135
|
return setFilters(definition, (definition.filters || []).filter((f) => f.code !== code));
|
|
4125
4136
|
}
|
|
4126
4137
|
/**
|
|
4127
4138
|
* Adds a filter.
|
|
4128
|
-
*
|
|
4129
|
-
* @param
|
|
4130
|
-
* @param
|
|
4131
|
-
* @param
|
|
4132
|
-
* @param
|
|
4139
|
+
* @param definition The original search request.
|
|
4140
|
+
* @param field The field key name.
|
|
4141
|
+
* @param op The operation key name.
|
|
4142
|
+
* @param value The filter value.
|
|
4143
|
+
* @param opt_clear Optional flag to clear filters on the field.
|
|
4144
|
+
* @returns The updated search request.
|
|
4133
4145
|
*/
|
|
4134
4146
|
function addFilter(definition, field, op, value, opt_clear) {
|
|
4135
4147
|
if (opt_clear) {
|
|
@@ -4144,8 +4156,9 @@
|
|
|
4144
4156
|
}
|
|
4145
4157
|
/**
|
|
4146
4158
|
* Adds a field.
|
|
4147
|
-
*
|
|
4148
|
-
* @param
|
|
4159
|
+
* @param definition The original search request.
|
|
4160
|
+
* @param field The field key name.
|
|
4161
|
+
* @returns The updated search request.
|
|
4149
4162
|
*/
|
|
4150
4163
|
function addField(definition, field) {
|
|
4151
4164
|
if (definition.fields && definition.fields.includes(field)) {
|
|
@@ -4164,8 +4177,9 @@
|
|
|
4164
4177
|
}
|
|
4165
4178
|
/**
|
|
4166
4179
|
* Deletes a filter at the specified index.
|
|
4167
|
-
*
|
|
4168
|
-
* @param
|
|
4180
|
+
* @param definition The original search request.
|
|
4181
|
+
* @param index The filter index.
|
|
4182
|
+
* @returns The updated search request.
|
|
4169
4183
|
*/
|
|
4170
4184
|
function deleteFilter(definition, index) {
|
|
4171
4185
|
if (!definition.filters) {
|
|
@@ -4181,24 +4195,27 @@
|
|
|
4181
4195
|
}
|
|
4182
4196
|
/**
|
|
4183
4197
|
* Adds a filter that constrains the specified field to "yesterday".
|
|
4184
|
-
*
|
|
4185
|
-
* @param
|
|
4198
|
+
* @param definition The original search request.
|
|
4199
|
+
* @param field The field key name.
|
|
4200
|
+
* @returns The updated search request.
|
|
4186
4201
|
*/
|
|
4187
4202
|
function addYesterdayFilter(definition, field) {
|
|
4188
4203
|
return addDayFilter(definition, field, -1);
|
|
4189
4204
|
}
|
|
4190
4205
|
/**
|
|
4191
4206
|
* Adds a filter that constrains the specified field to "today".
|
|
4192
|
-
*
|
|
4193
|
-
* @param
|
|
4207
|
+
* @param definition The original search request.
|
|
4208
|
+
* @param field The field key name.
|
|
4209
|
+
* @returns The updated search request.
|
|
4194
4210
|
*/
|
|
4195
4211
|
function addTodayFilter(definition, field) {
|
|
4196
4212
|
return addDayFilter(definition, field, 0);
|
|
4197
4213
|
}
|
|
4198
4214
|
/**
|
|
4199
4215
|
* Adds a filter that constrains the specified field to "tomorrow".
|
|
4200
|
-
*
|
|
4201
|
-
* @param
|
|
4216
|
+
* @param definition The original search request.
|
|
4217
|
+
* @param field The field key name.
|
|
4218
|
+
* @returns The updated search request.
|
|
4202
4219
|
*/
|
|
4203
4220
|
function addTomorrowFilter(definition, field) {
|
|
4204
4221
|
return addDayFilter(definition, field, 1);
|
|
@@ -4209,9 +4226,10 @@
|
|
|
4209
4226
|
* "Today" would be 0.
|
|
4210
4227
|
* "Yesterday" would be -1.
|
|
4211
4228
|
* "Tomorrow" would be 1.
|
|
4212
|
-
*
|
|
4213
|
-
* @param
|
|
4214
|
-
* @param
|
|
4229
|
+
* @param definition The original search request.
|
|
4230
|
+
* @param field The field key name.
|
|
4231
|
+
* @param delta The number of days from this day.
|
|
4232
|
+
* @returns The updated search request.
|
|
4215
4233
|
*/
|
|
4216
4234
|
function addDayFilter(definition, field, delta) {
|
|
4217
4235
|
const startTime = new Date();
|
|
@@ -4224,24 +4242,27 @@
|
|
|
4224
4242
|
}
|
|
4225
4243
|
/**
|
|
4226
4244
|
* Adds a filter that constrains the specified field to "last month".
|
|
4227
|
-
*
|
|
4228
|
-
* @param
|
|
4245
|
+
* @param definition The original search request.
|
|
4246
|
+
* @param field The field key name.
|
|
4247
|
+
* @returns The updated search request.
|
|
4229
4248
|
*/
|
|
4230
4249
|
function addLastMonthFilter(definition, field) {
|
|
4231
4250
|
return addMonthFilter(definition, field, -1);
|
|
4232
4251
|
}
|
|
4233
4252
|
/**
|
|
4234
4253
|
* Adds a filter that constrains the specified field to "this month".
|
|
4235
|
-
*
|
|
4236
|
-
* @param
|
|
4254
|
+
* @param definition The original search request.
|
|
4255
|
+
* @param field The field key name.
|
|
4256
|
+
* @returns The updated search request.
|
|
4237
4257
|
*/
|
|
4238
4258
|
function addThisMonthFilter(definition, field) {
|
|
4239
4259
|
return addMonthFilter(definition, field, 0);
|
|
4240
4260
|
}
|
|
4241
4261
|
/**
|
|
4242
4262
|
* Adds a filter that constrains the specified field to "next month".
|
|
4243
|
-
*
|
|
4244
|
-
* @param
|
|
4263
|
+
* @param definition The original search request.
|
|
4264
|
+
* @param field The field key name.
|
|
4265
|
+
* @returns The updated search request.
|
|
4245
4266
|
*/
|
|
4246
4267
|
function addNextMonthFilter(definition, field) {
|
|
4247
4268
|
return addMonthFilter(definition, field, 1);
|
|
@@ -4252,9 +4273,10 @@
|
|
|
4252
4273
|
* "This month" would be 0.
|
|
4253
4274
|
* "Last month" would be -1.
|
|
4254
4275
|
* "Next month" would be 1.
|
|
4255
|
-
*
|
|
4256
|
-
* @param
|
|
4257
|
-
* @param
|
|
4276
|
+
* @param definition The original search request.
|
|
4277
|
+
* @param field The field key name.
|
|
4278
|
+
* @param delta The number of months from this month.
|
|
4279
|
+
* @returns The updated search request.
|
|
4258
4280
|
*/
|
|
4259
4281
|
function addMonthFilter(definition, field, delta) {
|
|
4260
4282
|
const startTime = new Date();
|
|
@@ -4270,8 +4292,9 @@
|
|
|
4270
4292
|
}
|
|
4271
4293
|
/**
|
|
4272
4294
|
* Adds a filter that constrains the specified field to the year to date.
|
|
4273
|
-
*
|
|
4274
|
-
* @param
|
|
4295
|
+
* @param definition The original search request.
|
|
4296
|
+
* @param field The field key name.
|
|
4297
|
+
* @returns The updated search request.
|
|
4275
4298
|
*/
|
|
4276
4299
|
function addYearToDateFilter(definition, field) {
|
|
4277
4300
|
const startTime = new Date();
|
|
@@ -4283,10 +4306,11 @@
|
|
|
4283
4306
|
}
|
|
4284
4307
|
/**
|
|
4285
4308
|
* Adds a filter for a date between two dates (inclusive of both dates).
|
|
4286
|
-
*
|
|
4287
|
-
* @param
|
|
4288
|
-
* @param
|
|
4289
|
-
* @param
|
|
4309
|
+
* @param definition The original search request.
|
|
4310
|
+
* @param field The field key name.
|
|
4311
|
+
* @param d1 The start date.
|
|
4312
|
+
* @param d2 The end date.
|
|
4313
|
+
* @returns The updated search request.
|
|
4290
4314
|
*/
|
|
4291
4315
|
function addDateFilterBetween(definition, field, d1, d2) {
|
|
4292
4316
|
definition = clearFiltersOnField(definition, field);
|
|
@@ -4296,26 +4320,30 @@
|
|
|
4296
4320
|
}
|
|
4297
4321
|
/**
|
|
4298
4322
|
* Adds a filter for a date before a certain date/time.
|
|
4299
|
-
*
|
|
4300
|
-
* @param
|
|
4301
|
-
* @param
|
|
4302
|
-
* @param
|
|
4323
|
+
* @param definition The original search request.
|
|
4324
|
+
* @param field The field key name.
|
|
4325
|
+
* @param op The date/time operation.
|
|
4326
|
+
* @param value The date.
|
|
4327
|
+
* @returns The updated search request.
|
|
4303
4328
|
*/
|
|
4304
4329
|
function addDateFilterImpl(definition, field, op, value) {
|
|
4305
4330
|
return addFilter(definition, field, op, value.toISOString());
|
|
4306
4331
|
}
|
|
4307
4332
|
/**
|
|
4308
4333
|
* Adds a filter that constrains the specified field to "missing".
|
|
4309
|
-
*
|
|
4310
|
-
* @param
|
|
4334
|
+
* @param definition The original search request.
|
|
4335
|
+
* @param field The field key name.
|
|
4336
|
+
* @param value Optional boolean value. Default is true.
|
|
4337
|
+
* @returns The updated search request.
|
|
4311
4338
|
*/
|
|
4312
4339
|
function addMissingFilter(definition, field, value = true) {
|
|
4313
4340
|
return addFilter(definition, field, core.Operator.MISSING, value.toString());
|
|
4314
4341
|
}
|
|
4315
4342
|
/**
|
|
4316
4343
|
* Sets the offset (starting at zero).
|
|
4317
|
-
*
|
|
4318
|
-
* @param
|
|
4344
|
+
* @param definition The original search request.
|
|
4345
|
+
* @param offset The offset number.
|
|
4346
|
+
* @returns The updated search request.
|
|
4319
4347
|
*/
|
|
4320
4348
|
function setOffset(definition, offset) {
|
|
4321
4349
|
if (definition.offset === offset) {
|
|
@@ -4331,7 +4359,7 @@
|
|
|
4331
4359
|
* Creates a new search request with the search offset at the specified page.
|
|
4332
4360
|
* @param definition The search definition.
|
|
4333
4361
|
* @param page The new page number
|
|
4334
|
-
* @
|
|
4362
|
+
* @returns The new search definition.
|
|
4335
4363
|
*/
|
|
4336
4364
|
function setPage(definition, page) {
|
|
4337
4365
|
const count = definition.count ?? core.DEFAULT_SEARCH_COUNT;
|
|
@@ -4341,8 +4369,10 @@
|
|
|
4341
4369
|
/**
|
|
4342
4370
|
* Sorts the search by the specified key, and optional direction.
|
|
4343
4371
|
* Direction defaults to ascending ('asc') if not specified.
|
|
4344
|
-
*
|
|
4345
|
-
* @param
|
|
4372
|
+
* @param definition The original search request.
|
|
4373
|
+
* @param sort The sort key.
|
|
4374
|
+
* @param desc Optional descending flag. Default is false.
|
|
4375
|
+
* @returns The updated search request.
|
|
4346
4376
|
*/
|
|
4347
4377
|
function setSort(definition, sort, desc) {
|
|
4348
4378
|
if (sort === getSortField(definition) && desc !== undefined && desc === isSortDescending(definition)) {
|
|
@@ -4363,8 +4393,9 @@
|
|
|
4363
4393
|
* Toggles the sort of the search by key.
|
|
4364
4394
|
* If the search is already sorted by the key, reverses the direction.
|
|
4365
4395
|
* If the search is not sorted by the key, sort in ascending order.
|
|
4366
|
-
*
|
|
4367
|
-
* @param
|
|
4396
|
+
* @param definition The original search request.
|
|
4397
|
+
* @param key The field key name.
|
|
4398
|
+
* @returns The updated search request.
|
|
4368
4399
|
*/
|
|
4369
4400
|
function toggleSort(definition, key) {
|
|
4370
4401
|
let desc = false;
|
|
@@ -4398,9 +4429,8 @@
|
|
|
4398
4429
|
}
|
|
4399
4430
|
/**
|
|
4400
4431
|
* Returns a string representing the operation.
|
|
4401
|
-
*
|
|
4402
|
-
* @
|
|
4403
|
-
* @return {string} A display string for the operation.
|
|
4432
|
+
* @param op The operation code.
|
|
4433
|
+
* @returns A display string for the operation.
|
|
4404
4434
|
*/
|
|
4405
4435
|
function getOpString(op) {
|
|
4406
4436
|
return operatorNames[op] ?? '';
|
|
@@ -4440,7 +4470,7 @@
|
|
|
4440
4470
|
/**
|
|
4441
4471
|
* Returns a fragment to be displayed in the search table for the value.
|
|
4442
4472
|
* @param resource The parent resource.
|
|
4443
|
-
* @param
|
|
4473
|
+
* @param field The search code or FHIRPath expression.
|
|
4444
4474
|
* @returns The fragment to display.
|
|
4445
4475
|
*/
|
|
4446
4476
|
function renderValue(resource, field) {
|
|
@@ -4509,8 +4539,7 @@
|
|
|
4509
4539
|
/**
|
|
4510
4540
|
* Handles a key down event on the "available" field.
|
|
4511
4541
|
* If the user presses enter, it is a shortcut for the "Add" button.
|
|
4512
|
-
*
|
|
4513
|
-
* @param {KeyboardEvent} e The keyboard event.
|
|
4542
|
+
* @param e The keyboard event.
|
|
4514
4543
|
*/
|
|
4515
4544
|
function handleAvailableKeyDown(e) {
|
|
4516
4545
|
if (e.key === 'Enter') {
|
|
@@ -4527,8 +4556,7 @@
|
|
|
4527
4556
|
/**
|
|
4528
4557
|
* Handles a key down event on the "available" field.
|
|
4529
4558
|
* If the user presses enter, it is a shortcut for the "Add" button.
|
|
4530
|
-
*
|
|
4531
|
-
* @param {KeyboardEvent} e The keyboard event.
|
|
4559
|
+
* @param e The keyboard event.
|
|
4532
4560
|
*/
|
|
4533
4561
|
function handleSelectedKeyDown(e) {
|
|
4534
4562
|
if (e.key === 'Enter') {
|
|
@@ -4615,9 +4643,9 @@
|
|
|
4615
4643
|
}
|
|
4616
4644
|
/**
|
|
4617
4645
|
* Swaps two fields in the search.
|
|
4618
|
-
*
|
|
4619
|
-
* @param
|
|
4620
|
-
* @param
|
|
4646
|
+
* @param fields The array of fields.
|
|
4647
|
+
* @param i The index of the first field.
|
|
4648
|
+
* @param j The index of the second field.
|
|
4621
4649
|
*/
|
|
4622
4650
|
function swapFields(fields, i, j) {
|
|
4623
4651
|
const temp = fields[i];
|
|
@@ -4662,6 +4690,7 @@
|
|
|
4662
4690
|
* Returns a list of fields/columns available for a type.
|
|
4663
4691
|
* The result is the union of properties and search parameters.
|
|
4664
4692
|
* @param typeSchema The type definition.
|
|
4693
|
+
* @returns A list of fields/columns available for a resource type.
|
|
4665
4694
|
*/
|
|
4666
4695
|
function getFieldsList(typeSchema) {
|
|
4667
4696
|
const result = [];
|
|
@@ -5112,6 +5141,8 @@
|
|
|
5112
5141
|
* The SearchControl component represents the embeddable search table control.
|
|
5113
5142
|
* It includes the table, rows, headers, sorting, etc.
|
|
5114
5143
|
* It does not include the field editor, filter editor, pagination buttons.
|
|
5144
|
+
* @param props The SearchControl React props.
|
|
5145
|
+
* @returns The SearchControl React node.
|
|
5115
5146
|
*/
|
|
5116
5147
|
function SearchControl(props) {
|
|
5117
5148
|
const { classes } = useStyles$6();
|
|
@@ -5194,7 +5225,6 @@
|
|
|
5194
5225
|
}
|
|
5195
5226
|
/**
|
|
5196
5227
|
* Handles a click on a order row.
|
|
5197
|
-
*
|
|
5198
5228
|
* @param e The click event.
|
|
5199
5229
|
* @param resource The FHIR resource.
|
|
5200
5230
|
*/
|
|
@@ -5372,6 +5402,8 @@
|
|
|
5372
5402
|
|
|
5373
5403
|
/**
|
|
5374
5404
|
* The FhirPathTable component represents the embeddable search table control.
|
|
5405
|
+
* @param props FhirPathTable React props.
|
|
5406
|
+
* @returns FhirPathTable React node.
|
|
5375
5407
|
*/
|
|
5376
5408
|
function FhirPathTable(props) {
|
|
5377
5409
|
const medplum = useMedplum();
|
|
@@ -5740,7 +5772,8 @@
|
|
|
5740
5772
|
* React needs unique IDs for components for rendering performance.
|
|
5741
5773
|
* All of the important components in the questionnaire builder have id properties for this:
|
|
5742
5774
|
* Questionnaire, QuestionnaireItem, and QuestionnaireItemAnswerOption.
|
|
5743
|
-
* @
|
|
5775
|
+
* @param existing Optional existing id which will update nextId.
|
|
5776
|
+
* @returns A unique key.
|
|
5744
5777
|
*/
|
|
5745
5778
|
function generateId$1(existing) {
|
|
5746
5779
|
if (existing) {
|
|
@@ -6276,7 +6309,8 @@
|
|
|
6276
6309
|
/**
|
|
6277
6310
|
* Generates a link ID for an item.
|
|
6278
6311
|
* Link IDs are required properties on QuestionnaireItem objects.
|
|
6279
|
-
* @
|
|
6312
|
+
* @param prefix The link ID prefix string.
|
|
6313
|
+
* @returns A unique link ID.
|
|
6280
6314
|
*/
|
|
6281
6315
|
function generateLinkId(prefix) {
|
|
6282
6316
|
return prefix + nextLinkId++;
|
|
@@ -6286,7 +6320,7 @@
|
|
|
6286
6320
|
* React needs unique IDs for components for rendering performance.
|
|
6287
6321
|
* All of the important components in the questionnaire builder have id properties for this:
|
|
6288
6322
|
* Questionnaire, QuestionnaireItem, and QuestionnaireItemAnswerOption.
|
|
6289
|
-
* @
|
|
6323
|
+
* @returns A unique key.
|
|
6290
6324
|
*/
|
|
6291
6325
|
function generateId() {
|
|
6292
6326
|
return 'id-' + nextId++;
|
|
@@ -6385,6 +6419,8 @@
|
|
|
6385
6419
|
}
|
|
6386
6420
|
/**
|
|
6387
6421
|
* Add/Remove/Update specific Qualified Intervals
|
|
6422
|
+
* @param groupId The reference range group ID.
|
|
6423
|
+
* @param changedInterval The updated reference range interval.
|
|
6388
6424
|
*/
|
|
6389
6425
|
function changeInterval(groupId, changedInterval) {
|
|
6390
6426
|
setIntervalGroups((groups) => {
|
|
@@ -6464,7 +6500,9 @@
|
|
|
6464
6500
|
React.createElement(IconCirclePlus, null)))));
|
|
6465
6501
|
}
|
|
6466
6502
|
/**
|
|
6467
|
-
* Render the "filters" section of the IntervalGroup.
|
|
6503
|
+
* Render the "filters" section of the IntervalGroup.
|
|
6504
|
+
* @param props The ReferenceRangeGroupFilter React props.
|
|
6505
|
+
* @returns The ReferenceRangeGroupFilter React node.
|
|
6468
6506
|
*/
|
|
6469
6507
|
function ReferenceRangeGroupFilters(props) {
|
|
6470
6508
|
const { intervalGroup, onChange } = props;
|
|
@@ -6528,7 +6566,7 @@
|
|
|
6528
6566
|
* Helper function that assigns ids to each qualifiedInterval of an ObservationDefinition
|
|
6529
6567
|
* @param definition An ObservationDefinition
|
|
6530
6568
|
* @param setIntervalId React setState function for the intervalId
|
|
6531
|
-
* @returns
|
|
6569
|
+
* @returns The updated observation definition.
|
|
6532
6570
|
*/
|
|
6533
6571
|
function ensureQualifiedIntervalKeys(definition, setIntervalId) {
|
|
6534
6572
|
const intervals = definition.qualifiedInterval || [];
|
|
@@ -6553,7 +6591,10 @@
|
|
|
6553
6591
|
}
|
|
6554
6592
|
/**
|
|
6555
6593
|
* Group all ObservationDefinitionQualifiedIntervals based on the values of their "filter" properties,
|
|
6556
|
-
* so that similar ranges can be grouped together
|
|
6594
|
+
* so that similar ranges can be grouped together.
|
|
6595
|
+
* @param intervals Array of reference range intervals.
|
|
6596
|
+
* @param setGroupId Callback to set the group ID.
|
|
6597
|
+
* @returns The grouped intervals.
|
|
6557
6598
|
*/
|
|
6558
6599
|
function groupQualifiedIntervals(intervals, setGroupId) {
|
|
6559
6600
|
let groupId = 1;
|
|
@@ -6573,8 +6614,9 @@
|
|
|
6573
6614
|
return Object.values(groups);
|
|
6574
6615
|
}
|
|
6575
6616
|
/**
|
|
6576
|
-
* Generates a unique string for each set of filter values, so that similarly filtered intervals can be grouped together
|
|
6577
|
-
* @
|
|
6617
|
+
* Generates a unique string for each set of filter values, so that similarly filtered intervals can be grouped together.
|
|
6618
|
+
* @param interval The reference range interval.
|
|
6619
|
+
* @returns A "group key" that corresponds to the value of the interval filter properties.
|
|
6578
6620
|
*/
|
|
6579
6621
|
function generateGroupKey(interval) {
|
|
6580
6622
|
const results = [
|
|
@@ -7162,6 +7204,7 @@
|
|
|
7162
7204
|
/**
|
|
7163
7205
|
* Dynamically creates a script tag for the specified JavaScript file.
|
|
7164
7206
|
* @param src The JavaScript file URL.
|
|
7207
|
+
* @param onload Optional callback for the onload event.
|
|
7165
7208
|
*/
|
|
7166
7209
|
function createScriptTag(src, onload) {
|
|
7167
7210
|
const head = document.getElementsByTagName('head')[0];
|
|
@@ -7207,9 +7250,9 @@
|
|
|
7207
7250
|
}
|
|
7208
7251
|
if (typeof window !== 'undefined') {
|
|
7209
7252
|
const origin = window.location.protocol + '//' + window.location.host;
|
|
7210
|
-
const authorizedOrigins = "
|
|
7253
|
+
const authorizedOrigins = "http://localhost:3000,http://127.0.0.1:3000,http://localhost:6006,http://127.0.0.1:6006,https://app.medplum.com,https://docs.medplum.com,https://storybook.medplum.com,https://graphiql.medplum.com,https://www.medplum.com"?.split(',') ?? [];
|
|
7211
7254
|
if (authorizedOrigins.includes(origin)) {
|
|
7212
|
-
return "
|
|
7255
|
+
return "921088377005-3j1sa10vr6hj86jgmdfh2l53v3mp7lfi.apps.googleusercontent.com";
|
|
7213
7256
|
}
|
|
7214
7257
|
}
|
|
7215
7258
|
return undefined;
|
|
@@ -7502,6 +7545,8 @@
|
|
|
7502
7545
|
* 3) Choose profile - If the user has multiple profiles, prompt to choose one
|
|
7503
7546
|
* 4) Choose scope - If the user has multiple scopes, prompt to choose one
|
|
7504
7547
|
* 5) Success - Return to the caller with either a code or a redirect
|
|
7548
|
+
* @param props The SignInForm React props.
|
|
7549
|
+
* @returns The SignInForm React node.
|
|
7505
7550
|
*/
|
|
7506
7551
|
function SignInForm(props) {
|
|
7507
7552
|
const { login: loginCode, chooseScopes, onSuccess, onForgotPassword, onRegister, onCode, ...baseLoginRequest } = props;
|
|
@@ -7521,7 +7566,7 @@
|
|
|
7521
7566
|
onSuccess();
|
|
7522
7567
|
}
|
|
7523
7568
|
})
|
|
7524
|
-
.catch(
|
|
7569
|
+
.catch((err) => notifications.showNotification({ color: 'red', message: core.normalizeErrorString(err) }));
|
|
7525
7570
|
}
|
|
7526
7571
|
}, [medplum, onCode, onSuccess]);
|
|
7527
7572
|
const handleAuthResponse = React.useCallback((response) => {
|
|
@@ -7553,7 +7598,7 @@
|
|
|
7553
7598
|
medplum
|
|
7554
7599
|
.get('auth/login/' + loginCode)
|
|
7555
7600
|
.then(handleAuthResponse)
|
|
7556
|
-
.catch(
|
|
7601
|
+
.catch((err) => notifications.showNotification({ color: 'red', message: core.normalizeErrorString(err) }));
|
|
7557
7602
|
}
|
|
7558
7603
|
}, [medplum, loginCode, login, handleAuthResponse]);
|
|
7559
7604
|
return (React.createElement(Document, { width: 450 }, (() => {
|