@medplum/react 2.2.6 → 2.2.10

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.
@@ -7,6 +7,7 @@ import { Attachment } from '@medplum/fhirtypes';
7
7
  import { AvatarProps } from '@mantine/core';
8
8
  import { BaseLoginRequest } from '@medplum/core';
9
9
  import { Bundle } from '@medplum/fhirtypes';
10
+ import { CardProps } from '@mantine/core';
10
11
  import { ClientApplication } from '@medplum/fhirtypes';
11
12
  import { CodeableConcept } from '@medplum/fhirtypes';
12
13
  import { Coding } from '@medplum/fhirtypes';
@@ -72,6 +73,8 @@ import { TextProps } from '@mantine/core';
72
73
  import { Timing } from '@medplum/fhirtypes';
73
74
  import { TypedValue } from '@medplum/core';
74
75
  import { UserConfiguration } from '@medplum/fhirtypes';
76
+ import { ValueSetExpandParams } from '@medplum/core';
77
+ import { ValueSetExpansionContains } from '@medplum/fhirtypes';
75
78
 
76
79
  /**
77
80
  * Adds a filter for a date between two dates (inclusive of both dates).
@@ -337,26 +340,16 @@ export declare interface CodeableConceptDisplayProps {
337
340
 
338
341
  export declare function CodeableConceptInput(props: CodeableConceptInputProps): JSX.Element;
339
342
 
340
- export declare interface CodeableConceptInputProps {
341
- binding: string | undefined;
342
- name: string;
343
- placeholder?: string;
343
+ export declare interface CodeableConceptInputProps extends Omit<ValueSetAutocompleteProps, 'defaultValue' | 'onChange'> {
344
344
  defaultValue?: CodeableConcept;
345
345
  onChange?: (value: CodeableConcept | undefined) => void;
346
346
  }
347
347
 
348
348
  export declare function CodeInput(props: CodeInputProps): JSX.Element;
349
349
 
350
- export declare interface CodeInputProps {
351
- binding: string | undefined;
352
- name: string;
353
- placeholder?: string;
350
+ export declare interface CodeInputProps extends Omit<ValueSetAutocompleteProps, 'defaultValue' | 'onChange'> {
354
351
  defaultValue?: string;
355
352
  onChange?: (value: string | undefined) => void;
356
- creatable?: boolean;
357
- maxSelectedValues?: number;
358
- clearSearchOnChange?: boolean;
359
- clearable?: boolean;
360
353
  }
361
354
 
362
355
  export declare function CodingDisplay(props: CodingDisplayProps): JSX.Element;
@@ -367,10 +360,7 @@ export declare interface CodingDisplayProps {
367
360
 
368
361
  export declare function CodingInput(props: CodingInputProps): JSX.Element;
369
362
 
370
- export declare interface CodingInputProps {
371
- binding: string | undefined;
372
- name: string;
373
- placeholder?: string;
363
+ export declare interface CodingInputProps extends Omit<ValueSetAutocompleteProps, 'defaultValue' | 'onChange'> {
374
364
  defaultValue?: Coding;
375
365
  onChange?: (value: Coding | undefined) => void;
376
366
  }
@@ -524,7 +514,9 @@ export declare interface EncounterTimelineProps {
524
514
  export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
525
515
  state: ErrorBoundaryState;
526
516
  constructor(props: ErrorBoundaryProps);
527
- static getDerivedStateFromError(error: any): ErrorBoundaryState;
517
+ static getDerivedStateFromError(error: Error): ErrorBoundaryState;
518
+ componentDidUpdate(_prevProps: Readonly<ErrorBoundaryProps>, _prevState: Readonly<ErrorBoundaryState>): void;
519
+ shouldComponentUpdate(nextProps: Readonly<ErrorBoundaryProps>, nextState: Readonly<ErrorBoundaryState>): boolean;
528
520
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
529
521
  render(): ReactNode;
530
522
  }
@@ -534,7 +526,8 @@ export declare interface ErrorBoundaryProps {
534
526
  }
535
527
 
536
528
  export declare interface ErrorBoundaryState {
537
- error?: any;
529
+ error?: Error;
530
+ lastLocation: string;
538
531
  }
539
532
 
540
533
  /**
@@ -826,6 +819,13 @@ export declare interface PanelStylesParams {
826
819
  */
827
820
  export declare function parseForm(form: HTMLFormElement): Record<string, string>;
828
821
 
822
+ export declare function PatientSummary(props: PatientSummaryProps): JSX.Element | null;
823
+
824
+ export declare interface PatientSummaryProps extends Omit<CardProps, 'children'> {
825
+ readonly patient: Patient | Reference<Patient>;
826
+ readonly background?: string;
827
+ }
828
+
829
829
  export declare function PatientTimeline(props: PatientTimelineProps): JSX.Element;
830
830
 
