@f1studio/form-spec 5.0.0-alpha.111 → 5.0.0-alpha.113

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 (191) hide show
  1. package/FormSpec.FS/BitmaskHelpers.d.ts +23 -0
  2. package/FormSpec.FS/BitmaskHelpers.d.ts.map +1 -0
  3. package/FormSpec.FS/BlueprintValidation.d.ts +16 -0
  4. package/FormSpec.FS/BlueprintValidation.d.ts.map +1 -0
  5. package/FormSpec.FS/FormSpec.d.ts +19 -5
  6. package/FormSpec.FS/FormSpec.d.ts.map +1 -1
  7. package/FormSpec.FS/FormSpecHelpers.d.ts +4 -0
  8. package/FormSpec.FS/FormSpecHelpers.d.ts.map +1 -1
  9. package/FormSpec.FS/FormSpecValues.d.ts +5 -0
  10. package/FormSpec.FS/FormSpecValues.d.ts.map +1 -1
  11. package/FormSpec.FS/Helpers.d.ts.map +1 -1
  12. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.d.ts +13 -0
  13. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.d.ts.map +1 -0
  14. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.d.ts +22 -0
  15. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.d.ts.map +1 -0
  16. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.d.ts +22 -0
  17. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.d.ts.map +1 -0
  18. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.d.ts +130 -0
  19. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.d.ts.map +1 -0
  20. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.d.ts +37 -0
  21. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.d.ts.map +1 -0
  22. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.d.ts +231 -0
  23. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.d.ts.map +1 -0
  24. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.d.ts +10 -0
  25. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.d.ts.map +1 -0
  26. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.d.ts +55 -0
  27. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.d.ts.map +1 -0
  28. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.d.ts +69 -0
  29. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.d.ts.map +1 -0
  30. package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.d.ts +21 -0
  31. package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.d.ts.map +1 -0
  32. package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts +133 -0
  33. package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts.map +1 -0
  34. package/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.d.ts +52 -0
  35. package/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.d.ts.map +1 -0
  36. package/FormSpec.FS/Integrations/Adapters/FormSystemAdapter.d.ts +46 -0
  37. package/FormSpec.FS/Integrations/Adapters/FormSystemAdapter.d.ts.map +1 -0
  38. package/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormAdapter.d.ts +4 -0
  39. package/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormAdapter.d.ts.map +1 -0
  40. package/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormTypes.d.ts +36 -0
  41. package/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormTypes.d.ts.map +1 -0
  42. package/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.d.ts +95 -0
  43. package/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.d.ts.map +1 -0
  44. package/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.d.ts +449 -0
  45. package/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.d.ts.map +1 -0
  46. package/FormSpec.FS/Interop/FormSpec.Api.Helpers.d.ts.map +1 -1
  47. package/FormSpec.FS/Interop/FormSpec.Api.Option.d.ts +3 -1
  48. package/FormSpec.FS/Interop/FormSpec.Api.Option.d.ts.map +1 -1
  49. package/FormSpec.FS/Provenance.d.ts +10 -0
  50. package/FormSpec.FS/Provenance.d.ts.map +1 -0
  51. package/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.d.ts.map +1 -1
  52. package/FormSpec.TS/FormSpec.FS/BitmaskHelpers.js +56 -0
  53. package/FormSpec.TS/FormSpec.FS/BitmaskHelpers.js.map +1 -0
  54. package/FormSpec.TS/FormSpec.FS/BitmaskHelpers.ts.map +1 -0
  55. package/FormSpec.TS/FormSpec.FS/BlueprintValidation.js +116 -0
  56. package/FormSpec.TS/FormSpec.FS/BlueprintValidation.js.map +1 -0
  57. package/FormSpec.TS/FormSpec.FS/BlueprintValidation.ts.map +1 -0
  58. package/FormSpec.TS/FormSpec.FS/Designer.js +2 -2
  59. package/FormSpec.TS/FormSpec.FS/Designer.js.map +1 -1
  60. package/FormSpec.TS/FormSpec.FS/Designer.ts.map +1 -1
  61. package/FormSpec.TS/FormSpec.FS/FormSpec.js +72 -3
  62. package/FormSpec.TS/FormSpec.FS/FormSpec.js.map +1 -1
  63. package/FormSpec.TS/FormSpec.FS/FormSpec.ts.map +1 -1
  64. package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.js +201 -3
  65. package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.js.map +1 -1
  66. package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.ts.map +1 -1
  67. package/FormSpec.TS/FormSpec.FS/FormSpecValues.js +38 -3
  68. package/FormSpec.TS/FormSpec.FS/FormSpecValues.js.map +1 -1
  69. package/FormSpec.TS/FormSpec.FS/FormSpecValues.ts.map +1 -1
  70. package/FormSpec.TS/FormSpec.FS/Helpers.js +44 -27
  71. package/FormSpec.TS/FormSpec.FS/Helpers.js.map +1 -1
  72. package/FormSpec.TS/FormSpec.FS/Helpers.ts.map +1 -1
  73. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.js +45 -0
  74. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.js.map +1 -0
  75. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.ts.map +1 -0
  76. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.js +145 -0
  77. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.js.map +1 -0
  78. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.ts.map +1 -0
  79. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.js +139 -0
  80. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.js.map +1 -0
  81. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.ts.map +1 -0
  82. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.js +801 -0
  83. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.js.map +1 -0
  84. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.ts.map +1 -0
  85. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.js +121 -0
  86. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.js.map +1 -0
  87. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.ts.map +1 -0
  88. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.js +1380 -0
  89. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.js.map +1 -0
  90. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.ts.map +1 -0
  91. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.js +29 -0
  92. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.js.map +1 -0
  93. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.ts.map +1 -0
  94. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js +172 -0
  95. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js.map +1 -0
  96. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts.map +1 -0
  97. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.js +406 -0
  98. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.js.map +1 -0
  99. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.ts.map +1 -0
  100. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js +317 -0
  101. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js.map +1 -0
  102. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts.map +1 -0
  103. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js +622 -0
  104. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js.map +1 -0
  105. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts.map +1 -0
  106. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.js +448 -0
  107. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.js.map +1 -0
  108. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.ts.map +1 -0
  109. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/FormSystemAdapter.js +198 -0
  110. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/FormSystemAdapter.js.map +1 -0
  111. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/FormSystemAdapter.ts.map +1 -0
  112. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormAdapter.js +57 -0
  113. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormAdapter.js.map +1 -0
  114. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormAdapter.ts.map +1 -0
  115. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormTypes.js +144 -0
  116. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormTypes.js.map +1 -0
  117. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormTypes.ts.map +1 -0
  118. package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.js +258 -0
  119. package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.js.map +1 -0
  120. package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.ts.map +1 -0
  121. package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.js +1768 -0
  122. package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.js.map +1 -0
  123. package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.ts.map +1 -0
  124. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.js +22 -18
  125. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.js.map +1 -1
  126. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.ts.map +1 -1
  127. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.js +18 -6
  128. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.js.map +1 -1
  129. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.ts.map +1 -1
  130. package/FormSpec.TS/FormSpec.FS/PathwayExecutor.js +1 -1
  131. package/FormSpec.TS/FormSpec.FS/Provenance.js +41 -0
  132. package/FormSpec.TS/FormSpec.FS/Provenance.js.map +1 -0
  133. package/FormSpec.TS/FormSpec.FS/Provenance.ts.map +1 -0
  134. package/FormSpec.TS/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.js +36 -13
  135. package/FormSpec.TS/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.js.map +1 -1
  136. package/FormSpec.TS/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.ts.map +1 -1
  137. package/FormSpec.TS/FormSpec.FS/Renderers/PathwayRenderers.js +1 -1
  138. package/FormSpec.TS/PathwayExecutor.withPlugins.js +0 -5
  139. package/FormSpec.TS/PathwayExecutor.withPlugins.js.map +1 -1
  140. package/FormSpec.TS/PluginRegistration.js +2 -0
  141. package/FormSpec.TS/PluginRegistration.js.map +1 -1
  142. package/FormSpec.TS/PluginRegistration.ts.map +1 -1
  143. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs.js.map +1 -1
  144. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs.ts.map +1 -1
  145. package/FormSpec.TS/fable_modules/project_cracked.json +1 -1
  146. package/FormSpec.TS/plugins/demographics/src/DemographicsField.js +918 -0
  147. package/FormSpec.TS/plugins/demographics/src/DemographicsField.js.map +1 -0
  148. package/FormSpec.TS/plugins/demographics/src/DemographicsField.ts.map +1 -0
  149. package/FormSpec.TS/plugins/likert/src/LikertField.js +1 -1
  150. package/PathwayExecutor.withPlugins.d.ts +0 -5
  151. package/PathwayExecutor.withPlugins.d.ts.map +1 -1
  152. package/README.md +7 -7
  153. package/fable_modules/Thoth.Json.10.4.1/Extra.fs.d.ts +3 -0
  154. package/fable_modules/Thoth.Json.10.4.1/Extra.fs.d.ts.map +1 -0
  155. package/package.json +4 -4
  156. package/plugins/demographics/src/DemographicsField.d.ts +104 -0
  157. package/plugins/demographics/src/DemographicsField.d.ts.map +1 -0
  158. package/src/FormSpec.FS/BitmaskHelpers.ts +52 -0
  159. package/src/FormSpec.FS/BlueprintValidation.ts +108 -0
  160. package/src/FormSpec.FS/Designer.ts +2 -2
  161. package/src/FormSpec.FS/FormSpec.ts +39 -8
  162. package/src/FormSpec.FS/FormSpecHelpers.ts +190 -12
  163. package/src/FormSpec.FS/FormSpecValues.ts +42 -3
  164. package/src/FormSpec.FS/Helpers.ts +44 -27
  165. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.ts +37 -0
  166. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.ts +103 -0
  167. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.ts +129 -0
  168. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.ts +490 -0
  169. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.ts +87 -0
  170. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.ts +1046 -0
  171. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.ts +26 -0
  172. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts +161 -0
  173. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.ts +386 -0
  174. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts +320 -0
  175. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts +371 -0
  176. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.ts +372 -0
  177. package/src/FormSpec.FS/Integrations/Adapters/FormSystemAdapter.ts +92 -0
  178. package/src/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormAdapter.ts +51 -0
  179. package/src/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormTypes.ts +71 -0
  180. package/src/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.ts +15 -0
  181. package/src/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.ts +825 -0
  182. package/src/FormSpec.FS/Interop/FormSpec.Api.Helpers.ts +19 -15
  183. package/src/FormSpec.FS/Interop/FormSpec.Api.Option.ts +13 -7
  184. package/src/FormSpec.FS/PathwayExecutor.ts +1 -1
  185. package/src/FormSpec.FS/Provenance.ts +19 -0
  186. package/src/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.ts +32 -12
  187. package/src/FormSpec.FS/Renderers/PathwayRenderers.ts +1 -1
  188. package/src/PathwayExecutor.withPlugins.ts +0 -5
  189. package/src/PluginRegistration.ts +2 -0
  190. package/src/plugins/demographics/src/DemographicsField.ts +502 -0
  191. package/src/plugins/likert/src/LikertField.ts +1 -1
