@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
|
@@ -140,6 +140,8 @@ export function ExpectedFieldValueType_$reflection(): TypeInfo {
|
|
|
140
140
|
|
|
141
141
|
export function getExpectedFieldValueType(fieldType: Spec_FieldType_$union): ExpectedFieldValueType_$union {
|
|
142
142
|
switch (fieldType.tag) {
|
|
143
|
+
case /* Text */ 0:
|
|
144
|
+
return ExpectedFieldValueType_SingleValue();
|
|
143
145
|
case /* TextArea */ 1:
|
|
144
146
|
return ExpectedFieldValueType_SingleValue();
|
|
145
147
|
case /* Email */ 2:
|
|
@@ -182,10 +184,10 @@ export function getExpectedFieldValueType(fieldType: Spec_FieldType_$union): Exp
|
|
|
182
184
|
return ExpectedFieldValueType_MultipleValues();
|
|
183
185
|
case /* Matrix */ 19:
|
|
184
186
|
return ExpectedFieldValueType_MatrixValue();
|
|
185
|
-
case /* PluginField */
|
|
187
|
+
case /* PluginField */ 23:
|
|
186
188
|
return ExpectedFieldValueType_PluginDataValue();
|
|
187
189
|
default:
|
|
188
|
-
|
|
190
|
+
throw new Error("Match failure: F1.Studio.Spec.FieldType");
|
|
189
191
|
}
|
|
190
192
|
}
|
|
191
193
|
|
|
@@ -405,7 +407,7 @@ export function buildFormSpecWithValues(formSpec: Spec_FormSpec$1<Spec_FieldType
|
|
|
405
407
|
* TypeScript: createCheckboxField(fieldKey: string, label: string, isOptional: boolean)
|
|
406
408
|
*/
|
|
407
409
|
export function createCheckboxField(fieldKeyString: string, label: string, isOptional: boolean): Spec_FormField$1<Spec_FieldType_$union> {
|
|
408
|
-
return new Spec_FormField$1(1, new Shared_FieldKey(parse(fieldKeyString)), label, undefined, undefined, isOptional, false, Spec_FieldType_Checkbox(new Spec_BooleanInfo(undefined, undefined)), undefined);
|
|
410
|
+
return new Spec_FormField$1(1, new Shared_FieldKey(parse(fieldKeyString)), label, undefined, undefined, isOptional, false, false, undefined, Spec_FieldType_Checkbox(new Spec_BooleanInfo(undefined, undefined)), undefined);
|
|
409
411
|
}
|
|
410
412
|
|
|
411
413
|
/**
|
|
@@ -414,7 +416,7 @@ export function createCheckboxField(fieldKeyString: string, label: string, isOpt
|
|
|
414
416
|
*/
|
|
415
417
|
export function createCheckboxListField(fieldKeyString: string, label: string, options: { description: string, optionKey: string, value: string }[]): Spec_FormField$1<Spec_FieldType_$union> {
|
|
416
418
|
const fieldOptions: FSharpList<Shared_FieldOption> = ofSeq<Shared_FieldOption>(mapIndexed<{ description: string, optionKey: string, value: string }, Shared_FieldOption>((_arg: int32, opt: { description: string, optionKey: string, value: string }): Shared_FieldOption => (new Shared_FieldOption(opt.description, opt.value, new Shared_FieldOptionKey(parse(opt.optionKey)), undefined)), options));
|
|
417
|
-
return new Spec_FormField$1(1, new Shared_FieldKey(parse(fieldKeyString)), label, undefined, undefined, false, false, Spec_FieldType_CheckboxList(new Spec_MultiChoiceInfo(fieldOptions)), undefined);
|
|
419
|
+
return new Spec_FormField$1(1, new Shared_FieldKey(parse(fieldKeyString)), label, undefined, undefined, false, false, false, undefined, Spec_FieldType_CheckboxList(new Spec_MultiChoiceInfo(fieldOptions)), undefined);
|
|
418
420
|
}
|
|
419
421
|
|
|
420
422
|
/**
|
|
@@ -422,7 +424,7 @@ export function createCheckboxListField(fieldKeyString: string, label: string, o
|
|
|
422
424
|
* TypeScript: createTextField(fieldKey: string, label: string, isOptional: boolean)
|
|
423
425
|
*/
|
|
424
426
|
export function createTextField(fieldKeyString: string, label: string, isOptional: boolean): Spec_FormField$1<Spec_FieldType_$union> {
|
|
425
|
-
return new Spec_FormField$1(1, new Shared_FieldKey(parse(fieldKeyString)), label, undefined, undefined, isOptional, false, Spec_FieldType_Text(new Spec_TextInfo(undefined)), undefined);
|
|
427
|
+
return new Spec_FormField$1(1, new Shared_FieldKey(parse(fieldKeyString)), label, undefined, undefined, isOptional, false, false, undefined, Spec_FieldType_Text(new Spec_TextInfo(undefined)), undefined);
|
|
426
428
|
}
|
|
427
429
|
|
|
428
430
|
/**
|
|
@@ -430,7 +432,7 @@ export function createTextField(fieldKeyString: string, label: string, isOptiona
|
|
|
430
432
|
* TypeScript: createFormStep(stepOrder: number, stepLabel: string, fields: FormField[])
|
|
431
433
|
*/
|
|
432
434
|
export function createFormStep(stepOrder: int32, stepLabel: string, fields: Spec_FormField$1<Spec_FieldType_$union>[]): Spec_FormStep$1<Spec_FieldType_$union> {
|
|
433
|
-
return new Spec_FormStep$1(stepOrder, stepLabel, ofSeq<Spec_FormField$1<Spec_FieldType_$union>>(mapIndexed<Spec_FormField$1<Spec_FieldType_$union>, Spec_FormField$1<Spec_FieldType_$union>>((index: int32, field: Spec_FormField$1<Spec_FieldType_$union>): Spec_FormField$1<Spec_FieldType_$union> => (new Spec_FormField$1(index + 1, field.FieldKey, field.Label, field.Notes, field.DependsOn, field.IsOptional, field.IsDeprecated, field.FieldType, field.Value)), fields)));
|
|
435
|
+
return new Spec_FormStep$1(stepOrder, stepLabel, ofSeq<Spec_FormField$1<Spec_FieldType_$union>>(mapIndexed<Spec_FormField$1<Spec_FieldType_$union>, Spec_FormField$1<Spec_FieldType_$union>>((index: int32, field: Spec_FormField$1<Spec_FieldType_$union>): Spec_FormField$1<Spec_FieldType_$union> => (new Spec_FormField$1(index + 1, field.FieldKey, field.Label, field.Notes, field.DependsOn, field.IsOptional, field.IsDeprecated, field.NeedsDocumentation, field.Documentation, field.FieldType, field.Value)), fields)));
|
|
434
436
|
}
|
|
435
437
|
|
|
436
438
|
/**
|
|
@@ -438,7 +440,7 @@ export function createFormStep(stepOrder: int32, stepLabel: string, fields: Spec
|
|
|
438
440
|
* TypeScript: createFormSpec(id: string, title: string, steps: FormStep[])
|
|
439
441
|
*/
|
|
440
442
|
export function createFormSpec(idString: string, title: string, steps: Spec_FormStep$1<Spec_FieldType_$union>[]): Spec_FormSpec$1<Spec_FieldType_$union> {
|
|
441
|
-
return new Spec_FormSpec$1(parse(idString), "DYN", title, "Dynamically created FormSpec", "1.0.0", "2.0.5", ofSeq<Spec_FormStep$1<Spec_FieldType_$union>>(steps), empty<string>(), undefined, empty<string>(), false, false, undefined, Spec_FormLifecycle_Blueprint(), undefined);
|
|
443
|
+
return new Spec_FormSpec$1(parse(idString), "DYN", title, "Dynamically created FormSpec", "1.0.0", "2.0.5", ofSeq<Spec_FormStep$1<Spec_FieldType_$union>>(steps), empty<string>(), undefined, empty<string>(), false, false, undefined, Spec_FormLifecycle_Blueprint(), undefined, undefined, undefined);
|
|
442
444
|
}
|
|
443
445
|
|
|
444
446
|
/**
|
|
@@ -454,7 +456,7 @@ export function createFieldOption(description: string, value: string, optionKeyS
|
|
|
454
456
|
* TypeScript: createMatrixField(fieldKey: string, label: string, items: FieldOption[], options: FieldOption[])
|
|
455
457
|
*/
|
|
456
458
|
export function createMatrixField(fieldKeyString: string, label: string, items: Shared_FieldOption[], options: Shared_FieldOption[]): Spec_FormField$1<Spec_FieldType_$union> {
|
|
457
|
-
return new Spec_FormField$1(1, new Shared_FieldKey(parse(fieldKeyString)), label, undefined, undefined, false, false, Spec_FieldType_Matrix(new Spec_MatrixInfo(ofSeq<Shared_FieldOption>(items), ofSeq<Shared_FieldOption>(options))), undefined);
|
|
459
|
+
return new Spec_FormField$1(1, new Shared_FieldKey(parse(fieldKeyString)), label, undefined, undefined, false, false, false, undefined, Spec_FieldType_Matrix(new Spec_MatrixInfo(ofSeq<Shared_FieldOption>(items), ofSeq<Shared_FieldOption>(options))), undefined);
|
|
458
460
|
}
|
|
459
461
|
|
|
460
462
|
/**
|
|
@@ -462,7 +464,7 @@ export function createMatrixField(fieldKeyString: string, label: string, items:
|
|
|
462
464
|
* TypeScript: createPluginField(fieldKey: string, label: string, config: {pluginId: string})
|
|
463
465
|
*/
|
|
464
466
|
export function createPluginField(fieldKeyString: string, label: string, config: { pluginId: string }): Spec_FormField$1<Spec_FieldType_$union> {
|
|
465
|
-
return new Spec_FormField$1(1, new Shared_FieldKey(parse(fieldKeyString)), label, undefined, undefined, false, false, Spec_FieldType_PluginField(new Spec_PluginFieldConfig(config.pluginId, undefined, undefined)), undefined);
|
|
467
|
+
return new Spec_FormField$1(1, new Shared_FieldKey(parse(fieldKeyString)), label, undefined, undefined, false, false, false, undefined, Spec_FieldType_PluginField(new Spec_PluginFieldConfig(config.pluginId, undefined, undefined)), undefined);
|
|
466
468
|
}
|
|
467
469
|
|
|
468
470
|
/**
|
|
@@ -504,7 +506,7 @@ export function createClinicalPathway(name: string, states: ClinicalPathway_Stat
|
|
|
504
506
|
* TypeScript: addPathwayToFormSpec(formSpec: FormSpec, pathway: ClinicalPathwaySpec)
|
|
505
507
|
*/
|
|
506
508
|
export function addPathwayToFormSpec(formSpec: Spec_FormSpec$1<Spec_FieldType_$union>, pathway: ClinicalPathway_ClinicalPathwaySpec): Spec_FormSpec$1<Spec_FieldType_$union> {
|
|
507
|
-
return new Spec_FormSpec$1(formSpec.Id, formSpec.Code, formSpec.Title, formSpec.Abstract, formSpec.Version, formSpec.FormSpecVersion, formSpec.Steps, formSpec.CategoryTags, formSpec.Score, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, pathway, formSpec.Lifecycle, formSpec.FilledMeta);
|
|
509
|
+
return new Spec_FormSpec$1(formSpec.Id, formSpec.Code, formSpec.Title, formSpec.Abstract, formSpec.Version, formSpec.FormSpecVersion, formSpec.Steps, formSpec.CategoryTags, formSpec.Score, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, pathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance);
|
|
508
510
|
}
|
|
509
511
|
|
|
510
512
|
/**
|
|
@@ -572,8 +574,8 @@ export function getFieldDetails(formSpec: Spec_FormSpec$1<Spec_FieldType_$union>
|
|
|
572
574
|
export function createTestFormSpec(): Spec_FormSpec$1<Spec_FieldType_$union> {
|
|
573
575
|
const option1: Shared_FieldOption = new Shared_FieldOption("Option 1", "opt1", new Shared_FieldOptionKey(newGuid()), undefined);
|
|
574
576
|
const option2: Shared_FieldOption = new Shared_FieldOption("Option 2", "opt2", new Shared_FieldOptionKey(newGuid()), undefined);
|
|
575
|
-
const testStep: Spec_FormStep$1<Spec_FieldType_$union> = new Spec_FormStep$1(1, "Test Step", ofArray_1([new Spec_FormField$1(1, new Shared_FieldKey("11111111-1111-1111-1111-111111111111"), "Test Text Field", undefined, undefined, false, false, Spec_FieldType_Text(new Spec_TextInfo(undefined)), undefined), new Spec_FormField$1(2, new Shared_FieldKey("22222222-2222-2222-2222-222222222222"), "Test Checkbox List", undefined, undefined, false, false, Spec_FieldType_CheckboxList(new Spec_MultiChoiceInfo(ofArray_1([option1, option2]))), undefined), new Spec_FormField$1(3, new Shared_FieldKey("33333333-3333-3333-3333-333333333333"), "Test Matrix", undefined, undefined, false, false, Spec_FieldType_Matrix(new Spec_MatrixInfo(ofArray_1([option1, option2]), ofArray_1([new Shared_FieldOption("Scale 1", "1", new Shared_FieldOptionKey(newGuid()), 1), new Shared_FieldOption("Scale 2", "2", new Shared_FieldOptionKey(newGuid()), 2)]))), undefined), new Spec_FormField$1(4, new Shared_FieldKey("44444444-4444-4444-4444-444444444444"), "Test Plugin Field", undefined, undefined, false, false, Spec_FieldType_PluginField(new Spec_PluginFieldConfig("test.plugin", undefined, undefined)), undefined)]));
|
|
576
|
-
return new Spec_FormSpec$1(newGuid(), "TEST-001", "Test Form", "Test form for buildDynamicFormResultData", "1.0.0", "5.0.0", singleton(testStep), empty<string>(), undefined, empty<string>(), false, false, undefined, Spec_FormLifecycle_Blueprint(), undefined);
|
|
577
|
+
const testStep: Spec_FormStep$1<Spec_FieldType_$union> = new Spec_FormStep$1(1, "Test Step", ofArray_1([new Spec_FormField$1(1, new Shared_FieldKey("11111111-1111-1111-1111-111111111111"), "Test Text Field", undefined, undefined, false, false, false, undefined, Spec_FieldType_Text(new Spec_TextInfo(undefined)), undefined), new Spec_FormField$1(2, new Shared_FieldKey("22222222-2222-2222-2222-222222222222"), "Test Checkbox List", undefined, undefined, false, false, false, undefined, Spec_FieldType_CheckboxList(new Spec_MultiChoiceInfo(ofArray_1([option1, option2]))), undefined), new Spec_FormField$1(3, new Shared_FieldKey("33333333-3333-3333-3333-333333333333"), "Test Matrix", undefined, undefined, false, false, false, undefined, Spec_FieldType_Matrix(new Spec_MatrixInfo(ofArray_1([option1, option2]), ofArray_1([new Shared_FieldOption("Scale 1", "1", new Shared_FieldOptionKey(newGuid()), 1), new Shared_FieldOption("Scale 2", "2", new Shared_FieldOptionKey(newGuid()), 2)]))), undefined), new Spec_FormField$1(4, new Shared_FieldKey("44444444-4444-4444-4444-444444444444"), "Test Plugin Field", undefined, undefined, false, false, false, undefined, Spec_FieldType_PluginField(new Spec_PluginFieldConfig("test.plugin", undefined, undefined)), undefined)]));
|
|
578
|
+
return new Spec_FormSpec$1(newGuid(), "TEST-001", "Test Form", "Test form for buildDynamicFormResultData", "1.0.0", "5.0.0", singleton(testStep), empty<string>(), undefined, empty<string>(), false, false, undefined, Spec_FormLifecycle_Blueprint(), undefined, undefined, undefined);
|
|
577
579
|
}
|
|
578
580
|
|
|
579
581
|
/**
|
|
@@ -601,7 +603,9 @@ export function getFieldTypeInfo(field: Spec_FormField$1<Spec_FieldType_$union>)
|
|
|
601
603
|
let matchValue: Spec_FieldType_$union;
|
|
602
604
|
return {
|
|
603
605
|
isRequired: !field.IsOptional,
|
|
604
|
-
typeName: (matchValue = field.FieldType, (matchValue.tag === /* TextArea */ 1) ? "TextArea" : ((matchValue.tag === /* Email */ 2) ? "Email" : ((matchValue.tag === /* Password */ 3) ? "Password" : ((matchValue.tag === /* Search */ 4) ? "Search" : ((matchValue.tag === /* Color */ 5) ? "Color" : ((matchValue.tag === /* Number */ 6) ? "Number" : ((matchValue.tag === /* Tel */ 7) ? "Tel" : ((matchValue.tag === /* Date */ 8) ? "Date" : ((matchValue.tag === /* DateTimeLocal */ 9) ? "DateTimeLocal" : ((matchValue.tag === /* Time */ 10) ? "Time" : ((matchValue.tag === /* Checkbox */ 11) ? "Checkbox" : ((matchValue.tag === /* Radio */ 12) ? "Radio" : ((matchValue.tag === /* SingleChoice */ 13) ? "SingleChoice" : ((matchValue.tag === /* Dropdown */ 14) ? "Dropdown" : ((matchValue.tag === /* TextAutoComplete */ 18) ? "TextAutoComplete" : ((matchValue.tag === /* MultiChoice */ 15) ? "MultiChoice" : ((matchValue.tag === /* CheckboxList */ 16) ? "CheckboxList" : ((matchValue.tag === /* TagList */ 17) ? "TagList" : ((matchValue.tag === /* Matrix */ 19) ? "Matrix" : ((matchValue.tag === /* Signature */ 20) ? "Signature" : ((matchValue.tag === /* Message */ 21) ? "Message" : ((matchValue.tag === /* PluginField */
|
|
606
|
+
typeName: (matchValue = field.FieldType, (matchValue.tag === /* Text */ 0) ? "Text" : ((matchValue.tag === /* TextArea */ 1) ? "TextArea" : ((matchValue.tag === /* Email */ 2) ? "Email" : ((matchValue.tag === /* Password */ 3) ? "Password" : ((matchValue.tag === /* Search */ 4) ? "Search" : ((matchValue.tag === /* Color */ 5) ? "Color" : ((matchValue.tag === /* Number */ 6) ? "Number" : ((matchValue.tag === /* Tel */ 7) ? "Tel" : ((matchValue.tag === /* Date */ 8) ? "Date" : ((matchValue.tag === /* DateTimeLocal */ 9) ? "DateTimeLocal" : ((matchValue.tag === /* Time */ 10) ? "Time" : ((matchValue.tag === /* Checkbox */ 11) ? "Checkbox" : ((matchValue.tag === /* Radio */ 12) ? "Radio" : ((matchValue.tag === /* SingleChoice */ 13) ? "SingleChoice" : ((matchValue.tag === /* Dropdown */ 14) ? "Dropdown" : ((matchValue.tag === /* TextAutoComplete */ 18) ? "TextAutoComplete" : ((matchValue.tag === /* MultiChoice */ 15) ? "MultiChoice" : ((matchValue.tag === /* CheckboxList */ 16) ? "CheckboxList" : ((matchValue.tag === /* TagList */ 17) ? "TagList" : ((matchValue.tag === /* Matrix */ 19) ? "Matrix" : ((matchValue.tag === /* Signature */ 20) ? "Signature" : ((matchValue.tag === /* Message */ 21) ? "Message" : ((matchValue.tag === /* PluginField */ 23) ? "PluginField" : (() => {
|
|
607
|
+
throw new Error("Match failure: F1.Studio.Spec.FieldType");
|
|
608
|
+
})()))))))))))))))))))))))),
|
|
605
609
|
};
|
|
606
610
|
}
|
|
607
611
|
|
|
@@ -612,7 +616,7 @@ export function getFieldTypeInfo(field: Spec_FormField$1<Spec_FieldType_$union>)
|
|
|
612
616
|
*/
|
|
613
617
|
export function getPluginFieldConfig(field: Spec_FormField$1<Spec_FieldType_$union>): Option<{ items?: { key: string, label: string }[], options?: { description: string, key: string, value: string }[], pluginId: string }> {
|
|
614
618
|
const matchValue: Spec_FieldType_$union = field.FieldType;
|
|
615
|
-
if (matchValue.tag === /* PluginField */
|
|
619
|
+
if (matchValue.tag === /* PluginField */ 23) {
|
|
616
620
|
const config: Spec_PluginFieldConfig = matchValue.fields[0];
|
|
617
621
|
return {
|
|
618
622
|
items: unwrap(map<FSharpList<Shared_FieldOption>, { key: string, label: string }[]>((items: FSharpList<Shared_FieldOption>): { key: string, label: string }[] => {
|
|
@@ -708,7 +712,7 @@ export function getFieldMatrixInfo(field: Spec_FormField$1<Spec_FieldType_$union
|
|
|
708
712
|
matrixInfo = matchValue.fields[0];
|
|
709
713
|
break;
|
|
710
714
|
}
|
|
711
|
-
case /* PluginField */
|
|
715
|
+
case /* PluginField */ 23: {
|
|
712
716
|
if ((config = matchValue.fields[0], (config.Items != null) && (config.Options != null))) {
|
|
713
717
|
matchResult = 1;
|
|
714
718
|
config_1 = matchValue.fields[0];
|
|
@@ -276,9 +276,11 @@ export class Types_FormFieldTS extends Record implements IEquatable<Types_FormFi
|
|
|
276
276
|
readonly DependsOn: Option<Types_DependsOnTS>;
|
|
277
277
|
readonly IsOptional: boolean;
|
|
278
278
|
readonly IsDeprecated: boolean;
|
|
279
|
+
readonly NeedsDocumentation: boolean;
|
|
280
|
+
readonly Documentation: Option<string>;
|
|
279
281
|
readonly FieldType: Types_FieldTypeTS;
|
|
280
282
|
readonly Value: Option<any>;
|
|
281
|
-
constructor(FieldOrder: int32, FieldKey: Types_FieldKeyTS, Label: string, Notes: Option<string>, DependsOn: Option<Types_DependsOnTS>, IsOptional: boolean, IsDeprecated: boolean, FieldType: Types_FieldTypeTS, Value: Option<any>) {
|
|
283
|
+
constructor(FieldOrder: int32, FieldKey: Types_FieldKeyTS, Label: string, Notes: Option<string>, DependsOn: Option<Types_DependsOnTS>, IsOptional: boolean, IsDeprecated: boolean, NeedsDocumentation: boolean, Documentation: Option<string>, FieldType: Types_FieldTypeTS, Value: Option<any>) {
|
|
282
284
|
super();
|
|
283
285
|
this.FieldOrder = (FieldOrder | 0);
|
|
284
286
|
this.FieldKey = FieldKey;
|
|
@@ -287,13 +289,15 @@ export class Types_FormFieldTS extends Record implements IEquatable<Types_FormFi
|
|
|
287
289
|
this.DependsOn = DependsOn;
|
|
288
290
|
this.IsOptional = IsOptional;
|
|
289
291
|
this.IsDeprecated = IsDeprecated;
|
|
292
|
+
this.NeedsDocumentation = NeedsDocumentation;
|
|
293
|
+
this.Documentation = Documentation;
|
|
290
294
|
this.FieldType = FieldType;
|
|
291
295
|
this.Value = Value;
|
|
292
296
|
}
|
|
293
297
|
}
|
|
294
298
|
|
|
295
299
|
export function Types_FormFieldTS_$reflection(): TypeInfo {
|
|
296
|
-
return record_type("F1.Studio.FormSpec.Interop.OptionBased.Types.FormFieldTS", [], Types_FormFieldTS, () => [["FieldOrder", int32_type], ["FieldKey", Types_FieldKeyTS_$reflection()], ["Label", string_type], ["Notes", option_type(string_type)], ["DependsOn", option_type(Types_DependsOnTS_$reflection())], ["IsOptional", bool_type], ["IsDeprecated", bool_type], ["FieldType", Types_FieldTypeTS_$reflection()], ["Value", option_type(obj_type)]]);
|
|
300
|
+
return record_type("F1.Studio.FormSpec.Interop.OptionBased.Types.FormFieldTS", [], Types_FormFieldTS, () => [["FieldOrder", int32_type], ["FieldKey", Types_FieldKeyTS_$reflection()], ["Label", string_type], ["Notes", option_type(string_type)], ["DependsOn", option_type(Types_DependsOnTS_$reflection())], ["IsOptional", bool_type], ["IsDeprecated", bool_type], ["NeedsDocumentation", bool_type], ["Documentation", option_type(string_type)], ["FieldType", Types_FieldTypeTS_$reflection()], ["Value", option_type(obj_type)]]);
|
|
297
301
|
}
|
|
298
302
|
|
|
299
303
|
export class Types_FormStepTS extends Record implements IEquatable<Types_FormStepTS> {
|
|
@@ -642,6 +646,8 @@ export function Converters_messageTypeFromTS(msgType: int32): Option<Spec_Messag
|
|
|
642
646
|
*/
|
|
643
647
|
export function Converters_fieldTypeToTS(fieldType: Spec_FieldType_$union): Types_FieldTypeTS {
|
|
644
648
|
switch (fieldType.tag) {
|
|
649
|
+
case /* Text */ 0:
|
|
650
|
+
return new Types_FieldTypeTS("Text", new Types_TextInfoTS(fieldType.fields[0].Value), undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
|
|
645
651
|
case /* TextArea */ 1:
|
|
646
652
|
return new Types_FieldTypeTS("TextArea", new Types_TextInfoTS(fieldType.fields[0].Value), undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
|
|
647
653
|
case /* Email */ 2:
|
|
@@ -690,10 +696,10 @@ export function Converters_fieldTypeToTS(fieldType: Spec_FieldType_$union): Type
|
|
|
690
696
|
const info_21: Spec_MessageInfo = fieldType.fields[0];
|
|
691
697
|
return new Types_FieldTypeTS("Message", undefined, undefined, undefined, undefined, undefined, new Types_MessageInfoTS(info_21.Heading, Converters_messageTypeToTS(info_21.MessageType), info_21.Message, info_21.Footer), undefined, undefined, undefined);
|
|
692
698
|
}
|
|
693
|
-
case /* PluginField */
|
|
699
|
+
case /* PluginField */ 23:
|
|
694
700
|
return new Types_FieldTypeTS("PluginField", undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, new Types_PluginFieldConfigTS(fieldType.fields[0].PluginId));
|
|
695
701
|
default:
|
|
696
|
-
|
|
702
|
+
throw new Error("Match failure: F1.Studio.Spec.FieldType");
|
|
697
703
|
}
|
|
698
704
|
}
|
|
699
705
|
|
|
@@ -1180,7 +1186,7 @@ export function Converters_fieldTypeFromTS(fieldType: Types_FieldTypeTS): Option
|
|
|
1180
1186
|
* Convert F# FormField to TypeScript representation
|
|
1181
1187
|
*/
|
|
1182
1188
|
export function Converters_formFieldToTS(field: Spec_FormField$1<Spec_FieldType_$union>): Types_FormFieldTS {
|
|
1183
|
-
return new Types_FormFieldTS(field.FieldOrder, Converters_fieldKeyToTS(field.FieldKey), field.Label, field.Notes, map_2<Spec_DependsOn, Types_DependsOnTS>(Converters_dependsOnToTS, field.DependsOn), field.IsOptional, field.IsDeprecated, Converters_fieldTypeToTS(field.FieldType), map_2<Shared_FieldValue_$union, any>((value: Shared_FieldValue_$union): any => value, field.Value));
|
|
1189
|
+
return new Types_FormFieldTS(field.FieldOrder, Converters_fieldKeyToTS(field.FieldKey), field.Label, field.Notes, map_2<Spec_DependsOn, Types_DependsOnTS>(Converters_dependsOnToTS, field.DependsOn), field.IsOptional, field.IsDeprecated, field.NeedsDocumentation, field.Documentation, Converters_fieldTypeToTS(field.FieldType), map_2<Shared_FieldValue_$union, any>((value: Shared_FieldValue_$union): any => value, field.Value));
|
|
1184
1190
|
}
|
|
1185
1191
|
|
|
1186
1192
|
/**
|
|
@@ -1206,7 +1212,7 @@ export function Converters_formFieldFromTS(field: Types_FormFieldTS): Option<Spe
|
|
|
1206
1212
|
}
|
|
1207
1213
|
switch (matchResult) {
|
|
1208
1214
|
case 0:
|
|
1209
|
-
return new Spec_FormField$1(field.FieldOrder, key!, field.Label, field.Notes, (matchValue_3 = field.DependsOn, (matchValue_3 == null) ? undefined : Converters_dependsOnFromTS(value_2(matchValue_3))), field.IsOptional, field.IsDeprecated, fieldType!, undefined);
|
|
1215
|
+
return new Spec_FormField$1(field.FieldOrder, key!, field.Label, field.Notes, (matchValue_3 = field.DependsOn, (matchValue_3 == null) ? undefined : Converters_dependsOnFromTS(value_2(matchValue_3))), field.IsOptional, field.IsDeprecated, field.NeedsDocumentation, field.Documentation, fieldType!, undefined);
|
|
1210
1216
|
default:
|
|
1211
1217
|
return undefined;
|
|
1212
1218
|
}
|
|
@@ -1451,7 +1457,7 @@ export function Converters_formSpecFromTS(spec: Types_FormSpecTS): Option<Spec_F
|
|
|
1451
1457
|
return undefined;
|
|
1452
1458
|
}
|
|
1453
1459
|
else {
|
|
1454
|
-
return new Spec_FormSpec$1(matchValue[1], spec.Code, spec.Title, spec.Abstract, spec.Version, spec.FormSpecVersion, reverse<Spec_FormStep$1<Spec_FieldType_$union>>(value_2(convertedSteps)), ofArray<string>(spec.CategoryTags), scoreResult, ofArray<string>(spec.AssociatedCodes), spec.RequiresReview, spec.RequiresReviewAndApproval, undefined, Spec_FormLifecycle_Blueprint(), undefined);
|
|
1460
|
+
return new Spec_FormSpec$1(matchValue[1], spec.Code, spec.Title, spec.Abstract, spec.Version, spec.FormSpecVersion, reverse<Spec_FormStep$1<Spec_FieldType_$union>>(value_2(convertedSteps)), ofArray<string>(spec.CategoryTags), scoreResult, ofArray<string>(spec.AssociatedCodes), spec.RequiresReview, spec.RequiresReviewAndApproval, undefined, Spec_FormLifecycle_Blueprint(), undefined, undefined, undefined);
|
|
1455
1461
|
}
|
|
1456
1462
|
}
|
|
1457
1463
|
else {
|
|
@@ -882,7 +882,7 @@ export function evaluateTransitionWithPartialData(resolver: ((arg0: string) => S
|
|
|
882
882
|
const pluginIdOpt: Option<string> = filter<string>((id: string): boolean => !isNullOrEmpty(id), bind<Spec_FormSpec$1<Spec_FieldType_$union>, string>((spec_5: Spec_FormSpec$1<Spec_FieldType_$union>): Option<string> => map<Spec_FormField$1<Spec_FieldType_$union>, string>((f_1: Spec_FormField$1<Spec_FieldType_$union>): string => {
|
|
883
883
|
const ft = f_1.FieldType as Spec_FieldType_$union;
|
|
884
884
|
switch (ft.tag) {
|
|
885
|
-
case /* PluginField */
|
|
885
|
+
case /* PluginField */ 23:
|
|
886
886
|
return ft.fields[0].PluginId;
|
|
887
887
|
case /* Matrix */ 19:
|
|
888
888
|
return "Fable.Form.Simple.Bulma.Fields.LikertField";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Record } from "@fable-org/fable-library-js/Types.js";
|
|
2
|
+
import { IComparable, IEquatable } from "@fable-org/fable-library-js/Util.js";
|
|
3
|
+
import { record_type, string_type, TypeInfo } from "@fable-org/fable-library-js/Reflection.js";
|
|
4
|
+
|
|
5
|
+
export class IntegrationProvenance extends Record implements IEquatable<IntegrationProvenance>, IComparable<IntegrationProvenance> {
|
|
6
|
+
readonly IntegrationKey: string;
|
|
7
|
+
readonly Payload: string;
|
|
8
|
+
constructor(IntegrationKey: string, Payload: string) {
|
|
9
|
+
super();
|
|
10
|
+
this.IntegrationKey = IntegrationKey;
|
|
11
|
+
this.Payload = Payload;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function IntegrationProvenance_$reflection(): TypeInfo {
|
|
16
|
+
return record_type("F1.Studio.Provenance.IntegrationProvenance", [], IntegrationProvenance, () => [["IntegrationKey", string_type], ["Payload", string_type]]);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=Provenance.ts.map
|
|
@@ -18,6 +18,28 @@ function generateHeadingLevel(level: int32): string {
|
|
|
18
18
|
function formatFieldValue(fieldType: Spec_FieldType_$union, fieldValue: Shared_FieldValue_$union, field: Spec_FormField$1<Spec_FieldType_$union>): string {
|
|
19
19
|
let matchResult: int32, answer: Shared_FieldAnswer, answer_1: Shared_FieldAnswer, answer_2: Shared_FieldAnswer, answer_3: Shared_FieldAnswer, answer_4: Shared_FieldAnswer, answer_5: Shared_FieldAnswer, answer_6: Shared_FieldAnswer, answer_7: Shared_FieldAnswer, answer_8: Shared_FieldAnswer, answer_9: Shared_FieldAnswer, answer_10: Shared_FieldAnswer, answer_11: Shared_FieldAnswer, answer_12: Shared_FieldAnswer, info: Spec_SingleChoiceInfo, answer_13: Shared_FieldAnswer, info_1: Spec_SingleChoiceInfo, answer_14: Shared_FieldAnswer, info_2: Spec_SingleChoiceInfo, answer_15: Shared_FieldAnswer, info_3: Spec_SingleChoiceInfo, answers: FSharpSet<Shared_FieldAnswer>, info_4: Spec_MultiChoiceInfo, answers_1: FSharpSet<Shared_FieldAnswer>, info_5: Spec_MultiChoiceInfo, answers_2: FSharpSet<Shared_FieldAnswer>, info_6: Spec_MultiChoiceInfo, answer_19: Shared_FieldAnswer, answer_20: Shared_FieldAnswer, answer_21: Shared_FieldAnswer, pluginData: FSharpList<Shared_PluginDataProperty>;
|
|
20
20
|
switch (fieldType.tag) {
|
|
21
|
+
case /* Text */ 0: {
|
|
22
|
+
switch (fieldValue.tag) {
|
|
23
|
+
case /* Multiple */ 1: {
|
|
24
|
+
matchResult = 23;
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
case /* Matrix */ 2: {
|
|
28
|
+
matchResult = 25;
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
case /* PluginData */ 3: {
|
|
32
|
+
matchResult = 26;
|
|
33
|
+
pluginData = fieldValue.fields[0];
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
default: {
|
|
37
|
+
matchResult = 0;
|
|
38
|
+
answer = fieldValue.fields[0];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
21
43
|
case /* TextArea */ 1: {
|
|
22
44
|
switch (fieldValue.tag) {
|
|
23
45
|
case /* Multiple */ 1: {
|
|
@@ -450,7 +472,7 @@ function formatFieldValue(fieldType: Spec_FieldType_$union, fieldValue: Shared_F
|
|
|
450
472
|
matchResult = 20;
|
|
451
473
|
break;
|
|
452
474
|
}
|
|
453
|
-
case /* PluginField */
|
|
475
|
+
case /* PluginField */ 23: {
|
|
454
476
|
switch (fieldValue.tag) {
|
|
455
477
|
case /* Multiple */ 1: {
|
|
456
478
|
matchResult = 23;
|
|
@@ -478,10 +500,6 @@ function formatFieldValue(fieldType: Spec_FieldType_$union, fieldValue: Shared_F
|
|
|
478
500
|
}
|
|
479
501
|
default:
|
|
480
502
|
switch (fieldValue.tag) {
|
|
481
|
-
case /* Multiple */ 1: {
|
|
482
|
-
matchResult = 23;
|
|
483
|
-
break;
|
|
484
|
-
}
|
|
485
503
|
case /* Matrix */ 2: {
|
|
486
504
|
matchResult = 25;
|
|
487
505
|
break;
|
|
@@ -491,10 +509,8 @@ function formatFieldValue(fieldType: Spec_FieldType_$union, fieldValue: Shared_F
|
|
|
491
509
|
pluginData = fieldValue.fields[0];
|
|
492
510
|
break;
|
|
493
511
|
}
|
|
494
|
-
default:
|
|
495
|
-
matchResult =
|
|
496
|
-
answer = fieldValue.fields[0];
|
|
497
|
-
}
|
|
512
|
+
default:
|
|
513
|
+
matchResult = 27;
|
|
498
514
|
}
|
|
499
515
|
}
|
|
500
516
|
switch (matchResult) {
|
|
@@ -564,7 +580,7 @@ function formatFieldValue(fieldType: Spec_FieldType_$union, fieldValue: Shared_F
|
|
|
564
580
|
return answer_21!.Value;
|
|
565
581
|
case 25:
|
|
566
582
|
return "";
|
|
567
|
-
|
|
583
|
+
case 26:
|
|
568
584
|
return join(", ", map_1<Shared_PluginDataProperty, string>((prop: Shared_PluginDataProperty): string => {
|
|
569
585
|
const matchValue_2: Option<string> = prop.DisplayName;
|
|
570
586
|
if (matchValue_2 == null) {
|
|
@@ -575,6 +591,8 @@ function formatFieldValue(fieldType: Spec_FieldType_$union, fieldValue: Shared_F
|
|
|
575
591
|
return toText(printf("%s: %s"))(displayName)(prop.Value);
|
|
576
592
|
}
|
|
577
593
|
}, pluginData!));
|
|
594
|
+
default:
|
|
595
|
+
throw new Error("Match failure: F1.Studio.Spec.FieldType");
|
|
578
596
|
}
|
|
579
597
|
}
|
|
580
598
|
|
|
@@ -644,6 +662,8 @@ function formatMatrixFieldAsTable(fieldLabel: string, matrixInfo: Spec_MatrixInf
|
|
|
644
662
|
|
|
645
663
|
function getFieldTypeName(fieldType: Spec_FieldType_$union): string {
|
|
646
664
|
switch (fieldType.tag) {
|
|
665
|
+
case /* Text */ 0:
|
|
666
|
+
return "Text";
|
|
647
667
|
case /* TextArea */ 1:
|
|
648
668
|
return "TextArea";
|
|
649
669
|
case /* Email */ 2:
|
|
@@ -686,10 +706,10 @@ function getFieldTypeName(fieldType: Spec_FieldType_$union): string {
|
|
|
686
706
|
return "Message";
|
|
687
707
|
case /* Matrix */ 19:
|
|
688
708
|
return "Matrix";
|
|
689
|
-
case /* PluginField */
|
|
709
|
+
case /* PluginField */ 23:
|
|
690
710
|
return "PluginField";
|
|
691
711
|
default:
|
|
692
|
-
|
|
712
|
+
throw new Error("Match failure: F1.Studio.Spec.FieldType");
|
|
693
713
|
}
|
|
694
714
|
}
|
|
695
715
|
|
|
@@ -97,7 +97,7 @@ export function getTransitionLabel(condition: ClinicalPathway_TransitionConditio
|
|
|
97
97
|
const fieldName_3: string = (fieldItemKey == null) ? baseFieldLabel : (`${baseFieldLabel} [${substring(value_2(fieldItemKey).fields[0], 0, 8)}]`);
|
|
98
98
|
const optionLabel: string = defaultArgWith<string>(bind<Spec_FormSpec$1<Spec_FieldType_$union>, string>((spec_4: Spec_FormSpec$1<Spec_FieldType_$union>): Option<string> => bind<Spec_FormField$1<Spec_FieldType_$union>, string>((field_9: Spec_FormField$1<Spec_FieldType_$union>): Option<string> => {
|
|
99
99
|
let matchValue: Spec_FieldType_$union;
|
|
100
|
-
return map<Shared_FieldOption, string>((opt_1: Shared_FieldOption): string => opt_1.Description, tryFind<Shared_FieldOption>((opt: Shared_FieldOption): boolean => equals(opt.OptionKey, optionKey), (matchValue = field_9.FieldType, (matchValue.tag === /* SingleChoice */ 13) ? matchValue.fields[0].Options : ((matchValue.tag === /* MultiChoice */ 15) ? matchValue.fields[0].Options : ((matchValue.tag === /* CheckboxList */ 16) ? matchValue.fields[0].Options : ((matchValue.tag === /* Dropdown */ 14) ? matchValue.fields[0].Options : ((matchValue.tag === /* Radio */ 12) ? matchValue.fields[0].Options : ((matchValue.tag === /* PluginField */
|
|
100
|
+
return map<Shared_FieldOption, string>((opt_1: Shared_FieldOption): string => opt_1.Description, tryFind<Shared_FieldOption>((opt: Shared_FieldOption): boolean => equals(opt.OptionKey, optionKey), (matchValue = field_9.FieldType, (matchValue.tag === /* SingleChoice */ 13) ? matchValue.fields[0].Options : ((matchValue.tag === /* MultiChoice */ 15) ? matchValue.fields[0].Options : ((matchValue.tag === /* CheckboxList */ 16) ? matchValue.fields[0].Options : ((matchValue.tag === /* Dropdown */ 14) ? matchValue.fields[0].Options : ((matchValue.tag === /* Radio */ 12) ? matchValue.fields[0].Options : ((matchValue.tag === /* PluginField */ 23) ? defaultArg(bind<IPluginValueConverter, FSharpList<Shared_FieldOption>>((c: IPluginValueConverter): Option<FSharpList<Shared_FieldOption>> => c.GetOptions(), PluginValueRegistry_tryGet(matchValue.fields[0].PluginId)), empty<Shared_FieldOption>()) : empty<Shared_FieldOption>()))))))));
|
|
101
101
|
}, tryFind<Spec_FormField$1<Spec_FieldType_$union>>((field_8: Spec_FormField$1<Spec_FieldType_$union>): boolean => equals(field_8.FieldKey, fieldKey_2), collect<Spec_FormStep$1<Spec_FieldType_$union>, Spec_FormField$1<Spec_FieldType_$union>>((step_4: Spec_FormStep$1<Spec_FieldType_$union>): FSharpList<Spec_FormField$1<Spec_FieldType_$union>> => step_4.Fields, spec_4.Steps))), formSpec), (): string => (`Option-${substring(optionKey.fields[0], 0, 8)}`));
|
|
102
102
|
switch (op_2.tag) {
|
|
103
103
|
case /* Equals */ 0:
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* PathwayExecutor entry point - loads plugin registration before re-exporting.
|
|
3
|
-
* Ensures PluginPropertyCondition works (Vitals, BMI, etc.) when using pathway execution.
|
|
4
|
-
*
|
|
5
|
-
* PROOF-OF-CONCEPT: This bundles Vitals + BMI plugins for immediate use.
|
|
6
|
-
* FUTURE: Plugins will be separate npm packages; developers install and register them.
|
|
7
|
-
* See docs/PLUGINS-FUTURE-PROOFING.md for migration path.
|
|
8
3
|
*/
|
|
9
4
|
import "./PluginRegistration.js";
|
|
10
5
|
export * from "./FormSpec.FS/PathwayExecutor.js";
|
|
@@ -3,12 +3,14 @@ import { Form_enhancedVitalsConverter, Form_pluginConfig } from "./plugins/vital
|
|
|
3
3
|
import { Form_enhancedBMIConverter, Form_pluginConfig as Form_pluginConfig_1 } from "./plugins/bmi/src/BMIField.js";
|
|
4
4
|
import { Form_likertConverter, Form_pluginConfig as Form_pluginConfig_2 } from "./plugins/likert/src/LikertField.js";
|
|
5
5
|
import { Form_signatureConverter, Form_pluginConfig as Form_pluginConfig_3 } from "./plugins/signature/src/SignatureField.js";
|
|
6
|
+
import { Form_enhancedDemographicsConverter, Form_pluginConfig as Form_pluginConfig_4 } from "./plugins/demographics/src/DemographicsField.js";
|
|
6
7
|
|
|
7
8
|
function registerAllPlugins(): void {
|
|
8
9
|
PluginValueRegistry_register(Form_pluginConfig.PluginId, Form_enhancedVitalsConverter);
|
|
9
10
|
PluginValueRegistry_register(Form_pluginConfig_1.PluginId, Form_enhancedBMIConverter);
|
|
10
11
|
PluginValueRegistry_register(Form_pluginConfig_2.PluginId, Form_likertConverter);
|
|
11
12
|
PluginValueRegistry_register(Form_pluginConfig_3.PluginId, Form_signatureConverter);
|
|
13
|
+
PluginValueRegistry_register(Form_pluginConfig_4.PluginId, Form_enhancedDemographicsConverter);
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
registerAllPlugins();
|