@medplum/react 2.0.23 → 2.0.25
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 +11 -7713
- package/dist/cjs/index.cjs.map +7 -1
- package/dist/esm/index.mjs +67 -92
- package/dist/esm/index.mjs.map +7 -1
- package/package.json +18 -21
- package/dist/cjs/index.min.cjs +0 -1
- package/dist/esm/AddressDisplay/AddressDisplay.mjs +0 -13
- package/dist/esm/AddressDisplay/AddressDisplay.mjs.map +0 -1
- package/dist/esm/AddressInput/AddressInput.mjs +0 -57
- package/dist/esm/AddressInput/AddressInput.mjs.map +0 -1
- package/dist/esm/AnnotationInput/AnnotationInput.mjs +0 -28
- package/dist/esm/AnnotationInput/AnnotationInput.mjs.map +0 -1
- package/dist/esm/AppShell/AppShell.mjs +0 -37
- package/dist/esm/AppShell/AppShell.mjs.map +0 -1
- package/dist/esm/AppShell/Header.mjs +0 -88
- package/dist/esm/AppShell/Header.mjs.map +0 -1
- package/dist/esm/AppShell/HeaderSearchInput.mjs +0 -230
- package/dist/esm/AppShell/HeaderSearchInput.mjs.map +0 -1
- package/dist/esm/AppShell/Navbar.mjs +0 -169
- package/dist/esm/AppShell/Navbar.mjs.map +0 -1
- package/dist/esm/AsyncAutocomplete/AsyncAutocomplete.mjs +0 -115
- package/dist/esm/AsyncAutocomplete/AsyncAutocomplete.mjs.map +0 -1
- package/dist/esm/AttachmentArrayDisplay/AttachmentArrayDisplay.mjs +0 -11
- package/dist/esm/AttachmentArrayDisplay/AttachmentArrayDisplay.mjs.map +0 -1
- package/dist/esm/AttachmentArrayInput/AttachmentArrayInput.mjs +0 -45
- package/dist/esm/AttachmentArrayInput/AttachmentArrayInput.mjs.map +0 -1
- package/dist/esm/AttachmentButton/AttachmentButton.mjs +0 -55
- package/dist/esm/AttachmentButton/AttachmentButton.mjs.map +0 -1
- package/dist/esm/AttachmentDisplay/AttachmentDisplay.mjs +0 -21
- package/dist/esm/AttachmentDisplay/AttachmentDisplay.mjs.map +0 -1
- package/dist/esm/AttachmentInput/AttachmentInput.mjs +0 -27
- package/dist/esm/AttachmentInput/AttachmentInput.mjs.map +0 -1
- package/dist/esm/BackboneElementDisplay/BackboneElementDisplay.mjs +0 -49
- package/dist/esm/BackboneElementDisplay/BackboneElementDisplay.mjs.map +0 -1
- package/dist/esm/BackboneElementInput/BackboneElementInput.mjs +0 -52
- package/dist/esm/BackboneElementInput/BackboneElementInput.mjs.map +0 -1
- package/dist/esm/BookmarkDialog/BookmarkDialog.mjs +0 -47
- package/dist/esm/BookmarkDialog/BookmarkDialog.mjs.map +0 -1
- package/dist/esm/CalendarInput/CalendarInput.mjs +0 -133
- package/dist/esm/CalendarInput/CalendarInput.mjs.map +0 -1
- package/dist/esm/CheckboxFormSection/CheckboxFormSection.mjs +0 -12
- package/dist/esm/CheckboxFormSection/CheckboxFormSection.mjs.map +0 -1
- package/dist/esm/CodeInput/CodeInput.mjs +0 -24
- package/dist/esm/CodeInput/CodeInput.mjs.map +0 -1
- package/dist/esm/CodeableConceptDisplay/CodeableConceptDisplay.mjs +0 -9
- package/dist/esm/CodeableConceptDisplay/CodeableConceptDisplay.mjs.map +0 -1
- package/dist/esm/CodeableConceptInput/CodeableConceptInput.mjs +0 -36
- package/dist/esm/CodeableConceptInput/CodeableConceptInput.mjs.map +0 -1
- package/dist/esm/CodingDisplay/CodingDisplay.mjs +0 -9
- package/dist/esm/CodingDisplay/CodingDisplay.mjs.map +0 -1
- package/dist/esm/CodingInput/CodingInput.mjs +0 -32
- package/dist/esm/CodingInput/CodingInput.mjs.map +0 -1
- package/dist/esm/ContactDetailDisplay/ContactDetailDisplay.mjs +0 -16
- package/dist/esm/ContactDetailDisplay/ContactDetailDisplay.mjs.map +0 -1
- package/dist/esm/ContactDetailInput/ContactDetailInput.mjs +0 -35
- package/dist/esm/ContactDetailInput/ContactDetailInput.mjs.map +0 -1
- package/dist/esm/ContactPointDisplay/ContactPointDisplay.mjs +0 -29
- package/dist/esm/ContactPointDisplay/ContactPointDisplay.mjs.map +0 -1
- package/dist/esm/ContactPointInput/ContactPointInput.mjs +0 -45
- package/dist/esm/ContactPointInput/ContactPointInput.mjs.map +0 -1
- package/dist/esm/Container/Container.mjs +0 -19
- package/dist/esm/Container/Container.mjs.map +0 -1
- package/dist/esm/DateTimeInput/DateTimeInput.mjs +0 -71
- package/dist/esm/DateTimeInput/DateTimeInput.mjs.map +0 -1
- package/dist/esm/DefaultResourceTimeline/DefaultResourceTimeline.mjs +0 -16
- package/dist/esm/DefaultResourceTimeline/DefaultResourceTimeline.mjs.map +0 -1
- package/dist/esm/DescriptionList/DescriptionList.mjs +0 -35
- package/dist/esm/DescriptionList/DescriptionList.mjs.map +0 -1
- package/dist/esm/DiagnosticReportDisplay/DiagnosticReportDisplay.mjs +0 -174
- package/dist/esm/DiagnosticReportDisplay/DiagnosticReportDisplay.mjs.map +0 -1
- package/dist/esm/Document/Document.mjs +0 -12
- package/dist/esm/Document/Document.mjs.map +0 -1
- package/dist/esm/EncounterTimeline/EncounterTimeline.mjs +0 -32
- package/dist/esm/EncounterTimeline/EncounterTimeline.mjs.map +0 -1
- package/dist/esm/ErrorBoundary/ErrorBoundary.mjs +0 -30
- package/dist/esm/ErrorBoundary/ErrorBoundary.mjs.map +0 -1
- package/dist/esm/ExtensionInput/ExtensionInput.mjs +0 -14
- package/dist/esm/ExtensionInput/ExtensionInput.mjs.map +0 -1
- package/dist/esm/FhirPathDisplay/FhirPathDisplay.mjs +0 -23
- package/dist/esm/FhirPathDisplay/FhirPathDisplay.mjs.map +0 -1
- package/dist/esm/FhirPathTable/FhirPathTable.mjs +0 -122
- package/dist/esm/FhirPathTable/FhirPathTable.mjs.map +0 -1
- package/dist/esm/Form/Form.mjs +0 -15
- package/dist/esm/Form/Form.mjs.map +0 -1
- package/dist/esm/Form/FormUtils.mjs +0 -50
- package/dist/esm/Form/FormUtils.mjs.map +0 -1
- package/dist/esm/FormSection/FormSection.mjs +0 -10
- package/dist/esm/FormSection/FormSection.mjs.map +0 -1
- package/dist/esm/GoogleButton/GoogleButton.mjs +0 -49
- package/dist/esm/GoogleButton/GoogleButton.mjs.map +0 -1
- package/dist/esm/HumanNameDisplay/HumanNameDisplay.mjs +0 -13
- package/dist/esm/HumanNameDisplay/HumanNameDisplay.mjs.map +0 -1
- package/dist/esm/HumanNameInput/HumanNameInput.mjs +0 -50
- package/dist/esm/HumanNameInput/HumanNameInput.mjs.map +0 -1
- package/dist/esm/IdentifierDisplay/IdentifierDisplay.mjs +0 -11
- package/dist/esm/IdentifierDisplay/IdentifierDisplay.mjs.map +0 -1
- package/dist/esm/IdentifierInput/IdentifierInput.mjs +0 -18
- package/dist/esm/IdentifierInput/IdentifierInput.mjs.map +0 -1
- package/dist/esm/Loading/Loading.mjs +0 -10
- package/dist/esm/Loading/Loading.mjs.map +0 -1
- package/dist/esm/Logo/Logo.mjs +0 -14
- package/dist/esm/Logo/Logo.mjs.map +0 -1
- package/dist/esm/MedplumLink/MedplumLink.mjs +0 -52
- package/dist/esm/MedplumLink/MedplumLink.mjs.map +0 -1
- package/dist/esm/MedplumProvider/MedplumProvider.mjs +0 -84
- package/dist/esm/MedplumProvider/MedplumProvider.mjs.map +0 -1
- package/dist/esm/MoneyDisplay/MoneyDisplay.mjs +0 -9
- package/dist/esm/MoneyDisplay/MoneyDisplay.mjs.map +0 -1
- package/dist/esm/MoneyInput/MoneyInput.mjs +0 -53
- package/dist/esm/MoneyInput/MoneyInput.mjs.map +0 -1
- package/dist/esm/NoteDisplay/NoteDisplay.mjs +0 -18
- package/dist/esm/NoteDisplay/NoteDisplay.mjs.map +0 -1
- package/dist/esm/OperationOutcomeAlert/OperationOutcomeAlert.mjs +0 -14
- package/dist/esm/OperationOutcomeAlert/OperationOutcomeAlert.mjs.map +0 -1
- package/dist/esm/Panel/Panel.mjs +0 -34
- package/dist/esm/Panel/Panel.mjs.map +0 -1
- package/dist/esm/PatientTimeline/PatientTimeline.mjs +0 -38
- package/dist/esm/PatientTimeline/PatientTimeline.mjs.map +0 -1
- package/dist/esm/PeriodInput/PeriodInput.mjs +0 -19
- package/dist/esm/PeriodInput/PeriodInput.mjs.map +0 -1
- package/dist/esm/PlanDefinitionBuilder/PlanDefinitionBuilder.mjs +0 -258
- package/dist/esm/PlanDefinitionBuilder/PlanDefinitionBuilder.mjs.map +0 -1
- package/dist/esm/QuantityDisplay/QuantityDisplay.mjs +0 -9
- package/dist/esm/QuantityDisplay/QuantityDisplay.mjs.map +0 -1
- package/dist/esm/QuantityInput/QuantityInput.mjs +0 -40
- package/dist/esm/QuantityInput/QuantityInput.mjs.map +0 -1
- package/dist/esm/QuestionnaireBuilder/QuestionnaireBuilder.mjs +0 -289
- package/dist/esm/QuestionnaireBuilder/QuestionnaireBuilder.mjs.map +0 -1
- package/dist/esm/QuestionnaireForm/QuestionnaireForm.mjs +0 -275
- package/dist/esm/QuestionnaireForm/QuestionnaireForm.mjs.map +0 -1
- package/dist/esm/RangeDisplay/RangeDisplay.mjs +0 -9
- package/dist/esm/RangeDisplay/RangeDisplay.mjs.map +0 -1
- package/dist/esm/RangeInput/RangeInput.mjs +0 -31
- package/dist/esm/RangeInput/RangeInput.mjs.map +0 -1
- package/dist/esm/RatioDisplay/RatioDisplay.mjs +0 -16
- package/dist/esm/RatioDisplay/RatioDisplay.mjs.map +0 -1
- package/dist/esm/RatioInput/RatioInput.mjs +0 -31
- package/dist/esm/RatioInput/RatioInput.mjs.map +0 -1
- package/dist/esm/ReferenceDisplay/ReferenceDisplay.mjs +0 -21
- package/dist/esm/ReferenceDisplay/ReferenceDisplay.mjs.map +0 -1
- package/dist/esm/ReferenceInput/ReferenceInput.mjs +0 -45
- package/dist/esm/ReferenceInput/ReferenceInput.mjs.map +0 -1
- package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.mjs +0 -286
- package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.mjs.map +0 -1
- package/dist/esm/RequestGroupDisplay/RequestGroupDisplay.mjs +0 -72
- package/dist/esm/RequestGroupDisplay/RequestGroupDisplay.mjs.map +0 -1
- package/dist/esm/ResourceArrayDisplay/ResourceArrayDisplay.mjs +0 -13
- package/dist/esm/ResourceArrayDisplay/ResourceArrayDisplay.mjs.map +0 -1
- package/dist/esm/ResourceArrayInput/ResourceArrayInput.mjs +0 -51
- package/dist/esm/ResourceArrayInput/ResourceArrayInput.mjs.map +0 -1
- package/dist/esm/ResourceAvatar/ResourceAvatar.mjs +0 -23
- package/dist/esm/ResourceAvatar/ResourceAvatar.mjs.map +0 -1
- package/dist/esm/ResourceBadge/ResourceBadge.mjs +0 -13
- package/dist/esm/ResourceBadge/ResourceBadge.mjs.map +0 -1
- package/dist/esm/ResourceBlame/ResourceBlame.mjs +0 -113
- package/dist/esm/ResourceBlame/ResourceBlame.mjs.map +0 -1
- package/dist/esm/ResourceDiff/ResourceDiff.mjs +0 -39
- package/dist/esm/ResourceDiff/ResourceDiff.mjs.map +0 -1
- package/dist/esm/ResourceDiffTable/ResourceDiffTable.mjs +0 -80
- package/dist/esm/ResourceDiffTable/ResourceDiffTable.mjs.map +0 -1
- package/dist/esm/ResourceForm/ResourceForm.mjs +0 -56
- package/dist/esm/ResourceForm/ResourceForm.mjs.map +0 -1
- package/dist/esm/ResourceHistoryTable/ResourceHistoryTable.mjs +0 -50
- package/dist/esm/ResourceHistoryTable/ResourceHistoryTable.mjs.map +0 -1
- package/dist/esm/ResourceInput/ResourceInput.mjs +0 -70
- package/dist/esm/ResourceInput/ResourceInput.mjs.map +0 -1
- package/dist/esm/ResourceName/ResourceName.mjs +0 -25
- package/dist/esm/ResourceName/ResourceName.mjs.map +0 -1
- package/dist/esm/ResourcePropertyDisplay/ResourcePropertyDisplay.mjs +0 -119
- package/dist/esm/ResourcePropertyDisplay/ResourcePropertyDisplay.mjs.map +0 -1
- package/dist/esm/ResourcePropertyInput/ResourcePropertyInput.mjs +0 -171
- package/dist/esm/ResourcePropertyInput/ResourcePropertyInput.mjs.map +0 -1
- package/dist/esm/ResourceTable/ResourceTable.mjs +0 -25
- package/dist/esm/ResourceTable/ResourceTable.mjs.map +0 -1
- package/dist/esm/ResourceTimeline/ResourceTimeline.mjs +0 -309
- package/dist/esm/ResourceTimeline/ResourceTimeline.mjs.map +0 -1
- package/dist/esm/Scheduler/Scheduler.mjs +0 -98
- package/dist/esm/Scheduler/Scheduler.mjs.map +0 -1
- package/dist/esm/SearchControl/SearchControl.mjs +0 -337
- package/dist/esm/SearchControl/SearchControl.mjs.map +0 -1
- package/dist/esm/SearchControl/SearchControlField.mjs +0 -95
- package/dist/esm/SearchControl/SearchControlField.mjs.map +0 -1
- package/dist/esm/SearchControl/SearchUtils.mjs +0 -497
- package/dist/esm/SearchControl/SearchUtils.mjs.map +0 -1
- package/dist/esm/SearchExportDialog/SearchExportDialog.mjs +0 -19
- package/dist/esm/SearchExportDialog/SearchExportDialog.mjs.map +0 -1
- package/dist/esm/SearchFieldEditor/SearchFieldEditor.mjs +0 -196
- package/dist/esm/SearchFieldEditor/SearchFieldEditor.mjs.map +0 -1
- package/dist/esm/SearchFilterEditor/SearchFilterEditor.mjs +0 -97
- package/dist/esm/SearchFilterEditor/SearchFilterEditor.mjs.map +0 -1
- package/dist/esm/SearchFilterValueDialog/SearchFilterValueDialog.mjs +0 -22
- package/dist/esm/SearchFilterValueDialog/SearchFilterValueDialog.mjs.map +0 -1
- package/dist/esm/SearchFilterValueDisplay/SearchFilterValueDisplay.mjs +0 -22
- package/dist/esm/SearchFilterValueDisplay/SearchFilterValueDisplay.mjs.map +0 -1
- package/dist/esm/SearchFilterValueInput/SearchFilterValueInput.mjs +0 -57
- package/dist/esm/SearchFilterValueInput/SearchFilterValueInput.mjs.map +0 -1
- package/dist/esm/SearchPopupMenu/SearchPopupMenu.mjs +0 -134
- package/dist/esm/SearchPopupMenu/SearchPopupMenu.mjs.map +0 -1
- package/dist/esm/ServiceRequestTimeline/ServiceRequestTimeline.mjs +0 -36
- package/dist/esm/ServiceRequestTimeline/ServiceRequestTimeline.mjs.map +0 -1
- package/dist/esm/StatusBadge/StatusBadge.mjs +0 -63
- package/dist/esm/StatusBadge/StatusBadge.mjs.map +0 -1
- package/dist/esm/Timeline/Timeline.mjs +0 -40
- package/dist/esm/Timeline/Timeline.mjs.map +0 -1
- package/dist/esm/TimingInput/TimingInput.mjs +0 -76
- package/dist/esm/TimingInput/TimingInput.mjs.map +0 -1
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs +0 -58
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs.map +0 -1
- package/dist/esm/auth/AuthenticationForm.mjs +0 -89
- package/dist/esm/auth/AuthenticationForm.mjs.map +0 -1
- package/dist/esm/auth/ChooseProfileForm.mjs +0 -33
- package/dist/esm/auth/ChooseProfileForm.mjs.map +0 -1
- package/dist/esm/auth/ChooseScopeForm.mjs +0 -28
- package/dist/esm/auth/ChooseScopeForm.mjs.map +0 -1
- package/dist/esm/auth/MfaForm.mjs +0 -34
- package/dist/esm/auth/MfaForm.mjs.map +0 -1
- package/dist/esm/auth/NewProjectForm.mjs +0 -39
- package/dist/esm/auth/NewProjectForm.mjs.map +0 -1
- package/dist/esm/auth/NewUserForm.mjs +0 -84
- package/dist/esm/auth/NewUserForm.mjs.map +0 -1
- package/dist/esm/auth/RegisterForm.mjs +0 -39
- package/dist/esm/auth/RegisterForm.mjs.map +0 -1
- package/dist/esm/auth/SignInForm.mjs +0 -100
- package/dist/esm/auth/SignInForm.mjs.map +0 -1
- package/dist/esm/constants.mjs +0 -12
- package/dist/esm/constants.mjs.map +0 -1
- package/dist/esm/index.min.mjs +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs +0 -70
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs +0 -18
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs +0 -25
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs +0 -15
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs +0 -19
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs +0 -20
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs +0 -26
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs +0 -17
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs +0 -20
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs +0 -27
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs +0 -24
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs +0 -13
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs +0 -20
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs +0 -13
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs +0 -14
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs +0 -15
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs +0 -21
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs +0 -20
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs +0 -20
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs +0 -15
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs +0 -27
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs +0 -14
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs +0 -15
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs +0 -22
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs +0 -22
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs +0 -19
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs +0 -30
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconLogout.mjs +0 -21
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconLogout.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs +0 -13
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs +0 -13
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs +0 -21
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs +0 -21
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs +0 -22
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.mjs +0 -14
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs +0 -14
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs +0 -20
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs +0 -17
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs +0 -17
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs +0 -19
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSwitchHorizontal.mjs +0 -20
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSwitchHorizontal.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs +0 -23
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs +0 -20
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs.map +0 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs +0 -14
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs.map +0 -1
- package/dist/esm/useResource/useResource.mjs +0 -68
- package/dist/esm/useResource/useResource.mjs.map +0 -1
- package/dist/esm/utils/blame.mjs +0 -72
- package/dist/esm/utils/blame.mjs.map +0 -1
- package/dist/esm/utils/date.mjs +0 -56
- package/dist/esm/utils/date.mjs.map +0 -1
- package/dist/esm/utils/diff.mjs +0 -118
- package/dist/esm/utils/diff.mjs.map +0 -1
- package/dist/esm/utils/dom.mjs +0 -34
- package/dist/esm/utils/dom.mjs.map +0 -1
- package/dist/esm/utils/outcomes.mjs +0 -30
- package/dist/esm/utils/outcomes.mjs.map +0 -1
- package/dist/esm/utils/questionnaire.mjs +0 -26
- package/dist/esm/utils/questionnaire.mjs.map +0 -1
- package/dist/esm/utils/recaptcha.mjs +0 -32
- package/dist/esm/utils/recaptcha.mjs.map +0 -1
- package/dist/esm/utils/script.mjs +0 -16
- package/dist/esm/utils/script.mjs.map +0 -1
|
@@ -1,497 +0,0 @@
|
|
|
1
|
-
import { Operator, DEFAULT_SEARCH_COUNT, capitalize, formatDateTime, evalFhirPathTyped } from '@medplum/core';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { getValueAndType, ResourcePropertyDisplay } from '../ResourcePropertyDisplay/ResourcePropertyDisplay.mjs';
|
|
4
|
-
|
|
5
|
-
const searchParamToOperators = {
|
|
6
|
-
string: [Operator.EQUALS, Operator.NOT, Operator.CONTAINS, Operator.EXACT],
|
|
7
|
-
fulltext: [Operator.EQUALS, Operator.NOT, Operator.CONTAINS, Operator.EXACT],
|
|
8
|
-
token: [Operator.EQUALS, Operator.NOT],
|
|
9
|
-
reference: [Operator.EQUALS, Operator.NOT],
|
|
10
|
-
numeric: [
|
|
11
|
-
Operator.EQUALS,
|
|
12
|
-
Operator.NOT_EQUALS,
|
|
13
|
-
Operator.GREATER_THAN,
|
|
14
|
-
Operator.LESS_THAN,
|
|
15
|
-
Operator.GREATER_THAN_OR_EQUALS,
|
|
16
|
-
Operator.LESS_THAN_OR_EQUALS,
|
|
17
|
-
],
|
|
18
|
-
quantity: [
|
|
19
|
-
Operator.EQUALS,
|
|
20
|
-
Operator.NOT_EQUALS,
|
|
21
|
-
Operator.GREATER_THAN,
|
|
22
|
-
Operator.LESS_THAN,
|
|
23
|
-
Operator.GREATER_THAN_OR_EQUALS,
|
|
24
|
-
Operator.LESS_THAN_OR_EQUALS,
|
|
25
|
-
],
|
|
26
|
-
date: [
|
|
27
|
-
Operator.EQUALS,
|
|
28
|
-
Operator.NOT_EQUALS,
|
|
29
|
-
Operator.GREATER_THAN,
|
|
30
|
-
Operator.LESS_THAN,
|
|
31
|
-
Operator.GREATER_THAN_OR_EQUALS,
|
|
32
|
-
Operator.LESS_THAN_OR_EQUALS,
|
|
33
|
-
Operator.STARTS_AFTER,
|
|
34
|
-
Operator.ENDS_BEFORE,
|
|
35
|
-
Operator.APPROXIMATELY,
|
|
36
|
-
],
|
|
37
|
-
datetime: [
|
|
38
|
-
Operator.EQUALS,
|
|
39
|
-
Operator.NOT_EQUALS,
|
|
40
|
-
Operator.GREATER_THAN,
|
|
41
|
-
Operator.LESS_THAN,
|
|
42
|
-
Operator.GREATER_THAN_OR_EQUALS,
|
|
43
|
-
Operator.LESS_THAN_OR_EQUALS,
|
|
44
|
-
Operator.STARTS_AFTER,
|
|
45
|
-
Operator.ENDS_BEFORE,
|
|
46
|
-
Operator.APPROXIMATELY,
|
|
47
|
-
],
|
|
48
|
-
};
|
|
49
|
-
const operatorNames = {
|
|
50
|
-
eq: 'equals',
|
|
51
|
-
ne: 'not equals',
|
|
52
|
-
gt: 'greater than',
|
|
53
|
-
lt: 'less than',
|
|
54
|
-
ge: 'greater than or equals',
|
|
55
|
-
le: 'less than or equals',
|
|
56
|
-
sa: 'starts after',
|
|
57
|
-
eb: 'ends before',
|
|
58
|
-
ap: 'approximately',
|
|
59
|
-
contains: 'contains',
|
|
60
|
-
exact: 'exact',
|
|
61
|
-
text: 'text',
|
|
62
|
-
not: 'not',
|
|
63
|
-
above: 'above',
|
|
64
|
-
below: 'below',
|
|
65
|
-
in: 'in',
|
|
66
|
-
'not-in': 'not in',
|
|
67
|
-
'of-type': 'of type',
|
|
68
|
-
missing: 'missing',
|
|
69
|
-
identifier: 'identifier',
|
|
70
|
-
iterate: 'iterate',
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Sets the array of filters.
|
|
74
|
-
* @param definition The original search request.
|
|
75
|
-
* @param filters The new filters.
|
|
76
|
-
* @returns The updated search request.
|
|
77
|
-
*/
|
|
78
|
-
function setFilters(definition, filters) {
|
|
79
|
-
return {
|
|
80
|
-
...definition,
|
|
81
|
-
filters: filters,
|
|
82
|
-
offset: 0,
|
|
83
|
-
name: undefined,
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Clears all of the filters.
|
|
88
|
-
* @param definition The original search request.
|
|
89
|
-
* @returns The updated search request.
|
|
90
|
-
*/
|
|
91
|
-
function clearFilters(definition) {
|
|
92
|
-
return setFilters(definition, []);
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Clears all of the filters on a certain field.
|
|
96
|
-
* @param definition The original search request.
|
|
97
|
-
* @param code The field key name to clear filters.
|
|
98
|
-
* @returns The updated search request.
|
|
99
|
-
*/
|
|
100
|
-
function clearFiltersOnField(definition, code) {
|
|
101
|
-
return setFilters(definition, (definition.filters || []).filter((f) => f.code !== code));
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Adds a filter.
|
|
105
|
-
* @param definition The original search request.
|
|
106
|
-
* @param field The field key name.
|
|
107
|
-
* @param op The operation key name.
|
|
108
|
-
* @param value The filter value.
|
|
109
|
-
* @param opt_clear Optional flag to clear filters on the field.
|
|
110
|
-
* @returns The updated search request.
|
|
111
|
-
*/
|
|
112
|
-
function addFilter(definition, field, op, value, opt_clear) {
|
|
113
|
-
if (opt_clear) {
|
|
114
|
-
definition = clearFiltersOnField(definition, field);
|
|
115
|
-
}
|
|
116
|
-
const nextFilters = [];
|
|
117
|
-
if (definition.filters) {
|
|
118
|
-
nextFilters.push(...definition.filters);
|
|
119
|
-
}
|
|
120
|
-
nextFilters.push({ code: field, operator: op, value: value || '' });
|
|
121
|
-
return setFilters(definition, nextFilters);
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Adds a field.
|
|
125
|
-
* @param definition The original search request.
|
|
126
|
-
* @param field The field key name.
|
|
127
|
-
* @returns The updated search request.
|
|
128
|
-
*/
|
|
129
|
-
function addField(definition, field) {
|
|
130
|
-
if (definition.fields && definition.fields.includes(field)) {
|
|
131
|
-
return definition;
|
|
132
|
-
}
|
|
133
|
-
const newFields = [];
|
|
134
|
-
if (definition.fields) {
|
|
135
|
-
newFields.push(...definition.fields);
|
|
136
|
-
}
|
|
137
|
-
newFields.push(field);
|
|
138
|
-
return {
|
|
139
|
-
...definition,
|
|
140
|
-
fields: newFields,
|
|
141
|
-
name: undefined,
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Deletes a filter at the specified index.
|
|
146
|
-
* @param definition The original search request.
|
|
147
|
-
* @param index The filter index.
|
|
148
|
-
* @returns The updated search request.
|
|
149
|
-
*/
|
|
150
|
-
function deleteFilter(definition, index) {
|
|
151
|
-
if (!definition.filters) {
|
|
152
|
-
return definition;
|
|
153
|
-
}
|
|
154
|
-
const newFilters = [...definition.filters];
|
|
155
|
-
newFilters.splice(index, 1);
|
|
156
|
-
return {
|
|
157
|
-
...definition,
|
|
158
|
-
filters: newFilters,
|
|
159
|
-
name: undefined,
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Adds a filter that constrains the specified field to "yesterday".
|
|
164
|
-
* @param definition The original search request.
|
|
165
|
-
* @param field The field key name.
|
|
166
|
-
* @returns The updated search request.
|
|
167
|
-
*/
|
|
168
|
-
function addYesterdayFilter(definition, field) {
|
|
169
|
-
return addDayFilter(definition, field, -1);
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Adds a filter that constrains the specified field to "today".
|
|
173
|
-
* @param definition The original search request.
|
|
174
|
-
* @param field The field key name.
|
|
175
|
-
* @returns The updated search request.
|
|
176
|
-
*/
|
|
177
|
-
function addTodayFilter(definition, field) {
|
|
178
|
-
return addDayFilter(definition, field, 0);
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Adds a filter that constrains the specified field to "tomorrow".
|
|
182
|
-
* @param definition The original search request.
|
|
183
|
-
* @param field The field key name.
|
|
184
|
-
* @returns The updated search request.
|
|
185
|
-
*/
|
|
186
|
-
function addTomorrowFilter(definition, field) {
|
|
187
|
-
return addDayFilter(definition, field, 1);
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Adds a filter that constrains the specified field to a day.
|
|
191
|
-
* The day is specified as a delta from the current day.
|
|
192
|
-
* "Today" would be 0.
|
|
193
|
-
* "Yesterday" would be -1.
|
|
194
|
-
* "Tomorrow" would be 1.
|
|
195
|
-
* @param definition The original search request.
|
|
196
|
-
* @param field The field key name.
|
|
197
|
-
* @param delta The number of days from this day.
|
|
198
|
-
* @returns The updated search request.
|
|
199
|
-
*/
|
|
200
|
-
function addDayFilter(definition, field, delta) {
|
|
201
|
-
const startTime = new Date();
|
|
202
|
-
startTime.setDate(startTime.getDate() + delta);
|
|
203
|
-
startTime.setHours(0, 0, 0, 0);
|
|
204
|
-
const endTime = new Date(startTime.getTime());
|
|
205
|
-
endTime.setDate(endTime.getDate() + 1);
|
|
206
|
-
endTime.setTime(endTime.getTime() - 1);
|
|
207
|
-
return addDateFilterBetween(definition, field, startTime, endTime);
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Adds a filter that constrains the specified field to "last month".
|
|
211
|
-
* @param definition The original search request.
|
|
212
|
-
* @param field The field key name.
|
|
213
|
-
* @returns The updated search request.
|
|
214
|
-
*/
|
|
215
|
-
function addLastMonthFilter(definition, field) {
|
|
216
|
-
return addMonthFilter(definition, field, -1);
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Adds a filter that constrains the specified field to "this month".
|
|
220
|
-
* @param definition The original search request.
|
|
221
|
-
* @param field The field key name.
|
|
222
|
-
* @returns The updated search request.
|
|
223
|
-
*/
|
|
224
|
-
function addThisMonthFilter(definition, field) {
|
|
225
|
-
return addMonthFilter(definition, field, 0);
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Adds a filter that constrains the specified field to "next month".
|
|
229
|
-
* @param definition The original search request.
|
|
230
|
-
* @param field The field key name.
|
|
231
|
-
* @returns The updated search request.
|
|
232
|
-
*/
|
|
233
|
-
function addNextMonthFilter(definition, field) {
|
|
234
|
-
return addMonthFilter(definition, field, 1);
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* Adds a filter that constrains the specified field to a month.
|
|
238
|
-
* The month is specified as a delta from the current month.
|
|
239
|
-
* "This month" would be 0.
|
|
240
|
-
* "Last month" would be -1.
|
|
241
|
-
* "Next month" would be 1.
|
|
242
|
-
* @param definition The original search request.
|
|
243
|
-
* @param field The field key name.
|
|
244
|
-
* @param delta The number of months from this month.
|
|
245
|
-
* @returns The updated search request.
|
|
246
|
-
*/
|
|
247
|
-
function addMonthFilter(definition, field, delta) {
|
|
248
|
-
const startTime = new Date();
|
|
249
|
-
startTime.setMonth(startTime.getMonth() + delta);
|
|
250
|
-
startTime.setDate(1);
|
|
251
|
-
startTime.setHours(0, 0, 0, 0);
|
|
252
|
-
const endTime = new Date(startTime.getTime());
|
|
253
|
-
endTime.setMonth(endTime.getMonth() + 1);
|
|
254
|
-
endTime.setDate(1);
|
|
255
|
-
endTime.setHours(0, 0, 0, 0);
|
|
256
|
-
endTime.setTime(endTime.getTime() - 1);
|
|
257
|
-
return addDateFilterBetween(definition, field, startTime, endTime);
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* Adds a filter that constrains the specified field to the year to date.
|
|
261
|
-
* @param definition The original search request.
|
|
262
|
-
* @param field The field key name.
|
|
263
|
-
* @returns The updated search request.
|
|
264
|
-
*/
|
|
265
|
-
function addYearToDateFilter(definition, field) {
|
|
266
|
-
const startTime = new Date();
|
|
267
|
-
startTime.setMonth(0);
|
|
268
|
-
startTime.setDate(1);
|
|
269
|
-
startTime.setHours(0, 0, 0, 0);
|
|
270
|
-
const endTime = new Date();
|
|
271
|
-
return addDateFilterBetween(definition, field, startTime, endTime);
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* Adds a filter for a date between two dates (inclusive of both dates).
|
|
275
|
-
* @param definition The original search request.
|
|
276
|
-
* @param field The field key name.
|
|
277
|
-
* @param d1 The start date.
|
|
278
|
-
* @param d2 The end date.
|
|
279
|
-
* @returns The updated search request.
|
|
280
|
-
*/
|
|
281
|
-
function addDateFilterBetween(definition, field, d1, d2) {
|
|
282
|
-
definition = clearFiltersOnField(definition, field);
|
|
283
|
-
definition = addDateFilterImpl(definition, field, Operator.GREATER_THAN_OR_EQUALS, d1);
|
|
284
|
-
definition = addDateFilterImpl(definition, field, Operator.LESS_THAN_OR_EQUALS, d2);
|
|
285
|
-
return definition;
|
|
286
|
-
}
|
|
287
|
-
/**
|
|
288
|
-
* Adds a filter for a date before a certain date/time.
|
|
289
|
-
* @param definition The original search request.
|
|
290
|
-
* @param field The field key name.
|
|
291
|
-
* @param op The date/time operation.
|
|
292
|
-
* @param value The date.
|
|
293
|
-
* @returns The updated search request.
|
|
294
|
-
*/
|
|
295
|
-
function addDateFilterImpl(definition, field, op, value) {
|
|
296
|
-
return addFilter(definition, field, op, value.toISOString());
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Adds a filter that constrains the specified field to "missing".
|
|
300
|
-
* @param definition The original search request.
|
|
301
|
-
* @param field The field key name.
|
|
302
|
-
* @param value Optional boolean value. Default is true.
|
|
303
|
-
* @returns The updated search request.
|
|
304
|
-
*/
|
|
305
|
-
function addMissingFilter(definition, field, value = true) {
|
|
306
|
-
return addFilter(definition, field, Operator.MISSING, value.toString());
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* Sets the offset (starting at zero).
|
|
310
|
-
* @param definition The original search request.
|
|
311
|
-
* @param offset The offset number.
|
|
312
|
-
* @returns The updated search request.
|
|
313
|
-
*/
|
|
314
|
-
function setOffset(definition, offset) {
|
|
315
|
-
if (definition.offset === offset) {
|
|
316
|
-
return definition;
|
|
317
|
-
}
|
|
318
|
-
return {
|
|
319
|
-
...definition,
|
|
320
|
-
offset,
|
|
321
|
-
name: undefined,
|
|
322
|
-
};
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Creates a new search request with the search offset at the specified page.
|
|
326
|
-
* @param definition The search definition.
|
|
327
|
-
* @param page The new page number
|
|
328
|
-
* @returns The new search definition.
|
|
329
|
-
*/
|
|
330
|
-
function setPage(definition, page) {
|
|
331
|
-
const count = definition.count ?? DEFAULT_SEARCH_COUNT;
|
|
332
|
-
const newOffset = (page - 1) * count;
|
|
333
|
-
return setOffset(definition, newOffset);
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* Sorts the search by the specified key, and optional direction.
|
|
337
|
-
* Direction defaults to ascending ('asc') if not specified.
|
|
338
|
-
* @param definition The original search request.
|
|
339
|
-
* @param sort The sort key.
|
|
340
|
-
* @param desc Optional descending flag. Default is false.
|
|
341
|
-
* @returns The updated search request.
|
|
342
|
-
*/
|
|
343
|
-
function setSort(definition, sort, desc) {
|
|
344
|
-
if (sort === getSortField(definition) && desc !== undefined && desc === isSortDescending(definition)) {
|
|
345
|
-
return definition;
|
|
346
|
-
}
|
|
347
|
-
return {
|
|
348
|
-
...definition,
|
|
349
|
-
sortRules: [
|
|
350
|
-
{
|
|
351
|
-
code: sort,
|
|
352
|
-
descending: !!desc,
|
|
353
|
-
},
|
|
354
|
-
],
|
|
355
|
-
name: undefined,
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
/**
|
|
359
|
-
* Toggles the sort of the search by key.
|
|
360
|
-
* If the search is already sorted by the key, reverses the direction.
|
|
361
|
-
* If the search is not sorted by the key, sort in ascending order.
|
|
362
|
-
* @param definition The original search request.
|
|
363
|
-
* @param key The field key name.
|
|
364
|
-
* @returns The updated search request.
|
|
365
|
-
*/
|
|
366
|
-
function toggleSort(definition, key) {
|
|
367
|
-
let desc = false;
|
|
368
|
-
if (getSortField(definition) === key) {
|
|
369
|
-
desc = !isSortDescending(definition);
|
|
370
|
-
}
|
|
371
|
-
return setSort(definition, key, desc);
|
|
372
|
-
}
|
|
373
|
-
function getSortField(definition) {
|
|
374
|
-
const sortRules = definition.sortRules;
|
|
375
|
-
if (!sortRules || sortRules.length === 0) {
|
|
376
|
-
return undefined;
|
|
377
|
-
}
|
|
378
|
-
const field = sortRules[0].code;
|
|
379
|
-
return field.startsWith('-') ? field.substr(1) : field;
|
|
380
|
-
}
|
|
381
|
-
function isSortDescending(definition) {
|
|
382
|
-
const sortRules = definition.sortRules;
|
|
383
|
-
if (!sortRules || sortRules.length === 0) {
|
|
384
|
-
return false;
|
|
385
|
-
}
|
|
386
|
-
return !!sortRules[0].descending;
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
* Returns a list of operators for a search parameter.
|
|
390
|
-
* @param searchParam The search parameter.
|
|
391
|
-
* @returns The list of operators that can be used for the search parameter.
|
|
392
|
-
*/
|
|
393
|
-
function getSearchOperators(searchParam) {
|
|
394
|
-
return searchParamToOperators[searchParam.type];
|
|
395
|
-
}
|
|
396
|
-
/**
|
|
397
|
-
* Returns a string representing the operation.
|
|
398
|
-
* @param op The operation code.
|
|
399
|
-
* @returns A display string for the operation.
|
|
400
|
-
*/
|
|
401
|
-
function getOpString(op) {
|
|
402
|
-
return operatorNames[op] ?? '';
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* Returns a field display name.
|
|
406
|
-
* @param key The field key.
|
|
407
|
-
* @returns The field display name.
|
|
408
|
-
*/
|
|
409
|
-
function buildFieldNameString(key) {
|
|
410
|
-
let tmp = key;
|
|
411
|
-
// If dot separated, only the last part
|
|
412
|
-
if (tmp.includes('.')) {
|
|
413
|
-
tmp = tmp.split('.').pop();
|
|
414
|
-
}
|
|
415
|
-
// Special case for ID
|
|
416
|
-
if (tmp === 'id') {
|
|
417
|
-
return 'ID';
|
|
418
|
-
}
|
|
419
|
-
// Special case for Version ID
|
|
420
|
-
if (tmp === 'versionId') {
|
|
421
|
-
return 'Version ID';
|
|
422
|
-
}
|
|
423
|
-
// Remove choice of type
|
|
424
|
-
tmp = tmp.replace('[x]', '');
|
|
425
|
-
// Convert camel case to space separated
|
|
426
|
-
tmp = tmp.replace(/([A-Z])/g, ' $1');
|
|
427
|
-
// Convert dashes and underscores to spaces
|
|
428
|
-
tmp = tmp.replace(/[-_]/g, ' ');
|
|
429
|
-
// Normalize whitespace to single space character
|
|
430
|
-
tmp = tmp.replace(/\s+/g, ' ');
|
|
431
|
-
// Trim
|
|
432
|
-
tmp = tmp.trim();
|
|
433
|
-
// Capitalize the first letter of each word
|
|
434
|
-
return tmp.split(/\s/).map(capitalize).join(' ');
|
|
435
|
-
}
|
|
436
|
-
/**
|
|
437
|
-
* Returns a fragment to be displayed in the search table for the value.
|
|
438
|
-
* @param resource The parent resource.
|
|
439
|
-
* @param field The search code or FHIRPath expression.
|
|
440
|
-
* @returns The fragment to display.
|
|
441
|
-
*/
|
|
442
|
-
function renderValue(resource, field) {
|
|
443
|
-
const key = field.name;
|
|
444
|
-
if (key === 'id') {
|
|
445
|
-
return resource.id;
|
|
446
|
-
}
|
|
447
|
-
if (key === 'meta.versionId') {
|
|
448
|
-
return resource.meta?.versionId;
|
|
449
|
-
}
|
|
450
|
-
if (key === '_lastUpdated') {
|
|
451
|
-
return formatDateTime(resource.meta?.lastUpdated);
|
|
452
|
-
}
|
|
453
|
-
// Priority 1: ElementDefinition by exact match
|
|
454
|
-
if (field.elementDefinition && `${resource.resourceType}.${field.name}` === field.elementDefinition.path) {
|
|
455
|
-
return renderPropertyValue(resource, field.elementDefinition);
|
|
456
|
-
}
|
|
457
|
-
// Priority 2: SearchParameter by exact match
|
|
458
|
-
if (field.searchParams && field.searchParams.length === 1 && field.name === field.searchParams[0].code) {
|
|
459
|
-
return renderSearchParameterValue(resource, field.searchParams[0], field.elementDefinition);
|
|
460
|
-
}
|
|
461
|
-
// We don't know how to render this field definition
|
|
462
|
-
return null;
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
* Returns a fragment to be displayed in the search table for a resource property.
|
|
466
|
-
* @param resource The parent resource.
|
|
467
|
-
* @param elementDefinition The property element definition.
|
|
468
|
-
* @returns A React element or null.
|
|
469
|
-
*/
|
|
470
|
-
function renderPropertyValue(resource, elementDefinition) {
|
|
471
|
-
const path = elementDefinition.path?.split('.')?.pop()?.replaceAll('[x]', '') || '';
|
|
472
|
-
const [value, propertyType] = getValueAndType({ type: resource.resourceType, value: resource }, path);
|
|
473
|
-
if (!value) {
|
|
474
|
-
return null;
|
|
475
|
-
}
|
|
476
|
-
return (React.createElement(ResourcePropertyDisplay, { property: elementDefinition, propertyType: propertyType, value: value, maxWidth: 200, ignoreMissingValues: true, link: false }));
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* Returns a fragment to be displayed in the search table for a search parameter.
|
|
480
|
-
* @param resource The parent resource.
|
|
481
|
-
* @param searchParam The search parameter.
|
|
482
|
-
* @param elementDefinition Optional element definition.
|
|
483
|
-
* @returns A React element or null.
|
|
484
|
-
*/
|
|
485
|
-
function renderSearchParameterValue(resource, searchParam, elementDefinition) {
|
|
486
|
-
const value = evalFhirPathTyped(searchParam.expression, [{ type: resource.resourceType, value: resource }]);
|
|
487
|
-
if (!value || value.length === 0) {
|
|
488
|
-
return null;
|
|
489
|
-
}
|
|
490
|
-
if (elementDefinition) {
|
|
491
|
-
return (React.createElement(ResourcePropertyDisplay, { propertyType: value[0].type, value: value[0].value, maxWidth: 200, ignoreMissingValues: true, link: false }));
|
|
492
|
-
}
|
|
493
|
-
return (React.createElement(React.Fragment, null, value.map((v, index) => (React.createElement("span", { key: `${index}-${value.length}` }, typeof v === 'object' ? JSON.stringify(v) : v)))));
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
export { addDateFilterBetween, addField, addFilter, addLastMonthFilter, addMissingFilter, addNextMonthFilter, addThisMonthFilter, addTodayFilter, addTomorrowFilter, addYearToDateFilter, addYesterdayFilter, buildFieldNameString, clearFilters, clearFiltersOnField, deleteFilter, getOpString, getSearchOperators, getSortField, isSortDescending, renderValue, setFilters, setOffset, setPage, setSort, toggleSort };
|
|
497
|
-
//# sourceMappingURL=SearchUtils.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchUtils.mjs","sources":["../../../src/SearchControl/SearchUtils.tsx"],"sourcesContent":["import {\n capitalize,\n DEFAULT_SEARCH_COUNT,\n evalFhirPathTyped,\n Filter,\n formatDateTime,\n Operator,\n PropertyType,\n SearchRequest,\n} from '@medplum/core';\nimport { ElementDefinition, Resource, SearchParameter } from '@medplum/fhirtypes';\nimport React from 'react';\nimport { getValueAndType, ResourcePropertyDisplay } from '../ResourcePropertyDisplay/ResourcePropertyDisplay';\nimport { SearchControlField } from './SearchControlField';\n\nconst searchParamToOperators: Record<string, Operator[]> = {\n string: [Operator.EQUALS, Operator.NOT, Operator.CONTAINS, Operator.EXACT],\n fulltext: [Operator.EQUALS, Operator.NOT, Operator.CONTAINS, Operator.EXACT],\n token: [Operator.EQUALS, Operator.NOT],\n reference: [Operator.EQUALS, Operator.NOT],\n numeric: [\n Operator.EQUALS,\n Operator.NOT_EQUALS,\n Operator.GREATER_THAN,\n Operator.LESS_THAN,\n Operator.GREATER_THAN_OR_EQUALS,\n Operator.LESS_THAN_OR_EQUALS,\n ],\n quantity: [\n Operator.EQUALS,\n Operator.NOT_EQUALS,\n Operator.GREATER_THAN,\n Operator.LESS_THAN,\n Operator.GREATER_THAN_OR_EQUALS,\n Operator.LESS_THAN_OR_EQUALS,\n ],\n date: [\n Operator.EQUALS,\n Operator.NOT_EQUALS,\n Operator.GREATER_THAN,\n Operator.LESS_THAN,\n Operator.GREATER_THAN_OR_EQUALS,\n Operator.LESS_THAN_OR_EQUALS,\n Operator.STARTS_AFTER,\n Operator.ENDS_BEFORE,\n Operator.APPROXIMATELY,\n ],\n datetime: [\n Operator.EQUALS,\n Operator.NOT_EQUALS,\n Operator.GREATER_THAN,\n Operator.LESS_THAN,\n Operator.GREATER_THAN_OR_EQUALS,\n Operator.LESS_THAN_OR_EQUALS,\n Operator.STARTS_AFTER,\n Operator.ENDS_BEFORE,\n Operator.APPROXIMATELY,\n ],\n};\n\nconst operatorNames: Record<Operator, string> = {\n eq: 'equals',\n ne: 'not equals',\n gt: 'greater than',\n lt: 'less than',\n ge: 'greater than or equals',\n le: 'less than or equals',\n sa: 'starts after',\n eb: 'ends before',\n ap: 'approximately',\n contains: 'contains',\n exact: 'exact',\n text: 'text',\n not: 'not',\n above: 'above',\n below: 'below',\n in: 'in',\n 'not-in': 'not in',\n 'of-type': 'of type',\n missing: 'missing',\n identifier: 'identifier',\n iterate: 'iterate',\n};\n\n/**\n * Sets the array of filters.\n * @param definition The original search request.\n * @param filters The new filters.\n * @returns The updated search request.\n */\nexport function setFilters(definition: SearchRequest, filters: Filter[]): SearchRequest {\n return {\n ...definition,\n filters: filters,\n offset: 0,\n name: undefined,\n };\n}\n\n/**\n * Clears all of the filters.\n * @param definition The original search request.\n * @returns The updated search request.\n */\nexport function clearFilters(definition: SearchRequest): SearchRequest {\n return setFilters(definition, []);\n}\n\n/**\n * Clears all of the filters on a certain field.\n * @param definition The original search request.\n * @param code The field key name to clear filters.\n * @returns The updated search request.\n */\nexport function clearFiltersOnField(definition: SearchRequest, code: string): SearchRequest {\n return setFilters(\n definition,\n (definition.filters || []).filter((f) => f.code !== code)\n );\n}\n\n/**\n * Adds a filter.\n * @param definition The original search request.\n * @param field The field key name.\n * @param op The operation key name.\n * @param value The filter value.\n * @param opt_clear Optional flag to clear filters on the field.\n * @returns The updated search request.\n */\nexport function addFilter(\n definition: SearchRequest,\n field: string,\n op: Operator,\n value?: string,\n opt_clear?: boolean\n): SearchRequest {\n if (opt_clear) {\n definition = clearFiltersOnField(definition, field);\n }\n\n const nextFilters: Filter[] = [];\n if (definition.filters) {\n nextFilters.push(...definition.filters);\n }\n nextFilters.push({ code: field, operator: op, value: value || '' });\n\n return setFilters(definition, nextFilters);\n}\n\n/**\n * Adds a field.\n * @param definition The original search request.\n * @param field The field key name.\n * @returns The updated search request.\n */\nexport function addField(definition: SearchRequest, field: string): SearchRequest {\n if (definition.fields && definition.fields.includes(field)) {\n return definition;\n }\n const newFields = [];\n if (definition.fields) {\n newFields.push(...definition.fields);\n }\n newFields.push(field);\n return {\n ...definition,\n fields: newFields,\n name: undefined,\n };\n}\n\n/**\n * Deletes a filter at the specified index.\n * @param definition The original search request.\n * @param index The filter index.\n * @returns The updated search request.\n */\nexport function deleteFilter(definition: SearchRequest, index: number): SearchRequest {\n if (!definition.filters) {\n return definition;\n }\n const newFilters = [...definition.filters];\n newFilters.splice(index, 1);\n return {\n ...definition,\n filters: newFilters,\n name: undefined,\n };\n}\n\n/**\n * Adds a filter that constrains the specified field to \"yesterday\".\n * @param definition The original search request.\n * @param field The field key name.\n * @returns The updated search request.\n */\nexport function addYesterdayFilter(definition: SearchRequest, field: string): SearchRequest {\n return addDayFilter(definition, field, -1);\n}\n\n/**\n * Adds a filter that constrains the specified field to \"today\".\n * @param definition The original search request.\n * @param field The field key name.\n * @returns The updated search request.\n */\nexport function addTodayFilter(definition: SearchRequest, field: string): SearchRequest {\n return addDayFilter(definition, field, 0);\n}\n\n/**\n * Adds a filter that constrains the specified field to \"tomorrow\".\n * @param definition The original search request.\n * @param field The field key name.\n * @returns The updated search request.\n */\nexport function addTomorrowFilter(definition: SearchRequest, field: string): SearchRequest {\n return addDayFilter(definition, field, 1);\n}\n\n/**\n * Adds a filter that constrains the specified field to a day.\n * The day is specified as a delta from the current day.\n * \"Today\" would be 0.\n * \"Yesterday\" would be -1.\n * \"Tomorrow\" would be 1.\n * @param definition The original search request.\n * @param field The field key name.\n * @param delta The number of days from this day.\n * @returns The updated search request.\n */\nfunction addDayFilter(definition: SearchRequest, field: string, delta: number): SearchRequest {\n const startTime = new Date();\n startTime.setDate(startTime.getDate() + delta);\n startTime.setHours(0, 0, 0, 0);\n\n const endTime = new Date(startTime.getTime());\n endTime.setDate(endTime.getDate() + 1);\n endTime.setTime(endTime.getTime() - 1);\n\n return addDateFilterBetween(definition, field, startTime, endTime);\n}\n\n/**\n * Adds a filter that constrains the specified field to \"last month\".\n * @param definition The original search request.\n * @param field The field key name.\n * @returns The updated search request.\n */\nexport function addLastMonthFilter(definition: SearchRequest, field: string): SearchRequest {\n return addMonthFilter(definition, field, -1);\n}\n\n/**\n * Adds a filter that constrains the specified field to \"this month\".\n * @param definition The original search request.\n * @param field The field key name.\n * @returns The updated search request.\n */\nexport function addThisMonthFilter(definition: SearchRequest, field: string): SearchRequest {\n return addMonthFilter(definition, field, 0);\n}\n\n/**\n * Adds a filter that constrains the specified field to \"next month\".\n * @param definition The original search request.\n * @param field The field key name.\n * @returns The updated search request.\n */\nexport function addNextMonthFilter(definition: SearchRequest, field: string): SearchRequest {\n return addMonthFilter(definition, field, 1);\n}\n\n/**\n * Adds a filter that constrains the specified field to a month.\n * The month is specified as a delta from the current month.\n * \"This month\" would be 0.\n * \"Last month\" would be -1.\n * \"Next month\" would be 1.\n * @param definition The original search request.\n * @param field The field key name.\n * @param delta The number of months from this month.\n * @returns The updated search request.\n */\nfunction addMonthFilter(definition: SearchRequest, field: string, delta: number): SearchRequest {\n const startTime = new Date();\n startTime.setMonth(startTime.getMonth() + delta);\n startTime.setDate(1);\n startTime.setHours(0, 0, 0, 0);\n\n const endTime = new Date(startTime.getTime());\n endTime.setMonth(endTime.getMonth() + 1);\n endTime.setDate(1);\n endTime.setHours(0, 0, 0, 0);\n endTime.setTime(endTime.getTime() - 1);\n\n return addDateFilterBetween(definition, field, startTime, endTime);\n}\n\n/**\n * Adds a filter that constrains the specified field to the year to date.\n * @param definition The original search request.\n * @param field The field key name.\n * @returns The updated search request.\n */\nexport function addYearToDateFilter(definition: SearchRequest, field: string): SearchRequest {\n const startTime = new Date();\n startTime.setMonth(0);\n startTime.setDate(1);\n startTime.setHours(0, 0, 0, 0);\n\n const endTime = new Date();\n\n return addDateFilterBetween(definition, field, startTime, endTime);\n}\n\n/**\n * Adds a filter for a date between two dates (inclusive of both dates).\n * @param definition The original search request.\n * @param field The field key name.\n * @param d1 The start date.\n * @param d2 The end date.\n * @returns The updated search request.\n */\nexport function addDateFilterBetween(definition: SearchRequest, field: string, d1: Date, d2: Date): SearchRequest {\n definition = clearFiltersOnField(definition, field);\n definition = addDateFilterImpl(definition, field, Operator.GREATER_THAN_OR_EQUALS, d1);\n definition = addDateFilterImpl(definition, field, Operator.LESS_THAN_OR_EQUALS, d2);\n return definition;\n}\n\n/**\n * Adds a filter for a date before a certain date/time.\n * @param definition The original search request.\n * @param field The field key name.\n * @param op The date/time operation.\n * @param value The date.\n * @returns The updated search request.\n */\nfunction addDateFilterImpl(definition: SearchRequest, field: string, op: Operator, value: Date): SearchRequest {\n return addFilter(definition, field, op, value.toISOString());\n}\n\n/**\n * Adds a filter that constrains the specified field to \"missing\".\n * @param definition The original search request.\n * @param field The field key name.\n * @param value Optional boolean value. Default is true.\n * @returns The updated search request.\n */\nexport function addMissingFilter(definition: SearchRequest, field: string, value = true): SearchRequest {\n return addFilter(definition, field, Operator.MISSING, value.toString());\n}\n\n/**\n * Sets the offset (starting at zero).\n * @param definition The original search request.\n * @param offset The offset number.\n * @returns The updated search request.\n */\nexport function setOffset(definition: SearchRequest, offset: number): SearchRequest {\n if (definition.offset === offset) {\n return definition;\n }\n return {\n ...definition,\n offset,\n name: undefined,\n };\n}\n\n/**\n * Creates a new search request with the search offset at the specified page.\n * @param definition The search definition.\n * @param page The new page number\n * @returns The new search definition.\n */\nexport function setPage(definition: SearchRequest, page: number): SearchRequest {\n const count = definition.count ?? DEFAULT_SEARCH_COUNT;\n const newOffset = (page - 1) * count;\n return setOffset(definition, newOffset);\n}\n\n/**\n * Sorts the search by the specified key, and optional direction.\n * Direction defaults to ascending ('asc') if not specified.\n * @param definition The original search request.\n * @param sort The sort key.\n * @param desc Optional descending flag. Default is false.\n * @returns The updated search request.\n */\nexport function setSort(definition: SearchRequest, sort: string, desc?: boolean): SearchRequest {\n if (sort === getSortField(definition) && desc !== undefined && desc === isSortDescending(definition)) {\n return definition;\n }\n return {\n ...definition,\n sortRules: [\n {\n code: sort,\n descending: !!desc,\n },\n ],\n name: undefined,\n };\n}\n\n/**\n * Toggles the sort of the search by key.\n * If the search is already sorted by the key, reverses the direction.\n * If the search is not sorted by the key, sort in ascending order.\n * @param definition The original search request.\n * @param key The field key name.\n * @returns The updated search request.\n */\nexport function toggleSort(definition: SearchRequest, key: string): SearchRequest {\n let desc = false;\n if (getSortField(definition) === key) {\n desc = !isSortDescending(definition);\n }\n return setSort(definition, key, desc);\n}\n\nexport function getSortField(definition: SearchRequest): string | undefined {\n const sortRules = definition.sortRules;\n if (!sortRules || sortRules.length === 0) {\n return undefined;\n }\n const field = sortRules[0].code;\n return field.startsWith('-') ? field.substr(1) : field;\n}\n\nexport function isSortDescending(definition: SearchRequest): boolean {\n const sortRules = definition.sortRules;\n if (!sortRules || sortRules.length === 0) {\n return false;\n }\n return !!sortRules[0].descending;\n}\n\n/**\n * Returns a list of operators for a search parameter.\n * @param searchParam The search parameter.\n * @returns The list of operators that can be used for the search parameter.\n */\nexport function getSearchOperators(searchParam: SearchParameter): Operator[] | undefined {\n return searchParamToOperators[searchParam.type as string];\n}\n\n/**\n * Returns a string representing the operation.\n * @param op The operation code.\n * @returns A display string for the operation.\n */\nexport function getOpString(op: Operator): string {\n return operatorNames[op] ?? '';\n}\n\n/**\n * Returns a field display name.\n * @param key The field key.\n * @returns The field display name.\n */\nexport function buildFieldNameString(key: string): string {\n let tmp = key;\n\n // If dot separated, only the last part\n if (tmp.includes('.')) {\n tmp = tmp.split('.').pop() as string;\n }\n\n // Special case for ID\n if (tmp === 'id') {\n return 'ID';\n }\n\n // Special case for Version ID\n if (tmp === 'versionId') {\n return 'Version ID';\n }\n\n // Remove choice of type\n tmp = tmp.replace('[x]', '');\n\n // Convert camel case to space separated\n tmp = tmp.replace(/([A-Z])/g, ' $1');\n\n // Convert dashes and underscores to spaces\n tmp = tmp.replace(/[-_]/g, ' ');\n\n // Normalize whitespace to single space character\n tmp = tmp.replace(/\\s+/g, ' ');\n\n // Trim\n tmp = tmp.trim();\n\n // Capitalize the first letter of each word\n return tmp.split(/\\s/).map(capitalize).join(' ');\n}\n\n/**\n * Returns a fragment to be displayed in the search table for the value.\n * @param resource The parent resource.\n * @param field The search code or FHIRPath expression.\n * @returns The fragment to display.\n */\nexport function renderValue(resource: Resource, field: SearchControlField): string | JSX.Element | null | undefined {\n const key = field.name;\n if (key === 'id') {\n return resource.id;\n }\n\n if (key === 'meta.versionId') {\n return resource.meta?.versionId;\n }\n\n if (key === '_lastUpdated') {\n return formatDateTime(resource.meta?.lastUpdated);\n }\n\n // Priority 1: ElementDefinition by exact match\n if (field.elementDefinition && `${resource.resourceType}.${field.name}` === field.elementDefinition.path) {\n return renderPropertyValue(resource, field.elementDefinition);\n }\n\n // Priority 2: SearchParameter by exact match\n if (field.searchParams && field.searchParams.length === 1 && field.name === field.searchParams[0].code) {\n return renderSearchParameterValue(resource, field.searchParams[0], field.elementDefinition);\n }\n\n // We don't know how to render this field definition\n return null;\n}\n\n/**\n * Returns a fragment to be displayed in the search table for a resource property.\n * @param resource The parent resource.\n * @param elementDefinition The property element definition.\n * @returns A React element or null.\n */\nfunction renderPropertyValue(resource: Resource, elementDefinition: ElementDefinition): JSX.Element | null {\n const path = elementDefinition.path?.split('.')?.pop()?.replaceAll('[x]', '') || '';\n const [value, propertyType] = getValueAndType({ type: resource.resourceType, value: resource }, path);\n if (!value) {\n return null;\n }\n\n return (\n <ResourcePropertyDisplay\n property={elementDefinition}\n propertyType={propertyType}\n value={value}\n maxWidth={200}\n ignoreMissingValues={true}\n link={false}\n />\n );\n}\n\n/**\n * Returns a fragment to be displayed in the search table for a search parameter.\n * @param resource The parent resource.\n * @param searchParam The search parameter.\n * @param elementDefinition Optional element definition.\n * @returns A React element or null.\n */\nfunction renderSearchParameterValue(\n resource: Resource,\n searchParam: SearchParameter,\n elementDefinition: ElementDefinition | undefined\n): JSX.Element | null {\n const value = evalFhirPathTyped(searchParam.expression as string, [{ type: resource.resourceType, value: resource }]);\n if (!value || value.length === 0) {\n return null;\n }\n\n if (elementDefinition) {\n return (\n <ResourcePropertyDisplay\n propertyType={value[0].type as PropertyType}\n value={value[0].value}\n maxWidth={200}\n ignoreMissingValues={true}\n link={false}\n />\n );\n }\n\n return (\n <>\n {value.map((v, index) => (\n <span key={`${index}-${value.length}`}>\n {typeof v === 'object' ? JSON.stringify(v) : (v as string | number)}\n </span>\n ))}\n </>\n );\n}\n"],"names":[],"mappings":";;;;AAeA,MAAM,sBAAsB,GAA+B;AACzD,IAAA,MAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC;AAC1E,IAAA,QAAQ,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC5E,KAAK,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC;IACtC,SAAS,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC;AAC1C,IAAA,OAAO,EAAE;AACP,QAAA,QAAQ,CAAC,MAAM;AACf,QAAA,QAAQ,CAAC,UAAU;AACnB,QAAA,QAAQ,CAAC,YAAY;AACrB,QAAA,QAAQ,CAAC,SAAS;AA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,UAAoB,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;IACtH,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AAChC,QAAA,OAAO,IAAI,CAAC;AACb,KAAA;AAED,IAAA,IAAI,iBAAiB,EAAE;AACrB,QAAA,QACE,KAAA,CAAA,aAAA,CAAC,uBAAuB,EAAA,EACtB,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAoB,EAC3C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,EACrB,QAAQ,EAAE,GAAG,EACb,mBAAmB,EAAE,IAAI,EACzB,IAAI,EAAE,KAAK,EAAA,CACX,EACF;AACH,KAAA;IAED,QACE,0CACG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,MAClB,KAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,GAAG,EAAE,CAAG,EAAA,KAAK,CAAI,CAAA,EAAA,KAAK,CAAC,MAAM,EAAE,EAClC,EAAA,OAAO,CAAC,KAAK,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAI,CAAqB,CAC9D,CACR,CAAC,CACD,EACH;AACJ;;;;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Modal, Box, Text, Button } from '@mantine/core';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
4
|
-
function SearchExportDialog(props) {
|
|
5
|
-
return (React.createElement(Modal, { title: "Export", closeButtonProps: { 'aria-label': 'Close' }, opened: props.visible, onClose: props.onCancel },
|
|
6
|
-
React.createElement(Box, { display: "flex", sx: { justifyContent: 'space-between' } },
|
|
7
|
-
props.exportCsv && React.createElement(ExportButton, { text: "CSV", exportLogic: props.exportCsv, onCancel: props.onCancel }),
|
|
8
|
-
props.exportTransactionBundle && (React.createElement(ExportButton, { text: "Transaction Bundle", exportLogic: props.exportTransactionBundle, onCancel: props.onCancel }))),
|
|
9
|
-
React.createElement(Text, { sx: { marginTop: '10px', marginLeft: '2px' } }, "Limited to 1000 records")));
|
|
10
|
-
}
|
|
11
|
-
function ExportButton(props) {
|
|
12
|
-
return (React.createElement(Button, { onClick: () => {
|
|
13
|
-
props.exportLogic();
|
|
14
|
-
props.onCancel();
|
|
15
|
-
} }, `Export as ${props.text}`));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { ExportButton, SearchExportDialog };
|
|
19
|
-
//# sourceMappingURL=SearchExportDialog.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchExportDialog.mjs","sources":["../../../src/SearchExportDialog/SearchExportDialog.tsx"],"sourcesContent":["import { Box, Button, Modal, Text } from '@mantine/core';\nimport React from 'react';\n\ninterface SearchExportDialogProps {\n visible: boolean;\n exportCsv?: () => void;\n exportTransactionBundle?: () => void;\n onCancel: () => void;\n}\n\nexport function SearchExportDialog(props: SearchExportDialogProps): JSX.Element | null {\n return (\n <Modal title=\"Export\" closeButtonProps={{ 'aria-label': 'Close' }} opened={props.visible} onClose={props.onCancel}>\n <Box display=\"flex\" sx={{ justifyContent: 'space-between' }}>\n {props.exportCsv && <ExportButton text=\"CSV\" exportLogic={props.exportCsv} onCancel={props.onCancel} />}\n {props.exportTransactionBundle && (\n <ExportButton\n text=\"Transaction Bundle\"\n exportLogic={props.exportTransactionBundle}\n onCancel={props.onCancel}\n />\n )}\n </Box>\n <Text sx={{ marginTop: '10px', marginLeft: '2px' }}>Limited to 1000 records</Text>\n </Modal>\n );\n}\n\ninterface ExportButtonProps {\n text: string;\n exportLogic: () => void;\n onCancel: () => void;\n}\n\nexport function ExportButton(props: ExportButtonProps): JSX.Element {\n return (\n <Button\n onClick={() => {\n props.exportLogic();\n props.onCancel();\n }}\n >\n {`Export as ${props.text}`}\n </Button>\n );\n}\n"],"names":[],"mappings":";;;AAUM,SAAU,kBAAkB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