@@ -0,0 +1,130 @@
1
+ import { Record, Union } from "@fable-org/fable-library-js/Types.js";
2
+ import { int32 } from "@fable-org/fable-library-js/Int32.js";
3
+ import { Option } from "@fable-org/fable-library-js/Option.js";
4
+ import { TypeInfo } from "@fable-org/fable-library-js/Reflection.js";
5
+ import { FSharpList } from "@fable-org/fable-library-js/List.js";
6
+ import { IComparable, IEquatable } from "@fable-org/fable-library-js/Util.js";
7
+ import { CoreMRTrigger, CoreMRFormData, CoreMRFormMetadata, CoreMRChoice, CoreMRItem } from "../../CorEMR/CoreMRTypes.js";
8
+ import { ClinicalPathway_ClinicalPathwaySpec, Spec_FormSpec$1, Spec_FieldType_$union, Spec_FormStep$1 } from "../../../FormSpec.js";
9
+ import { FSharpMap } from "@fable-org/fable-library-js/Map.js";
10
+ import { FSharpResult$2_$union } from "@fable-org/fable-library-js/Result.js";
11
+ export type ValidationError_$union = ValidationError<0> | ValidationError<1> | ValidationError<2> | ValidationError<3> | ValidationError<4> | ValidationError<5> | ValidationError<6> | ValidationError<7> | ValidationError<8> | ValidationError<9> | ValidationError<10> | ValidationError<11> | ValidationError<12> | ValidationError<13> | ValidationError<14> | ValidationError<15> | ValidationError<16>;
12
+ export type ValidationError_$cases = {
13
+ 0: ["ItemCountMismatch", [int32, int32]];
14
+ 1: ["StepCountMismatch", [int32, int32]];
15
+ 2: ["FieldCountMismatch", [string, int32, int32]];
16
+ 3: ["MetadataMismatch", [string, string, string]];
17
+ 4: ["MissingChoices", [int32, string]];
18
+ 5: ["InvalidFieldType", [int32, string, string]];
19
+ 6: ["HeadingNotConverted", [int32, string]];
20
+ 7: ["MissingStep", [string]];
21
+ 8: ["ChoiceCountMismatch", [int32, string, int32, int32]];
22
+ 9: ["RequiredFieldMismatch", [int32, string, boolean, boolean]];
23
+ 10: ["ScoreMismatch", [int32, Option<int32>]];
24
+ 11: ["TagCountMismatch", [int32, int32]];
25
+ 12: ["PathwayMissing", [int32]];
26
+ 13: ["PathwayStateCountInvalid", [string, int32, int32]];
27
+ 14: ["PathwayTransitionCountInvalid", [string, int32, int32]];
28
+ 15: ["TriggerConditionCountMismatch", [int32, int32, int32]];
29
+ 16: ["TriggerEventCountMismatch", [int32, int32, int32]];
30
+ };
31
+ export declare function ValidationError_ItemCountMismatch(expected: int32, actual: int32): ValidationError<0>;
32
+ export declare function ValidationError_StepCountMismatch(expected: int32, actual: int32): ValidationError<1>;
33
+ export declare function ValidationError_FieldCountMismatch(step: string, expected: int32, actual: int32): ValidationError<2>;
34
+ export declare function ValidationError_MetadataMismatch(field: string, expected: string, actual: string): ValidationError<3>;
35
+ export declare function ValidationError_MissingChoices(itemId: int32, itemLabel: string): ValidationError<4>;
36
+ export declare function ValidationError_InvalidFieldType(itemId: int32, itemType: string, reason: string): ValidationError<5>;
37
+ export declare function ValidationError_HeadingNotConverted(itemId: int32, heading: string): ValidationError<6>;
38
+ export declare function ValidationError_MissingStep(heading: string): ValidationError<7>;
39
+ export declare function ValidationError_ChoiceCountMismatch(itemId: int32, itemLabel: string, expected: int32, actual: int32): ValidationError<8>;
40
+ export declare function ValidationError_RequiredFieldMismatch(itemId: int32, itemLabel: string, expected: boolean, actual: boolean): ValidationError<9>;
41
+ export declare function ValidationError_ScoreMismatch(expected: int32, actual: Option<int32>): ValidationError<10>;
42
+ export declare function ValidationError_TagCountMismatch(expected: int32, actual: int32): ValidationError<11>;
43
+ export declare function ValidationError_PathwayMissing(triggerCount: int32): ValidationError<12>;
44
+ export declare function ValidationError_PathwayStateCountInvalid(pathwayId: string, expected: int32, actual: int32): ValidationError<13>;
45
+ export declare function ValidationError_PathwayTransitionCountInvalid(pathwayId: string, expected: int32, actual: int32): ValidationError<14>;
46
+ export declare function ValidationError_TriggerConditionCountMismatch(triggerId: int32, expected: int32, actual: int32): ValidationError<15>;
47
+ export declare function ValidationError_TriggerEventCountMismatch(triggerId: int32, expected: int32, actual: int32): ValidationError<16>;
48
+ export declare class ValidationError<Tag extends keyof ValidationError_$cases> extends Union<Tag, ValidationError_$cases[Tag][0]> {
49
+ readonly tag: Tag;
50
+ readonly fields: ValidationError_$cases[Tag][1];
51
+ constructor(tag: Tag, fields: ValidationError_$cases[Tag][1]);
52
+ cases(): string[];
53
+ }
54
+ export declare function ValidationError_$reflection(): TypeInfo;
55
+ export declare class ValidationResult extends Record implements IEquatable<ValidationResult>, IComparable<ValidationResult> {
56
+ readonly IsValid: boolean;
57
+ readonly Errors: FSharpList<ValidationError_$union>;
58
+ readonly Warnings: FSharpList<ValidationError_$union>;
59
+ readonly Summary: ValidationSummary;
60
+ constructor(IsValid: boolean, Errors: FSharpList<ValidationError_$union>, Warnings: FSharpList<ValidationError_$union>, Summary: ValidationSummary);
61
+ }
62
+ export declare function ValidationResult_$reflection(): TypeInfo;
63
+ export declare class ValidationSummary extends Record implements IEquatable<ValidationSummary>, IComparable<ValidationSummary> {
64
+ readonly TotalItems: int32;
65
+ readonly ConvertedFields: int32;
66
+ readonly HeadingsDetected: int32;
67
+ readonly StepsCreated: int32;
68
+ readonly ChoicesProcessed: int32;
69
+ readonly TriggersFound: int32;
70
+ readonly TagsMapped: int32;
71
+ constructor(TotalItems: int32, ConvertedFields: int32, HeadingsDetected: int32, StepsCreated: int32, ChoicesProcessed: int32, TriggersFound: int32, TagsMapped: int32);
72
+ }
73
+ export declare function ValidationSummary_$reflection(): TypeInfo;
74
+ /**
75
+ * Count non-heading items in CoreMR
76
+ */
77
+ export declare function FormSpecValidator_countNonHeadingItems(items: FSharpList<CoreMRItem>): int32;
78
+ /**
79
+ * Count headings in CoreMR (should become steps)
80
+ */
81
+ export declare function FormSpecValidator_countHeadings(items: FSharpList<CoreMRItem>): int32;
82
+ /**
83
+ * Count total fields in FormSpec
84
+ */
85
+ export declare function FormSpecValidator_countTotalFields(steps: FSharpList<Spec_FormStep$1<Spec_FieldType_$union>>): int32;
86
+ /**
87
+ * Get choices count per item
88
+ */
89
+ export declare function FormSpecValidator_getChoicesPerItem(choices: FSharpList<CoreMRChoice>): FSharpMap<int32, int32>;
90
+ /**
91
+ * Calculate expected max score from CoreMR
92
+ */
93
+ export declare function FormSpecValidator_calculateExpectedMaxScore(choices: FSharpList<CoreMRChoice>): int32;
94
+ /**
95
+ * Validate metadata mapping
96
+ */
97
+ export declare function FormSpecValidator_validateMetadata(coreMR: CoreMRFormMetadata, formSpec: Spec_FormSpec$1<Spec_FieldType_$union>): FSharpList<ValidationError_$union>;
98
+ /**
99
+ * Validate item/field counts
100
+ */
101
+ export declare function FormSpecValidator_validateCounts(coreMR: CoreMRFormData, formSpec: Spec_FormSpec$1<Spec_FieldType_$union>): FSharpList<ValidationError_$union>;
102
+ /**
103
+ * Validate choices were mapped correctly
104
+ */
105
+ export declare function FormSpecValidator_validateChoices(coreMR: CoreMRFormData, formSpec: Spec_FormSpec$1<Spec_FieldType_$union>): FSharpList<ValidationError_$union>;
106
+ /**
107
+ * Validate required fields mapping
108
+ */
109
+ export declare function FormSpecValidator_validateRequiredFields(coreMR: CoreMRFormData, formSpec: Spec_FormSpec$1<Spec_FieldType_$union>): FSharpList<ValidationError_$union>;
110
+ /**
111
+ * Validate scoring calculation
112
+ */
113
+ export declare function FormSpecValidator_validateScoring(coreMR: CoreMRFormData, formSpec: Spec_FormSpec$1<Spec_FieldType_$union>): FSharpList<ValidationError_$union>;
114
+ /**
115
+ * Validate tags mapping
116
+ */
117
+ export declare function FormSpecValidator_validateTags(coreMR: CoreMRFormData, formSpec: Spec_FormSpec$1<Spec_FieldType_$union>): FSharpList<ValidationError_$union>;
118
+ /**
119
+ * Create validation summary
120
+ */
121
+ export declare function FormSpecValidator_createSummary(coreMR: CoreMRFormData, formSpec: Spec_FormSpec$1<Spec_FieldType_$union>): ValidationSummary;
122
+ /**
123
+ * Validate pathway conversion from triggers (STUB - simplified for compilation)
124
+ */
125
+ export declare function FormSpecValidator_validatePathways(triggers: FSharpList<CoreMRTrigger>, pathway: Option<ClinicalPathway_ClinicalPathwaySpec>): FSharpList<ValidationError_$union>;
126
+ /**
127
+ * Main validation function
128
+ */
129
+ export declare function FormSpecValidator_validateConversion(coreMR: CoreMRFormData, formSpec: Spec_FormSpec$1<Spec_FieldType_$union>): FSharpResult$2_$union<ValidationResult, string>;
130
+ //# sourceMappingURL=CorEMRFormSpecValidator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CorEMRFormSpecValidator.d.ts","sourceRoot":"","sources":["../../../../../FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,MAAM,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,OAAO,EAA8C,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAC3G,OAAO,EAAuF,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAC1J,OAAO,EAA2G,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAC1K,OAAO,EAA+G,WAAW,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAE3L,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC1H,OAAO,EAAE,mCAAmC,EAA8F,eAAe,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAChO,OAAO,EAAW,SAAS,EAAU,MAAM,oCAAoC,CAAC;AAIhF,OAAO,EAAE,qBAAqB,EAA2C,MAAM,uCAAuC,CAAC;AAEvH,MAAM,MAAM,sBAAsB,GAC5B,eAAe,CAAC,CAAC,CAAC,GAClB,eAAe,CAAC,CAAC,CAAC,GAClB,eAAe,CAAC,CAAC,CAAC,GAClB,eAAe,CAAC,CAAC,CAAC,GAClB,eAAe,CAAC,CAAC,CAAC,GAClB,eAAe,CAAC,CAAC,CAAC,GAClB,eAAe,CAAC,CAAC,CAAC,GAClB,eAAe,CAAC,CAAC,CAAC,GAClB,eAAe,CAAC,CAAC,CAAC,GAClB,eAAe,CAAC,CAAC,CAAC,GAClB,eAAe,CAAC,EAAE,CAAC,GACnB,eAAe,CAAC,EAAE,CAAC,GACnB,eAAe,CAAC,EAAE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,UAAU,CAAC,sBAAsB,CAAC,CAS3J;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,CAAC,qBAAqB,CAAC,GAAG,iBAAiB,CAE3I;AAED;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,QAAQ,EAAE,UAAU,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,mCAAmC,CAAC,GAAG,UAAU,CAAC,sBAAsB,CAAC,CA2BhL;AAED;;GAEG;AACH,wBAAgB,oCAAoC,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,CAAC,qBAAqB,CAAC,GAAG,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAQ9K"}
@@ -0,0 +1,37 @@
1
+ import { Record } from "@fable-org/fable-library-js/Types.js";
2
+ import { int32 } from "@fable-org/fable-library-js/Int32.js";
3
+ import { IComparable, IEquatable } from "@fable-org/fable-library-js/Util.js";
4
+ import { TypeInfo } from "@fable-org/fable-library-js/Reflection.js";
5
+ import { Option } from "@fable-org/fable-library-js/Option.js";
6
+ import { FSharpList } from "@fable-org/fable-library-js/List.js";
7
+ import { CoreMRItem } from "../../CorEMR/CoreMRTypes.js";
8
+ export declare class HeadingItem extends Record implements IEquatable<HeadingItem>, IComparable<HeadingItem> {
9
+ readonly Sequence: int32;
10
+ readonly Label: string;
11
+ readonly ItemId: int32;
12
+ constructor(Sequence: int32, Label: string, ItemId: int32);
13
+ }
14
+ export declare function HeadingItem_$reflection(): TypeInfo;
15
+ export declare class Section extends Record implements IEquatable<Section>, IComparable<Section> {
16
+ readonly Heading: Option<HeadingItem>;
17
+ readonly HeadingSequence: int32;
18
+ readonly HeadingLabel: string;
19
+ readonly Items: FSharpList<CoreMRItem>;
20
+ constructor(Heading: Option<HeadingItem>, HeadingSequence: int32, HeadingLabel: string, Items: FSharpList<CoreMRItem>);
21
+ }
22
+ export declare function Section_$reflection(): TypeInfo;
23
+ /**
24
+ * Items that are not headings (type 110). Use this instead of inline ItemTypeId <> 110.
25
+ */
26
+ export declare function nonHeadingItems(items: FSharpList<CoreMRItem>): FSharpList<CoreMRItem>;
27
+ /**
28
+ * Detect heading items (type 110) in item list
29
+ */
30
+ export declare function detectHeadings(items: FSharpList<CoreMRItem>): FSharpList<HeadingItem>;
31
+ /**
32
+ * Group items into sections based on heading positions.
33
+ * Preamble: items before first heading (HeadingLabel = "Form").
34
+ * Sections: one per heading, items between heading N and N+1.
35
+ */
36
+ export declare function groupItemsByHeadings(headings: FSharpList<HeadingItem>, allItems: FSharpList<CoreMRItem>): FSharpList<Section>;
37
+ //# sourceMappingURL=CorEMRSectioning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CorEMRSectioning.d.ts","sourceRoot":"","sources":["../../../../../FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,OAAO,EAAqB,WAAW,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjG,OAAO,EAAgE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AACnI,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EAA6F,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAC5J,OAAO,EAA0B,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEjF,qBAAa,WAAY,SAAQ,MAAO,YAAW,UAAU,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC;IAChG,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC;gBACX,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK;CAM5D;AAED,wBAAgB,uBAAuB,IAAI,QAAQ,CAElD;AAED,qBAAa,OAAQ,SAAQ,MAAO,YAAW,UAAU,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC;IACpF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;IACtC,QAAQ,CAAC,eAAe,EAAE,KAAK,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;gBAC3B,OAAO,EAAE,MAAM,CAAC,WAAW,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;CAOxH;AAED,wBAAgB,mBAAmB,IAAI,QAAQ,CAE9C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,CAErF;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC,WAAW,CAAC,CAIrF;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,CAqB7H"}
@@ -0,0 +1,231 @@
1
+ import { Record, Union } from "@fable-org/fable-library-js/Types.js";
2
+ import { TypeInfo } from "@fable-org/fable-library-js/Reflection.js";
3
+ import { float64, int32 } from "@fable-org/fable-library-js/Int32.js";
4
+ import { Option } from "@fable-org/fable-library-js/Option.js";
5
+ import { IComparable, IEquatable } from "@fable-org/fable-library-js/Util.js";
6
+ import { int64 } from "@fable-org/fable-library-js/BigInt.js";
7
+ import { FSharpList } from "@fable-org/fable-library-js/List.js";
8
+ import { FSharpMap } from "@fable-org/fable-library-js/Map.js";
9
+ import { CoreMRFormData, CoreMRChoice, CoreMRItem, CoreMRTrigger } from "../../CorEMR/CoreMRTypes.js";
10
+ import { ClinicalPathway_ClinicalPathwaySpec, Spec_FormSpec$1 } from "../../../FormSpec.js";
11
+ export type ComplexityLevel_$union = ComplexityLevel<0> | ComplexityLevel<1> | ComplexityLevel<2>;
12
+ export type ComplexityLevel_$cases = {
13
+ 0: ["Essential", []];
14
+ 1: ["Standard", []];
15
+ 2: ["Advanced", []];
16
+ };
17
+ export declare function ComplexityLevel_Essential(): ComplexityLevel<0>;
18
+ export declare function ComplexityLevel_Standard(): ComplexityLevel<1>;
19
+ export declare function ComplexityLevel_Advanced(): ComplexityLevel<2>;
20
+ export declare class ComplexityLevel<Tag extends keyof ComplexityLevel_$cases> extends Union<Tag, ComplexityLevel_$cases[Tag][0]> {
21
+ readonly tag: Tag;
22
+ readonly fields: ComplexityLevel_$cases[Tag][1];
23
+ constructor(tag: Tag, fields: ComplexityLevel_$cases[Tag][1]);
24
+ cases(): string[];
25
+ }
26
+ export declare function ComplexityLevel_$reflection(): TypeInfo;
27
+ /**
28
+ * Get emoji representation of complexity
29
+ */
30
+ export declare function complexityToEmoji(_arg: ComplexityLevel_$union): string;
31
+ /**
32
+ * Get string representation of complexity
33
+ */
34
+ export declare function complexityToString(_arg: ComplexityLevel_$union): string;
35
+ export declare class InstructionItem extends Record implements IEquatable<InstructionItem>, IComparable<InstructionItem> {
36
+ readonly ItemId: int32;
37
+ readonly ItemType: int32;
38
+ readonly Text: string;
39
+ readonly Pattern: Option<string>;
40
+ readonly Confidence: float64;
41
+ readonly Complexity: ComplexityLevel_$union;
42
+ constructor(ItemId: int32, ItemType: int32, Text$: string, Pattern: Option<string>, Confidence: float64, Complexity: ComplexityLevel_$union);
43
+ }
44
+ export declare function InstructionItem_$reflection(): TypeInfo;
45
+ export declare class FormReference extends Record implements IEquatable<FormReference>, IComparable<FormReference> {
46
+ readonly SourceItemId: int32;
47
+ readonly SourceText: string;
48
+ readonly ReferencedFormCode: string;
49
+ readonly ActionSuggested: string;
50
+ readonly Complexity: ComplexityLevel_$union;
51
+ constructor(SourceItemId: int32, SourceText: string, ReferencedFormCode: string, ActionSuggested: string, Complexity: ComplexityLevel_$union);
52
+ }
53
+ export declare function FormReference_$reflection(): TypeInfo;
54
+ export declare class InferredRelationship extends Record implements IEquatable<InferredRelationship>, IComparable<InferredRelationship> {
55
+ readonly Field1: string;
56
+ readonly Field2: string;
57
+ readonly RelationType: string;
58
+ readonly Evidence: string;
59
+ readonly Confidence: float64;
60
+ readonly Complexity: ComplexityLevel_$union;
61
+ constructor(Field1: string, Field2: string, RelationType: string, Evidence: string, Confidence: float64, Complexity: ComplexityLevel_$union);
62
+ }
63
+ export declare function InferredRelationship_$reflection(): TypeInfo;
64
+ export declare class ConfidenceMetrics extends Record implements IEquatable<ConfidenceMetrics>, IComparable<ConfidenceMetrics> {
65
+ readonly MechanicalConversionRate: float64;
66
+ readonly InstructionDetectionRate: float64;
67
+ readonly EnhancementOpportunities: int32;
68
+ readonly UnmappedItemCount: int32;
69
+ constructor(MechanicalConversionRate: float64, InstructionDetectionRate: float64, EnhancementOpportunities: int32, UnmappedItemCount: int32);
70
+ }
71
+ export declare function ConfidenceMetrics_$reflection(): TypeInfo;
72
+ export declare class FieldCatalogEntry extends Record implements IEquatable<FieldCatalogEntry>, IComparable<FieldCatalogEntry> {
73
+ readonly ItemId: int32;
74
+ readonly FieldKey: string;
75
+ readonly Label: string;
76
+ readonly FieldType: string;
77
+ readonly IsRequired: boolean;
78
+ readonly ParentId: Option<int32>;
79
+ readonly Notes: Option<string>;
80
+ readonly Complexity: ComplexityLevel_$union;
81
+ constructor(ItemId: int32, FieldKey: string, Label: string, FieldType: string, IsRequired: boolean, ParentId: Option<int32>, Notes: Option<string>, Complexity: ComplexityLevel_$union);
82
+ }
83
+ export declare function FieldCatalogEntry_$reflection(): TypeInfo;
84
+ export declare class ChoiceCatalogEntry extends Record implements IEquatable<ChoiceCatalogEntry>, IComparable<ChoiceCatalogEntry> {
85
+ readonly ChoiceId: int32;
86
+ readonly ItemId: int32;
87
+ readonly FieldKey: string;
88
+ readonly OptionKey: string;
89
+ readonly Text: string;
90
+ readonly Score: int64;
91
+ readonly Sequence: int32;
92
+ constructor(ChoiceId: int32, ItemId: int32, FieldKey: string, OptionKey: string, Text$: string, Score: int64, Sequence: int32);
93
+ }
94
+ export declare function ChoiceCatalogEntry_$reflection(): TypeInfo;
95
+ export declare class PathwayState extends Record implements IEquatable<PathwayState>, IComparable<PathwayState> {
96
+ readonly StateKey: string;
97
+ readonly StateType: string;
98
+ readonly StateLabel: string;
99
+ readonly StateOrder: int32;
100
+ constructor(StateKey: string, StateType: string, StateLabel: string, StateOrder: int32);
101
+ }
102
+ export declare function PathwayState_$reflection(): TypeInfo;
103
+ export declare class PathwayTransition extends Record implements IEquatable<PathwayTransition>, IComparable<PathwayTransition> {
104
+ readonly TransitionKey: string;
105
+ readonly FromState: string;
106
+ readonly ToState: string;
107
+ readonly ConditionType: string;
108
+ readonly ConditionSummary: string;
109
+ constructor(TransitionKey: string, FromState: string, ToState: string, ConditionType: string, ConditionSummary: string);
110
+ }
111
+ export declare function PathwayTransition_$reflection(): TypeInfo;
112
+ export declare class PathwayContext extends Record implements IEquatable<PathwayContext>, IComparable<PathwayContext> {
113
+ readonly States: FSharpList<PathwayState>;
114
+ readonly Transitions: FSharpList<PathwayTransition>;
115
+ readonly ExecutionMode: string;
116
+ constructor(States: FSharpList<PathwayState>, Transitions: FSharpList<PathwayTransition>, ExecutionMode: string);
117
+ }
118
+ export declare function PathwayContext_$reflection(): TypeInfo;
119
+ export declare class SemanticReport extends Record implements IEquatable<SemanticReport>, IComparable<SemanticReport> {
120
+ readonly FormId: string;
121
+ readonly FormName: string;
122
+ readonly FormCode: Option<string>;
123
+ readonly FieldCatalog: FSharpList<FieldCatalogEntry>;
124
+ readonly ChoiceCatalog: FSharpList<ChoiceCatalogEntry>;
125
+ readonly PathwayContext: Option<PathwayContext>;
126
+ readonly UnmappedInstructions: FSharpList<InstructionItem>;
127
+ readonly InferredRelationships: FSharpList<InferredRelationship>;
128
+ readonly CrossFormReferences: FSharpList<FormReference>;
129
+ readonly Confidence: ConfidenceMetrics;
130
+ readonly GeneratedAt: Date;
131
+ readonly ActionTypeSuggestions: FSharpList<ActionTypeSuggestion>;
132
+ constructor(FormId: string, FormName: string, FormCode: Option<string>, FieldCatalog: FSharpList<FieldCatalogEntry>, ChoiceCatalog: FSharpList<ChoiceCatalogEntry>, PathwayContext: Option<PathwayContext>, UnmappedInstructions: FSharpList<InstructionItem>, InferredRelationships: FSharpList<InferredRelationship>, CrossFormReferences: FSharpList<FormReference>, Confidence: ConfidenceMetrics, GeneratedAt: Date, ActionTypeSuggestions: FSharpList<ActionTypeSuggestion>);
133
+ }
134
+ export declare function SemanticReport_$reflection(): TypeInfo;
135
+ export declare class ActionTypeSuggestion extends Record implements IEquatable<ActionTypeSuggestion>, IComparable<ActionTypeSuggestion> {
136
+ readonly EventType: string;
137
+ readonly EventParams: FSharpMap<string, string>;
138
+ readonly SuggestedActionType: string;
139
+ readonly Confidence: float64;
140
+ readonly Reasoning: string;
141
+ readonly SuggestedParameters: Option<FSharpMap<string, string>>;
142
+ readonly TargetItemId: Option<int32>;
143
+ readonly TargetFieldKey: Option<string>;
144
+ constructor(EventType: string, EventParams: FSharpMap<string, string>, SuggestedActionType: string, Confidence: float64, Reasoning: string, SuggestedParameters: Option<FSharpMap<string, string>>, TargetItemId: Option<int32>, TargetFieldKey: Option<string>);
145
+ }
146
+ export declare function ActionTypeSuggestion_$reflection(): TypeInfo;
147
+ /**
148
+ * Analyze CoreMR event type and suggest appropriate FormSpec action type
149
+ */
150
+ export declare function ActionTypeAnalysis_analyzeEventType(eventType: string, eventParams: FSharpMap<string, string>): [string, float64, string];
151
+ /**
152
+ * Generate suggested parameters for FormSpec action based on CoreMR event
153
+ */
154
+ export declare function ActionTypeAnalysis_generateSuggestedParameters(actionType: string, eventParams: FSharpMap<string, string>): Option<FSharpMap<string, string>>;
155
+ /**
156
+ * Analyze a CoreMR trigger and generate action type suggestion
157
+ */
158
+ export declare function ActionTypeAnalysis_analyzeTrigger(trigger: CoreMRTrigger, fieldCatalog: FSharpList<FieldCatalogEntry>): Option<ActionTypeSuggestion>;
159
+ /**
160
+ * Create an empty semantic report
161
+ */
162
+ export declare function empty(formId: string, formName: string): SemanticReport;
163
+ /**
164
+ * Extract form code from name using pattern matching
165
+ */
166
+ export declare function extractFormCode(formName: string): Option<string>;
167
+ /**
168
+ * Determine complexity based on instruction pattern
169
+ */
170
+ export declare function scoreInstructionComplexity(text: string, pattern: Option<string>): ComplexityLevel_$union;
171
+ /**
172
+ * Determine field complexity based on requirements
173
+ */
174
+ export declare function scoreFieldComplexity(isRequired: boolean, hasDependency: boolean, hasComplexLogic: boolean): ComplexityLevel_$union;
175
+ /**
176
+ * Check if text contains conditional instruction
177
+ */
178
+ export declare function hasInstruction(text: string): boolean;
179
+ /**
180
+ * Check if text contains form reference
181
+ */
182
+ export declare function hasFormReference(text: string): boolean;
183
+ /**
184
+ * Extract form references from text
185
+ */
186
+ export declare function extractFormReferences(itemId: int32, text: string): FSharpList<FormReference>;
187
+ /**
188
+ * Build field catalog from CoreMR items and FormSpec
189
+ */
190
+ export declare function buildFieldCatalog<T>(items: FSharpList<CoreMRItem>, formSpec: Spec_FormSpec$1<T>): FSharpList<FieldCatalogEntry>;
191
+ /**
192
+ * Build choice catalog from CoreMR choices and FormSpec
193
+ */
194
+ export declare function buildChoiceCatalog<T>(choices: FSharpList<CoreMRChoice>, formSpec: Spec_FormSpec$1<T>, fieldCatalog: FSharpList<FieldCatalogEntry>): FSharpList<ChoiceCatalogEntry>;
195
+ /**
196
+ * Build pathway context from FormSpec clinical pathway
197
+ */
198
+ export declare function buildPathwayContext(pathway: Option<ClinicalPathway_ClinicalPathwaySpec>): Option<PathwayContext>;
199
+ /**
200
+ * Add unmapped instruction to report with enhanced context
201
+ */
202
+ export declare function addUnmappedInstruction(report: SemanticReport, item: CoreMRItem): SemanticReport;
203
+ /**
204
+ * Add cross-form reference to report
205
+ */
206
+ export declare function addCrossFormReference(report: SemanticReport, reference: FormReference): SemanticReport;
207
+ /**
208
+ * Add inferred relationship to report
209
+ */
210
+ export declare function addInferredRelationship(report: SemanticReport, field1: string, field2: string, relationType: string, evidence: string): SemanticReport;
211
+ /**
212
+ * Build action type suggestions from CoreMR triggers
213
+ */
214
+ export declare function buildActionTypeSuggestions(triggers: FSharpList<CoreMRTrigger>, fieldCatalog: FSharpList<FieldCatalogEntry>): FSharpList<ActionTypeSuggestion>;
215
+ /**
216
+ * Add action type suggestion to the report
217
+ */
218
+ export declare function addActionTypeSuggestion(report: SemanticReport, suggestion: ActionTypeSuggestion): SemanticReport;
219
+ /**
220
+ * Calculate confidence metrics
221
+ */
222
+ export declare function calculateMetrics(report: SemanticReport, totalItems: int32, triggersConverted: int32): SemanticReport;
223
+ /**
224
+ * Convert report to markdown format
225
+ */
226
+ export declare function toMarkdown(report: SemanticReport): string;
227
+ /**
228
+ * Main entry point to build a semantic report for CoreMR form data
229
+ */
230
+ export declare function buildReport(formData: CoreMRFormData): string;
231
+ //# sourceMappingURL=CorEMRSemanticReportBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CorEMRSemanticReportBuilder.d.ts","sourceRoot":"","sources":["../../../../../FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,MAAM,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AACpH,OAAO,EAA6H,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAChM,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAuC,MAAM,EAAE,MAAM,uCAAuC,CAAC;AACpG,OAAO,EAAsG,WAA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ap } from "@fable-org/fable-library-js/Map.js";
3
+ import { int32 } from "@fable-org/fable-library-js/Int32.js";
4
+ import { CoreMRItem, CoreMRChoice } from "../../CorEMR/CoreMRTypes.js";
5
+ import { Spec_FormStep$1, Spec_FieldType_$union } from "../../../FormSpec.js";
6
+ /**
7
+ * Create FormSpec Steps from CoreMR items
8
+ */
9
+ export declare function createSteps(formCode: string, items: FSharpList<CoreMRItem>, choicesByItem: FSharpMap<int32, FSharpList<CoreMRChoice>>): FSharpList<Spec_FormStep$1<Spec_FieldType_$union>>;
10
+ //# sourceMappingURL=CorEMRStepsBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CorEMRStepsBuilder.d.ts","sourceRoot":"","sources":["../../../../../FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAmB,MAAM,qCAAqC,CAAC;AAGzF,OAAO,EAAE,SAAS,EAAW,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAoB,MAAM,sBAAsB,CAAC;AAIhG;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,EAAE,aAAa,EAAE,SAAS,CAAC,KAAK,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,GAAG,UAAU,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC,CAU1L"}
@@ -0,0 +1,55 @@
1
+ import { FSharpMap } from "@fable-org/fable-library-js/Map.js";
2
+ import { FSharpList } from "@fable-org/fable-library-js/List.js";
3
+ import { int32 } from "@fable-org/fable-library-js/Int32.js";
4
+ import { CoreMRFormData, CoreMRChoice } from "../../CorEMR/CoreMRTypes.js";
5
+ import { Spec_FormSpec$1, Spec_FieldType_$union, Spec_Score } from "../../../FormSpec.js";
6
+ import { Option } from "@fable-org/fable-library-js/Option.js";
7
+ import { FSharpResult$2_$union } from "@fable-org/fable-library-js/Result.js";
8
+ import { ValidationResult } from "./CorEMRFormSpecValidator.js";
9
+ /**
10
+ * Use FormSpec's single source of truth for canonicalization
11
+ */
12
+ export declare function canonicalizeFieldKey(input: string): string;
13
+ /**
14
+ * Generate deterministic GUID using FormSpec's single source of truth
15
+ */
16
+ export declare function generateStableDeterministicGuid(name: string): string;
17
+ /**
18
+ * Create mapping from choice ID to actual text value
19
+ */
20
+ export declare function createChoiceIdToTextMap(choices: FSharpList<CoreMRChoice>): FSharpMap<int32, string>;
21
+ /**
22
+ * Calculate scoring from choice scores
23
+ */
24
+ export declare function calculateScore(choices: FSharpList<CoreMRChoice>, formName: string): Option<Spec_Score>;
25
+ /**
26
+ * Extract form code from form name using patterns:
27
+ * 1. If ends with (CODE) - extract CODE
28
+ * 2. If contains ' - ' - take everything after last dash
29
+ * 3. Otherwise use CORE-{id}
30
+ */
31
+ export declare function extractFormCode(formName: string, formId: int32): string;
32
+ /**
33
+ * Convert CoreMR form data to FormSpec
34
+ */
35
+ export declare function convertToFormSpec(formData: CoreMRFormData): Spec_FormSpec$1<Spec_FieldType_$union>;
36
+ /**
37
+ * Serialize FormSpec to JSON
38
+ * Note: The JSON serialization may have issues with ConditionValue discriminated union.
39
+ * This is a known limitation - the MCP enhancement server and YAML conversion
40
+ * handle the FormSpec directly without relying on JSON serialization.
41
+ */
42
+ export declare function serializeFormSpec(formSpec: Spec_FormSpec$1<Spec_FieldType_$union>): string;
43
+ /**
44
+ * Main conversion function
45
+ */
46
+ export declare function convertForm(formData: CoreMRFormData): Spec_FormSpec$1<Spec_FieldType_$union>;
47
+ /**
48
+ * Convert form with validation
49
+ */
50
+ export declare function convertFormWithValidation(formData: CoreMRFormData): FSharpResult$2_$union<[Spec_FormSpec$1<Spec_FieldType_$union>, ValidationResult], string>;
51
+ /**
52
+ * Convert form with semantic analysis
53
+ */
54
+ export declare function convertFormWithSemantics(formData: CoreMRFormData): [Spec_FormSpec$1<Spec_FieldType_$union>, string];
55
+ //# sourceMappingURL=CorEMRTemplateToFormSpec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CorEMRTemplateToFormSpec.d.ts","sourceRoot":"","sources":["../../../../../FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,SAAS,EAAU,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAA2C,UAAU,EAAO,MAAM,qCAAqC,CAAC;AAC/G,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAyB,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAElG,OAAO,EAA2D,eAAe,EAAwG,qBAAqB,EAAmB,UAAU,EAA6F,MAAM,sBAAsB,CAAC;AACrW,OAAO,EAAc,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAQ3E,OAAO,EAAqB,qBAAqB,EAAwB,MAAM,uCAAuC,CAAC;AACvH,OAAO,EAAwC,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGtG;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,UAAU,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAInG;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,CAWtG;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,GAAG,MAAM,CAmBvE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,cAAc,GAAG,eAAe,CAAC,qBAAqB,CAAC,CAiBlG;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,eAAe,CAAC,qBAAqB,CAAC,GAAG,MAAM,CAiB1F;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,cAAc,GAAG,eAAe,CAAC,qBAAqB,CAAC,CAE5F;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,cAAc,GAAG,qBAAqB,CAAC,CAAC,eAAe,CAAC,qBAAqB,CAAC,EAAE,gBAAgB,CAAC,EAAE,MAAM,CAAC,CAS7J;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,cAAc,GAAG,CAAC,eAAe,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC,CAEnH"}
@@ -0,0 +1,69 @@
1
+ import { ClinicalPathway_ClinicalPathwaySpec, ClinicalPathway_TransitionCondition_$union, Shared_FieldKey, ClinicalPathway_ActionInfo_$union, ClinicalPathway_RecurrencePattern, ClinicalPathway_DueDate_$union, ClinicalPathway_TaskPriority_$union, ClinicalPathway_TriggerTiming_$union, ClinicalPathway_FieldEvaluator_$union } from "../../../FormSpec.js";
2
+ import { FSharpList } from "@fable-org/fable-library-js/List.js";
3
+ import { int32 } from "@fable-org/fable-library-js/Int32.js";
4
+ import { Option } from "@fable-org/fable-library-js/Option.js";
5
+ import { FSharpMap } from "@fable-org/fable-library-js/Map.js";
6
+ import { CoreMRFormMetadata, CoreMRTrigger, CoreMRItem, CoreMRTriggerCondition, CoreMRTriggerEvent } from "../../CorEMR/CoreMRTypes.js";
7
+ /**
8
+ * Convert CoreMR operator to FormSpec FieldEvaluator
9
+ * Note: answerValues are now actual text values, not IDs
10
+ */
11
+ export declare function convertOperator(operator: string, answerValues: FSharpList<string>): ClinicalPathway_FieldEvaluator_$union;
12
+ /**
13
+ * Convert CoreMR trigger_on to FormSpec TriggerTiming
14
+ */
15
+ export declare function convertTiming(triggerOn: string): ClinicalPathway_TriggerTiming_$union;
16
+ /**
17
+ * Convert CoreMR priority (1=high, 2=medium, 3=low) to FormSpec TaskPriority
18
+ */
19
+ export declare function convertPriority(priority: string): ClinicalPathway_TaskPriority_$union;
20
+ /**
21
+ * Parse CoreMR due date string to FormSpec DueDate
22
+ */
23
+ export declare function parseDueDate(dateStr: string): ClinicalPathway_DueDate_$union;
24
+ /**
25
+ * Parse CoreMR recurrence interval (e.g., "+1 day", "+4 hours")
26
+ */
27
+ export declare function parseRecurrenceInterval(intervalStr: string): number;
28
+ /**
29
+ * Parse recurrence pattern from CoreMR event params
30
+ */
31
+ export declare function parseRecurrence(recurEvery: Option<string>, recurEnd: Option<string>): Option<ClinicalPathway_RecurrencePattern>;
32
+ /**
33
+ * Convert CoreMR event to FormSpec ActionInfo
34
+ */
35
+ export declare function convertEvent(event: CoreMRTriggerEvent): ClinicalPathway_ActionInfo_$union;
36
+ /**
37
+ * Convert CoreMR condition to FormSpec TransitionCondition
38
+ */
39
+ export declare function convertCondition(condition: CoreMRTriggerCondition, itemIdToFieldKey: ((arg0: int32) => Shared_FieldKey), choiceIdToText: FSharpMap<int32, string>): ClinicalPathway_TransitionCondition_$union;
40
+ /**
41
+ * Combine multiple conditions with AND logic
42
+ */
43
+ export declare function combineConditions(conditions: FSharpList<ClinicalPathway_TransitionCondition_$union>): ClinicalPathway_TransitionCondition_$union;
44
+ /**
45
+ * Generate human-readable label for evaluation state based on trigger conditions
46
+ */
47
+ export declare function generateEvaluationLabel(trigger: CoreMRTrigger, itemIdToFieldKey: ((arg0: int32) => Shared_FieldKey), choiceIdToText: FSharpMap<int32, string>, items: FSharpList<CoreMRItem>): string;
48
+ /**
49
+ * Generate human-readable label for action state based on trigger events
50
+ */
51
+ export declare function generateActionLabel(trigger: CoreMRTrigger): string;
52
+ /**
53
+ * Convert single CoreMR trigger to complete ClinicalPathwaySpec
54
+ */
55
+ export declare function convertTriggerToPathway(trigger: CoreMRTrigger, itemIdToFieldKey: ((arg0: int32) => Shared_FieldKey), choiceIdToText: FSharpMap<int32, string>): ClinicalPathway_ClinicalPathwaySpec;
56
+ /**
57
+ * Convert all active triggers for a form to pathways
58
+ */
59
+ export declare function convertAllTriggers(triggers: FSharpList<CoreMRTrigger>, itemIdToFieldKey: ((arg0: int32) => Shared_FieldKey), choiceIdToText: FSharpMap<int32, string>): FSharpList<ClinicalPathway_ClinicalPathwaySpec>;
60
+ /**
61
+ * Convert all triggers into a SINGLE pathway with one start node and branching logic
62
+ * This creates the proper structure: Start → Multiple Evaluation branches → Actions
63
+ */
64
+ export declare function convertTriggersToSinglePathway(triggers: FSharpList<CoreMRTrigger>, itemIdToFieldKey: ((arg0: int32) => Shared_FieldKey), choiceIdToText: FSharpMap<int32, string>, metadata: CoreMRFormMetadata, items: FSharpList<CoreMRItem>): ClinicalPathway_ClinicalPathwaySpec;
65
+ /**
66
+ * Create an orchestrator pathway that coordinates multiple sub-pathways
67
+ */
68
+ export declare function createOrchestratorPathway(subPathways: FSharpList<ClinicalPathway_ClinicalPathwaySpec>, metadata: CoreMRFormMetadata): ClinicalPathway_ClinicalPathwaySpec;
69
+ //# sourceMappingURL=CorEMRTriggerConverter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CorEMRTriggerConverter.d.ts","sourceRoot":"","sources":["../../../../../FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.ts"],"names":[],"mappings":"AACA,OAAO,EAA0O,mCAAmC,EAAqmB,0CAA0C,EAAoH,eAAe,EAAE,iCAAiC,EAAia,iCAAiC,EAA6E,8BAA8B,EAAwG,mCAAmC,EAA4G,oCAAoC,EAAkI,qCAAqC,EAA8X,MAAM,sBAAsB,CAAC;AAEn9E,OAA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"}
@@ -0,0 +1,21 @@
1
+ import { CoreMRSourceMap } from "./CoreMRSourceMap.js";
2
+ import { FSharpResult$2_$union } from "@fable-org/fable-library-js/Result.js";
3
+ import { Spec_FormSpec$1, Spec_FieldType_$union } from "../../../FormSpec.js";
4
+ import { CoreMRFormInsertRequest } from "./FormSpecToCoreMRInsert.js";
5
+ /**
6
+ * Decode provenance payload using Thoth Auto — same type that was encoded by
7
+ * CoreMRSourceMap.convertWithMapAndProvenance (Encode.Auto.toString).
8
+ * Uses sourceMapExtra so MatrixItemAnchors defaults to [] when missing.
9
+ */
10
+ export declare function tryDecodeSourceMap(payloadJson: string): FSharpResult$2_$union<CoreMRSourceMap, string>;
11
+ /**
12
+ * Serialize CoreMRFormInsertRequest to JSON for bridge POST body
13
+ */
14
+ export declare function serializeRequest(req: CoreMRFormInsertRequest): string;
15
+ /**
16
+ * Encode filled FormSpec to CoreMR form-insert payload.
17
+ * scaffoldMode: when true, omit answers (scaffold mode — all items get value=2).
18
+ * Iterates over provenance anchors (source of truth) so we never omit required items.
19
+ */
20
+ export declare function encodeToFormAnswers(provenancePayload: string, filledFormSpec: Spec_FormSpec$1<Spec_FieldType_$union>, scaffoldMode: boolean, dryRun: boolean): FSharpResult$2_$union<CoreMRFormInsertRequest, string>;
21
+ //# sourceMappingURL=CoreMREncoder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CoreMREncoder.d.ts","sourceRoot":"","sources":["../../../../../FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,eAAe,EAAmP,MAAM,sBAAsB,CAAC;AACvT,OAAO,EAA2C,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAEvH,OAAO,EAAE,eAAe,EAA4K,qBAAqB,EAAwI,MAAM,sBAAsB,CAAC;AAU9X,OAAO,EAAgB,uBAAuB,EAAuC,MAAM,6BAA6B,CAAC;AAmBzH;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,qBAAqB,CAAC,eAAe,EAAE,MAAM,CAAC,CAEtG;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,uBAAuB,GAAG,MAAM,CAErE;AAsPD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,iBAAiB,EAAE,MAAM,EAAE,cAAc,EAAE,eAAe,CAAC,qBAAqB,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,qBAAqB,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAmBrN"}