@f1studio/form-spec 5.0.0-alpha.140 → 5.0.0-alpha.141

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 (105) hide show
  1. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.d.ts +3 -2
  2. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.d.ts.map +1 -1
  3. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.d.ts.map +1 -1
  4. package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.d.ts.map +1 -1
  5. package/FormSpec.FS/Integrations/OpenFda/OpenFdaTypes.d.ts +74 -0
  6. package/FormSpec.FS/Integrations/OpenFda/OpenFdaTypes.d.ts.map +1 -0
  7. package/FormSpec.TS/FormSpec.FS/BlueprintValidation.js.map +1 -1
  8. package/FormSpec.TS/FormSpec.FS/BlueprintValidation.ts.map +1 -1
  9. package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.js.map +1 -1
  10. package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.ts.map +1 -1
  11. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.js +36 -30
  12. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.js.map +1 -1
  13. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.ts.map +1 -1
  14. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.js +4 -19
  15. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.js.map +1 -1
  16. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.ts.map +1 -1
  17. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js.map +1 -1
  18. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts.map +1 -1
  19. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js +12 -2
  20. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js.map +1 -1
  21. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts.map +1 -1
  22. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js.map +1 -1
  23. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts.map +1 -1
  24. package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.js.map +1 -1
  25. package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.ts.map +1 -1
  26. package/FormSpec.TS/FormSpec.FS/Integrations/OpenFda/OpenFdaTypes.js +282 -0
  27. package/FormSpec.TS/FormSpec.FS/Integrations/OpenFda/OpenFdaTypes.js.map +1 -0
  28. package/FormSpec.TS/FormSpec.FS/Integrations/OpenFda/OpenFdaTypes.ts.map +1 -0
  29. package/FormSpec.TS/FormSpec.FS/Interop/Facade/FormAnswersGate.js.map +1 -1
  30. package/FormSpec.TS/FormSpec.FS/Interop/Facade/FormAnswersGate.ts.map +1 -1
  31. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.js.map +1 -1
  32. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.ts.map +1 -1
  33. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.js.map +1 -1
  34. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.ts.map +1 -1
  35. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Values.Api.Option.js.map +1 -1
  36. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Values.Api.Option.ts.map +1 -1
  37. package/FormSpec.TS/FormSpec.FS/Migrator.js.map +1 -1
  38. package/FormSpec.TS/FormSpec.FS/Migrator.ts.map +1 -1
  39. package/FormSpec.TS/FormSpec.FS/PathwayExecutor.js.map +1 -1
  40. package/FormSpec.TS/FormSpec.FS/PathwayExecutor.ts.map +1 -1
  41. package/FormSpec.TS/PluginRegistration.js +2 -0
  42. package/FormSpec.TS/PluginRegistration.js.map +1 -1
  43. package/FormSpec.TS/PluginRegistration.ts.map +1 -1
  44. package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Decode.js +63 -69
  45. package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Decode.js.map +1 -1
  46. package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Decode.ts.map +1 -1
  47. package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Encode.js +6 -10
  48. package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Encode.js.map +1 -1
  49. package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Encode.ts.map +1 -1
  50. package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +57 -0
  51. package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js +119 -0
  52. package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js.map +1 -0
  53. package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.ts.map +1 -0
  54. package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +20 -0
  55. package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/Promise.fs +766 -0
  56. package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +165 -0
  57. package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/Promise.fs.js.map +1 -0
  58. package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/Promise.fs.ts.map +1 -0
  59. package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs +31 -0
  60. package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +32 -0
  61. package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js.map +1 -0
  62. package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.ts.map +1 -0
  63. package/FormSpec.TS/fable_modules/Feliz.2.8.0/DateParsing.fs.js.map +1 -1
  64. package/FormSpec.TS/fable_modules/Feliz.2.8.0/DateParsing.fs.ts.map +1 -1
  65. package/FormSpec.TS/fable_modules/project_cracked.json +1 -1
  66. package/FormSpec.TS/plugins/allergyfinder/src/AllergyFinderField.js +2431 -0
  67. package/FormSpec.TS/plugins/allergyfinder/src/AllergyFinderField.js.map +1 -0
  68. package/FormSpec.TS/plugins/allergyfinder/src/AllergyFinderField.ts.map +1 -0
  69. package/FormSpec.TS/plugins/allergyfinder/src/OpenFdaClient.js +107 -0
  70. package/FormSpec.TS/plugins/allergyfinder/src/OpenFdaClient.js.map +1 -0
  71. package/FormSpec.TS/plugins/allergyfinder/src/OpenFdaClient.ts.map +1 -0
  72. package/FormSpec.TS/plugins/vitals/src/VitalsField.js +29 -312
  73. package/FormSpec.TS/plugins/vitals/src/VitalsField.js.map +1 -1
  74. package/FormSpec.TS/plugins/vitals/src/VitalsField.ts.map +1 -1
  75. package/FormSpec.TS/plugins/vitals/src/VitalsLogic.js +506 -0
  76. package/FormSpec.TS/plugins/vitals/src/VitalsLogic.js.map +1 -0
  77. package/FormSpec.TS/plugins/vitals/src/VitalsLogic.ts.map +1 -0
  78. package/README.md +7 -7
  79. package/Thoth.Json/packages/Thoth.Json/Decode.d.ts +2 -2
  80. package/Thoth.Json/packages/Thoth.Json/Decode.d.ts.map +1 -1
  81. package/Thoth.Json/packages/Thoth.Json/Encode.d.ts.map +1 -1
  82. package/fable_modules/Fable.Promise.3.2.0/Promise.fs.d.ts +112 -0
  83. package/fable_modules/Fable.Promise.3.2.0/Promise.fs.d.ts.map +1 -0
  84. package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.d.ts +8 -0
  85. package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.d.ts.map +1 -0
  86. package/package.json +1 -1
  87. package/plugins/allergyfinder/src/AllergyFinderField.d.ts +116 -0
  88. package/plugins/allergyfinder/src/AllergyFinderField.d.ts.map +1 -0
  89. package/plugins/allergyfinder/src/OpenFdaClient.d.ts +5 -0
  90. package/plugins/allergyfinder/src/OpenFdaClient.d.ts.map +1 -0
  91. package/plugins/vitals/src/VitalsField.d.ts +4 -43
  92. package/plugins/vitals/src/VitalsField.d.ts.map +1 -1
  93. package/plugins/vitals/src/VitalsLogic.d.ts +72 -0
  94. package/plugins/vitals/src/VitalsLogic.d.ts.map +1 -0
  95. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.ts +35 -32
  96. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.ts +5 -22
  97. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts +13 -2
  98. package/src/FormSpec.FS/Integrations/OpenFda/OpenFdaTypes.ts +160 -0
  99. package/src/PluginRegistration.ts +2 -0
  100. package/src/Thoth.Json/packages/Thoth.Json/Decode.ts +38 -55
  101. package/src/Thoth.Json/packages/Thoth.Json/Encode.ts +10 -16
  102. package/src/plugins/allergyfinder/src/AllergyFinderField.ts +1341 -0
  103. package/src/plugins/allergyfinder/src/OpenFdaClient.ts +103 -0
  104. package/src/plugins/vitals/src/VitalsField.ts +35 -244
  105. package/src/plugins/vitals/src/VitalsLogic.ts +360 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VitalsLogic.d.ts","sourceRoot":"","sources":["../../../../FormSpec.TS/plugins/vitals/src/VitalsLogic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAqC,MAAM,EAAE,MAAM,uCAAuC,CAAC;AACl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,MAAO,YAAW,UAAU,CAAC,sBAAsB,CAAC,EAAE,WAAW,CAAC,sBAAsB,CAAC;IACjI,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,uBAAuB,EAAE,CAAC;gBACnC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE;CAMlG;AAED,wBAAgB,kCAAkC,IAAI,QAAQ,CAE7D;AA4BD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,uBAAuB,CAkCtG;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,UAAU,CAAC,yBAAyB,CAAC,GAAG,sBAAsB,CAWlH"}