831
831
  export declare interface PatientTimelineProps {
@@ -1444,4 +1444,11 @@ export declare function useSearchOne<K extends ResourceType>(resourceType: K, qu
1444
1444
  */
1445
1445
  export declare function useSearchResources<K extends ResourceType>(resourceType: K, query?: QueryTypes): [ResourceArray<ExtractResource<K>> | undefined, boolean, OperationOutcome | undefined];
1446
1446
 
1447
+ declare interface ValueSetAutocompleteProps extends Omit<AsyncAutocompleteProps<ValueSetExpansionContains>, 'loadOptions' | 'toKey' | 'toOption'> {
1448
+ binding: string | undefined;
1449
+ creatable?: boolean;
1450
+ clearable?: boolean;
1451
+ expandParams?: Partial<ValueSetExpandParams>;
1452
+ }
1453
+
1447
1454
  export { }
@@ -7,6 +7,7 @@ import { Attachment } from '@medplum/fhirtypes';
7
7
  import { AvatarProps } from '@mantine/core';
8
8
  import { BaseLoginRequest } from '@medplum/core';
9
9
  import { Bundle } from '@medplum/fhirtypes';
10
+ import { CardProps } from '@mantine/core';
10
11
  import { ClientApplication } from '@medplum/fhirtypes';
11
12
  import { CodeableConcept } from '@medplum/fhirtypes';
12
13
  import { Coding } from '@medplum/fhirtypes';
@@ -72,6 +73,8 @@ import { TextProps } from '@mantine/core';
72
73
  import { Timing } from '@medplum/fhirtypes';
73
74
  import { TypedValue } from '@medplum/core';
74
75
  import { UserConfiguration } from '@medplum/fhirtypes';
76
+ import { ValueSetExpandParams } from '@medplum/core';
77
+ import { ValueSetExpansionContains } from '@medplum/fhirtypes';
75
78
 
76
79
  /**
77
80
  * Adds a filter for a date between two dates (inclusive of both dates).
@@ -337,26 +340,16 @@ export declare interface CodeableConceptDisplayProps {
337
340
 
338
341
  export declare function CodeableConceptInput(props: CodeableConceptInputProps): JSX.Element;
339
342
 
340
- export declare interface CodeableConceptInputProps {
341
- binding: string | undefined;
342
- name: string;
343
- placeholder?: string;
343
+ export declare interface CodeableConceptInputProps extends Omit<ValueSetAutocompleteProps, 'defaultValue' | 'onChange'> {
344
344
  defaultValue?: CodeableConcept;
345
345
  onChange?: (value: CodeableConcept | undefined) => void;
346
346
  }
347
347
 
348
348
  export declare function CodeInput(props: CodeInputProps): JSX.Element;
349
349
 
350
- export declare interface CodeInputProps {
351
- binding: string | undefined;
352
- name: string;
353
- placeholder?: string;
350
+ export declare interface CodeInputProps extends Omit<ValueSetAutocompleteProps, 'defaultValue' | 'onChange'> {
354
351
  defaultValue?: string;
355
352
  onChange?: (value: string | undefined) => void;
356
- creatable?: boolean;
357
- maxSelectedValues?: number;
358
- clearSearchOnChange?: boolean;
359
- clearable?: boolean;
360
353
  }
361
354
 
362
355
  export declare function CodingDisplay(props: CodingDisplayProps): JSX.Element;
@@ -367,10 +360,7 @@ export declare interface CodingDisplayProps {
367
360
 
368
361
  export declare function CodingInput(props: CodingInputProps): JSX.Element;
369
362
 
370
- export declare interface CodingInputProps {
371
- binding: string | undefined;
372
- name: string;
373
- placeholder?: string;
363
+ export declare interface CodingInputProps extends Omit<ValueSetAutocompleteProps, 'defaultValue' | 'onChange'> {
374
364
  defaultValue?: Coding;
375
365
  onChange?: (value: Coding | undefined) => void;
376
366
  }
@@ -524,7 +514,9 @@ export declare interface EncounterTimelineProps {
524
514
  export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
525
515
  state: ErrorBoundaryState;
526
516
  constructor(props: ErrorBoundaryProps);
527
- static getDerivedStateFromError(error: any): ErrorBoundaryState;
517
+ static getDerivedStateFromError(error: Error): ErrorBoundaryState;
518
+ componentDidUpdate(_prevProps: Readonly<ErrorBoundaryProps>, _prevState: Readonly<ErrorBoundaryState>): void;
519
+ shouldComponentUpdate(nextProps: Readonly<ErrorBoundaryProps>, nextState: Readonly<ErrorBoundaryState>): boolean;
528
520
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
529
521
  render(): ReactNode;
530
522
  }
@@ -534,7 +526,8 @@ export declare interface ErrorBoundaryProps {
534
526
  }
535
527
 
536
528
  export declare interface ErrorBoundaryState {
537
- error?: any;
529
+ error?: Error;
530
+ lastLocation: string;
538
531
  }
539
532
 
540
533
  /**
@@ -826,6 +819,13 @@ export declare interface PanelStylesParams {
826
819
  */
827
820
  export declare function parseForm(form: HTMLFormElement): Record<string, string>;
828
821
 
822
+ export declare function PatientSummary(props: PatientSummaryProps): JSX.Element | null;
823
+
824
+ export declare interface PatientSummaryProps extends Omit<CardProps, 'children'> {
825
+ readonly patient: Patient | Reference<Patient>;
826
+ readonly background?: string;
827
+ }
828
+
829
829
  export declare function PatientTimeline(props: PatientTimelineProps): JSX.Element;
830
830
 
831
831
  export declare interface PatientTimelineProps {
@@ -1444,4 +1444,11 @@ export declare function useSearchOne<K extends ResourceType>(resourceType: K, qu
1444
1444
  */
1445
1445
  export declare function useSearchResources<K extends ResourceType>(resourceType: K, query?: QueryTypes): [ResourceArray<ExtractResource<K>> | undefined, boolean, OperationOutcome | undefined];
1446
1446
 
1447
+ declare interface ValueSetAutocompleteProps extends Omit<AsyncAutocompleteProps<ValueSetExpansionContains>, 'loadOptions' | 'toKey' | 'toOption'> {
1448
+ binding: string | undefined;
1449
+ creatable?: boolean;
1450
+ clearable?: boolean;
1451
+ expandParams?: Partial<ValueSetExpandParams>;
1452
+ }
1453
+
1447
1454
  export { }