@medplum/react 1.0.0 → 1.0.1

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.
Files changed (555) hide show
  1. package/dist/cjs/{AddressDisplay.d.ts → AddressDisplay/AddressDisplay.d.ts} +0 -0
  2. package/dist/cjs/{AddressInput.d.ts → AddressInput/AddressInput.d.ts} +0 -0
  3. package/dist/cjs/{stories → AddressInput}/AddressInput.stories.d.ts +0 -0
  4. package/dist/cjs/{AnnotationInput.d.ts → AnnotationInput/AnnotationInput.d.ts} +0 -0
  5. package/dist/cjs/{AttachmentArrayDisplay.d.ts → AttachmentArrayDisplay/AttachmentArrayDisplay.d.ts} +0 -0
  6. package/dist/cjs/{AttachmentArrayInput.d.ts → AttachmentArrayInput/AttachmentArrayInput.d.ts} +0 -0
  7. package/dist/cjs/{stories → AttachmentArrayInput}/AttachmentArrayInput.stories.d.ts +0 -0
  8. package/dist/cjs/{AttachmentButton.d.ts → AttachmentButton/AttachmentButton.d.ts} +0 -0
  9. package/dist/cjs/{stories → AttachmentButton}/AttachmentButton.stories.d.ts +0 -0
  10. package/dist/cjs/{AttachmentDisplay.d.ts → AttachmentDisplay/AttachmentDisplay.d.ts} +0 -0
  11. package/dist/cjs/{AttachmentInput.d.ts → AttachmentInput/AttachmentInput.d.ts} +0 -0
  12. package/dist/cjs/{stories → AttachmentInput}/AttachmentInput.stories.d.ts +0 -0
  13. package/dist/cjs/{BackboneElementDisplay.d.ts → BackboneElementDisplay/BackboneElementDisplay.d.ts} +0 -0
  14. package/dist/cjs/{BackboneElementInput.d.ts → BackboneElementInput/BackboneElementInput.d.ts} +0 -0
  15. package/dist/cjs/{CalendarInput.d.ts → CalendarInput/CalendarInput.d.ts} +0 -0
  16. package/dist/cjs/{CheckboxFormSection.d.ts → CheckboxFormSection/CheckboxFormSection.d.ts} +0 -0
  17. package/dist/cjs/{CodeInput.d.ts → CodeInput/CodeInput.d.ts} +0 -0
  18. package/dist/cjs/{stories → CodeInput}/CodeInput.stories.d.ts +0 -0
  19. package/dist/cjs/{CodeableConceptDisplay.d.ts → CodeableConceptDisplay/CodeableConceptDisplay.d.ts} +0 -0
  20. package/dist/cjs/{stories → CodeableConceptDisplay}/CodeableConceptDisplay.stories.d.ts +0 -0
  21. package/dist/cjs/{CodeableConceptInput.d.ts → CodeableConceptInput/CodeableConceptInput.d.ts} +0 -0
  22. package/dist/cjs/{stories → CodeableConceptInput}/CodeableConceptInput.stories.d.ts +0 -0
  23. package/dist/cjs/{CodingDisplay.d.ts → CodingDisplay/CodingDisplay.d.ts} +0 -0
  24. package/dist/cjs/{CodingInput.d.ts → CodingInput/CodingInput.d.ts} +0 -0
  25. package/dist/cjs/{ContactDetailDisplay.d.ts → ContactDetailDisplay/ContactDetailDisplay.d.ts} +0 -0
  26. package/dist/cjs/{ContactDetailInput.d.ts → ContactDetailInput/ContactDetailInput.d.ts} +0 -0
  27. package/dist/cjs/{ContactPointDisplay.d.ts → ContactPointDisplay/ContactPointDisplay.d.ts} +0 -0
  28. package/dist/cjs/{ContactPointInput.d.ts → ContactPointInput/ContactPointInput.d.ts} +0 -0
  29. package/dist/cjs/{DateTimeInput.d.ts → DateTimeInput/DateTimeInput.d.ts} +0 -0
  30. package/dist/cjs/{DefaultResourceTimeline.d.ts → DefaultResourceTimeline/DefaultResourceTimeline.d.ts} +0 -0
  31. package/dist/cjs/{DescriptionList.d.ts → DescriptionList/DescriptionList.d.ts} +0 -0
  32. package/dist/cjs/{stories → DescriptionList}/DescriptionList.stories.d.ts +0 -0
  33. package/dist/cjs/{DiagnosticReportDisplay.d.ts → DiagnosticReportDisplay/DiagnosticReportDisplay.d.ts} +0 -0
  34. package/dist/cjs/{stories → DiagnosticReportDisplay}/DiagnosticReportDisplay.stories.d.ts +0 -0
  35. package/dist/cjs/{Document.d.ts → Document/Document.d.ts} +0 -0
  36. package/dist/cjs/{EncounterTimeline.d.ts → EncounterTimeline/EncounterTimeline.d.ts} +0 -0
  37. package/dist/cjs/{stories → EncounterTimeline}/EncounterTimeline.stories.d.ts +0 -0
  38. package/dist/cjs/{ErrorBoundary.d.ts → ErrorBoundary/ErrorBoundary.d.ts} +0 -0
  39. package/dist/cjs/{ExtensionInput.d.ts → ExtensionInput/ExtensionInput.d.ts} +0 -0
  40. package/dist/cjs/{FhirPathDisplay.d.ts → FhirPathDisplay/FhirPathDisplay.d.ts} +0 -0
  41. package/dist/cjs/{stories → FhirPathDisplay}/FhirPathDisplay.stories.d.ts +1 -1
  42. package/dist/cjs/{FhirPathTable.d.ts → FhirPathTable/FhirPathTable.d.ts} +1 -1
  43. package/dist/cjs/{Form.d.ts → Form/Form.d.ts} +0 -0
  44. package/dist/cjs/{FormUtils.d.ts → Form/FormUtils.d.ts} +0 -0
  45. package/dist/cjs/{FormSection.d.ts → FormSection/FormSection.d.ts} +0 -0
  46. package/dist/cjs/{GoogleButton.d.ts → GoogleButton/GoogleButton.d.ts} +0 -0
  47. package/dist/cjs/{HumanNameDisplay.d.ts → HumanNameDisplay/HumanNameDisplay.d.ts} +0 -0
  48. package/dist/cjs/{HumanNameInput.d.ts → HumanNameInput/HumanNameInput.d.ts} +0 -0
  49. package/dist/cjs/{IdentifierDisplay.d.ts → IdentifierDisplay/IdentifierDisplay.d.ts} +0 -0
  50. package/dist/cjs/{IdentifierInput.d.ts → IdentifierInput/IdentifierInput.d.ts} +0 -0
  51. package/dist/cjs/{Logo.d.ts → Logo/Logo.d.ts} +0 -0
  52. package/dist/cjs/{stories → Logo}/Logo.stories.d.ts +0 -0
  53. package/dist/cjs/{MedplumLink.d.ts → MedplumLink/MedplumLink.d.ts} +0 -0
  54. package/dist/cjs/{MedplumProvider.d.ts → MedplumProvider/MedplumProvider.d.ts} +0 -0
  55. package/dist/cjs/{PatientTimeline.d.ts → PatientTimeline/PatientTimeline.d.ts} +0 -0
  56. package/dist/cjs/{stories → PatientTimeline}/PatientTimeline.stories.d.ts +0 -0
  57. package/dist/cjs/{PeriodInput.d.ts → PeriodInput/PeriodInput.d.ts} +0 -0
  58. package/dist/cjs/{stories → PeriodInput}/PeriodInput.stories.d.ts +0 -0
  59. package/dist/cjs/{PlanDefinitionBuilder.d.ts → PlanDefinitionBuilder/PlanDefinitionBuilder.d.ts} +0 -0
  60. package/dist/cjs/{stories → PlanDefinitionBuilder}/PlanDefinitionBuilder.stories.d.ts +0 -0
  61. package/dist/cjs/{QuantityDisplay.d.ts → QuantityDisplay/QuantityDisplay.d.ts} +0 -1
  62. package/dist/cjs/{QuantityInput.d.ts → QuantityInput/QuantityInput.d.ts} +0 -0
  63. package/dist/cjs/{QuestionnaireBuilder.d.ts → QuestionnaireBuilder/QuestionnaireBuilder.d.ts} +0 -0
  64. package/dist/cjs/{stories → QuestionnaireBuilder}/QuestionnaireBuilder.stories.d.ts +0 -0
  65. package/dist/cjs/{QuestionnaireForm.d.ts → QuestionnaireForm/QuestionnaireForm.d.ts} +0 -0
  66. package/dist/cjs/{stories → QuestionnaireForm}/QuestionnaireForm.stories.d.ts +0 -0
  67. package/dist/cjs/{RangeDisplay.d.ts → RangeDisplay/RangeDisplay.d.ts} +0 -1
  68. package/dist/cjs/{RangeInput.d.ts → RangeInput/RangeInput.d.ts} +0 -0
  69. package/dist/cjs/{RatioDisplay.d.ts → RatioDisplay/RatioDisplay.d.ts} +0 -0
  70. package/dist/cjs/{RatioInput.d.ts → RatioInput/RatioInput.d.ts} +0 -0
  71. package/dist/cjs/{ReferenceDisplay.d.ts → ReferenceDisplay/ReferenceDisplay.d.ts} +0 -0
  72. package/dist/cjs/{ReferenceInput.d.ts → ReferenceInput/ReferenceInput.d.ts} +0 -0
  73. package/dist/cjs/{stories → ReferenceInput}/ReferenceInput.stories.d.ts +0 -0
  74. package/dist/cjs/ReferenceRangeEditor/ReferenceRangeEditor.d.ts +27 -0
  75. package/dist/cjs/ReferenceRangeEditor/ReferenceRangeEditor.stories.d.ts +7 -0
  76. package/dist/cjs/{RequestGroupDisplay.d.ts → RequestGroupDisplay/RequestGroupDisplay.d.ts} +0 -0
  77. package/dist/cjs/{stories → RequestGroupDisplay}/RequestGroupDisplay.stories.d.ts +0 -0
  78. package/dist/cjs/{ResourceArrayDisplay.d.ts → ResourceArrayDisplay/ResourceArrayDisplay.d.ts} +0 -0
  79. package/dist/cjs/{ResourceArrayInput.d.ts → ResourceArrayInput/ResourceArrayInput.d.ts} +0 -0
  80. package/dist/cjs/{ResourceAvatar.d.ts → ResourceAvatar/ResourceAvatar.d.ts} +0 -0
  81. package/dist/cjs/{stories → ResourceAvatar}/ResourceAvatar.stories.d.ts +0 -0
  82. package/dist/cjs/{ResourceBadge.d.ts → ResourceBadge/ResourceBadge.d.ts} +0 -0
  83. package/dist/cjs/{ResourceBlame.d.ts → ResourceBlame/ResourceBlame.d.ts} +0 -0
  84. package/dist/cjs/{stories → ResourceBlame}/ResourceBlame.stories.d.ts +0 -0
  85. package/dist/cjs/{ResourceDiff.d.ts → ResourceDiff/ResourceDiff.d.ts} +0 -0
  86. package/dist/cjs/{ResourceDiffTable.d.ts → ResourceDiffTable/ResourceDiffTable.d.ts} +0 -0
  87. package/dist/cjs/ResourceDiffTable/ResourceDiffTable.stories.d.ts +5 -0
  88. package/dist/cjs/{ResourceForm.d.ts → ResourceForm/ResourceForm.d.ts} +0 -0
  89. package/dist/cjs/{stories → ResourceForm}/ResourceForm.stories.d.ts +0 -0
  90. package/dist/cjs/{ResourceHistoryTable.d.ts → ResourceHistoryTable/ResourceHistoryTable.d.ts} +0 -0
  91. package/dist/cjs/{stories → ResourceHistoryTable}/ResourceHistoryTable.stories.d.ts +0 -0
  92. package/dist/cjs/{ResourceInput.d.ts → ResourceInput/ResourceInput.d.ts} +0 -0
  93. package/dist/cjs/{stories → ResourceInput}/ResourceInput.stories.d.ts +0 -0
  94. package/dist/cjs/{ResourceName.d.ts → ResourceName/ResourceName.d.ts} +0 -0
  95. package/dist/cjs/{ResourcePropertyDisplay.d.ts → ResourcePropertyDisplay/ResourcePropertyDisplay.d.ts} +0 -0
  96. package/dist/cjs/{ResourcePropertyInput.d.ts → ResourcePropertyInput/ResourcePropertyInput.d.ts} +0 -0
  97. package/dist/cjs/{ResourceTable.d.ts → ResourceTable/ResourceTable.d.ts} +0 -0
  98. package/dist/cjs/{stories → ResourceTable}/ResourceTable.stories.d.ts +0 -0
  99. package/dist/cjs/{ResourceTimeline.d.ts → ResourceTimeline/ResourceTimeline.d.ts} +0 -0
  100. package/dist/cjs/{Scheduler.d.ts → Scheduler/Scheduler.d.ts} +0 -0
  101. package/dist/cjs/{stories → Scheduler}/Scheduler.stories.d.ts +0 -0
  102. package/dist/cjs/{SearchControl.d.ts → SearchControl/SearchControl.d.ts} +0 -0
  103. package/dist/cjs/{stories → SearchControl}/SearchControl.stories.d.ts +0 -0
  104. package/dist/cjs/{SearchControlField.d.ts → SearchControl/SearchControlField.d.ts} +0 -0
  105. package/dist/cjs/{SearchUtils.d.ts → SearchControl/SearchUtils.d.ts} +0 -21
  106. package/dist/cjs/{SearchFieldEditor.d.ts → SearchFieldEditor/SearchFieldEditor.d.ts} +0 -0
  107. package/dist/cjs/{SearchFilterEditor.d.ts → SearchFilterEditor/SearchFilterEditor.d.ts} +0 -0
  108. package/dist/cjs/{SearchFilterValueDialog.d.ts → SearchFilterValueDialog/SearchFilterValueDialog.d.ts} +0 -0
  109. package/dist/cjs/{SearchFilterValueDisplay.d.ts → SearchFilterValueDisplay/SearchFilterValueDisplay.d.ts} +0 -0
  110. package/dist/cjs/{SearchFilterValueInput.d.ts → SearchFilterValueInput/SearchFilterValueInput.d.ts} +0 -0
  111. package/dist/cjs/{SearchPopupMenu.d.ts → SearchPopupMenu/SearchPopupMenu.d.ts} +0 -0
  112. package/dist/cjs/{ServiceRequestTimeline.d.ts → ServiceRequestTimeline/ServiceRequestTimeline.d.ts} +0 -0
  113. package/dist/cjs/{StatusBadge.d.ts → StatusBadge/StatusBadge.d.ts} +0 -0
  114. package/dist/cjs/{stories → StatusBadge}/StatusBadge.stories.d.ts +0 -0
  115. package/dist/cjs/{Timeline.d.ts → Timeline/Timeline.d.ts} +0 -0
  116. package/dist/cjs/{stories → Timeline}/Timeline.stories.d.ts +0 -0
  117. package/dist/cjs/{TimingInput.d.ts → TimingInput/TimingInput.d.ts} +0 -0
  118. package/dist/cjs/{stories → TimingInput}/TimingInput.stories.d.ts +0 -0
  119. package/dist/cjs/{ValueSetAutocomplete.d.ts → ValueSetAutocomplete/ValueSetAutocomplete.d.ts} +0 -0
  120. package/dist/cjs/auth/AuthenticationForm.d.ts +2 -10
  121. package/dist/cjs/auth/ChooseScopeForm.d.ts +7 -0
  122. package/dist/cjs/{stories → auth}/RegisterForm.stories.d.ts +0 -0
  123. package/dist/cjs/auth/SignInForm.d.ts +3 -10
  124. package/dist/cjs/{stories → auth}/SignInForm.stories.d.ts +0 -0
  125. package/dist/cjs/index.d.ts +66 -65
  126. package/dist/cjs/index.js +444 -230
  127. package/dist/cjs/index.js.map +1 -1
  128. package/dist/cjs/index.min.js +1 -1
  129. package/dist/cjs/index.min.js.map +1 -1
  130. package/dist/cjs/stories/referenceLab.d.ts +3 -0
  131. package/dist/cjs/{useResource.d.ts → useResource/useResource.d.ts} +0 -0
  132. package/dist/cjs/{QuestionnaireUtils.d.ts → utils/questionnaire.d.ts} +0 -0
  133. package/dist/cjs/{utils.d.ts → utils/script.d.ts} +0 -0
  134. package/dist/esm/{AddressDisplay.d.ts → AddressDisplay/AddressDisplay.d.ts} +0 -0
  135. package/dist/esm/{AddressDisplay.js → AddressDisplay/AddressDisplay.js} +0 -0
  136. package/dist/esm/AddressDisplay/AddressDisplay.js.map +1 -0
  137. package/dist/esm/{AddressInput.d.ts → AddressInput/AddressInput.d.ts} +0 -0
  138. package/dist/esm/{AddressInput.js → AddressInput/AddressInput.js} +0 -0
  139. package/dist/esm/AddressInput/AddressInput.js.map +1 -0
  140. package/dist/esm/{stories → AddressInput}/AddressInput.stories.d.ts +0 -0
  141. package/dist/esm/{AnnotationInput.d.ts → AnnotationInput/AnnotationInput.d.ts} +0 -0
  142. package/dist/esm/{AnnotationInput.js → AnnotationInput/AnnotationInput.js} +1 -1
  143. package/dist/esm/AnnotationInput/AnnotationInput.js.map +1 -0
  144. package/dist/esm/{AttachmentArrayDisplay.d.ts → AttachmentArrayDisplay/AttachmentArrayDisplay.d.ts} +0 -0
  145. package/dist/esm/{AttachmentArrayDisplay.js → AttachmentArrayDisplay/AttachmentArrayDisplay.js} +1 -1
  146. package/dist/esm/AttachmentArrayDisplay/AttachmentArrayDisplay.js.map +1 -0
  147. package/dist/esm/{AttachmentArrayInput.d.ts → AttachmentArrayInput/AttachmentArrayInput.d.ts} +0 -0
  148. package/dist/esm/{AttachmentArrayInput.js → AttachmentArrayInput/AttachmentArrayInput.js} +3 -3
  149. package/dist/esm/AttachmentArrayInput/AttachmentArrayInput.js.map +1 -0
  150. package/dist/esm/{stories → AttachmentArrayInput}/AttachmentArrayInput.stories.d.ts +0 -0
  151. package/dist/esm/{AttachmentButton.d.ts → AttachmentButton/AttachmentButton.d.ts} +0 -0
  152. package/dist/esm/{AttachmentButton.js → AttachmentButton/AttachmentButton.js} +2 -2
  153. package/dist/esm/AttachmentButton/AttachmentButton.js.map +1 -0
  154. package/dist/esm/{stories → AttachmentButton}/AttachmentButton.stories.d.ts +0 -0
  155. package/dist/esm/{AttachmentDisplay.d.ts → AttachmentDisplay/AttachmentDisplay.d.ts} +0 -0
  156. package/dist/esm/{AttachmentDisplay.js → AttachmentDisplay/AttachmentDisplay.js} +0 -0
  157. package/dist/esm/AttachmentDisplay/AttachmentDisplay.js.map +1 -0
  158. package/dist/esm/{AttachmentInput.d.ts → AttachmentInput/AttachmentInput.d.ts} +0 -0
  159. package/dist/esm/{AttachmentInput.js → AttachmentInput/AttachmentInput.js} +3 -3
  160. package/dist/esm/AttachmentInput/AttachmentInput.js.map +1 -0
  161. package/dist/esm/{stories → AttachmentInput}/AttachmentInput.stories.d.ts +0 -0
  162. package/dist/esm/{BackboneElementDisplay.d.ts → BackboneElementDisplay/BackboneElementDisplay.d.ts} +0 -0
  163. package/dist/esm/{BackboneElementDisplay.js → BackboneElementDisplay/BackboneElementDisplay.js} +7 -4
  164. package/dist/esm/BackboneElementDisplay/BackboneElementDisplay.js.map +1 -0
  165. package/dist/esm/{BackboneElementInput.d.ts → BackboneElementInput/BackboneElementInput.d.ts} +0 -0
  166. package/dist/esm/{BackboneElementInput.js → BackboneElementInput/BackboneElementInput.js} +6 -6
  167. package/dist/esm/BackboneElementInput/BackboneElementInput.js.map +1 -0
  168. package/dist/esm/{CalendarInput.d.ts → CalendarInput/CalendarInput.d.ts} +0 -0
  169. package/dist/esm/{CalendarInput.js → CalendarInput/CalendarInput.js} +0 -0
  170. package/dist/esm/CalendarInput/CalendarInput.js.map +1 -0
  171. package/dist/esm/{CheckboxFormSection.d.ts → CheckboxFormSection/CheckboxFormSection.d.ts} +0 -0
  172. package/dist/esm/{CheckboxFormSection.js → CheckboxFormSection/CheckboxFormSection.js} +0 -0
  173. package/dist/esm/CheckboxFormSection/CheckboxFormSection.js.map +1 -0
  174. package/dist/esm/{CodeInput.d.ts → CodeInput/CodeInput.d.ts} +0 -0
  175. package/dist/esm/{CodeInput.js → CodeInput/CodeInput.js} +1 -1
  176. package/dist/esm/CodeInput/CodeInput.js.map +1 -0
  177. package/dist/esm/{stories → CodeInput}/CodeInput.stories.d.ts +0 -0
  178. package/dist/esm/{CodeableConceptDisplay.d.ts → CodeableConceptDisplay/CodeableConceptDisplay.d.ts} +0 -0
  179. package/dist/esm/{CodeableConceptDisplay.js → CodeableConceptDisplay/CodeableConceptDisplay.js} +1 -1
  180. package/dist/esm/CodeableConceptDisplay/CodeableConceptDisplay.js.map +1 -0
  181. package/dist/esm/{stories → CodeableConceptDisplay}/CodeableConceptDisplay.stories.d.ts +0 -0
  182. package/dist/esm/{CodeableConceptInput.d.ts → CodeableConceptInput/CodeableConceptInput.d.ts} +0 -0
  183. package/dist/esm/{CodeableConceptInput.js → CodeableConceptInput/CodeableConceptInput.js} +1 -1
  184. package/dist/esm/CodeableConceptInput/CodeableConceptInput.js.map +1 -0
  185. package/dist/esm/{stories → CodeableConceptInput}/CodeableConceptInput.stories.d.ts +0 -0
  186. package/dist/esm/{CodingDisplay.d.ts → CodingDisplay/CodingDisplay.d.ts} +0 -0
  187. package/dist/esm/{CodingDisplay.js → CodingDisplay/CodingDisplay.js} +0 -0
  188. package/dist/esm/CodingDisplay/CodingDisplay.js.map +1 -0
  189. package/dist/esm/{CodingInput.d.ts → CodingInput/CodingInput.d.ts} +0 -0
  190. package/dist/esm/{CodingInput.js → CodingInput/CodingInput.js} +1 -1
  191. package/dist/esm/CodingInput/CodingInput.js.map +1 -0
  192. package/dist/esm/{ContactDetailDisplay.d.ts → ContactDetailDisplay/ContactDetailDisplay.d.ts} +0 -0
  193. package/dist/esm/{ContactDetailDisplay.js → ContactDetailDisplay/ContactDetailDisplay.js} +1 -1
  194. package/dist/esm/ContactDetailDisplay/ContactDetailDisplay.js.map +1 -0
  195. package/dist/esm/{ContactDetailInput.d.ts → ContactDetailInput/ContactDetailInput.d.ts} +0 -0
  196. package/dist/esm/{ContactDetailInput.js → ContactDetailInput/ContactDetailInput.js} +1 -1
  197. package/dist/esm/ContactDetailInput/ContactDetailInput.js.map +1 -0
  198. package/dist/esm/{ContactPointDisplay.d.ts → ContactPointDisplay/ContactPointDisplay.d.ts} +0 -0
  199. package/dist/esm/{ContactPointDisplay.js → ContactPointDisplay/ContactPointDisplay.js} +0 -0
  200. package/dist/esm/ContactPointDisplay/ContactPointDisplay.js.map +1 -0
  201. package/dist/esm/{ContactPointInput.d.ts → ContactPointInput/ContactPointInput.d.ts} +0 -0
  202. package/dist/esm/{ContactPointInput.js → ContactPointInput/ContactPointInput.js} +0 -0
  203. package/dist/esm/ContactPointInput/ContactPointInput.js.map +1 -0
  204. package/dist/esm/{DateTimeInput.d.ts → DateTimeInput/DateTimeInput.d.ts} +0 -0
  205. package/dist/esm/{DateTimeInput.js → DateTimeInput/DateTimeInput.js} +1 -1
  206. package/dist/esm/DateTimeInput/DateTimeInput.js.map +1 -0
  207. package/dist/esm/{DefaultResourceTimeline.d.ts → DefaultResourceTimeline/DefaultResourceTimeline.d.ts} +0 -0
  208. package/dist/esm/{DefaultResourceTimeline.js → DefaultResourceTimeline/DefaultResourceTimeline.js} +1 -1
  209. package/dist/esm/DefaultResourceTimeline/DefaultResourceTimeline.js.map +1 -0
  210. package/dist/esm/{DescriptionList.d.ts → DescriptionList/DescriptionList.d.ts} +0 -0
  211. package/dist/esm/{DescriptionList.js → DescriptionList/DescriptionList.js} +0 -0
  212. package/dist/esm/DescriptionList/DescriptionList.js.map +1 -0
  213. package/dist/esm/{stories → DescriptionList}/DescriptionList.stories.d.ts +0 -0
  214. package/dist/esm/{DiagnosticReportDisplay.d.ts → DiagnosticReportDisplay/DiagnosticReportDisplay.d.ts} +0 -0
  215. package/dist/esm/{DiagnosticReportDisplay.js → DiagnosticReportDisplay/DiagnosticReportDisplay.js} +7 -7
  216. package/dist/esm/DiagnosticReportDisplay/DiagnosticReportDisplay.js.map +1 -0
  217. package/dist/esm/{stories → DiagnosticReportDisplay}/DiagnosticReportDisplay.stories.d.ts +0 -0
  218. package/dist/esm/{Document.d.ts → Document/Document.d.ts} +0 -0
  219. package/dist/esm/{Document.js → Document/Document.js} +0 -0
  220. package/dist/esm/Document/Document.js.map +1 -0
  221. package/dist/esm/{EncounterTimeline.d.ts → EncounterTimeline/EncounterTimeline.d.ts} +0 -0
  222. package/dist/esm/{EncounterTimeline.js → EncounterTimeline/EncounterTimeline.js} +1 -1
  223. package/dist/esm/EncounterTimeline/EncounterTimeline.js.map +1 -0
  224. package/dist/esm/{stories → EncounterTimeline}/EncounterTimeline.stories.d.ts +0 -0
  225. package/dist/esm/{ErrorBoundary.d.ts → ErrorBoundary/ErrorBoundary.d.ts} +0 -0
  226. package/dist/esm/{ErrorBoundary.js → ErrorBoundary/ErrorBoundary.js} +4 -2
  227. package/dist/esm/ErrorBoundary/ErrorBoundary.js.map +1 -0
  228. package/dist/esm/{ExtensionInput.d.ts → ExtensionInput/ExtensionInput.d.ts} +0 -0
  229. package/dist/esm/{ExtensionInput.js → ExtensionInput/ExtensionInput.js} +0 -0
  230. package/dist/esm/ExtensionInput/ExtensionInput.js.map +1 -0
  231. package/dist/esm/{FhirPathDisplay.d.ts → FhirPathDisplay/FhirPathDisplay.d.ts} +0 -0
  232. package/dist/esm/{FhirPathDisplay.js → FhirPathDisplay/FhirPathDisplay.js} +1 -1
  233. package/dist/esm/FhirPathDisplay/FhirPathDisplay.js.map +1 -0
  234. package/dist/esm/{stories → FhirPathDisplay}/FhirPathDisplay.stories.d.ts +1 -1
  235. package/dist/esm/{FhirPathTable.d.ts → FhirPathTable/FhirPathTable.d.ts} +1 -1
  236. package/dist/esm/{FhirPathTable.js → FhirPathTable/FhirPathTable.js} +4 -4
  237. package/dist/esm/FhirPathTable/FhirPathTable.js.map +1 -0
  238. package/dist/esm/{Form.d.ts → Form/Form.d.ts} +0 -0
  239. package/dist/esm/{Form.js → Form/Form.js} +0 -0
  240. package/dist/esm/Form/Form.js.map +1 -0
  241. package/dist/esm/{FormUtils.d.ts → Form/FormUtils.d.ts} +0 -0
  242. package/dist/esm/{FormUtils.js → Form/FormUtils.js} +0 -0
  243. package/dist/esm/Form/FormUtils.js.map +1 -0
  244. package/dist/esm/{FormSection.d.ts → FormSection/FormSection.d.ts} +0 -0
  245. package/dist/esm/{FormSection.js → FormSection/FormSection.js} +1 -1
  246. package/dist/esm/FormSection/FormSection.js.map +1 -0
  247. package/dist/esm/{GoogleButton.d.ts → GoogleButton/GoogleButton.d.ts} +0 -0
  248. package/dist/esm/{GoogleButton.js → GoogleButton/GoogleButton.js} +2 -2
  249. package/dist/esm/GoogleButton/GoogleButton.js.map +1 -0
  250. package/dist/esm/{HumanNameDisplay.d.ts → HumanNameDisplay/HumanNameDisplay.d.ts} +0 -0
  251. package/dist/esm/{HumanNameDisplay.js → HumanNameDisplay/HumanNameDisplay.js} +0 -0
  252. package/dist/esm/HumanNameDisplay/HumanNameDisplay.js.map +1 -0
  253. package/dist/esm/{HumanNameInput.d.ts → HumanNameInput/HumanNameInput.d.ts} +0 -0
  254. package/dist/esm/{HumanNameInput.js → HumanNameInput/HumanNameInput.js} +0 -0
  255. package/dist/esm/HumanNameInput/HumanNameInput.js.map +1 -0
  256. package/dist/esm/{IdentifierDisplay.d.ts → IdentifierDisplay/IdentifierDisplay.d.ts} +0 -0
  257. package/dist/esm/{IdentifierDisplay.js → IdentifierDisplay/IdentifierDisplay.js} +0 -0
  258. package/dist/esm/IdentifierDisplay/IdentifierDisplay.js.map +1 -0
  259. package/dist/esm/{IdentifierInput.d.ts → IdentifierInput/IdentifierInput.d.ts} +0 -0
  260. package/dist/esm/{IdentifierInput.js → IdentifierInput/IdentifierInput.js} +0 -0
  261. package/dist/esm/IdentifierInput/IdentifierInput.js.map +1 -0
  262. package/dist/esm/{Logo.d.ts → Logo/Logo.d.ts} +0 -0
  263. package/dist/esm/{Logo.js → Logo/Logo.js} +0 -0
  264. package/dist/esm/Logo/Logo.js.map +1 -0
  265. package/dist/esm/{stories → Logo}/Logo.stories.d.ts +0 -0
  266. package/dist/esm/{MedplumLink.d.ts → MedplumLink/MedplumLink.d.ts} +0 -0
  267. package/dist/esm/{MedplumLink.js → MedplumLink/MedplumLink.js} +2 -2
  268. package/dist/esm/MedplumLink/MedplumLink.js.map +1 -0
  269. package/dist/esm/{MedplumProvider.d.ts → MedplumProvider/MedplumProvider.d.ts} +0 -0
  270. package/dist/esm/{MedplumProvider.js → MedplumProvider/MedplumProvider.js} +0 -0
  271. package/dist/esm/MedplumProvider/MedplumProvider.js.map +1 -0
  272. package/dist/esm/{PatientTimeline.d.ts → PatientTimeline/PatientTimeline.d.ts} +0 -0
  273. package/dist/esm/{PatientTimeline.js → PatientTimeline/PatientTimeline.js} +1 -1
  274. package/dist/esm/PatientTimeline/PatientTimeline.js.map +1 -0
  275. package/dist/esm/{stories → PatientTimeline}/PatientTimeline.stories.d.ts +0 -0
  276. package/dist/esm/{PeriodInput.d.ts → PeriodInput/PeriodInput.d.ts} +0 -0
  277. package/dist/esm/{PeriodInput.js → PeriodInput/PeriodInput.js} +1 -1
  278. package/dist/esm/PeriodInput/PeriodInput.js.map +1 -0
  279. package/dist/esm/{stories → PeriodInput}/PeriodInput.stories.d.ts +0 -0
  280. package/dist/esm/{PlanDefinitionBuilder.d.ts → PlanDefinitionBuilder/PlanDefinitionBuilder.d.ts} +0 -0
  281. package/dist/esm/{PlanDefinitionBuilder.js → PlanDefinitionBuilder/PlanDefinitionBuilder.js} +10 -10
  282. package/dist/esm/PlanDefinitionBuilder/PlanDefinitionBuilder.js.map +1 -0
  283. package/dist/esm/{stories → PlanDefinitionBuilder}/PlanDefinitionBuilder.stories.d.ts +0 -0
  284. package/dist/esm/{QuantityDisplay.d.ts → QuantityDisplay/QuantityDisplay.d.ts} +0 -1
  285. package/dist/esm/QuantityDisplay/QuantityDisplay.js +9 -0
  286. package/dist/esm/QuantityDisplay/QuantityDisplay.js.map +1 -0
  287. package/dist/esm/{QuantityInput.d.ts → QuantityInput/QuantityInput.d.ts} +0 -0
  288. package/dist/esm/{QuantityInput.js → QuantityInput/QuantityInput.js} +2 -2
  289. package/dist/esm/QuantityInput/QuantityInput.js.map +1 -0
  290. package/dist/esm/{QuestionnaireBuilder.d.ts → QuestionnaireBuilder/QuestionnaireBuilder.d.ts} +0 -0
  291. package/dist/esm/{QuestionnaireBuilder.js → QuestionnaireBuilder/QuestionnaireBuilder.js} +8 -8
  292. package/dist/esm/QuestionnaireBuilder/QuestionnaireBuilder.js.map +1 -0
  293. package/dist/esm/{stories → QuestionnaireBuilder}/QuestionnaireBuilder.stories.d.ts +0 -0
  294. package/dist/esm/{QuestionnaireForm.d.ts → QuestionnaireForm/QuestionnaireForm.d.ts} +0 -0
  295. package/dist/esm/{QuestionnaireForm.js → QuestionnaireForm/QuestionnaireForm.js} +11 -11
  296. package/dist/esm/QuestionnaireForm/QuestionnaireForm.js.map +1 -0
  297. package/dist/esm/{stories → QuestionnaireForm}/QuestionnaireForm.stories.d.ts +0 -0
  298. package/dist/esm/{RangeDisplay.d.ts → RangeDisplay/RangeDisplay.d.ts} +0 -1
  299. package/dist/esm/RangeDisplay/RangeDisplay.js +9 -0
  300. package/dist/esm/RangeDisplay/RangeDisplay.js.map +1 -0
  301. package/dist/esm/{RangeInput.d.ts → RangeInput/RangeInput.d.ts} +0 -0
  302. package/dist/esm/{RangeInput.js → RangeInput/RangeInput.js} +1 -1
  303. package/dist/esm/RangeInput/RangeInput.js.map +1 -0
  304. package/dist/esm/{RatioDisplay.d.ts → RatioDisplay/RatioDisplay.d.ts} +0 -0
  305. package/dist/esm/{RatioDisplay.js → RatioDisplay/RatioDisplay.js} +1 -1
  306. package/dist/esm/RatioDisplay/RatioDisplay.js.map +1 -0
  307. package/dist/esm/{RatioInput.d.ts → RatioInput/RatioInput.d.ts} +0 -0
  308. package/dist/esm/{RatioInput.js → RatioInput/RatioInput.js} +1 -1
  309. package/dist/esm/RatioInput/RatioInput.js.map +1 -0
  310. package/dist/esm/{ReferenceDisplay.d.ts → ReferenceDisplay/ReferenceDisplay.d.ts} +0 -0
  311. package/dist/esm/{ReferenceDisplay.js → ReferenceDisplay/ReferenceDisplay.js} +1 -1
  312. package/dist/esm/ReferenceDisplay/ReferenceDisplay.js.map +1 -0
  313. package/dist/esm/{ReferenceInput.d.ts → ReferenceInput/ReferenceInput.d.ts} +0 -0
  314. package/dist/esm/{ReferenceInput.js → ReferenceInput/ReferenceInput.js} +1 -1
  315. package/dist/esm/ReferenceInput/ReferenceInput.js.map +1 -0
  316. package/dist/esm/{stories → ReferenceInput}/ReferenceInput.stories.d.ts +0 -0
  317. package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.d.ts +27 -0
  318. package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.js +269 -0
  319. package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.js.map +1 -0
  320. package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.stories.d.ts +7 -0
  321. package/dist/esm/{RequestGroupDisplay.d.ts → RequestGroupDisplay/RequestGroupDisplay.d.ts} +0 -0
  322. package/dist/esm/{RequestGroupDisplay.js → RequestGroupDisplay/RequestGroupDisplay.js} +4 -4
  323. package/dist/esm/RequestGroupDisplay/RequestGroupDisplay.js.map +1 -0
  324. package/dist/esm/{stories → RequestGroupDisplay}/RequestGroupDisplay.stories.d.ts +0 -0
  325. package/dist/esm/{ResourceArrayDisplay.d.ts → ResourceArrayDisplay/ResourceArrayDisplay.d.ts} +0 -0
  326. package/dist/esm/{ResourceArrayDisplay.js → ResourceArrayDisplay/ResourceArrayDisplay.js} +1 -1
  327. package/dist/esm/ResourceArrayDisplay/ResourceArrayDisplay.js.map +1 -0
  328. package/dist/esm/{ResourceArrayInput.d.ts → ResourceArrayInput/ResourceArrayInput.d.ts} +0 -0
  329. package/dist/esm/{ResourceArrayInput.js → ResourceArrayInput/ResourceArrayInput.js} +2 -2
  330. package/dist/esm/ResourceArrayInput/ResourceArrayInput.js.map +1 -0
  331. package/dist/esm/{ResourceAvatar.d.ts → ResourceAvatar/ResourceAvatar.d.ts} +0 -0
  332. package/dist/esm/{ResourceAvatar.js → ResourceAvatar/ResourceAvatar.js} +2 -2
  333. package/dist/esm/ResourceAvatar/ResourceAvatar.js.map +1 -0
  334. package/dist/esm/{stories → ResourceAvatar}/ResourceAvatar.stories.d.ts +0 -0
  335. package/dist/esm/{ResourceBadge.d.ts → ResourceBadge/ResourceBadge.d.ts} +0 -0
  336. package/dist/esm/{ResourceBadge.js → ResourceBadge/ResourceBadge.js} +2 -2
  337. package/dist/esm/ResourceBadge/ResourceBadge.js.map +1 -0
  338. package/dist/esm/{ResourceBlame.d.ts → ResourceBlame/ResourceBlame.d.ts} +0 -0
  339. package/dist/esm/{ResourceBlame.js → ResourceBlame/ResourceBlame.js} +4 -4
  340. package/dist/esm/ResourceBlame/ResourceBlame.js.map +1 -0
  341. package/dist/esm/{stories → ResourceBlame}/ResourceBlame.stories.d.ts +0 -0
  342. package/dist/esm/{ResourceDiff.d.ts → ResourceDiff/ResourceDiff.d.ts} +0 -0
  343. package/dist/esm/{ResourceDiff.js → ResourceDiff/ResourceDiff.js} +1 -1
  344. package/dist/esm/ResourceDiff/ResourceDiff.js.map +1 -0
  345. package/dist/esm/{ResourceDiffTable.d.ts → ResourceDiffTable/ResourceDiffTable.d.ts} +0 -0
  346. package/dist/esm/{ResourceDiffTable.js → ResourceDiffTable/ResourceDiffTable.js} +2 -2
  347. package/dist/esm/ResourceDiffTable/ResourceDiffTable.js.map +1 -0
  348. package/dist/esm/ResourceDiffTable/ResourceDiffTable.stories.d.ts +5 -0
  349. package/dist/esm/{ResourceForm.d.ts → ResourceForm/ResourceForm.d.ts} +0 -0
  350. package/dist/esm/{ResourceForm.js → ResourceForm/ResourceForm.js} +5 -5
  351. package/dist/esm/ResourceForm/ResourceForm.js.map +1 -0
  352. package/dist/esm/{stories → ResourceForm}/ResourceForm.stories.d.ts +0 -0
  353. package/dist/esm/{ResourceHistoryTable.d.ts → ResourceHistoryTable/ResourceHistoryTable.d.ts} +0 -0
  354. package/dist/esm/{ResourceHistoryTable.js → ResourceHistoryTable/ResourceHistoryTable.js} +3 -3
  355. package/dist/esm/ResourceHistoryTable/ResourceHistoryTable.js.map +1 -0
  356. package/dist/esm/{stories → ResourceHistoryTable}/ResourceHistoryTable.stories.d.ts +0 -0
  357. package/dist/esm/{ResourceInput.d.ts → ResourceInput/ResourceInput.d.ts} +0 -0
  358. package/dist/esm/{ResourceInput.js → ResourceInput/ResourceInput.js} +4 -4
  359. package/dist/esm/ResourceInput/ResourceInput.js.map +1 -0
  360. package/dist/esm/{stories → ResourceInput}/ResourceInput.stories.d.ts +0 -0
  361. package/dist/esm/{ResourceName.d.ts → ResourceName/ResourceName.d.ts} +0 -0
  362. package/dist/esm/{ResourceName.js → ResourceName/ResourceName.js} +3 -3
  363. package/dist/esm/ResourceName/ResourceName.js.map +1 -0
  364. package/dist/esm/{ResourcePropertyDisplay.d.ts → ResourcePropertyDisplay/ResourcePropertyDisplay.d.ts} +0 -0
  365. package/dist/esm/{ResourcePropertyDisplay.js → ResourcePropertyDisplay/ResourcePropertyDisplay.js} +15 -15
  366. package/dist/esm/ResourcePropertyDisplay/ResourcePropertyDisplay.js.map +1 -0
  367. package/dist/esm/{ResourcePropertyInput.d.ts → ResourcePropertyInput/ResourcePropertyInput.d.ts} +0 -0
  368. package/dist/esm/{ResourcePropertyInput.js → ResourcePropertyInput/ResourcePropertyInput.js} +22 -22
  369. package/dist/esm/ResourcePropertyInput/ResourcePropertyInput.js.map +1 -0
  370. package/dist/esm/{ResourceTable.d.ts → ResourceTable/ResourceTable.d.ts} +0 -0
  371. package/dist/esm/{ResourceTable.js → ResourceTable/ResourceTable.js} +3 -3
  372. package/dist/esm/ResourceTable/ResourceTable.js.map +1 -0
  373. package/dist/esm/{stories → ResourceTable}/ResourceTable.stories.d.ts +0 -0
  374. package/dist/esm/{ResourceTimeline.d.ts → ResourceTimeline/ResourceTimeline.d.ts} +0 -0
  375. package/dist/esm/{ResourceTimeline.js → ResourceTimeline/ResourceTimeline.js} +14 -13
  376. package/dist/esm/ResourceTimeline/ResourceTimeline.js.map +1 -0
  377. package/dist/esm/{Scheduler.d.ts → Scheduler/Scheduler.d.ts} +0 -0
  378. package/dist/esm/{Scheduler.js → Scheduler/Scheduler.js} +6 -6
  379. package/dist/esm/Scheduler/Scheduler.js.map +1 -0
  380. package/dist/esm/{stories → Scheduler}/Scheduler.stories.d.ts +0 -0
  381. package/dist/esm/{SearchControl.d.ts → SearchControl/SearchControl.d.ts} +0 -0
  382. package/dist/esm/{SearchControl.js → SearchControl/SearchControl.js} +12 -11
  383. package/dist/esm/SearchControl/SearchControl.js.map +1 -0
  384. package/dist/esm/{stories → SearchControl}/SearchControl.stories.d.ts +0 -0
  385. package/dist/esm/{SearchControlField.d.ts → SearchControl/SearchControlField.d.ts} +0 -0
  386. package/dist/esm/{SearchControlField.js → SearchControl/SearchControlField.js} +0 -0
  387. package/dist/esm/SearchControl/SearchControlField.js.map +1 -0
  388. package/dist/esm/{SearchUtils.d.ts → SearchControl/SearchUtils.d.ts} +0 -21
  389. package/dist/esm/{SearchUtils.js → SearchControl/SearchUtils.js} +2 -33
  390. package/dist/esm/SearchControl/SearchUtils.js.map +1 -0
  391. package/dist/esm/{SearchFieldEditor.d.ts → SearchFieldEditor/SearchFieldEditor.d.ts} +0 -0
  392. package/dist/esm/{SearchFieldEditor.js → SearchFieldEditor/SearchFieldEditor.js} +1 -1
  393. package/dist/esm/SearchFieldEditor/SearchFieldEditor.js.map +1 -0
  394. package/dist/esm/{SearchFilterEditor.d.ts → SearchFilterEditor/SearchFilterEditor.d.ts} +0 -0
  395. package/dist/esm/{SearchFilterEditor.js → SearchFilterEditor/SearchFilterEditor.js} +3 -3
  396. package/dist/esm/SearchFilterEditor/SearchFilterEditor.js.map +1 -0
  397. package/dist/esm/{SearchFilterValueDialog.d.ts → SearchFilterValueDialog/SearchFilterValueDialog.d.ts} +0 -0
  398. package/dist/esm/{SearchFilterValueDialog.js → SearchFilterValueDialog/SearchFilterValueDialog.js} +2 -2
  399. package/dist/esm/SearchFilterValueDialog/SearchFilterValueDialog.js.map +1 -0
  400. package/dist/esm/{SearchFilterValueDisplay.d.ts → SearchFilterValueDisplay/SearchFilterValueDisplay.d.ts} +0 -0
  401. package/dist/esm/{SearchFilterValueDisplay.js → SearchFilterValueDisplay/SearchFilterValueDisplay.js} +1 -1
  402. package/dist/esm/SearchFilterValueDisplay/SearchFilterValueDisplay.js.map +1 -0
  403. package/dist/esm/{SearchFilterValueInput.d.ts → SearchFilterValueInput/SearchFilterValueInput.d.ts} +0 -0
  404. package/dist/esm/{SearchFilterValueInput.js → SearchFilterValueInput/SearchFilterValueInput.js} +3 -3
  405. package/dist/esm/SearchFilterValueInput/SearchFilterValueInput.js.map +1 -0
  406. package/dist/esm/{SearchPopupMenu.d.ts → SearchPopupMenu/SearchPopupMenu.d.ts} +0 -0
  407. package/dist/esm/{SearchPopupMenu.js → SearchPopupMenu/SearchPopupMenu.js} +1 -1
  408. package/dist/esm/SearchPopupMenu/SearchPopupMenu.js.map +1 -0
  409. package/dist/esm/{ServiceRequestTimeline.d.ts → ServiceRequestTimeline/ServiceRequestTimeline.d.ts} +0 -0
  410. package/dist/esm/{ServiceRequestTimeline.js → ServiceRequestTimeline/ServiceRequestTimeline.js} +1 -1
  411. package/dist/esm/ServiceRequestTimeline/ServiceRequestTimeline.js.map +1 -0
  412. package/dist/esm/{StatusBadge.d.ts → StatusBadge/StatusBadge.d.ts} +0 -0
  413. package/dist/esm/{StatusBadge.js → StatusBadge/StatusBadge.js} +0 -0
  414. package/dist/esm/StatusBadge/StatusBadge.js.map +1 -0
  415. package/dist/esm/{stories → StatusBadge}/StatusBadge.stories.d.ts +0 -0
  416. package/dist/esm/{Timeline.d.ts → Timeline/Timeline.d.ts} +0 -0
  417. package/dist/esm/{Timeline.js → Timeline/Timeline.js} +4 -4
  418. package/dist/esm/Timeline/Timeline.js.map +1 -0
  419. package/dist/esm/{stories → Timeline}/Timeline.stories.d.ts +0 -0
  420. package/dist/esm/{TimingInput.d.ts → TimingInput/TimingInput.d.ts} +0 -0
  421. package/dist/esm/{TimingInput.js → TimingInput/TimingInput.js} +2 -2
  422. package/dist/esm/TimingInput/TimingInput.js.map +1 -0
  423. package/dist/esm/{stories → TimingInput}/TimingInput.stories.d.ts +0 -0
  424. package/dist/esm/{ValueSetAutocomplete.d.ts → ValueSetAutocomplete/ValueSetAutocomplete.d.ts} +0 -0
  425. package/dist/esm/{ValueSetAutocomplete.js → ValueSetAutocomplete/ValueSetAutocomplete.js} +5 -5
  426. package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.js.map +1 -0
  427. package/dist/esm/auth/AuthenticationForm.d.ts +2 -10
  428. package/dist/esm/auth/AuthenticationForm.js +13 -33
  429. package/dist/esm/auth/AuthenticationForm.js.map +1 -1
  430. package/dist/esm/auth/ChooseProfileForm.js +2 -2
  431. package/dist/esm/auth/ChooseProfileForm.js.map +1 -1
  432. package/dist/esm/auth/ChooseScopeForm.d.ts +7 -0
  433. package/dist/esm/auth/ChooseScopeForm.js +28 -0
  434. package/dist/esm/auth/ChooseScopeForm.js.map +1 -0
  435. package/dist/esm/auth/NewProjectForm.js +3 -3
  436. package/dist/esm/auth/NewProjectForm.js.map +1 -1
  437. package/dist/esm/auth/NewUserForm.js +3 -3
  438. package/dist/esm/auth/NewUserForm.js.map +1 -1
  439. package/dist/esm/auth/RegisterForm.js +2 -2
  440. package/dist/esm/auth/RegisterForm.js.map +1 -1
  441. package/dist/esm/{stories → auth}/RegisterForm.stories.d.ts +0 -0
  442. package/dist/esm/auth/SignInForm.d.ts +3 -10
  443. package/dist/esm/auth/SignInForm.js +30 -13
  444. package/dist/esm/auth/SignInForm.js.map +1 -1
  445. package/dist/esm/{stories → auth}/SignInForm.stories.d.ts +0 -0
  446. package/dist/esm/index.d.ts +66 -65
  447. package/dist/esm/index.js +66 -65
  448. package/dist/esm/index.js.map +1 -1
  449. package/dist/esm/index.min.js +1 -1
  450. package/dist/esm/index.min.js.map +1 -1
  451. package/dist/esm/stories/referenceLab.d.ts +3 -0
  452. package/dist/esm/{useResource.d.ts → useResource/useResource.d.ts} +0 -0
  453. package/dist/esm/{useResource.js → useResource/useResource.js} +1 -1
  454. package/dist/esm/useResource/useResource.js.map +1 -0
  455. package/dist/esm/{QuestionnaireUtils.d.ts → utils/questionnaire.d.ts} +0 -0
  456. package/dist/esm/{QuestionnaireUtils.js → utils/questionnaire.js} +1 -1
  457. package/dist/esm/utils/questionnaire.js.map +1 -0
  458. package/dist/esm/utils/recaptcha.js +1 -1
  459. package/dist/esm/utils/recaptcha.js.map +1 -1
  460. package/dist/esm/{utils.d.ts → utils/script.d.ts} +0 -0
  461. package/dist/esm/{utils.js → utils/script.js} +1 -1
  462. package/dist/esm/utils/script.js.map +1 -0
  463. package/package.json +23 -23
  464. package/rollup.config.mjs +1 -1
  465. package/dist/esm/AddressDisplay.js.map +0 -1
  466. package/dist/esm/AddressInput.js.map +0 -1
  467. package/dist/esm/AnnotationInput.js.map +0 -1
  468. package/dist/esm/AttachmentArrayDisplay.js.map +0 -1
  469. package/dist/esm/AttachmentArrayInput.js.map +0 -1
  470. package/dist/esm/AttachmentButton.js.map +0 -1
  471. package/dist/esm/AttachmentDisplay.js.map +0 -1
  472. package/dist/esm/AttachmentInput.js.map +0 -1
  473. package/dist/esm/BackboneElementDisplay.js.map +0 -1
  474. package/dist/esm/BackboneElementInput.js.map +0 -1
  475. package/dist/esm/CalendarInput.js.map +0 -1
  476. package/dist/esm/CheckboxFormSection.js.map +0 -1
  477. package/dist/esm/CodeInput.js.map +0 -1
  478. package/dist/esm/CodeableConceptDisplay.js.map +0 -1
  479. package/dist/esm/CodeableConceptInput.js.map +0 -1
  480. package/dist/esm/CodingDisplay.js.map +0 -1
  481. package/dist/esm/CodingInput.js.map +0 -1
  482. package/dist/esm/ContactDetailDisplay.js.map +0 -1
  483. package/dist/esm/ContactDetailInput.js.map +0 -1
  484. package/dist/esm/ContactPointDisplay.js.map +0 -1
  485. package/dist/esm/ContactPointInput.js.map +0 -1
  486. package/dist/esm/DateTimeInput.js.map +0 -1
  487. package/dist/esm/DefaultResourceTimeline.js.map +0 -1
  488. package/dist/esm/DescriptionList.js.map +0 -1
  489. package/dist/esm/DiagnosticReportDisplay.js.map +0 -1
  490. package/dist/esm/Document.js.map +0 -1
  491. package/dist/esm/EncounterTimeline.js.map +0 -1
  492. package/dist/esm/ErrorBoundary.js.map +0 -1
  493. package/dist/esm/ExtensionInput.js.map +0 -1
  494. package/dist/esm/FhirPathDisplay.js.map +0 -1
  495. package/dist/esm/FhirPathTable.js.map +0 -1
  496. package/dist/esm/Form.js.map +0 -1
  497. package/dist/esm/FormSection.js.map +0 -1
  498. package/dist/esm/FormUtils.js.map +0 -1
  499. package/dist/esm/GoogleButton.js.map +0 -1
  500. package/dist/esm/HumanNameDisplay.js.map +0 -1
  501. package/dist/esm/HumanNameInput.js.map +0 -1
  502. package/dist/esm/IdentifierDisplay.js.map +0 -1
  503. package/dist/esm/IdentifierInput.js.map +0 -1
  504. package/dist/esm/Logo.js.map +0 -1
  505. package/dist/esm/MedplumLink.js.map +0 -1
  506. package/dist/esm/MedplumProvider.js.map +0 -1
  507. package/dist/esm/PatientTimeline.js.map +0 -1
  508. package/dist/esm/PeriodInput.js.map +0 -1
  509. package/dist/esm/PlanDefinitionBuilder.js.map +0 -1
  510. package/dist/esm/QuantityDisplay.js +0 -28
  511. package/dist/esm/QuantityDisplay.js.map +0 -1
  512. package/dist/esm/QuantityInput.js.map +0 -1
  513. package/dist/esm/QuestionnaireBuilder.js.map +0 -1
  514. package/dist/esm/QuestionnaireForm.js.map +0 -1
  515. package/dist/esm/QuestionnaireUtils.js.map +0 -1
  516. package/dist/esm/RangeDisplay.js +0 -21
  517. package/dist/esm/RangeDisplay.js.map +0 -1
  518. package/dist/esm/RangeInput.js.map +0 -1
  519. package/dist/esm/RatioDisplay.js.map +0 -1
  520. package/dist/esm/RatioInput.js.map +0 -1
  521. package/dist/esm/ReferenceDisplay.js.map +0 -1
  522. package/dist/esm/ReferenceInput.js.map +0 -1
  523. package/dist/esm/RequestGroupDisplay.js.map +0 -1
  524. package/dist/esm/ResourceArrayDisplay.js.map +0 -1
  525. package/dist/esm/ResourceArrayInput.js.map +0 -1
  526. package/dist/esm/ResourceAvatar.js.map +0 -1
  527. package/dist/esm/ResourceBadge.js.map +0 -1
  528. package/dist/esm/ResourceBlame.js.map +0 -1
  529. package/dist/esm/ResourceDiff.js.map +0 -1
  530. package/dist/esm/ResourceDiffTable.js.map +0 -1
  531. package/dist/esm/ResourceForm.js.map +0 -1
  532. package/dist/esm/ResourceHistoryTable.js.map +0 -1
  533. package/dist/esm/ResourceInput.js.map +0 -1
  534. package/dist/esm/ResourceName.js.map +0 -1
  535. package/dist/esm/ResourcePropertyDisplay.js.map +0 -1
  536. package/dist/esm/ResourcePropertyInput.js.map +0 -1
  537. package/dist/esm/ResourceTable.js.map +0 -1
  538. package/dist/esm/ResourceTimeline.js.map +0 -1
  539. package/dist/esm/Scheduler.js.map +0 -1
  540. package/dist/esm/SearchControl.js.map +0 -1
  541. package/dist/esm/SearchControlField.js.map +0 -1
  542. package/dist/esm/SearchFieldEditor.js.map +0 -1
  543. package/dist/esm/SearchFilterEditor.js.map +0 -1
  544. package/dist/esm/SearchFilterValueDialog.js.map +0 -1
  545. package/dist/esm/SearchFilterValueDisplay.js.map +0 -1
  546. package/dist/esm/SearchFilterValueInput.js.map +0 -1
  547. package/dist/esm/SearchPopupMenu.js.map +0 -1
  548. package/dist/esm/SearchUtils.js.map +0 -1
  549. package/dist/esm/ServiceRequestTimeline.js.map +0 -1
  550. package/dist/esm/StatusBadge.js.map +0 -1
  551. package/dist/esm/Timeline.js.map +0 -1
  552. package/dist/esm/TimingInput.js.map +0 -1
  553. package/dist/esm/ValueSetAutocomplete.js.map +0 -1
  554. package/dist/esm/useResource.js.map +0 -1
  555. package/dist/esm/utils.js.map +0 -1
