@f1studio/form-spec 5.0.0-alpha.151 → 5.0.0-alpha.154

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 (400) hide show
  1. package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.d.ts.map +1 -1
  2. package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts +5 -3
  3. package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts.map +1 -1
  4. package/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.d.ts +19 -0
  5. package/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.d.ts.map +1 -0
  6. package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.d.ts +39 -2
  7. package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.d.ts.map +1 -1
  8. package/FormSpec.TS/FormSpec.FS/BitmaskHelpers.js.map +1 -0
  9. package/FormSpec.TS/FormSpec.FS/BlueprintValidation.js.map +1 -0
  10. package/FormSpec.TS/FormSpec.FS/Components/HelloComponent.js.map +1 -0
  11. package/FormSpec.TS/FormSpec.FS/Designer.js.map +1 -0
  12. package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/FormSpec.js.map +1 -1
  13. package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.js.map +1 -0
  14. package/FormSpec.TS/FormSpec.FS/FormSpecValues.js.map +1 -0
  15. package/FormSpec.TS/FormSpec.FS/Helpers.js.map +1 -0
  16. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.js.map +1 -0
  17. package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.js +3 -3
  18. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.js.map +1 -0
  19. package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.js +2 -2
  20. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.js.map +1 -0
  21. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.js.map +1 -0
  22. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.js.map +1 -0
  23. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.js.map +1 -0
  24. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.js.map +1 -0
  25. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.js.map +1 -0
  26. package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js +1 -1
  27. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js.map +1 -0
  28. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.js.map +1 -0
  29. package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/Adapters/CorEMR/CoreMREncoder.js +23 -21
  30. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js.map +1 -0
  31. package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/Adapters/CorEMR/CoreMRSourceMap.js +16 -7
  32. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js.map +1 -0
  33. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.js.map +1 -0
  34. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/FormSystemAdapter.js.map +1 -0
  35. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormAdapter.js.map +1 -0
  36. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormTypes.js.map +1 -0
  37. package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.js.map +1 -0
  38. package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.js +580 -0
  39. package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.js.map +1 -0
  40. package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateDecodeTypes.js.map +1 -0
  41. package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/CorEMR/TemplateManifestDecoder.js +199 -8
  42. package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.js.map +1 -0
  43. package/FormSpec.TS/FormSpec.FS/Integrations/OpenFda/OpenFdaTypes.js.map +1 -0
  44. package/FormSpec.TS/FormSpec.FS/Interfaces.js.map +1 -0
  45. package/FormSpec.TS/FormSpec.FS/Interop/Facade/BlueprintFilledForm.js.map +1 -0
  46. package/FormSpec.TS/FormSpec.FS/Interop/Facade/FormAnswersGate.js.map +1 -0
  47. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.js.map +1 -0
  48. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.js.map +1 -0
  49. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Values.Api.Option.js.map +1 -0
  50. package/FormSpec.TS/FormSpec.FS/Logging/LogTypes.js.map +1 -0
  51. package/FormSpec.TS/FormSpec.FS/Migrator.js.map +1 -0
  52. package/FormSpec.TS/FormSpec.FS/PathwayDataExtractor.js.map +1 -0
  53. package/FormSpec.TS/FormSpec.FS/PathwayExecutor.js.map +1 -0
  54. package/FormSpec.TS/FormSpec.FS/PathwayValidator.js.map +1 -0
  55. package/FormSpec.TS/FormSpec.FS/PluginInterface.js.map +1 -0
  56. package/FormSpec.TS/FormSpec.FS/Prelude.js.map +1 -0
  57. package/FormSpec.TS/FormSpec.FS/Provenance.js.map +1 -0
  58. package/FormSpec.TS/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.js.map +1 -0
  59. package/FormSpec.TS/FormSpec.FS/Renderers/MermaidRenderer.js.map +1 -0
  60. package/FormSpec.TS/FormSpec.FS/Renderers/PathwayRenderers.js.map +1 -0
  61. package/FormSpec.TS/PathwayExecutor.withPlugins.js.map +1 -0
  62. package/FormSpec.TS/PluginRegistration.js.map +1 -0
  63. package/{Thoth.Json → FormSpec.TS/Thoth.Json}/packages/Thoth.Json/Decode.js +63 -69
  64. package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Decode.js.map +1 -0
  65. package/{Thoth.Json → FormSpec.TS/Thoth.Json}/packages/Thoth.Json/Encode.js +6 -10
  66. package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Encode.js.map +1 -0
  67. package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Extra.js.map +1 -0
  68. package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Types.js.map +1 -0
  69. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Base.fs.js.map +1 -0
  70. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Error.fs.js.map +1 -0
  71. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Extensions.fs.js.map +1 -0
  72. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Field.fs.js.map +1 -0
  73. package/FormSpec.TS/fable_modules/Fable.Form.Simple.5.0.1/Form.fs.js.map +1 -0
  74. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/CheckboxField.fs.js.map +1 -0
  75. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/ColorField.fs.js.map +1 -0
  76. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/DateField.fs.js.map +1 -0
  77. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/DateTimeLocalField.fs.js.map +1 -0
  78. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/EmailField.fs.js.map +1 -0
  79. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/FileField.fs.js.map +1 -0
  80. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Form.fs.js.map +1 -0
  81. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/FormList.fs.js.map +1 -0
  82. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Group.fs.js.map +1 -0
  83. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Html.View.fs.js.map +1 -0
  84. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/InputField.fs.js.map +1 -0
  85. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/NumberField.fs.js.map +1 -0
  86. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/PasswordField.fs.js.map +1 -0
  87. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/RadioField.fs.js.map +1 -0
  88. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/SearchField.fs.js.map +1 -0
  89. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Section.fs.js.map +1 -0
  90. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/SelectField.fs.js.map +1 -0
  91. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/TelField.fs.js.map +1 -0
  92. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/TextField.fs.js.map +1 -0
  93. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/TextareaField.fs.js.map +1 -0
  94. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/TimeField.fs.js.map +1 -0
  95. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Types.fs.js.map +1 -0
  96. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/CheckboxField.fs.js.map +1 -0
  97. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/ColorField.fs.js.map +1 -0
  98. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/DateField.fs.js.map +1 -0
  99. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/DateTimeLocalField.fs.js.map +1 -0
  100. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/EmailField.fs.js.map +1 -0
  101. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/NumberField.fs.js.map +1 -0
  102. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/PasswordField.fs.js.map +1 -0
  103. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/RadioField.fs.js.map +1 -0
  104. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/RangeField.fs.js.map +1 -0
  105. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/SearchField.fs.js.map +1 -0
  106. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/SelectField.fs.js.map +1 -0
  107. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/TelField.fs.js.map +1 -0
  108. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/TextField.fs.js.map +1 -0
  109. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/TextareaField.fs.js.map +1 -0
  110. package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/TimeField.fs.js.map +1 -0
  111. package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js.map +1 -0
  112. package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/Promise.fs.js.map +1 -0
  113. package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js.map +1 -0
  114. package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Hooks.fs.js.map +1 -0
  115. package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.fs.js.map +1 -0
  116. package/FormSpec.TS/fable_modules/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.fs.js.map +1 -0
  117. package/FormSpec.TS/fable_modules/Feliz.2.8.0/Colors.fs.js.map +1 -0
  118. package/FormSpec.TS/fable_modules/Feliz.2.8.0/DateParsing.fs.js.map +1 -0
  119. package/FormSpec.TS/fable_modules/Feliz.2.8.0/Helpers.fs.js.map +1 -0
  120. package/FormSpec.TS/fable_modules/Feliz.2.8.0/Internal.fs.js.map +1 -0
  121. package/FormSpec.TS/fable_modules/Feliz.2.8.0/Interop.fs.js.map +1 -0
  122. package/FormSpec.TS/fable_modules/Feliz.2.8.0/Key.fs.js.map +1 -0
  123. package/FormSpec.TS/fable_modules/Feliz.2.8.0/Properties.fs.js.map +1 -0
  124. package/FormSpec.TS/fable_modules/Feliz.2.8.0/ReactDOM.fs.js.map +1 -0
  125. package/FormSpec.TS/fable_modules/Feliz.2.8.0/ReactInterop.js.map +1 -0
  126. package/FormSpec.TS/fable_modules/Feliz.2.8.0/ReactTypes.fs.js.map +1 -0
  127. package/FormSpec.TS/fable_modules/Feliz.2.8.0/StyleTypes.fs.js.map +1 -0
  128. package/FormSpec.TS/fable_modules/Feliz.2.8.0/Svg.fs.js.map +1 -0
  129. package/FormSpec.TS/fable_modules/Feliz.2.8.0/Types.fs.js.map +1 -0
  130. package/FormSpec.TS/fable_modules/Feliz.Bulma.3.0.0/ElementBuilders.fs.js.map +1 -0
  131. package/FormSpec.TS/fable_modules/Feliz.Bulma.3.0.0/Modifiers.fs.js.map +1 -0
  132. package/FormSpec.TS/fable_modules/Feliz.Bulma.3.0.0/Operators.fs.js.map +1 -0
  133. package/FormSpec.TS/fable_modules/Glutinum.Feliz.ReactSignaturePadWrapper.1.0.2/Types.fs.js.map +1 -0
  134. package/FormSpec.TS/plugins/allergyfinder/src/AllergyFinderField.js.map +1 -0
  135. package/{plugins → FormSpec.TS/plugins}/allergyfinder/src/AllergyLogic.js +0 -63
  136. package/FormSpec.TS/plugins/allergyfinder/src/AllergyLogic.js.map +1 -0
  137. package/FormSpec.TS/plugins/allergyfinder/src/OpenFdaClient.js.map +1 -0
  138. package/FormSpec.TS/plugins/bmi/src/BMIField.js.map +1 -0
  139. package/FormSpec.TS/plugins/demographics/src/DemographicsField.js.map +1 -0
  140. package/FormSpec.TS/plugins/likert/src/LikertField.js.map +1 -0
  141. package/FormSpec.TS/plugins/signature/src/SignatureField.js.map +1 -0
  142. package/FormSpec.TS/plugins/vitals/src/VitalsField.js.map +1 -0
  143. package/FormSpec.TS/plugins/vitals/src/VitalsLogic.js.map +1 -0
  144. package/README.md +7 -7
  145. package/Thoth.Json/packages/Thoth.Json/Decode.d.ts +2 -2
  146. package/Thoth.Json/packages/Thoth.Json/Decode.d.ts.map +1 -1
  147. package/Thoth.Json/packages/Thoth.Json/Encode.d.ts.map +1 -1
  148. package/package.json +13 -15
  149. package/plugins/allergyfinder/src/AllergyLogic.d.ts +0 -6
  150. package/plugins/allergyfinder/src/AllergyLogic.d.ts.map +1 -1
  151. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.ts +3 -3
  152. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.ts +3 -3
  153. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts +1 -1
  154. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts +25 -23
  155. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts +19 -13
  156. package/src/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.ts +545 -0
  157. package/src/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.ts +120 -14
  158. package/src/Thoth.Json/packages/Thoth.Json/Decode.ts +38 -55
  159. package/src/Thoth.Json/packages/Thoth.Json/Encode.ts +10 -16
  160. package/src/plugins/allergyfinder/src/AllergyLogic.ts +4 -22
  161. package/FormSpec.FS/BitmaskHelpers.js.map +0 -1
  162. package/FormSpec.FS/BlueprintValidation.js.map +0 -1
  163. package/FormSpec.FS/Components/HelloComponent.js.map +0 -1
  164. package/FormSpec.FS/Designer.js.map +0 -1
  165. package/FormSpec.FS/FormSpecHelpers.js.map +0 -1
  166. package/FormSpec.FS/FormSpecValues.js.map +0 -1
  167. package/FormSpec.FS/Helpers.js.map +0 -1
  168. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.js.map +0 -1
  169. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.js.map +0 -1
  170. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.js.map +0 -1
  171. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.js.map +0 -1
  172. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.js.map +0 -1
  173. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.js.map +0 -1
  174. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.js.map +0 -1
  175. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.js.map +0 -1
  176. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js.map +0 -1
  177. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.js.map +0 -1
  178. package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js.map +0 -1
  179. package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js.map +0 -1
  180. package/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.js.map +0 -1
  181. package/FormSpec.FS/Integrations/Adapters/FormSystemAdapter.js.map +0 -1
  182. package/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormAdapter.js.map +0 -1
  183. package/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormTypes.js.map +0 -1
  184. package/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.js.map +0 -1
  185. package/FormSpec.FS/Integrations/CorEMR/TemplateDecodeTypes.js.map +0 -1
  186. package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.js.map +0 -1
  187. package/FormSpec.FS/Integrations/OpenFda/OpenFdaTypes.js.map +0 -1
  188. package/FormSpec.FS/Interfaces.js.map +0 -1
  189. package/FormSpec.FS/Interop/Facade/BlueprintFilledForm.js.map +0 -1
  190. package/FormSpec.FS/Interop/Facade/FormAnswersGate.js.map +0 -1
  191. package/FormSpec.FS/Interop/FormSpec.Api.Helpers.js.map +0 -1
  192. package/FormSpec.FS/Interop/FormSpec.Api.Option.js.map +0 -1
  193. package/FormSpec.FS/Interop/FormSpec.Values.Api.Option.js.map +0 -1
  194. package/FormSpec.FS/Logging/LogTypes.js.map +0 -1
  195. package/FormSpec.FS/Migrator.js.map +0 -1
  196. package/FormSpec.FS/PathwayDataExtractor.js.map +0 -1
  197. package/FormSpec.FS/PathwayExecutor.js.map +0 -1
  198. package/FormSpec.FS/PathwayValidator.js.map +0 -1
  199. package/FormSpec.FS/PluginInterface.js.map +0 -1
  200. package/FormSpec.FS/Prelude.js.map +0 -1
  201. package/FormSpec.FS/Provenance.js.map +0 -1
  202. package/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.js.map +0 -1
  203. package/FormSpec.FS/Renderers/MermaidRenderer.js.map +0 -1
  204. package/FormSpec.FS/Renderers/PathwayRenderers.js.map +0 -1
  205. package/PathwayExecutor.withPlugins.js.map +0 -1
  206. package/PluginRegistration.js.map +0 -1
  207. package/Thoth.Json/packages/Thoth.Json/Decode.js.map +0 -1
  208. package/Thoth.Json/packages/Thoth.Json/Encode.js.map +0 -1
  209. package/Thoth.Json/packages/Thoth.Json/Extra.js.map +0 -1
  210. package/Thoth.Json/packages/Thoth.Json/Types.js.map +0 -1
  211. package/fable_modules/Fable.Form.3.0.0/Base.fs.js.map +0 -1
  212. package/fable_modules/Fable.Form.3.0.0/Error.fs.js.map +0 -1
  213. package/fable_modules/Fable.Form.3.0.0/Extensions.fs.js.map +0 -1
  214. package/fable_modules/Fable.Form.3.0.0/Field.fs.js.map +0 -1
  215. package/fable_modules/Fable.Form.Simple.5.0.1/Form.fs.js.map +0 -1
  216. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/CheckboxField.fs.js.map +0 -1
  217. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/ColorField.fs.js.map +0 -1
  218. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/DateField.fs.js.map +0 -1
  219. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/DateTimeLocalField.fs.js.map +0 -1
  220. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/EmailField.fs.js.map +0 -1
  221. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/FileField.fs.js.map +0 -1
  222. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Form.fs.js.map +0 -1
  223. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/FormList.fs.js.map +0 -1
  224. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Group.fs.js.map +0 -1
  225. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Html.View.fs.js.map +0 -1
  226. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/InputField.fs.js.map +0 -1
  227. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/NumberField.fs.js.map +0 -1
  228. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/PasswordField.fs.js.map +0 -1
  229. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/RadioField.fs.js.map +0 -1
  230. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/SearchField.fs.js.map +0 -1
  231. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Section.fs.js.map +0 -1
  232. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/SelectField.fs.js.map +0 -1
  233. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/TelField.fs.js.map +0 -1
  234. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/TextField.fs.js.map +0 -1
  235. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/TextareaField.fs.js.map +0 -1
  236. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/TimeField.fs.js.map +0 -1
  237. package/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Types.fs.js.map +0 -1
  238. package/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/CheckboxField.fs.js.map +0 -1
  239. package/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/ColorField.fs.js.map +0 -1
  240. package/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/DateField.fs.js.map +0 -1
  241. package/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/DateTimeLocalField.fs.js.map +0 -1
  242. package/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/EmailField.fs.js.map +0 -1
  243. package/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/NumberField.fs.js.map +0 -1
  244. package/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/PasswordField.fs.js.map +0 -1
  245. package/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/RadioField.fs.js.map +0 -1
  246. package/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/RangeField.fs.js.map +0 -1
  247. package/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/SearchField.fs.js.map +0 -1
  248. package/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/SelectField.fs.js.map +0 -1
  249. package/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/TelField.fs.js.map +0 -1
  250. package/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/TextField.fs.js.map +0 -1
  251. package/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/TextareaField.fs.js.map +0 -1
  252. package/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/TimeField.fs.js.map +0 -1
  253. package/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js.map +0 -1
  254. package/fable_modules/Fable.Promise.3.2.0/Promise.fs.js.map +0 -1
  255. package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js.map +0 -1
  256. package/fable_modules/Fable.React.Types.18.3.0/Fable.React.Hooks.fs.js.map +0 -1
  257. package/fable_modules/Fable.React.Types.18.3.0/Fable.React.fs.js.map +0 -1
  258. package/fable_modules/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.fs.js.map +0 -1
  259. package/fable_modules/Feliz.2.8.0/Colors.fs.js.map +0 -1
  260. package/fable_modules/Feliz.2.8.0/DateParsing.fs.js.map +0 -1
  261. package/fable_modules/Feliz.2.8.0/Helpers.fs.js.map +0 -1
  262. package/fable_modules/Feliz.2.8.0/Internal.fs.js.map +0 -1
  263. package/fable_modules/Feliz.2.8.0/Interop.fs.js.map +0 -1
  264. package/fable_modules/Feliz.2.8.0/Key.fs.js.map +0 -1
  265. package/fable_modules/Feliz.2.8.0/Properties.fs.js.map +0 -1
  266. package/fable_modules/Feliz.2.8.0/ReactDOM.fs.js.map +0 -1
  267. package/fable_modules/Feliz.2.8.0/ReactInterop.js.map +0 -1
  268. package/fable_modules/Feliz.2.8.0/ReactTypes.fs.js.map +0 -1
  269. package/fable_modules/Feliz.2.8.0/StyleTypes.fs.js.map +0 -1
  270. package/fable_modules/Feliz.2.8.0/Svg.fs.js.map +0 -1
  271. package/fable_modules/Feliz.2.8.0/Types.fs.js.map +0 -1
  272. package/fable_modules/Feliz.Bulma.3.0.0/ElementBuilders.fs.js.map +0 -1
  273. package/fable_modules/Feliz.Bulma.3.0.0/Modifiers.fs.js.map +0 -1
  274. package/fable_modules/Feliz.Bulma.3.0.0/Operators.fs.js.map +0 -1
  275. package/fable_modules/Glutinum.Feliz.ReactSignaturePadWrapper.1.0.2/Types.fs.js.map +0 -1
  276. package/plugins/allergyfinder/src/AllergyFinderField.js.map +0 -1
  277. package/plugins/allergyfinder/src/AllergyLogic.js.map +0 -1
  278. package/plugins/allergyfinder/src/OpenFdaClient.js.map +0 -1
  279. package/plugins/bmi/src/BMIField.js.map +0 -1
  280. package/plugins/demographics/src/DemographicsField.js.map +0 -1
  281. package/plugins/likert/src/LikertField.js.map +0 -1
  282. package/plugins/signature/src/SignatureField.js.map +0 -1
  283. package/plugins/vitals/src/VitalsField.js.map +0 -1
  284. package/plugins/vitals/src/VitalsLogic.js.map +0 -1
  285. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/BitmaskHelpers.js +0 -0
  286. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/BlueprintValidation.js +0 -0
  287. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Components/HelloComponent.js +0 -0
  288. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Designer.js +0 -0
  289. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/FormSpec.js +0 -0
  290. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/FormSpecHelpers.js +0 -0
  291. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/FormSpecValues.js +0 -0
  292. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Helpers.js +0 -0
  293. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/Adapters/CorEMR/CorEMRAdapter.js +0 -0
  294. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.js +0 -0
  295. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/Adapters/CorEMR/CorEMRSectioning.js +0 -0
  296. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.js +0 -0
  297. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.js +0 -0
  298. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.js +0 -0
  299. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.js +0 -0
  300. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.js +0 -0
  301. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/Adapters/FormSystemAdapter.js +0 -0
  302. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/Adapters/ReactHookForm/ReactHookFormAdapter.js +0 -0
  303. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/Adapters/ReactHookForm/ReactHookFormTypes.js +0 -0
  304. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/CorEMR/CoreMRTypes.js +0 -0
  305. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/CorEMR/TemplateDecodeTypes.js +0 -0
  306. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Integrations/OpenFda/OpenFdaTypes.js +0 -0
  307. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Interfaces.js +0 -0
  308. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Interop/Facade/BlueprintFilledForm.js +0 -0
  309. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Interop/Facade/FormAnswersGate.js +0 -0
  310. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Interop/FormSpec.Api.Helpers.js +0 -0
  311. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Interop/FormSpec.Api.Option.js +0 -0
  312. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Interop/FormSpec.Values.Api.Option.js +0 -0
  313. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Logging/LogTypes.js +0 -0
  314. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Migrator.js +0 -0
  315. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/PathwayDataExtractor.js +0 -0
  316. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/PathwayExecutor.js +0 -0
  317. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/PathwayValidator.js +0 -0
  318. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/PluginInterface.js +0 -0
  319. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Prelude.js +0 -0
  320. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Provenance.js +0 -0
  321. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Renderers/FormSpecMarkdownRenderer.js +0 -0
  322. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Renderers/MermaidRenderer.js +0 -0
  323. /package/{FormSpec.FS → FormSpec.TS/FormSpec.FS}/Renderers/PathwayRenderers.js +0 -0
  324. /package/{PathwayExecutor.withPlugins.js → FormSpec.TS/PathwayExecutor.withPlugins.js} +0 -0
  325. /package/{PluginRegistration.js → FormSpec.TS/PluginRegistration.js} +0 -0
  326. /package/{Thoth.Json → FormSpec.TS/Thoth.Json}/packages/Thoth.Json/Extra.js +0 -0
  327. /package/{Thoth.Json → FormSpec.TS/Thoth.Json}/packages/Thoth.Json/Types.js +0 -0
  328. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.3.0.0/Base.fs.js +0 -0
  329. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.3.0.0/Error.fs.js +0 -0
  330. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.3.0.0/Extensions.fs.js +0 -0
  331. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.3.0.0/Field.fs.js +0 -0
  332. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.5.0.1/Form.fs.js +0 -0
  333. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/CheckboxField.fs.js +0 -0
  334. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/ColorField.fs.js +0 -0
  335. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/DateField.fs.js +0 -0
  336. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/DateTimeLocalField.fs.js +0 -0
  337. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/EmailField.fs.js +0 -0
  338. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/FileField.fs.js +0 -0
  339. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/Form.fs.js +0 -0
  340. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/FormList.fs.js +0 -0
  341. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/Group.fs.js +0 -0
  342. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/Html.View.fs.js +0 -0
  343. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/InputField.fs.js +0 -0
  344. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/NumberField.fs.js +0 -0
  345. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/PasswordField.fs.js +0 -0
  346. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/RadioField.fs.js +0 -0
  347. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/SearchField.fs.js +0 -0
  348. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/Section.fs.js +0 -0
  349. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/SelectField.fs.js +0 -0
  350. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/TelField.fs.js +0 -0
  351. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/TextField.fs.js +0 -0
  352. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/TextareaField.fs.js +0 -0
  353. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/TimeField.fs.js +0 -0
  354. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Bulma.5.0.1/Types.fs.js +0 -0
  355. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Fields.Html.1.0.1/CheckboxField.fs.js +0 -0
  356. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Fields.Html.1.0.1/ColorField.fs.js +0 -0
  357. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Fields.Html.1.0.1/DateField.fs.js +0 -0
  358. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Fields.Html.1.0.1/DateTimeLocalField.fs.js +0 -0
  359. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Fields.Html.1.0.1/EmailField.fs.js +0 -0
  360. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Fields.Html.1.0.1/NumberField.fs.js +0 -0
  361. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Fields.Html.1.0.1/PasswordField.fs.js +0 -0
  362. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Fields.Html.1.0.1/RadioField.fs.js +0 -0
  363. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Fields.Html.1.0.1/RangeField.fs.js +0 -0
  364. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Fields.Html.1.0.1/SearchField.fs.js +0 -0
  365. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Fields.Html.1.0.1/SelectField.fs.js +0 -0
  366. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Fields.Html.1.0.1/TelField.fs.js +0 -0
  367. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Fields.Html.1.0.1/TextField.fs.js +0 -0
  368. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Fields.Html.1.0.1/TextareaField.fs.js +0 -0
  369. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Form.Simple.Fields.Html.1.0.1/TimeField.fs.js +0 -0
  370. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Promise.3.2.0/AsyncIterable.fs.js +0 -0
  371. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Promise.3.2.0/Promise.fs.js +0 -0
  372. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.Promise.3.2.0/PromiseImpl.fs.js +0 -0
  373. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.React.Types.18.3.0/Fable.React.Hooks.fs.js +0 -0
  374. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.React.Types.18.3.0/Fable.React.fs.js +0 -0
  375. /package/{fable_modules → FormSpec.TS/fable_modules}/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.fs.js +0 -0
  376. /package/{fable_modules → FormSpec.TS/fable_modules}/Feliz.2.8.0/Colors.fs.js +0 -0
  377. /package/{fable_modules → FormSpec.TS/fable_modules}/Feliz.2.8.0/DateParsing.fs.js +0 -0
  378. /package/{fable_modules → FormSpec.TS/fable_modules}/Feliz.2.8.0/Helpers.fs.js +0 -0
  379. /package/{fable_modules → FormSpec.TS/fable_modules}/Feliz.2.8.0/Internal.fs.js +0 -0
  380. /package/{fable_modules → FormSpec.TS/fable_modules}/Feliz.2.8.0/Interop.fs.js +0 -0
  381. /package/{fable_modules → FormSpec.TS/fable_modules}/Feliz.2.8.0/Key.fs.js +0 -0
  382. /package/{fable_modules → FormSpec.TS/fable_modules}/Feliz.2.8.0/Properties.fs.js +0 -0
  383. /package/{fable_modules → FormSpec.TS/fable_modules}/Feliz.2.8.0/ReactDOM.fs.js +0 -0
  384. /package/{fable_modules → FormSpec.TS/fable_modules}/Feliz.2.8.0/ReactInterop.js +0 -0
  385. /package/{fable_modules → FormSpec.TS/fable_modules}/Feliz.2.8.0/ReactTypes.fs.js +0 -0
  386. /package/{fable_modules → FormSpec.TS/fable_modules}/Feliz.2.8.0/StyleTypes.fs.js +0 -0
  387. /package/{fable_modules → FormSpec.TS/fable_modules}/Feliz.2.8.0/Svg.fs.js +0 -0
  388. /package/{fable_modules → FormSpec.TS/fable_modules}/Feliz.2.8.0/Types.fs.js +0 -0
  389. /package/{fable_modules → FormSpec.TS/fable_modules}/Feliz.Bulma.3.0.0/ElementBuilders.fs.js +0 -0
  390. /package/{fable_modules → FormSpec.TS/fable_modules}/Feliz.Bulma.3.0.0/Modifiers.fs.js +0 -0
  391. /package/{fable_modules → FormSpec.TS/fable_modules}/Feliz.Bulma.3.0.0/Operators.fs.js +0 -0
  392. /package/{fable_modules → FormSpec.TS/fable_modules}/Glutinum.Feliz.ReactSignaturePadWrapper.1.0.2/Types.fs.js +0 -0
  393. /package/{plugins → FormSpec.TS/plugins}/allergyfinder/src/AllergyFinderField.js +0 -0
  394. /package/{plugins → FormSpec.TS/plugins}/allergyfinder/src/OpenFdaClient.js +0 -0
  395. /package/{plugins → FormSpec.TS/plugins}/bmi/src/BMIField.js +0 -0
  396. /package/{plugins → FormSpec.TS/plugins}/demographics/src/DemographicsField.js +0 -0
  397. /package/{plugins → FormSpec.TS/plugins}/likert/src/LikertField.js +0 -0
  398. /package/{plugins → FormSpec.TS/plugins}/signature/src/SignatureField.js +0 -0
  399. /package/{plugins → FormSpec.TS/plugins}/vitals/src/VitalsField.js +0 -0
  400. /package/{plugins → FormSpec.TS/plugins}/vitals/src/VitalsLogic.js +0 -0
