@medplum/react 1.0.5 → 1.0.6
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/README.md +2 -1
- package/dist/cjs/MoneyDisplay/MoneyDisplay.d.ts +6 -0
- package/dist/cjs/MoneyInput/MoneyInput.d.ts +10 -0
- package/dist/cjs/MoneyInput/MoneyInput.stories.d.ts +6 -0
- package/dist/cjs/{index.js → index.cjs} +598 -518
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.min.cjs +1 -0
- package/dist/esm/AddressDisplay/{AddressDisplay.js → AddressDisplay.mjs} +1 -1
- package/dist/esm/AddressDisplay/AddressDisplay.mjs.map +1 -0
- package/dist/esm/AddressInput/{AddressInput.js → AddressInput.mjs} +9 -9
- package/dist/esm/AddressInput/AddressInput.mjs.map +1 -0
- package/dist/esm/AnnotationInput/{AnnotationInput.js → AnnotationInput.mjs} +2 -2
- package/dist/esm/AnnotationInput/AnnotationInput.mjs.map +1 -0
- package/dist/esm/AsyncAutocomplete/{AsyncAutocomplete.js → AsyncAutocomplete.mjs} +7 -10
- package/dist/esm/AsyncAutocomplete/AsyncAutocomplete.mjs.map +1 -0
- package/dist/esm/AttachmentArrayDisplay/{AttachmentArrayDisplay.js → AttachmentArrayDisplay.mjs} +2 -2
- package/dist/esm/AttachmentArrayDisplay/AttachmentArrayDisplay.mjs.map +1 -0
- package/dist/esm/AttachmentArrayInput/{AttachmentArrayInput.js → AttachmentArrayInput.mjs} +6 -7
- package/dist/esm/AttachmentArrayInput/AttachmentArrayInput.mjs.map +1 -0
- package/dist/esm/AttachmentButton/{AttachmentButton.js → AttachmentButton.mjs} +5 -7
- package/dist/esm/AttachmentButton/AttachmentButton.mjs.map +1 -0
- package/dist/esm/AttachmentDisplay/AttachmentDisplay.mjs +21 -0
- package/dist/esm/AttachmentDisplay/AttachmentDisplay.mjs.map +1 -0
- package/dist/esm/AttachmentInput/{AttachmentInput.js → AttachmentInput.mjs} +5 -5
- package/dist/esm/AttachmentInput/AttachmentInput.mjs.map +1 -0
- package/dist/esm/BackboneElementDisplay/{BackboneElementDisplay.js → BackboneElementDisplay.mjs} +4 -4
- package/dist/esm/BackboneElementDisplay/BackboneElementDisplay.mjs.map +1 -0
- package/dist/esm/BackboneElementInput/{BackboneElementInput.js → BackboneElementInput.mjs} +10 -11
- package/dist/esm/BackboneElementInput/BackboneElementInput.mjs.map +1 -0
- package/dist/esm/CalendarInput/{CalendarInput.js → CalendarInput.mjs} +1 -1
- package/dist/esm/CalendarInput/CalendarInput.mjs.map +1 -0
- package/dist/esm/CheckboxFormSection/{CheckboxFormSection.js → CheckboxFormSection.mjs} +1 -1
- package/dist/esm/CheckboxFormSection/CheckboxFormSection.mjs.map +1 -0
- package/dist/esm/CodeInput/{CodeInput.js → CodeInput.mjs} +3 -3
- package/dist/esm/CodeInput/CodeInput.mjs.map +1 -0
- package/dist/esm/CodeableConceptDisplay/{CodeableConceptDisplay.js → CodeableConceptDisplay.mjs} +1 -1
- package/dist/esm/CodeableConceptDisplay/CodeableConceptDisplay.mjs.map +1 -0
- package/dist/esm/CodeableConceptInput/{CodeableConceptInput.js → CodeableConceptInput.mjs} +3 -4
- package/dist/esm/CodeableConceptInput/CodeableConceptInput.mjs.map +1 -0
- package/dist/esm/CodingDisplay/{CodingDisplay.js → CodingDisplay.mjs} +1 -1
- package/dist/esm/CodingDisplay/CodingDisplay.mjs.map +1 -0
- package/dist/esm/CodingInput/{CodingInput.js → CodingInput.mjs} +2 -2
- package/dist/esm/CodingInput/CodingInput.mjs.map +1 -0
- package/dist/esm/ContactDetailDisplay/{ContactDetailDisplay.js → ContactDetailDisplay.mjs} +4 -5
- package/dist/esm/ContactDetailDisplay/ContactDetailDisplay.mjs.map +1 -0
- package/dist/esm/ContactDetailInput/{ContactDetailInput.js → ContactDetailInput.mjs} +6 -7
- package/dist/esm/ContactDetailInput/ContactDetailInput.mjs.map +1 -0
- package/dist/esm/ContactPointDisplay/{ContactPointDisplay.js → ContactPointDisplay.mjs} +1 -1
- package/dist/esm/ContactPointDisplay/ContactPointDisplay.mjs.map +1 -0
- package/dist/esm/ContactPointInput/{ContactPointInput.js → ContactPointInput.mjs} +7 -7
- package/dist/esm/ContactPointInput/ContactPointInput.mjs.map +1 -0
- package/dist/esm/Container/{Container.js → Container.mjs} +3 -4
- package/dist/esm/Container/Container.mjs.map +1 -0
- package/dist/esm/DateTimeInput/{DateTimeInput.js → DateTimeInput.mjs} +2 -2
- package/dist/esm/DateTimeInput/DateTimeInput.mjs.map +1 -0
- package/dist/esm/DefaultResourceTimeline/{DefaultResourceTimeline.js → DefaultResourceTimeline.mjs} +2 -2
- package/dist/esm/DefaultResourceTimeline/DefaultResourceTimeline.mjs.map +1 -0
- package/dist/esm/DescriptionList/{DescriptionList.js → DescriptionList.mjs} +1 -1
- package/dist/esm/DescriptionList/DescriptionList.mjs.map +1 -0
- package/dist/esm/DiagnosticReportDisplay/{DiagnosticReportDisplay.js → DiagnosticReportDisplay.mjs} +13 -16
- package/dist/esm/DiagnosticReportDisplay/DiagnosticReportDisplay.mjs.map +1 -0
- package/dist/esm/Document/Document.mjs +12 -0
- package/dist/esm/Document/Document.mjs.map +1 -0
- package/dist/esm/EncounterTimeline/{EncounterTimeline.js → EncounterTimeline.mjs} +2 -2
- package/dist/esm/EncounterTimeline/EncounterTimeline.mjs.map +1 -0
- package/dist/esm/ErrorBoundary/{ErrorBoundary.js → ErrorBoundary.mjs} +1 -1
- package/dist/esm/ErrorBoundary/ErrorBoundary.mjs.map +1 -0
- package/dist/esm/ExtensionInput/{ExtensionInput.js → ExtensionInput.mjs} +1 -1
- package/dist/esm/ExtensionInput/ExtensionInput.mjs.map +1 -0
- package/dist/esm/FhirPathDisplay/{FhirPathDisplay.js → FhirPathDisplay.mjs} +2 -2
- package/dist/esm/FhirPathDisplay/FhirPathDisplay.mjs.map +1 -0
- package/dist/esm/FhirPathTable/{FhirPathTable.js → FhirPathTable.mjs} +14 -17
- package/dist/esm/FhirPathTable/FhirPathTable.mjs.map +1 -0
- package/dist/esm/Form/{Form.js → Form.mjs} +2 -2
- package/dist/esm/Form/Form.mjs.map +1 -0
- package/dist/esm/Form/{FormUtils.js → FormUtils.mjs} +1 -1
- package/dist/esm/Form/FormUtils.mjs.map +1 -0
- package/dist/esm/FormSection/{FormSection.js → FormSection.mjs} +2 -2
- package/dist/esm/FormSection/FormSection.mjs.map +1 -0
- package/dist/esm/GoogleButton/{GoogleButton.js → GoogleButton.mjs} +4 -5
- package/dist/esm/GoogleButton/GoogleButton.mjs.map +1 -0
- package/dist/esm/HumanNameDisplay/{HumanNameDisplay.js → HumanNameDisplay.mjs} +1 -1
- package/dist/esm/HumanNameDisplay/HumanNameDisplay.mjs.map +1 -0
- package/dist/esm/HumanNameInput/HumanNameInput.mjs +50 -0
- package/dist/esm/HumanNameInput/HumanNameInput.mjs.map +1 -0
- package/dist/esm/IdentifierDisplay/IdentifierDisplay.mjs +11 -0
- package/dist/esm/IdentifierDisplay/IdentifierDisplay.mjs.map +1 -0
- package/dist/esm/IdentifierInput/{IdentifierInput.js → IdentifierInput.mjs} +3 -3
- package/dist/esm/IdentifierInput/IdentifierInput.mjs.map +1 -0
- package/dist/esm/Logo/{Logo.js → Logo.mjs} +1 -1
- package/dist/esm/Logo/Logo.mjs.map +1 -0
- package/dist/esm/MedplumLink/{MedplumLink.js → MedplumLink.mjs} +5 -6
- package/dist/esm/MedplumLink/MedplumLink.mjs.map +1 -0
- package/dist/esm/MedplumProvider/{MedplumProvider.js → MedplumProvider.mjs} +9 -3
- package/dist/esm/MedplumProvider/MedplumProvider.mjs.map +1 -0
- package/dist/esm/MoneyDisplay/MoneyDisplay.d.ts +6 -0
- package/dist/esm/MoneyDisplay/MoneyDisplay.mjs +9 -0
- package/dist/esm/MoneyDisplay/MoneyDisplay.mjs.map +1 -0
- package/dist/esm/MoneyInput/MoneyInput.d.ts +10 -0
- package/dist/esm/MoneyInput/MoneyInput.mjs +53 -0
- package/dist/esm/MoneyInput/MoneyInput.mjs.map +1 -0
- package/dist/esm/MoneyInput/MoneyInput.stories.d.ts +6 -0
- package/dist/esm/Panel/{Panel.js → Panel.mjs} +3 -4
- package/dist/esm/Panel/Panel.mjs.map +1 -0
- package/dist/esm/PatientTimeline/{PatientTimeline.js → PatientTimeline.mjs} +2 -2
- package/dist/esm/PatientTimeline/PatientTimeline.mjs.map +1 -0
- package/dist/esm/PeriodInput/{PeriodInput.js → PeriodInput.mjs} +4 -4
- package/dist/esm/PeriodInput/PeriodInput.mjs.map +1 -0
- package/dist/esm/PlanDefinitionBuilder/{PlanDefinitionBuilder.js → PlanDefinitionBuilder.mjs} +36 -24
- package/dist/esm/PlanDefinitionBuilder/PlanDefinitionBuilder.mjs.map +1 -0
- package/dist/esm/QuantityDisplay/{QuantityDisplay.js → QuantityDisplay.mjs} +1 -1
- package/dist/esm/QuantityDisplay/QuantityDisplay.mjs.map +1 -0
- package/dist/esm/QuantityInput/{QuantityInput.js → QuantityInput.mjs} +13 -5
- package/dist/esm/QuantityInput/QuantityInput.mjs.map +1 -0
- package/dist/esm/QuestionnaireBuilder/{QuestionnaireBuilder.js → QuestionnaireBuilder.mjs} +45 -27
- package/dist/esm/QuestionnaireBuilder/QuestionnaireBuilder.mjs.map +1 -0
- package/dist/esm/QuestionnaireForm/{QuestionnaireForm.js → QuestionnaireForm.mjs} +36 -36
- package/dist/esm/QuestionnaireForm/QuestionnaireForm.mjs.map +1 -0
- package/dist/esm/RangeDisplay/{RangeDisplay.js → RangeDisplay.mjs} +1 -1
- package/dist/esm/RangeDisplay/RangeDisplay.mjs.map +1 -0
- package/dist/esm/RangeInput/{RangeInput.js → RangeInput.mjs} +10 -4
- package/dist/esm/RangeInput/RangeInput.mjs.map +1 -0
- package/dist/esm/RatioDisplay/{RatioDisplay.js → RatioDisplay.mjs} +2 -2
- package/dist/esm/RatioDisplay/RatioDisplay.mjs.map +1 -0
- package/dist/esm/RatioInput/{RatioInput.js → RatioInput.mjs} +10 -4
- package/dist/esm/RatioInput/RatioInput.mjs.map +1 -0
- package/dist/esm/ReferenceDisplay/{ReferenceDisplay.js → ReferenceDisplay.mjs} +2 -2
- package/dist/esm/ReferenceDisplay/ReferenceDisplay.mjs.map +1 -0
- package/dist/esm/ReferenceInput/{ReferenceInput.js → ReferenceInput.mjs} +10 -5
- package/dist/esm/ReferenceInput/ReferenceInput.mjs.map +1 -0
- package/dist/esm/ReferenceRangeEditor/{ReferenceRangeEditor.js → ReferenceRangeEditor.mjs} +44 -38
- package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.mjs.map +1 -0
- package/dist/esm/RequestGroupDisplay/{RequestGroupDisplay.js → RequestGroupDisplay.mjs} +14 -17
- package/dist/esm/RequestGroupDisplay/RequestGroupDisplay.mjs.map +1 -0
- package/dist/esm/ResourceArrayDisplay/{ResourceArrayDisplay.js → ResourceArrayDisplay.mjs} +4 -5
- package/dist/esm/ResourceArrayDisplay/ResourceArrayDisplay.mjs.map +1 -0
- package/dist/esm/ResourceArrayInput/{ResourceArrayInput.js → ResourceArrayInput.mjs} +3 -3
- package/dist/esm/ResourceArrayInput/ResourceArrayInput.mjs.map +1 -0
- package/dist/esm/ResourceAvatar/ResourceAvatar.mjs +23 -0
- package/dist/esm/ResourceAvatar/ResourceAvatar.mjs.map +1 -0
- package/dist/esm/ResourceBadge/{ResourceBadge.js → ResourceBadge.mjs} +3 -3
- package/dist/esm/ResourceBadge/ResourceBadge.mjs.map +1 -0
- package/dist/esm/ResourceBlame/{ResourceBlame.js → ResourceBlame.mjs} +6 -7
- package/dist/esm/ResourceBlame/ResourceBlame.mjs.map +1 -0
- package/dist/esm/ResourceDiff/{ResourceDiff.js → ResourceDiff.mjs} +4 -4
- package/dist/esm/ResourceDiff/ResourceDiff.mjs.map +1 -0
- package/dist/esm/ResourceDiffTable/{ResourceDiffTable.js → ResourceDiffTable.mjs} +3 -3
- package/dist/esm/ResourceDiffTable/ResourceDiffTable.mjs.map +1 -0
- package/dist/esm/ResourceForm/{ResourceForm.js → ResourceForm.mjs} +5 -5
- package/dist/esm/ResourceForm/ResourceForm.mjs.map +1 -0
- package/dist/esm/ResourceHistoryTable/{ResourceHistoryTable.js → ResourceHistoryTable.mjs} +10 -13
- package/dist/esm/ResourceHistoryTable/ResourceHistoryTable.mjs.map +1 -0
- package/dist/esm/ResourceInput/{ResourceInput.js → ResourceInput.mjs} +18 -24
- package/dist/esm/ResourceInput/ResourceInput.mjs.map +1 -0
- package/dist/esm/ResourceName/ResourceName.mjs +18 -0
- package/dist/esm/ResourceName/ResourceName.mjs.map +1 -0
- package/dist/esm/ResourcePropertyDisplay/{ResourcePropertyDisplay.js → ResourcePropertyDisplay.mjs} +23 -21
- package/dist/esm/ResourcePropertyDisplay/ResourcePropertyDisplay.mjs.map +1 -0
- package/dist/esm/ResourcePropertyInput/{ResourcePropertyInput.js → ResourcePropertyInput.mjs} +34 -34
- package/dist/esm/ResourcePropertyInput/ResourcePropertyInput.mjs.map +1 -0
- package/dist/esm/ResourceTable/{ResourceTable.js → ResourceTable.mjs} +4 -4
- package/dist/esm/ResourceTable/ResourceTable.mjs.map +1 -0
- package/dist/esm/ResourceTimeline/{ResourceTimeline.js → ResourceTimeline.mjs} +26 -30
- package/dist/esm/ResourceTimeline/ResourceTimeline.mjs.map +1 -0
- package/dist/esm/Scheduler/{Scheduler.js → Scheduler.mjs} +8 -9
- package/dist/esm/Scheduler/Scheduler.mjs.map +1 -0
- package/dist/esm/SearchControl/{SearchControl.js → SearchControl.mjs} +66 -50
- package/dist/esm/SearchControl/SearchControl.mjs.map +1 -0
- package/dist/esm/SearchControl/{SearchControlField.js → SearchControlField.mjs} +3 -4
- package/dist/esm/SearchControl/SearchControlField.mjs.map +1 -0
- package/dist/esm/SearchControl/{SearchUtils.js → SearchUtils.mjs} +34 -17
- package/dist/esm/SearchControl/SearchUtils.mjs.map +1 -0
- package/dist/esm/SearchFieldEditor/{SearchFieldEditor.js → SearchFieldEditor.mjs} +28 -21
- package/dist/esm/SearchFieldEditor/SearchFieldEditor.mjs.map +1 -0
- package/dist/esm/SearchFilterEditor/{SearchFilterEditor.js → SearchFilterEditor.mjs} +8 -9
- package/dist/esm/SearchFilterEditor/SearchFilterEditor.mjs.map +1 -0
- package/dist/esm/SearchFilterValueDialog/{SearchFilterValueDialog.js → SearchFilterValueDialog.mjs} +5 -6
- package/dist/esm/SearchFilterValueDialog/SearchFilterValueDialog.mjs.map +1 -0
- package/dist/esm/SearchFilterValueDisplay/{SearchFilterValueDisplay.js → SearchFilterValueDisplay.mjs} +3 -4
- package/dist/esm/SearchFilterValueDisplay/SearchFilterValueDisplay.mjs.map +1 -0
- package/dist/esm/SearchFilterValueInput/{SearchFilterValueInput.js → SearchFilterValueInput.mjs} +5 -6
- package/dist/esm/SearchFilterValueInput/SearchFilterValueInput.mjs.map +1 -0
- package/dist/esm/SearchPopupMenu/{SearchPopupMenu.js → SearchPopupMenu.mjs} +10 -10
- package/dist/esm/SearchPopupMenu/SearchPopupMenu.mjs.map +1 -0
- package/dist/esm/ServiceRequestTimeline/{ServiceRequestTimeline.js → ServiceRequestTimeline.mjs} +2 -2
- package/dist/esm/ServiceRequestTimeline/ServiceRequestTimeline.mjs.map +1 -0
- package/dist/esm/StatusBadge/{StatusBadge.js → StatusBadge.mjs} +1 -1
- package/dist/esm/StatusBadge/StatusBadge.mjs.map +1 -0
- package/dist/esm/Timeline/{Timeline.js → Timeline.mjs} +11 -13
- package/dist/esm/Timeline/Timeline.mjs.map +1 -0
- package/dist/esm/TimingInput/{TimingInput.js → TimingInput.mjs} +13 -18
- package/dist/esm/TimingInput/TimingInput.mjs.map +1 -0
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs +43 -0
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs.map +1 -0
- package/dist/esm/auth/{AuthenticationForm.js → AuthenticationForm.mjs} +21 -19
- package/dist/esm/auth/AuthenticationForm.mjs.map +1 -0
- package/dist/esm/auth/ChooseProfileForm.mjs +29 -0
- package/dist/esm/auth/ChooseProfileForm.mjs.map +1 -0
- package/dist/esm/auth/{ChooseScopeForm.js → ChooseScopeForm.mjs} +4 -4
- package/dist/esm/auth/ChooseScopeForm.mjs.map +1 -0
- package/dist/esm/auth/{MfaForm.js → MfaForm.mjs} +4 -4
- package/dist/esm/auth/MfaForm.mjs.map +1 -0
- package/dist/esm/auth/{NewProjectForm.js → NewProjectForm.mjs} +8 -9
- package/dist/esm/auth/NewProjectForm.mjs.map +1 -0
- package/dist/esm/auth/{NewUserForm.js → NewUserForm.mjs} +15 -19
- package/dist/esm/auth/NewUserForm.mjs.map +1 -0
- package/dist/esm/auth/{RegisterForm.js → RegisterForm.mjs} +5 -5
- package/dist/esm/auth/RegisterForm.mjs.map +1 -0
- package/dist/esm/auth/{SignInForm.js → SignInForm.mjs} +10 -11
- package/dist/esm/auth/SignInForm.mjs.map +1 -0
- package/dist/esm/{constants.js → constants.mjs} +1 -1
- package/dist/esm/constants.mjs.map +1 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.min.mjs +1 -0
- package/dist/esm/{index.js → index.mjs} +88 -86
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/useResource/{useResource.js → useResource.mjs} +2 -2
- package/dist/esm/useResource/useResource.mjs.map +1 -0
- package/dist/esm/utils/{blame.js → blame.mjs} +6 -9
- package/dist/esm/utils/blame.mjs.map +1 -0
- package/dist/esm/utils/{date.js → date.mjs} +2 -3
- package/dist/esm/utils/date.mjs.map +1 -0
- package/dist/esm/utils/{diff.js → diff.mjs} +1 -1
- package/dist/esm/utils/diff.mjs.map +1 -0
- package/dist/esm/utils/{dom.js → dom.mjs} +1 -1
- package/dist/esm/utils/dom.mjs.map +1 -0
- package/dist/esm/utils/outcomes.mjs +30 -0
- package/dist/esm/utils/outcomes.mjs.map +1 -0
- package/dist/esm/utils/{questionnaire.js → questionnaire.mjs} +1 -1
- package/dist/esm/utils/questionnaire.mjs.map +1 -0
- package/dist/esm/utils/{recaptcha.js → recaptcha.mjs} +5 -6
- package/dist/esm/utils/recaptcha.mjs.map +1 -0
- package/dist/esm/utils/{script.js → script.mjs} +1 -1
- package/dist/esm/utils/script.mjs.map +1 -0
- package/package.json +22 -22
- package/rollup.config.mjs +6 -7
- package/dist/cjs/auth/OktaButton.d.ts +0 -5
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/index.min.js +0 -2
- package/dist/cjs/index.min.js.map +0 -1
- package/dist/esm/AddressDisplay/AddressDisplay.js.map +0 -1
- package/dist/esm/AddressInput/AddressInput.js.map +0 -1
- package/dist/esm/AnnotationInput/AnnotationInput.js.map +0 -1
- package/dist/esm/AsyncAutocomplete/AsyncAutocomplete.js.map +0 -1
- package/dist/esm/AttachmentArrayDisplay/AttachmentArrayDisplay.js.map +0 -1
- package/dist/esm/AttachmentArrayInput/AttachmentArrayInput.js.map +0 -1
- package/dist/esm/AttachmentButton/AttachmentButton.js.map +0 -1
- package/dist/esm/AttachmentDisplay/AttachmentDisplay.js +0 -21
- package/dist/esm/AttachmentDisplay/AttachmentDisplay.js.map +0 -1
- package/dist/esm/AttachmentInput/AttachmentInput.js.map +0 -1
- package/dist/esm/BackboneElementDisplay/BackboneElementDisplay.js.map +0 -1
- package/dist/esm/BackboneElementInput/BackboneElementInput.js.map +0 -1
- package/dist/esm/CalendarInput/CalendarInput.js.map +0 -1
- package/dist/esm/CheckboxFormSection/CheckboxFormSection.js.map +0 -1
- package/dist/esm/CodeInput/CodeInput.js.map +0 -1
- package/dist/esm/CodeableConceptDisplay/CodeableConceptDisplay.js.map +0 -1
- package/dist/esm/CodeableConceptInput/CodeableConceptInput.js.map +0 -1
- package/dist/esm/CodingDisplay/CodingDisplay.js.map +0 -1
- package/dist/esm/CodingInput/CodingInput.js.map +0 -1
- package/dist/esm/ContactDetailDisplay/ContactDetailDisplay.js.map +0 -1
- package/dist/esm/ContactDetailInput/ContactDetailInput.js.map +0 -1
- package/dist/esm/ContactPointDisplay/ContactPointDisplay.js.map +0 -1
- package/dist/esm/ContactPointInput/ContactPointInput.js.map +0 -1
- package/dist/esm/Container/Container.js.map +0 -1
- package/dist/esm/DateTimeInput/DateTimeInput.js.map +0 -1
- package/dist/esm/DefaultResourceTimeline/DefaultResourceTimeline.js.map +0 -1
- package/dist/esm/DescriptionList/DescriptionList.js.map +0 -1
- package/dist/esm/DiagnosticReportDisplay/DiagnosticReportDisplay.js.map +0 -1
- package/dist/esm/Document/Document.js +0 -13
- package/dist/esm/Document/Document.js.map +0 -1
- package/dist/esm/EncounterTimeline/EncounterTimeline.js.map +0 -1
- package/dist/esm/ErrorBoundary/ErrorBoundary.js.map +0 -1
- package/dist/esm/ExtensionInput/ExtensionInput.js.map +0 -1
- package/dist/esm/FhirPathDisplay/FhirPathDisplay.js.map +0 -1
- package/dist/esm/FhirPathTable/FhirPathTable.js.map +0 -1
- package/dist/esm/Form/Form.js.map +0 -1
- package/dist/esm/Form/FormUtils.js.map +0 -1
- package/dist/esm/FormSection/FormSection.js.map +0 -1
- package/dist/esm/GoogleButton/GoogleButton.js.map +0 -1
- package/dist/esm/HumanNameDisplay/HumanNameDisplay.js.map +0 -1
- package/dist/esm/HumanNameInput/HumanNameInput.js +0 -39
- package/dist/esm/HumanNameInput/HumanNameInput.js.map +0 -1
- package/dist/esm/IdentifierDisplay/IdentifierDisplay.js +0 -12
- package/dist/esm/IdentifierDisplay/IdentifierDisplay.js.map +0 -1
- package/dist/esm/IdentifierInput/IdentifierInput.js.map +0 -1
- package/dist/esm/Logo/Logo.js.map +0 -1
- package/dist/esm/MedplumLink/MedplumLink.js.map +0 -1
- package/dist/esm/MedplumProvider/MedplumProvider.js.map +0 -1
- package/dist/esm/Panel/Panel.js.map +0 -1
- package/dist/esm/PatientTimeline/PatientTimeline.js.map +0 -1
- package/dist/esm/PeriodInput/PeriodInput.js.map +0 -1
- package/dist/esm/PlanDefinitionBuilder/PlanDefinitionBuilder.js.map +0 -1
- package/dist/esm/QuantityDisplay/QuantityDisplay.js.map +0 -1
- package/dist/esm/QuantityInput/QuantityInput.js.map +0 -1
- package/dist/esm/QuestionnaireBuilder/QuestionnaireBuilder.js.map +0 -1
- package/dist/esm/QuestionnaireForm/QuestionnaireForm.js.map +0 -1
- package/dist/esm/RangeDisplay/RangeDisplay.js.map +0 -1
- package/dist/esm/RangeInput/RangeInput.js.map +0 -1
- package/dist/esm/RatioDisplay/RatioDisplay.js.map +0 -1
- package/dist/esm/RatioInput/RatioInput.js.map +0 -1
- package/dist/esm/ReferenceDisplay/ReferenceDisplay.js.map +0 -1
- package/dist/esm/ReferenceInput/ReferenceInput.js.map +0 -1
- package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.js.map +0 -1
- package/dist/esm/RequestGroupDisplay/RequestGroupDisplay.js.map +0 -1
- package/dist/esm/ResourceArrayDisplay/ResourceArrayDisplay.js.map +0 -1
- package/dist/esm/ResourceArrayInput/ResourceArrayInput.js.map +0 -1
- package/dist/esm/ResourceAvatar/ResourceAvatar.js +0 -24
- package/dist/esm/ResourceAvatar/ResourceAvatar.js.map +0 -1
- package/dist/esm/ResourceBadge/ResourceBadge.js.map +0 -1
- package/dist/esm/ResourceBlame/ResourceBlame.js.map +0 -1
- package/dist/esm/ResourceDiff/ResourceDiff.js.map +0 -1
- package/dist/esm/ResourceDiffTable/ResourceDiffTable.js.map +0 -1
- package/dist/esm/ResourceForm/ResourceForm.js.map +0 -1
- package/dist/esm/ResourceHistoryTable/ResourceHistoryTable.js.map +0 -1
- package/dist/esm/ResourceInput/ResourceInput.js.map +0 -1
- package/dist/esm/ResourceName/ResourceName.js +0 -19
- package/dist/esm/ResourceName/ResourceName.js.map +0 -1
- package/dist/esm/ResourcePropertyDisplay/ResourcePropertyDisplay.js.map +0 -1
- package/dist/esm/ResourcePropertyInput/ResourcePropertyInput.js.map +0 -1
- package/dist/esm/ResourceTable/ResourceTable.js.map +0 -1
- package/dist/esm/ResourceTimeline/ResourceTimeline.js.map +0 -1
- package/dist/esm/Scheduler/Scheduler.js.map +0 -1
- package/dist/esm/SearchControl/SearchControl.js.map +0 -1
- package/dist/esm/SearchControl/SearchControlField.js.map +0 -1
- package/dist/esm/SearchControl/SearchUtils.js.map +0 -1
- package/dist/esm/SearchFieldEditor/SearchFieldEditor.js.map +0 -1
- package/dist/esm/SearchFilterEditor/SearchFilterEditor.js.map +0 -1
- package/dist/esm/SearchFilterValueDialog/SearchFilterValueDialog.js.map +0 -1
- package/dist/esm/SearchFilterValueDisplay/SearchFilterValueDisplay.js.map +0 -1
- package/dist/esm/SearchFilterValueInput/SearchFilterValueInput.js.map +0 -1
- package/dist/esm/SearchPopupMenu/SearchPopupMenu.js.map +0 -1
- package/dist/esm/ServiceRequestTimeline/ServiceRequestTimeline.js.map +0 -1
- package/dist/esm/StatusBadge/StatusBadge.js.map +0 -1
- package/dist/esm/Timeline/Timeline.js.map +0 -1
- package/dist/esm/TimingInput/TimingInput.js.map +0 -1
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.js +0 -45
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.js.map +0 -1
- package/dist/esm/auth/AuthenticationForm.js.map +0 -1
- package/dist/esm/auth/ChooseProfileForm.js +0 -32
- package/dist/esm/auth/ChooseProfileForm.js.map +0 -1
- package/dist/esm/auth/ChooseScopeForm.js.map +0 -1
- package/dist/esm/auth/MfaForm.js.map +0 -1
- package/dist/esm/auth/NewProjectForm.js.map +0 -1
- package/dist/esm/auth/NewUserForm.js.map +0 -1
- package/dist/esm/auth/OktaButton.d.ts +0 -5
- package/dist/esm/auth/RegisterForm.js.map +0 -1
- package/dist/esm/auth/SignInForm.js.map +0 -1
- package/dist/esm/constants.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.min.js +0 -2
- package/dist/esm/index.min.js.map +0 -1
- package/dist/esm/node_modules/tslib/tslib.es6.js +0 -39
- package/dist/esm/node_modules/tslib/tslib.es6.js.map +0 -1
- package/dist/esm/useResource/useResource.js.map +0 -1
- package/dist/esm/utils/blame.js.map +0 -1
- package/dist/esm/utils/date.js.map +0 -1
- package/dist/esm/utils/diff.js.map +0 -1
- package/dist/esm/utils/dom.js.map +0 -1
- package/dist/esm/utils/outcomes.js +0 -29
- package/dist/esm/utils/outcomes.js.map +0 -1
- package/dist/esm/utils/questionnaire.js.map +0 -1
- package/dist/esm/utils/recaptcha.js.map +0 -1
- package/dist/esm/utils/script.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTimeInput.mjs","sources":["../../../src/DateTimeInput/DateTimeInput.tsx"],"sourcesContent":["import { TextInput } from '@mantine/core';\nimport { isValidDate } from '@medplum/core';\nimport { OperationOutcome } from '@medplum/fhirtypes';\nimport React from 'react';\nimport { getErrorsForInput } from '../utils/outcomes';\n\nexport interface DateTimeInputProps {\n name?: string;\n placeholder?: string;\n defaultValue?: string;\n outcome?: OperationOutcome;\n onChange?: (value: string) => void;\n}\n\n/**\n * The DateTimeInput component is a wrapper around the HTML5 input type=\"datetime-local\".\n * The main purpose is to reconcile time zones.\n * Most of our date/time values are in ISO-8601, which includes a time zone offset.\n * The datetime-local input does not support the time zone offset.\n * @param props The Input props.\n * @returns The JSX element to render.\n */\nexport function DateTimeInput(props: DateTimeInputProps): JSX.Element {\n return (\n <TextInput\n id={props.name}\n name={props.name}\n data-testid={props.name}\n placeholder={props.placeholder}\n type={getInputType()}\n defaultValue={convertIsoToLocal(props.defaultValue)}\n error={getErrorsForInput(props.outcome, props.name)}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => {\n if (props.onChange) {\n const newValue = e.currentTarget.value;\n props.onChange(convertLocalToIso(newValue));\n }\n }}\n />\n );\n}\n\n/**\n * Converts an ISO-8601 date/time string to a local date/time string.\n * @param isoString The ISO-8601 date/time string to convert.\n * @returns The local date/time string.\n */\nexport function convertIsoToLocal(isoString: string | undefined): string {\n if (!isoString) {\n return '';\n }\n\n // Convert the ISO-8601 date to a local datetime-local value.\n // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#local_date_and_time_strings\n // See: https://stackoverflow.com/a/60368477\n const date = new Date(isoString);\n if (!isValidDate(date)) {\n // If the input string was malformed, return an empty string.\n return '';\n }\n\n return date.toLocaleDateString('sv') + 'T' + date.toLocaleTimeString('sv');\n}\n\n/**\n * Converts a local date/time string to an ISO-8601 date/time string.\n * @param localString The local date/time string to convert.\n * @returns The ISO-8601 date/time string.\n */\nexport function convertLocalToIso(localString: string | undefined): string {\n if (!localString) {\n return '';\n }\n\n // Try to parse the local string as a Date\n // JavaScript's Date() constructor defaults to the local time zone.\n // The Date() constructor will throw if the value is malformed.\n const date = new Date(localString);\n if (!isValidDate(date)) {\n // If the input string was malformed, return an empty string.\n return '';\n }\n\n return date.toISOString();\n}\n\n/**\n * Returns the input type for the requested type.\n * JSDOM does not support many of the valid <input> type attributes.\n * For example, it won't fire change events for <input type=\"datetime-local\">.\n */\nfunction getInputType(): string {\n return process.env.NODE_ENV === 'test' ? 'text' : 'datetime-local';\n}\n"],"names":[],"mappings":";;;;;AAcA;;;;;;;AAOG;AACG,SAAU,aAAa,CAAC,KAAyB,EAAA;IACrD,QACE,KAAC,CAAA,aAAA,CAAA,SAAS,EACR,EAAA,EAAE,EAAE,KAAK,CAAC,IAAI,EACd,IAAI,EAAE,KAAK,CAAC,IAAI,EACH,aAAA,EAAA,KAAK,CAAC,IAAI,EACvB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,IAAI,EAAE,YAAY,EAAE,EACpB,YAAY,EAAE,iBAAiB,CAAC,KAAK,CAAC,YAAY,CAAC,EACnD,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,EACnD,QAAQ,EAAE,CAAC,CAAsC,KAAI;YACnD,IAAI,KAAK,CAAC,QAAQ,EAAE;AAClB,gBAAA,MAAM,QAAQ,GAAG,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC;gBACvC,KAAK,CAAC,QAAQ,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC7C,aAAA;SACF,EAAA,CACD,EACF;AACJ,CAAC;AAED;;;;AAIG;AACG,SAAU,iBAAiB,CAAC,SAA6B,EAAA;IAC7D,IAAI,CAAC,SAAS,EAAE;AACd,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;;;;AAKD,IAAA,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;AACjC,IAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;;AAEtB,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;AAED,IAAA,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAC7E,CAAC;AAED;;;;AAIG;AACG,SAAU,iBAAiB,CAAC,WAA+B,EAAA;IAC/D,IAAI,CAAC,WAAW,EAAE;AAChB,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;;;;AAKD,IAAA,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC;AACnC,IAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;;AAEtB,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;AAED,IAAA,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;AAC5B,CAAC;AAED;;;;AAIG;AACH,SAAS,YAAY,GAAA;AACnB,IAAA,OAAkD,gBAAgB,CAAC;AACrE;;;;"}
|
package/dist/esm/DefaultResourceTimeline/{DefaultResourceTimeline.js → DefaultResourceTimeline.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getReferenceString } from '@medplum/core';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { ResourceTimeline } from '../ResourceTimeline/ResourceTimeline.
|
|
3
|
+
import { ResourceTimeline } from '../ResourceTimeline/ResourceTimeline.mjs';
|
|
4
4
|
|
|
5
5
|
function DefaultResourceTimeline(props) {
|
|
6
6
|
return (React.createElement(ResourceTimeline, { value: props.resource, buildSearchRequests: (resource) => ({
|
|
@@ -24,4 +24,4 @@ function DefaultResourceTimeline(props) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export { DefaultResourceTimeline };
|
|
27
|
-
//# sourceMappingURL=DefaultResourceTimeline.
|
|
27
|
+
//# sourceMappingURL=DefaultResourceTimeline.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultResourceTimeline.mjs","sources":["../../../src/DefaultResourceTimeline/DefaultResourceTimeline.tsx"],"sourcesContent":["import { getReferenceString } from '@medplum/core';\nimport { Reference, Resource } from '@medplum/fhirtypes';\nimport React from 'react';\nimport { ResourceTimeline } from '../ResourceTimeline/ResourceTimeline';\n\nexport interface DefaultResourceTimelineProps {\n resource: Resource | Reference;\n}\n\nexport function DefaultResourceTimeline(props: DefaultResourceTimelineProps): JSX.Element {\n return (\n <ResourceTimeline\n value={props.resource}\n buildSearchRequests={(resource: Resource) => ({\n resourceType: 'Bundle',\n type: 'batch',\n entry: [\n {\n request: {\n method: 'GET',\n url: `${getReferenceString(resource)}/_history`,\n },\n },\n {\n request: {\n method: 'GET',\n url: `AuditEvent?entity=${getReferenceString(resource)}&_sort=-_lastUpdated`,\n },\n },\n ],\n })}\n />\n );\n}\n"],"names":[],"mappings":";;;;AASM,SAAU,uBAAuB,CAAC,KAAmC,EAAA;AACzE,IAAA,QACE,KAAC,CAAA,aAAA,CAAA,gBAAgB,EACf,EAAA,KAAK,EAAE,KAAK,CAAC,QAAQ,EACrB,mBAAmB,EAAE,CAAC,QAAkB,MAAM;AAC5C,YAAA,YAAY,EAAE,QAAQ;AACtB,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,KAAK,EAAE;AACL,gBAAA;AACE,oBAAA,OAAO,EAAE;AACP,wBAAA,MAAM,EAAE,KAAK;AACb,wBAAA,GAAG,EAAE,CAAG,EAAA,kBAAkB,CAAC,QAAQ,CAAC,CAAW,SAAA,CAAA;AAChD,qBAAA;AACF,iBAAA;AACD,gBAAA;AACE,oBAAA,OAAO,EAAE;AACP,wBAAA,MAAM,EAAE,KAAK;AACb,wBAAA,GAAG,EAAE,CAAqB,kBAAA,EAAA,kBAAkB,CAAC,QAAQ,CAAC,CAAsB,oBAAA,CAAA;AAC7E,qBAAA;AACF,iBAAA;AACF,aAAA;SACF,CAAC,EAAA,CACF,EACF;AACJ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DescriptionList.mjs","sources":["../../../src/DescriptionList/DescriptionList.tsx"],"sourcesContent":["import { createStyles } from '@mantine/core';\nimport React from 'react';\n\nconst useStyles = createStyles((theme) => ({\n root: {\n display: 'grid',\n gridTemplateColumns: '30% 70%',\n margin: 0,\n\n '& > dt, & > dd': {\n padding: `${theme.spacing.sm}px ${theme.spacing.sm}px`,\n borderTop: `0.1px solid ${theme.colors.gray[3]}`,\n margin: 0,\n },\n },\n\n compact: {\n gridTemplateColumns: '20% 80%',\n\n '& > dt, & > dd': {\n padding: `0 ${theme.spacing.xs}px ${theme.spacing.xs}px 0`,\n border: 0,\n },\n },\n}));\n\nexport interface DescriptionListProps {\n children: React.ReactNode;\n compact?: boolean;\n}\n\nexport function DescriptionList(props: DescriptionListProps): JSX.Element {\n const { children, compact } = props;\n const { classes, cx } = useStyles();\n return <dl className={cx(classes.root, { [classes.compact]: compact })}>{children}</dl>;\n}\n\nexport interface DescriptionListEntryProps {\n term: string;\n children: React.ReactNode;\n}\n\nexport function DescriptionListEntry(props: DescriptionListEntryProps): JSX.Element {\n return (\n <>\n <dt>{props.term}</dt>\n <dd>{props.children}</dd>\n </>\n );\n}\n"],"names":[],"mappings":";;;AAGA,MAAM,SAAS,GAAG,YAAY,CAAC,CAAC,KAAK,MAAM;AACzC,IAAA,IAAI,EAAE;AACJ,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,mBAAm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AAA,aAAA,CAAA,IAAA,EAAA,IAAA,EAAK,KAAK,CAAC,QAAQ,CAAM,CACxB,EACH;AACJ;;;;"}
|
package/dist/esm/DiagnosticReportDisplay/{DiagnosticReportDisplay.js → DiagnosticReportDisplay.mjs}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createStyles, Stack, Title, Group, Text } from '@mantine/core';
|
|
2
2
|
import { formatDateTime, capitalize, formatObservationValue } from '@medplum/core';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { CodeableConceptDisplay } from '../CodeableConceptDisplay/CodeableConceptDisplay.
|
|
5
|
-
import { MedplumLink } from '../MedplumLink/MedplumLink.
|
|
6
|
-
import { RangeDisplay } from '../RangeDisplay/RangeDisplay.
|
|
7
|
-
import { ResourceBadge } from '../ResourceBadge/ResourceBadge.
|
|
8
|
-
import { StatusBadge } from '../StatusBadge/StatusBadge.
|
|
9
|
-
import { useResource } from '../useResource/useResource.
|
|
4
|
+
import { CodeableConceptDisplay } from '../CodeableConceptDisplay/CodeableConceptDisplay.mjs';
|
|
5
|
+
import { MedplumLink } from '../MedplumLink/MedplumLink.mjs';
|
|
6
|
+
import { RangeDisplay } from '../RangeDisplay/RangeDisplay.mjs';
|
|
7
|
+
import { ResourceBadge } from '../ResourceBadge/ResourceBadge.mjs';
|
|
8
|
+
import { StatusBadge } from '../StatusBadge/StatusBadge.mjs';
|
|
9
|
+
import { useResource } from '../useResource/useResource.mjs';
|
|
10
10
|
|
|
11
11
|
const useStyles = createStyles((theme) => ({
|
|
12
12
|
table: {
|
|
@@ -28,20 +28,19 @@ const useStyles = createStyles((theme) => ({
|
|
|
28
28
|
},
|
|
29
29
|
}));
|
|
30
30
|
function DiagnosticReportDisplay(props) {
|
|
31
|
-
var _a, _b;
|
|
32
31
|
const diagnosticReport = useResource(props.value);
|
|
33
|
-
const specimen = useResource(
|
|
32
|
+
const specimen = useResource(diagnosticReport?.specimen?.[0]);
|
|
34
33
|
if (!diagnosticReport) {
|
|
35
34
|
return null;
|
|
36
35
|
}
|
|
37
36
|
let textContent = '';
|
|
38
37
|
if (diagnosticReport.presentedForm && diagnosticReport.presentedForm.length > 0) {
|
|
39
38
|
const pf = diagnosticReport.presentedForm[0];
|
|
40
|
-
if (
|
|
39
|
+
if (pf.contentType?.startsWith('text/plain') && pf.data) {
|
|
41
40
|
textContent = window.atob(pf.data);
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
|
-
if (specimen
|
|
43
|
+
if (specimen?.note) {
|
|
45
44
|
for (const note of specimen.note) {
|
|
46
45
|
textContent += note.text + '\n\n';
|
|
47
46
|
}
|
|
@@ -68,7 +67,6 @@ function DiagnosticReportDisplay(props) {
|
|
|
68
67
|
textContent && React.createElement("pre", null, textContent.trim())));
|
|
69
68
|
}
|
|
70
69
|
function ObservationTable(props) {
|
|
71
|
-
var _a;
|
|
72
70
|
const { classes } = useStyles();
|
|
73
71
|
return (React.createElement("table", { className: classes.table },
|
|
74
72
|
React.createElement("thead", null,
|
|
@@ -79,7 +77,7 @@ function ObservationTable(props) {
|
|
|
79
77
|
React.createElement("th", null, "Interpretation"),
|
|
80
78
|
React.createElement("th", null, "Category"),
|
|
81
79
|
React.createElement("th", null, "Status"))),
|
|
82
|
-
React.createElement("tbody", null,
|
|
80
|
+
React.createElement("tbody", null, props.value?.map((observation, index) => (React.createElement(ObservationRow, { key: 'obs-' + index, value: observation }))))));
|
|
83
81
|
}
|
|
84
82
|
function ObservationRow(props) {
|
|
85
83
|
const { classes, cx } = useStyles();
|
|
@@ -97,7 +95,7 @@ function ObservationRow(props) {
|
|
|
97
95
|
React.createElement("td", null,
|
|
98
96
|
React.createElement(ReferenceRangeDisplay, { value: observation.referenceRange })),
|
|
99
97
|
React.createElement("td", null, observation.interpretation && observation.interpretation.length > 0 && (React.createElement(CodeableConceptDisplay, { value: observation.interpretation[0] }))),
|
|
100
|
-
React.createElement("td", null, observation.category && observation.category.length > 0 && (React.createElement("ul", null, observation.category.map((concept) => (React.createElement("li",
|
|
98
|
+
React.createElement("td", null, observation.category && observation.category.length > 0 && (React.createElement("ul", null, observation.category.map((concept, index) => (React.createElement("li", { key: `category-${index}` },
|
|
101
99
|
React.createElement(CodeableConceptDisplay, { value: concept }))))))),
|
|
102
100
|
React.createElement("td", null, observation.status && React.createElement(StatusBadge, { status: observation.status }))));
|
|
103
101
|
}
|
|
@@ -122,10 +120,9 @@ function ReferenceRangeDisplay(props) {
|
|
|
122
120
|
* @returns True if the FHIR observation is a critical value.
|
|
123
121
|
*/
|
|
124
122
|
function isCritical(observation) {
|
|
125
|
-
|
|
126
|
-
const code = (_d = (_c = (_b = (_a = observation.interpretation) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.coding) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.code;
|
|
123
|
+
const code = observation.interpretation?.[0]?.coding?.[0]?.code;
|
|
127
124
|
return code === 'AA' || code === 'LL' || code === 'HH' || code === 'A';
|
|
128
125
|
}
|
|
129
126
|
|
|
130
127
|
export { DiagnosticReportDisplay, ObservationTable };
|
|
131
|
-
//# sourceMappingURL=DiagnosticReportDisplay.
|
|
128
|
+
//# sourceMappingURL=DiagnosticReportDisplay.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiagnosticReportDisplay.mjs","sources":["../../../src/DiagnosticReportDisplay/DiagnosticReportDisplay.tsx"],"sourcesContent":["import { createStyles, Group, Stack, Text, Title } from '@mantine/core';\nimport { capitalize, formatDateTime, formatObservationValue } from '@medplum/core';\nimport {\n DiagnosticReport,\n Observation,\n ObservationComponent,\n ObservationReferenceRange,\n Reference,\n} from '@medplum/fhirtypes';\nimport React from 'react';\nimport { CodeableConceptDisplay } from '../CodeableConceptDisplay/CodeableConceptDisplay';\nimport { MedplumLink } from '../MedplumLink/MedplumLink';\nimport { RangeDisplay } from '../RangeDisplay/RangeDisplay';\nimport { ResourceBadge } from '../ResourceBadge/ResourceBadge';\nimport { StatusBadge } from '../StatusBadge/StatusBadge';\nimport { useResource } from '../useResource/useResource';\n\nconst useStyles = createStyles((theme) => ({\n table: {\n border: `0.1px solid ${theme.colors.gray[5]}`,\n borderCollapse: 'collapse',\n\n '& td, & th': {\n border: `0.1px solid ${theme.colors.gray[5]}`,\n padding: 4,\n },\n },\n\n criticalRow: {\n background: theme.colorScheme === 'dark' ? theme.colors.red[7] : theme.colors.red[1],\n border: `0.1px solid ${theme.colors.red[5]}`,\n color: theme.colors.red[5],\n fontWeight: 500,\n\n '& td': {\n border: `0.1px solid ${theme.colors.red[5]}`,\n },\n },\n}));\n\nexport interface DiagnosticReportDisplayProps {\n value?: DiagnosticReport | Reference<DiagnosticReport>;\n}\n\nexport function DiagnosticReportDisplay(props: DiagnosticReportDisplayProps): JSX.Element | null {\n const diagnosticReport = useResource(props.value);\n const specimen = useResource(diagnosticReport?.specimen?.[0]);\n\n if (!diagnosticReport) {\n return null;\n }\n\n let textContent = '';\n\n if (diagnosticReport.presentedForm && diagnosticReport.presentedForm.length > 0) {\n const pf = diagnosticReport.presentedForm[0];\n if (pf.contentType?.startsWith('text/plain') && pf.data) {\n textContent = window.atob(pf.data);\n }\n }\n\n if (specimen?.note) {\n for (const note of specimen.note) {\n textContent += note.text + '\\n\\n';\n }\n }\n\n return (\n <Stack>\n <Title>Diagnostic Report</Title>\n <Group mt=\"md\" spacing={30}>\n {diagnosticReport.subject && (\n <div>\n <Text size=\"xs\" transform=\"uppercase\" color=\"dimmed\">\n Subject\n </Text>\n <Text>\n <ResourceBadge value={diagnosticReport.subject} link={true} />\n </Text>\n </div>\n )}\n {diagnosticReport.resultsInterpreter &&\n diagnosticReport.resultsInterpreter.map((interpreter) => (\n <div key={interpreter.reference}>\n <Text size=\"xs\" transform=\"uppercase\" color=\"dimmed\">\n Interpreter\n </Text>\n <Text>\n <ResourceBadge value={interpreter} link={true} />\n </Text>\n </div>\n ))}\n {diagnosticReport.issued && (\n <div>\n <Text size=\"xs\" transform=\"uppercase\" color=\"dimmed\">\n Issued\n </Text>\n <Text>{formatDateTime(diagnosticReport.issued)}</Text>\n </div>\n )}\n {diagnosticReport.status && (\n <div>\n <Text size=\"xs\" transform=\"uppercase\" color=\"dimmed\">\n Status\n </Text>\n <Text>{capitalize(diagnosticReport.status)}</Text>\n </div>\n )}\n </Group>\n {diagnosticReport.result && <ObservationTable value={diagnosticReport.result} />}\n {textContent && <pre>{textContent.trim()}</pre>}\n </Stack>\n );\n}\n\nexport interface ObservationTableProps {\n value?: Observation[] | Reference<Observation>[];\n}\n\nexport function ObservationTable(props: ObservationTableProps): JSX.Element {\n const { classes } = useStyles();\n return (\n <table className={classes.table}>\n <thead>\n <tr>\n <th>Test</th>\n <th>Value</th>\n <th>Reference Range</th>\n <th>Interpretation</th>\n <th>Category</th>\n <th>Status</th>\n </tr>\n </thead>\n <tbody>\n {props.value?.map((observation, index) => (\n <ObservationRow key={'obs-' + index} value={observation} />\n ))}\n </tbody>\n </table>\n );\n}\n\ninterface ObservationRowProps {\n value: Observation | Reference<Observation>;\n}\n\nfunction ObservationRow(props: ObservationRowProps): JSX.Element | null {\n const { classes, cx } = useStyles();\n const observation = useResource(props.value);\n if (!observation) {\n return null;\n }\n\n const critical = isCritical(observation);\n\n return (\n <tr className={cx({ [classes.criticalRow]: critical })}>\n <td>\n <MedplumLink to={observation}>\n <CodeableConceptDisplay value={observation.code} />\n </MedplumLink>\n </td>\n <td>\n <ObservationValueDisplay value={observation} />\n </td>\n <td>\n <ReferenceRangeDisplay value={observation.referenceRange} />\n </td>\n <td>\n {observation.interpretation && observation.interpretation.length > 0 && (\n <CodeableConceptDisplay value={observation.interpretation[0]} />\n )}\n </td>\n <td>\n {observation.category && observation.category.length > 0 && (\n <ul>\n {observation.category.map((concept, index) => (\n <li key={`category-${index}`}>\n <CodeableConceptDisplay value={concept} />\n </li>\n ))}\n </ul>\n )}\n </td>\n <td>{observation.status && <StatusBadge status={observation.status} />}</td>\n </tr>\n );\n}\n\ninterface ObservationValueDisplayProps {\n value?: Observation | ObservationComponent;\n}\n\nfunction ObservationValueDisplay(props: ObservationValueDisplayProps): JSX.Element | null {\n const obs = props.value;\n return <>{formatObservationValue(obs)}</>;\n}\n\ninterface ReferenceRangeProps {\n value?: ObservationReferenceRange[];\n}\n\nfunction ReferenceRangeDisplay(props: ReferenceRangeProps): JSX.Element | null {\n const range = props.value && props.value.length > 0 && props.value[0];\n if (!range) {\n return null;\n }\n if (range.text) {\n return <>{range.text}</>;\n }\n return <RangeDisplay value={range} />;\n}\n\n/**\n * Returns true if the observation is critical.\n * See: https://www.hl7.org/fhir/valueset-observation-interpretation.html\n * @param observation The FHIR observation.\n * @returns True if the FHIR observation is a critical value.\n */\nfunction isCritical(observation: Observation): boolean {\n const code = observation.interpretation?.[0]?.coding?.[0]?.code;\n return code === 'AA' || code === 'LL' || code === 'HH' || code === 'A';\n}\n"],"names":[],"mappings":";;;;;;;;;;AAiBA,MAAM,SAAS,GAAG,YAAY,CAAC,CAAC,KAAK,MAAM;AACzC,IAAA,KAAK,EAAE;QACL,MAAM,EAAE,CAAe,YAAA,EAAA,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAE,CAAA;AAC7C,QAAA,cAAc,EAAE,UAAU;AAE1B,QAAA,YAAY,EAAE;YACZ,MAAM,EAAE,CAAe,YAAA,EAAA,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAE,CAAA;AAC7C,YAAA,OAAO,EAAE,CAAC;AACX,SAAA;AACF,KAAA;AAED,IAAA,WAAW,EAAE;QACX,UAAU,EAAE,KAAK,CAAC,WAAW,KAAK,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QACpF,MAAM,EAAE,CAAe,YAAA,EAAA,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,CAAA;QAC5C,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,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACtE,IAAI,CAAC,KAAK,EAAE;AACV,QAAA,OAAO,IAAI,CAAC;AACb,KAAA;IACD,IAAI,KAAK,CAAC,IAAI,EAAE;AACd,QAAA,OAAO,KAAG,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAA,KAAK,CAAC,IAAI,CAAI,CAAC;AAC1B,KAAA;AACD,IAAA,OAAO,oBAAC,YAAY,EAAA,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC;AACxC,CAAC;AAED;;;;;AAKG;AACH,SAAS,UAAU,CAAC,WAAwB,EAAA;AAC1C,IAAA,MAAM,IAAI,GAAG,WAAW,CAAC,cAAc,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC;AAChE,IAAA,OAAO,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC;AACzE;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Container } from '../Container/Container.mjs';
|
|
3
|
+
import { Panel } from '../Panel/Panel.mjs';
|
|
4
|
+
|
|
5
|
+
function Document(props) {
|
|
6
|
+
const { children, ...others } = props;
|
|
7
|
+
return (React.createElement(Container, null,
|
|
8
|
+
React.createElement(Panel, { ...others }, children)));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { Document };
|
|
12
|
+
//# sourceMappingURL=Document.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Document.mjs","sources":["../../../src/Document/Document.tsx"],"sourcesContent":["import React from 'react';\nimport { Container } from '../Container/Container';\nimport { Panel, PanelProps } from '../Panel/Panel';\n\nexport function Document(props: PanelProps): JSX.Element {\n const { children, ...others } = props;\n return (\n <Container>\n <Panel {...others}>{children}</Panel>\n </Container>\n );\n}\n"],"names":[],"mappings":";;;;AAIM,SAAU,QAAQ,CAAC,KAAiB,EAAA;IACxC,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC;IACtC,QACE,oBAAC,SAAS,EAAA,IAAA;QACR,KAAC,CAAA,aAAA,CAAA,KAAK,OAAK,MAAM,EAAA,EAAG,QAAQ,CAAS,CAC3B,EACZ;AACJ;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getReferenceString, createReference } from '@medplum/core';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { ResourceTimeline } from '../ResourceTimeline/ResourceTimeline.
|
|
3
|
+
import { ResourceTimeline } from '../ResourceTimeline/ResourceTimeline.mjs';
|
|
4
4
|
|
|
5
5
|
function EncounterTimeline(props) {
|
|
6
6
|
return (React.createElement(ResourceTimeline, { value: props.encounter, buildSearchRequests: (resource) => ({
|
|
@@ -46,4 +46,4 @@ function EncounterTimeline(props) {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export { EncounterTimeline };
|
|
49
|
-
//# sourceMappingURL=EncounterTimeline.
|
|
49
|
+
//# sourceMappingURL=EncounterTimeline.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EncounterTimeline.mjs","sources":["../../../src/EncounterTimeline/EncounterTimeline.tsx"],"sourcesContent":["import { createReference, getReferenceString, ProfileResource } from '@medplum/core';\nimport { Attachment, Encounter, Reference, Resource } from '@medplum/fhirtypes';\nimport React from 'react';\nimport { ResourceTimeline } from '../ResourceTimeline/ResourceTimeline';\n\nexport interface EncounterTimelineProps {\n encounter: Encounter | Reference<Encounter>;\n}\n\nexport function EncounterTimeline(props: EncounterTimelineProps): JSX.Element {\n return (\n <ResourceTimeline\n value={props.encounter}\n buildSearchRequests={(resource: Resource) => ({\n resourceType: 'Bundle',\n type: 'batch',\n entry: [\n {\n request: {\n method: 'GET',\n url: `${getReferenceString(resource)}/_history`,\n },\n },\n {\n request: {\n method: 'GET',\n url: `Communication?encounter=${getReferenceString(resource)}`,\n },\n },\n {\n request: {\n method: 'GET',\n url: `Media?encounter=${getReferenceString(resource)}`,\n },\n },\n ],\n })}\n createCommunication={(resource: Encounter, sender: ProfileResource, text: string) => ({\n resourceType: 'Communication',\n status: 'completed',\n encounter: createReference(resource),\n subject: resource.subject,\n sender: createReference(sender),\n sent: new Date().toISOString(),\n payload: [{ contentString: text }],\n })}\n createMedia={(resource: Encounter, operator: ProfileResource, content: Attachment) => ({\n resourceType: 'Media',\n status: 'completed',\n encounter: createReference(resource),\n subject: resource.subject,\n operator: createReference(operator),\n issued: new Date().toISOString(),\n content,\n })}\n />\n );\n}\n"],"names":[],"mappings":";;;;AASM,SAAU,iBAAiB,CAAC,KAA6B,EAAA;AAC7D,IAAA,QACE,KAAC,CAAA,aAAA,CAAA,gBAAgB,EACf,EAAA,KAAK,EAAE,KAAK,CAAC,SAAS,EACtB,mBAAmB,EAAE,CAAC,QAAkB,MAAM;AAC5C,YAAA,YAAY,EAAE,QAAQ;AACtB,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,KAAK,EAAE;AACL,gBAAA;AACE,oBAAA,OAAO,EAAE;AACP,wBAAA,MAAM,EAAE,KAAK;AACb,wBAAA,GAAG,EAAE,CAAG,EAAA,kBAAkB,CAAC,QAAQ,CAAC,CAAW,SAAA,CAAA;AAChD,qBAAA;AACF,iBAAA;AACD,gBAAA;AACE,oBAAA,OAAO,EAAE;AACP,wBAAA,MAAM,EAAE,KAAK;AACb,wBAAA,GAAG,EAAE,CAA2B,wBAAA,EAAA,kBAAkB,CAAC,QAAQ,CAAC,CAAE,CAAA;AAC/D,qBAAA;AACF,iBAAA;AACD,gBAAA;AACE,oBAAA,OAAO,EAAE;AACP,wBAAA,MAAM,EAAE,KAAK;AACb,wBAAA,GAAG,EAAE,CAAmB,gBAAA,EAAA,kBAAkB,CAAC,QAAQ,CAAC,CAAE,CAAA;AACvD,qBAAA;AACF,iBAAA;AACF,aAAA;AACF,SAAA,CAAC,EACF,mBAAmB,EAAE,CAAC,QAAmB,EAAE,MAAuB,EAAE,IAAY,MAAM;AACpF,YAAA,YAAY,EAAE,eAAe;AAC7B,YAAA,MAAM,EAAE,WAAW;AACnB,YAAA,SAAS,EAAE,eAAe,CAAC,QAAQ,CAAC;YACpC,OAAO,EAAE,QAAQ,CAAC,OAAO;AACzB,YAAA,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC;AAC/B,YAAA,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;AAC9B,YAAA,OAAO,EAAE,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;AACnC,SAAA,CAAC,EACF,WAAW,EAAE,CAAC,QAAmB,EAAE,QAAyB,EAAE,OAAmB,MAAM;AACrF,YAAA,YAAY,EAAE,OAAO;AACrB,YAAA,MAAM,EAAE,WAAW;AACnB,YAAA,SAAS,EAAE,eAAe,CAAC,QAAQ,CAAC;YACpC,OAAO,EAAE,QAAQ,CAAC,OAAO;AACzB,YAAA,QAAQ,EAAE,eAAe,CAAC,QAAQ,CAAC;AACnC,YAAA,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YAChC,OAAO;SACR,CAAC,EAAA,CACF,EACF;AACJ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.mjs","sources":["../../../src/ErrorBoundary/ErrorBoundary.tsx"],"sourcesContent":["import { Alert } from '@mantine/core';\nimport { normalizeErrorString } from '@medplum/core';\nimport { IconAlertCircle } from '@tabler/icons';\nimport React, { ErrorInfo, ReactNode } from 'react';\n\nexport interface ErrorBoundaryProps {\n children: ReactNode;\n}\n\nexport interface ErrorBoundaryState {\n error?: any;\n}\n\n/**\n * ErrorBoundary is a React component that handles errors in its child components.\n * See: https://reactjs.org/docs/error-boundaries.html\n */\nexport class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {\n state: ErrorBoundaryState;\n\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = {};\n }\n\n static getDerivedStateFromError(error: any): ErrorBoundaryState {\n return { error };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n console.error('Uncaught error:', error, errorInfo);\n }\n\n render(): ReactNode {\n if (this.state.error) {\n return (\n <Alert icon={<IconAlertCircle size={16} />} title=\"Something went wrong\" color=\"red\">\n {normalizeErrorString(this.state.error)}\n </Alert>\n );\n }\n\n return this.props.children;\n }\n}\n"],"names":[],"mappings":";;;;;AAaA;;;AAGG;AACU,MAAA,aAAc,SAAQ,KAAK,CAAC,SAAiD,CAAA;AAGxF,IAAA,WAAA,CAAY,KAAyB,EAAA;QACnC,KAAK,CAAC,KAAK,CAAC,CAAC;AACb,QAAA,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;KACjB;IAED,OAAO,wBAAwB,CAAC,KAAU,EAAA;QACxC,OAAO,EAAE,KAAK,EAAE,CAAC;KAClB;IAED,iBAAiB,CAAC,KAAY,EAAE,SAAoB,EAAA;QAClD,OAAO,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;KACpD;IAED,MAAM,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;AACpB,YAAA,QACE,KAAA,CAAA,aAAA,CAAC,KAAK,EAAA,EAAC,IAAI,EAAE,KAAA,CAAA,aAAA,CAAC,eAAe,EAAA,EAAC,IAAI,EAAE,EAAE,EAAA,CAAI,EAAE,KAAK,EAAC,sBAAsB,EAAC,KAAK,EAAC,KAAK,EAAA,EACjF,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CACjC,EACR;AACH,SAAA;AAED,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;KAC5B;AACF;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExtensionInput.mjs","sources":["../../../src/ExtensionInput/ExtensionInput.tsx"],"sourcesContent":["import { JsonInput } from '@mantine/core';\nimport { stringify } from '@medplum/core';\nimport { Extension } from '@medplum/fhirtypes';\nimport React from 'react';\n\nexport interface ExtensionInputProps {\n name: string;\n defaultValue?: Extension;\n onChange?: (value: Extension) => void;\n}\n\nexport function ExtensionInput(props: ExtensionInputProps): JSX.Element {\n return (\n <JsonInput\n id={props.name}\n name={props.name}\n data-testid=\"extension-input\"\n defaultValue={stringify(props.defaultValue)}\n onChange={(newValue) => {\n if (props.onChange) {\n props.onChange(JSON.parse(newValue));\n }\n }}\n />\n );\n}\n"],"names":[],"mappings":";;;;AAWM,SAAU,cAAc,CAAC,KAA0B,EAAA;AACvD,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,EAAE,EAAE,KAAK,CAAC,IAAI,EACd,IAAI,EAAE,KAAK,CAAC,IAAI,EAAA,aAAA,EACJ,iBAAiB,EAC7B,YAAY,EAAE,SAAS,CAAC,KAAK,CAAC,YAAY,CAAC,EAC3C,QAAQ,EAAE,CAAC,QAAQ,KAAI;YACrB,IAAI,KAAK,CAAC,QAAQ,EAAE;gBAClB,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;AACtC,aAAA;SACF,EAAA,CACD,EACF;AACJ;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { evalFhirPath } from '@medplum/core';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { ResourcePropertyDisplay } from '../ResourcePropertyDisplay/ResourcePropertyDisplay.
|
|
3
|
+
import { ResourcePropertyDisplay } from '../ResourcePropertyDisplay/ResourcePropertyDisplay.mjs';
|
|
4
4
|
|
|
5
5
|
function FhirPathDisplay(props) {
|
|
6
6
|
let value;
|
|
@@ -20,4 +20,4 @@ function FhirPathDisplay(props) {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export { FhirPathDisplay };
|
|
23
|
-
//# sourceMappingURL=FhirPathDisplay.
|
|
23
|
+
//# sourceMappingURL=FhirPathDisplay.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FhirPathDisplay.mjs","sources":["../../../src/FhirPathDisplay/FhirPathDisplay.tsx"],"sourcesContent":["import { evalFhirPath, PropertyType } from '@medplum/core';\nimport { Resource } from '@medplum/fhirtypes';\nimport React from 'react';\nimport { ResourcePropertyDisplay } from '../ResourcePropertyDisplay/ResourcePropertyDisplay';\n\nexport interface FhirPathDisplayProps {\n resource: Resource;\n path: string;\n propertyType: PropertyType;\n}\n\nexport function FhirPathDisplay(props: FhirPathDisplayProps): JSX.Element | null {\n let value;\n\n try {\n value = evalFhirPath(props.path, props.resource);\n } catch (err) {\n console.warn('FhirPathDisplay:', err);\n return null;\n }\n\n if (value.length > 1) {\n throw new Error(\n `Component \"path\" for \"FhirPathDisplay\" must resolve to a single element. \\\n Received ${value.length} elements \\\n [${JSON.stringify(value, null, 2)}]`\n );\n }\n return <ResourcePropertyDisplay value={value[0] || ''} propertyType={props.propertyType} />;\n}\n"],"names":[],"mappings":";;;;AAWM,SAAU,eAAe,CAAC,KAA2B,EAAA;AACzD,IAAA,IAAI,KAAK,CAAC;IAEV,IAAI;QACF,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;AAClD,KAAA;AAAC,IAAA,OAAO,GAAG,EAAE;AACZ,QAAA,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;AACtC,QAAA,OAAO,IAAI,CAAC;AACb,KAAA;AAED,IAAA,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,MAAM,IAAI,KAAK,CACb,CAAA;AACY,gBAAA,EAAA,KAAK,CAAC,MAAM,CAAA;UACpB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAG,CAAA,CAAA,CACtC,CAAC;AACH,KAAA;AACD,IAAA,OAAO,oBAAC,uBAAuB,EAAA,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,YAAY,EAAE,KAAK,CAAC,YAAY,GAAI,CAAC;AAC9F;;;;"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { Loader, Table, Button } from '@mantine/core';
|
|
2
2
|
import React, { useState, useRef, useEffect } from 'react';
|
|
3
|
-
import { FhirPathDisplay } from '../FhirPathDisplay/FhirPathDisplay.
|
|
4
|
-
import { useMedplum } from '../MedplumProvider/MedplumProvider.
|
|
5
|
-
import { SearchClickEvent } from '../SearchControl/SearchControl.
|
|
6
|
-
import { killEvent, isCheckboxCell } from '../utils/dom.
|
|
3
|
+
import { FhirPathDisplay } from '../FhirPathDisplay/FhirPathDisplay.mjs';
|
|
4
|
+
import { useMedplum } from '../MedplumProvider/MedplumProvider.mjs';
|
|
5
|
+
import { SearchClickEvent } from '../SearchControl/SearchControl.mjs';
|
|
6
|
+
import { killEvent, isCheckboxCell } from '../utils/dom.mjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The FhirPathTable component represents the embeddable search table control.
|
|
10
10
|
*/
|
|
11
11
|
function FhirPathTable(props) {
|
|
12
|
-
var _a, _b, _c, _d, _e;
|
|
13
12
|
const medplum = useMedplum();
|
|
14
13
|
const [schema, setSchema] = useState();
|
|
15
14
|
const [outcome, setOutcome] = useState();
|
|
@@ -28,7 +27,7 @@ function FhirPathTable(props) {
|
|
|
28
27
|
e.stopPropagation();
|
|
29
28
|
const el = e.target;
|
|
30
29
|
const checked = el.checked;
|
|
31
|
-
const newSelected =
|
|
30
|
+
const newSelected = { ...selectedRef.current };
|
|
32
31
|
if (checked) {
|
|
33
32
|
newSelected[id] = true;
|
|
34
33
|
}
|
|
@@ -38,15 +37,14 @@ function FhirPathTable(props) {
|
|
|
38
37
|
setSelected(newSelected);
|
|
39
38
|
}
|
|
40
39
|
function handleAllCheckboxClick(e) {
|
|
41
|
-
var _a, _b;
|
|
42
40
|
e.stopPropagation();
|
|
43
41
|
const el = e.target;
|
|
44
42
|
const checked = el.checked;
|
|
45
43
|
const newSelected = {};
|
|
46
|
-
const resources =
|
|
44
|
+
const resources = responseRef.current?.data?.ResourceList;
|
|
47
45
|
if (checked && resources) {
|
|
48
46
|
resources.forEach((resource) => {
|
|
49
|
-
if (resource
|
|
47
|
+
if (resource?.id) {
|
|
50
48
|
newSelected[resource.id] = true;
|
|
51
49
|
}
|
|
52
50
|
});
|
|
@@ -54,13 +52,12 @@ function FhirPathTable(props) {
|
|
|
54
52
|
setSelected(newSelected);
|
|
55
53
|
}
|
|
56
54
|
function isAllSelected() {
|
|
57
|
-
|
|
58
|
-
const resources = (_b = (_a = responseRef.current) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.ResourceList;
|
|
55
|
+
const resources = responseRef.current?.data?.ResourceList;
|
|
59
56
|
if (!resources || resources.length === 0) {
|
|
60
57
|
return false;
|
|
61
58
|
}
|
|
62
59
|
for (const resource of resources) {
|
|
63
|
-
if (
|
|
60
|
+
if (resource?.id && !selectedRef.current[resource.id]) {
|
|
64
61
|
return false;
|
|
65
62
|
}
|
|
66
63
|
}
|
|
@@ -85,11 +82,11 @@ function FhirPathTable(props) {
|
|
|
85
82
|
.then((newSchema) => {
|
|
86
83
|
// The schema could have the same object identity,
|
|
87
84
|
// so need to use the spread operator to kick React re-render.
|
|
88
|
-
setSchema(
|
|
85
|
+
setSchema({ ...newSchema });
|
|
89
86
|
})
|
|
90
87
|
.catch(console.log);
|
|
91
88
|
}, [medplum, props.resourceType]);
|
|
92
|
-
const typeSchema =
|
|
89
|
+
const typeSchema = schema?.types?.[props.resourceType];
|
|
93
90
|
if (!typeSchema) {
|
|
94
91
|
return React.createElement(Loader, null);
|
|
95
92
|
}
|
|
@@ -101,14 +98,14 @@ function FhirPathTable(props) {
|
|
|
101
98
|
checkboxColumn && (React.createElement("th", null,
|
|
102
99
|
React.createElement("input", { type: "checkbox", value: "checked", "aria-label": "all-checkbox", "data-testid": "all-checkbox", checked: isAllSelected(), onChange: (e) => handleAllCheckboxClick(e) }))),
|
|
103
100
|
fields.map((field) => (React.createElement("th", { key: field.name }, field.name))))),
|
|
104
|
-
React.createElement("tbody", null,
|
|
101
|
+
React.createElement("tbody", null, response?.data?.ResourceList?.map((resource) => resource && (React.createElement("tr", { key: resource.id, "data-testid": "search-control-row", onClick: (e) => handleRowClick(e, resource), onAuxClick: (e) => handleRowClick(e, resource) },
|
|
105
102
|
checkboxColumn && (React.createElement("td", null,
|
|
106
103
|
React.createElement("input", { type: "checkbox", value: "checked", "data-testid": "row-checkbox", "aria-label": `Checkbox for ${resource.id}`, checked: !!selected[resource.id], onChange: (e) => handleSingleCheckboxClick(e, resource.id) }))),
|
|
107
104
|
fields.map((field) => {
|
|
108
105
|
return (React.createElement("td", { key: field.name },
|
|
109
106
|
React.createElement(FhirPathDisplay, { propertyType: field.propertyType, path: field.fhirPath, resource: resource })));
|
|
110
107
|
})))))),
|
|
111
|
-
|
|
108
|
+
response?.data?.ResourceList?.length === 0 && React.createElement("div", { "data-testid": "empty-search" }, "No results"),
|
|
112
109
|
outcome && (React.createElement("div", { "data-testid": "search-error" },
|
|
113
110
|
React.createElement("pre", { style: { textAlign: 'left' } }, JSON.stringify(outcome, undefined, 2)))),
|
|
114
111
|
props.onBulk && (React.createElement(Button, { onClick: () => props.onBulk(Object.keys(selectedRef.current)) }, "Bulk..."))));
|
|
@@ -116,4 +113,4 @@ function FhirPathTable(props) {
|
|
|
116
113
|
const MemoizedFhirPathTable = React.memo(FhirPathTable);
|
|
117
114
|
|
|
118
115
|
export { FhirPathTable, MemoizedFhirPathTable };
|
|
119
|
-
//# sourceMappingURL=FhirPathTable.
|
|
116
|
+
//# sourceMappingURL=FhirPathTable.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FhirPathTable.mjs","sources":["../../../src/FhirPathTable/FhirPathTable.tsx"],"sourcesContent":["import { Button, Loader, Table } from '@mantine/core';\nimport { IndexedStructureDefinition, PropertyType } from '@medplum/core';\nimport { OperationOutcome, Resource } from '@medplum/fhirtypes';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { FhirPathDisplay } from '../FhirPathDisplay/FhirPathDisplay';\nimport { useMedplum } from '../MedplumProvider/MedplumProvider';\nimport { SearchClickEvent } from '../SearchControl/SearchControl';\nimport { isCheckboxCell, killEvent } from '../utils/dom';\n\nexport interface FhirPathTableField {\n readonly propertyType: PropertyType;\n readonly name: string;\n readonly fhirPath: string;\n}\n\nexport interface FhirPathTableProps {\n resourceType: string;\n query: string;\n fields: FhirPathTableField[];\n checkboxesEnabled?: boolean;\n onClick?: (e: SearchClickEvent) => void;\n onAuxClick?: (e: SearchClickEvent) => void;\n onBulk?: (ids: string[]) => void;\n}\n\nexport interface SmartSearchResponse {\n data: {\n ResourceList: Resource[];\n };\n}\n\n/**\n * The FhirPathTable component represents the embeddable search table control.\n */\nexport function FhirPathTable(props: FhirPathTableProps): JSX.Element {\n const medplum = useMedplum();\n const [schema, setSchema] = useState<IndexedStructureDefinition | undefined>();\n const [outcome, setOutcome] = useState<OperationOutcome | undefined>();\n const { query, fields } = props;\n const [response, setResponse] = useState<SmartSearchResponse | undefined>();\n const [selected, setSelected] = useState<{ [id: string]: boolean }>({});\n\n const responseRef = useRef<SmartSearchResponse>();\n responseRef.current = response;\n\n const selectedRef = useRef<{ [id: string]: boolean }>({});\n selectedRef.current = selected;\n\n useEffect(() => {\n setOutcome(undefined);\n medplum.graphql(query).then(setResponse).catch(setOutcome);\n }, [medplum, query]);\n\n function handleSingleCheckboxClick(e: React.ChangeEvent, id: string): void {\n e.stopPropagation();\n\n const el = e.target as HTMLInputElement;\n const checked = el.checked;\n const newSelected = { ...selectedRef.current };\n if (checked) {\n newSelected[id] = true;\n } else {\n delete newSelected[id];\n }\n setSelected(newSelected);\n }\n\n function handleAllCheckboxClick(e: React.ChangeEvent): void {\n e.stopPropagation();\n\n const el = e.target as HTMLInputElement;\n const checked = el.checked;\n const newSelected = {} as { [id: string]: boolean };\n const resources = responseRef.current?.data?.ResourceList;\n if (checked && resources) {\n resources.forEach((resource) => {\n if (resource?.id) {\n newSelected[resource.id] = true;\n }\n });\n }\n setSelected(newSelected);\n }\n\n function isAllSelected(): boolean {\n const resources = responseRef.current?.data?.ResourceList;\n if (!resources || resources.length === 0) {\n return false;\n }\n for (const resource of resources) {\n if (resource?.id && !selectedRef.current[resource.id]) {\n return false;\n }\n }\n return true;\n }\n\n function handleRowClick(e: React.MouseEvent, resource: Resource): void {\n if (isCheckboxCell(e.target as Element)) {\n // Ignore clicks on checkboxes\n return;\n }\n\n killEvent(e);\n\n if (e.button !== 1 && props.onClick) {\n props.onClick(new SearchClickEvent(resource, e));\n }\n\n if (e.button === 1 && props.onAuxClick) {\n props.onAuxClick(new SearchClickEvent(resource, e));\n }\n }\n\n useEffect(() => {\n medplum\n .requestSchema(props.resourceType)\n .then((newSchema) => {\n // The schema could have the same object identity,\n // so need to use the spread operator to kick React re-render.\n setSchema({ ...newSchema });\n })\n .catch(console.log);\n }, [medplum, props.resourceType]);\n\n const typeSchema = schema?.types?.[props.resourceType];\n if (!typeSchema) {\n return <Loader />;\n }\n\n const checkboxColumn = props.checkboxesEnabled;\n\n return (\n <div onContextMenu={(e) => killEvent(e)} data-testid=\"search-control\">\n <Table>\n <thead>\n <tr>\n {checkboxColumn && (\n <th>\n <input\n type=\"checkbox\"\n value=\"checked\"\n aria-label=\"all-checkbox\"\n data-testid=\"all-checkbox\"\n checked={isAllSelected()}\n onChange={(e) => handleAllCheckboxClick(e)}\n />\n </th>\n )}\n {fields.map((field) => (\n <th key={field.name}>{field.name}</th>\n ))}\n </tr>\n </thead>\n <tbody>\n {response?.data?.ResourceList?.map(\n (resource) =>\n resource && (\n <tr\n key={resource.id}\n data-testid=\"search-control-row\"\n onClick={(e) => handleRowClick(e, resource)}\n onAuxClick={(e) => handleRowClick(e, resource)}\n >\n {checkboxColumn && (\n <td>\n <input\n type=\"checkbox\"\n value=\"checked\"\n data-testid=\"row-checkbox\"\n aria-label={`Checkbox for ${resource.id}`}\n checked={!!selected[resource.id as string]}\n onChange={(e) => handleSingleCheckboxClick(e, resource.id as string)}\n />\n </td>\n )}\n {fields.map((field) => {\n return (\n <td key={field.name}>\n <FhirPathDisplay propertyType={field.propertyType} path={field.fhirPath} resource={resource} />\n </td>\n );\n })}\n </tr>\n )\n )}\n </tbody>\n </Table>\n {response?.data?.ResourceList?.length === 0 && <div data-testid=\"empty-search\">No results</div>}\n {outcome && (\n <div data-testid=\"search-error\">\n <pre style={{ textAlign: 'left' }}>{JSON.stringify(outcome, undefined, 2)}</pre>\n </div>\n )}\n {props.onBulk && (\n <Button onClick={() => (props.onBulk as (ids: string[]) => any)(Object.keys(selectedRef.current))}>\n Bulk...\n </Button>\n )}\n </div>\n );\n}\n\nexport const MemoizedFhirPathTable = React.memo(FhirPathTable);\n"],"names":[],"mappings":";;;;;;;AA+BA;;AAEG;AACG,SAAU,aAAa,CAAC,KAAyB,EAAA;AACrD,IAAA,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,EAA0C,CAAC;IAC/E,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,EAAgC,CAAC;AACvE,IAAA,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAChC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,EAAmC,CAAC;IAC5E,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAA4B,EAAE,CAAC,CAAC;AAExE,IAAA,MAAM,WAAW,GAAG,MAAM,EAAuB,CAAC;AAClD,IAAA,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;AAE/B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AAY,EAAE,MAAM,KAAK,CAAC,IAAI,KAAiB,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EAAA,cAAc,EAAiB,EAAA,YAAA,CAAA;QAC9F,OAAO,KACN,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EAAiB,cAAc,EAAA;YAC7B,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,IAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAO,CAC5E,CACP;AACA,QAAA,KAAK,CAAC,MAAM,KACX,KAAC,CAAA,aAAA,CAAA,MAAM,EAAC,EAAA,OAAO,EAAE,MAAO,KAAK,CAAC,MAAiC,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,EAAA,EAAA,SAAA,CAExF,CACV,CACG,EACN;AACJ,CAAC;AAEY,MAAA,qBAAqB,GAAG,KAAK,CAAC,IAAI,CAAC,aAAa;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { parseForm } from './FormUtils.
|
|
2
|
+
import { parseForm } from './FormUtils.mjs';
|
|
3
3
|
|
|
4
4
|
function Form(props) {
|
|
5
5
|
return (React.createElement("form", { style: props.style, "data-testid": props.testid, onSubmit: (e) => {
|
|
@@ -12,4 +12,4 @@ function Form(props) {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export { Form };
|
|
15
|
-
//# sourceMappingURL=Form.
|
|
15
|
+
//# sourceMappingURL=Form.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.mjs","sources":["../../../src/Form/Form.tsx"],"sourcesContent":["import React, { CSSProperties } from 'react';\nimport { parseForm } from './FormUtils';\n\nexport interface FormProps {\n onSubmit?: (formData: Record<string, string>) => void;\n style?: CSSProperties;\n children?: React.ReactNode;\n testid?: string;\n}\n\nexport function Form(props: FormProps): JSX.Element {\n return (\n <form\n style={props.style}\n data-testid={props.testid}\n onSubmit={(e: React.SyntheticEvent) => {\n e.preventDefault();\n const formData = parseForm(e.target as HTMLFormElement);\n if (props.onSubmit) {\n props.onSubmit(formData);\n }\n }}\n >\n {props.children}\n </form>\n );\n}\n"],"names":[],"mappings":";;;AAUM,SAAU,IAAI,CAAC,KAAgB,EAAA;AACnC,IAAA,QACE,KACE,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,KAAK,EAAE,KAAK,CAAC,KAAK,EAAA,aAAA,EACL,KAAK,CAAC,MAAM,EACzB,QAAQ,EAAE,CAAC,CAAuB,KAAI;YACpC,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,MAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,MAAyB,CAAC,CAAC;YACxD,IAAI,KAAK,CAAC,QAAQ,EAAE;AAClB,gBAAA,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC1B,aAAA;AACH,SAAC,IAEA,KAAK,CAAC,QAAQ,CACV,EACP;AACJ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormUtils.mjs","sources":["../../../src/Form/FormUtils.ts"],"sourcesContent":["/**\n * Parses an HTML form and returns the result as a JavaScript object.\n * @param form The HTML form element.\n */\nexport function parseForm(form: HTMLFormElement): Record<string, string> {\n const result: Record<string, string> = {};\n\n for (const element of Array.from(form.elements)) {\n if (element instanceof HTMLInputElement) {\n parseInputElement(result, element);\n } else if (element instanceof HTMLTextAreaElement) {\n result[element.name] = element.value;\n } else if (element instanceof HTMLSelectElement) {\n parseSelectElement(result, element);\n }\n }\n\n return result;\n}\n\n/**\n * Parses an HTML input element.\n * Sets the name/value pair in the result,\n * but only if the element is enabled and checked.\n * @param el The input element.\n * @param result The result builder.\n */\nfunction parseInputElement(result: Record<string, string>, el: HTMLInputElement): void {\n if (el.disabled) {\n // Ignore disabled elements\n return;\n }\n\n if ((el.type === 'checkbox' || el.type === 'radio') && !el.checked) {\n // Ignore unchecked radio or checkbox elements\n return;\n }\n\n result[el.name] = el.value;\n}\n\n/**\n * Parses an HTML select element.\n * Sets the name/value pair if one is selected.\n * @param result The result builder.\n * @param el The select element.\n */\nfunction parseSelectElement(result: Record<string, string>, el: HTMLSelectElement): void {\n result[el.name] = el.value;\n}\n"],"names":[],"mappings":"AAAA;;;AAGG;AACG,SAAU,SAAS,CAAC,IAAqB,EAAA;IAC7C,MAAM,MAAM,GAA2B,EAAE,CAAC;IAE1C,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAC/C,IAAI,OAAO,YAAY,gBAAgB,EAAE;AACvC,YAAA,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACpC,SAAA;aAAM,IAAI,OAAO,YAAY,mBAAmB,EAAE;YACjD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;AACtC,SAAA;aAAM,IAAI,OAAO,YAAY,iBAAiB,EAAE;AAC/C,YAAA,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACrC,SAAA;AACF,KAAA;AAED,IAAA,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;AAMG;AACH,SAAS,iBAAiB,CAAC,MAA8B,EAAE,EAAoB,EAAA;IAC7E,IAAI,EAAE,CAAC,QAAQ,EAAE;;QAEf,OAAO;AACR,KAAA;AAED,IAAA,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,UAAU,IAAI,EAAE,CAAC,IAAI,KAAK,OAAO,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE;;QAElE,OAAO;AACR,KAAA;IAED,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;AAC7B,CAAC;AAED;;;;;AAKG;AACH,SAAS,kBAAkB,CAAC,MAA8B,EAAE,EAAqB,EAAA;IAC/E,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;AAC7B;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Input } from '@mantine/core';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { getErrorsForInput } from '../utils/outcomes.
|
|
3
|
+
import { getErrorsForInput } from '../utils/outcomes.mjs';
|
|
4
4
|
|
|
5
5
|
function FormSection(props) {
|
|
6
6
|
return (React.createElement(Input.Wrapper, { id: props.htmlFor, label: props.title, description: props.description, error: getErrorsForInput(props.outcome, props.htmlFor) }, props.children));
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export { FormSection };
|
|
10
|
-
//# sourceMappingURL=FormSection.
|
|
10
|
+
//# sourceMappingURL=FormSection.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormSection.mjs","sources":["../../../src/FormSection/FormSection.tsx"],"sourcesContent":["import { Input } from '@mantine/core';\nimport { OperationOutcome } from '@medplum/fhirtypes';\nimport React from 'react';\nimport { getErrorsForInput } from '../utils/outcomes';\n\nexport interface FormSectionProps {\n title?: string;\n htmlFor?: string;\n description?: string;\n outcome?: OperationOutcome;\n children?: React.ReactNode;\n}\n\nexport function FormSection(props: FormSectionProps): JSX.Element {\n return (\n <Input.Wrapper\n id={props.htmlFor}\n label={props.title}\n description={props.description}\n error={getErrorsForInput(props.outcome, props.htmlFor)}\n >\n {props.children}\n </Input.Wrapper>\n );\n}\n"],"names":[],"mappings":";;;;AAaM,SAAU,WAAW,CAAC,KAAuB,EAAA;AACjD,IAAA,QACE,KAAC,CAAA,aAAA,CAAA,KAAK,CAAC,OAAO,EAAA,EACZ,EAAE,EAAE,KAAK,CAAC,OAAO,EACjB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,EAErD,EAAA,KAAK,CAAC,QAAQ,CACD,EAChB;AACJ;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect } from 'react';
|
|
2
|
-
import { useMedplum } from '../MedplumProvider/MedplumProvider.
|
|
3
|
-
import { createScriptTag } from '../utils/script.
|
|
2
|
+
import { useMedplum } from '../MedplumProvider/MedplumProvider.mjs';
|
|
3
|
+
import { createScriptTag } from '../utils/script.mjs';
|
|
4
4
|
|
|
5
5
|
function GoogleButton(props) {
|
|
6
6
|
const medplum = useMedplum();
|
|
@@ -32,12 +32,11 @@ function GoogleButton(props) {
|
|
|
32
32
|
return React.createElement("div", { ref: parentRef });
|
|
33
33
|
}
|
|
34
34
|
function getGoogleClientId(clientId) {
|
|
35
|
-
var _a, _b;
|
|
36
35
|
if (clientId) {
|
|
37
36
|
return clientId;
|
|
38
37
|
}
|
|
39
38
|
const origin = window.location.protocol + '//' + window.location.host;
|
|
40
|
-
const authorizedOrigins =
|
|
39
|
+
const authorizedOrigins = "http://localhost:3000,http://127.0.0.1:3000,http://localhost:6006,http://127.0.0.1:6006,https://app.medplum.com,https://docs.medplum.com,https://storybook.medplum.com,https://graphiql.medplum.com,https://www.medplum.com"?.split(',') ?? [];
|
|
41
40
|
if (authorizedOrigins.includes(origin)) {
|
|
42
41
|
return "921088377005-3j1sa10vr6hj86jgmdfh2l53v3mp7lfi.apps.googleusercontent.com";
|
|
43
42
|
}
|
|
@@ -45,4 +44,4 @@ function getGoogleClientId(clientId) {
|
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
export { GoogleButton, getGoogleClientId };
|
|
48
|
-
//# sourceMappingURL=GoogleButton.
|
|
47
|
+
//# sourceMappingURL=GoogleButton.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoogleButton.mjs","sources":["../../../src/GoogleButton/GoogleButton.tsx"],"sourcesContent":["import { GoogleCredentialResponse } from '@medplum/core';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { useMedplum } from '../MedplumProvider/MedplumProvider';\nimport { createScriptTag } from '../utils/script';\n\ninterface GoogleApi {\n accounts: {\n id: {\n initialize: (args: any) => void;\n renderButton: (parent: HTMLElement, args: any) => void;\n };\n };\n}\n\ndeclare const google: GoogleApi;\n\nexport interface GoogleButtonProps {\n readonly googleClientId?: string;\n readonly handleGoogleCredential: (response: GoogleCredentialResponse) => void;\n}\n\nexport function GoogleButton(props: GoogleButtonProps): JSX.Element | null {\n const medplum = useMedplum();\n const { googleClientId, handleGoogleCredential } = props;\n const parentRef = useRef<HTMLDivElement>(null);\n const [scriptLoaded, setScriptLoaded] = useState<boolean>(typeof google !== 'undefined');\n const [initialized, setInitialized] = useState<boolean>(false);\n const [buttonRendered, setButtonRendered] = useState<boolean>(false);\n\n useEffect(() => {\n if (typeof google === 'undefined') {\n createScriptTag('https://accounts.google.com/gsi/client', () => setScriptLoaded(true));\n return;\n }\n\n if (!initialized) {\n google.accounts.id.initialize({\n client_id: googleClientId,\n callback: handleGoogleCredential,\n });\n setInitialized(true);\n }\n\n if (parentRef.current && !buttonRendered) {\n google.accounts.id.renderButton(parentRef.current, {});\n setButtonRendered(true);\n }\n }, [medplum, googleClientId, initialized, scriptLoaded, parentRef, buttonRendered, handleGoogleCredential]);\n\n if (!googleClientId) {\n return null;\n }\n\n return <div ref={parentRef} />;\n}\n\nexport function getGoogleClientId(clientId: string | undefined): string | undefined {\n if (clientId) {\n return clientId;\n }\n\n const origin = window.location.protocol + '//' + window.location.host;\n const authorizedOrigins = process.env.GOOGLE_AUTH_ORIGINS?.split(',') ?? [];\n if (authorizedOrigins.includes(origin)) {\n return process.env.GOOGLE_CLIENT_ID;\n }\n\n return undefined;\n}\n"],"names":[],"mappings":";;;;AAqBM,SAAU,YAAY,CAAC,KAAwB,EAAA;AACnD,IAAA,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;AAC7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CAAA,KAAA,EAAA,EAAA,GAAG,EAAE,SAAS,GAAI,CAAC;AACjC,CAAC;AAEK,SAAU,iBAAiB,CAAC,QAA4B,EAAA;AAC5D,IAAA,IAAI,QAAQ,EAAE;AACZ,QAAA,OAAO,QAAQ,CAAC;AACjB,KAAA;AAED,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;AACtE,IAAA,MAAM,iBAAiB,GAAG,6NAA+B,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;AAC5E,IAAA,IAAI,iBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AACtC,QAAA,OAAO,0EAA4B,CAAC;AACrC,KAAA;AAED,IAAA,OAAO,SAAS,CAAC;AACnB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HumanNameDisplay.mjs","sources":["../../../src/HumanNameDisplay/HumanNameDisplay.tsx"],"sourcesContent":["import { formatHumanName, HumanNameFormatOptions } from '@medplum/core';\nimport { HumanName } from '@medplum/fhirtypes';\nimport React from 'react';\n\nexport interface HumanNameDisplayProps {\n value?: HumanName;\n options?: HumanNameFormatOptions;\n}\n\nexport function HumanNameDisplay(props: HumanNameDisplayProps): JSX.Element | null {\n const name = props.value;\n if (!name) {\n return null;\n }\n\n return <>{formatHumanName(name, props.options)}</>;\n}\n"],"names":[],"mappings":";;;AASM,SAAU,gBAAgB,CAAC,KAA4B,EAAA;AAC3D,IAAA,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC;IACzB,IAAI,CAAC,IAAI,EAAE;AACT,QAAA,OAAO,IAAI,CAAC;AACb,KAAA;IAED,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAG,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAI,CAAC;AACrD;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Group, NativeSelect, TextInput } from '@mantine/core';
|
|
2
|
+
import React, { useState, useRef } from 'react';
|
|
3
|
+
|
|
4
|
+
function HumanNameInput(props) {
|
|
5
|
+
const [value, setValue] = useState(props.defaultValue);
|
|
6
|
+
const valueRef = useRef();
|
|
7
|
+
valueRef.current = value;
|
|
8
|
+
function setValueWrapper(newValue) {
|
|
9
|
+
setValue(newValue);
|
|
10
|
+
if (props.onChange) {
|
|
11
|
+
props.onChange(newValue);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function setUse(use) {
|
|
15
|
+
setValueWrapper({ ...valueRef.current, use: use ? use : undefined });
|
|
16
|
+
}
|
|
17
|
+
function setPrefix(prefix) {
|
|
18
|
+
setValueWrapper({
|
|
19
|
+
...valueRef.current,
|
|
20
|
+
prefix: prefix ? prefix.split(' ') : undefined,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function setGiven(given) {
|
|
24
|
+
setValueWrapper({
|
|
25
|
+
...valueRef.current,
|
|
26
|
+
given: given ? given.split(' ') : undefined,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function setFamily(family) {
|
|
30
|
+
setValueWrapper({
|
|
31
|
+
...valueRef.current,
|
|
32
|
+
family: family ? family : undefined,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function setSuffix(suffix) {
|
|
36
|
+
setValueWrapper({
|
|
37
|
+
...valueRef.current,
|
|
38
|
+
suffix: suffix ? suffix.split(' ') : undefined,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return (React.createElement(Group, { spacing: "xs", grow: true, noWrap: true },
|
|
42
|
+
React.createElement(NativeSelect, { defaultValue: value?.use, "data-testid": "use", onChange: (e) => setUse(e.currentTarget.value), data: ['', 'temp', 'old', 'usual', 'official', 'nickname', 'anonymous', 'maiden'] }),
|
|
43
|
+
React.createElement(TextInput, { placeholder: "Prefix", defaultValue: value?.prefix?.join(' '), onChange: (e) => setPrefix(e.currentTarget.value) }),
|
|
44
|
+
React.createElement(TextInput, { placeholder: "Given", defaultValue: value?.given?.join(' '), onChange: (e) => setGiven(e.currentTarget.value) }),
|
|
45
|
+
React.createElement(TextInput, { placeholder: "Family", defaultValue: value?.family, onChange: (e) => setFamily(e.currentTarget.value) }),
|
|
46
|
+
React.createElement(TextInput, { placeholder: "Suffix", defaultValue: value?.suffix?.join(' '), onChange: (e) => setSuffix(e.currentTarget.value) })));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { HumanNameInput };
|
|
50
|
+
//# sourceMappingURL=HumanNameInput.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HumanNameInput.mjs","sources":["../../../src/HumanNameInput/HumanNameInput.tsx"],"sourcesContent":["import { Group, NativeSelect, TextInput } from '@mantine/core';\nimport { HumanName } from '@medplum/fhirtypes';\nimport React, { useRef, useState } from 'react';\n\nexport interface HumanNameInputProps {\n name: string;\n defaultValue?: HumanName;\n onChange?: (value: HumanName) => void;\n}\n\nexport function HumanNameInput(props: HumanNameInputProps): JSX.Element {\n const [value, setValue] = useState<HumanName | undefined>(props.defaultValue);\n\n const valueRef = useRef<HumanName>();\n valueRef.current = value;\n\n function setValueWrapper(newValue: HumanName): void {\n setValue(newValue);\n if (props.onChange) {\n props.onChange(newValue);\n }\n }\n\n function setUse(use: 'temp' | 'old' | 'usual' | 'official' | 'nickname' | 'anonymous' | 'maiden' | undefined): void {\n setValueWrapper({ ...valueRef.current, use: use ? use : undefined });\n }\n\n function setPrefix(prefix: string): void {\n setValueWrapper({\n ...valueRef.current,\n prefix: prefix ? prefix.split(' ') : undefined,\n });\n }\n\n function setGiven(given: string): void {\n setValueWrapper({\n ...valueRef.current,\n given: given ? given.split(' ') : undefined,\n });\n }\n\n function setFamily(family: string): void {\n setValueWrapper({\n ...valueRef.current,\n family: family ? family : undefined,\n });\n }\n\n function setSuffix(suffix: string): void {\n setValueWrapper({\n ...valueRef.current,\n suffix: suffix ? suffix.split(' ') : undefined,\n });\n }\n\n return (\n <Group spacing=\"xs\" grow noWrap>\n <NativeSelect\n defaultValue={value?.use}\n data-testid=\"use\"\n onChange={(e) =>\n setUse(e.currentTarget.value as 'temp' | 'old' | 'usual' | 'official' | 'nickname' | 'anonymous' | 'maiden')\n }\n data={['', 'temp', 'old', 'usual', 'official', 'nickname', 'anonymous', 'maiden']}\n />\n <TextInput\n placeholder=\"Prefix\"\n defaultValue={value?.prefix?.join(' ')}\n onChange={(e) => setPrefix(e.currentTarget.value)}\n />\n <TextInput\n placeholder=\"Given\"\n defaultValue={value?.given?.join(' ')}\n onChange={(e) => setGiven(e.currentTarget.value)}\n />\n <TextInput placeholder=\"Family\" defaultValue={value?.family} onChange={(e) => setFamily(e.currentTarget.value)} />\n <TextInput\n placeholder=\"Suffix\"\n defaultValue={value?.suffix?.join(' ')}\n onChange={(e) => setSuffix(e.currentTarget.value)}\n />\n </Group>\n );\n}\n"],"names":[],"mappings":";;;AAUM,SAAU,cAAc,CAAC,KAA0B,EAAA;AACvD,IAAA,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAwB,KAAK,CAAC,YAAY,CAAC,CAAC;AAE9E,IAAA,MAAM,QAAQ,GAAG,MAAM,EAAa,CAAC;AACrC,IAAA,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC;IAEzB,SAAS,eAAe,CAAC,QAAmB,EAAA;QAC1C,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnB,IAAI,KAAK,CAAC,QAAQ,EAAE;AAClB,YAAA,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC1B,SAAA;KACF;IAED,SAAS,MAAM,CAAC,GAA4F,EAAA;QAC1G,eAAe,CAAC,EAAE,GAAG,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,SAAS,EAAE,CAAC,CAAC;KACtE;IAED,SAAS,SAA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AAC,SAAS,EAAA,EACR,WAAW,EAAC,QAAQ,EACpB,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,EACtC,QAAQ,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,EACjD,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,WAAW,EAAC,OAAO,EACnB,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,EACrC,QAAQ,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,EAChD,CAAA;QACF,KAAC,CAAA,aAAA,CAAA,SAAS,EAAC,EAAA,WAAW,EAAC,QAAQ,EAAC,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,EAAI,CAAA;AAClH,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,WAAW,EAAC,QAAQ,EACpB,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,EACtC,QAAQ,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,EACjD,CAAA,CACI,EACR;AACJ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdentifierDisplay.mjs","sources":["../../../src/IdentifierDisplay/IdentifierDisplay.tsx"],"sourcesContent":["import { Identifier } from '@medplum/fhirtypes';\nimport React from 'react';\n\nexport interface IdentifierDisplayProps {\n value?: Identifier;\n}\n\nexport function IdentifierDisplay(props: IdentifierDisplayProps): JSX.Element {\n return (\n <div>\n {props.value?.system}: {props.value?.value}\n </div>\n );\n}\n"],"names":[],"mappings":";;AAOM,SAAU,iBAAiB,CAAC,KAA6B,EAAA;AAC7D,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA;QACG,KAAK,CAAC,KAAK,EAAE,MAAM;;AAAI,QAAA,KAAK,CAAC,KAAK,EAAE,KAAK,CACtC,EACN;AACJ;;;;"}
|
|
@@ -10,9 +10,9 @@ function IdentifierInput(props) {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
return (React.createElement(Group, { spacing: "xs", grow: true, noWrap: true },
|
|
13
|
-
React.createElement(TextInput, { placeholder: "System", defaultValue: value
|
|
14
|
-
React.createElement(TextInput, { placeholder: "Value", defaultValue: value
|
|
13
|
+
React.createElement(TextInput, { placeholder: "System", defaultValue: value?.system, onChange: (e) => setValueWrapper({ ...value, system: e.currentTarget.value }) }),
|
|
14
|
+
React.createElement(TextInput, { placeholder: "Value", defaultValue: value?.value, onChange: (e) => setValueWrapper({ ...value, value: e.currentTarget.value }) })));
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export { IdentifierInput };
|
|
18
|
-
//# sourceMappingURL=IdentifierInput.
|
|
18
|
+
//# sourceMappingURL=IdentifierInput.mjs.map
|