package/dist/cjs/index.js CHANGED
@@ -623,35 +623,25 @@
623
623
  }
624
624
 
625
625
  function AuthenticationForm(props) {
626
+ const { generatePkce, onForgotPassword, onRegister, handleAuthResponse, children } = props, baseLoginRequest = __rest(props, ["generatePkce", "onForgotPassword", "onRegister", "handleAuthResponse", "children"]);
626
627
  const medplum = useMedplum();
627
628
  const googleClientId = getGoogleClientId(props.googleClientId);
628
629
  const [outcome, setOutcome] = React.useState();
629
630
  const issues = getIssuesForExpression(outcome, undefined);
630
631
  function startPkce() {
631
632
  return __awaiter(this, void 0, void 0, function* () {
632
- if (props.generatePkce) {
633
+ if (generatePkce) {
633
634
  yield medplum.startPkce();
634
635
  }
635
636
  });
636
637
  }
637
638
  return (React.createElement(Form, { style: { maxWidth: 400 }, onSubmit: (formData) => {
638
639
  startPkce()
639
- .then(() => medplum.startLogin({
640
- projectId: props.projectId,
641
- clientId: props.clientId,
642
- resourceType: props.resourceType,
643
- scope: props.scope,
644
- nonce: props.nonce,
645
- codeChallenge: props.codeChallenge,
646
- codeChallengeMethod: props.codeChallengeMethod,
647
- email: formData.email,
648
- password: formData.password,
649
- remember: formData.remember === 'true',
650
- }))
651
- .then(props.handleAuthResponse)
640
+ .then(() => medplum.startLogin(Object.assign(Object.assign({}, baseLoginRequest), { email: formData.email, password: formData.password, remember: formData.remember === 'on' })))
641
+ .then(handleAuthResponse)
652
642
  .catch(setOutcome);
653
643
  } },
654
- React.createElement(core$1.Center, { sx: { flexDirection: 'column' } }, props.children),
644
+ React.createElement(core$1.Center, { sx: { flexDirection: 'column' } }, children),
655
645
  issues && (React.createElement(core$1.Alert, { icon: React.createElement(icons.IconAlertCircle, { size: 16 }), color: "red" }, issues.map((issue) => {
656
646
  var _a, _b;
657
647
  return (React.createElement("div", { "data-testid": "text-field-error", key: (_a = issue.details) === null || _a === void 0 ? void 0 : _a.text }, (_b = issue.details) === null || _b === void 0 ? void 0 : _b.text));
@@ -660,17 +650,7 @@
660
650
  React.createElement(core$1.Group, { position: "center", p: "xl", style: { height: 70 } },
661
651
  React.createElement(GoogleButton, { googleClientId: googleClientId, handleGoogleCredential: (response) => {
662
652
  startPkce()
663
- .then(() => medplum.startGoogleLogin({
664
- projectId: props.projectId,
665
- clientId: props.clientId,
666
- resourceType: props.resourceType,
667
- scope: props.scope,
668
- nonce: props.nonce,
669
- codeChallenge: props.codeChallenge,
670
- codeChallengeMethod: props.codeChallengeMethod,
671
- googleClientId: response.clientId,
672
- googleCredential: response.credential,
673
- }))
653
+ .then(() => medplum.startGoogleLogin(Object.assign(Object.assign({}, baseLoginRequest), { googleCredential: response.credential })))
674
654
  .then(props.handleAuthResponse)
675
655
  .catch(setOutcome);
676
656
  } })),
@@ -679,9 +659,9 @@
679
659
  React.createElement(core$1.TextInput, { name: "email", type: "email", label: "Email", placeholder: "name@domain.com", required: true, autoFocus: true, error: getErrorsForInput(outcome, 'email') }),
680
660
  React.createElement(core$1.PasswordInput, { name: "password", type: "password", label: "Password", autoComplete: "off", required: true, error: getErrorsForInput(outcome, 'password') })),
681
661
  React.createElement(core$1.Group, { position: "apart", mt: "xl", noWrap: true },
682
- props.onForgotPassword && (React.createElement(core$1.Anchor, { component: "button", type: "button", color: "dimmed", onClick: props.onForgotPassword, size: "xs" }, "Forgot password")),
683
- props.onRegister && (React.createElement(core$1.Anchor, { component: "button", type: "button", color: "dimmed", onClick: props.onRegister, size: "xs" }, "Register")),
684
- React.createElement(core$1.Checkbox, { name: "remember", label: "Remember me", size: "xs" }),
662
+ onForgotPassword && (React.createElement(core$1.Anchor, { component: "button", type: "button", color: "dimmed", onClick: onForgotPassword, size: "xs" }, "Forgot password")),
663
+ onRegister && (React.createElement(core$1.Anchor, { component: "button", type: "button", color: "dimmed", onClick: onRegister, size: "xs" }, "Register")),
664
+ React.createElement(core$1.Checkbox, { id: "remember", name: "remember", label: "Remember me", size: "xs" }),
685
665
  React.createElement(core$1.Button, { type: "submit" }, "Sign in"))));
686
666
  }
687
667
 
@@ -710,7 +690,28 @@
710
690
  })));
