@f1studio/form-spec 5.0.0-alpha.111 → 5.0.0-alpha.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FormSpec.FS/BitmaskHelpers.d.ts +23 -0
- package/FormSpec.FS/BitmaskHelpers.d.ts.map +1 -0
- package/FormSpec.FS/BlueprintValidation.d.ts +16 -0
- package/FormSpec.FS/BlueprintValidation.d.ts.map +1 -0
- package/FormSpec.FS/FormSpec.d.ts +19 -5
- package/FormSpec.FS/FormSpec.d.ts.map +1 -1
- package/FormSpec.FS/FormSpecHelpers.d.ts +4 -0
- package/FormSpec.FS/FormSpecHelpers.d.ts.map +1 -1
- package/FormSpec.FS/FormSpecValues.d.ts +5 -0
- package/FormSpec.FS/FormSpecValues.d.ts.map +1 -1
- package/FormSpec.FS/Helpers.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.d.ts +13 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.d.ts +22 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.d.ts +22 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.d.ts +130 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.d.ts +37 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.d.ts +231 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.d.ts +10 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.d.ts +55 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.d.ts +69 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.d.ts +21 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts +133 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.d.ts +52 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/FormSystemAdapter.d.ts +46 -0
- package/FormSpec.FS/Integrations/Adapters/FormSystemAdapter.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormAdapter.d.ts +4 -0
- package/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormAdapter.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormTypes.d.ts +36 -0
- package/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormTypes.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.d.ts +95 -0
- package/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.d.ts +449 -0
- package/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.d.ts.map +1 -0
- package/FormSpec.FS/Interop/FormSpec.Api.Helpers.d.ts.map +1 -1
- package/FormSpec.FS/Interop/FormSpec.Api.Option.d.ts +3 -1
- package/FormSpec.FS/Interop/FormSpec.Api.Option.d.ts.map +1 -1
- package/FormSpec.FS/Provenance.d.ts +10 -0
- package/FormSpec.FS/Provenance.d.ts.map +1 -0
- package/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.d.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/BitmaskHelpers.js +56 -0
- package/FormSpec.TS/FormSpec.FS/BitmaskHelpers.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/BitmaskHelpers.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/BlueprintValidation.js +116 -0
- package/FormSpec.TS/FormSpec.FS/BlueprintValidation.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/BlueprintValidation.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Designer.js +2 -2
- package/FormSpec.TS/FormSpec.FS/Designer.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Designer.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/FormSpec.js +72 -3
- package/FormSpec.TS/FormSpec.FS/FormSpec.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/FormSpec.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.js +201 -3
- 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/FormSpecValues.js +38 -3
- package/FormSpec.TS/FormSpec.FS/FormSpecValues.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/FormSpecValues.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Helpers.js +44 -27
- package/FormSpec.TS/FormSpec.FS/Helpers.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Helpers.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.js +45 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.js +145 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.js +139 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.js +801 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.js +121 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.js +1380 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.js +29 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js +172 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.js +406 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js +317 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js +622 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.js +448 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/FormSystemAdapter.js +198 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/FormSystemAdapter.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/FormSystemAdapter.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormAdapter.js +57 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormAdapter.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormAdapter.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormTypes.js +144 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormTypes.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormTypes.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.js +258 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.js +1768 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.js +22 -18
- 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 +18 -6
- 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/PathwayExecutor.js +1 -1
- package/FormSpec.TS/FormSpec.FS/Provenance.js +41 -0
- package/FormSpec.TS/FormSpec.FS/Provenance.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Provenance.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.js +36 -13
- package/FormSpec.TS/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Renderers/PathwayRenderers.js +1 -1
- package/FormSpec.TS/PathwayExecutor.withPlugins.js +0 -5
- package/FormSpec.TS/PathwayExecutor.withPlugins.js.map +1 -1
- package/FormSpec.TS/PluginRegistration.js +2 -0
- package/FormSpec.TS/PluginRegistration.js.map +1 -1
- package/FormSpec.TS/PluginRegistration.ts.map +1 -1
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs.js.map +1 -1
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs.ts.map +1 -1
- package/FormSpec.TS/fable_modules/project_cracked.json +1 -1
- package/FormSpec.TS/plugins/demographics/src/DemographicsField.js +918 -0
- package/FormSpec.TS/plugins/demographics/src/DemographicsField.js.map +1 -0
- package/FormSpec.TS/plugins/demographics/src/DemographicsField.ts.map +1 -0
- package/FormSpec.TS/plugins/likert/src/LikertField.js +1 -1
- package/PathwayExecutor.withPlugins.d.ts +0 -5
- package/PathwayExecutor.withPlugins.d.ts.map +1 -1
- package/README.md +7 -7
- package/fable_modules/Thoth.Json.10.4.1/Extra.fs.d.ts +3 -0
- package/fable_modules/Thoth.Json.10.4.1/Extra.fs.d.ts.map +1 -0
- package/package.json +4 -4
- package/plugins/demographics/src/DemographicsField.d.ts +104 -0
- package/plugins/demographics/src/DemographicsField.d.ts.map +1 -0
- package/src/FormSpec.FS/BitmaskHelpers.ts +52 -0
- package/src/FormSpec.FS/BlueprintValidation.ts +108 -0
- package/src/FormSpec.FS/Designer.ts +2 -2
- package/src/FormSpec.FS/FormSpec.ts +39 -8
- package/src/FormSpec.FS/FormSpecHelpers.ts +190 -12
- package/src/FormSpec.FS/FormSpecValues.ts +42 -3
- package/src/FormSpec.FS/Helpers.ts +44 -27
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.ts +37 -0
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.ts +103 -0
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.ts +129 -0
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.ts +490 -0
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.ts +87 -0
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.ts +1046 -0
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.ts +26 -0
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts +161 -0
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.ts +386 -0
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts +320 -0
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts +371 -0
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.ts +372 -0
- package/src/FormSpec.FS/Integrations/Adapters/FormSystemAdapter.ts +92 -0
- package/src/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormAdapter.ts +51 -0
- package/src/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormTypes.ts +71 -0
- package/src/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.ts +15 -0
- package/src/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.ts +825 -0
- package/src/FormSpec.FS/Interop/FormSpec.Api.Helpers.ts +19 -15
- package/src/FormSpec.FS/Interop/FormSpec.Api.Option.ts +13 -7
- package/src/FormSpec.FS/PathwayExecutor.ts +1 -1
- package/src/FormSpec.FS/Provenance.ts +19 -0
- package/src/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.ts +32 -12
- package/src/FormSpec.FS/Renderers/PathwayRenderers.ts +1 -1
- package/src/PathwayExecutor.withPlugins.ts +0 -5
- package/src/PluginRegistration.ts +2 -0
- package/src/plugins/demographics/src/DemographicsField.ts +502 -0
- package/src/plugins/likert/src/LikertField.ts +1 -1
|
@@ -0,0 +1,622 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get CoreMRAbsorbedItem () {
|
|
13
|
+
return CoreMRAbsorbedItem;
|
|
14
|
+
},
|
|
15
|
+
get CoreMRAbsorbedItem_$reflection () {
|
|
16
|
+
return CoreMRAbsorbedItem_$reflection;
|
|
17
|
+
},
|
|
18
|
+
get CoreMRChoiceAnchor () {
|
|
19
|
+
return CoreMRChoiceAnchor;
|
|
20
|
+
},
|
|
21
|
+
get CoreMRChoiceAnchor_$reflection () {
|
|
22
|
+
return CoreMRChoiceAnchor_$reflection;
|
|
23
|
+
},
|
|
24
|
+
get CoreMRConversionResult () {
|
|
25
|
+
return CoreMRConversionResult;
|
|
26
|
+
},
|
|
27
|
+
get CoreMRConversionResult_$reflection () {
|
|
28
|
+
return CoreMRConversionResult_$reflection;
|
|
29
|
+
},
|
|
30
|
+
get CoreMRFieldAnchor () {
|
|
31
|
+
return CoreMRFieldAnchor;
|
|
32
|
+
},
|
|
33
|
+
get CoreMRFieldAnchor_$reflection () {
|
|
34
|
+
return CoreMRFieldAnchor_$reflection;
|
|
35
|
+
},
|
|
36
|
+
get CoreMRMatrixItemAnchor () {
|
|
37
|
+
return CoreMRMatrixItemAnchor;
|
|
38
|
+
},
|
|
39
|
+
get CoreMRMatrixItemAnchor_$reflection () {
|
|
40
|
+
return CoreMRMatrixItemAnchor_$reflection;
|
|
41
|
+
},
|
|
42
|
+
get CoreMRSourceMap () {
|
|
43
|
+
return CoreMRSourceMap;
|
|
44
|
+
},
|
|
45
|
+
get CoreMRSourceMap_$reflection () {
|
|
46
|
+
return CoreMRSourceMap_$reflection;
|
|
47
|
+
},
|
|
48
|
+
get CoreMRStepAnchor () {
|
|
49
|
+
return CoreMRStepAnchor;
|
|
50
|
+
},
|
|
51
|
+
get CoreMRStepAnchor_$reflection () {
|
|
52
|
+
return CoreMRStepAnchor_$reflection;
|
|
53
|
+
},
|
|
54
|
+
get CoreMRStepMap () {
|
|
55
|
+
return CoreMRStepMap;
|
|
56
|
+
},
|
|
57
|
+
get CoreMRStepMap_$reflection () {
|
|
58
|
+
return CoreMRStepMap_$reflection;
|
|
59
|
+
},
|
|
60
|
+
get ListMetadata () {
|
|
61
|
+
return ListMetadata;
|
|
62
|
+
},
|
|
63
|
+
get ListMetadata_$reflection () {
|
|
64
|
+
return ListMetadata_$reflection;
|
|
65
|
+
},
|
|
66
|
+
get ValueEncodingInfo () {
|
|
67
|
+
return ValueEncodingInfo;
|
|
68
|
+
},
|
|
69
|
+
get ValueEncodingInfo_$reflection () {
|
|
70
|
+
return ValueEncodingInfo_$reflection;
|
|
71
|
+
},
|
|
72
|
+
get buildFieldAnchor () {
|
|
73
|
+
return buildFieldAnchor;
|
|
74
|
+
},
|
|
75
|
+
get buildSourceMap () {
|
|
76
|
+
return buildSourceMap;
|
|
77
|
+
},
|
|
78
|
+
get convertWithMap () {
|
|
79
|
+
return convertWithMap;
|
|
80
|
+
},
|
|
81
|
+
get convertWithMapAndProvenance () {
|
|
82
|
+
return convertWithMapAndProvenance;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
const _Types = require("@fable-org/fable-library-js/Types.js");
|
|
86
|
+
const _Util = require("@fable-org/fable-library-js/Util.js");
|
|
87
|
+
const _Reflection = require("@fable-org/fable-library-js/Reflection.js");
|
|
88
|
+
const _CorEMRElementTypeMap = require("./CorEMRElementTypeMap.js");
|
|
89
|
+
const _Option = require("@fable-org/fable-library-js/Option.js");
|
|
90
|
+
const _FormSpec = require("../../../FormSpec.js");
|
|
91
|
+
const _List = require("@fable-org/fable-library-js/List.js");
|
|
92
|
+
const _CoreMRTypes = require("../../CorEMR/CoreMRTypes.js");
|
|
93
|
+
const _Map = require("@fable-org/fable-library-js/Map.js");
|
|
94
|
+
const _Seq2 = require("@fable-org/fable-library-js/Seq2.js");
|
|
95
|
+
const _CorEMRSectioning = require("./CorEMRSectioning.js");
|
|
96
|
+
const _CorEMRTemplateToFormSpec = require("./CorEMRTemplateToFormSpec.js");
|
|
97
|
+
const _Encodefs = require("../../../../fable_modules/Thoth.Json.10.4.1/Encode.fs.js");
|
|
98
|
+
const _Provenance = require("../../../Provenance.js");
|
|
99
|
+
class ValueEncodingInfo extends _Types.Record {
|
|
100
|
+
constructor(ValueEncoding, TextFieldRole, IsPlusNotes, IsScaffold, IsSkip){
|
|
101
|
+
super();
|
|
102
|
+
this.ValueEncoding = ValueEncoding;
|
|
103
|
+
this.TextFieldRole = TextFieldRole;
|
|
104
|
+
this.IsPlusNotes = IsPlusNotes;
|
|
105
|
+
this.IsScaffold = IsScaffold;
|
|
106
|
+
this.IsSkip = IsSkip;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function ValueEncodingInfo_$reflection() {
|
|
110
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.CoreMRSourceMap.ValueEncodingInfo", [], ValueEncodingInfo, ()=>[
|
|
111
|
+
[
|
|
112
|
+
"ValueEncoding",
|
|
113
|
+
_Reflection.string_type
|
|
114
|
+
],
|
|
115
|
+
[
|
|
116
|
+
"TextFieldRole",
|
|
117
|
+
_Reflection.string_type
|
|
118
|
+
],
|
|
119
|
+
[
|
|
120
|
+
"IsPlusNotes",
|
|
121
|
+
_Reflection.bool_type
|
|
122
|
+
],
|
|
123
|
+
[
|
|
124
|
+
"IsScaffold",
|
|
125
|
+
_Reflection.bool_type
|
|
126
|
+
],
|
|
127
|
+
[
|
|
128
|
+
"IsSkip",
|
|
129
|
+
_Reflection.bool_type
|
|
130
|
+
]
|
|
131
|
+
]);
|
|
132
|
+
}
|
|
133
|
+
function toValueEncodingInfo(e) {
|
|
134
|
+
return new ValueEncodingInfo(e.ValueEncoding, e.TextFieldRole, e.IsPlusNotes, e.IsScaffold, e.IsSkip);
|
|
135
|
+
}
|
|
136
|
+
function getValueEncoding(itemTypeId) {
|
|
137
|
+
return toValueEncodingInfo((0, _CorEMRElementTypeMap.getElementTypeInfo)(itemTypeId));
|
|
138
|
+
}
|
|
139
|
+
class CoreMRChoiceAnchor extends _Types.Record {
|
|
140
|
+
constructor(ChoiceId, Sequence, Text$, Score, BitPosition, Code, FieldOptionKey){
|
|
141
|
+
super();
|
|
142
|
+
this.ChoiceId = ChoiceId | 0;
|
|
143
|
+
this.Sequence = Sequence | 0;
|
|
144
|
+
this.Text = Text$;
|
|
145
|
+
this.Score = Score | 0;
|
|
146
|
+
this.BitPosition = BitPosition;
|
|
147
|
+
this.Code = Code;
|
|
148
|
+
this.FieldOptionKey = FieldOptionKey;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
function CoreMRChoiceAnchor_$reflection() {
|
|
152
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.CoreMRSourceMap.CoreMRChoiceAnchor", [], CoreMRChoiceAnchor, ()=>[
|
|
153
|
+
[
|
|
154
|
+
"ChoiceId",
|
|
155
|
+
_Reflection.int32_type
|
|
156
|
+
],
|
|
157
|
+
[
|
|
158
|
+
"Sequence",
|
|
159
|
+
_Reflection.int32_type
|
|
160
|
+
],
|
|
161
|
+
[
|
|
162
|
+
"Text",
|
|
163
|
+
_Reflection.string_type
|
|
164
|
+
],
|
|
165
|
+
[
|
|
166
|
+
"Score",
|
|
167
|
+
_Reflection.int32_type
|
|
168
|
+
],
|
|
169
|
+
[
|
|
170
|
+
"BitPosition",
|
|
171
|
+
(0, _Reflection.option_type)(_Reflection.int32_type)
|
|
172
|
+
],
|
|
173
|
+
[
|
|
174
|
+
"Code",
|
|
175
|
+
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
176
|
+
],
|
|
177
|
+
[
|
|
178
|
+
"FieldOptionKey",
|
|
179
|
+
(0, _FormSpec.Shared_FieldOptionKey_$reflection)()
|
|
180
|
+
]
|
|
181
|
+
]);
|
|
182
|
+
}
|
|
183
|
+
class CoreMRMatrixItemAnchor extends _Types.Record {
|
|
184
|
+
constructor(MatrixItemKey, ItemId, Sequence){
|
|
185
|
+
super();
|
|
186
|
+
this.MatrixItemKey = MatrixItemKey;
|
|
187
|
+
this.ItemId = ItemId | 0;
|
|
188
|
+
this.Sequence = Sequence | 0;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
function CoreMRMatrixItemAnchor_$reflection() {
|
|
192
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.CoreMRSourceMap.CoreMRMatrixItemAnchor", [], CoreMRMatrixItemAnchor, ()=>[
|
|
193
|
+
[
|
|
194
|
+
"MatrixItemKey",
|
|
195
|
+
(0, _FormSpec.Shared_MatrixItemKey_$reflection)()
|
|
196
|
+
],
|
|
197
|
+
[
|
|
198
|
+
"ItemId",
|
|
199
|
+
_Reflection.int32_type
|
|
200
|
+
],
|
|
201
|
+
[
|
|
202
|
+
"Sequence",
|
|
203
|
+
_Reflection.int32_type
|
|
204
|
+
]
|
|
205
|
+
]);
|
|
206
|
+
}
|
|
207
|
+
class CoreMRFieldAnchor extends _Types.Record {
|
|
208
|
+
constructor(ItemId, ItemTypeId, Sequence, NestingLevel, Label, IsRequired, SequenceText, Code, Uuid, GenderRequired, Encoding, Choices, FieldKey, MatrixItemAnchors){
|
|
209
|
+
super();
|
|
210
|
+
this.ItemId = ItemId | 0;
|
|
211
|
+
this.ItemTypeId = ItemTypeId | 0;
|
|
212
|
+
this.Sequence = Sequence | 0;
|
|
213
|
+
this.NestingLevel = NestingLevel | 0;
|
|
214
|
+
this.Label = Label;
|
|
215
|
+
this.IsRequired = IsRequired;
|
|
216
|
+
this.SequenceText = SequenceText;
|
|
217
|
+
this.Code = Code;
|
|
218
|
+
this.Uuid = Uuid;
|
|
219
|
+
this.GenderRequired = GenderRequired;
|
|
220
|
+
this.Encoding = Encoding;
|
|
221
|
+
this.Choices = Choices;
|
|
222
|
+
this.FieldKey = FieldKey;
|
|
223
|
+
this.MatrixItemAnchors = MatrixItemAnchors;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
function CoreMRFieldAnchor_$reflection() {
|
|
227
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.CoreMRSourceMap.CoreMRFieldAnchor", [], CoreMRFieldAnchor, ()=>[
|
|
228
|
+
[
|
|
229
|
+
"ItemId",
|
|
230
|
+
_Reflection.int32_type
|
|
231
|
+
],
|
|
232
|
+
[
|
|
233
|
+
"ItemTypeId",
|
|
234
|
+
_Reflection.int32_type
|
|
235
|
+
],
|
|
236
|
+
[
|
|
237
|
+
"Sequence",
|
|
238
|
+
_Reflection.int32_type
|
|
239
|
+
],
|
|
240
|
+
[
|
|
241
|
+
"NestingLevel",
|
|
242
|
+
_Reflection.int32_type
|
|
243
|
+
],
|
|
244
|
+
[
|
|
245
|
+
"Label",
|
|
246
|
+
_Reflection.string_type
|
|
247
|
+
],
|
|
248
|
+
[
|
|
249
|
+
"IsRequired",
|
|
250
|
+
_Reflection.bool_type
|
|
251
|
+
],
|
|
252
|
+
[
|
|
253
|
+
"SequenceText",
|
|
254
|
+
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
255
|
+
],
|
|
256
|
+
[
|
|
257
|
+
"Code",
|
|
258
|
+
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
259
|
+
],
|
|
260
|
+
[
|
|
261
|
+
"Uuid",
|
|
262
|
+
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
263
|
+
],
|
|
264
|
+
[
|
|
265
|
+
"GenderRequired",
|
|
266
|
+
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
267
|
+
],
|
|
268
|
+
[
|
|
269
|
+
"Encoding",
|
|
270
|
+
ValueEncodingInfo_$reflection()
|
|
271
|
+
],
|
|
272
|
+
[
|
|
273
|
+
"Choices",
|
|
274
|
+
(0, _Reflection.list_type)(CoreMRChoiceAnchor_$reflection())
|
|
275
|
+
],
|
|
276
|
+
[
|
|
277
|
+
"FieldKey",
|
|
278
|
+
(0, _FormSpec.Shared_FieldKey_$reflection)()
|
|
279
|
+
],
|
|
280
|
+
[
|
|
281
|
+
"MatrixItemAnchors",
|
|
282
|
+
(0, _Reflection.list_type)(CoreMRMatrixItemAnchor_$reflection())
|
|
283
|
+
]
|
|
284
|
+
]);
|
|
285
|
+
}
|
|
286
|
+
class CoreMRStepAnchor extends _Types.Record {
|
|
287
|
+
constructor(HeadingItemId, HeadingSequence, HeadingLabel){
|
|
288
|
+
super();
|
|
289
|
+
this.HeadingItemId = HeadingItemId;
|
|
290
|
+
this.HeadingSequence = HeadingSequence | 0;
|
|
291
|
+
this.HeadingLabel = HeadingLabel;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
function CoreMRStepAnchor_$reflection() {
|
|
295
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.CoreMRSourceMap.CoreMRStepAnchor", [], CoreMRStepAnchor, ()=>[
|
|
296
|
+
[
|
|
297
|
+
"HeadingItemId",
|
|
298
|
+
(0, _Reflection.option_type)(_Reflection.int32_type)
|
|
299
|
+
],
|
|
300
|
+
[
|
|
301
|
+
"HeadingSequence",
|
|
302
|
+
_Reflection.int32_type
|
|
303
|
+
],
|
|
304
|
+
[
|
|
305
|
+
"HeadingLabel",
|
|
306
|
+
_Reflection.string_type
|
|
307
|
+
]
|
|
308
|
+
]);
|
|
309
|
+
}
|
|
310
|
+
class CoreMRAbsorbedItem extends _Types.Record {
|
|
311
|
+
constructor(ItemId, ItemTypeId, Sequence, Text$, AbsorbedIntoFieldKey){
|
|
312
|
+
super();
|
|
313
|
+
this.ItemId = ItemId | 0;
|
|
314
|
+
this.ItemTypeId = ItemTypeId | 0;
|
|
315
|
+
this.Sequence = Sequence | 0;
|
|
316
|
+
this.Text = Text$;
|
|
317
|
+
this.AbsorbedIntoFieldKey = AbsorbedIntoFieldKey;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
function CoreMRAbsorbedItem_$reflection() {
|
|
321
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.CoreMRSourceMap.CoreMRAbsorbedItem", [], CoreMRAbsorbedItem, ()=>[
|
|
322
|
+
[
|
|
323
|
+
"ItemId",
|
|
324
|
+
_Reflection.int32_type
|
|
325
|
+
],
|
|
326
|
+
[
|
|
327
|
+
"ItemTypeId",
|
|
328
|
+
_Reflection.int32_type
|
|
329
|
+
],
|
|
330
|
+
[
|
|
331
|
+
"Sequence",
|
|
332
|
+
_Reflection.int32_type
|
|
333
|
+
],
|
|
334
|
+
[
|
|
335
|
+
"Text",
|
|
336
|
+
_Reflection.string_type
|
|
337
|
+
],
|
|
338
|
+
[
|
|
339
|
+
"AbsorbedIntoFieldKey",
|
|
340
|
+
(0, _FormSpec.Shared_FieldKey_$reflection)()
|
|
341
|
+
]
|
|
342
|
+
]);
|
|
343
|
+
}
|
|
344
|
+
class CoreMRStepMap extends _Types.Record {
|
|
345
|
+
constructor(StepOrder, Heading, FieldAnchors){
|
|
346
|
+
super();
|
|
347
|
+
this.StepOrder = StepOrder | 0;
|
|
348
|
+
this.Heading = Heading;
|
|
349
|
+
this.FieldAnchors = FieldAnchors;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
function CoreMRStepMap_$reflection() {
|
|
353
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.CoreMRSourceMap.CoreMRStepMap", [], CoreMRStepMap, ()=>[
|
|
354
|
+
[
|
|
355
|
+
"StepOrder",
|
|
356
|
+
_Reflection.int32_type
|
|
357
|
+
],
|
|
358
|
+
[
|
|
359
|
+
"Heading",
|
|
360
|
+
CoreMRStepAnchor_$reflection()
|
|
361
|
+
],
|
|
362
|
+
[
|
|
363
|
+
"FieldAnchors",
|
|
364
|
+
(0, _Reflection.list_type)(CoreMRFieldAnchor_$reflection())
|
|
365
|
+
]
|
|
366
|
+
]);
|
|
367
|
+
}
|
|
368
|
+
class CoreMRSourceMap extends _Types.Record {
|
|
369
|
+
constructor(FormId, VersionId, VersionNumber, FormName, FormCode, FormCodeSource, Description, IsIntake, RequiresSignature, IsScored, EncounterTypes, Usage, StructureHash, ClinicalHash, CosmeticHash, Steps, AbsorbedItems, Triggers, Tags, FormSpecId){
|
|
370
|
+
super();
|
|
371
|
+
this.FormId = FormId | 0;
|
|
372
|
+
this.VersionId = VersionId | 0;
|
|
373
|
+
this.VersionNumber = VersionNumber | 0;
|
|
374
|
+
this.FormName = FormName;
|
|
375
|
+
this.FormCode = FormCode;
|
|
376
|
+
this.FormCodeSource = FormCodeSource;
|
|
377
|
+
this.Description = Description;
|
|
378
|
+
this.IsIntake = IsIntake;
|
|
379
|
+
this.RequiresSignature = RequiresSignature;
|
|
380
|
+
this.IsScored = IsScored;
|
|
381
|
+
this.EncounterTypes = EncounterTypes;
|
|
382
|
+
this.Usage = Usage;
|
|
383
|
+
this.StructureHash = StructureHash;
|
|
384
|
+
this.ClinicalHash = ClinicalHash;
|
|
385
|
+
this.CosmeticHash = CosmeticHash;
|
|
386
|
+
this.Steps = Steps;
|
|
387
|
+
this.AbsorbedItems = AbsorbedItems;
|
|
388
|
+
this.Triggers = Triggers;
|
|
389
|
+
this.Tags = Tags;
|
|
390
|
+
this.FormSpecId = FormSpecId;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
function CoreMRSourceMap_$reflection() {
|
|
394
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.CoreMRSourceMap.CoreMRSourceMap", [], CoreMRSourceMap, ()=>[
|
|
395
|
+
[
|
|
396
|
+
"FormId",
|
|
397
|
+
_Reflection.int32_type
|
|
398
|
+
],
|
|
399
|
+
[
|
|
400
|
+
"VersionId",
|
|
401
|
+
_Reflection.int32_type
|
|
402
|
+
],
|
|
403
|
+
[
|
|
404
|
+
"VersionNumber",
|
|
405
|
+
_Reflection.int32_type
|
|
406
|
+
],
|
|
407
|
+
[
|
|
408
|
+
"FormName",
|
|
409
|
+
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
410
|
+
],
|
|
411
|
+
[
|
|
412
|
+
"FormCode",
|
|
413
|
+
_Reflection.string_type
|
|
414
|
+
],
|
|
415
|
+
[
|
|
416
|
+
"FormCodeSource",
|
|
417
|
+
_Reflection.string_type
|
|
418
|
+
],
|
|
419
|
+
[
|
|
420
|
+
"Description",
|
|
421
|
+
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
422
|
+
],
|
|
423
|
+
[
|
|
424
|
+
"IsIntake",
|
|
425
|
+
_Reflection.bool_type
|
|
426
|
+
],
|
|
427
|
+
[
|
|
428
|
+
"RequiresSignature",
|
|
429
|
+
_Reflection.bool_type
|
|
430
|
+
],
|
|
431
|
+
[
|
|
432
|
+
"IsScored",
|
|
433
|
+
(0, _Reflection.option_type)(_Reflection.bool_type)
|
|
434
|
+
],
|
|
435
|
+
[
|
|
436
|
+
"EncounterTypes",
|
|
437
|
+
(0, _Reflection.list_type)(_Reflection.string_type)
|
|
438
|
+
],
|
|
439
|
+
[
|
|
440
|
+
"Usage",
|
|
441
|
+
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
442
|
+
],
|
|
443
|
+
[
|
|
444
|
+
"StructureHash",
|
|
445
|
+
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
446
|
+
],
|
|
447
|
+
[
|
|
448
|
+
"ClinicalHash",
|
|
449
|
+
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
450
|
+
],
|
|
451
|
+
[
|
|
452
|
+
"CosmeticHash",
|
|
453
|
+
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
454
|
+
],
|
|
455
|
+
[
|
|
456
|
+
"Steps",
|
|
457
|
+
(0, _Reflection.list_type)(CoreMRStepMap_$reflection())
|
|
458
|
+
],
|
|
459
|
+
[
|
|
460
|
+
"AbsorbedItems",
|
|
461
|
+
(0, _Reflection.list_type)(CoreMRAbsorbedItem_$reflection())
|
|
462
|
+
],
|
|
463
|
+
[
|
|
464
|
+
"Triggers",
|
|
465
|
+
(0, _Reflection.list_type)((0, _CoreMRTypes.CoreMRTrigger_$reflection)())
|
|
466
|
+
],
|
|
467
|
+
[
|
|
468
|
+
"Tags",
|
|
469
|
+
(0, _Reflection.list_type)((0, _CoreMRTypes.CoreMRTag_$reflection)())
|
|
470
|
+
],
|
|
471
|
+
[
|
|
472
|
+
"FormSpecId",
|
|
473
|
+
(0, _Reflection.class_type)("System.Guid")
|
|
474
|
+
]
|
|
475
|
+
]);
|
|
476
|
+
}
|
|
477
|
+
class CoreMRConversionResult extends _Types.Record {
|
|
478
|
+
constructor(FormSpec, SourceMap){
|
|
479
|
+
super();
|
|
480
|
+
this.FormSpec = FormSpec;
|
|
481
|
+
this.SourceMap = SourceMap;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
function CoreMRConversionResult_$reflection() {
|
|
485
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.CoreMRSourceMap.CoreMRConversionResult", [], CoreMRConversionResult, ()=>[
|
|
486
|
+
[
|
|
487
|
+
"FormSpec",
|
|
488
|
+
(0, _FormSpec.Spec_FormSpec$1_$reflection)((0, _FormSpec.Spec_FieldType_$reflection)())
|
|
489
|
+
],
|
|
490
|
+
[
|
|
491
|
+
"SourceMap",
|
|
492
|
+
CoreMRSourceMap_$reflection()
|
|
493
|
+
]
|
|
494
|
+
]);
|
|
495
|
+
}
|
|
496
|
+
function getFieldOptions(field) {
|
|
497
|
+
const matchValue = field.FieldType;
|
|
498
|
+
let matchResult, info_1, info_2;
|
|
499
|
+
switch(matchValue.tag){
|
|
500
|
+
case /* Dropdown */ 14:
|
|
501
|
+
{
|
|
502
|
+
matchResult = 0;
|
|
503
|
+
break;
|
|
504
|
+
}
|
|
505
|
+
case /* Radio */ 12:
|
|
506
|
+
{
|
|
507
|
+
matchResult = 1;
|
|
508
|
+
info_1 = matchValue.fields[0];
|
|
509
|
+
break;
|
|
510
|
+
}
|
|
511
|
+
case /* SingleChoice */ 13:
|
|
512
|
+
{
|
|
513
|
+
matchResult = 1;
|
|
514
|
+
info_1 = matchValue.fields[0];
|
|
515
|
+
break;
|
|
516
|
+
}
|
|
517
|
+
case /* MultiChoice */ 15:
|
|
518
|
+
{
|
|
519
|
+
matchResult = 2;
|
|
520
|
+
info_2 = matchValue.fields[0];
|
|
521
|
+
break;
|
|
522
|
+
}
|
|
523
|
+
case /* CheckboxList */ 16:
|
|
524
|
+
{
|
|
525
|
+
matchResult = 2;
|
|
526
|
+
info_2 = matchValue.fields[0];
|
|
527
|
+
break;
|
|
528
|
+
}
|
|
529
|
+
case /* TagList */ 17:
|
|
530
|
+
{
|
|
531
|
+
matchResult = 2;
|
|
532
|
+
info_2 = matchValue.fields[0];
|
|
533
|
+
break;
|
|
534
|
+
}
|
|
535
|
+
default:
|
|
536
|
+
matchResult = 3;
|
|
537
|
+
}
|
|
538
|
+
switch(matchResult){
|
|
539
|
+
case 0:
|
|
540
|
+
return matchValue.fields[0].Options;
|
|
541
|
+
case 1:
|
|
542
|
+
return info_1.Options;
|
|
543
|
+
case 2:
|
|
544
|
+
return info_2.Options;
|
|
545
|
+
default:
|
|
546
|
+
return (0, _List.empty)();
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
function buildFieldAnchor(item, choices, field) {
|
|
550
|
+
const encoding = getValueEncoding(item.ItemTypeId);
|
|
551
|
+
const sortedChoices = (0, _List.sortBy)((c)=>c.Sequence, choices, {
|
|
552
|
+
Compare: _Util.comparePrimitives
|
|
553
|
+
});
|
|
554
|
+
const fieldOptions = getFieldOptions(field);
|
|
555
|
+
return new CoreMRFieldAnchor(item.ItemId, item.ItemTypeId, item.Sequence, item.NestingLevel, item.Label, item.IsRequired, item.SequenceText, item.Code, item.Uuid, item.GenderRequired, encoding, (0, _List.mapIndexed)((i, choice)=>new CoreMRChoiceAnchor(choice.ChoiceId, choice.Sequence, choice.Text, choice.Score, choice.BitPosition, choice.Code, i < (0, _List.length)(fieldOptions) ? (0, _List.item)(i, fieldOptions).OptionKey : new _FormSpec.Shared_FieldOptionKey("00000000-0000-0000-0000-000000000000")), sortedChoices), field.FieldKey, (0, _List.empty)());
|
|
556
|
+
}
|
|
557
|
+
class ListMetadata extends _Types.Record {
|
|
558
|
+
constructor(IsIntake, IsScored, EncounterTypes){
|
|
559
|
+
super();
|
|
560
|
+
this.IsIntake = IsIntake;
|
|
561
|
+
this.IsScored = IsScored;
|
|
562
|
+
this.EncounterTypes = EncounterTypes;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
function ListMetadata_$reflection() {
|
|
566
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.CoreMRSourceMap.ListMetadata", [], ListMetadata, ()=>[
|
|
567
|
+
[
|
|
568
|
+
"IsIntake",
|
|
569
|
+
(0, _Reflection.option_type)(_Reflection.bool_type)
|
|
570
|
+
],
|
|
571
|
+
[
|
|
572
|
+
"IsScored",
|
|
573
|
+
(0, _Reflection.option_type)(_Reflection.bool_type)
|
|
574
|
+
],
|
|
575
|
+
[
|
|
576
|
+
"EncounterTypes",
|
|
577
|
+
(0, _Reflection.list_type)(_Reflection.string_type)
|
|
578
|
+
]
|
|
579
|
+
]);
|
|
580
|
+
}
|
|
581
|
+
function buildSourceMap(formData, formSpec, listMetadata) {
|
|
582
|
+
let matchValue;
|
|
583
|
+
const formCode = (0, _Option.defaultArg)(formSpec.Code, `CORE-${formData.Metadata.FormId}`);
|
|
584
|
+
const choicesByItem = (0, _Map.ofList)((0, _Seq2.List_groupBy)((c)=>c.ItemId, formData.Choices, {
|
|
585
|
+
Equals: (x, y)=>x === y,
|
|
586
|
+
GetHashCode: _Util.numberHash
|
|
587
|
+
}), {
|
|
588
|
+
Compare: _Util.comparePrimitives
|
|
589
|
+
});
|
|
590
|
+
let stepOrder = 0;
|
|
591
|
+
const stepMaps = (0, _List.choose)((section)=>{
|
|
592
|
+
stepOrder = stepOrder + 1 | 0;
|
|
593
|
+
const formStep = (0, _List.tryFind)((s)=>s.StepOrder === stepOrder, formSpec.Steps);
|
|
594
|
+
if (formStep != null) {
|
|
595
|
+
const step = (0, _Option.value)(formStep);
|
|
596
|
+
if ((0, _List.length)(section.Items) !== (0, _List.length)(step.Fields)) {
|
|
597
|
+
throw new Error(`CoreMR section mismatch: step ${stepOrder} has ${(0, _List.length)(section.Items)} section items but ${(0, _List.length)(step.Fields)} fields. Lengths must match.`);
|
|
598
|
+
}
|
|
599
|
+
const fieldAnchors = (0, _List.mapIndexed)((i, item)=>{
|
|
600
|
+
const field = (0, _List.item)(i, step.Fields);
|
|
601
|
+
return buildFieldAnchor(item, (0, _Option.defaultArg)((0, _Map.tryFind)(item.ItemId, choicesByItem), (0, _List.empty)()), field);
|
|
602
|
+
}, section.Items);
|
|
603
|
+
const headingItemId = (0, _Option.map)((h)=>h.ItemId, section.Heading);
|
|
604
|
+
return new CoreMRStepMap(stepOrder, new CoreMRStepAnchor(headingItemId, section.HeadingSequence, section.HeadingLabel), fieldAnchors);
|
|
605
|
+
} else {
|
|
606
|
+
return undefined;
|
|
607
|
+
}
|
|
608
|
+
}, (0, _CorEMRSectioning.groupItemsByHeadings)((0, _CorEMRSectioning.detectHeadings)(formData.Items), formData.Items));
|
|
609
|
+
const listMeta = (0, _Option.defaultArg)(listMetadata, new ListMetadata(undefined, undefined, (0, _List.empty)()));
|
|
610
|
+
return new CoreMRSourceMap(formData.Metadata.FormId, formData.Metadata.VersionId, formData.Metadata.VersionNumber, formData.Metadata.FormName, formCode, "name", formData.Metadata.Description, (matchValue = listMeta.IsIntake, matchValue == null ? formData.Metadata.IsIntake : (0, _Option.value)(matchValue)), formData.Metadata.RequiresSignature, listMeta.IsScored, listMeta.EncounterTypes, undefined, undefined, undefined, undefined, stepMaps, (0, _List.empty)(), formData.Triggers, formData.Tags, formSpec.Id);
|
|
611
|
+
}
|
|
612
|
+
function convertWithMap(formData, listMetadata) {
|
|
613
|
+
const formSpec = (0, _CorEMRTemplateToFormSpec.convertToFormSpec)(formData);
|
|
614
|
+
return new CoreMRConversionResult(formSpec, buildSourceMap(formData, formSpec, listMetadata));
|
|
615
|
+
}
|
|
616
|
+
function convertWithMapAndProvenance(formData, listMetadata) {
|
|
617
|
+
const result = convertWithMap(formData, listMetadata);
|
|
618
|
+
const bind$0040 = result.FormSpec;
|
|
619
|
+
return new _FormSpec.Spec_FormSpec$1(bind$0040.Id, bind$0040.Code, bind$0040.Title, bind$0040.Abstract, bind$0040.Version, bind$0040.FormSpecVersion, bind$0040.Steps, bind$0040.CategoryTags, bind$0040.Score, bind$0040.AssociatedCodes, bind$0040.RequiresReview, bind$0040.RequiresReviewAndApproval, bind$0040.ClinicalPathway, bind$0040.Lifecycle, bind$0040.FilledMeta, bind$0040.CustomData, new _Provenance.IntegrationProvenance("coremr", (0, _Encodefs.toString)(0, (0, _Encodefs.Auto_generateBoxedEncoder_437914C6)(CoreMRSourceMap_$reflection(), undefined, undefined, undefined)(result.SourceMap))));
|
|
620
|
+
} //# sourceMappingURL=CoreMRSourceMap.ts.map
|
|
621
|
+
|
|
622
|
+
//# sourceMappingURL=CoreMRSourceMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts","../../../../fable_modules/Thoth.Json.10.4.1/Encode.fs"],"names":["e","toValueEncodingInfo","itemTypeId","matchValue","field","info","encoding","getValueEncoding","item","sortedChoices","c","choices","fieldOptions","getFieldOptions","choice","i","formCode","formSpec","formData","choicesByItem","stepOrder","stepMaps","formStep","s","step","section","fieldAnchors","buildFieldAnchor","headingItemId","h","listMeta","listMetadata","buildSourceMap","result","convertWithMap","``bind@``"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAuCQ,IAAA,kBAAkBA,EAAAA,aAAAA,EAAiCA,EAAAA,aAAAA,EACnCA,EAAAA,WAAAA,EAA4BA,EAAAA,UAAAA,EAAuBA,EAAAA,MAAAA;;;WAGbC,wBAAtD,wCAAA,EAAwCC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,WAAA,WAAA,WD9bkCF,OAAAA,SAAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.fs","../../../../fable_modules/Thoth.Json.10.4.1/Encode.fs"],"names":["e","toValueEncodingInfo","itemTypeId","matchValue","field","info","encoding","getValueEncoding","item","sortedChoices","c","choices","fieldOptions","getFieldOptions","choice","i","formCode","formSpec","formData","choicesByItem","stepOrder","stepMaps","formStep","s","step","section","fieldAnchors","buildFieldAnchor","headingItemId","h","listMeta","listMetadata","buildSourceMap","result","convertWithMap","\u0060\u0060bind@\u0060\u0060"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAuCQ,sBAAkB,AAAAA,iBAAiC,AAAAA,iBACnC,AAAAA,eAA4B,AAAAA,cAAuB,AAAAA;;;;WAGb,AAAAC,oBAAtD,mBAAwCC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6HlCC,8CAAA,AAAAC;4BAEEC,\u002BBACMA;YAHRF;;;;;;;AAEEE,qBAFF,AAEJF;;;;;AAAME,qBAFF,AAESF;;;;;AACDE,qBAHR,AAGJF;;;;;AAAYE,qBAHR,AAGeF;;;;;AAAPE,qBAHR,AAGmCF;;;;;;;;AAFtB,mBAAA,AAAAA;;AACiB,mBAAA,AAAAE;;AACqB,mBAAA,AAAAA;;AAClD,mBAAA;;;;;;;;AAIHC,wCAAW,AAAAC,iBAAiB,AAAAC;AAC5BC,oDAA2B,wDAAsB,AAAAC,YAAjCC;;;AAChBC,yDAAe,AAAAC,gBAAgBT;AAkBnC,WAAA,sBACa,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