@@ -0,0 +1,545 @@
1
+ import { Helpers_generateDeterministicGuidRaw } from "../../Helpers.js";
2
+ import { ClinicalPathway_PathwayExecutionMode_MultiPathway, ClinicalPathway_MultiPathwayConfig, ClinicalPathway_ConflictResolution_CombineActions, ClinicalPathway_CombinationStrategy_AllMatching, ClinicalPathway_ClinicalPathwaySpec, ClinicalPathway_PathRequirement, ClinicalPathway_ConstraintDefinition, ClinicalPathway_PathwayExecutionMode_TriggerBased, ClinicalPathway_TriggerBasedConfig, ClinicalPathway_TransitionDefinition, Shared_TransitionKey, ClinicalPathway_StateType_Terminal, ClinicalPathway_TerminalInfo, ClinicalPathway_StateType_Action, ClinicalPathway_StateType_CompoundAction, ClinicalPathway_StateDefinition, ClinicalPathway_StateType_Evaluation, ClinicalPathway_EvaluationInfo, Shared_StateKey, ClinicalPathway_ActionInfo_$union, ClinicalPathway_ActionInfo_Documentation, ClinicalPathway_DocumentationAction, ClinicalPathway_ActionInfo_Problem, ClinicalPathway_ProblemAction, ClinicalPathway_ProblemStatus_Active, ClinicalPathway_ActionInfo_Medication, ClinicalPathway_MedicationAction, ClinicalPathway_ActionInfo_Task, ClinicalPathway_TaskAction, ClinicalPathway_ActionInfo_Alert, ClinicalPathway_AlertAction, ClinicalPathway_AlertSeverity_High, ClinicalPathway_TransitionCondition_Always, ClinicalPathway_TransitionCondition_CompositeCondition, ClinicalPathway_LogicalOp_And, ClinicalPathway_LogicalOp_Or, ClinicalPathway_TransitionCondition_$union, ClinicalPathway_TransitionCondition_FieldCondition, ClinicalPathway_TransitionCondition_PluginPropertyCondition, Shared_PluginPropertyKey, Shared_ConditionValue_Single, Shared_ConditionValue_Multiple, Shared_ConditionValue_$union, Shared_FieldKey, ClinicalPathway_RecurrencePattern, ClinicalPathway_RecurrenceEnd_AfterOccurrences, ClinicalPathway_RecurrenceEnd_OnDate, ClinicalPathway_RecurrenceEnd_$union, ClinicalPathway_DueDate_$union, ClinicalPathway_DueDate_DaysFromNow, ClinicalPathway_DueDate_Tomorrow, ClinicalPathway_DueDate_Today, ClinicalPathway_TaskPriority_$union, ClinicalPathway_TaskPriority_Medium, ClinicalPathway_TaskPriority_Low, ClinicalPathway_TaskPriority_High, ClinicalPathway_TriggerTiming_$union, ClinicalPathway_TriggerTiming_OnFormLoad, ClinicalPathway_TriggerTiming_OnFormSubmit, ClinicalPathway_TriggerTiming_OnFormSave, ClinicalPathway_FieldEvaluator_$union, ClinicalPathway_FieldEvaluator_MatchesPattern, ClinicalPathway_FieldEvaluator_NotInSet, ClinicalPathway_FieldEvaluator_ContainsAll, ClinicalPathway_FieldEvaluator_LessOrEqual, ClinicalPathway_FieldEvaluator_LessThan, ClinicalPathway_FieldEvaluator_GreaterOrEqual, ClinicalPathway_FieldEvaluator_GreaterThan, ClinicalPathway_FieldEvaluator_NotEquals, ClinicalPathway_FieldEvaluator_Equals, ClinicalPathway_FieldEvaluator_InSet } from "../../FormSpec.js";
3
+ import { bind, map as map_1, defaultArgWith, Option, value as value_1, defaultArg } from "@fable-org/fable-library-js/Option.js";
4
+ import { sortByDescending, append, indexed, singleton, collect, filter, empty, ofArray, length, tryFind as tryFind_1, map, tail, head, isEmpty, FSharpList, tryHead } from "@fable-org/fable-library-js/List.js";
5
+ import { tryParse, int32 } from "@fable-org/fable-library-js/Int32.js";
6
+ import { substring, join, isNullOrEmpty, split, replace } from "@fable-org/fable-library-js/String.js";
7
+ import { FSharpRef } from "@fable-org/fable-library-js/Types.js";
8
+ import { utcNow, addDays } from "@fable-org/fable-library-js/DateOffset.js";
9
+ import { fromDays } from "@fable-org/fable-library-js/TimeSpan.js";
10
+ import { toList, FSharpMap, tryFind } from "@fable-org/fable-library-js/Map.js";
11
+ import { ofList } from "@fable-org/fable-library-js/Set.js";
12
+ import { IDisposable, disposeSafe, IEnumerator, getEnumerator, numberHash, stringHash, int32ToString, comparePrimitives } from "@fable-org/fable-library-js/Util.js";
13
+ import { TemplateForm, ItemTrigger, TemplateItem, TriggerAction, TriggerCondition } from "./TemplateManifestDecoder.js";
14
+ import { item as item_1 } from "@fable-org/fable-library-js/Array.js";
15
+ import { List_countBy, List_distinctBy, List_distinct } from "@fable-org/fable-library-js/Seq2.js";
16
+
17
+ function stableGuid(name: string): string {
18
+ return Helpers_generateDeterministicGuidRaw(`coremr:item_trigger:${name}`);
19
+ }
20
+
21
+ export function convertOperator(operator: string, values: FSharpList<string>): ClinicalPathway_FieldEvaluator_$union {
22
+ const matchValue: string = operator.toLowerCase();
23
+ switch (matchValue) {
24
+ case "any":
25
+ return ClinicalPathway_FieldEvaluator_InSet(values);
26
+ case "equals":
27
+ return ClinicalPathway_FieldEvaluator_Equals();
28
+ case "not_equals":
29
+ return ClinicalPathway_FieldEvaluator_NotEquals();
30
+ case "greater":
31
+ return ClinicalPathway_FieldEvaluator_GreaterThan();
32
+ case "greater_equals":
33
+ return ClinicalPathway_FieldEvaluator_GreaterOrEqual();
34
+ case "less":
35
+ return ClinicalPathway_FieldEvaluator_LessThan();
36
+ case "less_equals":
37
+ return ClinicalPathway_FieldEvaluator_LessOrEqual();
38
+ case "all":
39
+ return ClinicalPathway_FieldEvaluator_ContainsAll(values);
40
+ case "none":
41
+ return ClinicalPathway_FieldEvaluator_NotInSet(values);
42
+ case "regex":
43
+ return ClinicalPathway_FieldEvaluator_MatchesPattern(defaultArg(tryHead<string>(values), ".*"));
44
+ default:
45
+ throw new Error(`ItemTriggerConverter: unknown operator '${matchValue}'`);
46
+ }
47
+ }
48
+
49
+ export function convertTiming(eventName: string): ClinicalPathway_TriggerTiming_$union {
50
+ const matchValue: string = eventName.toLowerCase();
51
+ switch (matchValue) {
52
+ case "save":
53
+ return ClinicalPathway_TriggerTiming_OnFormSave();
54
+ case "lock":
55
+ return ClinicalPathway_TriggerTiming_OnFormSubmit();
56
+ case "open_first_time":
57
+ return ClinicalPathway_TriggerTiming_OnFormLoad();
58
+ default:
59
+ return ClinicalPathway_TriggerTiming_OnFormSave();
60
+ }
61
+ }
62
+
63
+ function convertPriority(priorityStr: string): ClinicalPathway_TaskPriority_$union {
64
+ switch (priorityStr) {
65
+ case "1":
66
+ return ClinicalPathway_TaskPriority_High();
67
+ case "3":
68
+ return ClinicalPathway_TaskPriority_Low();
69
+ default:
70
+ return ClinicalPathway_TaskPriority_Medium();
71
+ }
72
+ }
73
+
74
+ function parseDueDate(dateStr: string): ClinicalPathway_DueDate_$union {
75
+ const matchValue: string = dateStr.trim().toLowerCase();
76
+ let matchResult: int32;
77
+ switch (matchValue) {
78
+ case "today":
79
+ case "": {
80
+ matchResult = 0;
81
+ break;
82
+ }
83
+ case "tomorrow": {
84
+ matchResult = 1;
85
+ break;
86
+ }
87
+ default:
88
+ if (matchValue.startsWith("+")) {
89
+ matchResult = 2;
90
+ }
91
+ else {
92
+ matchResult = 3;
93
+ }
94
+ }
95
+ switch (matchResult) {
96
+ case 0:
97
+ return ClinicalPathway_DueDate_Today();
98
+ case 1:
99
+ return ClinicalPathway_DueDate_Tomorrow();
100
+ case 2: {
101
+ let matchValue_1: [boolean, int32];
102
+ let outArg = 0;
103
+ matchValue_1 = ([tryParse(replace(replace(replace(matchValue, "+", ""), "days", ""), "day", "").trim(), 511, false, 32, new FSharpRef<int32>((): int32 => outArg, (v: int32): void => {
104
+ outArg = (v | 0);
105
+ })), outArg] as [boolean, int32]);
106
+ if (matchValue_1[0]) {
107
+ return ClinicalPathway_DueDate_DaysFromNow(matchValue_1[1]);
108
+ }
109
+ else {
110
+ return ClinicalPathway_DueDate_Today();
111
+ }
112
+ }
113
+ default:
114
+ return ClinicalPathway_DueDate_Today();
115
+ }
116
+ }
117
+
118
+ function parseRecurrence(endStr: Option<string>): Option<ClinicalPathway_RecurrencePattern> {
119
+ let matchResult: int32, s: string;
120
+ if (endStr != null) {
121
+ if (value_1(endStr) === "") {
122
+ matchResult = 0;
123
+ }
124
+ else {
125
+ matchResult = 1;
126
+ s = value_1(endStr);
127
+ }
128
+ }
129
+ else {
130
+ matchResult = 0;
131
+ }
132
+ switch (matchResult) {
133
+ case 0:
134
+ return undefined;
135
+ default: {
136
+ const dueDate: ClinicalPathway_DueDate_$union = parseDueDate(s!);
137
+ let until: ClinicalPathway_RecurrenceEnd_$union;
138
+ if (dueDate.tag === /* DaysFromNow */ 2) {
139
+ const days: int32 = dueDate.fields[0] | 0;
140
+ until = ClinicalPathway_RecurrenceEnd_OnDate(addDays(utcNow(), days));
141
+ }
142
+ else {
143
+ until = ClinicalPathway_RecurrenceEnd_AfterOccurrences(7);
144
+ }
145
+ return new ClinicalPathway_RecurrencePattern(fromDays(1), until);
146
+ }
147
+ }
148
+ }
149
+
150
+ export function convertCondition(cond: TriggerCondition, itemFieldKeyMap: FSharpMap<int32, Shared_FieldKey>): ClinicalPathway_TransitionCondition_$union {
151
+ const fieldKey: Shared_FieldKey = defaultArgWith<Shared_FieldKey>(tryFind<int32, Shared_FieldKey>(cond.SourceFieldId, itemFieldKeyMap), (): Shared_FieldKey => (new Shared_FieldKey(stableGuid(`field_${cond.SourceFieldId}`))));
152
+ const evaluator: ClinicalPathway_FieldEvaluator_$union = convertOperator(cond.Operator, cond.Values);
153
+ let condValue: Shared_ConditionValue_$union;
154
+ const matchValue: string = cond.Operator.toLowerCase();
155
+ switch (matchValue) {
156
+ case "any":
157
+ case "all":
158
+ case "none": {
159
+ condValue = Shared_ConditionValue_Multiple(ofList<string>(cond.Values, {
160
+ Compare: comparePrimitives,
161
+ }));
162
+ break;
163
+ }
164
+ default: {
165
+ const matchValue_1: FSharpList<string> = cond.Values;
166
+ if (isEmpty(matchValue_1)) {
167
+ const matchValue_2: FSharpList<int32> = cond.RawChoiceIds;
168
+ condValue = (isEmpty(matchValue_2) ? Shared_ConditionValue_Single("") : Shared_ConditionValue_Single(int32ToString(head(matchValue_2))));
169
+ }
170
+ else {
171
+ condValue = Shared_ConditionValue_Single(head(matchValue_1));
172
+ }
173
+ }
174
+ }
175
+ const matchValue_3: string = cond.Source.toLowerCase();
176
+ switch (matchValue_3) {
177
+ case "flow_bp_sys":
178
+ return ClinicalPathway_TransitionCondition_PluginPropertyCondition(fieldKey, new Shared_PluginPropertyKey(stableGuid("bp_systolic")), evaluator, condValue);
179
+ case "flow_bp_dia":
180
+ return ClinicalPathway_TransitionCondition_PluginPropertyCondition(fieldKey, new Shared_PluginPropertyKey(stableGuid("bp_diastolic")), evaluator, condValue);
181
+ default:
182
+ return ClinicalPathway_TransitionCondition_FieldCondition(fieldKey, evaluator, condValue);
183
+ }
184
+ }
185
+
186
+ /**
187
+ * Combine multiple conditions respecting booleanOperator
188
+ */
189
+ export function combineConditions(conditions: FSharpList<TriggerCondition>, itemFieldKeyMap: FSharpMap<int32, Shared_FieldKey>): ClinicalPathway_TransitionCondition_$union {
190
+ let matchValue: Option<string>;
191
+ if (!isEmpty(conditions)) {
192
+ if (isEmpty(tail(conditions))) {
193
+ return convertCondition(head(conditions), itemFieldKeyMap);
194
+ }
195
+ else {
196
+ const converted: FSharpList<ClinicalPathway_TransitionCondition_$union> = map<TriggerCondition, ClinicalPathway_TransitionCondition_$union>((c: TriggerCondition): ClinicalPathway_TransitionCondition_$union => convertCondition(c, itemFieldKeyMap), conditions);
197
+ return ClinicalPathway_TransitionCondition_CompositeCondition((matchValue = map_1<TriggerCondition, string>((c_1: TriggerCondition): string => c_1.BooleanOperator, tryHead<TriggerCondition>(conditions)), (matchValue != null) ? ((value_1(matchValue) === "||") ? ClinicalPathway_LogicalOp_Or() : ClinicalPathway_LogicalOp_And()) : ClinicalPathway_LogicalOp_And()), converted);
198
+ }
199
+ }
200
+ else {
201
+ return ClinicalPathway_TransitionCondition_Always();
202
+ }
203
+ }
204
+
205
+ function param(key: string, action: TriggerAction): string {
206
+ return defaultArg(tryFind<string, string>(key, action.Params), "");
207
+ }
208
+
209
+ export function convertAction(action: TriggerAction): ClinicalPathway_ActionInfo_$union {
210
+ let s: string, s_1: string;
211
+ const matchValue: string = action.ActionType.toLowerCase();
212
+ switch (matchValue) {
213
+ case "alert": {
214
+ const categoryName: string = param("category_name", action);
215
+ return ClinicalPathway_ActionInfo_Alert(new ClinicalPathway_AlertAction(categoryName, `Alert: ${categoryName}`, ClinicalPathway_AlertSeverity_High(), undefined));
216
+ }
217
+ case "task": {
218
+ const category: string = param("category_name", action);
219
+ let assignee: string;
220
+ const parts: string[] = split(category, ["-"], undefined, 0);
221
+ assignee = ((parts.length > 0) ? item_1(0, parts).trim() : "Staff");
222
+ return ClinicalPathway_ActionInfo_Task(new ClinicalPathway_TaskAction(category, param("description", action), convertPriority(param("priority", action)), parseDueDate(param("start", action)), assignee, undefined));
223
+ }
224
+ case "recurring_task": {
225
+ const category_1: string = param("category_name", action);
226
+ let assignee_1: string;
227
+ const parts_1: string[] = split(category_1, ["-"], undefined, 0);
228
+ assignee_1 = ((parts_1.length > 0) ? item_1(0, parts_1).trim() : "Staff");
229
+ return ClinicalPathway_ActionInfo_Task(new ClinicalPathway_TaskAction(category_1, param("description", action), convertPriority(param("priority", action)), parseDueDate(param("start", action)), assignee_1, parseRecurrence(tryFind<string, string>("end", action.Params))));
230
+ }
231
+ case "medset":
232
+ return ClinicalPathway_ActionInfo_Medication(new ClinicalPathway_MedicationAction(param("medset_name", action), "", "", "", "", false));
233
+ case "problem":
234
+ return ClinicalPathway_ActionInfo_Problem(new ClinicalPathway_ProblemAction((s = param("category_name", action), isNullOrEmpty(s) ? "Problem" : s), undefined, utcNow(), ClinicalPathway_ProblemStatus_Active(), undefined));
235
+ case "treatment":
236
+ return ClinicalPathway_ActionInfo_Medication(new ClinicalPathway_MedicationAction((s_1 = param("category_name", action), isNullOrEmpty(s_1) ? "Treatment" : s_1), "", "", "", "", false));
237
+ case "taskcomplete":
238
+ return ClinicalPathway_ActionInfo_Task(new ClinicalPathway_TaskAction(`Complete: ${param("category_name", action)}`, "Mark task as complete", ClinicalPathway_TaskPriority_Medium(), ClinicalPathway_DueDate_Today(), "Staff", undefined));
239
+ case "approval":
240
+ return ClinicalPathway_ActionInfo_Task(new ClinicalPathway_TaskAction("Approval Required", param("description", action), ClinicalPathway_TaskPriority_High(), ClinicalPathway_DueDate_Today(), "Supervisor", undefined));
241
+ case "groups":
242
+ return ClinicalPathway_ActionInfo_Documentation(new ClinicalPathway_DocumentationAction("Group Assignment", param("category_name", action), false));
243
+ default:
244
+ return ClinicalPathway_ActionInfo_Task(new ClinicalPathway_TaskAction(`Unknown action: ${matchValue}`, join("; ", map<[string, string], string>((tupledArg: [string, string]): string => (`${tupledArg[0]}=${tupledArg[1]}`), toList<string, string>(action.Params))), ClinicalPathway_TaskPriority_Medium(), ClinicalPathway_DueDate_Today(), "Staff", undefined));
245
+ }
246
+ }
247
+
248
+ export function generateEvaluationLabel(trigger: ItemTrigger, items: FSharpList<TemplateItem>): string {
249
+ let fieldLabel: string;
250
+ const s: string = defaultArg(bind<TriggerCondition, string>((c: TriggerCondition): Option<string> => map_1<TemplateItem, string>((i_1: TemplateItem): string => i_1.Text, tryFind_1<TemplateItem>((i: TemplateItem): boolean => (i.ItemId === c.SourceFieldId), items)), tryHead<TriggerCondition>(trigger.Conditions)), "field");
251
+ fieldLabel = ((s.length > 50) ? (substring(s, 0, 47) + "...") : s);
252
+ const matchValue: FSharpList<TriggerCondition> = trigger.Conditions;
253
+ if (!isEmpty(matchValue)) {
254
+ if (isEmpty(tail(matchValue))) {
255
+ const matchValue_1: string = head(matchValue).Operator.toLowerCase();
256
+ const matchValue_2: FSharpList<string> = head(matchValue).Values;
257
+ let matchResult: int32, v: string, vals_2: FSharpList<string>, vals_3: FSharpList<string>, v_1: string, v_2: string, v_3: string, v_4: string, v_5: string, v_6: string, vals_4: FSharpList<string>, op: string;
258
+ switch (matchValue_1) {
259
+ case "any": {
260
+ if (!isEmpty(matchValue_2)) {
261
+ if (isEmpty(tail(matchValue_2))) {
262
+ matchResult = 0;
263
+ v = head(matchValue_2);
264
+ }
265
+ else if (length(matchValue_2) <= 3) {
266
+ matchResult = 1;
267
+ vals_2 = matchValue_2;
268
+ }
269
+ else {
270
+ matchResult = 2;
271
+ vals_3 = matchValue_2;
272
+ }
273
+ }
274
+ else if (length(matchValue_2) <= 3) {
275
+ matchResult = 1;
276
+ vals_2 = matchValue_2;
277
+ }
278
+ else {
279
+ matchResult = 2;
280
+ vals_3 = matchValue_2;
281
+ }
282
+ break;
283
+ }
284
+ case "equals": {
285
+ if (!isEmpty(matchValue_2)) {
286
+ if (isEmpty(tail(matchValue_2))) {
287
+ matchResult = 3;
288
+ v_1 = head(matchValue_2);
289
+ }
290
+ else {
291
+ matchResult = 10;
292
+ op = matchValue_1;
293
+ }
294
+ }
295
+ else {
296
+ matchResult = 10;
297
+ op = matchValue_1;
298
+ }
299
+ break;
300
+ }
301
+ case "not_equals": {
302
+ if (!isEmpty(matchValue_2)) {
303
+ if (isEmpty(tail(matchValue_2))) {
304
+ matchResult = 4;
305
+ v_2 = head(matchValue_2);
306
+ }
307
+ else {
308
+ matchResult = 10;
309
+ op = matchValue_1;
310
+ }
311
+ }
312
+ else {
313
+ matchResult = 10;
314
+ op = matchValue_1;
315
+ }
316
+ break;
317
+ }
318
+ case "greater_equals": {
319
+ if (!isEmpty(matchValue_2)) {
320
+ if (isEmpty(tail(matchValue_2))) {
321
+ matchResult = 5;
322
+ v_3 = head(matchValue_2);
323
+ }
324
+ else {
325
+ matchResult = 10;
326
+ op = matchValue_1;
327
+ }
328
+ }
329
+ else {
330
+ matchResult = 10;
331
+ op = matchValue_1;
332
+ }
333
+ break;
334
+ }
335
+ case "greater": {
336
+ if (!isEmpty(matchValue_2)) {
337
+ if (isEmpty(tail(matchValue_2))) {
338
+ matchResult = 6;
339
+ v_4 = head(matchValue_2);
340
+ }
341
+ else {
342
+ matchResult = 10;
343
+ op = matchValue_1;
344
+ }
345
+ }
346
+ else {
347
+ matchResult = 10;
348
+ op = matchValue_1;
349
+ }
350
+ break;
351
+ }
352
+ case "less_equals": {
353
+ if (!isEmpty(matchValue_2)) {
354
+ if (isEmpty(tail(matchValue_2))) {
355
+ matchResult = 7;
356
+ v_5 = head(matchValue_2);
357
+ }
358
+ else {
359
+ matchResult = 10;
360
+ op = matchValue_1;
361
+ }
362
+ }
363
+ else {
364
+ matchResult = 10;
365
+ op = matchValue_1;
366
+ }
367
+ break;
368
+ }
369
+ case "less": {
370
+ if (!isEmpty(matchValue_2)) {
371
+ if (isEmpty(tail(matchValue_2))) {
372
+ matchResult = 8;
373
+ v_6 = head(matchValue_2);
374
+ }
375
+ else {
376
+ matchResult = 10;
377
+ op = matchValue_1;
378
+ }
379
+ }
380
+ else {
381
+ matchResult = 10;
382
+ op = matchValue_1;
383
+ }
384
+ break;
385
+ }
386
+ case "all": {
387
+ matchResult = 9;
388
+ vals_4 = matchValue_2;
389
+ break;
390
+ }
391
+ default: {
392
+ matchResult = 10;
393
+ op = matchValue_1;
394
+ }
395
+ }
396
+ switch (matchResult) {
397
+ case 0:
398
+ return `When ${fieldLabel} = ${v!}`;
399
+ case 1:
400
+ return `When ${fieldLabel} is ${join(" or ", vals_2!)}`;
401
+ case 2:
402
+ return `When ${fieldLabel} is any of ${length(vals_3!)} values`;
403
+ case 3:
404
+ return `When ${fieldLabel} = ${v_1!}`;
405
+ case 4:
406
+ return `When ${fieldLabel} ≠ ${v_2!}`;
407
+ case 5:
408
+ return `When ${fieldLabel} ≥ ${v_3!}`;
409
+ case 6:
410
+ return `When ${fieldLabel} > ${v_4!}`;
411
+ case 7:
412
+ return `When ${fieldLabel} ≤ ${v_5!}`;
413
+ case 8:
414
+ return `When ${fieldLabel} < ${v_6!}`;
415
+ case 9:
416
+ return `When ${fieldLabel} has all of: ${join(", ", vals_4!)}`;
417
+ default:
418
+ return `When ${fieldLabel} ${op!}`;
419
+ }
420
+ }
421
+ else {
422
+ return `When ${fieldLabel} (${length(matchValue)} conditions)`;
423
+ }
424
+ }
425
+ else {
426
+ return `When ${fieldLabel} (always)`;
427
+ }
428
+ }
429
+
430
+ export function generateActionLabel(trigger: ItemTrigger): string {
431
+ const matchValue: FSharpList<TriggerAction> = trigger.Actions;
432
+ if (!isEmpty(matchValue)) {
433
+ if (isEmpty(tail(matchValue))) {
434
+ const matchValue_1: string = head(matchValue).ActionType.toLowerCase();
435
+ switch (matchValue_1) {
436
+ case "alert":
437
+ return `Create Alert: ${param("category_name", head(matchValue))}`;
438
+ case "task": {
439
+ const p: string = param("priority", head(matchValue));
440
+ return `Create ${(p === "1") ? "High " : ((p === "3") ? "Low " : "")}Task: ${param("category_name", head(matchValue))}`;
441
+ }
442
+ case "recurring_task":
443
+ return `Schedule: ${param("category_name", head(matchValue))}`;
444
+ case "medset":
445
+ return `Order Medset: ${param("medset_name", head(matchValue))}`;
446
+ case "problem":
447
+ return "Add to Problem List";
448
+ default:
449
+ return `Execute: ${matchValue_1}`;
450
+ }
451
+ }
452
+ else {
453
+ const joined: string = join(", ", List_distinct<string>(map<TriggerAction, string>((a: TriggerAction): string => a.ActionType, matchValue), {
454
+ Equals: (x: string, y: string): boolean => (x === y),
455
+ GetHashCode: stringHash,
456
+ }));
457
+ return `Execute ${length(matchValue)} actions: ${joined}`;
458
+ }
459
+ }
460
+ else {
461
+ return "No actions";
462
+ }
463
+ }
464
+
465
+ export function convertTriggerToPathway(trigger: ItemTrigger, parentItemId: int32, items: FSharpList<TemplateItem>, itemFieldKeyMap: FSharpMap<int32, Shared_FieldKey>): ClinicalPathway_ClinicalPathwaySpec {
466
+ const tid: int32 = trigger.TriggerId | 0;
467
+ const startKey: Shared_StateKey = new Shared_StateKey(stableGuid(`t${tid}_start`));
468
+ const evalKey: Shared_StateKey = new Shared_StateKey(stableGuid(`t${tid}_eval`));
469
+ const actionKey: Shared_StateKey = new Shared_StateKey(stableGuid(`t${tid}_action`));
470
+ const endKey: Shared_StateKey = new Shared_StateKey(stableGuid(`t${tid}_end`));
471
+ const evalLabel: string = generateEvaluationLabel(trigger, items);
472
+ const actionLabel: string = generateActionLabel(trigger);
473
+ const startState: ClinicalPathway_StateDefinition = new ClinicalPathway_StateDefinition(startKey, "Start", 0, ClinicalPathway_StateType_Evaluation(new ClinicalPathway_EvaluationInfo("", undefined)), undefined);
474
+ const evalState: ClinicalPathway_StateDefinition = new ClinicalPathway_StateDefinition(evalKey, evalLabel, 1, ClinicalPathway_StateType_Evaluation(new ClinicalPathway_EvaluationInfo("", undefined)), undefined);
475
+ let actionState: ClinicalPathway_StateDefinition;
476
+ const actions: FSharpList<ClinicalPathway_ActionInfo_$union> = map<TriggerAction, ClinicalPathway_ActionInfo_$union>(convertAction, trigger.Actions);
477
+ actionState = (new ClinicalPathway_StateDefinition(actionKey, actionLabel, 2, isEmpty(actions) ? ClinicalPathway_StateType_CompoundAction(actions) : (isEmpty(tail(actions)) ? ClinicalPathway_StateType_Action(head(actions)) : ClinicalPathway_StateType_CompoundAction(actions)), undefined));
478
+ const endState: ClinicalPathway_StateDefinition = new ClinicalPathway_StateDefinition(endKey, "Complete", 3, ClinicalPathway_StateType_Terminal(new ClinicalPathway_TerminalInfo("Complete", "Trigger evaluation complete", undefined)), undefined);
479
+ const condition: ClinicalPathway_TransitionCondition_$union = combineConditions(trigger.Conditions, itemFieldKeyMap);
480
+ const transitions: FSharpList<ClinicalPathway_TransitionDefinition> = ofArray([new ClinicalPathway_TransitionDefinition(new Shared_TransitionKey(stableGuid(`t${tid}_start_to_eval`)), startKey, evalKey, ClinicalPathway_TransitionCondition_Always(), undefined), new ClinicalPathway_TransitionDefinition(new Shared_TransitionKey(stableGuid(`t${tid}_eval_to_action`)), evalKey, actionKey, condition, 0), new ClinicalPathway_TransitionDefinition(new Shared_TransitionKey(stableGuid(`t${tid}_action_to_end`)), actionKey, endKey, ClinicalPathway_TransitionCondition_Always(), undefined)]);
481
+ return new ClinicalPathway_ClinicalPathwaySpec(`item_trigger_${tid}`, `Trigger ${tid}: ${actionLabel}`, "1.0.0", "CoreMR Conduit - Item Trigger", ClinicalPathway_PathwayExecutionMode_TriggerBased(new ClinicalPathway_TriggerBasedConfig(convertTiming(trigger.EventName), true)), startKey, ofArray([startState, evalState, actionState, endState]), transitions, empty<ClinicalPathway_ConstraintDefinition>(), empty<ClinicalPathway_PathRequirement>(), utcNow(), undefined, undefined, 1);
482
+ }
483
+
484
+ export function convertFormTriggersToPathway(form: TemplateForm, itemFieldKeyMap: FSharpMap<int32, Shared_FieldKey>): Option<ClinicalPathway_ClinicalPathwaySpec> {
485
+ const allTriggers: FSharpList<[int32, ItemTrigger]> = filter<[int32, ItemTrigger]>((tupledArg_1: [int32, ItemTrigger]): boolean => {
486
+ const t_2: ItemTrigger = tupledArg_1[1];
487
+ if (t_2.Enabled) {
488
+ return !isEmpty(t_2.Actions);
489
+ }
490
+ else {
491
+ return false;
492
+ }
493
+ }, List_distinctBy<[int32, ItemTrigger], int32>((tupledArg: [int32, ItemTrigger]): int32 => tupledArg[1].TriggerId, collect<TemplateItem, [int32, ItemTrigger]>((item: TemplateItem): FSharpList<[int32, ItemTrigger]> => map<ItemTrigger, [int32, ItemTrigger]>((t: ItemTrigger): [int32, ItemTrigger] => ([item.ItemId, t] as [int32, ItemTrigger]), item.Triggers), form.Items), {
494
+ Equals: (x: int32, y: int32): boolean => (x === y),
495
+ GetHashCode: numberHash,
496
+ }));
497
+ if (!isEmpty(allTriggers)) {
498
+ if (isEmpty(tail(allTriggers))) {
499
+ return convertTriggerToPathway(head(allTriggers)[1], head(allTriggers)[0], form.Items, itemFieldKeyMap);
500
+ }
501
+ else {
502
+ const pathwayId = `form_${form.FormId}_pathway`;
503
+ const startKey: Shared_StateKey = new Shared_StateKey(stableGuid(`${pathwayId}_start`));
504
+ let allStates: FSharpList<ClinicalPathway_StateDefinition> = singleton(new ClinicalPathway_StateDefinition(startKey, "Start", 0, ClinicalPathway_StateType_Evaluation(new ClinicalPathway_EvaluationInfo("", undefined)), undefined));
505
+ let allTransitions: FSharpList<ClinicalPathway_TransitionDefinition> = empty<ClinicalPathway_TransitionDefinition>();
506
+ const enumerator: IEnumerator<[int32, [int32, ItemTrigger]]> = getEnumerator(indexed<[int32, ItemTrigger]>(allTriggers));
507
+ try {
508
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
509
+ const forLoopVar: [int32, [int32, ItemTrigger]] = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
510
+ const trigger: ItemTrigger = forLoopVar[1][1];
511
+ const idx: int32 = forLoopVar[0] | 0;
512
+ const tid: int32 = trigger.TriggerId | 0;
513
+ const evalKey: Shared_StateKey = new Shared_StateKey(stableGuid(`${pathwayId}_eval_${tid}`));
514
+ const actionKey: Shared_StateKey = new Shared_StateKey(stableGuid(`${pathwayId}_action_${tid}`));
515
+ const endKey: Shared_StateKey = new Shared_StateKey(stableGuid(`${pathwayId}_end_${tid}`));
516
+ const evalLabel: string = generateEvaluationLabel(trigger, form.Items);
517
+ const actionLabel: string = generateActionLabel(trigger);
518
+ const evalState: ClinicalPathway_StateDefinition = new ClinicalPathway_StateDefinition(evalKey, evalLabel, (idx * 3) + 1, ClinicalPathway_StateType_Evaluation(new ClinicalPathway_EvaluationInfo("", undefined)), undefined);
519
+ const actions: FSharpList<ClinicalPathway_ActionInfo_$union> = map<TriggerAction, ClinicalPathway_ActionInfo_$union>(convertAction, trigger.Actions);
520
+ const actionState: ClinicalPathway_StateDefinition = new ClinicalPathway_StateDefinition(actionKey, actionLabel, (idx * 3) + 2, isEmpty(actions) ? ClinicalPathway_StateType_CompoundAction(actions) : (isEmpty(tail(actions)) ? ClinicalPathway_StateType_Action(head(actions)) : ClinicalPathway_StateType_CompoundAction(actions)), undefined);
521
+ const endState: ClinicalPathway_StateDefinition = new ClinicalPathway_StateDefinition(endKey, "Complete", (idx * 3) + 3, ClinicalPathway_StateType_Terminal(new ClinicalPathway_TerminalInfo("Complete", `Trigger ${tid} complete`, undefined)), undefined);
522
+ const condition: ClinicalPathway_TransitionCondition_$union = combineConditions(trigger.Conditions, itemFieldKeyMap);
523
+ const transitions: FSharpList<ClinicalPathway_TransitionDefinition> = ofArray([new ClinicalPathway_TransitionDefinition(new Shared_TransitionKey(stableGuid(`${pathwayId}_start_to_eval_${tid}`)), startKey, evalKey, ClinicalPathway_TransitionCondition_Always(), idx), new ClinicalPathway_TransitionDefinition(new Shared_TransitionKey(stableGuid(`${pathwayId}_eval_to_action_${tid}`)), evalKey, actionKey, condition, idx), new ClinicalPathway_TransitionDefinition(new Shared_TransitionKey(stableGuid(`${pathwayId}_action_to_end_${tid}`)), actionKey, endKey, ClinicalPathway_TransitionCondition_Always(), undefined)]);
524
+ allStates = append(allStates, ofArray([evalState, actionState, endState]));
525
+ allTransitions = append(allTransitions, transitions);
526
+ }
527
+ }
528
+ finally {
529
+ disposeSafe(enumerator as IDisposable);
530
+ }
531
+ const primaryTiming: string = defaultArg(map_1<[string, int32], string>((tuple_1: [string, int32]): string => tuple_1[0], tryHead<[string, int32]>(sortByDescending<[string, int32], int32>((tuple: [string, int32]): int32 => tuple[1], List_countBy<string, string>((x_1: string): string => x_1, map<[int32, ItemTrigger], string>((tupledArg_2: [int32, ItemTrigger]): string => tupledArg_2[1].EventName, allTriggers), {
532
+ Equals: (x_2: string, y_1: string): boolean => (x_2 === y_1),
533
+ GetHashCode: stringHash,
534
+ }), {
535
+ Compare: comparePrimitives,
536
+ }))), "save");
537
+ return new ClinicalPathway_ClinicalPathwaySpec(pathwayId, `${form.Name} - Clinical Pathway`, "1.0.0", "CoreMR Conduit - Unified Item Triggers", (length(allTriggers) > 1) ? ClinicalPathway_PathwayExecutionMode_MultiPathway(new ClinicalPathway_MultiPathwayConfig(ClinicalPathway_CombinationStrategy_AllMatching(), ClinicalPathway_ConflictResolution_CombineActions(), undefined)) : ClinicalPathway_PathwayExecutionMode_TriggerBased(new ClinicalPathway_TriggerBasedConfig(convertTiming(primaryTiming), true)), startKey, allStates, allTransitions, empty<ClinicalPathway_ConstraintDefinition>(), empty<ClinicalPathway_PathRequirement>(), utcNow(), undefined, undefined, 1);
538
+ }
539
+ }
540
+ else {
541
+ return undefined;
542
+ }
543
+ }
544
+
545
+ //# sourceMappingURL=ItemTriggerConverter.ts.map