@f1studio/form-spec 5.0.0-alpha.128 → 5.0.0-alpha.129
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.d.ts +1 -1
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.d.ts.map +1 -1
- package/FormSpec.FS/Interop/FormSpec.Api.Helpers.d.ts +3 -3
- package/FormSpec.FS/Interop/FormSpec.Api.Helpers.d.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/BlueprintValidation.js +2 -2
- package/FormSpec.TS/FormSpec.FS/BlueprintValidation.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/BlueprintValidation.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.js +2 -2
- package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js +2 -2
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js +21 -20
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js +20 -20
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.js +21 -21
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.js +105 -41
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.js +214 -51
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.js +8 -8
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Values.Api.Option.js +12 -12
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Values.Api.Option.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Values.Api.Option.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Migrator.js +2 -2
- package/FormSpec.TS/FormSpec.FS/Migrator.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Migrator.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/PathwayExecutor.js +4 -4
- package/FormSpec.TS/FormSpec.FS/PathwayExecutor.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/PathwayExecutor.ts.map +1 -1
- package/FormSpec.TS/{fable_modules/Thoth.Json.10.4.1/Decode.fs.js → Thoth.Json/packages/Thoth.Json/Decode.js} +119 -113
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Decode.js.map +1 -0
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Decode.ts.map +1 -0
- package/FormSpec.TS/{fable_modules/Thoth.Json.10.4.1/Encode.fs.js → Thoth.Json/packages/Thoth.Json/Encode.js} +7 -7
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Encode.js.map +1 -0
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Encode.ts.map +1 -0
- package/FormSpec.TS/{fable_modules/Thoth.Json.10.4.1/Extra.fs.js → Thoth.Json/packages/Thoth.Json/Extra.js} +4 -4
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Extra.js.map +1 -0
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Extra.ts.map +1 -0
- package/FormSpec.TS/{fable_modules/Thoth.Json.10.4.1/Types.fs.js → Thoth.Json/packages/Thoth.Json/Types.js} +2 -2
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Types.js.map +1 -0
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Types.ts.map +1 -0
- package/FormSpec.TS/fable_modules/project_cracked.json +1 -1
- package/README.md +7 -7
- package/{fable_modules/Thoth.Json.10.4.1/Decode.fs.d.ts → Thoth.Json/packages/Thoth.Json/Decode.d.ts} +2 -2
- package/Thoth.Json/packages/Thoth.Json/Decode.d.ts.map +1 -0
- package/{fable_modules/Thoth.Json.10.4.1/Encode.fs.d.ts → Thoth.Json/packages/Thoth.Json/Encode.d.ts} +2 -2
- package/Thoth.Json/packages/Thoth.Json/Encode.d.ts.map +1 -0
- package/Thoth.Json/packages/Thoth.Json/Extra.d.ts +3 -0
- package/Thoth.Json/packages/Thoth.Json/Extra.d.ts.map +1 -0
- package/{fable_modules/Thoth.Json.10.4.1/Types.fs.d.ts → Thoth.Json/packages/Thoth.Json/Types.d.ts} +1 -1
- package/Thoth.Json/packages/Thoth.Json/Types.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/FormSpec.FS/BlueprintValidation.ts +1 -1
- package/src/FormSpec.FS/FormSpecHelpers.ts +1 -1
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts +1 -1
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts +12 -11
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts +4 -4
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.ts +3 -3
- package/src/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.ts +95 -16
- package/src/FormSpec.FS/Interop/FormSpec.Api.Helpers.ts +182 -57
- package/src/FormSpec.FS/Interop/FormSpec.Api.Option.ts +2 -2
- package/src/FormSpec.FS/Interop/FormSpec.Values.Api.Option.ts +2 -2
- package/src/FormSpec.FS/Migrator.ts +1 -1
- package/src/FormSpec.FS/PathwayExecutor.ts +1 -1
- package/src/Thoth.Json/packages/Thoth.Json/Decode.ts +1938 -0
- package/src/Thoth.Json/packages/Thoth.Json/Encode.ts +475 -0
- package/src/Thoth.Json/packages/Thoth.Json/Extra.ts +11 -0
- package/src/Thoth.Json/packages/Thoth.Json/Types.ts +176 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Decode.fs +0 -1768
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Decode.fs.js.map +0 -1
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Decode.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs +0 -811
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs.js.map +0 -1
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Extra.fs +0 -47
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Extra.fs.js.map +0 -1
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Extra.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Thoth.Json.fableproj +0 -34
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Types.fs +0 -68
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Types.fs.js.map +0 -1
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Types.fs.ts.map +0 -1
- package/fable_modules/Thoth.Json.10.4.1/Decode.fs.d.ts.map +0 -1
- package/fable_modules/Thoth.Json.10.4.1/Encode.fs.d.ts.map +0 -1
- package/fable_modules/Thoth.Json.10.4.1/Extra.fs.d.ts +0 -3
- package/fable_modules/Thoth.Json.10.4.1/Extra.fs.d.ts.map +0 -1
- package/fable_modules/Thoth.Json.10.4.1/Types.fs.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Encode.d.ts","sourceRoot":"","sources":["../../../../FormSpec.TS/Thoth.Json/packages/Thoth.Json/Encode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAA0B,MAAM,wCAAwC,CAAC;AAEtG,OAAO,EAAgB,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAqC,SAAS,EAAU,MAAM,oCAAoC,CAAC;AAC1G,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,KAAK,IAAI,OAAO,EAA0B,MAAM,uCAAuC,CAAC;AAGrH,OAAO,EAAiC,MAAM,EAAsC,MAAM,uCAAuC,CAAC;AAClI,OAAO,EAAwD,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAEnH,OAAO,EAAc,QAAQ,EAAmR,MAAM,2CAA2C,CAAC;AAElW,OAA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AAmB,EAAE,KAAK,CAAC,EAAE,WAAW,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC,CAKvK;AAED,wBAAgB,kCAAkC,CAAC,CAAC,EAAE,GAAG,EAAE,YAAY,CAAC,EAAE,mBAAmB,EAAE,KAAK,CAAC,EAAE,WAAW,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC,CAIjK;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,GAAG,MAAM,CAEvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Extra.d.ts","sourceRoot":"","sources":["../../../../FormSpec.TS/Thoth.Json/packages/Thoth.Json/Extra.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAsB,MAAM,YAAY,CAAC;AAE7D,eAAO,MAAM,KAAK,EAAE,WAEjB,CAAC"}
|
package/{fable_modules/Thoth.Json.10.4.1/Types.fs.d.ts → Thoth.Json/packages/Thoth.Json/Types.d.ts}
RENAMED
|
@@ -63,4 +63,4 @@ export declare const Util_CachedEncoders: Util_Cache$1<((arg0: any) => any)>;
|
|
|
63
63
|
export declare const Util_CachedDecoders: Util_Cache$1<((arg0: string) => ((arg0: any) => FSharpResult$2_$union<any, [string, ErrorReason_$union]>))>;
|
|
64
64
|
export declare function Util_Casing_lowerFirst(str: string): string;
|
|
65
65
|
export declare function Util_Casing_convert(caseStrategy: CaseStrategy_$union, fieldName: string): string;
|
|
66
|
-
//# sourceMappingURL=Types.
|
|
66
|
+
//# sourceMappingURL=Types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Types.d.ts","sourceRoot":"","sources":["../../../../FormSpec.TS/Thoth.Json/packages/Thoth.Json/Types.ts"],"names":[],"mappings":"AA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AK,qBAAqB,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAK7K;AAED,wBAAgB,uBAAuB,IAAI,QAAQ,CAElD;AAED,qBAAa,YAAY,CAAC,KAAK;IAC3B,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;;CAIvC;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAEjE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,KAAK,YAAY,CAAC,KAAK,CAAC,CAE/D;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,CAc1H;AAED,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC,CAA8C,CAAC;AAElH,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,qBAAqB,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAuH,CAAC;AAEpQ,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAShG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@f1studio/form-spec",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.129",
|
|
4
4
|
"description": "F1 Core - Form specification and types",
|
|
5
5
|
"main": "./FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.js",
|
|
6
6
|
"types": "./FormSpec.FS/Interop/FormSpec.Api.Option.d.ts",
|
|
@@ -6,7 +6,7 @@ import { Spec_FormSpec$1, Spec_MatrixInfo, Spec_MultiChoiceInfo, Spec_SingleChoi
|
|
|
6
6
|
import { int32 } from "@fable-org/fable-library-js/Int32.js";
|
|
7
7
|
import { FSharpResult$2_$union, FSharpResult$2_Ok, FSharpResult$2_Error } from "@fable-org/fable-library-js/Result.js";
|
|
8
8
|
import { FSharpMap, empty as empty_1, add } from "@fable-org/fable-library-js/Map.js";
|
|
9
|
-
import { Auto_generateBoxedEncoder_437914C6, toString } from "../
|
|
9
|
+
import { Auto_generateBoxedEncoder_437914C6, toString } from "../Thoth.Json/packages/Thoth.Json/Encode.js";
|
|
10
10
|
import { list_type, string_type } from "@fable-org/fable-library-js/Reflection.js";
|
|
11
11
|
import { comparePrimitives } from "@fable-org/fable-library-js/Util.js";
|
|
12
12
|
|
|
@@ -8,7 +8,7 @@ import { newGuid } from "@fable-org/fable-library-js/Guid.js";
|
|
|
8
8
|
import { orElse, map as map_1, filter, defaultArg, value as value_2, Option, bind } from "@fable-org/fable-library-js/Option.js";
|
|
9
9
|
import { isNullOrEmpty, join } from "@fable-org/fable-library-js/String.js";
|
|
10
10
|
import { map as map_2, toList as toList_1 } from "@fable-org/fable-library-js/Set.js";
|
|
11
|
-
import { Auto_generateBoxedEncoder_437914C6, toString } from "../
|
|
11
|
+
import { Auto_generateBoxedEncoder_437914C6, toString } from "../Thoth.Json/packages/Thoth.Json/Encode.js";
|
|
12
12
|
import { list_type } from "@fable-org/fable-library-js/Reflection.js";
|
|
13
13
|
import { tryParse } from "@fable-org/fable-library-js/Double.js";
|
|
14
14
|
import { FSharpRef } from "@fable-org/fable-library-js/Types.js";
|
|
@@ -13,7 +13,7 @@ import { List_groupBy } from "@fable-org/fable-library-js/Seq2.js";
|
|
|
13
13
|
import { generateNamespacedFieldKey } from "./CorEMRFieldTypeMapper.js";
|
|
14
14
|
import { nonHeadingItems } from "./CorEMRSectioning.js";
|
|
15
15
|
import { convertTriggersToSinglePathway } from "./CorEMRTriggerConverter.js";
|
|
16
|
-
import { Auto_generateBoxedEncoder_437914C6, toString } from "../../../../
|
|
16
|
+
import { Auto_generateBoxedEncoder_437914C6, toString } from "../../../../Thoth.Json/packages/Thoth.Json/Encode.js";
|
|
17
17
|
import { FSharpResult$2_Ok, FSharpResult$2_$union, FSharpResult$2_Error } from "@fable-org/fable-library-js/Result.js";
|
|
18
18
|
import { FormSpecValidator_validateConversion, ValidationResult } from "./CorEMRFormSpecValidator.js";
|
|
19
19
|
import { buildReport } from "./CorEMRSemanticReportBuilder.js";
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { CoreMRStepMap, CoreMRSourceMap, CoreMRSourceMap_$reflection, CoreMRFieldAnchor, CoreMRFieldAnchor_$reflection, CoreMRMatrixItemAnchor, CoreMRMatrixItemAnchor_$reflection, CoreMRChoiceAnchor, CoreMRChoiceAnchor_$reflection, ValueEncodingInfo, ValueEncodingInfo_$reflection, coreMRExtra } from "./CoreMRSourceMap.js";
|
|
2
|
-
import { CaseStrategy_CamelCase, ErrorReason_$union, ExtraCoders } from "../../../../
|
|
3
|
-
import { fromString, Auto_generateBoxedDecoder_Z6670B51 } from "../../../../
|
|
2
|
+
import { CaseStrategy_CamelCase, ErrorReason_$union, ExtraCoders } from "../../../../Thoth.Json/packages/Thoth.Json/Types.js";
|
|
3
|
+
import { fromString, Auto_generateBoxedDecoder_Z6670B51 } from "../../../../Thoth.Json/packages/Thoth.Json/Decode.js";
|
|
4
4
|
import { FSharpResult$2_Ok, FSharpResult$2_Error, FSharpResult$2_$union } from "@fable-org/fable-library-js/Result.js";
|
|
5
5
|
import { Spec_FormSpec$1, Spec_FormStep$1, Spec_FormField$1, Shared_PluginDataProperty, Shared_MatrixItemKey, Shared_MatrixAnswer, Shared_FieldAnswer, Shared_FieldValue, Shared_FieldValue_$union, Spec_FieldType_$union, Spec_MultiChoiceInfo, Spec_SingleChoiceInfo, Shared_FieldOption, Shared_FieldOptionKey, Shared_FieldKey, Shared_FieldKey_$reflection } from "../../../FormSpec.js";
|
|
6
|
-
import { toString, Auto_generateBoxedEncoder_437914C6 } from "../../../../
|
|
6
|
+
import { toString, Auto_generateBoxedEncoder_437914C6 } from "../../../../Thoth.Json/packages/Thoth.Json/Encode.js";
|
|
7
7
|
import { newGuid } from "@fable-org/fable-library-js/Guid.js";
|
|
8
8
|
import { FSharpMap, ofList, tryFind as tryFind_1, add } from "@fable-org/fable-library-js/Map.js";
|
|
9
|
-
import { IOptionalGetter, IRequiredGetter, IGetters, list as list_9, bool, string, int, object } from "../../../../
|
|
9
|
+
import { IOptionalGetter, IRequiredGetter, IGetters, list as list_9, bool, string, int, object } from "../../../../Thoth.Json/packages/Thoth.Json/Decode.js";
|
|
10
10
|
import { comparePrimitives, uncurry2 } from "@fable-org/fable-library-js/Util.js";
|
|
11
11
|
import { int32 } from "@fable-org/fable-library-js/Int32.js";
|
|
12
12
|
import { collect, exists, head, tail, choose, isEmpty, map as map_1, singleton, tryFind, empty, FSharpList } from "@fable-org/fable-library-js/List.js";
|
|
13
13
|
import { orElse, value as value_10, Option, map, bind, defaultArg } from "@fable-org/fable-library-js/Option.js";
|
|
14
14
|
import { CoreMRAnswer, CoreMRFormInsertRequest, CoreMRFormInsertRequest_$reflection } from "./FormSpecToCoreMRInsert.js";
|
|
15
15
|
import { isNullOrWhiteSpace } from "@fable-org/fable-library-js/String.js";
|
|
16
|
+
import { Helpers_canonicalizeFieldKey } from "../../../Helpers.js";
|
|
16
17
|
import { int64, fromInt32, toInt64 } from "@fable-org/fable-library-js/BigInt.js";
|
|
17
18
|
import { toList, FSharpSet } from "@fable-org/fable-library-js/Set.js";
|
|
18
19
|
import { computeBitmask } from "../../../BitmaskHelpers.js";
|
|
@@ -50,7 +51,7 @@ export function serializeRequest(req: CoreMRFormInsertRequest): string {
|
|
|
50
51
|
return toString(0, Auto_generateBoxedEncoder_437914C6(CoreMRFormInsertRequest_$reflection(), CaseStrategy_CamelCase(), baseExtra, undefined)(req));
|
|
51
52
|
}
|
|
52
53
|
|
|
53
|
-
function
|
|
54
|
+
function canonicalizeForYesNo(s: string): string {
|
|
54
55
|
if (isNullOrWhiteSpace(s)) {
|
|
55
56
|
return "";
|
|
56
57
|
}
|
|
@@ -68,8 +69,8 @@ function getFieldOptionKeyGuid(_arg: Shared_FieldOptionKey): string {
|
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
function getScoreFromOption(options: FSharpList<Shared_FieldOption>, selectedValue: string): Option<int64> {
|
|
71
|
-
const canonicalSelected: string =
|
|
72
|
-
return bind<Shared_FieldOption, int64>((opt_1: Shared_FieldOption): Option<int64> => map<int32, int64>((value: int32): int64 => toInt64(fromInt32(value)), opt_1.Score), tryFind<Shared_FieldOption>((opt: Shared_FieldOption): boolean => (
|
|
72
|
+
const canonicalSelected: string = Helpers_canonicalizeFieldKey(selectedValue);
|
|
73
|
+
return bind<Shared_FieldOption, int64>((opt_1: Shared_FieldOption): Option<int64> => map<int32, int64>((value: int32): int64 => toInt64(fromInt32(value)), opt_1.Score), tryFind<Shared_FieldOption>((opt: Shared_FieldOption): boolean => (Helpers_canonicalizeFieldKey(opt.Value) === canonicalSelected), options));
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
function supportsTextContent(anchor: CoreMRFieldAnchor): boolean {
|
|
@@ -165,7 +166,7 @@ function fieldToAnswers(field: Spec_FormField$1<Spec_FieldType_$union>, anchor:
|
|
|
165
166
|
return empty<CoreMRAnswer>();
|
|
166
167
|
}
|
|
167
168
|
else {
|
|
168
|
-
return singleton(new CoreMRAnswer(anchor.Sequence, computeBitmask(choose<string, int32>((key: string): Option<int32> => map<[string, int32], int32>((tuple: [string, int32]): int32 => tuple[1], tryFind<[string, int32]>((tupledArg: [string, int32]): boolean => (tupledArg[0] === key), choicesWithBitPos)), choose<string, string>((valStr_1: string): Option<string> => map<Shared_FieldOption, string>((opt_2: Shared_FieldOption): string => getFieldOptionKeyGuid(opt_2.OptionKey), tryFind<Shared_FieldOption>((opt_1: Shared_FieldOption): boolean => (
|
|
169
|
+
return singleton(new CoreMRAnswer(anchor.Sequence, computeBitmask(choose<string, int32>((key: string): Option<int32> => map<[string, int32], int32>((tuple: [string, int32]): int32 => tuple[1], tryFind<[string, int32]>((tupledArg: [string, int32]): boolean => (tupledArg[0] === key), choicesWithBitPos)), choose<string, string>((valStr_1: string): Option<string> => map<Shared_FieldOption, string>((opt_2: Shared_FieldOption): string => getFieldOptionKeyGuid(opt_2.OptionKey), tryFind<Shared_FieldOption>((opt_1: Shared_FieldOption): boolean => (Helpers_canonicalizeFieldKey(opt_1.Value) === Helpers_canonicalizeFieldKey(valStr_1)), options_1)), map_1<Shared_FieldAnswer, string>((a: Shared_FieldAnswer): string => a.Value, toList<Shared_FieldAnswer>(answers))))), undefined));
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
172
|
}
|
|
@@ -212,9 +213,9 @@ function fieldToAnswers(field: Spec_FormField$1<Spec_FieldType_$union>, anchor:
|
|
|
212
213
|
const matchValue_2: string = anchor.Encoding.ValueEncoding;
|
|
213
214
|
switch (matchValue_2) {
|
|
214
215
|
case "choice_score": {
|
|
215
|
-
const matchValue_3: Option<int64> = orElse(getScoreFromOption(options, answer.Value), (canonicalAnswer =
|
|
216
|
+
const matchValue_3: Option<int64> = orElse(getScoreFromOption(options, answer.Value), (canonicalAnswer = Helpers_canonicalizeFieldKey(answer.Value), map<CoreMRChoiceAnchor, int64>((c_1: CoreMRChoiceAnchor): int64 => c_1.Score, tryFind<CoreMRChoiceAnchor>((c: CoreMRChoiceAnchor): boolean => exists<Shared_FieldOption>((opt: Shared_FieldOption): boolean => {
|
|
216
217
|
if (getFieldOptionKeyGuid(opt.OptionKey) === getFieldOptionKeyGuid(c.FieldOptionKey)) {
|
|
217
|
-
return
|
|
218
|
+
return Helpers_canonicalizeFieldKey(opt.Value) === canonicalAnswer;
|
|
218
219
|
}
|
|
219
220
|
else {
|
|
220
221
|
return false;
|
|
@@ -228,7 +229,7 @@ function fieldToAnswers(field: Spec_FormField$1<Spec_FieldType_$union>, anchor:
|
|
|
228
229
|
}
|
|
229
230
|
}
|
|
230
231
|
case "1_yes_2_no": {
|
|
231
|
-
const valStr: string =
|
|
232
|
+
const valStr: string = canonicalizeForYesNo(answer.Value);
|
|
232
233
|
return singleton(new CoreMRAnswer(anchor.Sequence, (((valStr === "yes") ? true : (valStr === "true")) ? true : (valStr === "1")) ? (1n) : (2n), undefined));
|
|
233
234
|
}
|
|
234
235
|
case "zero":
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { newGuid } from "@fable-org/fable-library-js/Guid.js";
|
|
2
2
|
import { ofList, FSharpMap, tryFind, add } from "@fable-org/fable-library-js/Map.js";
|
|
3
|
-
import { Auto_generateBoxedEncoder_437914C6, toString, int64 } from "../../../../
|
|
3
|
+
import { Auto_generateBoxedEncoder_437914C6, toString, int64 } from "../../../../Thoth.Json/packages/Thoth.Json/Encode.js";
|
|
4
4
|
import { int64 as int64_1 } from "@fable-org/fable-library-js/BigInt.js";
|
|
5
|
-
import { int64 as int64_2 } from "../../../../
|
|
5
|
+
import { int64 as int64_2 } from "../../../../Thoth.Json/packages/Thoth.Json/Decode.js";
|
|
6
6
|
import { FSharpResult$2_$union } from "@fable-org/fable-library-js/Result.js";
|
|
7
|
-
import { ExtraCoders, ErrorReason_$union } from "../../../../
|
|
8
|
-
import { empty } from "../../../../
|
|
7
|
+
import { ExtraCoders, ErrorReason_$union } from "../../../../Thoth.Json/packages/Thoth.Json/Types.js";
|
|
8
|
+
import { empty } from "../../../../Thoth.Json/packages/Thoth.Json/Extra.js";
|
|
9
9
|
import { Record } from "@fable-org/fable-library-js/Types.js";
|
|
10
10
|
import { numberHash, comparePrimitives, IComparable, IEquatable } from "@fable-org/fable-library-js/Util.js";
|
|
11
11
|
import { class_type, list_type, option_type, int64_type, int32_type, record_type, bool_type, string_type, TypeInfo } from "@fable-org/fable-library-js/Reflection.js";
|
|
@@ -9,10 +9,10 @@ import { defaultArg, toArray, value as value_6, map, bind, Option } from "@fable
|
|
|
9
9
|
import { map as map_1, choose, mapIndexed, collect, head, tail, isEmpty, ofArray, empty, tryFind, FSharpList } from "@fable-org/fable-library-js/List.js";
|
|
10
10
|
import { Helpers_canonicalizeFieldKey } from "../../../Helpers.js";
|
|
11
11
|
import { isNullOrWhiteSpace } from "@fable-org/fable-library-js/String.js";
|
|
12
|
-
import { object, toString } from "../../../../
|
|
13
|
-
import { keyValuePairs, map as map_2, fromString, IOptionalGetter, list as list_4, IRequiredGetter, IGetters, int, object as object_1, string, fail, succeed, andThen, guid, index, field as field_1, oneOf } from "../../../../
|
|
12
|
+
import { object, toString } from "../../../../Thoth.Json/packages/Thoth.Json/Encode.js";
|
|
13
|
+
import { keyValuePairs, map as map_2, fromString, IOptionalGetter, list as list_4, IRequiredGetter, IGetters, int, object as object_1, string, fail, succeed, andThen, guid, index, field as field_1, oneOf } from "../../../../Thoth.Json/packages/Thoth.Json/Decode.js";
|
|
14
14
|
import { FSharpResult$2_$union } from "@fable-org/fable-library-js/Result.js";
|
|
15
|
-
import { ErrorReason_$union } from "../../../../
|
|
15
|
+
import { ErrorReason_$union } from "../../../../Thoth.Json/packages/Thoth.Json/Types.js";
|
|
16
16
|
import { tryParse } from "@fable-org/fable-library-js/Guid.js";
|
|
17
17
|
import { IntegrationProvenance } from "../../../Provenance.js";
|
|
18
18
|
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { Record } from "@fable-org/fable-library-js/Types.js";
|
|
2
2
|
import { int32 } from "@fable-org/fable-library-js/Int32.js";
|
|
3
|
-
import { toInt32, int64 } from "@fable-org/fable-library-js/BigInt.js";
|
|
3
|
+
import { equals, toInt32, int64 } from "@fable-org/fable-library-js/BigInt.js";
|
|
4
4
|
import { map as map_1, defaultArg, Option } from "@fable-org/fable-library-js/Option.js";
|
|
5
5
|
import { int32ToString, uncurry2, comparePrimitives, IComparable, IEquatable } from "@fable-org/fable-library-js/Util.js";
|
|
6
6
|
import { class_type, list_type, bool_type, record_type, option_type, string_type, int64_type, int32_type, TypeInfo } from "@fable-org/fable-library-js/Reflection.js";
|
|
7
|
-
import { empty as empty_1, collect, map as map_2, isEmpty, FSharpList } from "@fable-org/fable-library-js/List.js";
|
|
8
|
-
import { ofList, add, FSharpMap } from "@fable-org/fable-library-js/Map.js";
|
|
7
|
+
import { filter, length, sumBy as sumBy_1, empty as empty_1, collect, map as map_2, isEmpty, FSharpList } from "@fable-org/fable-library-js/List.js";
|
|
8
|
+
import { toSeq, ofList, add, FSharpMap } from "@fable-org/fable-library-js/Map.js";
|
|
9
9
|
import { newGuid } from "@fable-org/fable-library-js/Guid.js";
|
|
10
|
-
import { int64 as int64_1 } from "../../../
|
|
11
|
-
import { Auto_generateBoxedDecoder_Z6670B51, int64 as int64_2 } from "../../../
|
|
10
|
+
import { int64 as int64_1 } from "../../../Thoth.Json/packages/Thoth.Json/Encode.js";
|
|
11
|
+
import { Auto_generateBoxedDecoder_Z6670B51, int64 as int64_2 } from "../../../Thoth.Json/packages/Thoth.Json/Decode.js";
|
|
12
12
|
import { FSharpResult$2_$union } from "@fable-org/fable-library-js/Result.js";
|
|
13
|
-
import { ExtraCoders, ErrorReason_$union } from "../../../
|
|
14
|
-
import { empty } from "../../../
|
|
15
|
-
import {
|
|
13
|
+
import { ExtraCoders, ErrorReason_$union } from "../../../Thoth.Json/packages/Thoth.Json/Types.js";
|
|
14
|
+
import { empty } from "../../../Thoth.Json/packages/Thoth.Json/Extra.js";
|
|
15
|
+
import { isNullOrEmpty, toConsole, printf, toText } from "@fable-org/fable-library-js/String.js";
|
|
16
|
+
import { fromString, list as list_5, bool, IOptionalGetter, IGetters, string, int, IRequiredGetter, object, map, keyValuePairs } from "../../../Thoth.Json/packages/Thoth.Json/Decode.js";
|
|
16
17
|
import { CoreMRFormData, CoreMRTag, CoreMRTrigger, CoreMRFormMetadata, CoreMRItem, CoreMRChoice } from "./CoreMRTypes.js";
|
|
17
|
-
import {
|
|
18
|
+
import { sumBy } from "@fable-org/fable-library-js/Seq.js";
|
|
18
19
|
|
|
19
20
|
export class TemplateChoice extends Record implements IEquatable<TemplateChoice>, IComparable<TemplateChoice> {
|
|
20
21
|
readonly ChoiceId: int32;
|
|
@@ -323,6 +324,18 @@ const extraWithInt64: ExtraCoders = new ExtraCoders((() => {
|
|
|
323
324
|
|
|
324
325
|
const int64Decoder: ((arg0: string) => ((arg0: any) => FSharpResult$2_$union<int64, [string, ErrorReason_$union]>)) = Auto_generateBoxedDecoder_Z6670B51(int64_type, undefined, extraWithInt64);
|
|
325
326
|
|
|
327
|
+
const liberatedInt64Decoder: ((arg0: string) => ((arg0: any) => FSharpResult$2_$union<int64, [string, ErrorReason_$union]>)) = Auto_generateBoxedDecoder_Z6670B51(int64_type, undefined, undefined);
|
|
328
|
+
|
|
329
|
+
function scoreSurveillanceLog(score: int64): void {
|
|
330
|
+
try {
|
|
331
|
+
const message: string = toText(printf("🚀 LIBERATION_SURVEILLANCE: Successfully decoded Score=%d (NOT 0!) via native BigInt auto decoder"))(score);
|
|
332
|
+
console.log(message);
|
|
333
|
+
toConsole(printf("%s"))(message);
|
|
334
|
+
}
|
|
335
|
+
catch (matchValue: any) {
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
326
339
|
function dictDecoder<T>(decoder: ((arg0: string, arg1: any) => FSharpResult$2_$union<T, [string, ErrorReason_$union]>)): ((arg0: string) => ((arg0: any) => FSharpResult$2_$union<FSharpMap<string, T>, [string, ErrorReason_$union]>)) {
|
|
327
340
|
let d: ((arg0: string) => ((arg0: any) => FSharpResult$2_$union<FSharpList<[string, T]>, [string, ErrorReason_$union]>));
|
|
328
341
|
const decoder_1: ((arg0: string, arg1: any) => FSharpResult$2_$union<T, [string, ErrorReason_$union]>) = decoder;
|
|
@@ -333,13 +346,17 @@ function dictDecoder<T>(decoder: ((arg0: string, arg1: any) => FSharpResult$2_$u
|
|
|
333
346
|
}
|
|
334
347
|
|
|
335
348
|
const choiceDecoder = (path_2: string): ((arg0: any) => FSharpResult$2_$union<TemplateChoice, [string, ErrorReason_$union]>) => ((v: any): FSharpResult$2_$union<TemplateChoice, [string, ErrorReason_$union]> => object<TemplateChoice>((get$: IGetters): TemplateChoice => {
|
|
336
|
-
let
|
|
337
|
-
|
|
349
|
+
let objectArg_1: IRequiredGetter, objectArg_2: IRequiredGetter, objectArg_3: IRequiredGetter, objectArg_4: IOptionalGetter, objectArg_5: IOptionalGetter, objectArg_6: IOptionalGetter;
|
|
350
|
+
let score: int64;
|
|
351
|
+
const objectArg: IRequiredGetter = get$.Required;
|
|
352
|
+
score = objectArg.Field<int64>("score", uncurry2(liberatedInt64Decoder));
|
|
353
|
+
scoreSurveillanceLog(score);
|
|
354
|
+
return new TemplateChoice((objectArg_1 = get$.Required, objectArg_1.Field<int32>("choiceId", uncurry2(int))), (objectArg_2 = get$.Required, objectArg_2.Field<int32>("sequence", uncurry2(int))), score, (objectArg_3 = get$.Required, objectArg_3.Field<string>("text", string)), (objectArg_4 = get$.Optional, objectArg_4.Field<int32>("bitPosition", uncurry2(int))), (objectArg_5 = get$.Optional, objectArg_5.Field<string>("code", string)), (objectArg_6 = get$.Optional, objectArg_6.Field<int32>("highlight", uncurry2(int))));
|
|
338
355
|
}, path_2, v));
|
|
339
356
|
|
|
340
357
|
const itemDecoder = (path_7: string): ((arg0: any) => FSharpResult$2_$union<TemplateItem, [string, ErrorReason_$union]>) => ((v: any): FSharpResult$2_$union<TemplateItem, [string, ErrorReason_$union]> => object<TemplateItem>((get$: IGetters): TemplateItem => {
|
|
341
358
|
let objectArg: IRequiredGetter, objectArg_1: IRequiredGetter, objectArg_2: IRequiredGetter, objectArg_3: IRequiredGetter, objectArg_4: IRequiredGetter, objectArg_5: IRequiredGetter, objectArg_6: IOptionalGetter, objectArg_7: IOptionalGetter, objectArg_8: IOptionalGetter, objectArg_9: IOptionalGetter, objectArg_10: IOptionalGetter, objectArg_11: IRequiredGetter;
|
|
342
|
-
return new TemplateItem((objectArg = get$.Required, objectArg.Field<int32>("itemId", uncurry2(int))), (objectArg_1 = get$.Required, objectArg_1.Field<int32>("sequence", uncurry2(int))), (objectArg_2 = get$.Required, objectArg_2.Field<int32>("type", uncurry2(int))), (objectArg_3 = get$.Required, objectArg_3.Field<int32>("nestingLevel", uncurry2(int))), (objectArg_4 = get$.Required, objectArg_4.Field<boolean>("isRequired", bool)), (objectArg_5 = get$.Required, objectArg_5.Field<string>("text", string)), (objectArg_6 = get$.Optional, objectArg_6.Field<string>("sequenceText", string)), (objectArg_7 = get$.Optional, objectArg_7.Field<string>("code", string)), (objectArg_8 = get$.Optional, objectArg_8.Field<string>("uuid", string)), (objectArg_9 = get$.Optional, objectArg_9.Field<string>("genderRequired", string)), (objectArg_10 = get$.Optional, objectArg_10.Field<int32>("highlight", uncurry2(int))), (objectArg_11 = get$.Required, objectArg_11.Field<FSharpList<TemplateChoice>>("choices", (path_6: string, value_6: any): FSharpResult$2_$union<FSharpList<TemplateChoice>, [string, ErrorReason_$union]> =>
|
|
359
|
+
return new TemplateItem((objectArg = get$.Required, objectArg.Field<int32>("itemId", uncurry2(int))), (objectArg_1 = get$.Required, objectArg_1.Field<int32>("sequence", uncurry2(int))), (objectArg_2 = get$.Required, objectArg_2.Field<int32>("type", uncurry2(int))), (objectArg_3 = get$.Required, objectArg_3.Field<int32>("nestingLevel", uncurry2(int))), (objectArg_4 = get$.Required, objectArg_4.Field<boolean>("isRequired", bool)), (objectArg_5 = get$.Required, objectArg_5.Field<string>("text", string)), (objectArg_6 = get$.Optional, objectArg_6.Field<string>("sequenceText", string)), (objectArg_7 = get$.Optional, objectArg_7.Field<string>("code", string)), (objectArg_8 = get$.Optional, objectArg_8.Field<string>("uuid", string)), (objectArg_9 = get$.Optional, objectArg_9.Field<string>("genderRequired", string)), (objectArg_10 = get$.Optional, objectArg_10.Field<int32>("highlight", uncurry2(int))), (objectArg_11 = get$.Required, objectArg_11.Field<FSharpList<TemplateChoice>>("choices", (path_6: string, value_6: any): FSharpResult$2_$union<FSharpList<TemplateChoice>, [string, ErrorReason_$union]> => list_5<TemplateChoice>(uncurry2(choiceDecoder), path_6, value_6))));
|
|
343
360
|
}, path_7, v));
|
|
344
361
|
|
|
345
362
|
const encounterTypesDecoder = (path_4: string): ((arg0: any) => FSharpResult$2_$union<EncounterTypes, [string, ErrorReason_$union]>) => ((v: any): FSharpResult$2_$union<EncounterTypes, [string, ErrorReason_$union]> => object<EncounterTypes>((get$: IGetters): EncounterTypes => {
|
|
@@ -354,12 +371,12 @@ const scoringLabelDecoder = (path_1: string): ((arg0: any) => FSharpResult$2_$un
|
|
|
354
371
|
|
|
355
372
|
const formScoringDecoder = (path_2: string): ((arg0: any) => FSharpResult$2_$union<FormScoring, [string, ErrorReason_$union]>) => ((v: any): FSharpResult$2_$union<FormScoring, [string, ErrorReason_$union]> => object<FormScoring>((get$: IGetters): FormScoring => {
|
|
356
373
|
let objectArg: IRequiredGetter, objectArg_1: IRequiredGetter, objectArg_2: IRequiredGetter, arg_7: ((arg0: string) => ((arg0: any) => FSharpResult$2_$union<FSharpMap<string, int32>, [string, ErrorReason_$union]>)), objectArg_3: IRequiredGetter;
|
|
357
|
-
return new FormScoring((objectArg = get$.Required, objectArg.Field<int32>("scoreId", uncurry2(int))), (objectArg_1 = get$.Required, objectArg_1.Field<string>("scoreName", string)), (objectArg_2 = get$.Required, objectArg_2.Field<FSharpList<ScoringLabel>>("labels", (path_1: string, value_1: any): FSharpResult$2_$union<FSharpList<ScoringLabel>, [string, ErrorReason_$union]> =>
|
|
374
|
+
return new FormScoring((objectArg = get$.Required, objectArg.Field<int32>("scoreId", uncurry2(int))), (objectArg_1 = get$.Required, objectArg_1.Field<string>("scoreName", string)), (objectArg_2 = get$.Required, objectArg_2.Field<FSharpList<ScoringLabel>>("labels", (path_1: string, value_1: any): FSharpResult$2_$union<FSharpList<ScoringLabel>, [string, ErrorReason_$union]> => list_5<ScoringLabel>(uncurry2(scoringLabelDecoder), path_1, value_1))), (arg_7 = dictDecoder<int32>(uncurry2(int)), (objectArg_3 = get$.Required, objectArg_3.Field<FSharpMap<string, int32>>("choiceScores", uncurry2(arg_7)))));
|
|
358
375
|
}, path_2, v));
|
|
359
376
|
|
|
360
377
|
const formDecoder = (path_13: string): ((arg0: any) => FSharpResult$2_$union<TemplateForm, [string, ErrorReason_$union]>) => ((v: any): FSharpResult$2_$union<TemplateForm, [string, ErrorReason_$union]> => object<TemplateForm>((get$: IGetters): TemplateForm => {
|
|
361
378
|
let objectArg: IRequiredGetter, objectArg_1: IRequiredGetter, objectArg_2: IRequiredGetter, objectArg_3: IRequiredGetter, objectArg_4: IRequiredGetter, objectArg_5: IRequiredGetter, objectArg_6: IRequiredGetter, objectArg_7: IRequiredGetter, objectArg_8: IRequiredGetter, objectArg_9: IRequiredGetter, objectArg_10: IRequiredGetter, objectArg_11: IRequiredGetter, objectArg_12: IRequiredGetter, objectArg_13: IRequiredGetter, objectArg_14: IRequiredGetter, objectArg_15: IRequiredGetter, objectArg_16: IOptionalGetter;
|
|
362
|
-
return new TemplateForm((objectArg = get$.Required, objectArg.Field<int32>("formId", uncurry2(int))), (objectArg_1 = get$.Required, objectArg_1.Field<string>("name", string)), (objectArg_2 = get$.Required, objectArg_2.Field<string>("formCode", string)), (objectArg_3 = get$.Required, objectArg_3.Field<string>("formCodeSource", string)), (objectArg_4 = get$.Required, objectArg_4.Field<string>("description", string)), (objectArg_5 = get$.Required, objectArg_5.Field<int64>("currentVersionId", uncurry2(int64Decoder))), (objectArg_6 = get$.Required, objectArg_6.Field<boolean>("isIntake", bool)), (objectArg_7 = get$.Required, objectArg_7.Field<string>("usage", string)), (objectArg_8 = get$.Required, objectArg_8.Field<boolean>("requiresSignature", bool)), (objectArg_9 = get$.Required, objectArg_9.Field<EncounterTypes>("encounterTypes", uncurry2(encounterTypesDecoder))), (objectArg_10 = get$.Required, objectArg_10.Field<boolean>("onceAYear", bool)), (objectArg_11 = get$.Required, objectArg_11.Field<string>("structureHash", string)), (objectArg_12 = get$.Required, objectArg_12.Field<string>("clinicalHash", string)), (objectArg_13 = get$.Required, objectArg_13.Field<string>("cosmeticHash", string)), (objectArg_14 = get$.Required, objectArg_14.Field<string>("hash", string)), (objectArg_15 = get$.Required, objectArg_15.Field<FSharpList<TemplateItem>>("items", (path_12: string, value_12: any): FSharpResult$2_$union<FSharpList<TemplateItem>, [string, ErrorReason_$union]> =>
|
|
379
|
+
return new TemplateForm((objectArg = get$.Required, objectArg.Field<int32>("formId", uncurry2(int))), (objectArg_1 = get$.Required, objectArg_1.Field<string>("name", string)), (objectArg_2 = get$.Required, objectArg_2.Field<string>("formCode", string)), (objectArg_3 = get$.Required, objectArg_3.Field<string>("formCodeSource", string)), (objectArg_4 = get$.Required, objectArg_4.Field<string>("description", string)), (objectArg_5 = get$.Required, objectArg_5.Field<int64>("currentVersionId", uncurry2(int64Decoder))), (objectArg_6 = get$.Required, objectArg_6.Field<boolean>("isIntake", bool)), (objectArg_7 = get$.Required, objectArg_7.Field<string>("usage", string)), (objectArg_8 = get$.Required, objectArg_8.Field<boolean>("requiresSignature", bool)), (objectArg_9 = get$.Required, objectArg_9.Field<EncounterTypes>("encounterTypes", uncurry2(encounterTypesDecoder))), (objectArg_10 = get$.Required, objectArg_10.Field<boolean>("onceAYear", bool)), (objectArg_11 = get$.Required, objectArg_11.Field<string>("structureHash", string)), (objectArg_12 = get$.Required, objectArg_12.Field<string>("clinicalHash", string)), (objectArg_13 = get$.Required, objectArg_13.Field<string>("cosmeticHash", string)), (objectArg_14 = get$.Required, objectArg_14.Field<string>("hash", string)), (objectArg_15 = get$.Required, objectArg_15.Field<FSharpList<TemplateItem>>("items", (path_12: string, value_12: any): FSharpResult$2_$union<FSharpList<TemplateItem>, [string, ErrorReason_$union]> => list_5<TemplateItem>(uncurry2(itemDecoder), path_12, value_12))), (objectArg_16 = get$.Optional, objectArg_16.Field<FormScoring>("scoring", uncurry2(formScoringDecoder))));
|
|
363
380
|
}, path_13, v));
|
|
364
381
|
|
|
365
382
|
const elementTypeDecoder = (path_3: string): ((arg0: any) => FSharpResult$2_$union<ElementTypeEntry, [string, ErrorReason_$union]>) => ((v: any): FSharpResult$2_$union<ElementTypeEntry, [string, ErrorReason_$union]> => object<ElementTypeEntry>((get$: IGetters): ElementTypeEntry => {
|
|
@@ -416,14 +433,76 @@ export function toCoreMRFormData(form: TemplateForm): CoreMRFormData {
|
|
|
416
433
|
* Decode templates.json manifest. Strict (all-or-nothing).
|
|
417
434
|
*/
|
|
418
435
|
export function decodeManifest(json: string): FSharpResult$2_$union<TemplateManifest, string> {
|
|
419
|
-
|
|
436
|
+
try {
|
|
437
|
+
toConsole(printf("🚀 LIBERATION_SURVEILLANCE: Starting template manifest decode with liberation fork..."));
|
|
438
|
+
console.log("🚀 LIBERATION_SURVEILLANCE: Starting template manifest decode with liberation fork...");
|
|
439
|
+
}
|
|
440
|
+
catch (matchValue: any) {
|
|
441
|
+
}
|
|
442
|
+
const result: FSharpResult$2_$union<TemplateManifest, string> = fromString<TemplateManifest>(uncurry2(manifestDecoder), json);
|
|
443
|
+
if (result.tag === /* Error */ 1) {
|
|
444
|
+
const err: string = result.fields[0];
|
|
445
|
+
try {
|
|
446
|
+
const message_1: string = toText(printf("💥 LIBERATION_SURVEILLANCE: Template decode FAILED - %s"))(err);
|
|
447
|
+
toConsole(printf("%s"))(message_1);
|
|
448
|
+
console.log(message_1);
|
|
449
|
+
}
|
|
450
|
+
catch (matchValue_2: any) {
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
else {
|
|
454
|
+
const manifest: TemplateManifest = result.fields[0];
|
|
455
|
+
try {
|
|
456
|
+
const totalChoices: int32 = sumBy<[string, TemplateForm], int32>((tupledArg: [string, TemplateForm]): int32 => sumBy_1<TemplateItem, int32>((item: TemplateItem): int32 => length<TemplateChoice>(item.Choices), tupledArg[1].Items, {
|
|
457
|
+
GetZero: (): int32 => 0,
|
|
458
|
+
Add: (x: int32, y: int32): int32 => (x + y),
|
|
459
|
+
}), toSeq<string, TemplateForm>(manifest.Forms), {
|
|
460
|
+
GetZero: (): int32 => 0,
|
|
461
|
+
Add: (x_1: int32, y_1: int32): int32 => (x_1 + y_1),
|
|
462
|
+
}) | 0;
|
|
463
|
+
const nonZeroScores: int32 = sumBy<[string, TemplateForm], int32>((tupledArg_1: [string, TemplateForm]): int32 => sumBy_1<TemplateItem, int32>((item_1: TemplateItem): int32 => length<TemplateChoice>(filter<TemplateChoice>((choice: TemplateChoice): boolean => !equals(choice.Score, 0n), item_1.Choices)), tupledArg_1[1].Items, {
|
|
464
|
+
GetZero: (): int32 => 0,
|
|
465
|
+
Add: (x_2: int32, y_2: int32): int32 => (x_2 + y_2),
|
|
466
|
+
}), toSeq<string, TemplateForm>(manifest.Forms), {
|
|
467
|
+
GetZero: (): int32 => 0,
|
|
468
|
+
Add: (x_3: int32, y_3: int32): int32 => (x_3 + y_3),
|
|
469
|
+
}) | 0;
|
|
470
|
+
const message: string = toText(printf("🎉 LIBERATION_SURVEILLANCE: Template decode SUCCESS! %d choices decoded, %d with non-zero scores (liberation confirmed!)"))(totalChoices)(nonZeroScores);
|
|
471
|
+
toConsole(printf("%s"))(message);
|
|
472
|
+
console.log(message);
|
|
473
|
+
}
|
|
474
|
+
catch (matchValue_1: any) {
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
return result;
|
|
420
478
|
}
|
|
421
479
|
|
|
422
480
|
/**
|
|
423
481
|
* Decode a single TemplateForm from JSON (bridge API single-form response).
|
|
424
482
|
*/
|
|
425
483
|
export function decodeTemplateForm(json: string): FSharpResult$2_$union<TemplateForm, string> {
|
|
426
|
-
|
|
484
|
+
const result: FSharpResult$2_$union<TemplateForm, string> = fromString<TemplateForm>(uncurry2(formDecoder), json);
|
|
485
|
+
if (result.tag === /* Error */ 1) {
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
const form: TemplateForm = result.fields[0];
|
|
489
|
+
try {
|
|
490
|
+
const totalChoices: int32 = sumBy_1<TemplateItem, int32>((item: TemplateItem): int32 => length<TemplateChoice>(item.Choices), form.Items, {
|
|
491
|
+
GetZero: (): int32 => 0,
|
|
492
|
+
Add: (x: int32, y: int32): int32 => (x + y),
|
|
493
|
+
}) | 0;
|
|
494
|
+
const nonZeroScores: int32 = sumBy_1<TemplateItem, int32>((item_1: TemplateItem): int32 => length<TemplateChoice>(filter<TemplateChoice>((choice: TemplateChoice): boolean => !equals(choice.Score, 0n), item_1.Choices)), form.Items, {
|
|
495
|
+
GetZero: (): int32 => 0,
|
|
496
|
+
Add: (x_1: int32, y_1: int32): int32 => (x_1 + y_1),
|
|
497
|
+
}) | 0;
|
|
498
|
+
const message: string = toText(printf("🎉 LIBERATION_SURVEILLANCE: Single form decode SUCCESS! FormId=%d, %d choices, %d non-zero scores"))(form.FormId)(totalChoices)(nonZeroScores);
|
|
499
|
+
toConsole(printf("%s"))(message);
|
|
500
|
+
console.log(message);
|
|
501
|
+
}
|
|
502
|
+
catch (matchValue: any) {
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
return result;
|
|
427
506
|
}
|
|
428
507
|
|
|
429
508
|
export const templateFormDecoder: ((arg0: string) => ((arg0: any) => FSharpResult$2_$union<TemplateForm, [string, ErrorReason_$union]>)) = formDecoder;
|