@f1studio/form-spec 5.0.0-alpha.168 → 5.0.0-alpha.169
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/BlueprintValidation.d.ts +6 -3
- package/FormSpec.FS/BlueprintValidation.d.ts.map +1 -1
- package/FormSpec.FS/BlueprintValidation.js +39 -15
- package/FormSpec.FS/BlueprintValidation.js.map +1 -1
- package/FormSpec.FS/Designer.d.ts.map +1 -1
- package/FormSpec.FS/Designer.js +1 -1
- package/FormSpec.FS/Designer.js.map +1 -1
- package/FormSpec.FS/FormSpec.d.ts +108 -58
- package/FormSpec.FS/FormSpec.d.ts.map +1 -1
- package/FormSpec.FS/FormSpec.js +319 -129
- package/FormSpec.FS/FormSpec.js.map +1 -1
- package/FormSpec.FS/FormSpecHelpers.d.ts.map +1 -1
- package/FormSpec.FS/FormSpecHelpers.js +1 -1
- package/FormSpec.FS/FormSpecHelpers.js.map +1 -1
- package/FormSpec.FS/FormSpecValues.d.ts.map +1 -1
- package/FormSpec.FS/FormSpecValues.js +5 -2
- package/FormSpec.FS/FormSpecValues.js.map +1 -1
- package/FormSpec.FS/Helpers.d.ts.map +1 -1
- package/FormSpec.FS/Helpers.js +14 -9
- package/FormSpec.FS/Helpers.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.js +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.d.ts +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.js +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.d.ts +3 -3
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.js +7 -5
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.js +11 -10
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.js +1 -9
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.d.ts +11 -4
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.js +30 -28
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.d.ts +3 -9
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js +4 -31
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js +2 -6
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRImportPipeline.d.ts +45 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRImportPipeline.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRImportPipeline.js +141 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRImportPipeline.js.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRImporterAnalysis.d.ts +326 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRImporterAnalysis.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRImporterAnalysis.js +1743 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRImporterAnalysis.js.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts +8 -8
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js +6 -6
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRTriggerEnrichment.d.ts +21 -15
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRTriggerEnrichment.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRTriggerEnrichment.js +83 -80
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRTriggerEnrichment.js.map +1 -1
- package/FormSpec.FS/Integrations/CorEMR/CoreMRPathwayMapper.d.ts +51 -0
- package/FormSpec.FS/Integrations/CorEMR/CoreMRPathwayMapper.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/CorEMR/CoreMRPathwayMapper.js +939 -0
- package/FormSpec.FS/Integrations/CorEMR/CoreMRPathwayMapper.js.map +1 -0
- package/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.d.ts +2 -17
- package/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.js +1 -66
- package/FormSpec.FS/Integrations/CorEMR/{TemplateManifestDecoder.d.ts → FormTemplateDecoder.d.ts} +53 -45
- package/FormSpec.FS/Integrations/CorEMR/FormTemplateDecoder.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/CorEMR/{TemplateManifestDecoder.js → FormTemplateDecoder.js} +544 -254
- package/FormSpec.FS/Integrations/CorEMR/FormTemplateDecoder.js.map +1 -0
- package/FormSpec.FS/Integrations/CorEMR/FormTemplateDomainDecoder.d.ts +7 -0
- package/FormSpec.FS/Integrations/CorEMR/FormTemplateDomainDecoder.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/CorEMR/FormTemplateDomainDecoder.js +280 -0
- package/FormSpec.FS/Integrations/CorEMR/FormTemplateDomainDecoder.js.map +1 -0
- package/FormSpec.FS/Interop/FormSpec.Api.Helpers.d.ts +16 -4
- package/FormSpec.FS/Interop/FormSpec.Api.Helpers.d.ts.map +1 -1
- package/FormSpec.FS/Interop/FormSpec.Api.Helpers.js +63 -18
- package/FormSpec.FS/Interop/FormSpec.Api.Helpers.js.map +1 -1
- package/FormSpec.FS/Interop/FormSpec.Api.Option.d.ts +4 -4
- package/FormSpec.FS/Interop/FormSpec.Api.Option.d.ts.map +1 -1
- package/FormSpec.FS/Interop/FormSpec.Api.Option.js +2 -2
- package/FormSpec.FS/Interop/FormSpec.Api.Option.js.map +1 -1
- package/FormSpec.FS/PathwayDataExtractor.d.ts.map +1 -1
- package/FormSpec.FS/PathwayDataExtractor.js +39 -18
- package/FormSpec.FS/PathwayDataExtractor.js.map +1 -1
- package/FormSpec.FS/PathwayExecutor.d.ts +10 -10
- package/FormSpec.FS/PathwayExecutor.d.ts.map +1 -1
- package/FormSpec.FS/PathwayExecutor.js +14 -14
- package/FormSpec.FS/PathwayExecutor.js.map +1 -1
- package/FormSpec.FS/PathwayValidator.d.ts.map +1 -1
- package/FormSpec.FS/PathwayValidator.js +8 -5
- package/FormSpec.FS/PathwayValidator.js.map +1 -1
- package/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.d.ts.map +1 -1
- package/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.js +16 -7
- package/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.js.map +1 -1
- package/FormSpec.FS/Renderers/MermaidRenderer.d.ts.map +1 -1
- package/FormSpec.FS/Renderers/MermaidRenderer.js +4 -8
- package/FormSpec.FS/Renderers/MermaidRenderer.js.map +1 -1
- package/FormSpec.FS/Renderers/PathwayRenderers.d.ts.map +1 -1
- package/FormSpec.FS/Renderers/PathwayRenderers.js +5 -4
- package/FormSpec.FS/Renderers/PathwayRenderers.js.map +1 -1
- package/FormSpec.FS/TriggerActionDto.d.ts +32 -21
- package/FormSpec.FS/TriggerActionDto.d.ts.map +1 -1
- package/FormSpec.FS/TriggerActionDto.js +247 -61
- package/FormSpec.FS/TriggerActionDto.js.map +1 -1
- package/README.md +7 -7
- package/Thoth.Json/packages/Thoth.Json/Encode.js.map +1 -1
- package/package.json +1 -1
- package/plugins/allergyfinder/src/AllergyFinderField.d.ts.map +1 -1
- package/plugins/allergyfinder/src/AllergyFinderField.js +2 -2
- package/plugins/allergyfinder/src/AllergyFinderField.js.map +1 -1
- package/plugins/bmi/src/BMIField.d.ts.map +1 -1
- package/plugins/bmi/src/BMIField.js +21 -15
- package/plugins/bmi/src/BMIField.js.map +1 -1
- package/plugins/demographics/src/DemographicsField.d.ts.map +1 -1
- package/plugins/demographics/src/DemographicsField.js +4 -4
- package/plugins/demographics/src/DemographicsField.js.map +1 -1
- package/plugins/likert/src/LikertField.d.ts.map +1 -1
- package/plugins/likert/src/LikertField.js +40 -35
- package/plugins/likert/src/LikertField.js.map +1 -1
- package/plugins/signature/src/SignatureField.d.ts.map +1 -1
- package/plugins/signature/src/SignatureField.js +4 -3
- package/plugins/signature/src/SignatureField.js.map +1 -1
- package/plugins/vitals/src/VitalsField.d.ts.map +1 -1
- package/plugins/vitals/src/VitalsField.js +4 -4
- package/plugins/vitals/src/VitalsField.js.map +1 -1
- package/src/FormSpec.FS/BlueprintValidation.ts +55 -24
- package/src/FormSpec.FS/Designer.ts +2 -2
- package/src/FormSpec.FS/FormSpec.ts +223 -100
- package/src/FormSpec.FS/FormSpecHelpers.ts +2 -2
- package/src/FormSpec.FS/FormSpecValues.ts +6 -3
- package/src/FormSpec.FS/Helpers.ts +16 -11
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.ts +2 -2
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.ts +3 -3
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.ts +10 -8
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.ts +6 -5
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.ts +1 -10
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.ts +35 -30
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts +7 -26
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts +2 -6
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRImportPipeline.ts +115 -0
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRImporterAnalysis.ts +1059 -0
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts +10 -10
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRTriggerEnrichment.ts +61 -88
- package/src/FormSpec.FS/Integrations/CorEMR/CoreMRPathwayMapper.ts +926 -0
- package/src/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.ts +3 -37
- package/src/FormSpec.FS/Integrations/CorEMR/FormTemplateDecoder.ts +1284 -0
- package/src/FormSpec.FS/Integrations/CorEMR/FormTemplateDomainDecoder.ts +287 -0
- package/src/FormSpec.FS/Interop/FormSpec.Api.Helpers.ts +76 -25
- package/src/FormSpec.FS/Interop/FormSpec.Api.Option.ts +6 -6
- package/src/FormSpec.FS/PathwayDataExtractor.ts +40 -20
- package/src/FormSpec.FS/PathwayExecutor.ts +26 -26
- package/src/FormSpec.FS/PathwayValidator.ts +8 -5
- package/src/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.ts +18 -8
- package/src/FormSpec.FS/Renderers/MermaidRenderer.ts +6 -10
- package/src/FormSpec.FS/Renderers/PathwayRenderers.ts +5 -5
- package/src/FormSpec.FS/TriggerActionDto.ts +247 -74
- package/src/plugins/allergyfinder/src/AllergyFinderField.ts +3 -3
- package/src/plugins/bmi/src/BMIField.ts +12 -5
- package/src/plugins/demographics/src/DemographicsField.ts +5 -5
- package/src/plugins/likert/src/LikertField.ts +16 -11
- package/src/plugins/signature/src/SignatureField.ts +4 -3
- package/src/plugins/vitals/src/VitalsField.ts +5 -5
- package/src/vye-os-contracts-fs/src/CoreMR/FormTemplate.ts +715 -0
- package/vye-os-contracts-fs/src/CoreMR/FormTemplate.d.ts +310 -0
- package/vye-os-contracts-fs/src/CoreMR/FormTemplate.d.ts.map +1 -0
- package/vye-os-contracts-fs/src/CoreMR/FormTemplate.js +1242 -0
- package/vye-os-contracts-fs/src/CoreMR/FormTemplate.js.map +1 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.d.ts +0 -69
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.d.ts.map +0 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.js +0 -447
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.js.map +0 -1
- package/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.d.ts +0 -19
- package/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.d.ts.map +0 -1
- package/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.js +0 -643
- package/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.js.map +0 -1
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.d.ts.map +0 -1
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.js.map +0 -1
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.ts +0 -412
- package/src/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.ts +0 -588
- package/src/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.ts +0 -1054
package/FormSpec.FS/Integrations/CorEMR/{TemplateManifestDecoder.js → FormTemplateDecoder.js}
RENAMED
|
@@ -48,18 +48,30 @@ _export(exports, {
|
|
|
48
48
|
get EncounterTypes_$reflection () {
|
|
49
49
|
return EncounterTypes_$reflection;
|
|
50
50
|
},
|
|
51
|
-
get FormDeclarations () {
|
|
52
|
-
return FormDeclarations;
|
|
53
|
-
},
|
|
54
|
-
get FormDeclarations_$reflection () {
|
|
55
|
-
return FormDeclarations_$reflection;
|
|
56
|
-
},
|
|
57
51
|
get FormScoring () {
|
|
58
52
|
return FormScoring;
|
|
59
53
|
},
|
|
60
54
|
get FormScoring_$reflection () {
|
|
61
55
|
return FormScoring_$reflection;
|
|
62
56
|
},
|
|
57
|
+
get FormTemplateAnswer () {
|
|
58
|
+
return FormTemplateAnswer;
|
|
59
|
+
},
|
|
60
|
+
get FormTemplateAnswer_$reflection () {
|
|
61
|
+
return FormTemplateAnswer_$reflection;
|
|
62
|
+
},
|
|
63
|
+
get FormTemplateAnswer_NotInCatalog () {
|
|
64
|
+
return FormTemplateAnswer_NotInCatalog;
|
|
65
|
+
},
|
|
66
|
+
get FormTemplateAnswer_Served () {
|
|
67
|
+
return FormTemplateAnswer_Served;
|
|
68
|
+
},
|
|
69
|
+
get FormTemplateServed () {
|
|
70
|
+
return FormTemplateServed;
|
|
71
|
+
},
|
|
72
|
+
get FormTemplateServed_$reflection () {
|
|
73
|
+
return FormTemplateServed_$reflection;
|
|
74
|
+
},
|
|
63
75
|
get InstrumentMapEntry () {
|
|
64
76
|
return InstrumentMapEntry;
|
|
65
77
|
},
|
|
@@ -129,6 +141,12 @@ _export(exports, {
|
|
|
129
141
|
get ScoringLabel_$reflection () {
|
|
130
142
|
return ScoringLabel_$reflection;
|
|
131
143
|
},
|
|
144
|
+
get SiteCatalog () {
|
|
145
|
+
return SiteCatalog;
|
|
146
|
+
},
|
|
147
|
+
get SiteCatalog_$reflection () {
|
|
148
|
+
return SiteCatalog_$reflection;
|
|
149
|
+
},
|
|
132
150
|
get TemplateChoice () {
|
|
133
151
|
return TemplateChoice;
|
|
134
152
|
},
|
|
@@ -147,12 +165,6 @@ _export(exports, {
|
|
|
147
165
|
get TemplateItem_$reflection () {
|
|
148
166
|
return TemplateItem_$reflection;
|
|
149
167
|
},
|
|
150
|
-
get TemplateManifest () {
|
|
151
|
-
return TemplateManifest;
|
|
152
|
-
},
|
|
153
|
-
get TemplateManifest_$reflection () {
|
|
154
|
-
return TemplateManifest_$reflection;
|
|
155
|
-
},
|
|
156
168
|
get TemplateStats () {
|
|
157
169
|
return TemplateStats;
|
|
158
170
|
},
|
|
@@ -180,20 +192,14 @@ _export(exports, {
|
|
|
180
192
|
get carriesTextOrDate () {
|
|
181
193
|
return carriesTextOrDate;
|
|
182
194
|
},
|
|
183
|
-
get
|
|
184
|
-
return
|
|
195
|
+
get decodeFormTemplateAnswer () {
|
|
196
|
+
return decodeFormTemplateAnswer;
|
|
185
197
|
},
|
|
186
|
-
get
|
|
187
|
-
return
|
|
198
|
+
get decodeFormTemplateBatch () {
|
|
199
|
+
return decodeFormTemplateBatch;
|
|
188
200
|
},
|
|
189
|
-
get
|
|
190
|
-
return
|
|
191
|
-
},
|
|
192
|
-
get releaseAvailabilityDecoder () {
|
|
193
|
-
return releaseAvailabilityDecoder;
|
|
194
|
-
},
|
|
195
|
-
get templateFormDecoder () {
|
|
196
|
-
return templateFormDecoder;
|
|
201
|
+
get decodeSiteCatalog () {
|
|
202
|
+
return decodeSiteCatalog;
|
|
197
203
|
}
|
|
198
204
|
});
|
|
199
205
|
const _Types = require("@fable-org/fable-library-js/Types.js");
|
|
@@ -206,6 +212,9 @@ const _Map = require("@fable-org/fable-library-js/Map.js");
|
|
|
206
212
|
const _Decode = require("../../../Thoth.Json/packages/Thoth.Json/Decode.js");
|
|
207
213
|
const _Result = require("@fable-org/fable-library-js/Result.js");
|
|
208
214
|
const _Seq = require("@fable-org/fable-library-js/Seq.js");
|
|
215
|
+
const _FormTemplate = require("../../../vye-os-contracts-fs/src/CoreMR/FormTemplate.js");
|
|
216
|
+
const _FormTemplateDomainDecoder = require("./FormTemplateDomainDecoder.js");
|
|
217
|
+
const _Set = require("@fable-org/fable-library-js/Set.js");
|
|
209
218
|
function ReleaseAvailability$1_Stated(Item) {
|
|
210
219
|
return new ReleaseAvailability$1(0, [
|
|
211
220
|
Item
|
|
@@ -235,7 +244,7 @@ class ReleaseAvailability$1 extends _Types.Union {
|
|
|
235
244
|
}
|
|
236
245
|
}
|
|
237
246
|
function ReleaseAvailability$1_$reflection(gen0) {
|
|
238
|
-
return (0, _Reflection.union_type)("FormSpec.Integrations.CorEMR.
|
|
247
|
+
return (0, _Reflection.union_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.ReleaseAvailability`1", [
|
|
239
248
|
gen0
|
|
240
249
|
], ReleaseAvailability$1, ()=>[
|
|
241
250
|
[
|
|
@@ -358,7 +367,7 @@ class TemplateChoice extends _Types.Record {
|
|
|
358
367
|
}
|
|
359
368
|
}
|
|
360
369
|
function TemplateChoice_$reflection() {
|
|
361
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
370
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.TemplateChoice", [], TemplateChoice, ()=>[
|
|
362
371
|
[
|
|
363
372
|
"ChoiceId",
|
|
364
373
|
_Reflection.int32_type
|
|
@@ -393,7 +402,7 @@ class TriggerCondition extends _Types.Record {
|
|
|
393
402
|
constructor(ConditionId, SourceFieldId, Source, Operator, Values, RawChoiceIds, BooleanOperator){
|
|
394
403
|
super();
|
|
395
404
|
this.ConditionId = ConditionId | 0;
|
|
396
|
-
this.SourceFieldId = SourceFieldId
|
|
405
|
+
this.SourceFieldId = SourceFieldId;
|
|
397
406
|
this.Source = Source;
|
|
398
407
|
this.Operator = Operator;
|
|
399
408
|
this.Values = Values;
|
|
@@ -402,14 +411,14 @@ class TriggerCondition extends _Types.Record {
|
|
|
402
411
|
}
|
|
403
412
|
}
|
|
404
413
|
function TriggerCondition_$reflection() {
|
|
405
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
414
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.TriggerCondition", [], TriggerCondition, ()=>[
|
|
406
415
|
[
|
|
407
416
|
"ConditionId",
|
|
408
417
|
_Reflection.int32_type
|
|
409
418
|
],
|
|
410
419
|
[
|
|
411
420
|
"SourceFieldId",
|
|
412
|
-
_Reflection.int32_type
|
|
421
|
+
(0, _Reflection.option_type)(_Reflection.int32_type)
|
|
413
422
|
],
|
|
414
423
|
[
|
|
415
424
|
"Source",
|
|
@@ -429,20 +438,21 @@ function TriggerCondition_$reflection() {
|
|
|
429
438
|
],
|
|
430
439
|
[
|
|
431
440
|
"BooleanOperator",
|
|
432
|
-
_Reflection.string_type
|
|
441
|
+
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
433
442
|
]
|
|
434
443
|
]);
|
|
435
444
|
}
|
|
436
445
|
class TriggerAction extends _Types.Record {
|
|
437
|
-
constructor(ActionId, ActionType, Params){
|
|
446
|
+
constructor(ActionId, ActionType, Params, ListParams){
|
|
438
447
|
super();
|
|
439
448
|
this.ActionId = ActionId | 0;
|
|
440
449
|
this.ActionType = ActionType;
|
|
441
450
|
this.Params = Params;
|
|
451
|
+
this.ListParams = ListParams;
|
|
442
452
|
}
|
|
443
453
|
}
|
|
444
454
|
function TriggerAction_$reflection() {
|
|
445
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
455
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.TriggerAction", [], TriggerAction, ()=>[
|
|
446
456
|
[
|
|
447
457
|
"ActionId",
|
|
448
458
|
_Reflection.int32_type
|
|
@@ -457,6 +467,13 @@ function TriggerAction_$reflection() {
|
|
|
457
467
|
_Reflection.string_type,
|
|
458
468
|
_Reflection.string_type
|
|
459
469
|
])
|
|
470
|
+
],
|
|
471
|
+
[
|
|
472
|
+
"ListParams",
|
|
473
|
+
(0, _Reflection.option_type)((0, _Reflection.class_type)("Microsoft.FSharp.Collections.FSharpMap`2", [
|
|
474
|
+
_Reflection.string_type,
|
|
475
|
+
(0, _Reflection.list_type)(_Reflection.string_type)
|
|
476
|
+
]))
|
|
460
477
|
]
|
|
461
478
|
]);
|
|
462
479
|
}
|
|
@@ -472,7 +489,7 @@ class ItemTrigger extends _Types.Record {
|
|
|
472
489
|
}
|
|
473
490
|
}
|
|
474
491
|
function ItemTrigger_$reflection() {
|
|
475
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
492
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.ItemTrigger", [], ItemTrigger, ()=>[
|
|
476
493
|
[
|
|
477
494
|
"TriggerId",
|
|
478
495
|
_Reflection.int32_type
|
|
@@ -518,7 +535,7 @@ class TemplateItem extends _Types.Record {
|
|
|
518
535
|
}
|
|
519
536
|
}
|
|
520
537
|
function TemplateItem_$reflection() {
|
|
521
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
538
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.TemplateItem", [], TemplateItem, ()=>[
|
|
522
539
|
[
|
|
523
540
|
"ItemId",
|
|
524
541
|
_Reflection.int32_type
|
|
@@ -583,7 +600,7 @@ class EncounterTypes extends _Types.Record {
|
|
|
583
600
|
}
|
|
584
601
|
}
|
|
585
602
|
function EncounterTypes_$reflection() {
|
|
586
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
603
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.EncounterTypes", [], EncounterTypes, ()=>[
|
|
587
604
|
[
|
|
588
605
|
"Medical",
|
|
589
606
|
_Reflection.bool_type
|
|
@@ -610,7 +627,7 @@ class ScoringLabel extends _Types.Record {
|
|
|
610
627
|
}
|
|
611
628
|
}
|
|
612
629
|
function ScoringLabel_$reflection() {
|
|
613
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
630
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.ScoringLabel", [], ScoringLabel, ()=>[
|
|
614
631
|
[
|
|
615
632
|
"Name",
|
|
616
633
|
_Reflection.string_type
|
|
@@ -631,7 +648,7 @@ class FormScoring extends _Types.Record {
|
|
|
631
648
|
}
|
|
632
649
|
}
|
|
633
650
|
function FormScoring_$reflection() {
|
|
634
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
651
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.FormScoring", [], FormScoring, ()=>[
|
|
635
652
|
[
|
|
636
653
|
"ScoreId",
|
|
637
654
|
_Reflection.int32_type
|
|
@@ -676,7 +693,7 @@ class TemplateForm extends _Types.Record {
|
|
|
676
693
|
}
|
|
677
694
|
}
|
|
678
695
|
function TemplateForm_$reflection() {
|
|
679
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
696
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.TemplateForm", [], TemplateForm, ()=>[
|
|
680
697
|
[
|
|
681
698
|
"FormId",
|
|
682
699
|
_Reflection.int32_type
|
|
@@ -707,7 +724,7 @@ function TemplateForm_$reflection() {
|
|
|
707
724
|
],
|
|
708
725
|
[
|
|
709
726
|
"Usage",
|
|
710
|
-
_Reflection.string_type
|
|
727
|
+
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
711
728
|
],
|
|
712
729
|
[
|
|
713
730
|
"RequiresSignature",
|
|
@@ -755,7 +772,7 @@ class ElementTypeEntry extends _Types.Record {
|
|
|
755
772
|
}
|
|
756
773
|
}
|
|
757
774
|
function ElementTypeEntry_$reflection() {
|
|
758
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
775
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.ElementTypeEntry", [], ElementTypeEntry, ()=>[
|
|
759
776
|
[
|
|
760
777
|
"Label",
|
|
761
778
|
_Reflection.string_type
|
|
@@ -796,7 +813,7 @@ class ElementTypesFrom extends _Types.Union {
|
|
|
796
813
|
}
|
|
797
814
|
}
|
|
798
815
|
function ElementTypesFrom_$reflection() {
|
|
799
|
-
return (0, _Reflection.union_type)("FormSpec.Integrations.CorEMR.
|
|
816
|
+
return (0, _Reflection.union_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.ElementTypesFrom", [], ElementTypesFrom, ()=>[
|
|
800
817
|
[
|
|
801
818
|
[
|
|
802
819
|
"table",
|
|
@@ -837,7 +854,7 @@ class InstrumentMapEntry extends _Types.Record {
|
|
|
837
854
|
}
|
|
838
855
|
}
|
|
839
856
|
function InstrumentMapEntry_$reflection() {
|
|
840
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
857
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.InstrumentMapEntry", [], InstrumentMapEntry, ()=>[
|
|
841
858
|
[
|
|
842
859
|
"InstrumentType",
|
|
843
860
|
_Reflection.string_type
|
|
@@ -874,7 +891,7 @@ class CodeExtractionStats extends _Types.Record {
|
|
|
874
891
|
}
|
|
875
892
|
}
|
|
876
893
|
function CodeExtractionStats_$reflection() {
|
|
877
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
894
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.CodeExtractionStats", [], CodeExtractionStats, ()=>[
|
|
878
895
|
[
|
|
879
896
|
"Extracted",
|
|
880
897
|
_Reflection.int32_type
|
|
@@ -905,7 +922,7 @@ class TriggerStats extends _Types.Record {
|
|
|
905
922
|
}
|
|
906
923
|
}
|
|
907
924
|
function TriggerStats_$reflection() {
|
|
908
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
925
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.TriggerStats", [], TriggerStats, ()=>[
|
|
909
926
|
[
|
|
910
927
|
"FormsWithTriggers",
|
|
911
928
|
_Reflection.int32_type
|
|
@@ -936,7 +953,7 @@ class TemplateStats extends _Types.Record {
|
|
|
936
953
|
}
|
|
937
954
|
}
|
|
938
955
|
function TemplateStats_$reflection() {
|
|
939
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
956
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.TemplateStats", [], TemplateStats, ()=>[
|
|
940
957
|
[
|
|
941
958
|
"TotalForms",
|
|
942
959
|
_Reflection.int32_type
|
|
@@ -982,7 +999,7 @@ class CoreEmrInfo extends _Types.Record {
|
|
|
982
999
|
}
|
|
983
1000
|
}
|
|
984
1001
|
function CoreEmrInfo_$reflection() {
|
|
985
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
1002
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.CoreEmrInfo", [], CoreEmrInfo, ()=>[
|
|
986
1003
|
[
|
|
987
1004
|
"AppVersion",
|
|
988
1005
|
_Reflection.string_type
|
|
@@ -1008,7 +1025,7 @@ class InstrumentMapStats extends _Types.Record {
|
|
|
1008
1025
|
}
|
|
1009
1026
|
}
|
|
1010
1027
|
function InstrumentMapStats_$reflection() {
|
|
1011
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
1028
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.InstrumentMapStats", [], InstrumentMapStats, ()=>[
|
|
1012
1029
|
[
|
|
1013
1030
|
"Total",
|
|
1014
1031
|
_Reflection.int32_type
|
|
@@ -1046,7 +1063,7 @@ class ScoringCatalog extends _Types.Record {
|
|
|
1046
1063
|
}
|
|
1047
1064
|
}
|
|
1048
1065
|
function ScoringCatalog_$reflection() {
|
|
1049
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
1066
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.ScoringCatalog", [], ScoringCatalog, ()=>[
|
|
1050
1067
|
[
|
|
1051
1068
|
"InstrumentMap",
|
|
1052
1069
|
(0, _Reflection.class_type)("Microsoft.FSharp.Collections.FSharpMap`2", [
|
|
@@ -1064,76 +1081,6 @@ function ScoringCatalog_$reflection() {
|
|
|
1064
1081
|
]
|
|
1065
1082
|
]);
|
|
1066
1083
|
}
|
|
1067
|
-
class TemplateManifest extends _Types.Record {
|
|
1068
|
-
constructor(Schema, Version, GeneratedAt, GeneratedFrom, CoreEmr, Stats, ElementTypes, ElementTypesFrom, Forms, Scoring, Triggers){
|
|
1069
|
-
super();
|
|
1070
|
-
this.Schema = Schema;
|
|
1071
|
-
this.Version = Version | 0;
|
|
1072
|
-
this.GeneratedAt = GeneratedAt;
|
|
1073
|
-
this.GeneratedFrom = GeneratedFrom;
|
|
1074
|
-
this.CoreEmr = CoreEmr;
|
|
1075
|
-
this.Stats = Stats;
|
|
1076
|
-
this.ElementTypes = ElementTypes;
|
|
1077
|
-
this.ElementTypesFrom = ElementTypesFrom;
|
|
1078
|
-
this.Forms = Forms;
|
|
1079
|
-
this.Scoring = Scoring;
|
|
1080
|
-
this.Triggers = Triggers;
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
|
-
function TemplateManifest_$reflection() {
|
|
1084
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.TemplateManifestDecoder.TemplateManifest", [], TemplateManifest, ()=>[
|
|
1085
|
-
[
|
|
1086
|
-
"Schema",
|
|
1087
|
-
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
1088
|
-
],
|
|
1089
|
-
[
|
|
1090
|
-
"Version",
|
|
1091
|
-
_Reflection.int32_type
|
|
1092
|
-
],
|
|
1093
|
-
[
|
|
1094
|
-
"GeneratedAt",
|
|
1095
|
-
_Reflection.string_type
|
|
1096
|
-
],
|
|
1097
|
-
[
|
|
1098
|
-
"GeneratedFrom",
|
|
1099
|
-
_Reflection.string_type
|
|
1100
|
-
],
|
|
1101
|
-
[
|
|
1102
|
-
"CoreEmr",
|
|
1103
|
-
CoreEmrInfo_$reflection()
|
|
1104
|
-
],
|
|
1105
|
-
[
|
|
1106
|
-
"Stats",
|
|
1107
|
-
TemplateStats_$reflection()
|
|
1108
|
-
],
|
|
1109
|
-
[
|
|
1110
|
-
"ElementTypes",
|
|
1111
|
-
(0, _Reflection.option_type)((0, _Reflection.class_type)("Microsoft.FSharp.Collections.FSharpMap`2", [
|
|
1112
|
-
_Reflection.string_type,
|
|
1113
|
-
ElementTypeEntry_$reflection()
|
|
1114
|
-
]))
|
|
1115
|
-
],
|
|
1116
|
-
[
|
|
1117
|
-
"ElementTypesFrom",
|
|
1118
|
-
ElementTypesFrom_$reflection()
|
|
1119
|
-
],
|
|
1120
|
-
[
|
|
1121
|
-
"Forms",
|
|
1122
|
-
(0, _Reflection.class_type)("Microsoft.FSharp.Collections.FSharpMap`2", [
|
|
1123
|
-
_Reflection.string_type,
|
|
1124
|
-
TemplateForm_$reflection()
|
|
1125
|
-
])
|
|
1126
|
-
],
|
|
1127
|
-
[
|
|
1128
|
-
"Scoring",
|
|
1129
|
-
ReleaseAvailability$1_$reflection(ScoringCatalog_$reflection())
|
|
1130
|
-
],
|
|
1131
|
-
[
|
|
1132
|
-
"Triggers",
|
|
1133
|
-
ReleaseAvailability$1_$reflection(TriggerStats_$reflection())
|
|
1134
|
-
]
|
|
1135
|
-
]);
|
|
1136
|
-
}
|
|
1137
1084
|
const liberatedInt64Decoder = (0, _Decode.Auto_generateBoxedDecoder_Z6670B51)(_Reflection.int64_type, undefined, undefined);
|
|
1138
1085
|
function dictDecoder(decoder) {
|
|
1139
1086
|
let d;
|
|
@@ -1174,111 +1121,151 @@ function availabilityRowDecoder(field) {
|
|
|
1174
1121
|
}, path_7, v));
|
|
1175
1122
|
}
|
|
1176
1123
|
function join(field, row, datum) {
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
because_3 = (0, _Option.value)(row).fields[0];
|
|
1196
|
-
witness = (0, _Option.value)(row).fields[1];
|
|
1197
|
-
} else {
|
|
1198
|
-
matchResult = 4;
|
|
1199
|
-
because_1 = (0, _Option.value)(row).fields[0];
|
|
1200
|
-
}
|
|
1201
|
-
break;
|
|
1202
|
-
}
|
|
1203
|
-
default:
|
|
1204
|
-
if (datum == null) {
|
|
1205
|
-
matchResult = 2;
|
|
1206
|
-
} else {
|
|
1207
|
-
matchResult = 0;
|
|
1208
|
-
v = (0, _Option.value)(datum);
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
} else if (datum == null) {
|
|
1212
|
-
matchResult = 1;
|
|
1213
|
-
} else {
|
|
1214
|
-
matchResult = 0;
|
|
1215
|
-
v = (0, _Option.value)(datum);
|
|
1216
|
-
}
|
|
1217
|
-
switch(matchResult){
|
|
1218
|
-
case 0:
|
|
1219
|
-
return (0, _Result.FSharpResult$2_Ok)(ReleaseAvailability$1_Stated(v));
|
|
1220
|
-
case 1:
|
|
1221
|
-
return (0, _Result.FSharpResult$2_Error)((0, _String.toText)((0, _String.printf)("`%s` is absent and NOTHING DECLARES WHY. An undeclared absence cannot be read: it is indistinguishable from a release that does not state it, from one that states it and was not read, and from a payload that lost it in transit"))(field));
|
|
1222
|
-
case 2:
|
|
1223
|
-
return (0, _Result.FSharpResult$2_Error)((0, _String.toText)((0, _String.printf)("the manifest declares `%s` STATED by this release, but carries no `%s`"))(field)(field));
|
|
1224
|
-
case 3:
|
|
1225
|
-
return (0, _Result.FSharpResult$2_Error)((0, _String.toText)((0, _String.printf)("the manifest declares `%s` NOT IN THIS RELEASE (%s) and carries a value for it anyway"))(field)(because));
|
|
1226
|
-
case 4:
|
|
1227
|
-
return (0, _Result.FSharpResult$2_Error)((0, _String.toText)((0, _String.printf)("the manifest declares `%s` NOT READ YET (%s) and carries a value for it anyway"))(field)(because_1));
|
|
1228
|
-
case 5:
|
|
1229
|
-
return (0, _Result.FSharpResult$2_Ok)(ReleaseAvailability$1_NotInRelease(because_2));
|
|
1124
|
+
switch(row.tag){
|
|
1125
|
+
case /* NotInRelease */ 1:
|
|
1126
|
+
if (datum == null) {
|
|
1127
|
+
const because_2 = row.fields[0];
|
|
1128
|
+
return (0, _Result.FSharpResult$2_Ok)(ReleaseAvailability$1_NotInRelease(because_2));
|
|
1129
|
+
} else {
|
|
1130
|
+
const because = row.fields[0];
|
|
1131
|
+
return (0, _Result.FSharpResult$2_Error)((0, _String.toText)((0, _String.printf)("the answer declares `%s` NOT IN THIS RELEASE (%s) and carries a value for it anyway"))(field)(because));
|
|
1132
|
+
}
|
|
1133
|
+
case /* NotReadYet */ 2:
|
|
1134
|
+
if (datum == null) {
|
|
1135
|
+
const because_3 = row.fields[0];
|
|
1136
|
+
const witness = row.fields[1];
|
|
1137
|
+
return (0, _Result.FSharpResult$2_Ok)(ReleaseAvailability$1_NotReadYet(because_3, witness));
|
|
1138
|
+
} else {
|
|
1139
|
+
const because_1 = row.fields[0];
|
|
1140
|
+
return (0, _Result.FSharpResult$2_Error)((0, _String.toText)((0, _String.printf)("the answer declares `%s` NOT READ YET (%s) and carries a value for it anyway"))(field)(because_1));
|
|
1141
|
+
}
|
|
1230
1142
|
default:
|
|
1231
|
-
|
|
1143
|
+
if (datum == null) {
|
|
1144
|
+
return (0, _Result.FSharpResult$2_Error)((0, _String.toText)((0, _String.printf)("the answer declares `%s` STATED by this release, but carries no `%s`"))(field)(field));
|
|
1145
|
+
} else {
|
|
1146
|
+
const v = (0, _Option.value)(datum);
|
|
1147
|
+
return (0, _Result.FSharpResult$2_Ok)(ReleaseAvailability$1_Stated(v));
|
|
1148
|
+
}
|
|
1232
1149
|
}
|
|
1233
1150
|
}
|
|
1234
1151
|
class FormDeclarations extends _Types.Record {
|
|
1235
|
-
constructor(ItemNesting, Triggers, EncounterOther){
|
|
1152
|
+
constructor(ItemNesting, Triggers, EncounterOther, Scoring){
|
|
1236
1153
|
super();
|
|
1237
1154
|
this.ItemNesting = ItemNesting;
|
|
1238
1155
|
this.Triggers = Triggers;
|
|
1239
1156
|
this.EncounterOther = EncounterOther;
|
|
1157
|
+
this.Scoring = Scoring;
|
|
1240
1158
|
}
|
|
1241
1159
|
}
|
|
1242
1160
|
function FormDeclarations_$reflection() {
|
|
1243
|
-
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.
|
|
1161
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.FormDeclarations", [], FormDeclarations, ()=>[
|
|
1244
1162
|
[
|
|
1245
1163
|
"ItemNesting",
|
|
1246
|
-
|
|
1164
|
+
ReleaseAvailability$1_$reflection((0, _Reflection.list_type)(_Reflection.string_type))
|
|
1247
1165
|
],
|
|
1248
1166
|
[
|
|
1249
1167
|
"Triggers",
|
|
1250
|
-
|
|
1168
|
+
ReleaseAvailability$1_$reflection((0, _Reflection.list_type)(_Reflection.string_type))
|
|
1251
1169
|
],
|
|
1252
1170
|
[
|
|
1253
1171
|
"EncounterOther",
|
|
1254
|
-
|
|
1172
|
+
ReleaseAvailability$1_$reflection((0, _Reflection.list_type)(_Reflection.string_type))
|
|
1173
|
+
],
|
|
1174
|
+
[
|
|
1175
|
+
"Scoring",
|
|
1176
|
+
ReleaseAvailability$1_$reflection((0, _Reflection.list_type)(_Reflection.string_type))
|
|
1255
1177
|
]
|
|
1256
1178
|
]);
|
|
1257
1179
|
}
|
|
1258
|
-
const
|
|
1259
|
-
const choiceDecoder = (path_2)=>(v)=>(0, _Decode.object)((get$)=>{
|
|
1180
|
+
const choiceDecoder = (path_4)=>(v)=>(0, _Decode.object)((get$)=>{
|
|
1260
1181
|
let objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5, objectArg_6;
|
|
1261
1182
|
let score;
|
|
1262
1183
|
const objectArg = get$.Required;
|
|
1263
1184
|
score = objectArg.Field("score", (0, _Util.uncurry2)(liberatedInt64Decoder));
|
|
1264
|
-
return new TemplateChoice((objectArg_1 = get$.Required, objectArg_1.Field("choiceId", (0, _Util.uncurry2)(_Decode.int))), (objectArg_2 = get$.Required, objectArg_2.Field("sequence", (0, _Util.uncurry2)(_Decode.int))), score, (objectArg_3 = get$.Required, objectArg_3.Field("text", _Decode.string)), (objectArg_4 = get$.
|
|
1265
|
-
},
|
|
1266
|
-
const triggerConditionDecoder = (
|
|
1185
|
+
return new TemplateChoice((objectArg_1 = get$.Required, objectArg_1.Field("choiceId", (0, _Util.uncurry2)(_Decode.int))), (objectArg_2 = get$.Required, objectArg_2.Field("sequence", (0, _Util.uncurry2)(_Decode.int))), score, (objectArg_3 = get$.Required, objectArg_3.Field("text", _Decode.string)), (objectArg_4 = get$.Required, objectArg_4.Field("bitPosition", (path_1, value_1)=>(0, _Decode.option)((0, _Util.uncurry2)(_Decode.int), path_1, value_1))), (objectArg_5 = get$.Required, objectArg_5.Field("code", (path_3, value_3)=>(0, _Decode.option)(_Decode.string, path_3, value_3))), (objectArg_6 = get$.Optional, objectArg_6.Field("highlight", (0, _Util.uncurry2)(_Decode.int))));
|
|
1186
|
+
}, path_4, v);
|
|
1187
|
+
const triggerConditionDecoder = (path_8)=>(v)=>(0, _Decode.object)((get$)=>{
|
|
1267
1188
|
let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5, objectArg_6;
|
|
1268
|
-
return new TriggerCondition((objectArg = get$.Required, objectArg.Field("conditionId", (0, _Util.uncurry2)(_Decode.int))), (objectArg_1 = get$.Required, objectArg_1.Field("sourceFieldId", (0, _Util.uncurry2)(_Decode.int))), (objectArg_2 = get$.Required, objectArg_2.Field("source", _Decode.string)), (objectArg_3 = get$.Required, objectArg_3.Field("operator", _Decode.string)), (
|
|
1269
|
-
},
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1189
|
+
return new TriggerCondition((objectArg = get$.Required, objectArg.Field("conditionId", (0, _Util.uncurry2)(_Decode.int))), (objectArg_1 = get$.Required, objectArg_1.Field("sourceFieldId", (path, value)=>(0, _Decode.option)((0, _Util.uncurry2)(_Decode.int), path, value))), (objectArg_2 = get$.Required, objectArg_2.Field("source", _Decode.string)), (objectArg_3 = get$.Required, objectArg_3.Field("operator", _Decode.string)), (objectArg_4 = get$.Required, objectArg_4.Field("values", (path_4, value_4)=>(0, _Decode.list)(_Decode.string, path_4, value_4))), (objectArg_5 = get$.Required, objectArg_5.Field("rawChoiceIds", (path_5, value_5)=>(0, _Decode.list)((0, _Util.uncurry2)(_Decode.int), path_5, value_5))), (objectArg_6 = get$.Required, objectArg_6.Field("booleanOperator", (path_7, value_7)=>(0, _Decode.option)(_Decode.string, path_7, value_7))));
|
|
1190
|
+
}, path_8, v);
|
|
1191
|
+
function ParamValue_ScalarParam(Item) {
|
|
1192
|
+
return new ParamValue(0, [
|
|
1193
|
+
Item
|
|
1194
|
+
]);
|
|
1195
|
+
}
|
|
1196
|
+
function ParamValue_ListParam(Item) {
|
|
1197
|
+
return new ParamValue(1, [
|
|
1198
|
+
Item
|
|
1199
|
+
]);
|
|
1200
|
+
}
|
|
1201
|
+
class ParamValue extends _Types.Union {
|
|
1202
|
+
cases() {
|
|
1203
|
+
return [
|
|
1204
|
+
"ScalarParam",
|
|
1205
|
+
"ListParam"
|
|
1206
|
+
];
|
|
1207
|
+
}
|
|
1208
|
+
constructor(tag, fields){
|
|
1209
|
+
super(), this.tag = tag, this.fields = fields;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
function ParamValue_$reflection() {
|
|
1213
|
+
return (0, _Reflection.union_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.ParamValue", [], ParamValue, ()=>[
|
|
1214
|
+
[
|
|
1215
|
+
[
|
|
1216
|
+
"Item",
|
|
1217
|
+
_Reflection.string_type
|
|
1218
|
+
]
|
|
1219
|
+
],
|
|
1220
|
+
[
|
|
1221
|
+
[
|
|
1222
|
+
"Item",
|
|
1223
|
+
(0, _Reflection.list_type)(_Reflection.string_type)
|
|
1224
|
+
]
|
|
1225
|
+
]
|
|
1226
|
+
]);
|
|
1227
|
+
}
|
|
1228
|
+
const paramValueDecoder = (path_5)=>(value_5)=>(0, _Decode.oneOf)((0, _List.ofArray)([
|
|
1229
|
+
(path_1)=>(value_1)=>(0, _Decode.map)(ParamValue_ScalarParam, _Decode.string, path_1, value_1),
|
|
1230
|
+
(path_4)=>(value_4)=>(0, _Decode.map)(ParamValue_ListParam, (path_3, value_3)=>(0, _Decode.list)(_Decode.string, path_3, value_3), path_4, value_4)
|
|
1231
|
+
]), path_5, value_5);
|
|
1232
|
+
const triggerActionDecoder = (()=>{
|
|
1233
|
+
let d_2;
|
|
1234
|
+
const decoder_2 = dictDecoder((0, _Util.uncurry2)(paramValueDecoder));
|
|
1235
|
+
d_2 = (path_3)=>(value_3)=>(0, _Decode.field)("params", (0, _Util.uncurry2)(decoder_2), path_3, value_3);
|
|
1236
|
+
return (path_4)=>(value_4)=>(0, _Decode.map3)((actionId, actionType, raw)=>{
|
|
1237
|
+
let matchValue;
|
|
1238
|
+
return new TriggerAction(actionId, actionType, (0, _Map.ofList)((0, _List.choose)((_arg)=>{
|
|
1239
|
+
if (_arg[1].tag === /* ListParam */ 1) {
|
|
1240
|
+
return undefined;
|
|
1241
|
+
} else {
|
|
1242
|
+
return [
|
|
1243
|
+
_arg[0],
|
|
1244
|
+
_arg[1].fields[0]
|
|
1245
|
+
];
|
|
1246
|
+
}
|
|
1247
|
+
}, (0, _Map.toList)(raw)), {
|
|
1248
|
+
Compare: _Util.comparePrimitives
|
|
1249
|
+
}), (matchValue = (0, _List.choose)((_arg_1)=>{
|
|
1250
|
+
if (_arg_1[1].tag === /* ScalarParam */ 0) {
|
|
1251
|
+
return undefined;
|
|
1252
|
+
} else {
|
|
1253
|
+
return [
|
|
1254
|
+
_arg_1[0],
|
|
1255
|
+
_arg_1[1].fields[0]
|
|
1256
|
+
];
|
|
1257
|
+
}
|
|
1258
|
+
}, (0, _Map.toList)(raw)), (0, _List.isEmpty)(matchValue) ? undefined : (0, _Map.ofList)(matchValue, {
|
|
1259
|
+
Compare: _Util.comparePrimitives
|
|
1260
|
+
})));
|
|
1261
|
+
}, (path, value)=>(0, _Decode.field)("actionId", (0, _Util.uncurry2)(_Decode.int), path, value), (path_2, value_2)=>(0, _Decode.field)("actionType", _Decode.string, path_2, value_2), (0, _Util.uncurry2)(d_2), path_4, value_4);
|
|
1262
|
+
})();
|
|
1263
|
+
const itemTriggerDecoder = (path_6)=>(v)=>(0, _Decode.object)((get$)=>{
|
|
1277
1264
|
let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5;
|
|
1278
|
-
return new ItemTrigger((objectArg = get$.Required, objectArg.Field("triggerId", (0, _Util.uncurry2)(_Decode.int))), (objectArg_1 = get$.Required, objectArg_1.Field("eventName", _Decode.string)), (
|
|
1279
|
-
},
|
|
1265
|
+
return new ItemTrigger((objectArg = get$.Required, objectArg.Field("triggerId", (0, _Util.uncurry2)(_Decode.int))), (objectArg_1 = get$.Required, objectArg_1.Field("eventName", _Decode.string)), (objectArg_2 = get$.Required, objectArg_2.Field("enabled", _Decode.bool)), (objectArg_3 = get$.Required, objectArg_3.Field("exclusiveTag", (path_3, value_3)=>(0, _Decode.option)(_Decode.string, path_3, value_3))), (objectArg_4 = get$.Required, objectArg_4.Field("conditions", (path_4, value_4)=>(0, _Decode.list)((0, _Util.uncurry2)(triggerConditionDecoder), path_4, value_4))), (objectArg_5 = get$.Required, objectArg_5.Field("actions", (path_5, value_5)=>(0, _Decode.list)((0, _Util.uncurry2)(triggerActionDecoder), path_5, value_5))));
|
|
1266
|
+
}, path_6, v);
|
|
1280
1267
|
function itemDecoder(declared) {
|
|
1281
|
-
return orFail((
|
|
1268
|
+
return orFail((path_13, v)=>(0, _Decode.object)((get$)=>{
|
|
1282
1269
|
let objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5, objectArg_6, objectArg_7, objectArg_8, objectArg_9, objectArg_10, objectArg_11, objectArg_12;
|
|
1283
1270
|
let itemId;
|
|
1284
1271
|
const objectArg = get$.Required;
|
|
@@ -1304,11 +1291,11 @@ function itemDecoder(declared) {
|
|
|
1304
1291
|
}
|
|
1305
1292
|
switch(matchResult){
|
|
1306
1293
|
case 0:
|
|
1307
|
-
return (0, _Result.FSharpResult$2_Ok)(new TemplateItem(itemId, (objectArg_3 = get$.Required, objectArg_3.Field("sequence", (0, _Util.uncurry2)(_Decode.int))), (objectArg_4 = get$.Required, objectArg_4.Field("type", (0, _Util.uncurry2)(_Decode.int))), nestingLevel, (objectArg_5 = get$.Required, objectArg_5.Field("isRequired", _Decode.bool)), (objectArg_6 = get$.Required, objectArg_6.Field("text", _Decode.string)), (objectArg_7 = get$.
|
|
1294
|
+
return (0, _Result.FSharpResult$2_Ok)(new TemplateItem(itemId, (objectArg_3 = get$.Required, objectArg_3.Field("sequence", (0, _Util.uncurry2)(_Decode.int))), (objectArg_4 = get$.Required, objectArg_4.Field("type", (0, _Util.uncurry2)(_Decode.int))), nestingLevel, (objectArg_5 = get$.Required, objectArg_5.Field("isRequired", _Decode.bool)), (objectArg_6 = get$.Required, objectArg_6.Field("text", _Decode.string)), (objectArg_7 = get$.Required, objectArg_7.Field("sequenceText", (path_5, value_4)=>(0, _Decode.option)(_Decode.string, path_5, value_4))), (objectArg_8 = get$.Required, objectArg_8.Field("code", (path_7, value_6)=>(0, _Decode.option)(_Decode.string, path_7, value_6))), (objectArg_9 = get$.Required, objectArg_9.Field("uuid", (path_9, value_8)=>(0, _Decode.option)(_Decode.string, path_9, value_8))), (objectArg_10 = get$.Required, objectArg_10.Field("genderRequired", (path_11, value_10)=>(0, _Decode.option)(_Decode.string, path_11, value_10))), (objectArg_11 = get$.Optional, objectArg_11.Field("highlight", (0, _Util.uncurry2)(_Decode.int))), (objectArg_12 = get$.Required, objectArg_12.Field("choices", (path_12, value_11)=>(0, _Decode.list)((0, _Util.uncurry2)(choiceDecoder), path_12, value_11))), itemTriggers));
|
|
1308
1295
|
default:
|
|
1309
1296
|
return (0, _Result.FSharpResult$2_Error)(e);
|
|
1310
1297
|
}
|
|
1311
|
-
},
|
|
1298
|
+
}, path_13, v));
|
|
1312
1299
|
}
|
|
1313
1300
|
function encounterTypesDecoder(declared) {
|
|
1314
1301
|
return orFail((path_4, v)=>(0, _Decode.object)((get$)=>{
|
|
@@ -1331,10 +1318,48 @@ const formScoringDecoder = (path_2)=>(v)=>(0, _Decode.object)((get$)=>{
|
|
|
1331
1318
|
return new FormScoring((objectArg = get$.Required, objectArg.Field("scoreId", (0, _Util.uncurry2)(_Decode.int))), (objectArg_1 = get$.Required, objectArg_1.Field("scoreName", _Decode.string)), (objectArg_2 = get$.Required, objectArg_2.Field("labels", (path_1, value_1)=>(0, _Decode.list)((0, _Util.uncurry2)(scoringLabelDecoder), path_1, value_1))), (arg_7 = dictDecoder((0, _Util.uncurry2)(_Decode.int)), objectArg_3 = get$.Required, objectArg_3.Field("choiceScores", (0, _Util.uncurry2)(arg_7))));
|
|
1332
1319
|
}, path_2, v);
|
|
1333
1320
|
function formDecoder(declared) {
|
|
1334
|
-
return (
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1321
|
+
return orFail((path_15, v)=>(0, _Decode.object)((get$)=>{
|
|
1322
|
+
let objectArg, objectArg_2, objectArg_3, objectArg_4, objectArg_5, objectArg_6, objectArg_7, objectArg_8, objectArg_9, objectArg_10, arg_24, objectArg_11, objectArg_12, objectArg_13, objectArg_14, objectArg_15, objectArg_16, arg_36, decoder_2, objectArg_17;
|
|
1323
|
+
let scoring;
|
|
1324
|
+
const matchValue = declared.Scoring;
|
|
1325
|
+
let matchResult, because;
|
|
1326
|
+
switch(matchValue.tag){
|
|
1327
|
+
case /* NotInRelease */ 1:
|
|
1328
|
+
{
|
|
1329
|
+
matchResult = 1;
|
|
1330
|
+
because = matchValue.fields[0];
|
|
1331
|
+
break;
|
|
1332
|
+
}
|
|
1333
|
+
case /* NotReadYet */ 2:
|
|
1334
|
+
{
|
|
1335
|
+
matchResult = 1;
|
|
1336
|
+
because = matchValue.fields[0];
|
|
1337
|
+
break;
|
|
1338
|
+
}
|
|
1339
|
+
default:
|
|
1340
|
+
matchResult = 0;
|
|
1341
|
+
}
|
|
1342
|
+
switch(matchResult){
|
|
1343
|
+
case 0:
|
|
1344
|
+
{
|
|
1345
|
+
scoring = (0, _Result.FSharpResult$2_Ok)((objectArg = get$.Required, objectArg.Field("scoring", (path, value)=>(0, _Decode.option)((0, _Util.uncurry2)(formScoringDecoder), path, value))));
|
|
1346
|
+
break;
|
|
1347
|
+
}
|
|
1348
|
+
default:
|
|
1349
|
+
{
|
|
1350
|
+
let matchValue_1;
|
|
1351
|
+
const objectArg_1 = get$.Optional;
|
|
1352
|
+
matchValue_1 = objectArg_1.Field("scoring", (0, _Util.uncurry2)(formScoringDecoder));
|
|
1353
|
+
scoring = matchValue_1 != null ? (0, _Result.FSharpResult$2_Error)((0, _String.toText)((0, _String.printf)("the answer declares scoring NOT stated by this release (%s) and the form carries a `scoring` anyway"))(because)) : (0, _Result.FSharpResult$2_Ok)(undefined);
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
if (scoring.tag === /* Ok */ 0) {
|
|
1357
|
+
const formScoring = scoring.fields[0];
|
|
1358
|
+
return (0, _Result.FSharpResult$2_Ok)(new TemplateForm((objectArg_2 = get$.Required, objectArg_2.Field("formId", (0, _Util.uncurry2)(_Decode.int))), (objectArg_3 = get$.Required, objectArg_3.Field("name", _Decode.string)), (objectArg_4 = get$.Required, objectArg_4.Field("formCode", _Decode.string)), (objectArg_5 = get$.Required, objectArg_5.Field("formCodeSource", _Decode.string)), (objectArg_6 = get$.Required, objectArg_6.Field("description", _Decode.string)), (objectArg_7 = get$.Required, objectArg_7.Field("currentVersionId", (0, _Util.uncurry2)(liberatedInt64Decoder))), (objectArg_8 = get$.Required, objectArg_8.Field("isIntake", _Decode.bool)), (objectArg_9 = get$.Required, objectArg_9.Field("usage", (path_7, value_7)=>(0, _Decode.option)(_Decode.string, path_7, value_7))), (objectArg_10 = get$.Required, objectArg_10.Field("requiresSignature", _Decode.bool)), (arg_24 = encounterTypesDecoder(declared), objectArg_11 = get$.Required, objectArg_11.Field("encounterTypes", (0, _Util.uncurry2)(arg_24))), (objectArg_12 = get$.Required, objectArg_12.Field("onceAYear", _Decode.bool)), (objectArg_13 = get$.Required, objectArg_13.Field("structureHash", _Decode.string)), (objectArg_14 = get$.Required, objectArg_14.Field("clinicalHash", _Decode.string)), (objectArg_15 = get$.Required, objectArg_15.Field("cosmeticHash", _Decode.string)), (objectArg_16 = get$.Required, objectArg_16.Field("hash", _Decode.string)), (arg_36 = (decoder_2 = itemDecoder(declared), (path_14)=>(value_14)=>(0, _Decode.list)((0, _Util.uncurry2)(decoder_2), path_14, value_14)), objectArg_17 = get$.Required, objectArg_17.Field("items", (0, _Util.uncurry2)(arg_36))), formScoring));
|
|
1359
|
+
} else {
|
|
1360
|
+
return (0, _Result.FSharpResult$2_Error)(scoring.fields[0]);
|
|
1361
|
+
}
|
|
1362
|
+
}, path_15, v));
|
|
1338
1363
|
}
|
|
1339
1364
|
const elementTypeDecoder = (path_2)=>(v)=>(0, _Decode.object)((get$)=>{
|
|
1340
1365
|
let objectArg, objectArg_1;
|
|
@@ -1356,19 +1381,17 @@ const elementTypesFromDecoder = orFail((path_6, v)=>(0, _Decode.object)((get$)=>
|
|
|
1356
1381
|
return (0, _Result.FSharpResult$2_Error)((0, _String.toText)((0, _String.printf)("`elementTypesFrom.statedBy` = `%s` is not a provenance this build understands (site | conduit | nobody)"))(matchValue));
|
|
1357
1382
|
}
|
|
1358
1383
|
}, path_6, v));
|
|
1359
|
-
const instrumentMapEntryDecoder = (
|
|
1384
|
+
const instrumentMapEntryDecoder = (path_6)=>(v)=>(0, _Decode.object)((get$)=>{
|
|
1360
1385
|
let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5;
|
|
1361
|
-
return new InstrumentMapEntry((objectArg = get$.Required, objectArg.Field("instrumentType", _Decode.string)), (
|
|
1362
|
-
},
|
|
1386
|
+
return new InstrumentMapEntry((objectArg = get$.Required, objectArg.Field("instrumentType", _Decode.string)), (objectArg_1 = get$.Required, objectArg_1.Field("formCode", _Decode.string)), (objectArg_2 = get$.Required, objectArg_2.Field("maxScore", (path_2, value_2)=>(0, _Decode.option)((0, _Util.uncurry2)(_Decode.int), path_2, value_2))), (objectArg_3 = get$.Required, objectArg_3.Field("source", _Decode.string)), (objectArg_4 = get$.Required, objectArg_4.Field("archived", _Decode.bool)), (objectArg_5 = get$.Required, objectArg_5.Field("formName", _Decode.string)));
|
|
1387
|
+
}, path_6, v);
|
|
1363
1388
|
const codeExtractionStatsDecoder = (path_1)=>(v)=>(0, _Decode.object)((get$)=>{
|
|
1364
1389
|
let objectArg, objectArg_1, arg_5, objectArg_2, objectArg_3;
|
|
1365
1390
|
return new CodeExtractionStats((objectArg = get$.Required, objectArg.Field("extracted", (0, _Util.uncurry2)(_Decode.int))), (objectArg_1 = get$.Required, objectArg_1.Field("generated", (0, _Util.uncurry2)(_Decode.int))), (arg_5 = dictDecoder((0, _Util.uncurry2)(_Decode.int)), objectArg_2 = get$.Required, objectArg_2.Field("bySource", (0, _Util.uncurry2)(arg_5))), (objectArg_3 = get$.Required, objectArg_3.Field("regex", _Decode.string)));
|
|
1366
1391
|
}, path_1, v);
|
|
1367
1392
|
const triggerStatsDecoder = (path)=>(v)=>(0, _Decode.object)((get$)=>{
|
|
1368
1393
|
let objectArg, objectArg_1, arg_5, objectArg_2;
|
|
1369
|
-
return new TriggerStats((objectArg = get$.Required, objectArg.Field("formsWithTriggers", (0, _Util.uncurry2)(_Decode.int))), (objectArg_1 = get$.Required, objectArg_1.Field("totalTriggers", (0, _Util.uncurry2)(_Decode.int))), (
|
|
1370
|
-
Compare: _Util.comparePrimitives
|
|
1371
|
-
})));
|
|
1394
|
+
return new TriggerStats((objectArg = get$.Required, objectArg.Field("formsWithTriggers", (0, _Util.uncurry2)(_Decode.int))), (objectArg_1 = get$.Required, objectArg_1.Field("totalTriggers", (0, _Util.uncurry2)(_Decode.int))), (arg_5 = dictDecoder((0, _Util.uncurry2)(_Decode.int)), objectArg_2 = get$.Required, objectArg_2.Field("byActionType", (0, _Util.uncurry2)(arg_5))));
|
|
1372
1395
|
}, path, v);
|
|
1373
1396
|
const statsDecoder = (path)=>(v)=>(0, _Decode.object)((get$)=>{
|
|
1374
1397
|
let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9, objectArg_4, arg_11, objectArg_5, objectArg_6;
|
|
@@ -1416,44 +1439,6 @@ function scoringCatalogOf(instrumentMap, instrumentMapStats, withScoring) {
|
|
|
1416
1439
|
return (0, _Result.FSharpResult$2_Error)((arg = (0, _String.join)("`, `", (0, _Seq.toList)((0, _Seq.delay)(()=>(0, _Seq.append)(instrumentMap != null ? (0, _Seq.singleton)("instrumentMap") : (0, _Seq.empty)(), (0, _Seq.delay)(()=>(0, _Seq.append)(instrumentMapStats != null ? (0, _Seq.singleton)("instrumentMapStats") : (0, _Seq.empty)(), (0, _Seq.delay)(()=>withScoring != null ? (0, _Seq.singleton)("stats.withScoring") : (0, _Seq.empty)()))))))), (0, _String.toText)((0, _String.printf)("the scoring catalog is PARTIAL — `%s` present, the rest absent. One release fact governs all three; half of it cannot be read"))(arg)));
|
|
1417
1440
|
}
|
|
1418
1441
|
}
|
|
1419
|
-
const manifestDecoder = orFail((path_3, v)=>(0, _Decode.object)((get$)=>{
|
|
1420
|
-
let arg_1, objectArg, arg_3, objectArg_1, arg_5, objectArg_2, arg_9, objectArg_4, objectArg_5, objectArg_6, objectArg_7, objectArg_8, objectArg_9, objectArg_10, objectArg_11, arg_25, objectArg_12, objectArg_13, arg_29, objectArg_14;
|
|
1421
|
-
const declared = new FormDeclarations((arg_1 = availabilityRowDecoder("itemNestingFrom"), objectArg = get$.Optional, objectArg.Field("itemNestingFrom", (0, _Util.uncurry2)(arg_1))), (arg_3 = availabilityRowDecoder("triggersFrom"), objectArg_1 = get$.Optional, objectArg_1.Field("triggersFrom", (0, _Util.uncurry2)(arg_3))), (arg_5 = availabilityRowDecoder("encounterOtherFrom"), objectArg_2 = get$.Optional, objectArg_2.Field("encounterOtherFrom", (0, _Util.uncurry2)(arg_5))));
|
|
1422
|
-
let scoringRow;
|
|
1423
|
-
const arg_7 = availabilityRowDecoder("scoringFrom");
|
|
1424
|
-
const objectArg_3 = get$.Optional;
|
|
1425
|
-
scoringRow = objectArg_3.Field("scoringFrom", (0, _Util.uncurry2)(arg_7));
|
|
1426
|
-
const scoring = (0, _Result.Result_Bind)((datum)=>join("scoringFrom (instrumentMap + instrumentMapStats + stats.withScoring)", scoringRow, datum), scoringCatalogOf((arg_9 = dictDecoder((0, _Util.uncurry2)(instrumentMapEntryDecoder)), objectArg_4 = get$.Optional, objectArg_4.Field("instrumentMap", (0, _Util.uncurry2)(arg_9))), (objectArg_5 = get$.Optional, objectArg_5.Field("instrumentMapStats", (0, _Util.uncurry2)(instrumentMapStatsDecoder))), get$.Optional.Raw((firstPath, firstValue)=>(0, _Decode.at)((0, _List.ofArray)([
|
|
1427
|
-
"stats",
|
|
1428
|
-
"withScoring"
|
|
1429
|
-
]), (0, _Util.uncurry2)(_Decode.int), firstPath, firstValue))));
|
|
1430
|
-
const triggers = join("triggersFrom (stats.triggerStats)", declared.Triggers, get$.Optional.Raw((firstPath_1, firstValue_1)=>(0, _Decode.at)((0, _List.ofArray)([
|
|
1431
|
-
"stats",
|
|
1432
|
-
"triggerStats"
|
|
1433
|
-
]), (0, _Util.uncurry2)(triggerStatsDecoder), firstPath_1, firstValue_1)));
|
|
1434
|
-
let matchResult, scoringAvailability, triggerAvailability, e;
|
|
1435
|
-
const copyOfStruct = scoring;
|
|
1436
|
-
if (copyOfStruct.tag === /* Error */ 1) {
|
|
1437
|
-
matchResult = 1;
|
|
1438
|
-
e = copyOfStruct.fields[0];
|
|
1439
|
-
} else {
|
|
1440
|
-
const copyOfStruct_1 = triggers;
|
|
1441
|
-
if (copyOfStruct_1.tag === /* Error */ 1) {
|
|
1442
|
-
matchResult = 1;
|
|
1443
|
-
e = copyOfStruct_1.fields[0];
|
|
1444
|
-
} else {
|
|
1445
|
-
matchResult = 0;
|
|
1446
|
-
scoringAvailability = copyOfStruct.fields[0];
|
|
1447
|
-
triggerAvailability = copyOfStruct_1.fields[0];
|
|
1448
|
-
}
|
|
1449
|
-
}
|
|
1450
|
-
switch(matchResult){
|
|
1451
|
-
case 0:
|
|
1452
|
-
return (0, _Result.FSharpResult$2_Ok)(new TemplateManifest((objectArg_6 = get$.Optional, objectArg_6.Field("$schema", _Decode.string)), (objectArg_7 = get$.Required, objectArg_7.Field("version", (0, _Util.uncurry2)(_Decode.int))), (objectArg_8 = get$.Required, objectArg_8.Field("generatedAt", _Decode.string)), (objectArg_9 = get$.Required, objectArg_9.Field("generatedFrom", _Decode.string)), (objectArg_10 = get$.Required, objectArg_10.Field("coreEmr", (0, _Util.uncurry2)(coreEmrDecoder))), (objectArg_11 = get$.Required, objectArg_11.Field("stats", (0, _Util.uncurry2)(statsDecoder))), (arg_25 = dictDecoder((0, _Util.uncurry2)(elementTypeDecoder)), objectArg_12 = get$.Optional, objectArg_12.Field("elementTypes", (0, _Util.uncurry2)(arg_25))), (0, _Option.defaultArg)((objectArg_13 = get$.Optional, objectArg_13.Field("elementTypesFrom", (0, _Util.uncurry2)(elementTypesFromDecoder))), ElementTypesFrom_NotInRelease("the manifest carried no `elementTypesFrom`, so no provenance for the item-type vocabulary was stated")), (arg_29 = dictDecoder((0, _Util.uncurry2)(formDecoder(declared))), objectArg_14 = get$.Required, objectArg_14.Field("forms", (0, _Util.uncurry2)(arg_29))), scoringAvailability, triggerAvailability));
|
|
1453
|
-
default:
|
|
1454
|
-
return (0, _Result.FSharpResult$2_Error)(e);
|
|
1455
|
-
}
|
|
1456
|
-
}, path_3, v));
|
|
1457
1442
|
function carriesTextOrDate(control) {
|
|
1458
1443
|
let matchResult, c_3;
|
|
1459
1444
|
switch(control){
|
|
@@ -1536,17 +1521,322 @@ function carriesTextOrDate(control) {
|
|
|
1536
1521
|
];
|
|
1537
1522
|
}
|
|
1538
1523
|
}
|
|
1539
|
-
|
|
1540
|
-
|
|
1524
|
+
class FormTemplateServed extends _Types.Record {
|
|
1525
|
+
constructor(Form, ElementTypes, ElementTypesFrom, Instrument, GeneratedFrom, TriggersFrom, ActiveAt, TriggerReads){
|
|
1526
|
+
super();
|
|
1527
|
+
this.Form = Form;
|
|
1528
|
+
this.ElementTypes = ElementTypes;
|
|
1529
|
+
this.ElementTypesFrom = ElementTypesFrom;
|
|
1530
|
+
this.Instrument = Instrument;
|
|
1531
|
+
this.GeneratedFrom = GeneratedFrom;
|
|
1532
|
+
this.TriggersFrom = TriggersFrom;
|
|
1533
|
+
this.ActiveAt = ActiveAt;
|
|
1534
|
+
this.TriggerReads = TriggerReads;
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
function FormTemplateServed_$reflection() {
|
|
1538
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.FormTemplateServed", [], FormTemplateServed, ()=>[
|
|
1539
|
+
[
|
|
1540
|
+
"Form",
|
|
1541
|
+
TemplateForm_$reflection()
|
|
1542
|
+
],
|
|
1543
|
+
[
|
|
1544
|
+
"ElementTypes",
|
|
1545
|
+
(0, _Reflection.option_type)((0, _Reflection.class_type)("Microsoft.FSharp.Collections.FSharpMap`2", [
|
|
1546
|
+
_Reflection.string_type,
|
|
1547
|
+
ElementTypeEntry_$reflection()
|
|
1548
|
+
]))
|
|
1549
|
+
],
|
|
1550
|
+
[
|
|
1551
|
+
"ElementTypesFrom",
|
|
1552
|
+
ElementTypesFrom_$reflection()
|
|
1553
|
+
],
|
|
1554
|
+
[
|
|
1555
|
+
"Instrument",
|
|
1556
|
+
ReleaseAvailability$1_$reflection((0, _Reflection.option_type)(InstrumentMapEntry_$reflection()))
|
|
1557
|
+
],
|
|
1558
|
+
[
|
|
1559
|
+
"GeneratedFrom",
|
|
1560
|
+
_Reflection.string_type
|
|
1561
|
+
],
|
|
1562
|
+
[
|
|
1563
|
+
"TriggersFrom",
|
|
1564
|
+
ReleaseAvailability$1_$reflection((0, _Reflection.list_type)(_Reflection.string_type))
|
|
1565
|
+
],
|
|
1566
|
+
[
|
|
1567
|
+
"ActiveAt",
|
|
1568
|
+
(0, _Reflection.list_type)(_Reflection.int32_type)
|
|
1569
|
+
],
|
|
1570
|
+
[
|
|
1571
|
+
"TriggerReads",
|
|
1572
|
+
ReleaseAvailability$1_$reflection((0, _Reflection.list_type)((0, _FormTemplate.Trigger_$reflection)()))
|
|
1573
|
+
]
|
|
1574
|
+
]);
|
|
1575
|
+
}
|
|
1576
|
+
function FormTemplateAnswer_Served(Item) {
|
|
1577
|
+
return new FormTemplateAnswer(0, [
|
|
1578
|
+
Item
|
|
1579
|
+
]);
|
|
1580
|
+
}
|
|
1581
|
+
function FormTemplateAnswer_NotInCatalog(formId, because) {
|
|
1582
|
+
return new FormTemplateAnswer(1, [
|
|
1583
|
+
formId,
|
|
1584
|
+
because
|
|
1585
|
+
]);
|
|
1586
|
+
}
|
|
1587
|
+
class FormTemplateAnswer extends _Types.Union {
|
|
1588
|
+
cases() {
|
|
1589
|
+
return [
|
|
1590
|
+
"Served",
|
|
1591
|
+
"NotInCatalog"
|
|
1592
|
+
];
|
|
1593
|
+
}
|
|
1594
|
+
constructor(tag, fields){
|
|
1595
|
+
super(), this.tag = tag, this.fields = fields;
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
function FormTemplateAnswer_$reflection() {
|
|
1599
|
+
return (0, _Reflection.union_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.FormTemplateAnswer", [], FormTemplateAnswer, ()=>[
|
|
1600
|
+
[
|
|
1601
|
+
[
|
|
1602
|
+
"Item",
|
|
1603
|
+
FormTemplateServed_$reflection()
|
|
1604
|
+
]
|
|
1605
|
+
],
|
|
1606
|
+
[
|
|
1607
|
+
[
|
|
1608
|
+
"formId",
|
|
1609
|
+
_Reflection.int32_type
|
|
1610
|
+
],
|
|
1611
|
+
[
|
|
1612
|
+
"because",
|
|
1613
|
+
_Reflection.string_type
|
|
1614
|
+
]
|
|
1615
|
+
]
|
|
1616
|
+
]);
|
|
1617
|
+
}
|
|
1618
|
+
const formTemplateAnswerDecoder = orFail((path_6, v)=>(0, _Decode.object)((get$)=>{
|
|
1619
|
+
let objectArg_1, objectArg_2, arg_11, objectArg_5, arg_13, objectArg_6, objectArg_7, objectArg_10, arg_24, objectArg_11, arg_26, decoder_1, objectArg_12, objectArg_13, objectArg_14, objectArg_15;
|
|
1620
|
+
let matchValue;
|
|
1621
|
+
const objectArg = get$.Required;
|
|
1622
|
+
matchValue = objectArg.Field("kind", _Decode.string);
|
|
1623
|
+
switch(matchValue){
|
|
1624
|
+
case "notInCatalog":
|
|
1625
|
+
return (0, _Result.FSharpResult$2_Ok)(FormTemplateAnswer_NotInCatalog((objectArg_1 = get$.Required, objectArg_1.Field("formId", (0, _Util.uncurry2)(_Decode.int))), (objectArg_2 = get$.Required, objectArg_2.Field("because", _Decode.string))));
|
|
1626
|
+
case "served":
|
|
1627
|
+
{
|
|
1628
|
+
let triggersRow;
|
|
1629
|
+
const arg_7 = availabilityRowDecoder("triggersFrom");
|
|
1630
|
+
const objectArg_3 = get$.Required;
|
|
1631
|
+
triggersRow = objectArg_3.Field("triggersFrom", (0, _Util.uncurry2)(arg_7));
|
|
1632
|
+
let scoringRow;
|
|
1633
|
+
const arg_9 = availabilityRowDecoder("scoringFrom");
|
|
1634
|
+
const objectArg_4 = get$.Required;
|
|
1635
|
+
scoringRow = objectArg_4.Field("scoringFrom", (0, _Util.uncurry2)(arg_9));
|
|
1636
|
+
const declared = new FormDeclarations((arg_11 = availabilityRowDecoder("itemNestingFrom"), objectArg_5 = get$.Required, objectArg_5.Field("itemNestingFrom", (0, _Util.uncurry2)(arg_11))), triggersRow, (arg_13 = availabilityRowDecoder("encounterOtherFrom"), objectArg_6 = get$.Required, objectArg_6.Field("encounterOtherFrom", (0, _Util.uncurry2)(arg_13))), scoringRow);
|
|
1637
|
+
let instrument;
|
|
1638
|
+
const carriedAnyway = (because)=>(0, _Result.FSharpResult$2_Error)((0, _String.toText)((0, _String.printf)("the form template declares scoring NOT stated by this release (%s) and carries an `instrument` anyway"))(because));
|
|
1639
|
+
switch(scoringRow.tag){
|
|
1640
|
+
case /* NotInRelease */ 1:
|
|
1641
|
+
{
|
|
1642
|
+
const because_1 = scoringRow.fields[0];
|
|
1643
|
+
let matchValue_1;
|
|
1644
|
+
const objectArg_8 = get$.Optional;
|
|
1645
|
+
matchValue_1 = objectArg_8.Field("instrument", (0, _Util.uncurry2)(instrumentMapEntryDecoder));
|
|
1646
|
+
instrument = matchValue_1 != null ? carriedAnyway(because_1) : (0, _Result.FSharpResult$2_Ok)(ReleaseAvailability$1_NotInRelease(because_1));
|
|
1647
|
+
break;
|
|
1648
|
+
}
|
|
1649
|
+
case /* NotReadYet */ 2:
|
|
1650
|
+
{
|
|
1651
|
+
const witness = scoringRow.fields[1];
|
|
1652
|
+
const because_2 = scoringRow.fields[0];
|
|
1653
|
+
let matchValue_2;
|
|
1654
|
+
const objectArg_9 = get$.Optional;
|
|
1655
|
+
matchValue_2 = objectArg_9.Field("instrument", (0, _Util.uncurry2)(instrumentMapEntryDecoder));
|
|
1656
|
+
instrument = matchValue_2 != null ? carriedAnyway(because_2) : (0, _Result.FSharpResult$2_Ok)(ReleaseAvailability$1_NotReadYet(because_2, witness));
|
|
1657
|
+
break;
|
|
1658
|
+
}
|
|
1659
|
+
default:
|
|
1660
|
+
instrument = (0, _Result.FSharpResult$2_Ok)(ReleaseAvailability$1_Stated((objectArg_7 = get$.Required, objectArg_7.Field("instrument", (path_2, value_2)=>(0, _Decode.option)((0, _Util.uncurry2)(instrumentMapEntryDecoder), path_2, value_2)))));
|
|
1661
|
+
}
|
|
1662
|
+
const triggerReads = join("triggerReads", triggersRow, (objectArg_10 = get$.Optional, objectArg_10.Field("triggerReads", (0, _Util.uncurry2)(_FormTemplateDomainDecoder.triggers))));
|
|
1663
|
+
let matchResult, e, instrument_1, triggerReads_1;
|
|
1664
|
+
const copyOfStruct = instrument;
|
|
1665
|
+
if (copyOfStruct.tag === /* Ok */ 0) {
|
|
1666
|
+
const copyOfStruct_1 = triggerReads;
|
|
1667
|
+
if (copyOfStruct_1.tag === /* Ok */ 0) {
|
|
1668
|
+
matchResult = 1;
|
|
1669
|
+
instrument_1 = copyOfStruct.fields[0];
|
|
1670
|
+
triggerReads_1 = copyOfStruct_1.fields[0];
|
|
1671
|
+
} else {
|
|
1672
|
+
matchResult = 0;
|
|
1673
|
+
e = copyOfStruct_1.fields[0];
|
|
1674
|
+
}
|
|
1675
|
+
} else {
|
|
1676
|
+
matchResult = 0;
|
|
1677
|
+
e = copyOfStruct.fields[0];
|
|
1678
|
+
}
|
|
1679
|
+
switch(matchResult){
|
|
1680
|
+
case 0:
|
|
1681
|
+
return (0, _Result.FSharpResult$2_Error)(e);
|
|
1682
|
+
default:
|
|
1683
|
+
return (0, _Result.FSharpResult$2_Ok)(FormTemplateAnswer_Served(new FormTemplateServed((arg_24 = formDecoder(declared), objectArg_11 = get$.Required, objectArg_11.Field("form", (0, _Util.uncurry2)(arg_24))), (arg_26 = (decoder_1 = dictDecoder((0, _Util.uncurry2)(elementTypeDecoder)), (path_3)=>(value_3)=>(0, _Decode.option)((0, _Util.uncurry2)(decoder_1), path_3, value_3)), objectArg_12 = get$.Required, objectArg_12.Field("elementTypes", (0, _Util.uncurry2)(arg_26))), (objectArg_13 = get$.Required, objectArg_13.Field("elementTypesFrom", (0, _Util.uncurry2)(elementTypesFromDecoder))), instrument_1, (objectArg_14 = get$.Required, objectArg_14.Field("generatedFrom", _Decode.string)), triggersRow, (objectArg_15 = get$.Required, objectArg_15.Field("activeAt", (path_5, value_5)=>(0, _Decode.list)((0, _Util.uncurry2)(_Decode.int), path_5, value_5))), triggerReads_1)));
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
default:
|
|
1687
|
+
return (0, _Result.FSharpResult$2_Error)((0, _String.toText)((0, _String.printf)("`kind` = `%s` is not a form-template answer this build understands (served | notInCatalog) — it is NOT read as either"))(matchValue));
|
|
1688
|
+
}
|
|
1689
|
+
}, path_6, v));
|
|
1690
|
+
function readsJoinRaw(answer) {
|
|
1691
|
+
if (answer.tag === /* Served */ 0) {
|
|
1692
|
+
const served = answer.fields[0];
|
|
1693
|
+
const matchValue = served.TriggerReads;
|
|
1694
|
+
switch(matchValue.tag){
|
|
1695
|
+
case /* Stated */ 0:
|
|
1696
|
+
{
|
|
1697
|
+
const form = served.Form;
|
|
1698
|
+
const byId = (0, _Map.ofList)((0, _List.map)((t)=>[
|
|
1699
|
+
t.TriggerId,
|
|
1700
|
+
t
|
|
1701
|
+
], matchValue.fields[0]), {
|
|
1702
|
+
Compare: _Util.comparePrimitives
|
|
1703
|
+
});
|
|
1704
|
+
const _arg = (0, _List.tryPick)((raw)=>{
|
|
1705
|
+
let arg_8, arg_9;
|
|
1706
|
+
const matchValue_1 = (0, _Map.FSharpMap__TryFind)(byId, raw.TriggerId);
|
|
1707
|
+
if (matchValue_1 != null) {
|
|
1708
|
+
const read = (0, _Option.value)(matchValue_1);
|
|
1709
|
+
const rawIds = (0, _Set.ofList)((0, _List.map)((a)=>a.ActionId, raw.Actions), {
|
|
1710
|
+
Compare: _Util.comparePrimitives
|
|
1711
|
+
});
|
|
1712
|
+
const readIds = (0, _Set.ofList)((0, _List.map)((a_1)=>a_1.ActionId, read.Actions), {
|
|
1713
|
+
Compare: _Util.comparePrimitives
|
|
1714
|
+
});
|
|
1715
|
+
const rawSources = (0, _List.map)((c)=>c.SourceFieldId, raw.Conditions);
|
|
1716
|
+
const readSources = (0, _List.map)((c_1)=>c_1.SourceItem, read.Conditions);
|
|
1717
|
+
if (!(0, _Util.equals)(rawSources, readSources)) {
|
|
1718
|
+
return (0, _String.toText)((0, _String.printf)("form %d: trigger %d states conditions on items %A but its read carries %A"))(form.FormId)(raw.TriggerId)(rawSources)(readSources);
|
|
1719
|
+
} else if (!rawIds.Equals(readIds)) {
|
|
1720
|
+
return arg_8 = (0, _Set.toList)(rawIds), arg_9 = (0, _Set.toList)(readIds), (0, _String.toText)((0, _String.printf)("form %d: trigger %d states actions %A but its read carries %A"))(form.FormId)(raw.TriggerId)(arg_8)(arg_9);
|
|
1721
|
+
} else {
|
|
1722
|
+
return undefined;
|
|
1723
|
+
}
|
|
1724
|
+
} else {
|
|
1725
|
+
return (0, _String.toText)((0, _String.printf)("form %d: trigger %d is served with no `triggerReads` entry"))(form.FormId)(raw.TriggerId);
|
|
1726
|
+
}
|
|
1727
|
+
}, (0, _List.collect)((i)=>ReleaseAvailability_readList(i.Triggers), form.Items));
|
|
1728
|
+
if (_arg == null) {
|
|
1729
|
+
return (0, _Result.FSharpResult$2_Ok)(answer);
|
|
1730
|
+
} else {
|
|
1731
|
+
return (0, _Result.FSharpResult$2_Error)((0, _Option.value)(_arg));
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
default:
|
|
1735
|
+
return (0, _Result.FSharpResult$2_Ok)(answer);
|
|
1736
|
+
}
|
|
1737
|
+
} else {
|
|
1738
|
+
return (0, _Result.FSharpResult$2_Ok)(answer);
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
const formTemplateAnswerJoined = orFail((path, value)=>(0, _Decode.map)(readsJoinRaw, (0, _Util.uncurry2)(formTemplateAnswerDecoder), path, value));
|
|
1742
|
+
function decodeFormTemplateAnswer(json) {
|
|
1743
|
+
return (0, _Decode.fromString)((0, _Util.uncurry2)(formTemplateAnswerJoined), json);
|
|
1541
1744
|
}
|
|
1542
|
-
function
|
|
1543
|
-
return (0, _Decode.fromString)((0, _Util.uncurry2)(
|
|
1745
|
+
function decodeFormTemplateBatch(json) {
|
|
1746
|
+
return (0, _Decode.fromString)((path_1, value_1)=>(0, _Decode.field)("answers", (path, value)=>(0, _Decode.list)((0, _Util.uncurry2)(formTemplateAnswerJoined), path, value), path_1, value_1), json);
|
|
1544
1747
|
}
|
|
1545
|
-
|
|
1546
|
-
|
|
1748
|
+
class SiteCatalog extends _Types.Record {
|
|
1749
|
+
constructor(Version, GeneratedAt, GeneratedFrom, CoreEmr, Stats, Scoring, Triggers, FormIds){
|
|
1750
|
+
super();
|
|
1751
|
+
this.Version = Version | 0;
|
|
1752
|
+
this.GeneratedAt = GeneratedAt;
|
|
1753
|
+
this.GeneratedFrom = GeneratedFrom;
|
|
1754
|
+
this.CoreEmr = CoreEmr;
|
|
1755
|
+
this.Stats = Stats;
|
|
1756
|
+
this.Scoring = Scoring;
|
|
1757
|
+
this.Triggers = Triggers;
|
|
1758
|
+
this.FormIds = FormIds;
|
|
1759
|
+
}
|
|
1547
1760
|
}
|
|
1548
|
-
function
|
|
1549
|
-
return
|
|
1550
|
-
|
|
1761
|
+
function SiteCatalog_$reflection() {
|
|
1762
|
+
return (0, _Reflection.record_type)("FormSpec.Integrations.CorEMR.FormTemplateDecoder.SiteCatalog", [], SiteCatalog, ()=>[
|
|
1763
|
+
[
|
|
1764
|
+
"Version",
|
|
1765
|
+
_Reflection.int32_type
|
|
1766
|
+
],
|
|
1767
|
+
[
|
|
1768
|
+
"GeneratedAt",
|
|
1769
|
+
_Reflection.string_type
|
|
1770
|
+
],
|
|
1771
|
+
[
|
|
1772
|
+
"GeneratedFrom",
|
|
1773
|
+
_Reflection.string_type
|
|
1774
|
+
],
|
|
1775
|
+
[
|
|
1776
|
+
"CoreEmr",
|
|
1777
|
+
CoreEmrInfo_$reflection()
|
|
1778
|
+
],
|
|
1779
|
+
[
|
|
1780
|
+
"Stats",
|
|
1781
|
+
TemplateStats_$reflection()
|
|
1782
|
+
],
|
|
1783
|
+
[
|
|
1784
|
+
"Scoring",
|
|
1785
|
+
ReleaseAvailability$1_$reflection(ScoringCatalog_$reflection())
|
|
1786
|
+
],
|
|
1787
|
+
[
|
|
1788
|
+
"Triggers",
|
|
1789
|
+
ReleaseAvailability$1_$reflection(TriggerStats_$reflection())
|
|
1790
|
+
],
|
|
1791
|
+
[
|
|
1792
|
+
"FormIds",
|
|
1793
|
+
(0, _Reflection.list_type)(_Reflection.int32_type)
|
|
1794
|
+
]
|
|
1795
|
+
]);
|
|
1796
|
+
}
|
|
1797
|
+
const siteCatalogDecoder = orFail((path_4, v)=>(0, _Decode.object)((get$)=>{
|
|
1798
|
+
let arg_5, objectArg_2, objectArg_3, objectArg_4, objectArg_5, objectArg_6, objectArg_7, objectArg_8, objectArg_9;
|
|
1799
|
+
let triggersRow;
|
|
1800
|
+
const arg_1 = availabilityRowDecoder("triggersFrom");
|
|
1801
|
+
const objectArg = get$.Required;
|
|
1802
|
+
triggersRow = objectArg.Field("triggersFrom", (0, _Util.uncurry2)(arg_1));
|
|
1803
|
+
let scoringRow;
|
|
1804
|
+
const arg_3 = availabilityRowDecoder("scoringFrom");
|
|
1805
|
+
const objectArg_1 = get$.Required;
|
|
1806
|
+
scoringRow = objectArg_1.Field("scoringFrom", (0, _Util.uncurry2)(arg_3));
|
|
1807
|
+
const scoring = (0, _Result.Result_Bind)((datum)=>join("scoringFrom (instrumentMap + instrumentMapStats + stats.withScoring)", scoringRow, datum), scoringCatalogOf((arg_5 = dictDecoder((0, _Util.uncurry2)(instrumentMapEntryDecoder)), objectArg_2 = get$.Optional, objectArg_2.Field("instrumentMap", (0, _Util.uncurry2)(arg_5))), (objectArg_3 = get$.Optional, objectArg_3.Field("instrumentMapStats", (0, _Util.uncurry2)(instrumentMapStatsDecoder))), get$.Optional.Raw((firstPath, firstValue)=>(0, _Decode.at)((0, _List.ofArray)([
|
|
1808
|
+
"stats",
|
|
1809
|
+
"withScoring"
|
|
1810
|
+
]), (0, _Util.uncurry2)(_Decode.int), firstPath, firstValue))));
|
|
1811
|
+
const triggers = join("triggersFrom (stats.triggerStats)", triggersRow, get$.Optional.Raw((firstPath_1, firstValue_1)=>(0, _Decode.at)((0, _List.ofArray)([
|
|
1812
|
+
"stats",
|
|
1813
|
+
"triggerStats"
|
|
1814
|
+
]), (0, _Util.uncurry2)(triggerStatsDecoder), firstPath_1, firstValue_1)));
|
|
1815
|
+
let matchResult, scoringAvailability, triggerAvailability, e;
|
|
1816
|
+
const copyOfStruct = scoring;
|
|
1817
|
+
if (copyOfStruct.tag === /* Error */ 1) {
|
|
1818
|
+
matchResult = 1;
|
|
1819
|
+
e = copyOfStruct.fields[0];
|
|
1820
|
+
} else {
|
|
1821
|
+
const copyOfStruct_1 = triggers;
|
|
1822
|
+
if (copyOfStruct_1.tag === /* Error */ 1) {
|
|
1823
|
+
matchResult = 1;
|
|
1824
|
+
e = copyOfStruct_1.fields[0];
|
|
1825
|
+
} else {
|
|
1826
|
+
matchResult = 0;
|
|
1827
|
+
scoringAvailability = copyOfStruct.fields[0];
|
|
1828
|
+
triggerAvailability = copyOfStruct_1.fields[0];
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
switch(matchResult){
|
|
1832
|
+
case 0:
|
|
1833
|
+
return (0, _Result.FSharpResult$2_Ok)(new SiteCatalog((objectArg_4 = get$.Required, objectArg_4.Field("version", (0, _Util.uncurry2)(_Decode.int))), (objectArg_5 = get$.Required, objectArg_5.Field("generatedAt", _Decode.string)), (objectArg_6 = get$.Required, objectArg_6.Field("generatedFrom", _Decode.string)), (objectArg_7 = get$.Required, objectArg_7.Field("coreEmr", (0, _Util.uncurry2)(coreEmrDecoder))), (objectArg_8 = get$.Required, objectArg_8.Field("stats", (0, _Util.uncurry2)(statsDecoder))), scoringAvailability, triggerAvailability, (objectArg_9 = get$.Required, objectArg_9.Field("forms", (path_3, value_3)=>(0, _Decode.list)((path_2, value_2)=>(0, _Decode.field)("formId", (0, _Util.uncurry2)(_Decode.int), path_2, value_2), path_3, value_3)))));
|
|
1834
|
+
default:
|
|
1835
|
+
return (0, _Result.FSharpResult$2_Error)(e);
|
|
1836
|
+
}
|
|
1837
|
+
}, path_4, v));
|
|
1838
|
+
function decodeSiteCatalog(json) {
|
|
1839
|
+
return (0, _Decode.fromString)((0, _Util.uncurry2)(siteCatalogDecoder), json);
|
|
1840
|
+
} //# sourceMappingURL=FormTemplateDecoder.ts.map
|
|
1551
1841
|
|
|
1552
|
-
//# sourceMappingURL=
|
|
1842
|
+
//# sourceMappingURL=FormTemplateDecoder.js.map
|