@@ -2,18 +2,21 @@ import { Record } from "@fable-org/fable-library-js/Types.js";
2
2
  import { IComparable, IEquatable } from "@fable-org/fable-library-js/Util.js";
3
3
  import { record_type, bool_type, string_type, TypeInfo } from "@fable-org/fable-library-js/Reflection.js";
4
4
  import { int32 } from "@fable-org/fable-library-js/Int32.js";
5
+ import { replace } from "@fable-org/fable-library-js/String.js";
5
6
 
6
7
  export class ElementTypeInfo extends Record implements IEquatable<ElementTypeInfo>, IComparable<ElementTypeInfo> {
7
8
  readonly Code: string;
9
+ readonly Label: string;
8
10
  readonly ValueEncoding: string;
9
11
  readonly TextFieldRole: string;
10
12
  readonly IsPlusNotes: boolean;
11
13
  readonly IsScaffold: boolean;
12
14
  readonly IsSkip: boolean;
13
15
  readonly IsNeedsDocumentation: boolean;
14
- constructor(Code: string, ValueEncoding: string, TextFieldRole: string, IsPlusNotes: boolean, IsScaffold: boolean, IsSkip: boolean, IsNeedsDocumentation: boolean) {
16
+ constructor(Code: string, Label: string, ValueEncoding: string, TextFieldRole: string, IsPlusNotes: boolean, IsScaffold: boolean, IsSkip: boolean, IsNeedsDocumentation: boolean) {
15
17
  super();
16
18
  this.Code = Code;
19
+ this.Label = Label;
17
20
  this.ValueEncoding = ValueEncoding;
18
21
  this.TextFieldRole = TextFieldRole;
19
22
  this.IsPlusNotes = IsPlusNotes;
@@ -24,67 +27,67 @@ export class ElementTypeInfo extends Record implements IEquatable<ElementTypeInf
24
27
  }
25
28
 
26
29
  export function ElementTypeInfo_$reflection(): TypeInfo {
27
- return record_type("FormSpec.Integrations.CorEMR.CorEMRElementTypeMap.ElementTypeInfo", [], ElementTypeInfo, () => [["Code", string_type], ["ValueEncoding", string_type], ["TextFieldRole", string_type], ["IsPlusNotes", bool_type], ["IsScaffold", bool_type], ["IsSkip", bool_type], ["IsNeedsDocumentation", bool_type]]);
30
+ return record_type("FormSpec.Integrations.CorEMR.CorEMRElementTypeMap.ElementTypeInfo", [], ElementTypeInfo, () => [["Code", string_type], ["Label", string_type], ["ValueEncoding", string_type], ["TextFieldRole", string_type], ["IsPlusNotes", bool_type], ["IsScaffold", bool_type], ["IsSkip", bool_type], ["IsNeedsDocumentation", bool_type]]);
28
31
  }
29
32
 
30
33
  export function getElementTypeInfo(itemTypeId: int32): ElementTypeInfo {
31
34
  switch (itemTypeId) {
32
35
  case 1:
33
- return new ElementTypeInfo("text", "zero", "content", false, false, false, false);
36
+ return new ElementTypeInfo("text", "Text", "zero", "content", false, false, false, false);
34
37
  case 2:
35
- return new ElementTypeInfo("text_multiline", "zero", "content", false, false, false, false);
38
+ return new ElementTypeInfo("text_multiline", "Text Multiline", "zero", "content", false, false, false, false);
36
39
  case 20:
37
- return new ElementTypeInfo("dropdown", "choice_score", "ignored", false, false, false, false);
40
+ return new ElementTypeInfo("dropdown", "Multiple Choice", "choice_score", "ignored", false, false, false, false);
38
41
  case 21:
39
- return new ElementTypeInfo("dropdown_notes", "choice_score", "optional_notes", true, false, false, true);
42
+ return new ElementTypeInfo("dropdown_notes", "Multiple Choice with Notes", "choice_score", "optional_notes", true, false, false, true);
40
43
  case 25:
41
- return new ElementTypeInfo("dropdown_notes_ui", "choice_score", "ignored", false, false, false, false);
44
+ return new ElementTypeInfo("dropdown_notes_ui", "Multiple Choice with Notes UI", "choice_score", "ignored", false, false, false, false);
42
45
  case 26:
43
- return new ElementTypeInfo("chips_notes", "choice_score", "optional_notes", true, false, false, true);
46
+ return new ElementTypeInfo("chips_notes", "Chips with Notes", "choice_score", "optional_notes", true, false, false, true);
44
47
  case 30:
45
- return new ElementTypeInfo("yes_no_text", "1_yes_2_no", "optional_notes", false, false, false, false);
48
+ return new ElementTypeInfo("yes_no_text", "Yes/No with Text", "1_yes_2_no", "optional_notes", false, false, false, false);
46
49
  case 31:
47
- return new ElementTypeInfo("yes_no_notes", "1_yes_2_no", "optional_notes", true, false, false, true);
50
+ return new ElementTypeInfo("yes_no_notes", "Yes/No with Notes", "1_yes_2_no", "optional_notes", true, false, false, true);
48
51
  case 32:
49
- return new ElementTypeInfo("exam_3choice", "choice_score", "ignored", false, false, false, false);
52
+ return new ElementTypeInfo("exam_3choice", "Exam 3-Choice", "choice_score", "ignored", false, false, false, false);
50
53
  case 40:
51
- return new ElementTypeInfo("checkbox", "choice_score", "ignored", false, false, false, false);
54
+ return new ElementTypeInfo("checkbox", "Checkboxes", "choice_score", "ignored", false, false, false, false);
52
55
  case 41:
53
- return new ElementTypeInfo("checkbox_notes", "choice_score", "optional_notes", true, false, false, true);
56
+ return new ElementTypeInfo("checkbox_notes", "Checkboxes with Notes", "choice_score", "optional_notes", true, false, false, true);
54
57
  case 50:
55
- return new ElementTypeInfo("date", "zero", "iso_date", false, false, false, false);
58
+ return new ElementTypeInfo("date", "Date", "zero", "iso_date", false, false, false, false);
56
59
  case 51:
57
- return new ElementTypeInfo("signature_date", "zero", "content", false, false, false, false);
60
+ return new ElementTypeInfo("signature_date", "Signature + Date", "zero", "content", false, false, false, false);
58
61
  case 60:
59
- return new ElementTypeInfo("datetime", "zero", "iso_date", false, false, false, false);
62
+ return new ElementTypeInfo("datetime", "DateTime", "zero", "iso_date", false, false, false, false);
60
63
  case 61:
61
- return new ElementTypeInfo("signature", "skip", "skip", false, false, true, false);
64
+ return new ElementTypeInfo("signature", "Signature", "skip", "skip", false, false, true, false);
62
65
  case 110:
63
- return new ElementTypeInfo("heading", "scaffold", "ignored", false, true, false, false);
66
+ return new ElementTypeInfo("heading", "Heading", "scaffold", "ignored", false, true, false, false);
64
67
  case 120:
65
- return new ElementTypeInfo("instructions", "scaffold", "ignored", false, true, false, false);
68
+ return new ElementTypeInfo("instructions", "Instructions", "scaffold", "ignored", false, true, false, false);
66
69
  case 121:
67
- return new ElementTypeInfo("group_row", "scaffold", "ignored", false, true, false, false);
70
+ return new ElementTypeInfo("group_row", "Group Row", "scaffold", "ignored", false, true, false, false);
68
71
  case 130:
69
- return new ElementTypeInfo("vitals_widget", "scaffold", "ignored", false, true, false, false);
72
+ return new ElementTypeInfo("vitals_widget", "Vitals Widget", "scaffold", "ignored", false, true, false, false);
70
73
  case 131:
71
- return new ElementTypeInfo("linked_data", "scaffold", "ignored", false, true, false, false);
74
+ return new ElementTypeInfo("linked_data", "Linked Data", "scaffold", "ignored", false, true, false, false);
72
75
  case 132:
73
- return new ElementTypeInfo("linked_data_rare", "scaffold", "ignored", false, true, false, false);
76
+ return new ElementTypeInfo("linked_data_rare", "Linked Data (Rare)", "scaffold", "ignored", false, true, false, false);
74
77
  case 133:
75
- return new ElementTypeInfo("sub_header", "scaffold", "ignored", false, true, false, false);
78
+ return new ElementTypeInfo("sub_header", "Sub Header", "scaffold", "ignored", false, true, false, false);
76
79
  case 134:
77
- return new ElementTypeInfo("score_display", "scaffold", "ignored", false, true, false, false);
80
+ return new ElementTypeInfo("score_display", "Score Display", "scaffold", "ignored", false, true, false, false);
78
81
  case 135:
79
- return new ElementTypeInfo("score_explanation", "scaffold", "ignored", false, true, false, false);
82
+ return new ElementTypeInfo("score_explanation", "Score Explanation", "scaffold", "ignored", false, true, false, false);
80
83
  case 138:
81
- return new ElementTypeInfo("unknown_138", "scaffold", "ignored", false, true, false, false);
84
+ return new ElementTypeInfo("unknown_138", "Unknown (138)", "scaffold", "ignored", false, true, false, false);
82
85
  case 140:
83
- return new ElementTypeInfo("allergy_autofill", "scaffold", "ignored", false, true, false, false);
86
+ return new ElementTypeInfo("allergy_autofill", "Allergy Autofill", "scaffold", "ignored", false, true, false, false);
84
87
  case 143:
85
- return new ElementTypeInfo("chips_ros", "choice_score", "ignored", false, false, false, false);
88
+ return new ElementTypeInfo("chips_ros", "Chips ROS", "choice_score", "ignored", false, false, false, false);
86
89
  default:
87
- return new ElementTypeInfo(`unknown_${itemTypeId}`, "unknown", "unknown", false, false, true, false);
90
+ return new ElementTypeInfo(`unknown_${itemTypeId}`, `Unknown (${itemTypeId})`, "unknown", "unknown", false, false, true, false);
88
91
  }
89
92
  }
90
93
 
@@ -102,11 +105,11 @@ export function hasTextHasDate(itemTypeId: int32): [boolean, boolean] {
102
105
 
103
106
  /**
104
107
  * Convert bridge format (code, valueEncoding, textField) to ElementTypeInfo.
105
- * Used when elementTypes come from bridge templates endpoint (SSOT).
108
+ * Label derived from code (bridge doesn't carry CoreMR designer labels).
106
109
  */
107
110
  export function fromBridgeFormat(code: string, valueEncoding: string, textField: string): ElementTypeInfo {
108
111
  const isPlusNotes: boolean = (textField === "optional_notes") && ((valueEncoding === "choice_score") ? true : (valueEncoding === "1_yes_2_no"));
109
- return new ElementTypeInfo(code, valueEncoding, textField, isPlusNotes, valueEncoding === "scaffold", (valueEncoding === "skip") ? true : (textField === "skip"), isPlusNotes);
112
+ return new ElementTypeInfo(code, replace(code, "_", " "), valueEncoding, textField, isPlusNotes, valueEncoding === "scaffold", (valueEncoding === "skip") ? true : (textField === "skip"), isPlusNotes);
110
113
  }
111
114
 
112
115
  //# sourceMappingURL=CorEMRElementTypeMap.ts.map
@@ -1,18 +1,15 @@
1
1
  import { isNullOrWhiteSpace } from "@fable-org/fable-library-js/String.js";
2
2
  import { Helpers_generateDeterministicGuidRaw, Helpers_canonicalizeFieldKey } from "../../../Helpers.js";
3
- import { defaultArg, Option, value as value_1 } from "@fable-org/fable-library-js/Option.js";
4
3
  import { int32 } from "@fable-org/fable-library-js/Int32.js";
5
4
  import { CoreMRChoice, CoreMRItem } from "../../CorEMR/CoreMRTypes.js";
6
5
  import { Spec_FormField$1, Spec_FieldType_$union, Spec_FieldType_UnsupportedField, Spec_UnsupportedFieldInfo, Spec_FieldType_PluginField, Spec_PluginFieldConfig, Spec_FieldType_Message, Spec_MessageInfo, Spec_MessageType_Info, Spec_FieldType_DateTimeLocal, Spec_FieldType_Signature, Spec_SignatureInfo, Spec_FieldType_Date, Spec_FieldType_Radio, Spec_FieldType_CheckboxList, Spec_MultiChoiceInfo, Spec_FieldType_Dropdown, Spec_SingleChoiceInfo, Spec_FieldType_TextArea, Spec_FieldType_Text, Spec_TextInfo, Shared_FieldOption, Shared_FieldOptionKey, Shared_FieldKey } from "../../../FormSpec.js";
7
- import { sort, isEmpty, ofArray, FSharpList, sortBy, map } from "@fable-org/fable-library-js/List.js";
6
+ import { isEmpty, ofArray, FSharpList, sortBy, map } from "@fable-org/fable-library-js/List.js";
8
7
  import { comparePrimitives } from "@fable-org/fable-library-js/Util.js";
9
8
  import { getElementTypeInfo } from "./CorEMRElementTypeMap.js";
10
- import { normalizeChoiceScores } from "../../../BitmaskHelpers.js";
11
- import { compare, int64 } from "@fable-org/fable-library-js/BigInt.js";
9
+ import { Option, defaultArg } from "@fable-org/fable-library-js/Option.js";
12
10
 
13
11
  function buildNamespacedFieldSeed(formCode: string, stepOrder: int32, item: CoreMRItem): string {
14
- let matchValue: Option<string>;
15
- return `formspec.${isNullOrWhiteSpace(formCode) ? "unknown" : Helpers_canonicalizeFieldKey(formCode)}:step${stepOrder}.${isNullOrWhiteSpace(item.Label) ? ((matchValue = item.Uuid, (matchValue == null) ? (`item_id_${item.ItemId}`) : (`item_uuid_${value_1(matchValue)}`))) : Helpers_canonicalizeFieldKey(item.Label)}`;
12
+ return `formspec.${isNullOrWhiteSpace(formCode) ? "unknown" : Helpers_canonicalizeFieldKey(formCode)}:step${stepOrder}.item${item.ItemId}.${isNullOrWhiteSpace(item.Label) ? "_blank_" : Helpers_canonicalizeFieldKey(item.Label)}`;
16
13
  }
17
14
 
18
15
  export function generateNamespacedFieldKey(formCode: string, stepOrder: int32, item: CoreMRItem): Shared_FieldKey {
@@ -72,23 +69,9 @@ export function mapFieldType(item: CoreMRItem, choices: FSharpList<CoreMRChoice>
72
69
  case 32:
73
70
  return Spec_FieldType_Dropdown(new Spec_SingleChoiceInfo(mappedChoices));
74
71
  case 40:
75
- if (normalizeChoiceScores(sort<int64>(map<CoreMRChoice, int64>((c: CoreMRChoice): int64 => c.Score, choices), {
76
- Compare: compare,
77
- }))[1]) {
78
- return Spec_FieldType_CheckboxList(new Spec_MultiChoiceInfo(mappedChoices));
79
- }
80
- else {
81
- return Spec_FieldType_Radio(new Spec_SingleChoiceInfo(mappedChoices));
82
- }
72
+ return Spec_FieldType_CheckboxList(new Spec_MultiChoiceInfo(mappedChoices));
83
73
  case 41:
84
- if (normalizeChoiceScores(sort<int64>(map<CoreMRChoice, int64>((c_1: CoreMRChoice): int64 => c_1.Score, choices), {
85
- Compare: compare,
86
- }))[1]) {
87
- return Spec_FieldType_CheckboxList(new Spec_MultiChoiceInfo(mappedChoices));
88
- }
89
- else {
90
- return Spec_FieldType_Radio(new Spec_SingleChoiceInfo(mappedChoices));
91
- }
74
+ return Spec_FieldType_CheckboxList(new Spec_MultiChoiceInfo(mappedChoices));
92
75
  case 50:
93
76
  return Spec_FieldType_Date(new Spec_TextInfo(undefined));
94
77
  case 51:
@@ -19,6 +19,7 @@ import { op_LeftShift, op_BitwiseOr, int64, fromInt32, toInt64 } from "@fable-or
19
19
  import { toList, FSharpSet } from "@fable-org/fable-library-js/Set.js";
20
20
  import { computeBitmask } from "../../../BitmaskHelpers.js";
21
21
  import { FSharpMap, ofList, tryFind as tryFind_1 } from "@fable-org/fable-library-js/Map.js";
22
+ import { isMatch } from "@fable-org/fable-library-js/RegExp.js";
22
23
  import { Operators_FailurePattern } from "@fable-org/fable-library-js/FSharp.Core.js";
23
24
 
24
25
  export class ExtractedVitals extends Record implements IEquatable<ExtractedVitals>, IComparable<ExtractedVitals> {
@@ -418,8 +419,17 @@ function fieldToAnswers(field: Spec_FormField$1<Spec_FieldType_$union>, vitalsId
418
419
  return singleton(new CoreMRAnswer(anchor.Sequence, (((valStr === "yes") ? true : (valStr === "true")) ? true : (valStr === "1")) ? (1n) : (2n), supportsOptionalNotes(anchor) ? answer.Documentation : undefined));
419
420
  }
420
421
  case 50:
421
- case 51:
422
422
  case 60:
423
+ if (isNullOrWhiteSpace(answer.Value)) {
424
+ return empty<CoreMRAnswer>();
425
+ }
426
+ else {
427
+ if (!(isMatch(/^\d{4}-\d{2}-\d{2}$/gu, answer.Value) ? true : isMatch(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/gu, answer.Value))) {
428
+ throw new Error(`🚨 INVALID DATE FORMAT for ItemTypeId ${anchor.ItemTypeId} field ${anchor.FieldKey}: '${answer.Value}' — expected ISO format (YYYY-MM-DD or YYYY-MM-DDTHH:mm). This is a DATA INTEGRITY violation.`);
429
+ }
430
+ return singleton(new CoreMRAnswer(anchor.Sequence, 0n, supportsTextContent(anchor) ? answer.Value : undefined));
431
+ }
432
+ case 51:
423
433
  return singleton(new CoreMRAnswer(anchor.Sequence, 0n, supportsTextContent(anchor) ? answer.Value : undefined));
424
434
  case 61:
425
435
  return empty<CoreMRAnswer>();
@@ -461,9 +471,10 @@ function fieldToAnswers(field: Spec_FormField$1<Spec_FieldType_$union>, vitalsId
461
471
  case 31:
462
472
  return singleton(new CoreMRAnswer(anchor.Sequence, 2n, undefined));
463
473
  case 50:
464
- case 51:
465
474
  case 60:
466
475
  return empty<CoreMRAnswer>();
476
+ case 51:
477
+ return empty<CoreMRAnswer>();
467
478
  case 61:
468
479
  return empty<CoreMRAnswer>();
469
480
  case 110:
@@ -0,0 +1,160 @@
1
+ import { Record, Union } from "@fable-org/fable-library-js/Types.js";
2
+ import { list_type, record_type, int32_type, option_type, string_type, union_type, TypeInfo } from "@fable-org/fable-library-js/Reflection.js";
3
+ import { Option } from "@fable-org/fable-library-js/Option.js";
4
+ import { int32 } from "@fable-org/fable-library-js/Int32.js";
5
+ import { IComparable, IEquatable } from "@fable-org/fable-library-js/Util.js";
6
+ import { FSharpList } from "@fable-org/fable-library-js/List.js";
7
+
8
+ export type AllergyCategory_$union =
9
+ | AllergyCategory<0>
10
+ | AllergyCategory<1>
11
+ | AllergyCategory<2>
12
+ | AllergyCategory<3>
13
+
14
+ export type AllergyCategory_$cases = {
15
+ 0: ["Drug", []],
16
+ 1: ["Food", []],
17
+ 2: ["Environmental", []],
18
+ 3: ["Custom", []]
19
+ }
20
+
21
+ export function AllergyCategory_Drug() {
22
+ return new AllergyCategory<0>(0, []);
23
+ }
24
+
25
+ export function AllergyCategory_Food() {
26
+ return new AllergyCategory<1>(1, []);
27
+ }
28
+
29
+ export function AllergyCategory_Environmental() {
30
+ return new AllergyCategory<2>(2, []);
31
+ }
32
+
33
+ export function AllergyCategory_Custom() {
34
+ return new AllergyCategory<3>(3, []);
35
+ }
36
+
37
+ export class AllergyCategory<Tag extends keyof AllergyCategory_$cases> extends Union<Tag, AllergyCategory_$cases[Tag][0]> {
38
+ constructor(readonly tag: Tag, readonly fields: AllergyCategory_$cases[Tag][1]) {
39
+ super();
40
+ }
41
+ cases() {
42
+ return ["Drug", "Food", "Environmental", "Custom"];
43
+ }
44
+ }
45
+
46
+ export function AllergyCategory_$reflection(): TypeInfo {
47
+ return union_type("F1.Studio.Integrations.OpenFda.AllergyCategory", [], AllergyCategory, () => [[], [], [], []]);
48
+ }
49
+
50
+ export class OpenFdaSearchResult extends Record implements IEquatable<OpenFdaSearchResult>, IComparable<OpenFdaSearchResult> {
51
+ readonly Name: string;
52
+ readonly GenericName: Option<string>;
53
+ readonly SubstanceName: string;
54
+ readonly Category: AllergyCategory_$union;
55
+ readonly Source: string;
56
+ readonly NdcCode: Option<string>;
57
+ readonly Manufacturer: Option<string>;
58
+ readonly Route: Option<string>;
59
+ readonly DosageForm: Option<string>;
60
+ readonly Strength: Option<string>;
61
+ readonly ReportCount: Option<int32>;
62
+ constructor(Name: string, GenericName: Option<string>, SubstanceName: string, Category: AllergyCategory_$union, Source: string, NdcCode: Option<string>, Manufacturer: Option<string>, Route: Option<string>, DosageForm: Option<string>, Strength: Option<string>, ReportCount: Option<int32>) {
63
+ super();
64
+ this.Name = Name;
65
+ this.GenericName = GenericName;
66
+ this.SubstanceName = SubstanceName;
67
+ this.Category = Category;
68
+ this.Source = Source;
69
+ this.NdcCode = NdcCode;
70
+ this.Manufacturer = Manufacturer;
71
+ this.Route = Route;
72
+ this.DosageForm = DosageForm;
73
+ this.Strength = Strength;
74
+ this.ReportCount = ReportCount;
75
+ }
76
+ }
77
+
78
+ export function OpenFdaSearchResult_$reflection(): TypeInfo {
79
+ return record_type("F1.Studio.Integrations.OpenFda.OpenFdaSearchResult", [], OpenFdaSearchResult, () => [["Name", string_type], ["GenericName", option_type(string_type)], ["SubstanceName", string_type], ["Category", AllergyCategory_$reflection()], ["Source", string_type], ["NdcCode", option_type(string_type)], ["Manufacturer", option_type(string_type)], ["Route", option_type(string_type)], ["DosageForm", option_type(string_type)], ["Strength", option_type(string_type)], ["ReportCount", option_type(int32_type)]]);
80
+ }
81
+
82
+ export class CountResult extends Record implements IEquatable<CountResult>, IComparable<CountResult> {
83
+ readonly Term: string;
84
+ readonly Count: int32;
85
+ constructor(Term: string, Count: int32) {
86
+ super();
87
+ this.Term = Term;
88
+ this.Count = (Count | 0);
89
+ }
90
+ }
91
+
92
+ export function CountResult_$reflection(): TypeInfo {
93
+ return record_type("F1.Studio.Integrations.OpenFda.CountResult", [], CountResult, () => [["Term", string_type], ["Count", int32_type]]);
94
+ }
95
+
96
+ export class LabelWarnings extends Record implements IEquatable<LabelWarnings>, IComparable<LabelWarnings> {
97
+ readonly Contraindications: Option<string>;
98
+ readonly Warnings: Option<string>;
99
+ readonly AdverseReactions: Option<string>;
100
+ constructor(Contraindications: Option<string>, Warnings: Option<string>, AdverseReactions: Option<string>) {
101
+ super();
102
+ this.Contraindications = Contraindications;
103
+ this.Warnings = Warnings;
104
+ this.AdverseReactions = AdverseReactions;
105
+ }
106
+ }
107
+
108
+ export function LabelWarnings_$reflection(): TypeInfo {
109
+ return record_type("F1.Studio.Integrations.OpenFda.LabelWarnings", [], LabelWarnings, () => [["Contraindications", option_type(string_type)], ["Warnings", option_type(string_type)], ["AdverseReactions", option_type(string_type)]]);
110
+ }
111
+
112
+ export class AllergenInsights extends Record implements IEquatable<AllergenInsights>, IComparable<AllergenInsights> {
113
+ readonly Reactions: FSharpList<CountResult>;
114
+ readonly TotalEvents: int32;
115
+ readonly LabelWarnings: Option<LabelWarnings>;
116
+ constructor(Reactions: FSharpList<CountResult>, TotalEvents: int32, LabelWarnings: Option<LabelWarnings>) {
117
+ super();
118
+ this.Reactions = Reactions;
119
+ this.TotalEvents = (TotalEvents | 0);
120
+ this.LabelWarnings = LabelWarnings;
121
+ }
122
+ }
123
+
124
+ export function AllergenInsights_$reflection(): TypeInfo {
125
+ return record_type("F1.Studio.Integrations.OpenFda.AllergenInsights", [], AllergenInsights, () => [["Reactions", list_type(CountResult_$reflection())], ["TotalEvents", int32_type], ["LabelWarnings", option_type(LabelWarnings_$reflection())]]);
126
+ }
127
+
128
+ export class OpenFdaSearchResponse extends Record implements IEquatable<OpenFdaSearchResponse>, IComparable<OpenFdaSearchResponse> {
129
+ readonly Results: FSharpList<OpenFdaSearchResult>;
130
+ readonly Query: string;
131
+ readonly CachedAt: Option<string>;
132
+ constructor(Results: FSharpList<OpenFdaSearchResult>, Query: string, CachedAt: Option<string>) {
133
+ super();
134
+ this.Results = Results;
135
+ this.Query = Query;
136
+ this.CachedAt = CachedAt;
137
+ }
138
+ }
139
+
140
+ export function OpenFdaSearchResponse_$reflection(): TypeInfo {
141
+ return record_type("F1.Studio.Integrations.OpenFda.OpenFdaSearchResponse", [], OpenFdaSearchResponse, () => [["Results", list_type(OpenFdaSearchResult_$reflection())], ["Query", string_type], ["CachedAt", option_type(string_type)]]);
142
+ }
143
+
144
+ export class OpenFdaInsightsResponse extends Record implements IEquatable<OpenFdaInsightsResponse>, IComparable<OpenFdaInsightsResponse> {
145
+ readonly Insights: AllergenInsights;
146
+ readonly SubstanceName: string;
147
+ readonly CachedAt: Option<string>;
148
+ constructor(Insights: AllergenInsights, SubstanceName: string, CachedAt: Option<string>) {
149
+ super();
150
+ this.Insights = Insights;
151
+ this.SubstanceName = SubstanceName;
152
+ this.CachedAt = CachedAt;
153
+ }
154
+ }
155
+
156
+ export function OpenFdaInsightsResponse_$reflection(): TypeInfo {
157
+ return record_type("F1.Studio.Integrations.OpenFda.OpenFdaInsightsResponse", [], OpenFdaInsightsResponse, () => [["Insights", AllergenInsights_$reflection()], ["SubstanceName", string_type], ["CachedAt", option_type(string_type)]]);
158
+ }
159
+
160
+ //# sourceMappingURL=OpenFdaTypes.ts.map
@@ -4,6 +4,7 @@ import { Form_enhancedBMIConverter, Form_pluginConfig as Form_pluginConfig_1 } f
4
4
  import { Form_likertConverter, Form_pluginConfig as Form_pluginConfig_2 } from "./plugins/likert/src/LikertField.js";
5
5
  import { Form_signatureConverter, Form_pluginConfig as Form_pluginConfig_3 } from "./plugins/signature/src/SignatureField.js";
6
6
  import { Form_enhancedDemographicsConverter, Form_pluginConfig as Form_pluginConfig_4 } from "./plugins/demographics/src/DemographicsField.js";
7
+ import { Form_enhancedAllergyConverter, Form_pluginConfig as Form_pluginConfig_5 } from "./plugins/allergyfinder/src/AllergyFinderField.js";
7
8
 
8
9
  function registerAllPlugins(): void {
9
10
  PluginValueRegistry_register(Form_pluginConfig.PluginId, Form_enhancedVitalsConverter);
@@ -11,6 +12,7 @@ function registerAllPlugins(): void {
11
12
  PluginValueRegistry_register(Form_pluginConfig_2.PluginId, Form_likertConverter);
12
13
  PluginValueRegistry_register(Form_pluginConfig_3.PluginId, Form_signatureConverter);
13
14
  PluginValueRegistry_register(Form_pluginConfig_4.PluginId, Form_enhancedDemographicsConverter);
15
+ PluginValueRegistry_register(Form_pluginConfig_5.PluginId, Form_enhancedAllergyConverter);
14
16
  }
15
17
 
16
18
  registerAllPlugins();
@@ -4,14 +4,14 @@ import { Result_Bind, Result_Map, FSharpResult$2_Ok, FSharpResult$2_Error, FShar
4
4
  import { tryParse as tryParse_2 } from "@fable-org/fable-library-js/Guid.js";
5
5
  import { toString as toString_12, FSharpRef } from "@fable-org/fable-library-js/Types.js";
6
6
  import { float32 as float32_1, uint32 as uint32_1, int32, uint16 as uint16_1, int16 as int16_1, uint8, tryParse as tryParse_3, int8, float64 } from "@fable-org/fable-library-js/Int32.js";
7
- import { parse, fromInt32, toUInt64, uint64 as uint64_1, int64 as int64_1, fromFloat64, toInt64, toFloat64 } from "@fable-org/fable-library-js/BigInt.js";
7
+ import { parse, fromInt32, uint64 as uint64_1, toUInt64, int64 as int64_1, fromFloat64, toInt64, toFloat64 } from "@fable-org/fable-library-js/BigInt.js";
8
8
  import { tryParse as tryParse_4 } from "@fable-org/fable-library-js/Long.js";
9
9
  import { tryParse as tryParse_5, decimal as decimal_1 } from "@fable-org/fable-library-js/Decimal.js";
10
10
  import Decimal from "@fable-org/fable-library-js/Decimal.js";
11
11
  import { toUniversalTime, tryParse as tryParse_6, minValue } from "@fable-org/fable-library-js/Date.js";
12
12
  import { tryParse as tryParse_7, minValue as minValue_1 } from "@fable-org/fable-library-js/DateOffset.js";
13
13
  import { tryParse as tryParse_8 } from "@fable-org/fable-library-js/TimeSpan.js";
14
- import { map as map_4, value as value_45, defaultArg, some, Option } from "@fable-org/fable-library-js/Option.js";
14
+ import { map as map_4, value as value_44, defaultArg, some, Option } from "@fable-org/fable-library-js/Option.js";
15
15
  import { ofArray, toArray, map as map_1, length, singleton, append as append_1, tail as tail_1, head as head_1, isEmpty, ofSeq, empty, reverse, fold, FSharpList, tryLast, cons } from "@fable-org/fable-library-js/List.js";
16
16
  import { IComparable, int16ToString, numberHash, compare, comparePrimitives, uncurry3, defaultOf, uncurry2, int32ToString } from "@fable-org/fable-library-js/Util.js";
17
17
  import { map as map_2, tryFind, foldBack, fill, setItem, fold as fold_1, item } from "@fable-org/fable-library-js/Array.js";
@@ -306,64 +306,45 @@ export const uint32 = (path: string): ((arg0: any) => FSharpResult$2_$union<uint
306
306
  }
307
307
  });
308
308
 
309
- export function int64(path: string, value_1: any): FSharpResult$2_$union<int64_1, [string, ErrorReason_$union]> {
310
- if (typeof value_1 === "number") {
311
- const floatVal: float64 = value_1;
312
- if ((floatVal >= toFloat64(-9223372036854775808n)) && (floatVal <= toFloat64(9223372036854775807n))) {
313
- return FSharpResult$2_Ok<int64_1, [string, ErrorReason_$union]>(toInt64(fromFloat64(floatVal)));
314
- }
315
- else {
316
- return FSharpResult$2_Error<int64_1, [string, ErrorReason_$union]>([path, ErrorReason_BadPrimitive("an int64", value_1)] as [string, ErrorReason_$union]);
317
- }
309
+ export const int64 = (path: string): ((arg0: any) => FSharpResult$2_$union<int64_1, [string, ErrorReason_$union]>) => ((value_2: any): FSharpResult$2_$union<int64_1, [string, ErrorReason_$union]> => {
310
+ const path_1: string = path;
311
+ const value_3: any = value_2;
312
+ if ((typeof value_3) === "number") {
313
+ const value_1_1: float64 = value_3;
314
+ return (isFinite(value_1_1) && Math.floor(value_1_1) === value_1_1) ? (((toFloat64(-9223372036854775808n) <= value_1_1) && (value_1_1 <= toFloat64(9223372036854775807n))) ? FSharpResult$2_Ok<int64_1, [string, ErrorReason_$union]>(toInt64(fromFloat64(value_1_1))) : FSharpResult$2_Error<int64_1, [string, ErrorReason_$union]>([path_1, ErrorReason_BadPrimitiveExtra("an int64", value_1_1, "Value was either too large or too small for an int64")] as [string, ErrorReason_$union])) : FSharpResult$2_Error<int64_1, [string, ErrorReason_$union]>([path_1, ErrorReason_BadPrimitiveExtra("an int64", value_1_1, "Value is not an integral value")] as [string, ErrorReason_$union]);
318
315
  }
319
- else if (typeof value_1 === "string") {
316
+ else if (typeof value_3 === "string") {
320
317
  let matchValue: [boolean, int64_1];
321
318
  let outArg: int64_1 = 0n;
322
- matchValue = ([tryParse_4(value_1, 511, false, 64, new FSharpRef<int64_1>((): int64_1 => outArg, (v: int64_1): void => {
319
+ matchValue = ([tryParse_4(value_3, 511, false, 64, new FSharpRef<int64_1>((): int64_1 => outArg, (v: int64_1): void => {
323
320
  outArg = v;
324
321
  })), outArg] as [boolean, int64_1]);
325
- if (matchValue[0]) {
326
- return FSharpResult$2_Ok<int64_1, [string, ErrorReason_$union]>(matchValue[1]);
327
- }
328
- else {
329
- return FSharpResult$2_Error<int64_1, [string, ErrorReason_$union]>([path, ErrorReason_BadPrimitive("an int64", value_1)] as [string, ErrorReason_$union]);
330
- }
322
+ return matchValue[0] ? FSharpResult$2_Ok<int64_1, [string, ErrorReason_$union]>(matchValue[1]) : FSharpResult$2_Error<int64_1, [string, ErrorReason_$union]>([path_1, ErrorReason_BadPrimitive("an int64", value_3)] as [string, ErrorReason_$union]);
331
323
  }
332
324
  else {
333
- return FSharpResult$2_Error<int64_1, [string, ErrorReason_$union]>([path, ErrorReason_BadPrimitive("an int64", value_1)] as [string, ErrorReason_$union]);
325
+ return FSharpResult$2_Error<int64_1, [string, ErrorReason_$union]>([path_1, ErrorReason_BadPrimitive("an int64", value_3)] as [string, ErrorReason_$union]);
334
326
  }
335
- }
327
+ });
336
328
 
337
- export function uint64(path: string, value_1: any): FSharpResult$2_$union<uint64_1, [string, ErrorReason_$union]> {
338
- if (typeof value_1 === "bigint") {
339
- return FSharpResult$2_Ok<uint64_1, [string, ErrorReason_$union]>(value_1);
340
- }
341
- else if (typeof value_1 === "number") {
342
- const floatVal: float64 = value_1;
343
- if (((floatVal >= 0) && (floatVal <= toFloat64(18446744073709551615n))) && (floatVal === Math.floor(floatVal))) {
344
- return FSharpResult$2_Ok<uint64_1, [string, ErrorReason_$union]>(toUInt64(fromFloat64(floatVal)));
345
- }
346
- else {
347
- return FSharpResult$2_Error<uint64_1, [string, ErrorReason_$union]>([path, ErrorReason_BadPrimitive("an uint64", value_1)] as [string, ErrorReason_$union]);
348
- }
329
+ export const uint64 = (path: string): ((arg0: any) => FSharpResult$2_$union<uint64_1, [string, ErrorReason_$union]>) => ((value_2: any): FSharpResult$2_$union<uint64_1, [string, ErrorReason_$union]> => {
330
+ const path_1: string = path;
331
+ const value_3: any = value_2;
332
+ if ((typeof value_3) === "number") {
333
+ const value_1_1: float64 = value_3;
334
+ return (isFinite(value_1_1) && Math.floor(value_1_1) === value_1_1) ? (((toFloat64(0n) <= value_1_1) && (value_1_1 <= toFloat64(18446744073709551615n))) ? FSharpResult$2_Ok<uint64_1, [string, ErrorReason_$union]>(toUInt64(fromFloat64(value_1_1))) : FSharpResult$2_Error<uint64_1, [string, ErrorReason_$union]>([path_1, ErrorReason_BadPrimitiveExtra("an uint64", value_1_1, "Value was either too large or too small for an uint64")] as [string, ErrorReason_$union])) : FSharpResult$2_Error<uint64_1, [string, ErrorReason_$union]>([path_1, ErrorReason_BadPrimitiveExtra("an uint64", value_1_1, "Value is not an integral value")] as [string, ErrorReason_$union]);
349
335
  }
350
- else if (typeof value_1 === "string") {
336
+ else if (typeof value_3 === "string") {
351
337
  let matchValue: [boolean, uint64_1];
352
338
  let outArg: uint64_1 = 0n;
353
- matchValue = ([tryParse_4(value_1, 511, true, 64, new FSharpRef<uint64_1>((): uint64_1 => outArg, (v: uint64_1): void => {
339
+ matchValue = ([tryParse_4(value_3, 511, true, 64, new FSharpRef<uint64_1>((): uint64_1 => outArg, (v: uint64_1): void => {
354
340
  outArg = v;
355
341
  })), outArg] as [boolean, uint64_1]);
356
- if (matchValue[0]) {
357
- return FSharpResult$2_Ok<uint64_1, [string, ErrorReason_$union]>(matchValue[1]);
358
- }
359
- else {
360
- return FSharpResult$2_Error<uint64_1, [string, ErrorReason_$union]>([path, ErrorReason_BadPrimitive("an uint64", value_1)] as [string, ErrorReason_$union]);
361
- }
342
+ return matchValue[0] ? FSharpResult$2_Ok<uint64_1, [string, ErrorReason_$union]>(matchValue[1]) : FSharpResult$2_Error<uint64_1, [string, ErrorReason_$union]>([path_1, ErrorReason_BadPrimitive("an uint64", value_3)] as [string, ErrorReason_$union]);
362
343
  }
363
344
  else {
364
- return FSharpResult$2_Error<uint64_1, [string, ErrorReason_$union]>([path, ErrorReason_BadPrimitive("an uint64", value_1)] as [string, ErrorReason_$union]);
345
+ return FSharpResult$2_Error<uint64_1, [string, ErrorReason_$union]>([path_1, ErrorReason_BadPrimitive("an uint64", value_3)] as [string, ErrorReason_$union]);
365
346
  }
366
- }
347
+ });
367
348
 
368
349
  export function bigint(path: string, value_1: any): FSharpResult$2_$union<bigint, [string, ErrorReason_$union]> {
369
350
  if ((typeof value_1) === "number") {
@@ -596,7 +577,7 @@ export function optionalAt<value>(fieldNames: FSharpList<string>, decoder: ((arg
596
577
  }
597
578
  }
598
579
  else {
599
- return value_45(_arg[2]);
580
+ return value_44(_arg[2]);
600
581
  }
601
582
  }
602
583
 
@@ -645,7 +626,7 @@ export function at<value>(fieldNames: FSharpList<string>, decoder: ((arg0: strin
645
626
  return decoder(_arg[0], _arg[1]);
646
627
  }
647
628
  else {
648
- return value_45(_arg[2]);
629
+ return value_44(_arg[2]);
649
630
  }
650
631
  }
651
632
 
@@ -1668,7 +1649,7 @@ function mixedArray(offset: int32, decoders: ((arg0: string) => ((arg0: any) =>
1668
1649
  function makeUnion(extra: FSharpMap<string, FSharpRef<((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))>>, caseStrategy: CaseStrategy_$union, t: any, name: string, path: string, values: any[]): FSharpResult$2_$union<any, [string, ErrorReason_$union]> {
1669
1650
  const uci: Option<any> = tryFind<any>((x: any): boolean => (name_3(x) === name), getUnionCases(t, true));
1670
1651
  if (uci != null) {
1671
- const uci_1: any = value_45(uci);
1652
+ const uci_1: any = value_44(uci);
1672
1653
  const decoders: ((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))[] = map_2<any, ((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))>((fi: any): ((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>)) => autoDecoder(extra, caseStrategy, false, fi[1]), getUnionCaseFields(uci_1));
1673
1654
  return Result_Map<FSharpList<any>, any, [string, ErrorReason_$union]>((values_2: FSharpList<any>): any => makeUnion_1(uci_1, toArray<any>(values_2), true), ((decoders.length === 0) && (values.length <= 1)) ? FSharpResult$2_Ok<FSharpList<any>, [string, ErrorReason_$union]>(empty<any>()) : mixedArray(1, decoders, path, values));
1674
1655
  }
@@ -1897,19 +1878,21 @@ function autoDecoder(extra: FSharpMap<string, FSharpRef<((arg0: string) => ((arg
1897
1878
  case "System.Single":
1898
1879
  return (path_28: string): ((arg0: any) => FSharpResult$2_$union<float32_1, [string, ErrorReason_$union]>) => ((value_37: any): FSharpResult$2_$union<float32_1, [string, ErrorReason_$union]> => float32(path_28, value_37));
1899
1880
  case "System.Int64":
1900
- return (path_29: string): ((arg0: any) => FSharpResult$2_$union<int64_1, [string, ErrorReason_$union]>) => ((value_38: any): FSharpResult$2_$union<int64_1, [string, ErrorReason_$union]> => int64(path_29, value_38));
1881
+ return int64;
1901
1882
  case "System.UInt64":
1902
- return (path_30: string): ((arg0: any) => FSharpResult$2_$union<uint64_1, [string, ErrorReason_$union]>) => ((value_39: any): FSharpResult$2_$union<uint64_1, [string, ErrorReason_$union]> => uint64(path_30, value_39));
1883
+ return uint64;
1903
1884
  case "System.Numerics.BigInteger":
1904
- return (path_31: string): ((arg0: any) => FSharpResult$2_$union<bigint, [string, ErrorReason_$union]>) => ((value_40: any): FSharpResult$2_$union<bigint, [string, ErrorReason_$union]> => bigint(path_31, value_40));
1885
+ return (path_29: string): ((arg0: any) => FSharpResult$2_$union<bigint, [string, ErrorReason_$union]>) => ((value_38: any): FSharpResult$2_$union<bigint, [string, ErrorReason_$union]> => bigint(path_29, value_38));
1886
+ case "System.Decimal":
1887
+ return (path_30: string): ((arg0: any) => FSharpResult$2_$union<decimal_1, [string, ErrorReason_$union]>) => ((value_39: any): FSharpResult$2_$union<decimal_1, [string, ErrorReason_$union]> => decimal(path_30, value_39));
1905
1888
  case "System.DateTime":
1906
- return (path_32: string): ((arg0: any) => FSharpResult$2_$union<Date, [string, ErrorReason_$union]>) => ((value_41: any): FSharpResult$2_$union<Date, [string, ErrorReason_$union]> => datetimeUtc(path_32, value_41));
1889
+ return (path_31: string): ((arg0: any) => FSharpResult$2_$union<Date, [string, ErrorReason_$union]>) => ((value_40: any): FSharpResult$2_$union<Date, [string, ErrorReason_$union]> => datetimeUtc(path_31, value_40));
1907
1890
  case "System.DateTimeOffset":
1908
- return (path_33: string): ((arg0: any) => FSharpResult$2_$union<Date, [string, ErrorReason_$union]>) => ((value_42: any): FSharpResult$2_$union<Date, [string, ErrorReason_$union]> => datetimeOffset(path_33, value_42));
1891
+ return (path_32: string): ((arg0: any) => FSharpResult$2_$union<Date, [string, ErrorReason_$union]>) => ((value_41: any): FSharpResult$2_$union<Date, [string, ErrorReason_$union]> => datetimeOffset(path_32, value_41));
1909
1892
  case "System.TimeSpan":
1910
- return (path_34: string): ((arg0: any) => FSharpResult$2_$union<number, [string, ErrorReason_$union]>) => ((value_43: any): FSharpResult$2_$union<number, [string, ErrorReason_$union]> => timespan(path_34, value_43));
1893
+ return (path_33: string): ((arg0: any) => FSharpResult$2_$union<number, [string, ErrorReason_$union]>) => ((value_42: any): FSharpResult$2_$union<number, [string, ErrorReason_$union]> => timespan(path_33, value_42));
1911
1894
  case "System.Guid":
1912
- return (path_35: string): ((arg0: any) => FSharpResult$2_$union<string, [string, ErrorReason_$union]>) => ((value_44: any): FSharpResult$2_$union<string, [string, ErrorReason_$union]> => guid(path_35, value_44));
1895
+ return (path_34: string): ((arg0: any) => FSharpResult$2_$union<string, [string, ErrorReason_$union]>) => ((value_43: any): FSharpResult$2_$union<string, [string, ErrorReason_$union]> => guid(path_34, value_43));
1913
1896
  case "System.Object":
1914
1897
  return (_arg_6: string): ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>) => (FSharpResult$2_Ok);
1915
1898
  default:
@@ -1918,14 +1901,14 @@ function autoDecoder(extra: FSharpMap<string, FSharpRef<((arg0: string) => ((arg
1918
1901
  }
1919
1902
  }
1920
1903
  else {
1921
- const decoderRef: FSharpRef<((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))> = value_45(matchValue);
1904
+ const decoderRef: FSharpRef<((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))> = value_44(matchValue);
1922
1905
  return (path: string): ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>) => ((value_1: any): FSharpResult$2_$union<any, [string, ErrorReason_$union]> => decoderRef.contents(path)(value_1));
1923
1906
  }
1924
1907
  }
1925
1908
 
1926
1909
  function makeExtra(extra: Option<ExtraCoders>): FSharpMap<string, FSharpRef<((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))>> {
1927
1910
  if (extra != null) {
1928
- return map_3<string, [((arg0: any) => any), ((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))], FSharpRef<((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))>>((_arg: string, tupledArg: [((arg0: any) => any), ((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))]): FSharpRef<((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))> => (new FSharpRef<((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))>(tupledArg[1])), value_45(extra).Coders);
1911
+ return map_3<string, [((arg0: any) => any), ((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))], FSharpRef<((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))>>((_arg: string, tupledArg: [((arg0: any) => any), ((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))]): FSharpRef<((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))> => (new FSharpRef<((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))>(tupledArg[1])), value_44(extra).Coders);
1929
1912
  }
1930
1913
  else {
1931
1914
  return empty_1<string, FSharpRef<((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))>>({