@medplum/react-scheduling 5.1.37 → 5.1.38
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 +3 -2
- package/dist/cjs/index.cjs.map +4 -4
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.css.map +3 -3
- package/dist/cjs/index.d.ts +153 -79
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.css.map +3 -3
- package/dist/esm/index.d.ts +153 -79
- package/dist/esm/index.mjs +3 -2
- package/dist/esm/index.mjs.map +4 -4
- package/package.json +20 -20
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { Appointment } from '@medplum/fhirtypes';
|
|
2
|
+
import type { Coding } from '@medplum/fhirtypes';
|
|
3
|
+
import type { Dereference } from '@medplum/core';
|
|
2
4
|
import type { HealthcareService } from '@medplum/fhirtypes';
|
|
3
5
|
import type { HealthcareServiceAvailableTime } from '@medplum/fhirtypes';
|
|
4
6
|
import type { JSX } from 'react';
|
|
@@ -10,7 +12,9 @@ import type { Patient } from '@medplum/fhirtypes';
|
|
|
10
12
|
import type { Reference } from '@medplum/fhirtypes';
|
|
11
13
|
import type { Resource } from '@medplum/fhirtypes';
|
|
12
14
|
import type { Schedule } from '@medplum/fhirtypes';
|
|
15
|
+
import type { SchedulingRequirement } from '@medplum/core';
|
|
13
16
|
import type { Slot } from '@medplum/fhirtypes';
|
|
17
|
+
import type { ValueSetExpansionContains } from '@medplum/fhirtypes';
|
|
14
18
|
import type { WithId } from '@medplum/core';
|
|
15
19
|
|
|
16
20
|
/**
|
|
@@ -27,15 +31,15 @@ export declare interface ActorCombination {
|
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
/**
|
|
30
|
-
* What an appointment is being asked for: the schedules chosen, per
|
|
34
|
+
* What an appointment is being asked for: the schedules chosen, per actor type.
|
|
31
35
|
* Everything named attends.
|
|
32
36
|
*/
|
|
33
|
-
export declare type ActorSelections = Partial<Record<
|
|
37
|
+
export declare type ActorSelections = Partial<Record<SchedulingActorType, readonly ScheduleCandidate[]>>;
|
|
34
38
|
|
|
35
39
|
export declare function addDays(date: Date, days: number): Date;
|
|
36
40
|
|
|
37
41
|
/**
|
|
38
|
-
* Chooses the actors an appointment is held on, for one
|
|
42
|
+
* Chooses the actors an appointment is held on, for one actor type.
|
|
39
43
|
*
|
|
40
44
|
* Everything chosen attends: `$find` intersects the schedules behind them,
|
|
41
45
|
* so naming a second actor narrows the times to the ones both are free for.
|
|
@@ -43,13 +47,12 @@ export declare function addDays(date: Date, days: number): Date;
|
|
|
43
47
|
* Schedules are searched for as the name is typed (via `AsyncAutocomplete`).
|
|
44
48
|
*
|
|
45
49
|
* @param props - The React props.
|
|
46
|
-
* @returns The field for one
|
|
50
|
+
* @returns The field for one actor type.
|
|
47
51
|
*/
|
|
48
52
|
export declare function AppointmentActorSelect(props: AppointmentActorSelectProps): JSX.Element;
|
|
49
53
|
|
|
50
54
|
export declare interface AppointmentActorSelectProps {
|
|
51
|
-
|
|
52
|
-
readonly role: SchedulingRole;
|
|
55
|
+
readonly actorType: BookableActorType;
|
|
53
56
|
/** The service being booked. Nothing is offered until it resolves. */
|
|
54
57
|
readonly service: Reference<HealthcareService> | WithId<HealthcareService> | undefined;
|
|
55
58
|
/**
|
|
@@ -124,6 +127,7 @@ export declare interface AppointmentDayTimesProps {
|
|
|
124
127
|
readonly onSelectAppointment: (appointment: Appointment) => void;
|
|
125
128
|
/** IANA timezone the times are read in. Defaults to the browser's. */
|
|
126
129
|
readonly timezone?: string;
|
|
130
|
+
readonly viewerTimezone?: string;
|
|
127
131
|
readonly selected?: Appointment;
|
|
128
132
|
}
|
|
129
133
|
|
|
@@ -200,6 +204,10 @@ export declare interface AppointmentProposalFormProps {
|
|
|
200
204
|
* rather than leaving it on a time nobody chose.
|
|
201
205
|
*/
|
|
202
206
|
readonly onChangeTime?: (time: DateTimeRange | undefined) => void;
|
|
207
|
+
/** The ValueSet the procedure code field binds to. Defaults to the full CPT value set. */
|
|
208
|
+
readonly procedureBinding?: string;
|
|
209
|
+
/** The ValueSet the diagnosis code field binds to. Defaults to the full ICD-10-CM value set. */
|
|
210
|
+
readonly diagnosisBinding?: string;
|
|
203
211
|
/**
|
|
204
212
|
* Performs the booking with the proposal the form assembled.
|
|
205
213
|
*
|
|
@@ -254,23 +262,41 @@ export declare function AppointmentSlotGroupCard(props: AppointmentSlotGroupCard
|
|
|
254
262
|
export declare interface AppointmentSlotGroupCardProps {
|
|
255
263
|
readonly group: AppointmentSlotGroup;
|
|
256
264
|
readonly onSelectAppointment: (appointment: Appointment) => void;
|
|
257
|
-
/**
|
|
265
|
+
/** Timezone the times are shown in. */
|
|
258
266
|
readonly timezone?: string;
|
|
267
|
+
/** The viewer's own timezone. */
|
|
268
|
+
readonly viewerTimezone?: string;
|
|
259
269
|
readonly selected?: Appointment;
|
|
260
270
|
readonly disabled?: boolean;
|
|
261
271
|
}
|
|
262
272
|
|
|
263
273
|
/**
|
|
264
|
-
* Actor types whose schedules may be offered for booking
|
|
274
|
+
* Actor types whose schedules may be offered for booking, in the order they are
|
|
275
|
+
* asked about.
|
|
265
276
|
*
|
|
266
|
-
*
|
|
267
|
-
* a
|
|
268
|
-
*
|
|
277
|
+
* Each type becomes one question, because `$find` intersects the schedules it is
|
|
278
|
+
* given: a time is offered only when the practitioner *and* the location *and*
|
|
279
|
+
* the device are all free for it.
|
|
280
|
+
*
|
|
281
|
+
* Does not include `PractitionerRole` to prevent double-booking a `Practitioner`
|
|
282
|
+
* who holds multiple roles. A practitioner is booked on their `Practitioner`,
|
|
283
|
+
* but their `PractitionerRole`s still decide which schedules they are eligible
|
|
284
|
+
* for and where they practice.
|
|
269
285
|
*/
|
|
270
|
-
export declare const BOOKABLE_ACTOR_TYPES:
|
|
286
|
+
export declare const BOOKABLE_ACTOR_TYPES: ["Practitioner", "Location", "Device"];
|
|
271
287
|
|
|
272
288
|
export declare type BookableActorType = (typeof BOOKABLE_ACTOR_TYPES)[number];
|
|
273
289
|
|
|
290
|
+
/**
|
|
291
|
+
* What the booking form captures for a visit type's requirements: one value per requirement it
|
|
292
|
+
* can be asked for.
|
|
293
|
+
*/
|
|
294
|
+
export declare interface BookingRequirementValues {
|
|
295
|
+
readonly procedure: readonly Coding[];
|
|
296
|
+
readonly diagnosis: readonly Coding[];
|
|
297
|
+
readonly medicalNecessity: boolean;
|
|
298
|
+
}
|
|
299
|
+
|
|
274
300
|
export declare function Calendar(props: CalendarProps): JSX.Element;
|
|
275
301
|
|
|
276
302
|
export declare interface CalendarProps {
|
|
@@ -310,6 +336,14 @@ export declare type DateTimeRange = {
|
|
|
310
336
|
end: Date;
|
|
311
337
|
};
|
|
312
338
|
|
|
339
|
+
/** The value set the diagnosis code field binds to when a host names none. */
|
|
340
|
+
export declare const DEFAULT_DIAGNOSIS_VALUE_SET = "http://hl7.org/fhir/sid/icd-10-cm/vs";
|
|
341
|
+
|
|
342
|
+
/** The value set the procedure code field binds to when a host names none. */
|
|
343
|
+
export declare const DEFAULT_PROCEDURE_VALUE_SET = "http://www.ama-assn.org/go/cpt/vs";
|
|
344
|
+
|
|
345
|
+
export declare const EMPTY_REQUIREMENT_VALUES: BookingRequirementValues;
|
|
346
|
+
|
|
313
347
|
/**
|
|
314
348
|
* Returns the last instant of a day, so that a range covers the whole of it.
|
|
315
349
|
* @param date - Any instant during the day.
|
|
@@ -360,14 +394,6 @@ export declare interface FilterCandidatesOptions {
|
|
|
360
394
|
readonly signal?: AbortSignal;
|
|
361
395
|
}
|
|
362
396
|
|
|
363
|
-
/**
|
|
364
|
-
* Says in words which days a search covers.
|
|
365
|
-
* @param range - The days asked for.
|
|
366
|
-
* @param formatDay - How to name one day. Defaults to naming it with its weekday.
|
|
367
|
-
* @returns The range as a phrase, or undefined when both ends are open.
|
|
368
|
-
*/
|
|
369
|
-
export declare function formatDateRange(range: DateRange, formatDay?: (date: Date) => string): string | undefined;
|
|
370
|
-
|
|
371
397
|
/**
|
|
372
398
|
* Formats a calendar day as a heading (e.g. "Monday, July 27").
|
|
373
399
|
* @param date - Local midnight of the day.
|
|
@@ -376,19 +402,25 @@ export declare function formatDateRange(range: DateRange, formatDay?: (date: Dat
|
|
|
376
402
|
export declare function formatDayHeading(date: Date): string;
|
|
377
403
|
|
|
378
404
|
/**
|
|
379
|
-
* Names a
|
|
380
|
-
* @param
|
|
381
|
-
* @returns The
|
|
405
|
+
* Names a timezone the short way it is written beside a time, e.g. "ET" or "GMT+2".
|
|
406
|
+
* @param timezone - IANA timezone identifier. Defaults to the browser's.
|
|
407
|
+
* @returns The zone's short name.
|
|
382
408
|
*/
|
|
383
|
-
export declare function
|
|
409
|
+
export declare function formatTimezoneLabel(timezone?: string): string;
|
|
384
410
|
|
|
385
411
|
/**
|
|
386
412
|
* Formats an instant's time of day in a given timezone (e.g. "12:30 PM").
|
|
387
413
|
* @param date - The instant to format.
|
|
388
414
|
* @param timezone - IANA timezone identifier. Defaults to the browser's.
|
|
415
|
+
* @param options - Whether to name the zone as well.
|
|
389
416
|
* @returns The formatted time.
|
|
390
417
|
*/
|
|
391
|
-
export declare function formatZonedTime(date: Date, timezone?: string): string;
|
|
418
|
+
export declare function formatZonedTime(date: Date, timezone?: string, options?: FormatZonedTimeOptions): string;
|
|
419
|
+
|
|
420
|
+
export declare interface FormatZonedTimeOptions {
|
|
421
|
+
/** Names the zone alongside the time, e.g. "12:30 PM ET". */
|
|
422
|
+
readonly withTimezone?: boolean;
|
|
423
|
+
}
|
|
392
424
|
|
|
393
425
|
/**
|
|
394
426
|
* Builds the sets of actors an appointment could be held on.
|
|
@@ -410,22 +442,31 @@ export declare function getActorCombinations(selections: ActorSelections): Actor
|
|
|
410
442
|
export declare function getActorGroupKey(appointment: Appointment): string;
|
|
411
443
|
|
|
412
444
|
/**
|
|
413
|
-
*
|
|
445
|
+
* Builds a key identifying a set of actors, independent of their order.
|
|
446
|
+
* @param actors - The actors to key.
|
|
447
|
+
* @returns The key.
|
|
448
|
+
*/
|
|
449
|
+
export declare function getActorsKey(actors: readonly Reference[]): string;
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Extracts the resource type from a reference to an actor.
|
|
414
453
|
*
|
|
415
|
-
*
|
|
416
|
-
*
|
|
454
|
+
* Only supports references that may be used for Scheduling operations, which are
|
|
455
|
+
* those that have a qualified `reference` attribute. The attribute must be present,
|
|
456
|
+
* and may not be a reference to a "contained" resource (eg. `{ reference: "#cid" }`)
|
|
417
457
|
*
|
|
418
|
-
* @param
|
|
419
|
-
* @returns The
|
|
458
|
+
* @param reference - A Reference to a schedulable resource
|
|
459
|
+
* @returns The type that the reference refers to.
|
|
420
460
|
*/
|
|
421
|
-
export declare function
|
|
461
|
+
export declare function getActorType(reference: SchedulingActor): SchedulingActorType;
|
|
422
462
|
|
|
423
463
|
/**
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
* @
|
|
464
|
+
* Provides the label we use for scheduling resource types in this UI
|
|
465
|
+
*
|
|
466
|
+
* @param resourceType - A scheduling actor type
|
|
467
|
+
* @returns The type's label
|
|
427
468
|
*/
|
|
428
|
-
export declare function
|
|
469
|
+
export declare function getActorTypeLabel(resourceType: SchedulingActorType): string;
|
|
429
470
|
|
|
430
471
|
/**
|
|
431
472
|
* Returns a key uniquely identifying a proposed appointment.
|
|
@@ -439,18 +480,24 @@ export declare function getActorsKey(actors: readonly Reference[]): string;
|
|
|
439
480
|
export declare function getAppointmentKey(appointment: Appointment): string;
|
|
440
481
|
|
|
441
482
|
/**
|
|
442
|
-
*
|
|
443
|
-
* @
|
|
444
|
-
* @returns The name to show.
|
|
483
|
+
* The IANA timezone the browser is set to.
|
|
484
|
+
* @returns The viewer's own timezone identifier.
|
|
445
485
|
*/
|
|
446
|
-
export declare function
|
|
486
|
+
export declare function getBrowserTimezone(): string;
|
|
447
487
|
|
|
448
488
|
/**
|
|
449
|
-
* Returns the
|
|
489
|
+
* Returns the actor a candidate's schedule is held on.
|
|
450
490
|
* @param candidate - The candidate to read.
|
|
451
|
-
* @returns
|
|
491
|
+
* @returns Its schedule's only actor.
|
|
492
|
+
*/
|
|
493
|
+
export declare function getCandidateActor(candidate: ScheduleCandidate): SchedulingActor;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Names a candidate's actor, for use in plain-text option lists.
|
|
497
|
+
* @param candidate - The candidate to name.
|
|
498
|
+
* @returns The name to show.
|
|
452
499
|
*/
|
|
453
|
-
export declare function
|
|
500
|
+
export declare function getCandidateDisplay(candidate: ScheduleCandidate): string;
|
|
454
501
|
|
|
455
502
|
/**
|
|
456
503
|
* Counts the days a window covers, a part of a day counting as a whole one.
|
|
@@ -510,16 +557,9 @@ export declare function getFindWindowError(range: DateRange): string | undefined
|
|
|
510
557
|
export declare function getNativeInputType(type: 'date' | 'time'): string;
|
|
511
558
|
|
|
512
559
|
/**
|
|
513
|
-
* Returns
|
|
514
|
-
* @param actorType - A `Schedule.actor` resource type.
|
|
515
|
-
* @returns The role that actor fills.
|
|
516
|
-
*/
|
|
517
|
-
export declare function getSchedulingRole(actorType: SchedulingActorType): SchedulingRole;
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
* Returns everything chosen, across roles.
|
|
560
|
+
* Returns everything chosen, across actor types
|
|
521
561
|
* @param selections - What has been chosen.
|
|
522
|
-
* @returns The chosen candidates
|
|
562
|
+
* @returns The chosen candidates in `BOOKABLE_ACTOR_TYPES` order
|
|
523
563
|
*/
|
|
524
564
|
export declare function getSelectedCandidates(selections: ActorSelections): ScheduleCandidate[];
|
|
525
565
|
|
|
@@ -530,6 +570,14 @@ export declare function getSelectedCandidates(selections: ActorSelections): Sche
|
|
|
530
570
|
*/
|
|
531
571
|
export declare function getSelectionError(selections: ActorSelections): string | undefined;
|
|
532
572
|
|
|
573
|
+
/**
|
|
574
|
+
* Search window for a calendar day in the given timezone, starting from now if that day is already underway.
|
|
575
|
+
* @param day - The day to search, as local midnight. Bound to the site's timezone.
|
|
576
|
+
* @param timezone - IANA timezone identifier. Defaults to the browser's.
|
|
577
|
+
* @returns Range from the start of that day, or from now, through the next day's midnight.
|
|
578
|
+
*/
|
|
579
|
+
export declare function getZonedDayRange(day: Date, timezone?: string): Required<DateRange>;
|
|
580
|
+
|
|
533
581
|
/**
|
|
534
582
|
* Groups proposed appointments into days, and each day into the sets of actors
|
|
535
583
|
* offering those times.
|
|
@@ -543,24 +591,38 @@ export declare function getSelectionError(selections: ActorSelections): string |
|
|
|
543
591
|
*/
|
|
544
592
|
export declare function groupAppointmentsByDay(appointments: readonly Appointment[], timezone?: string, searched?: DateRange): AppointmentDay[];
|
|
545
593
|
|
|
546
|
-
|
|
594
|
+
/**
|
|
595
|
+
* Whether every requirement a visit type names has been answered.
|
|
596
|
+
* @param values - What the fields are holding.
|
|
597
|
+
* @param requirements - What the visit type requires, from its eligibility codes.
|
|
598
|
+
* @returns True once each required field holds a value. A value nothing asked for is not weighed.
|
|
599
|
+
*/
|
|
600
|
+
export declare function hasRequiredValues(values: BookingRequirementValues, requirements: ReadonlySet<SchedulingRequirement>): boolean;
|
|
547
601
|
|
|
548
602
|
/**
|
|
549
|
-
* Reports whether
|
|
550
|
-
* @param
|
|
603
|
+
* Reports whether an actorType has to be chosen to be a valid booking
|
|
604
|
+
* @param actorType - The actor type being chosen.
|
|
551
605
|
* @returns Whether a search can run without it.
|
|
552
606
|
*/
|
|
553
|
-
export declare function
|
|
607
|
+
export declare function isActorTypeRequired(actorType: SchedulingActorType): boolean;
|
|
608
|
+
|
|
609
|
+
export declare function isBookableActorType(value: string | undefined): value is BookableActorType;
|
|
554
610
|
|
|
555
611
|
/**
|
|
556
|
-
*
|
|
557
|
-
* @param
|
|
558
|
-
* @param
|
|
559
|
-
* @returns True when
|
|
612
|
+
* Whether one requirement has been answered.
|
|
613
|
+
* @param requirement - The requirement to weigh.
|
|
614
|
+
* @param values - What the fields are holding.
|
|
615
|
+
* @returns True when the field answering that requirement holds a value.
|
|
560
616
|
*/
|
|
561
|
-
export declare function
|
|
617
|
+
export declare function isRequirementAnswered(requirement: SchedulingRequirement, values: BookingRequirementValues): boolean;
|
|
562
618
|
|
|
563
|
-
|
|
619
|
+
/**
|
|
620
|
+
* Whether a timezone is the viewer's own.
|
|
621
|
+
* @param timezone - IANA timezone the times are in, or undefined when it could not be resolved.
|
|
622
|
+
* @param viewer - The viewer's IANA timezone. Defaults to the browser's
|
|
623
|
+
* @returns True when the zone is the viewer's, or when there is no zone to compare.
|
|
624
|
+
*/
|
|
625
|
+
export declare function isViewerTimezone(timezone: string | undefined, viewer?: string): boolean;
|
|
564
626
|
|
|
565
627
|
/**
|
|
566
628
|
* The longest window `Appointment/$find` accepts. Requests wider than this are
|
|
@@ -618,7 +680,13 @@ export declare function parseDayKey(key: string): Date;
|
|
|
618
680
|
*/
|
|
619
681
|
export declare function parseZonedTime(day: Date, time: string, timezone?: string): Date | undefined;
|
|
620
682
|
|
|
621
|
-
|
|
683
|
+
/**
|
|
684
|
+
* Actor types that must be chosen before a search can run.
|
|
685
|
+
*
|
|
686
|
+
* Locations and devices are left optional: a service may have location schedules
|
|
687
|
+
* configured without every booking needing to hold one.
|
|
688
|
+
*/
|
|
689
|
+
export declare const REQUIRED_ACTOR_TYPES: ReadonlySet<SchedulingActorType>;
|
|
622
690
|
|
|
623
691
|
/**
|
|
624
692
|
* Edits weekly availability for one visit service type, either as a Schedule's
|
|
@@ -660,27 +728,13 @@ export declare interface ScheduleOverrideEditorProps extends CommonProps {
|
|
|
660
728
|
readonly onSave: (updatedSchedule: Schedule) => void | Promise<void>;
|
|
661
729
|
}
|
|
662
730
|
|
|
663
|
-
/** Resource types that may appear in `Schedule.actor`. */
|
|
664
|
-
export declare const SCHEDULING_ACTOR_TYPES: readonly ["Practitioner", "PractitionerRole", "Location", "Device"];
|
|
665
|
-
|
|
666
|
-
/**
|
|
667
|
-
* The parts of an appointment a user chooses, in the order they are asked about.
|
|
668
|
-
*
|
|
669
|
-
* Each role becomes one question, because `$find` intersects the schedules it is
|
|
670
|
-
* given: a time is offered only when the provider *and* the room *and* the
|
|
671
|
-
* device are all free for it.
|
|
672
|
-
*/
|
|
673
|
-
export declare const SCHEDULING_ROLES: readonly ["provider", "room", "device"];
|
|
674
|
-
|
|
675
731
|
/**
|
|
676
732
|
* A reference to something a Schedule belongs to. The same union an Appointment
|
|
677
733
|
* accepts as a participant, so an actor can be carried straight across.
|
|
678
734
|
*/
|
|
679
735
|
export declare type SchedulingActor = Schedule['actor'][number];
|
|
680
736
|
|
|
681
|
-
export declare type SchedulingActorType =
|
|
682
|
-
|
|
683
|
-
export declare type SchedulingRole = (typeof SCHEDULING_ROLES)[number];
|
|
737
|
+
export declare type SchedulingActorType = Dereference<SchedulingActor>['resourceType'];
|
|
684
738
|
|
|
685
739
|
/**
|
|
686
740
|
* A data-coordination component pairing {@link CalendarsPanel} with {@link MultiCalendar}.
|
|
@@ -692,6 +746,9 @@ export declare type SchedulingRole = (typeof SCHEDULING_ROLES)[number];
|
|
|
692
746
|
* The form writes the booking and announces what it wrote, which is what puts the
|
|
693
747
|
* new appointment on the calendar beside it — a host supplies no data for any of it.
|
|
694
748
|
* What was written is reported through `onBooked`, for a host that wants to say so.
|
|
749
|
+
* - Shows what is booked: clicking an appointment opens {@link AppointmentDetails} in a
|
|
750
|
+
* drawer over the calendar, describing the visit and offering to cancel it. Cancelling
|
|
751
|
+
* is what takes the time back off the calendar, again without a host supplying anything.
|
|
695
752
|
* - Highlights the time last chosen, wherever it was chosen: the click that opened the
|
|
696
753
|
* pane, then whatever the form's time search settles on, and nothing while the form
|
|
697
754
|
* holds no time. The calendar is never moved to reach it — a highlight off the week
|
|
@@ -704,7 +761,17 @@ export declare function SchedulingWorkspace(props: SchedulingWorkspaceProps): JS
|
|
|
704
761
|
|
|
705
762
|
export declare interface SchedulingWorkspaceProps {
|
|
706
763
|
readonly className?: string;
|
|
764
|
+
/** The ValueSet the procedure code field binds to. Defaults to full CPT valueset. */
|
|
765
|
+
readonly procedureBinding?: string;
|
|
766
|
+
/** The ValueSet the diagnosis code field binds to. Defaults to full ICD-10-CM valueset. */
|
|
767
|
+
readonly diagnosisBinding?: string;
|
|
707
768
|
readonly onBooked?: (booking: AppointmentBooking) => void | Promise<void>;
|
|
769
|
+
readonly onCancelled?: (appointment: WithId<Appointment>) => void | Promise<void>;
|
|
770
|
+
/**
|
|
771
|
+
* Overrides the value set the appointment detail view offers cancellation reasons
|
|
772
|
+
* from, for a host coding them against its own terminology.
|
|
773
|
+
*/
|
|
774
|
+
readonly appointmentCancellationReasonValueSet?: string;
|
|
708
775
|
}
|
|
709
776
|
|
|
710
777
|
/**
|
|
@@ -720,8 +787,8 @@ export declare function searchScheduleCandidates(medplum: MedplumClient, service
|
|
|
720
787
|
|
|
721
788
|
export declare interface SearchScheduleCandidatesOptions {
|
|
722
789
|
/** Which of the service's actors to offer. */
|
|
723
|
-
readonly
|
|
724
|
-
/** What the user typed. Empty offers whatever the
|
|
790
|
+
readonly actorType: SchedulingActorType;
|
|
791
|
+
/** What the user typed. Empty offers whatever the actor type has, unfiltered by name. */
|
|
725
792
|
readonly query: string;
|
|
726
793
|
/**
|
|
727
794
|
* The site being booked at. Actors sited elsewhere are left out: a room or a
|
|
@@ -778,6 +845,13 @@ export declare function startOfDay(date: Date): Date;
|
|
|
778
845
|
|
|
779
846
|
export declare type TimeOfDay = 'any' | 'morning' | 'afternoon';
|
|
780
847
|
|
|
848
|
+
/**
|
|
849
|
+
* Reads the codes a field is holding into a list of codings.
|
|
850
|
+
* @param elements - What the field is holding.
|
|
851
|
+
* @returns The codings to record, dropping anything that never became a code.
|
|
852
|
+
*/
|
|
853
|
+
export declare function toCodings(elements: readonly ValueSetExpansionContains[]): Coding[];
|
|
854
|
+
|
|
781
855
|
/**
|
|
782
856
|
* Searches for the times an appointment could be held at.
|
|
783
857
|
*
|