711
691
  }
712
692
 
693
+ function ChooseScopeForm(props) {
694
+ const medplum = useMedplum();
695
+ return (React.createElement(Form, { style: { maxWidth: 400 }, onSubmit: (formData) => {
696
+ medplum
697
+ .post('auth/scope', {
698
+ login: props.login,
699
+ scope: Object.keys(formData).join(' '),
700
+ })
701
+ .then(props.handleAuthResponse)
702
+ .catch(console.log);
703
+ } },
704
+ React.createElement(core$1.Stack, null,
705
+ React.createElement(core$1.Center, { sx: { flexDirection: 'column' } },
706
+ React.createElement(Logo, { size: 32 }),
707
+ React.createElement(core$1.Title, null, "Choose scope")),
708
+ React.createElement(core$1.Stack, null, (props.scope || 'openid').split(' ').map((scopeName) => (React.createElement(core$1.Checkbox, { key: scopeName, id: scopeName, name: scopeName, label: scopeName, defaultChecked: true })))),
709
+ React.createElement(core$1.Group, { position: "right", mt: "xl" },
710
+ React.createElement(core$1.Button, { type: "submit" }, "Set scope")))));
711
+ }
712
+
713
713
  function SignInForm(props) {
714
+ const { chooseScopes, onSuccess, onForgotPassword, onRegister, onCode } = props, baseLoginRequest = __rest(props, ["chooseScopes", "onSuccess", "onForgotPassword", "onRegister", "onCode"]);
714
715
  const medplum = useMedplum();
715
716
  const [login, setLogin] = React.useState(undefined);
716
717
  const [memberships, setMemberships] = React.useState(undefined);
@@ -722,24 +723,35 @@
722
723
  setMemberships(response.memberships);
723
724
  }
