@f1studio/form-spec 5.0.0-alpha.123 → 5.0.0-alpha.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.d.ts +8 -51
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/CorEMR/TemplateDecodeTypes.d.ts +73 -0
- package/FormSpec.FS/Integrations/CorEMR/TemplateDecodeTypes.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.d.ts +162 -0
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.d.ts.map +1 -0
- package/FormSpec.FS/Interop/FormSpec.Api.Helpers.d.ts +46 -0
- package/FormSpec.FS/Interop/FormSpec.Api.Helpers.d.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/BitmaskHelpers.js +1 -1
- package/FormSpec.TS/FormSpec.FS/BitmaskHelpers.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/BitmaskHelpers.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.js +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.js +16 -220
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateDecodeTypes.js +387 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateDecodeTypes.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateDecodeTypes.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.js +771 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.ts.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.js +151 -0
- 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/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/README.md +7 -7
- package/package.json +1 -1
- package/src/FormSpec.FS/BitmaskHelpers.ts +1 -1
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.ts +2 -2
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.ts +32 -127
- package/src/FormSpec.FS/Integrations/CorEMR/TemplateDecodeTypes.ts +246 -0
- package/src/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.ts +431 -0
- package/src/FormSpec.FS/Interop/FormSpec.Api.Helpers.ts +184 -3
- package/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.d.ts +0 -95
- package/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.d.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.js +0 -258
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.js.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.ts.map +0 -1
- package/src/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.ts +0 -15
|
@@ -4,8 +4,8 @@ import { join, printf, toConsole } from "@fable-org/fable-library-js/String.js";
|
|
|
4
4
|
import { Auto_generateBoxedEncoder_437914C6, toString } from "../../fable_modules/Thoth.Json.10.4.1/Encode.fs.js";
|
|
5
5
|
import { array_type, string_type, union_type, TypeInfo, obj_type } from "@fable-org/fable-library-js/Reflection.js";
|
|
6
6
|
import { Auto_generateBoxedDecoder_Z6670B51, fromString } from "../../fable_modules/Thoth.Json.10.4.1/Decode.fs.js";
|
|
7
|
-
import { equals, createObj, stringHash, compare, IDisposable, disposeSafe, IEnumerator, getEnumerator, IMap, isArrayLike, uncurry2 } from "@fable-org/fable-library-js/Util.js";
|
|
8
|
-
import { ClinicalPathway_StateType_$union, ClinicalPathway_TaskPriority_$union, ClinicalPathway_AlertSeverity_$union, ClinicalPathway_ReferralUrgency_$union, ClinicalPathway_ActionInfo_$union, ClinicalPathway_NavigateToFormAction, ClinicalPathway_ProblemAction, ClinicalPathway_AlertAction, ClinicalPathway_EducationAction, ClinicalPathway_ProcedureAction, ClinicalPathway_TestAction, ClinicalPathway_DocumentationAction, ClinicalPathway_FieldValueSource_$union, ClinicalPathway_SetFieldValueAction, ClinicalPathway_PrescriptionAction, ClinicalPathway_MedicationAction, ClinicalPathway_ReferralAction, Shared_FieldValue, Shared_FieldValue_$union, ClinicalPathway_ClinicalPathwaySpec, ClinicalPathway_PathRequirement, ClinicalPathway_ConstraintDefinition, ClinicalPathway_PathwayExecutionMode_SinglePathway, ClinicalPathway_SinglePathwayConfig, ClinicalPathway_SelectionStrategy_HighestPriority, ClinicalPathway_TransitionDefinition, ClinicalPathway_TransitionCondition_FieldCondition, Shared_ConditionValue_Single, ClinicalPathway_FieldEvaluator_Equals, Shared_TransitionKey, ClinicalPathway_StateType_Terminal, ClinicalPathway_TerminalInfo, ClinicalPathway_StateDefinition, ClinicalPathway_StateType_Action, ClinicalPathway_ActionInfo_Task, ClinicalPathway_TaskAction, ClinicalPathway_DueDate_Today, ClinicalPathway_TaskPriority_Medium, ClinicalPathway_TaskPriority_Low, ClinicalPathway_TaskPriority_High, Shared_StateKey, Spec_FieldType_PluginField, Spec_PluginFieldConfig, Spec_FieldType_Matrix, Spec_MatrixInfo, Spec_FormClassification_General, Spec_FormLifecycle_Blueprint, Spec_FieldType_Text, Spec_TextInfo, Spec_FieldType_CheckboxList, Spec_MultiChoiceInfo, Shared_FieldOptionKey, Spec_FieldType_Checkbox, Spec_BooleanInfo, Shared_FieldKey, Shared_FieldOption, Shared_FieldValue_Single, Shared_FieldValue_PluginData, Shared_PluginDataProperty, Shared_PluginPropertyKey, Shared_FieldValue_Matrix, Shared_MatrixAnswer, Shared_MatrixItemKey, Shared_FieldValue_Multiple, Shared_FieldAnswer, Spec_FormStep$1, Spec_FormField$1, Spec_FieldType_$union, Spec_FormSpec$1, Spec_FormSpec$1_$reflection, Spec_FieldType_$reflection } from "../FormSpec.js";
|
|
7
|
+
import { defaultOf, equals, createObj, stringHash, compare, IDisposable, disposeSafe, IEnumerator, getEnumerator, IMap, isArrayLike, uncurry2 } from "@fable-org/fable-library-js/Util.js";
|
|
8
|
+
import { Spec_ClinicalInstrumentInfo, Spec_FormClassification_$union, ClinicalPathway_StateType_$union, ClinicalPathway_TaskPriority_$union, ClinicalPathway_AlertSeverity_$union, ClinicalPathway_ReferralUrgency_$union, ClinicalPathway_ActionInfo_$union, ClinicalPathway_NavigateToFormAction, ClinicalPathway_ProblemAction, ClinicalPathway_AlertAction, ClinicalPathway_EducationAction, ClinicalPathway_ProcedureAction, ClinicalPathway_TestAction, ClinicalPathway_DocumentationAction, ClinicalPathway_FieldValueSource_$union, ClinicalPathway_SetFieldValueAction, ClinicalPathway_PrescriptionAction, ClinicalPathway_MedicationAction, ClinicalPathway_ReferralAction, Shared_FieldValue, Shared_FieldValue_$union, ClinicalPathway_ClinicalPathwaySpec, ClinicalPathway_PathRequirement, ClinicalPathway_ConstraintDefinition, ClinicalPathway_PathwayExecutionMode_SinglePathway, ClinicalPathway_SinglePathwayConfig, ClinicalPathway_SelectionStrategy_HighestPriority, ClinicalPathway_TransitionDefinition, ClinicalPathway_TransitionCondition_FieldCondition, Shared_ConditionValue_Single, ClinicalPathway_FieldEvaluator_Equals, Shared_TransitionKey, ClinicalPathway_StateType_Terminal, ClinicalPathway_TerminalInfo, ClinicalPathway_StateDefinition, ClinicalPathway_StateType_Action, ClinicalPathway_ActionInfo_Task, ClinicalPathway_TaskAction, ClinicalPathway_DueDate_Today, ClinicalPathway_TaskPriority_Medium, ClinicalPathway_TaskPriority_Low, ClinicalPathway_TaskPriority_High, Shared_StateKey, Spec_FieldType_PluginField, Spec_PluginFieldConfig, Spec_FieldType_Matrix, Spec_MatrixInfo, Spec_FormClassification_General, Spec_FormLifecycle_Blueprint, Spec_FieldType_Text, Spec_TextInfo, Spec_FieldType_CheckboxList, Spec_MultiChoiceInfo, Shared_FieldOptionKey, Spec_FieldType_Checkbox, Spec_BooleanInfo, Shared_FieldKey, Shared_FieldOption, Shared_FieldValue_Single, Shared_FieldValue_PluginData, Shared_PluginDataProperty, Shared_PluginPropertyKey, Shared_FieldValue_Matrix, Shared_MatrixAnswer, Shared_MatrixItemKey, Shared_FieldValue_Multiple, Shared_FieldAnswer, Spec_FormStep$1, Spec_FormField$1, Spec_FieldType_$union, Spec_FormSpec$1, Spec_FormSpec$1_$reflection, Spec_FieldType_$reflection } from "../FormSpec.js";
|
|
9
9
|
import { FSharpResult$2_Ok, FSharpResult$2_Error, FSharpResult$2_$union } from "@fable-org/fable-library-js/Result.js";
|
|
10
10
|
import { newGuid, parse, tryParse } from "@fable-org/fable-library-js/Guid.js";
|
|
11
11
|
import { Union, FSharpRef } from "@fable-org/fable-library-js/Types.js";
|
|
@@ -15,12 +15,14 @@ import { count, ofSeq as ofSeq_1, toList, FSharpMap } from "@fable-org/fable-lib
|
|
|
15
15
|
import { addToDict } from "@fable-org/fable-library-js/MapUtil.js";
|
|
16
16
|
import { int32 } from "@fable-org/fable-library-js/Int32.js";
|
|
17
17
|
import { getFieldDetails as getFieldDetails_1, FieldDetails$1, findStepIndexForField, updateField } from "../FormSpecValues.js";
|
|
18
|
-
import { singleton as singleton_1, empty as empty_1, collect as collect_1, delay, toList as toList_1, mapIndexed, map as map_2, choose } from "@fable-org/fable-library-js/Seq.js";
|
|
18
|
+
import { length, singleton as singleton_1, empty as empty_1, collect as collect_1, delay, toList as toList_1, mapIndexed, map as map_2, choose } from "@fable-org/fable-library-js/Seq.js";
|
|
19
19
|
import { toArray, ofArray } from "@fable-org/fable-library-js/Set.js";
|
|
20
20
|
import { map as map_1 } from "@fable-org/fable-library-js/Array.js";
|
|
21
21
|
import { now } from "@fable-org/fable-library-js/DateOffset.js";
|
|
22
22
|
import { initializeExecution } from "../PathwayExecutor.js";
|
|
23
23
|
import { List_distinct, distinct } from "@fable-org/fable-library-js/Seq2.js";
|
|
24
|
+
import { tryDecodeSourceMap as tryDecodeSourceMap_1 } from "../Integrations/Adapters/CorEMR/CoreMREncoder.js";
|
|
25
|
+
import { CoreMRSourceMap } from "../Integrations/Adapters/CorEMR/CoreMRSourceMap.js";
|
|
24
26
|
|
|
25
27
|
/**
|
|
26
28
|
* Get value from Option or return default (SAFE - recommended)
|
|
@@ -62,6 +64,15 @@ export function listToArray<T>(list: FSharpList<T>): T[] {
|
|
|
62
64
|
return Array.from(list);
|
|
63
65
|
}
|
|
64
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Normalize form values for platform API (f1-api fill_form, etc.).
|
|
69
|
+
* Ensures field keys and value shapes are in the format expected by the API.
|
|
70
|
+
* TypeScript: normalizeFormValuesForPlatformApi(formValues: Record<string, unknown>) => Record<string, unknown>
|
|
71
|
+
*/
|
|
72
|
+
export function normalizeFormValuesForPlatformApi(formValues: any): any {
|
|
73
|
+
return formValues;
|
|
74
|
+
}
|
|
75
|
+
|
|
65
76
|
export function serializeFormSpec(formSpec: any): string {
|
|
66
77
|
toConsole(printf("[API.Helpers] Serializing FormSpec!!"));
|
|
67
78
|
toConsole(`[API.Helpers] FormSpec: ${formSpec}`);
|
|
@@ -1053,4 +1064,174 @@ export function stateKeyForAction(pathway: ClinicalPathway_ClinicalPathwaySpec,
|
|
|
1053
1064
|
}, pathway.States);
|
|
1054
1065
|
}
|
|
1055
1066
|
|
|
1067
|
+
/**
|
|
1068
|
+
* Returns the tag string of a FormSpec's Classification discriminated union.
|
|
1069
|
+
* TypeScript: getFormClassificationTag(spec: FormSpec) => "ClinicalInstrument" | "Intake" | "Screening" | "General"
|
|
1070
|
+
*/
|
|
1071
|
+
export function getFormClassificationTag(spec: Spec_FormSpec$1<Spec_FieldType_$union>): string {
|
|
1072
|
+
const matchValue: Spec_FormClassification_$union = spec.Classification;
|
|
1073
|
+
switch (matchValue.tag) {
|
|
1074
|
+
case /* Intake */ 1:
|
|
1075
|
+
return "Intake";
|
|
1076
|
+
case /* Screening */ 2:
|
|
1077
|
+
return "Screening";
|
|
1078
|
+
case /* General */ 3:
|
|
1079
|
+
return "General";
|
|
1080
|
+
default:
|
|
1081
|
+
return "ClinicalInstrument";
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* Returns true when the FormSpec is classified as a ClinicalInstrument.
|
|
1087
|
+
* TypeScript: isClinicalInstrument(spec: FormSpec) => boolean
|
|
1088
|
+
*/
|
|
1089
|
+
export function isClinicalInstrument(spec: Spec_FormSpec$1<Spec_FieldType_$union>): boolean {
|
|
1090
|
+
if (spec.Classification.tag === /* ClinicalInstrument */ 0) {
|
|
1091
|
+
return true;
|
|
1092
|
+
}
|
|
1093
|
+
else {
|
|
1094
|
+
return false;
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
* Returns the instrument type string when Classification is ClinicalInstrument, None otherwise.
|
|
1100
|
+
* TypeScript: getInstrumentType(spec: FormSpec) => string | null
|
|
1101
|
+
*/
|
|
1102
|
+
export function getInstrumentType(spec: Spec_FormSpec$1<Spec_FieldType_$union>): Option<string> {
|
|
1103
|
+
const matchValue: Spec_FormClassification_$union = spec.Classification;
|
|
1104
|
+
if (matchValue.tag === /* ClinicalInstrument */ 0) {
|
|
1105
|
+
return matchValue.fields[0].InstrumentType;
|
|
1106
|
+
}
|
|
1107
|
+
else {
|
|
1108
|
+
return undefined;
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* Returns the instrument max score when Classification is ClinicalInstrument, None otherwise.
|
|
1114
|
+
* TypeScript: getInstrumentMaxScore(spec: FormSpec) => number | null
|
|
1115
|
+
*/
|
|
1116
|
+
export function getInstrumentMaxScore(spec: Spec_FormSpec$1<Spec_FieldType_$union>): Option<int32> {
|
|
1117
|
+
const matchValue: Spec_FormClassification_$union = spec.Classification;
|
|
1118
|
+
if (matchValue.tag === /* ClinicalInstrument */ 0) {
|
|
1119
|
+
return matchValue.fields[0].MaxScore;
|
|
1120
|
+
}
|
|
1121
|
+
else {
|
|
1122
|
+
return undefined;
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
/**
|
|
1127
|
+
* Returns "Exact" or "Inferred" when Classification is ClinicalInstrument, None otherwise.
|
|
1128
|
+
* TypeScript: getInstrumentConfidence(spec: FormSpec) => "Exact" | "Inferred" | null
|
|
1129
|
+
*/
|
|
1130
|
+
export function getInstrumentConfidence(spec: Spec_FormSpec$1<Spec_FieldType_$union>): Option<string> {
|
|
1131
|
+
const matchValue: Spec_FormClassification_$union = spec.Classification;
|
|
1132
|
+
if (matchValue.tag === /* ClinicalInstrument */ 0) {
|
|
1133
|
+
const info: Spec_ClinicalInstrumentInfo = matchValue.fields[0];
|
|
1134
|
+
if (info.Confidence.tag === /* Inferred */ 1) {
|
|
1135
|
+
return "Inferred";
|
|
1136
|
+
}
|
|
1137
|
+
else {
|
|
1138
|
+
return "Exact";
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
else {
|
|
1142
|
+
return undefined;
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
/**
|
|
1147
|
+
* Decode CoreMR provenance source map from JSON payload.
|
|
1148
|
+
* TypeScript: tryDecodeSourceMap(payloadJson: string) => {success: boolean; sourceMap?: CoreMRSourceMap; error?: string}
|
|
1149
|
+
* NO Result type - returns simple object for compatibility.
|
|
1150
|
+
*/
|
|
1151
|
+
export function tryDecodeSourceMap(payloadJson: string): any {
|
|
1152
|
+
const matchValue: FSharpResult$2_$union<CoreMRSourceMap, string> = tryDecodeSourceMap_1(payloadJson);
|
|
1153
|
+
if (matchValue.tag === /* Error */ 1) {
|
|
1154
|
+
return {
|
|
1155
|
+
error: matchValue.fields[0],
|
|
1156
|
+
sourceMap: defaultOf(),
|
|
1157
|
+
success: false,
|
|
1158
|
+
};
|
|
1159
|
+
}
|
|
1160
|
+
else {
|
|
1161
|
+
const sourceMap: CoreMRSourceMap = matchValue.fields[0];
|
|
1162
|
+
return {
|
|
1163
|
+
error: defaultOf(),
|
|
1164
|
+
sourceMap: sourceMap,
|
|
1165
|
+
success: true,
|
|
1166
|
+
};
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
/**
|
|
1171
|
+
* Validate and build FormSpec with values, collecting ALL validation errors.
|
|
1172
|
+
* TypeScript: validateAndBuildFormSpec(formSpec: FormSpec, fieldData: any[]) => {isValid: boolean; formSpec?: FormSpec; errors: ValidationError[]}
|
|
1173
|
+
* NO Result type - returns detailed telemetry for client-side validation.
|
|
1174
|
+
*/
|
|
1175
|
+
export function validateAndBuildFormSpec(formSpec: Spec_FormSpec$1<Spec_FieldType_$union>, fieldData: { fieldKey: string, objectValue: any }[]): any {
|
|
1176
|
+
let formSpec_1: any, totalFields_1: int32;
|
|
1177
|
+
let errors: any[] = [];
|
|
1178
|
+
let validFieldCount = 0;
|
|
1179
|
+
let enumerator: any = getEnumerator(fieldData);
|
|
1180
|
+
try {
|
|
1181
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1182
|
+
const input: { fieldKey: string, objectValue: any } = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
1183
|
+
const matchValue: Option<Spec_FormField$1<Spec_FieldType_$union>> = findFieldByKey(formSpec, input.fieldKey);
|
|
1184
|
+
if (matchValue == null) {
|
|
1185
|
+
void (errors.push({
|
|
1186
|
+
errorType: "field_not_found",
|
|
1187
|
+
fieldKey: input.fieldKey,
|
|
1188
|
+
layer: "helper",
|
|
1189
|
+
message: `Field ${input.fieldKey} not found in FormSpec`,
|
|
1190
|
+
}));
|
|
1191
|
+
}
|
|
1192
|
+
else {
|
|
1193
|
+
const field: Spec_FormField$1<Spec_FieldType_$union> = value_11(matchValue);
|
|
1194
|
+
try {
|
|
1195
|
+
validFieldCount = ((validFieldCount + 1) | 0);
|
|
1196
|
+
}
|
|
1197
|
+
catch (ex: any) {
|
|
1198
|
+
void (errors.push({
|
|
1199
|
+
errorType: "validation_error",
|
|
1200
|
+
fieldKey: input.fieldKey,
|
|
1201
|
+
layer: "helper",
|
|
1202
|
+
message: ex.message,
|
|
1203
|
+
}));
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
finally {
|
|
1209
|
+
disposeSafe(enumerator);
|
|
1210
|
+
}
|
|
1211
|
+
if (errors.length === 0) {
|
|
1212
|
+
return {
|
|
1213
|
+
errors: [],
|
|
1214
|
+
formSpec: buildFormSpecWithValues(formSpec, fieldData),
|
|
1215
|
+
isValid: true,
|
|
1216
|
+
stats: {
|
|
1217
|
+
errorFields: 0,
|
|
1218
|
+
totalFields: length<{ fieldKey: string, objectValue: any }>(fieldData),
|
|
1219
|
+
validFields: validFieldCount,
|
|
1220
|
+
},
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
else {
|
|
1224
|
+
return (formSpec_1 = defaultOf(), {
|
|
1225
|
+
errors: errors,
|
|
1226
|
+
formSpec: formSpec_1,
|
|
1227
|
+
isValid: false,
|
|
1228
|
+
stats: (totalFields_1 = (length<{ fieldKey: string, objectValue: any }>(fieldData) | 0), {
|
|
1229
|
+
errorFields: errors.length,
|
|
1230
|
+
totalFields: totalFields_1,
|
|
1231
|
+
validFields: validFieldCount,
|
|
1232
|
+
}),
|
|
1233
|
+
});
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1056
1237
|
//# sourceMappingURL=FormSpec.Api.Helpers.ts.map
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { FSharpMap } from "@fable-org/fable-library-js/Map.js";
|
|
2
|
-
import { int32 } from "@fable-org/fable-library-js/Int32.js";
|
|
3
|
-
import { FSharpResult$2_$union } from "@fable-org/fable-library-js/Result.js";
|
|
4
|
-
/**
|
|
5
|
-
* Load and decode templates.json. Path is relative to FormSpec.FS output (Interop/templates.json).
|
|
6
|
-
*/
|
|
7
|
-
export declare function decodeTemplates(json: string): FSharpResult$2_$union<{
|
|
8
|
-
$schema: string;
|
|
9
|
-
coreEmr?: {
|
|
10
|
-
appVersion: string;
|
|
11
|
-
schemaRevision: string;
|
|
12
|
-
schemaVersion: string;
|
|
13
|
-
};
|
|
14
|
-
elementTypes: FSharpMap<string, {
|
|
15
|
-
code: string;
|
|
16
|
-
textField: string;
|
|
17
|
-
valueEncoding: string;
|
|
18
|
-
}>;
|
|
19
|
-
forms: FSharpMap<string, {
|
|
20
|
-
clinicalHash?: string;
|
|
21
|
-
cosmeticHash?: string;
|
|
22
|
-
currentVersionId?: int32;
|
|
23
|
-
description?: string;
|
|
24
|
-
encounterTypes?: {
|
|
25
|
-
dental: boolean;
|
|
26
|
-
medical: boolean;
|
|
27
|
-
mental: boolean;
|
|
28
|
-
other: boolean;
|
|
29
|
-
};
|
|
30
|
-
formCode?: string;
|
|
31
|
-
formCodeSource?: string;
|
|
32
|
-
formId: int32;
|
|
33
|
-
hash?: string;
|
|
34
|
-
isIntake?: boolean;
|
|
35
|
-
items: {
|
|
36
|
-
choices: {
|
|
37
|
-
bitPosition?: int32;
|
|
38
|
-
choiceId: int32;
|
|
39
|
-
code?: string;
|
|
40
|
-
highlight?: int32;
|
|
41
|
-
score: int32;
|
|
42
|
-
sequence: int32;
|
|
43
|
-
text: string;
|
|
44
|
-
}[];
|
|
45
|
-
code?: string;
|
|
46
|
-
genderRequired?: string;
|
|
47
|
-
highlight?: int32;
|
|
48
|
-
isRequired: boolean;
|
|
49
|
-
itemId: int32;
|
|
50
|
-
nestingLevel: int32;
|
|
51
|
-
sequence: int32;
|
|
52
|
-
sequenceText?: string;
|
|
53
|
-
text: string;
|
|
54
|
-
type: int32;
|
|
55
|
-
uuid?: string;
|
|
56
|
-
}[];
|
|
57
|
-
name: string;
|
|
58
|
-
onceAYear?: boolean;
|
|
59
|
-
requiresSignature?: boolean;
|
|
60
|
-
scoring?: {
|
|
61
|
-
choiceScores: FSharpMap<string, int32>;
|
|
62
|
-
labels: {
|
|
63
|
-
min: int32;
|
|
64
|
-
name: string;
|
|
65
|
-
}[];
|
|
66
|
-
scoreId: int32;
|
|
67
|
-
scoreName: string;
|
|
68
|
-
};
|
|
69
|
-
structureHash?: string;
|
|
70
|
-
usage?: string;
|
|
71
|
-
}>;
|
|
72
|
-
generatedAt?: string;
|
|
73
|
-
generatedFrom?: string;
|
|
74
|
-
stats?: {
|
|
75
|
-
byElementType: FSharpMap<string, int32>;
|
|
76
|
-
byUsage: FSharpMap<string, int32>;
|
|
77
|
-
codeExtraction: {
|
|
78
|
-
bySource: {
|
|
79
|
-
description: int32;
|
|
80
|
-
generated: int32;
|
|
81
|
-
name: int32;
|
|
82
|
-
};
|
|
83
|
-
extracted: int32;
|
|
84
|
-
generated: int32;
|
|
85
|
-
regex: string;
|
|
86
|
-
};
|
|
87
|
-
totalForms: int32;
|
|
88
|
-
withCodes: int32;
|
|
89
|
-
withScoring: int32;
|
|
90
|
-
withSignature: int32;
|
|
91
|
-
withSyntheticCodes: int32;
|
|
92
|
-
};
|
|
93
|
-
version: int32;
|
|
94
|
-
}, string>;
|
|
95
|
-
//# sourceMappingURL=CorEmrTemplates.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CorEmrTemplates.d.ts","sourceRoot":"","sources":["../../../../FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAE9E;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,YAAY,EAAE,SAAS,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,cAAc,C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gBAAC,IAAI,EAAE,MAAM,CAAA;aAAE,EAAE,CAAC;YAAC,OAAO,EAAE,KAAK,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE;QAAE,aAAa,EAAE,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAAC,OAAO,EAAE,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAAC,cAAc,EAAE;YAAE,QAAQ,EAAE;gBAAE,WAAW,EAAE,KAAK,CAAC;gBAAC,SAAS,EAAE,KAAK,CAAC;gBAAC,IAAI,EAAE,KAAK,CAAA;aAAE,CAAC;YAAC,SAAS,EAAE,KAAK,CAAC;YAAC,SAAS,EAAE,KAAK,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,UAAU,EAAE,KAAK,CAAC;QAAC,SAAS,EAAE,KAAK,CAAC;QAAC,WAAW,EAAE,KAAK,CAAC;QAAC,aAAa,EAAE,KAAK,CAAC;QAAC,kBAAkB,EAAE,KAAK,CAAA;KAAE,CAAC;IAAC,OAAO,EAAE,KAAK,CAAA;CAAE,EAAE,MAAM,CAAC,CAEzgD"}
|
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "decodeTemplates", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return decodeTemplates;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _Decodefs = require("../../../fable_modules/Thoth.Json.10.4.1/Decode.fs.js");
|
|
12
|
-
const _Util = require("@fable-org/fable-library-js/Util.js");
|
|
13
|
-
const _Reflection = require("@fable-org/fable-library-js/Reflection.js");
|
|
14
|
-
function decodeTemplates(json) {
|
|
15
|
-
return (0, _Decodefs.fromString)((0, _Util.uncurry2)((0, _Decodefs.Auto_generateBoxedDecoder_Z6670B51)((0, _Reflection.anonRecord_type)([
|
|
16
|
-
"$schema",
|
|
17
|
-
_Reflection.string_type
|
|
18
|
-
], [
|
|
19
|
-
"coreEmr",
|
|
20
|
-
(0, _Reflection.option_type)((0, _Reflection.anonRecord_type)([
|
|
21
|
-
"appVersion",
|
|
22
|
-
_Reflection.string_type
|
|
23
|
-
], [
|
|
24
|
-
"schemaRevision",
|
|
25
|
-
_Reflection.string_type
|
|
26
|
-
], [
|
|
27
|
-
"schemaVersion",
|
|
28
|
-
_Reflection.string_type
|
|
29
|
-
]))
|
|
30
|
-
], [
|
|
31
|
-
"elementTypes",
|
|
32
|
-
(0, _Reflection.class_type)("Microsoft.FSharp.Collections.FSharpMap`2", [
|
|
33
|
-
_Reflection.string_type,
|
|
34
|
-
(0, _Reflection.anonRecord_type)([
|
|
35
|
-
"code",
|
|
36
|
-
_Reflection.string_type
|
|
37
|
-
], [
|
|
38
|
-
"textField",
|
|
39
|
-
_Reflection.string_type
|
|
40
|
-
], [
|
|
41
|
-
"valueEncoding",
|
|
42
|
-
_Reflection.string_type
|
|
43
|
-
])
|
|
44
|
-
])
|
|
45
|
-
], [
|
|
46
|
-
"forms",
|
|
47
|
-
(0, _Reflection.class_type)("Microsoft.FSharp.Collections.FSharpMap`2", [
|
|
48
|
-
_Reflection.string_type,
|
|
49
|
-
(0, _Reflection.anonRecord_type)([
|
|
50
|
-
"clinicalHash",
|
|
51
|
-
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
52
|
-
], [
|
|
53
|
-
"cosmeticHash",
|
|
54
|
-
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
55
|
-
], [
|
|
56
|
-
"currentVersionId",
|
|
57
|
-
(0, _Reflection.option_type)(_Reflection.int32_type)
|
|
58
|
-
], [
|
|
59
|
-
"description",
|
|
60
|
-
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
61
|
-
], [
|
|
62
|
-
"encounterTypes",
|
|
63
|
-
(0, _Reflection.option_type)((0, _Reflection.anonRecord_type)([
|
|
64
|
-
"dental",
|
|
65
|
-
_Reflection.bool_type
|
|
66
|
-
], [
|
|
67
|
-
"medical",
|
|
68
|
-
_Reflection.bool_type
|
|
69
|
-
], [
|
|
70
|
-
"mental",
|
|
71
|
-
_Reflection.bool_type
|
|
72
|
-
], [
|
|
73
|
-
"other",
|
|
74
|
-
_Reflection.bool_type
|
|
75
|
-
]))
|
|
76
|
-
], [
|
|
77
|
-
"formCode",
|
|
78
|
-
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
79
|
-
], [
|
|
80
|
-
"formCodeSource",
|
|
81
|
-
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
82
|
-
], [
|
|
83
|
-
"formId",
|
|
84
|
-
_Reflection.int32_type
|
|
85
|
-
], [
|
|
86
|
-
"hash",
|
|
87
|
-
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
88
|
-
], [
|
|
89
|
-
"isIntake",
|
|
90
|
-
(0, _Reflection.option_type)(_Reflection.bool_type)
|
|
91
|
-
], [
|
|
92
|
-
"items",
|
|
93
|
-
(0, _Reflection.array_type)((0, _Reflection.anonRecord_type)([
|
|
94
|
-
"choices",
|
|
95
|
-
(0, _Reflection.array_type)((0, _Reflection.anonRecord_type)([
|
|
96
|
-
"bitPosition",
|
|
97
|
-
(0, _Reflection.option_type)(_Reflection.int32_type)
|
|
98
|
-
], [
|
|
99
|
-
"choiceId",
|
|
100
|
-
_Reflection.int32_type
|
|
101
|
-
], [
|
|
102
|
-
"code",
|
|
103
|
-
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
104
|
-
], [
|
|
105
|
-
"highlight",
|
|
106
|
-
(0, _Reflection.option_type)(_Reflection.int32_type)
|
|
107
|
-
], [
|
|
108
|
-
"score",
|
|
109
|
-
_Reflection.int32_type
|
|
110
|
-
], [
|
|
111
|
-
"sequence",
|
|
112
|
-
_Reflection.int32_type
|
|
113
|
-
], [
|
|
114
|
-
"text",
|
|
115
|
-
_Reflection.string_type
|
|
116
|
-
]))
|
|
117
|
-
], [
|
|
118
|
-
"code",
|
|
119
|
-
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
120
|
-
], [
|
|
121
|
-
"genderRequired",
|
|
122
|
-
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
123
|
-
], [
|
|
124
|
-
"highlight",
|
|
125
|
-
(0, _Reflection.option_type)(_Reflection.int32_type)
|
|
126
|
-
], [
|
|
127
|
-
"isRequired",
|
|
128
|
-
_Reflection.bool_type
|
|
129
|
-
], [
|
|
130
|
-
"itemId",
|
|
131
|
-
_Reflection.int32_type
|
|
132
|
-
], [
|
|
133
|
-
"nestingLevel",
|
|
134
|
-
_Reflection.int32_type
|
|
135
|
-
], [
|
|
136
|
-
"sequence",
|
|
137
|
-
_Reflection.int32_type
|
|
138
|
-
], [
|
|
139
|
-
"sequenceText",
|
|
140
|
-
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
141
|
-
], [
|
|
142
|
-
"text",
|
|
143
|
-
_Reflection.string_type
|
|
144
|
-
], [
|
|
145
|
-
"type",
|
|
146
|
-
_Reflection.int32_type
|
|
147
|
-
], [
|
|
148
|
-
"uuid",
|
|
149
|
-
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
150
|
-
]))
|
|
151
|
-
], [
|
|
152
|
-
"name",
|
|
153
|
-
_Reflection.string_type
|
|
154
|
-
], [
|
|
155
|
-
"onceAYear",
|
|
156
|
-
(0, _Reflection.option_type)(_Reflection.bool_type)
|
|
157
|
-
], [
|
|
158
|
-
"requiresSignature",
|
|
159
|
-
(0, _Reflection.option_type)(_Reflection.bool_type)
|
|
160
|
-
], [
|
|
161
|
-
"scoring",
|
|
162
|
-
(0, _Reflection.option_type)((0, _Reflection.anonRecord_type)([
|
|
163
|
-
"choiceScores",
|
|
164
|
-
(0, _Reflection.class_type)("Microsoft.FSharp.Collections.FSharpMap`2", [
|
|
165
|
-
_Reflection.string_type,
|
|
166
|
-
_Reflection.int32_type
|
|
167
|
-
])
|
|
168
|
-
], [
|
|
169
|
-
"labels",
|
|
170
|
-
(0, _Reflection.array_type)((0, _Reflection.anonRecord_type)([
|
|
171
|
-
"min",
|
|
172
|
-
_Reflection.int32_type
|
|
173
|
-
], [
|
|
174
|
-
"name",
|
|
175
|
-
_Reflection.string_type
|
|
176
|
-
]))
|
|
177
|
-
], [
|
|
178
|
-
"scoreId",
|
|
179
|
-
_Reflection.int32_type
|
|
180
|
-
], [
|
|
181
|
-
"scoreName",
|
|
182
|
-
_Reflection.string_type
|
|
183
|
-
]))
|
|
184
|
-
], [
|
|
185
|
-
"structureHash",
|
|
186
|
-
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
187
|
-
], [
|
|
188
|
-
"usage",
|
|
189
|
-
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
190
|
-
])
|
|
191
|
-
])
|
|
192
|
-
], [
|
|
193
|
-
"generatedAt",
|
|
194
|
-
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
195
|
-
], [
|
|
196
|
-
"generatedFrom",
|
|
197
|
-
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
198
|
-
], [
|
|
199
|
-
"stats",
|
|
200
|
-
(0, _Reflection.option_type)((0, _Reflection.anonRecord_type)([
|
|
201
|
-
"byElementType",
|
|
202
|
-
(0, _Reflection.class_type)("Microsoft.FSharp.Collections.FSharpMap`2", [
|
|
203
|
-
_Reflection.string_type,
|
|
204
|
-
_Reflection.int32_type
|
|
205
|
-
])
|
|
206
|
-
], [
|
|
207
|
-
"byUsage",
|
|
208
|
-
(0, _Reflection.class_type)("Microsoft.FSharp.Collections.FSharpMap`2", [
|
|
209
|
-
_Reflection.string_type,
|
|
210
|
-
_Reflection.int32_type
|
|
211
|
-
])
|
|
212
|
-
], [
|
|
213
|
-
"codeExtraction",
|
|
214
|
-
(0, _Reflection.anonRecord_type)([
|
|
215
|
-
"bySource",
|
|
216
|
-
(0, _Reflection.anonRecord_type)([
|
|
217
|
-
"description",
|
|
218
|
-
_Reflection.int32_type
|
|
219
|
-
], [
|
|
220
|
-
"generated",
|
|
221
|
-
_Reflection.int32_type
|
|
222
|
-
], [
|
|
223
|
-
"name",
|
|
224
|
-
_Reflection.int32_type
|
|
225
|
-
])
|
|
226
|
-
], [
|
|
227
|
-
"extracted",
|
|
228
|
-
_Reflection.int32_type
|
|
229
|
-
], [
|
|
230
|
-
"generated",
|
|
231
|
-
_Reflection.int32_type
|
|
232
|
-
], [
|
|
233
|
-
"regex",
|
|
234
|
-
_Reflection.string_type
|
|
235
|
-
])
|
|
236
|
-
], [
|
|
237
|
-
"totalForms",
|
|
238
|
-
_Reflection.int32_type
|
|
239
|
-
], [
|
|
240
|
-
"withCodes",
|
|
241
|
-
_Reflection.int32_type
|
|
242
|
-
], [
|
|
243
|
-
"withScoring",
|
|
244
|
-
_Reflection.int32_type
|
|
245
|
-
], [
|
|
246
|
-
"withSignature",
|
|
247
|
-
_Reflection.int32_type
|
|
248
|
-
], [
|
|
249
|
-
"withSyntheticCodes",
|
|
250
|
-
_Reflection.int32_type
|
|
251
|
-
]))
|
|
252
|
-
], [
|
|
253
|
-
"version",
|
|
254
|
-
_Reflection.int32_type
|
|
255
|
-
]), undefined, undefined)), json);
|
|
256
|
-
} //# sourceMappingURL=CorEmrTemplates.ts.map
|
|
257
|
-
|
|
258
|
-
//# sourceMappingURL=CorEmrTemplates.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.ts","../../../../FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.fs"],"names":["json"],"mappings":";;;;;;;;;;;;;;eAqtDY,oBAAA,EAAA,IAAA,cAAA,MArBA,4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sBAAA;iBAAA,EAAA;oBAAA;oBAAA,uBAAA;iBAAA;aAAA,EAAA;gBAAA;gBAAA,IAAA,uBAAA,EAAA,uBAAA;aAAA,EAAA;gBAAA;gBAAA,IAAA,uBAAA,EAAA,uBAAA;aAAA;SAAA;KAAA,EAAA;QAAA;QAAA,IAAA,uBAAA,EAAA,uBAAA;KAAA,EAAA;QAAA;QAAA,IAAA,uBAAA,EAAA,uBAAA;KAAA,EAAA;QAAA;QAAA,IAAA,uBAAA,EAAA,IAAA,2BAAA,EAAA;YAAA;YAAA,IAAA,sBAAA,EAAA,4CAAA;gBAAA,uBAAA;gBAAA,sBAAA;aAAA;SAAA,EAAA;YAAA;YAAA,IAAA,sBAAA,EAAA,4CAAA;gBAAA,uBAAA;gBAAA,sBAAA;aAAA;SAAA,EAAA;YAAA;YAAA,IAAA,2BAAA,EAAA;gBAAA;gBAAA,IAAA,2BAAA,EAAA;oBAAA;oBAAA,sBAAA;iBAAA,EAAA;oBAAA;oBAAA,sBAAA;iBAAA,EAAA;oBAAA;oBAAA,sBAAA;iBAAA;aAAA,EAAA;gBAAA;gBAAA,sBAAA;aAAA,EAAA;gBAAA;gBAAA,sBAAA;aAAA,EAAA;gBAAA;gBAAA,uBAAA;aAAA;SAAA,EAAA;YAAA;YAAA,sBAAA;SAAA,EAAA;YAAA;YAAA,sBAAA;SAAA,EAAA;YAAA;YAAA,sBAAA;SAAA,EAAA;YAAA;YAAA,sBAAA;SAAA,EAAA;YAAA;YAAA,sBAAA;SAAA;KAAA,EAAA;QAAA;QAAA,sBAAA;KAAA,GAAA,WAAA,aCzkD0BA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../fable_modules/Thoth.Json.10.4.1/Decode.fs","../../../../FormSpec.FS/Integrations/CorEMR/CorEmrTemplates.fs"],"names":["json"],"mappings":";;;;;;;;;;;WAqtDY,k9CArBA,m0FCzkD0BA","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Auto_generateBoxedDecoder_Z6670B51, fromString } from "../../../fable_modules/Thoth.Json.10.4.1/Decode.fs.js";
|
|
2
|
-
import { uncurry2 } from "@fable-org/fable-library-js/Util.js";
|
|
3
|
-
import { array_type, bool_type, int32_type, class_type, option_type, anonRecord_type, string_type } from "@fable-org/fable-library-js/Reflection.js";
|
|
4
|
-
import { FSharpMap } from "@fable-org/fable-library-js/Map.js";
|
|
5
|
-
import { int32 } from "@fable-org/fable-library-js/Int32.js";
|
|
6
|
-
import { FSharpResult$2_$union } from "@fable-org/fable-library-js/Result.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Load and decode templates.json. Path is relative to FormSpec.FS output (Interop/templates.json).
|
|
10
|
-
*/
|
|
11
|
-
export function decodeTemplates(json: string): FSharpResult$2_$union<{ $schema: string, coreEmr?: { appVersion: string, schemaRevision: string, schemaVersion: string }, elementTypes: FSharpMap<string, { code: string, textField: string, valueEncoding: string }>, forms: FSharpMap<string, { clinicalHash?: string, cosmeticHash?: string, currentVersionId?: int32, description?: string, encounterTypes?: { dental: boolean, medical: boolean, mental: boolean, other: boolean }, formCode?: string, formCodeSource?: string, formId: int32, hash?: string, isIntake?: boolean, items: { choices: { bitPosition?: int32, choiceId: int32, code?: string, highlight?: int32, score: int32, sequence: int32, text: string }[], code?: string, genderRequired?: string, highlight?: int32, isRequired: boolean, itemId: int32, nestingLevel: int32, sequence: int32, sequenceText?: string, text: string, type: int32, uuid?: string }[], name: string, onceAYear?: boolean, requiresSignature?: boolean, scoring?: { choiceScores: FSharpMap<string, int32>, labels: { min: int32, name: string }[], scoreId: int32, scoreName: string }, structureHash?: string, usage?: string }>, generatedAt?: string, generatedFrom?: string, stats?: { byElementType: FSharpMap<string, int32>, byUsage: FSharpMap<string, int32>, codeExtraction: { bySource: { description: int32, generated: int32, name: int32 }, extracted: int32, generated: int32, regex: string }, totalForms: int32, withCodes: int32, withScoring: int32, withSignature: int32, withSyntheticCodes: int32 }, version: int32 }, string> {
|
|
12
|
-
return fromString<{ $schema: string, coreEmr?: { appVersion: string, schemaRevision: string, schemaVersion: string }, elementTypes: FSharpMap<string, { code: string, textField: string, valueEncoding: string }>, forms: FSharpMap<string, { clinicalHash?: string, cosmeticHash?: string, currentVersionId?: int32, description?: string, encounterTypes?: { dental: boolean, medical: boolean, mental: boolean, other: boolean }, formCode?: string, formCodeSource?: string, formId: int32, hash?: string, isIntake?: boolean, items: { choices: { bitPosition?: int32, choiceId: int32, code?: string, highlight?: int32, score: int32, sequence: int32, text: string }[], code?: string, genderRequired?: string, highlight?: int32, isRequired: boolean, itemId: int32, nestingLevel: int32, sequence: int32, sequenceText?: string, text: string, type: int32, uuid?: string }[], name: string, onceAYear?: boolean, requiresSignature?: boolean, scoring?: { choiceScores: FSharpMap<string, int32>, labels: { min: int32, name: string }[], scoreId: int32, scoreName: string }, structureHash?: string, usage?: string }>, generatedAt?: string, generatedFrom?: string, stats?: { byElementType: FSharpMap<string, int32>, byUsage: FSharpMap<string, int32>, codeExtraction: { bySource: { description: int32, generated: int32, name: int32 }, extracted: int32, generated: int32, regex: string }, totalForms: int32, withCodes: int32, withScoring: int32, withSignature: int32, withSyntheticCodes: int32 }, version: int32 }>(uncurry2(Auto_generateBoxedDecoder_Z6670B51(anonRecord_type(["$schema", string_type], ["coreEmr", option_type(anonRecord_type(["appVersion", string_type], ["schemaRevision", string_type], ["schemaVersion", string_type]))], ["elementTypes", class_type("Microsoft.FSharp.Collections.FSharpMap`2", [string_type, anonRecord_type(["code", string_type], ["textField", string_type], ["valueEncoding", string_type])])], ["forms", class_type("Microsoft.FSharp.Collections.FSharpMap`2", [string_type, anonRecord_type(["clinicalHash", option_type(string_type)], ["cosmeticHash", option_type(string_type)], ["currentVersionId", option_type(int32_type)], ["description", option_type(string_type)], ["encounterTypes", option_type(anonRecord_type(["dental", bool_type], ["medical", bool_type], ["mental", bool_type], ["other", bool_type]))], ["formCode", option_type(string_type)], ["formCodeSource", option_type(string_type)], ["formId", int32_type], ["hash", option_type(string_type)], ["isIntake", option_type(bool_type)], ["items", array_type(anonRecord_type(["choices", array_type(anonRecord_type(["bitPosition", option_type(int32_type)], ["choiceId", int32_type], ["code", option_type(string_type)], ["highlight", option_type(int32_type)], ["score", int32_type], ["sequence", int32_type], ["text", string_type]))], ["code", option_type(string_type)], ["genderRequired", option_type(string_type)], ["highlight", option_type(int32_type)], ["isRequired", bool_type], ["itemId", int32_type], ["nestingLevel", int32_type], ["sequence", int32_type], ["sequenceText", option_type(string_type)], ["text", string_type], ["type", int32_type], ["uuid", option_type(string_type)]))], ["name", string_type], ["onceAYear", option_type(bool_type)], ["requiresSignature", option_type(bool_type)], ["scoring", option_type(anonRecord_type(["choiceScores", class_type("Microsoft.FSharp.Collections.FSharpMap`2", [string_type, int32_type])], ["labels", array_type(anonRecord_type(["min", int32_type], ["name", string_type]))], ["scoreId", int32_type], ["scoreName", string_type]))], ["structureHash", option_type(string_type)], ["usage", option_type(string_type)])])], ["generatedAt", option_type(string_type)], ["generatedFrom", option_type(string_type)], ["stats", option_type(anonRecord_type(["byElementType", class_type("Microsoft.FSharp.Collections.FSharpMap`2", [string_type, int32_type])], ["byUsage", class_type("Microsoft.FSharp.Collections.FSharpMap`2", [string_type, int32_type])], ["codeExtraction", anonRecord_type(["bySource", anonRecord_type(["description", int32_type], ["generated", int32_type], ["name", int32_type])], ["extracted", int32_type], ["generated", int32_type], ["regex", string_type])], ["totalForms", int32_type], ["withCodes", int32_type], ["withScoring", int32_type], ["withSignature", int32_type], ["withSyntheticCodes", int32_type]))], ["version", int32_type]), undefined, undefined)), json);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=CorEmrTemplates.ts.map
|