724
725
  if (response.code) {
725
- if (props.onCode) {
726
- props.onCode(response.code);
726
+ if (chooseScopes) {
727
+ setMemberships(undefined);
727
728
  }
728
729
  else {
729
- medplum
730
- .processCode(response.code)
731
- .then(() => {
732
- if (props.onSuccess) {
733
- props.onSuccess();
734
- }
735
- })
736
- .catch(console.log);
730
+ handleCode(response.code);
737
731
  }
738
732
  }
739
733
  }
734
+ function handleScopeResponse(response) {
735
+ handleCode(response.code);
736
+ }
737
+ function handleCode(code) {
738
+ if (onCode) {
739
+ onCode(code);
740
+ }
741
+ else {
742
+ medplum
743
+ .processCode(code)
744
+ .then(() => {
745
+ if (onSuccess) {
746
+ onSuccess();
747
+ }
748
+ })
749
+ .catch(console.log);
750
+ }
751
+ }
740
752
  return (React.createElement(Document, { width: 450 }, (() => {
741
753
  if (!login) {
742
- return (React.createElement(AuthenticationForm, { projectId: props.projectId, clientId: props.clientId, resourceType: props.resourceType, scope: props.scope, nonce: props.nonce, googleClientId: props.googleClientId, generatePkce: !props.onCode, codeChallenge: props.codeChallenge, codeChallengeMethod: props.codeChallengeMethod, onForgotPassword: props.onForgotPassword, onRegister: props.onRegister, handleAuthResponse: handleAuthResponse }, props.children));
754
+ return (React.createElement(AuthenticationForm, Object.assign({ generatePkce: !onCode, onForgotPassword: onForgotPassword, onRegister: onRegister, handleAuthResponse: handleAuthResponse }, baseLoginRequest), props.children));
743
755
  }
744
756
  else if (memberships) {
745
757
  return React.createElement(ChooseProfileForm, { login: login, memberships: memberships, handleAuthResponse: handleAuthResponse });
@@ -747,6 +759,9 @@
747
759
  else if (props.projectId === 'new') {
748
760
  return React.createElement(NewProjectForm, { login: login, handleAuthResponse: handleAuthResponse });
749
761
  }
762
+ else if (props.chooseScopes) {
763
+ return React.createElement(ChooseScopeForm, { login: login, scope: props.scope, handleAuthResponse: handleScopeResponse });
764
+ }
750
765
  else {
751
766
  return React.createElement("div", null, "Success");
752
767
  }
@@ -860,7 +875,7 @@
860
875
  React.createElement(FormSection, { title: "ID", htmlFor: "id", outcome: props.outcome },
861
876
  React.createElement(core$1.TextInput, { name: "id", defaultValue: value.id, disabled: true }))),
862
877
  React.createElement(BackboneElementInput, { typeName: value.resourceType, defaultValue: value, outcome: props.outcome, onChange: setValue }),
863
- React.createElement(core$1.Group, null,
878
+ React.createElement(core$1.Group, { position: "right", mt: "xl" },
864
879
  React.createElement(core$1.Button, { type: "submit" }, "OK"),
865
880
  props.onDelete && (React.createElement(core$1.Button, { variant: "outline", color: "red", type: "button", onClick: () => {
866
881
  props.onDelete(value);
@@ -880,7 +895,7 @@
880
895
  return obj;
881
896
  }
882
897
 
883
- const useStyles$a = core$1.createStyles((theme) => ({
898
+ const useStyles$b = core$1.createStyles((theme) => ({
884
899
  root: {
885
900
  display: 'grid',
886
901
  gridTemplateColumns: '30% 70%',
@@ -901,7 +916,7 @@
901
916
  }));
902
917
  function DescriptionList(props) {
903
918
  const { children, compact } = props;
904
- const { classes, cx } = useStyles$a();
919
+ const { classes, cx } = useStyles$b();
905
920
  return React.createElement("dl", { className: cx(classes.root, { [classes.compact]: compact }) }, children);
906
921
  }
907
922
  function DescriptionListEntry(props) {
@@ -923,7 +938,10 @@
923
938
  typeName,
924
939
  "\u00A0not implemented");
925
940
  }
926
- if (typeof value === 'object' && 'name' in value && Object.keys(value).length === 1) {
941
+ if (typeof value === 'object' &&
942
+ 'name' in value &&
943
+ Object.keys(value).length === 1 &&
944
+ typeof value.name === 'string') {
927
945
  // Special case for common BackboneElement pattern
928
946
  // Where there is an object with a single property 'name'
929
947
  // Just display the name value.
@@ -1020,43 +1038,11 @@
1020
1038
  }
1021
1039
 
1022
1040
  function QuantityDisplay(props) {
1023
- return React.createElement(React.Fragment, null, formatQuantityString(props.value));
1024
- }
1025
- function formatQuantityString(quantity) {
1026
- if (!quantity) {
1027
- return '';
1028
- }
1029
- const result = [];
1030
- if (quantity.comparator) {
1031
- result.push(quantity.comparator);
1032
- result.push(' ');
1033
- }
1034
- if (quantity.value !== undefined) {
1035
- result.push(quantity.value);
1036
- }
1037
- if (quantity.unit) {
1038
- if (quantity.unit !== '%') {
1039
- result.push(' ');
1040
- }
1041
- result.push(quantity.unit);
1042
- }
1043
- return result.join('');
1041
+ return React.createElement(React.Fragment, null, core.formatQuantity(props.value));
1044
1042
  }
1045
1043
 
1046
1044
  function RangeDisplay(props) {
1047
- return React.createElement(React.Fragment, null, formatRangeString(props.value));
1048
- }
1049
- function formatRangeString(range) {
1050
- if (!range || (!range.low && !range.high)) {
1051
- return '';
1052
- }
1053
- if (range.low && !range.high) {
1054
- return `>= ${formatQuantityString(range.low)}`;
1055
- }
1056
- if (!range.low && range.high) {
1057
- return `<= ${formatQuantityString(range.high)}`;
1058
- }
1059
- return `${formatQuantityString(range.low)} - ${formatQuantityString(range.high)}`;
1045
+ return React.createElement(React.Fragment, null, core.formatRange(props.value));
1060
1046
  }
1061
1047
 
1062
1048
  function RatioDisplay(props) {
@@ -1256,8 +1242,8 @@
1256
1242
  function ValueSetAutocomplete(props) {
1257
1243
  const medplum = useMedplum();
1258
1244
  const { property, defaultValue } = props;
1259
- const [textValues, setTextValues] = React.useState(defaultValue ? [defaultValue.code] : []);
1260
- const [data, setData] = React.useState(defaultValue ? [valueSetElementToAutocompleteItem(defaultValue)] : []);
1245
+ const [textValues, setTextValues] = React.useState((defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.code) ? [defaultValue.code] : []);
1246
+ const [data, setData] = React.useState((defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.code) ? [valueSetElementToAutocompleteItem(defaultValue)] : []);
1261
1247
  const dataRef = React.useRef();
1262
1248
  dataRef.current = data;
1263
1249
  const loadValues = React.useCallback((input) => __awaiter(this, void 0, void 0, function* () {
@@ -1267,7 +1253,7 @@
1267
1253
  const valueSetElements = (_b = valueSet.expansion) === null || _b === void 0 ? void 0 : _b.contains;
1268
1254
  const newData = [...dataRef.current];
1269
1255
  for (const valueSetElement of valueSetElements) {
1270
- if (!newData.some((item) => item.value === valueSetElement.code)) {
1256
+ if (valueSetElement.code && !newData.some((item) => item.value === valueSetElement.code)) {
1271
1257
  newData.push(valueSetElementToAutocompleteItem(valueSetElement));
1272
1258
  }
1273
1259
  }
@@ -1592,8 +1578,8 @@
1592
1578
  }
1593
1579
  return (React.createElement(core$1.Group, { spacing: "xs", grow: true, noWrap: true },
1594
1580
  React.createElement(core$1.NativeSelect, { style: { width: 80 }, "data-testid": props.name + '-comparator', defaultValue: value === null || value === void 0 ? void 0 : value.comparator, data: ['', '<', '<=', '>=', '>'], onChange: (e) => setValueWrapper(Object.assign(Object.assign({}, value), { comparator: e.currentTarget.value })) }),
1595
- React.createElement(core$1.TextInput, { id: props.name, name: props.name, "data-testid": props.name, type: "number", step: "any", placeholder: "Value", defaultValue: (_a = value === null || value === void 0 ? void 0 : value.value) === null || _a === void 0 ? void 0 : _a.toString(), onChange: (e) => setValueWrapper(Object.assign(Object.assign({}, value), { value: tryParseNumber(e.currentTarget.value) })) }),
1596
- React.createElement(core$1.TextInput, { placeholder: "Unit", defaultValue: value === null || value === void 0 ? void 0 : value.unit, onChange: (e) => setValueWrapper(Object.assign(Object.assign({}, value), { unit: e.currentTarget.value })) })));
1581
+ React.createElement(core$1.TextInput, { id: props.name, name: props.name, "data-testid": props.name + '-value', type: "number", step: "any", placeholder: "Value", defaultValue: (_a = value === null || value === void 0 ? void 0 : value.value) === null || _a === void 0 ? void 0 : _a.toString(), onChange: (e) => setValueWrapper(Object.assign(Object.assign({}, value), { value: tryParseNumber(e.currentTarget.value) })) }),
1582
+ React.createElement(core$1.TextInput, { placeholder: "Unit", "data-testid": props.name + '-unit', defaultValue: value === null || value === void 0 ? void 0 : value.unit, onChange: (e) => setValueWrapper(Object.assign(Object.assign({}, value), { unit: e.currentTarget.value })) })));
1597
1583
  }
1598
1584
  function tryParseNumber(str) {
1599
1585
  if (!str) {
@@ -2069,7 +2055,7 @@
2069
2055
  React.createElement(ResourceName, { value: props.value, link: props.link })));
2070
2056
  }
2071
2057
 
2072
- const useStyles$9 = core$1.createStyles((theme) => ({
2058
+ const useStyles$a = core$1.createStyles((theme) => ({
2073
2059
  table: {
2074
2060
  border: `0.1px solid ${theme.colors.gray[5]}`,
2075
2061
  borderCollapse: 'collapse',
@@ -2130,7 +2116,7 @@
2130
2116
  }
2131
2117
  function ObservationTable(props) {
2132
2118
  var _a;
2133
- const { classes } = useStyles$9();
2119
+ const { classes } = useStyles$a();
2134
2120
  return (React.createElement("table", { className: classes.table },
2135
2121
  React.createElement("thead", null,
2136
2122
  React.createElement("tr", null,
@@ -2141,7 +2127,7 @@
2141
2127
  React.createElement("tbody", null, (_a = props.value) === null || _a === void 0 ? void 0 : _a.map((observation, index) => (React.createElement(ObservationRow, { key: 'obs-' + index, value: observation }))))));
2142
2128
  }
2143
2129
  function ObservationRow(props) {
2144
- const { classes, cx } = useStyles$9();
2130
+ const { classes, cx } = useStyles$a();
2145
2131
  const observation = useResource(props.value);
2146
2132
  if (!observation) {
2147
2133
  return null;
@@ -2192,10 +2178,10 @@
2192
2178
  function isCritical(observation) {
2193
2179
  var _a, _b, _c, _d;
2194
2180
  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;
2195
- return code === 'AA' || code === 'LL' || code === 'HH' || code === 'RR';
2181
+ return code === 'AA' || code === 'LL' || code === 'HH' || code === 'A';
2196
2182
  }
2197
2183
 
2198
- const useStyles$8 = core$1.createStyles((theme) => ({
2184
+ const useStyles$9 = core$1.createStyles((theme) => ({
2199
2185
  root: {
2200
2186
  borderCollapse: 'collapse',
2201
2187
  width: '100%',
@@ -2216,7 +2202,7 @@
2216
2202
  },
2217
2203
  }));
2218
2204
  function ResourceDiffTable(props) {
2219
- const { classes } = useStyles$8();
2205
+ const { classes } = useStyles$9();
2220
2206
  const medplum = useMedplum();
2221
2207
  const [schema, setSchema] = React.useState();
2222
2208
  React.useEffect(() => {
@@ -2299,7 +2285,7 @@
2299
2285
  }
2300
2286
  render() {
2301
2287
  if (this.state.error) {
2302
- return React.createElement(core$1.Title, null, "Something went wrong.");
2288
+ return (React.createElement(core$1.Alert, { icon: React.createElement(icons.IconAlertCircle, { size: 16 }), title: "Something went wrong", color: "red" }, core.normalizeErrorString(this.state.error)));
2303
2289
  }
2304
2290
  return this.props.children;
2305
2291
  }
@@ -2377,7 +2363,7 @@
2377
2363
  return new Date(dateTime).getTime();
2378
2364
  }
2379
2365
 
2380
- const useStyles$7 = core$1.createStyles((theme) => ({
2366
+ const useStyles$8 = core$1.createStyles((theme) => ({
2381
2367
  pinnedComment: {
2382
2368
  backgroundColor: theme.colors.blue[0],
2383
2369
  },
@@ -2531,7 +2517,8 @@
2531
2517
  });
2532
2518
  }
2533
2519
  if (!resource || !history) {
2534
- return React.createElement(core$1.Loader, null);
2520
+ return (React.createElement(core$1.Center, { style: { width: '100%', height: '100%' } },
2521
+ React.createElement(core$1.Loader, null)));
2535
2522
  }
2536
2523
  return (React.createElement(Timeline, null,
2537
2524
  props.createCommunication && (React.createElement(core$1.Paper, { m: "lg", p: "sm", shadow: "xs", radius: "sm", withBorder: true },
@@ -2605,7 +2592,7 @@
2605
2592
  }
2606
2593
  function CommunicationTimelineItem(props) {
2607
2594
  var _a, _b;
2608
- const { classes } = useStyles$7();
2595
+ const { classes } = useStyles$8();
2609
2596
  const routine = !props.resource.priority || props.resource.priority === 'routine';
2610
2597
  const className = routine ? undefined : classes.pinnedComment;
2611
2598
  return (React.createElement(TimelineItem, { resource: props.resource, profile: props.resource.sender, padding: true, className: className, popupMenuItems: React.createElement(TimelineItemPopupMenu, Object.assign({}, props)) },
@@ -2726,98 +2713,6 @@
2726
2713
  return React.createElement(ResourcePropertyDisplay, { value: value[0] || '', propertyType: props.propertyType });
2727
2714
  }
2728
2715
 
2729
- /**
2730
- * Returns the collection of field definitions for the search request.
2731
- * @param search The search request definition.
2732
- * @returns An array of field definitions.
2733
- */
2734
- function getFieldDefinitions(search) {
2735
- const resourceType = search.resourceType;
2736
- const fields = [];
2737
- for (const name of search.fields || ['id', '_lastUpdated']) {
2738
- fields.push(getFieldDefinition(resourceType, name));
2739
- }
2740
- return fields;
2741
- }
2742
- /**
2743
- * Return the field definition for a given field name.
2744
- * Field names can be either property names or search parameter codes.
2745
- * @param resourceType The resource type.
2746
- * @param name The search field name (either property name or search parameter code).
2747
- * @returns The field definition.
2748
- */
2749
- function getFieldDefinition(resourceType, name) {
2750
- var _a;
2751
- if (name === '_lastUpdated') {
2752
- return {
2753
- name: '_lastUpdated',
2754
- searchParams: [
2755
- {
2756
- resourceType: 'SearchParameter',
2757
- base: ['Resource'],
2758
- code: '_lastUpdated',
2759
- name: '_lastUpdated',
2760
- type: 'date',
2761
- expression: 'Resource.meta.lastUpdated',
2762
- },
2763
- ],
2764
- };
2765
- }
2766
- if (name === 'meta.versionId') {
2767
- return {
2768
- name: 'meta.versionId',
2769
- searchParams: [
2770
- {
2771
- resourceType: 'SearchParameter',
2772
- base: ['Resource'],
2773
- code: '_versionId',
2774
- name: '_versionId',
2775
- type: 'token',
2776
- expression: 'Resource.meta.versionId',
2777
- },
2778
- ],
2779
- };
2780
- }
2781
- const typeSchema = core.globalSchema.types[resourceType];
2782
- const exactElementDefinition = typeSchema.properties[name];
2783
- const exactSearchParam = (_a = typeSchema.searchParams) === null || _a === void 0 ? void 0 : _a[name.toLowerCase()];
2784
- // Best case: Exact match of element definition or search parameter.
2785
- // Examples: ServiceRequest.subject, Patient.name, Patient.birthDate
2786
- // In this case, we only show the one search parameter.
2787
- if (exactElementDefinition && exactSearchParam) {
2788
- return { name, elementDefinition: exactElementDefinition, searchParams: [exactSearchParam] };
2789
- }
2790
- // Next best case: Exact match of element definition
2791
- // Examples: Observation.value
2792
- // In this case, there could be zero or more search parameters that are a function of the element definition.
2793
- // So search for those search parameters.
2794
- if (exactElementDefinition) {
2795
- let searchParams = undefined;
2796
- if (typeSchema.searchParams) {
2797
- const path = `${resourceType}.${name.replaceAll('[x]', '')}`;
2798
- searchParams = Object.values(typeSchema.searchParams).filter((p) => { var _a; return (_a = p.expression) === null || _a === void 0 ? void 0 : _a.includes(path); });
2799
- if (searchParams.length === 0) {
2800
- searchParams = undefined;
2801
- }
2802
- }
2803
- return { name, elementDefinition: exactElementDefinition, searchParams };
2804
- }
2805
- // Search parameter case: Exact match of search parameter
2806
- // Examples: Observation.value-quantity, Patient.email
2807
- // Here we have a search parameter, but no element definition.
2808
- // Observation.value-quantity is a search parameter for the Observation.value element.
2809
- // Patient.email is a search parameter for the Patient.telecom element.
2810
- // So we need to walk backwards to find the element definition.
2811
- if (exactSearchParam) {
2812
- const details = core.getSearchParameterDetails(resourceType, exactSearchParam);
2813
- return { name, elementDefinition: details.elementDefinition, searchParams: [exactSearchParam] };
2814
- }
2815
- // Worst case: no element definition and no search parameter.
2816
- // This is probably a malformed URL that includes an unknown field.
2817
- // We will render the column header, but all cells will be empty.
2818
- return { name };
2819
- }
2820
-
2821
2716
  const searchParamToOperators = {
2822
2717
  string: [core.Operator.EQUALS, core.Operator.NOT, core.Operator.CONTAINS, core.Operator.EXACT],
2823
2718
  fulltext: [core.Operator.EQUALS, core.Operator.NOT, core.Operator.CONTAINS, core.Operator.EXACT],
@@ -3055,26 +2950,6 @@
3055
2950
  const endTime = new Date();
3056
2951
  return addDateFilterBetween(definition, field, startTime, endTime);
3057
2952
  }
3058
- /**
3059
- * Adds a filter for a field equaling a specified date.
3060
- *
3061
- * @param {string} field The field key name.
3062
- * @param {Date} value The date.
3063
- */
3064
- function addDateEqualsFilter(definition, field, value) {
3065
- return addDateFilterBetween(definition, field, value, value);
3066
- }
3067
- /**
3068
- * Adds a filter for a date before a certain date/time.
3069
- *
3070
- * @param {string} field The field key name.
3071
- * @param {Operator} op The date/time operation.
3072
- * @param {Date} value The date.
3073
- */
3074
- function addDateFilter(definition, field, op, value) {
3075
- definition = clearFiltersOnField(definition, field);
3076
- return addDateFilterImpl(definition, field, op, value);
3077
- }
3078
2953
  /**
3079
2954
  * Adds a filter for a date between two dates (inclusive of both dates).
3080
2955
  *
@@ -3106,17 +2981,6 @@
3106
2981
  function addMissingFilter(definition, field, value = true) {
3107
2982
  return addFilter(definition, field, core.Operator.MISSING, value.toString());
3108
2983
  }
3109
- /**
3110
- * Returns true if the search has any filters on the specified field.
3111
- *
3112
- * @param {string} code The field key name.
3113
- */
3114
- function hasFilterOnField(definition, code) {
3115
- if (!definition.filters) {
3116
- return false;
3117
- }
3118
- return definition.filters.find((f) => f.code === code) !== undefined;
3119
- }
3120
2984
  /**
3121
2985
  * Sets the offset (starting at zero).
3122
2986
  *
@@ -3766,6 +3630,98 @@
3766
3630
  React.createElement(core$1.Menu.Item, { icon: React.createElement(icons.IconX, { size: 14 }), onClick: () => props.onClear(searchParam) }, "Clear filters")));
3767
3631
  }
3768
3632
 
3633
+ /**
3634
+ * Returns the collection of field definitions for the search request.
3635
+ * @param search The search request definition.
3636
+ * @returns An array of field definitions.
3637
+ */
3638
+ function getFieldDefinitions(search) {
3639
+ const resourceType = search.resourceType;
3640
+ const fields = [];
3641
+ for (const name of search.fields || ['id', '_lastUpdated']) {
3642
+ fields.push(getFieldDefinition(resourceType, name));
3643
+ }
3644
+ return fields;
3645
+ }
3646
+ /**
3647
+ * Return the field definition for a given field name.
3648
+ * Field names can be either property names or search parameter codes.
3649
+ * @param resourceType The resource type.
3650
+ * @param name The search field name (either property name or search parameter code).
3651
+ * @returns The field definition.
3652
+ */
3653
+ function getFieldDefinition(resourceType, name) {
3654
+ var _a;
3655
+ if (name === '_lastUpdated') {
3656
+ return {
3657
+ name: '_lastUpdated',
3658
+ searchParams: [
3659
+ {
3660
+ resourceType: 'SearchParameter',
3661
+ base: ['Resource'],
3662
+ code: '_lastUpdated',
3663
+ name: '_lastUpdated',
3664
+ type: 'date',
3665
+ expression: 'Resource.meta.lastUpdated',
3666
+ },
3667
+ ],
3668
+ };
3669
+ }
3670
+ if (name === 'meta.versionId') {
3671
+ return {
3672
+ name: 'meta.versionId',
3673
+ searchParams: [
3674
+ {
3675
+ resourceType: 'SearchParameter',
3676
+ base: ['Resource'],
3677
+ code: '_versionId',
3678
+ name: '_versionId',
3679
+ type: 'token',
3680
+ expression: 'Resource.meta.versionId',
3681
+ },
3682
+ ],
3683
+ };
3684
+ }
3685
+ const typeSchema = core.globalSchema.types[resourceType];
3686
+ const exactElementDefinition = typeSchema.properties[name];
3687
+ const exactSearchParam = (_a = typeSchema.searchParams) === null || _a === void 0 ? void 0 : _a[name.toLowerCase()];
3688
+ // Best case: Exact match of element definition or search parameter.
3689
+ // Examples: ServiceRequest.subject, Patient.name, Patient.birthDate
3690
+ // In this case, we only show the one search parameter.
3691
+ if (exactElementDefinition && exactSearchParam) {
3692
+ return { name, elementDefinition: exactElementDefinition, searchParams: [exactSearchParam] };
3693
+ }
3694
+ // Next best case: Exact match of element definition
3695
+ // Examples: Observation.value
3696
+ // In this case, there could be zero or more search parameters that are a function of the element definition.
3697
+ // So search for those search parameters.
3698
+ if (exactElementDefinition) {
3699
+ let searchParams = undefined;
3700
+ if (typeSchema.searchParams) {
3701
+ const path = `${resourceType}.${name.replaceAll('[x]', '')}`;
3702
+ searchParams = Object.values(typeSchema.searchParams).filter((p) => { var _a; return (_a = p.expression) === null || _a === void 0 ? void 0 : _a.includes(path); });
3703
+ if (searchParams.length === 0) {
3704
+ searchParams = undefined;
3705
+ }
3706
+ }
3707
+ return { name, elementDefinition: exactElementDefinition, searchParams };
3708
+ }
3709
+ // Search parameter case: Exact match of search parameter
3710
+ // Examples: Observation.value-quantity, Patient.email
3711
+ // Here we have a search parameter, but no element definition.
3712
+ // Observation.value-quantity is a search parameter for the Observation.value element.
3713
+ // Patient.email is a search parameter for the Patient.telecom element.
3714
+ // So we need to walk backwards to find the element definition.
3715
+ if (exactSearchParam) {
3716
+ const details = core.getSearchParameterDetails(resourceType, exactSearchParam);
3717
+ return { name, elementDefinition: details.elementDefinition, searchParams: [exactSearchParam] };
3718
+ }
3719
+ // Worst case: no element definition and no search parameter.
3720
+ // This is probably a malformed URL that includes an unknown field.
3721
+ // We will render the column header, but all cells will be empty.
3722
+ return { name };
3723
+ }
3724
+
3769
3725
  class SearchChangeEvent extends Event {
3770
3726
  constructor(definition) {
3771
3727
  super('change');
@@ -3785,7 +3741,7 @@
3785
3741
  this.browserEvent = browserEvent;
3786
3742
  }
3787
3743
  }
3788
- const useStyles$6 = core$1.createStyles((theme) => ({
3744
+ const useStyles$7 = core$1.createStyles((theme) => ({
3789
3745
  root: {
3790
3746
  maxWidth: '100%',
3791
3747
  overflow: 'auto',
@@ -3822,8 +3778,8 @@
3822
3778
  * It does not include the field editor, filter editor, pagination buttons.
3823
3779
  */
3824
3780
  function SearchControl(props) {
3825
- var _a, _b;
3826
- const { classes } = useStyles$6();
3781
+ var _a, _b, _c;
3782
+ const { classes } = useStyles$7();
3827
3783
  const medplum = useMedplum();
3828
3784
  const [schemaLoaded, setSchemaLoaded] = React.useState(false);
3829
3785
  const [outcome, setOutcome] = React.useState();
@@ -3935,7 +3891,8 @@
3935
3891
  }, [medplum, props.search.resourceType]);
3936
3892
  const typeSchema = schemaLoaded && ((_a = core.globalSchema === null || core.globalSchema === void 0 ? void 0 : core.globalSchema.types) === null || _a === void 0 ? void 0 : _a[props.search.resourceType]);
3937
3893
  if (!typeSchema) {
3938
- return React.createElement(core$1.Loader, null);
3894
+ return (React.createElement(core$1.Center, { style: { width: '100%', height: '100%' } },
3895
+ React.createElement(core$1.Loader, null)));
3939
3896
  }
3940
3897
  const checkboxColumn = props.checkboxesEnabled;
3941
3898
  const fields = getFieldDefinitions(search);
@@ -4016,7 +3973,7 @@
4016
3973
  }, onCancel: () => {
4017
3974
  setState(Object.assign(Object.assign({}, stateRef.current), { filterEditorVisible: false }));
4018
3975
  } }),
4019
- React.createElement(SearchFilterValueDialog, { visible: stateRef.current.filterDialogVisible, title: 'Input', resourceType: resourceType, searchParam: state.filterDialogSearchParam, filter: state.filterDialogFilter, defaultValue: '', onOk: (filter) => {
3976
+ React.createElement(SearchFilterValueDialog, { key: (_c = state.filterDialogSearchParam) === null || _c === void 0 ? void 0 : _c.code, visible: stateRef.current.filterDialogVisible, title: 'Input', resourceType: resourceType, searchParam: state.filterDialogSearchParam, filter: state.filterDialogFilter, defaultValue: '', onOk: (filter) => {
4020
3977
  emitSearchChange(addFilter(props.search, filter.code, filter.operator, filter.value));
4021
3978
  setState(Object.assign(Object.assign({}, stateRef.current), { filterDialogVisible: false }));
4022
3979
  }, onCancel: () => {
@@ -4197,7 +4154,7 @@
4197
4154
  }) }));
4198
4155
  }
4199
4156
 
4200
- const useStyles$5 = core$1.createStyles((theme) => ({
4157
+ const useStyles$6 = core$1.createStyles((theme) => ({
4201
4158
  section: {
4202
4159
  position: 'relative',
4203
4160
  margin: '4px 4px 8px 0',
@@ -4263,7 +4220,7 @@
4263
4220
  React.createElement(core$1.Button, { type: "submit" }, "Save"))));
4264
4221
  }
4265
4222
  function ActionArrayBuilder(props) {
4266
- const { classes } = useStyles$5();
4223
+ const { classes } = useStyles$6();
4267
4224
  const actionsRef = React.useRef();
4268
4225
  actionsRef.current = props.actions;
4269
4226
  function changeAction(changedAction) {
@@ -4286,7 +4243,7 @@
4286
4243
  } }, "Add action"))));
4287
4244
  }
4288
4245
  function ActionBuilder(props) {
4289
- const { classes, cx } = useStyles$5();
4246
+ const { classes, cx } = useStyles$6();
4290
4247
  const { action } = props;
4291
4248
  const actionType = getInitialActionType(action);
4292
4249
  const editing = props.selectedKey === props.action.id;
@@ -4707,7 +4664,7 @@
4707
4664
  }
4708
4665
  }
4709
4666
 
4710
- const useStyles$4 = core$1.createStyles((theme) => ({
4667
+ const useStyles$5 = core$1.createStyles((theme) => ({
4711
4668
  section: {
4712
4669
  position: 'relative',
4713
4670
  margin: '4px 4px 8px 0',
@@ -4786,7 +4743,7 @@
4786
4743
  }
4787
4744
  function ItemBuilder(props) {
4788
4745
  var _a;
4789
- const { classes, cx } = useStyles$4();
4746
+ const { classes, cx } = useStyles$5();
4790
4747
  const resource = props.item;
4791
4748
  const item = props.item;
4792
4749
  const isResource = 'resourceType' in props.item;
@@ -4963,6 +4920,265 @@
4963
4920
  return options.map((option) => (Object.assign(Object.assign({}, option), { id: option.id || generateId() })));
4964
4921
  }
4965
4922
 
4923
+ const useStyles$4 = core$1.createStyles((theme) => ({
4924
+ section: {
4925
+ position: 'relative',
4926
+ margin: '4px 4px 8px 0',
4927
+ padding: '6px 12px 16px 6px',
4928
+ border: `1.5px solid ${theme.colors.gray[3]}`,
4929
+ borderRadius: theme.radius.sm,
4930
+ transition: 'all 0.1s',
4931
+ },
4932
+ }));
4933
+ // Properties of qualified intervals used for grouping
4934
+ const intervalFilters = ['gender', 'age', 'gestationalAge', 'context', 'appliesTo'];
4935
+ const defaultProps = {
4936
+ definition: { resourceType: 'ObservationDefinition' },
4937
+ onSubmit: () => {
4938
+ return;
4939
+ },
4940
+ };
4941
+ function ReferenceRangeEditor(props) {
4942
+ props = Object.assign(defaultProps, props);
4943
+ const defaultDefinition = props.definition;
4944
+ const [intervalGroups, setIntervalGroups] = React.useState([]);
4945
+ const [groupId, setGroupId] = React.useState(1);
4946
+ const [intervalId, setIntervalId] = React.useState(1);
4947
+ React.useEffect(() => {
4948
+ const definition = ensureQualifiedIntervalKeys(defaultDefinition, setIntervalId);
4949
+ setIntervalGroups(groupQualifiedIntervals(definition.qualifiedInterval || [], setGroupId));
4950
+ }, [defaultDefinition]);
4951
+ return (React.createElement(Form, { testid: "reference-range-editor", onSubmit: submitDefinition },
4952
+ React.createElement(core$1.Stack, null, intervalGroups.map((intervalGroup) => {
4953
+ var _a;
4954
+ return (React.createElement(ReferenceRangeGroupEditor, { unit: getUnitString((_a = defaultDefinition.quantitativeDetails) === null || _a === void 0 ? void 0 : _a.unit), onChange: changeInterval, onAdd: addInterval, onRemove: removeInterval, onRemoveGroup: removeGroup, key: `group-${intervalGroup.id}`, intervalGroup: intervalGroup }));
4955
+ })),
4956
+ React.createElement(core$1.ActionIcon, { title: "Add Group", size: "sm", onClick: (e) => {
4957
+ killEvent(e);
4958
+ addGroup({ id: `group-id-${groupId}`, filters: {}, intervals: [] });
4959
+ setGroupId((id) => id + 1);
4960
+ } },
4961
+ React.createElement(icons.IconCirclePlus, null)),
4962
+ React.createElement(core$1.Group, { position: "right" },
4963
+ React.createElement(core$1.Button, { type: "submit" }, "Save"))));
4964
+ /**
4965
+ * Submit qualified intervals
4966
+ */
4967
+ function submitDefinition() {
4968
+ const qualifiedInterval = intervalGroups
4969
+ .flatMap((group) => group.intervals)
4970
+ .filter((interval) => !isEmptyInterval(interval));
4971
+ props.onSubmit(Object.assign(Object.assign({}, defaultDefinition), { qualifiedInterval }));
4972
+ }
4973
+ /**
4974
+ * Add Remove Interval Groups
4975
+ */
4976
+ function addGroup(addedGroup) {
4977
+ setIntervalGroups((currentGroups) => [...currentGroups, addedGroup]);
4978
+ }
4979
+ function removeGroup(removedGroup) {
4980
+ setIntervalGroups((currentGroups) => currentGroups.filter((group) => group.id !== removedGroup.id));
4981
+ }
4982
+ /**
4983
+ * Add/Remove/Update specific Qualified Intervals
4984
+ */
4985
+ function changeInterval(groupId, changedInterval) {
4986
+ setIntervalGroups((groups) => {
4987
+ var _a, _b;
4988
+ groups = [...groups];
4989
+ const currentGroup = groups.find((g) => g.id === groupId);
4990
+ const index = (_a = currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.intervals) === null || _a === void 0 ? void 0 : _a.findIndex((interval) => interval.id === changedInterval.id);
4991
+ if (index !== undefined && ((_b = currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.intervals) === null || _b === void 0 ? void 0 : _b[index])) {
4992
+ currentGroup.intervals[index] = changedInterval;
4993
+ }
4994
+ return groups;
4995
+ });
4996
+ }
4997
+ function addInterval(groupId, addedInterval) {
4998
+ if (addedInterval.id === undefined) {
4999
+ addedInterval.id = `id-${intervalId}`;
5000
+ setIntervalId((id) => id + 1);
5001
+ }
5002
+ setIntervalGroups((groups) => {
5003
+ groups = [...groups];
5004
+ const currentGroupIndex = groups.findIndex((g) => g.id === groupId);
5005
+ if (currentGroupIndex != -1) {
5006
+ const currentGroup = Object.assign({}, groups[currentGroupIndex]);
5007
+ currentGroup.intervals = [...currentGroup.intervals, addedInterval];
5008
+ groups[currentGroupIndex] = currentGroup;
5009
+ }
5010
+ return groups;
5011
+ });
5012
+ }
5013
+ function removeInterval(groupId, removedInterval) {
5014
+ setIntervalGroups((groups) => {
5015
+ groups = [...groups];
5016
+ const currentGroup = groups.find((g) => g.id === groupId);
5017
+ if (currentGroup) {
5018
+ currentGroup.intervals = currentGroup.intervals.filter((interval) => interval.id !== removedInterval.id);
5019
+ }
5020
+ return groups;
5021
+ });
5022
+ }
5023
+ }
5024
+ function ReferenceRangeGroupEditor(props) {
5025
+ const { intervalGroup, unit } = props;
5026
+ const { classes } = useStyles$4();
5027
+ return (React.createElement(core$1.Container, { "data-testid": intervalGroup.id, className: classes.section },
5028
+ React.createElement(core$1.Stack, { spacing: 'lg' },
5029
+ React.createElement(core$1.Group, { position: "right" },
5030
+ React.createElement(core$1.ActionIcon, { title: "Remove Group", "data-testid": `remove-group-button-${intervalGroup.id}`, key: `remove-group-button-${intervalGroup.id}`, size: "sm", onClick: (e) => {
5031
+ killEvent(e);
5032
+ props.onRemoveGroup(intervalGroup);
5033
+ } },
5034
+ React.createElement(icons.IconCircleMinus, null))),
5035
+ React.createElement(ReferenceRangeGroupFilters, { intervalGroup: intervalGroup, onChange: props.onChange }),
5036
+ React.createElement(core$1.Divider, null),
5037
+ intervalGroup.intervals.map((interval) => (React.createElement(core$1.Stack, { key: `interval-${interval.id}`, spacing: 'xs' },
5038
+ React.createElement(core$1.Group, null,
5039
+ React.createElement(core$1.TextInput, { key: `condition-${interval.id}`, "data-testid": `condition-${interval.id}`, defaultValue: interval.condition, label: 'Condition: ', size: 'sm', onChange: (e) => {
5040
+ killEvent(e);
5041
+ props.onChange(intervalGroup.id, Object.assign(Object.assign({}, interval), { condition: e.currentTarget.value.trim() }));
5042
+ } }),
5043
+ React.createElement(core$1.ActionIcon, { title: "Remove Interval", size: "sm", key: `remove-interval-${interval.id}`, "data-testid": `remove-interval-${interval.id}`, onClick: (e) => {
5044
+ killEvent(e);
5045
+ props.onRemove(intervalGroup.id, interval);
5046
+ } },
5047
+ React.createElement(icons.IconCircleMinus, null))),
5048
+ React.createElement(RangeInput, { onChange: (range) => {
5049
+ props.onChange(intervalGroup.id, Object.assign(Object.assign({}, interval), { range }));
5050
+ }, key: `range-${interval.id}`, name: `range-${interval.id}`, defaultValue: interval.range })))),
5051
+ React.createElement(core$1.ActionIcon, { title: "Add Interval", size: "sm", onClick: (e) => {
5052
+ killEvent(e);
5053
+ props.onAdd(intervalGroup.id, {
5054
+ range: {
5055
+ low: { unit },
5056
+ high: { unit },
5057
+ },
5058
+ });
5059
+ } },
5060
+ React.createElement(icons.IconCirclePlus, null)))));
5061
+ }
5062
+ /**
5063
+ * Render the "filters" section of the IntervalGroup. Also populates some initial
5064
+ */
5065
+ function ReferenceRangeGroupFilters(props) {
5066
+ var _a, _b;
5067
+ const { intervalGroup, onChange } = props;
5068
+ // Pre-populate the units of the age filter
5069
+ if (!intervalGroup.filters.age) {
5070
+ intervalGroup.filters.age = {};
5071
+ }
5072
+ for (const key of ['low', 'high']) {
5073
+ if (!((_a = intervalGroup.filters.age[key]) === null || _a === void 0 ? void 0 : _a.unit)) {
5074
+ intervalGroup.filters.age[key] = Object.assign(Object.assign({}, intervalGroup.filters.age[key]), { unit: 'years', system: 'http://unitsofmeasure.org' });
5075
+ }
5076
+ }
5077
+ return (React.createElement(core$1.Stack, { style: { maxWidth: '50%' } },
5078
+ React.createElement(core$1.Group, null,
5079
+ React.createElement(core$1.NativeSelect, { data: ['', 'male', 'female'], label: "Gender:", defaultValue: intervalGroup.filters.gender || '', onChange: (e) => {
5080
+ var _a;
5081
+ for (const interval of intervalGroup.intervals) {
5082
+ let newGender = (_a = e.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
5083
+ if (newGender === '') {
5084
+ newGender = undefined;
5085
+ }
5086
+ onChange(intervalGroup.id, Object.assign(Object.assign({}, interval), { gender: newGender }));
5087
+ }
5088
+ } })),
5089
+ React.createElement(core$1.Group, { spacing: 'xs' },
5090
+ React.createElement(core$1.Text, { component: "label", htmlFor: `div-age-${intervalGroup.id}` }, "Age:"),
5091
+ React.createElement("div", { id: `div-age-${intervalGroup.id}` },
5092
+ React.createElement(RangeInput, { key: `age-${intervalGroup.id}`, name: `age-${intervalGroup.id}`, defaultValue: intervalGroup.filters['age'], onChange: (ageRange) => {
5093
+ for (const interval of intervalGroup.intervals) {
5094
+ onChange(intervalGroup.id, Object.assign(Object.assign({}, interval), { age: ageRange }));
5095
+ }
5096
+ } }))),
5097
+ React.createElement(core$1.NativeSelect, { data: ['', 'pre-puberty', 'follicular', 'midcycle', 'luteal', 'postmenopausal'], label: "Endocrine:", defaultValue: ((_b = intervalGroup.filters.context) === null || _b === void 0 ? void 0 : _b.text) || '', onChange: (e) => {
5098
+ var _a;
5099
+ for (const interval of intervalGroup.intervals) {
5100
+ let newEndocrine = (_a = e.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
5101
+ if (newEndocrine === '') {
5102
+ newEndocrine = undefined;
5103
+ onChange(intervalGroup.id, Object.assign(Object.assign({}, interval), { context: undefined }));
5104
+ }
5105
+ else {
5106
+ onChange(intervalGroup.id, Object.assign(Object.assign({}, interval), { context: {
5107
+ text: newEndocrine,
5108
+ coding: [
5109
+ { code: newEndocrine, system: 'http://terminology.hl7.org/CodeSystem/referencerange-meaning' },
5110
+ ],
5111
+ } }));
5112
+ }
5113
+ }
5114
+ } })));
5115
+ }
5116
+ /**
5117
+ * Helper function that assigns ids to each qualifiedInterval of an ObservationDefinition
5118
+ * @param definition An ObservationDefinition
5119
+ * @param setIntervalId React setState function for the intervalId
5120
+ * @returns
5121
+ */
5122
+ function ensureQualifiedIntervalKeys(definition, setIntervalId) {
5123
+ const intervals = definition.qualifiedInterval || [];
5124
+ // Set the nextId to the max of any existing numeric id
5125
+ let nextId = Math.max(...intervals.map((interval) => {
5126
+ var _a;
5127
+ const existingNum = parseInt(((_a = interval.id) === null || _a === void 0 ? void 0 : _a.substring(3)) || '');
5128
+ return !isNaN(existingNum) ? existingNum : Number.NEGATIVE_INFINITY;
5129
+ })) + 1;
5130
+ if (!Number.isFinite(nextId)) {
5131
+ nextId = 1;
5132
+ }
5133
+ // If an interval doesn't have an id, set it to the nextId
5134
+ definition = Object.assign(Object.assign({}, definition), { qualifiedInterval: intervals.map((interval) => (Object.assign(Object.assign({}, interval), { id: interval.id || `id-${nextId++}` }))) });
5135
+ setIntervalId(nextId);
5136
+ return definition;
5137
+ }
5138
+ /**
5139
+ * Group all ObservationDefinitionQualifiedIntervals based on the values of their "filter" properties,
5140
+ * so that similar ranges can be grouped together
5141
+ */
5142
+ function groupQualifiedIntervals(intervals, setGroupId) {
5143
+ let groupId = 1;
5144
+ const groups = {};
5145
+ for (const interval of intervals) {
5146
+ const groupKey = generateGroupKey(interval);
5147
+ if (!(groupKey in groups)) {
5148
+ groups[groupKey] = {
5149
+ id: `group-id-${groupId++}`,
5150
+ filters: Object.fromEntries(intervalFilters.map((f) => [f, interval[f]])),
5151
+ intervals: [],
5152
+ };
5153
+ }
5154
+ groups[groupKey].intervals.push(interval);
5155
+ }
5156
+ setGroupId(groupId);
5157
+ return Object.values(groups);
5158
+ }
5159
+ /**
5160
+ * Generates a unique string for each set of filter values, so that similarly filtered intervals can be grouped together
5161
+ * @return A "group key" that corresponds to the value of the interval filter properties.
5162
+ */
5163
+ function generateGroupKey(interval) {
5164
+ var _a, _b;
5165
+ const results = [
5166
+ `gender=${interval.gender}`,
5167
+ `age=${core.formatRange(interval.age)}`,
5168
+ `gestationalAge=${core.formatRange(interval.gestationalAge)}`,
5169
+ `context=${(_a = interval.context) === null || _a === void 0 ? void 0 : _a.text}`,
5170
+ `appliesTo=${(_b = interval.appliesTo) === null || _b === void 0 ? void 0 : _b.map((c) => c.text).join('+')}`,
5171
+ ];
5172
+ return results.join(':');
5173
+ }
5174
+ function getUnitString(unit) {
5175
+ return unit && (core.getCodeBySystem(unit, 'http://unitsofmeasure.org') || unit.text);
5176
+ }
5177
+ function isEmptyInterval(interval) {
5178
+ var _a, _b, _c, _d;
5179
+ return ((_b = (_a = interval.range) === null || _a === void 0 ? void 0 : _a.low) === null || _b === void 0 ? void 0 : _b.value) === undefined && ((_d = (_c = interval.range) === null || _c === void 0 ? void 0 : _c.high) === null || _d === void 0 ? void 0 : _d.value) === undefined;
5180
+ }
5181
+
4966
5182
  /*
4967
5183
  * Request status: https://hl7.org/fhir/valueset-request-status.html
4968
5184
  * draft, active, on-hold, revoked, completed, entered-in-error, unknown
@@ -5759,6 +5975,8 @@
5759
5975
  exports.RangeDisplay = RangeDisplay;
5760
5976
  exports.RangeInput = RangeInput;
5761
5977
  exports.ReferenceInput = ReferenceInput;
5978
+ exports.ReferenceRangeEditor = ReferenceRangeEditor;
5979
+ exports.ReferenceRangeGroupEditor = ReferenceRangeGroupEditor;
5762
5980
  exports.RegisterForm = RegisterForm;
5763
5981
  exports.RequestGroupDisplay = RequestGroupDisplay;
5764
5982
  exports.ResourceArrayDisplay = ResourceArrayDisplay;
@@ -5787,8 +6005,6 @@
5787
6005
  exports.StatusBadge = StatusBadge;
5788
6006
  exports.Timeline = Timeline;
5789
6007
  exports.TimelineItem = TimelineItem;
5790
- exports.addDateEqualsFilter = addDateEqualsFilter;
5791
- exports.addDateFilter = addDateFilter;
5792
6008
  exports.addDateFilterBetween = addDateFilterBetween;
5793
6009
  exports.addField = addField;
5794
6010
  exports.addFilter = addFilter;
@@ -5807,7 +6023,6 @@
5807
6023
  exports.convertLocalToIso = convertLocalToIso;
5808
6024
  exports.createScriptTag = createScriptTag;
5809
6025
  exports.deleteFilter = deleteFilter;
5810
- exports.formatRangeString = formatRangeString;
5811
6026
  exports.getErrorsForInput = getErrorsForInput;
5812
6027
  exports.getIssuesForExpression = getIssuesForExpression;
5813
6028
  exports.getOpString = getOpString;
@@ -5816,7 +6031,6 @@
5816
6031
  exports.getSortField = getSortField;
5817
6032
  exports.getTimeString = getTimeString;
5818
6033
  exports.getValueAndType = getValueAndType;
5819
- exports.hasFilterOnField = hasFilterOnField;
5820
6034
  exports.initRecaptcha = initRecaptcha;
5821
6035
  exports.isChoiceQuestion = isChoiceQuestion;
5822
6036
  exports.isQuestionEnabled = isQuestionEnabled;