@f1studio/form-spec 5.0.0-alpha.164 → 5.0.0-alpha.166
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.js +1 -1
- package/FormSpec.FS/BlueprintValidation.js.map +1 -1
- package/FormSpec.FS/Designer.js +1 -1
- package/FormSpec.FS/Designer.js.map +1 -1
- package/FormSpec.FS/FormSpec.d.ts +14 -1
- package/FormSpec.FS/FormSpec.d.ts.map +1 -1
- package/FormSpec.FS/FormSpec.js +56 -1
- package/FormSpec.FS/FormSpec.js.map +1 -1
- package/FormSpec.FS/FormSpecHelpers.js +1 -1
- package/FormSpec.FS/FormSpecHelpers.js.map +1 -1
- package/FormSpec.FS/FormSpecValues.js +1 -1
- package/FormSpec.FS/FormSpecValues.js.map +1 -1
- package/FormSpec.FS/Helpers.js +11 -11
- package/FormSpec.FS/Helpers.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.d.ts +13 -3
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.js +19 -13
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.d.ts +20 -0
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.js +20 -40
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.d.ts +21 -9
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.js +46 -25
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.d.ts +13 -14
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.js +18 -61
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.d.ts +33 -8
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js +25 -29
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts +4 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js +4 -4
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRTriggerEnrichment.js +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRTriggerEnrichment.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.js +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.js.map +1 -1
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.d.ts +34 -10
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.js +191 -30
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.js.map +1 -1
- package/FormSpec.FS/Interop/Facade/FormItemLookup.d.ts +95 -0
- package/FormSpec.FS/Interop/Facade/FormItemLookup.d.ts.map +1 -0
- package/FormSpec.FS/Interop/Facade/FormItemLookup.js +155 -0
- package/FormSpec.FS/Interop/Facade/FormItemLookup.js.map +1 -0
- package/FormSpec.FS/Interop/FormSpec.Api.Helpers.js +4 -4
- package/FormSpec.FS/Interop/FormSpec.Api.Helpers.js.map +1 -1
- package/FormSpec.FS/Interop/FormSpec.Api.Option.d.ts +26 -2
- package/FormSpec.FS/Interop/FormSpec.Api.Option.d.ts.map +1 -1
- package/FormSpec.FS/Interop/FormSpec.Api.Option.js +77 -3
- package/FormSpec.FS/Interop/FormSpec.Api.Option.js.map +1 -1
- package/FormSpec.FS/Provenance.d.ts +20 -2
- package/FormSpec.FS/Provenance.d.ts.map +1 -1
- package/FormSpec.FS/Provenance.js +66 -3
- package/FormSpec.FS/Provenance.js.map +1 -1
- package/README.md +7 -7
- package/Thoth.Json/packages/Thoth.Json/Encode.js.map +1 -1
- package/package.json +5 -1
- package/src/FormSpec.FS/BlueprintValidation.ts +1 -1
- package/src/FormSpec.FS/Designer.ts +1 -1
- package/src/FormSpec.FS/FormSpec.ts +32 -2
- package/src/FormSpec.FS/FormSpecHelpers.ts +1 -1
- package/src/FormSpec.FS/FormSpecValues.ts +1 -1
- package/src/FormSpec.FS/Helpers.ts +11 -11
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.ts +25 -12
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.ts +41 -41
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.ts +62 -30
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.ts +28 -46
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts +52 -27
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts +7 -5
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRTriggerEnrichment.ts +1 -1
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.ts +1 -1
- package/src/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.ts +154 -42
- package/src/FormSpec.FS/Interop/Facade/FormItemLookup.ts +179 -0
- package/src/FormSpec.FS/Interop/FormSpec.Api.Helpers.ts +4 -4
- package/src/FormSpec.FS/Interop/FormSpec.Api.Option.ts +63 -8
- package/src/FormSpec.FS/Provenance.ts +50 -4
|
@@ -9,6 +9,18 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
+
get ImportOrigin () {
|
|
13
|
+
return ImportOrigin;
|
|
14
|
+
},
|
|
15
|
+
get ImportOriginModule_create () {
|
|
16
|
+
return ImportOriginModule_create;
|
|
17
|
+
},
|
|
18
|
+
get ImportOriginModule_provenance () {
|
|
19
|
+
return ImportOriginModule_provenance;
|
|
20
|
+
},
|
|
21
|
+
get ImportOrigin_$reflection () {
|
|
22
|
+
return ImportOrigin_$reflection;
|
|
23
|
+
},
|
|
12
24
|
get IntegrationProvenance () {
|
|
13
25
|
return IntegrationProvenance;
|
|
14
26
|
},
|
|
@@ -18,17 +30,28 @@ _export(exports, {
|
|
|
18
30
|
});
|
|
19
31
|
const _Types = require("@fable-org/fable-library-js/Types.js");
|
|
20
32
|
const _Reflection = require("@fable-org/fable-library-js/Reflection.js");
|
|
33
|
+
const _String = require("@fable-org/fable-library-js/String.js");
|
|
21
34
|
class IntegrationProvenance extends _Types.Record {
|
|
22
|
-
constructor(
|
|
35
|
+
constructor(Vendor, TenantId, SiteId, Payload){
|
|
23
36
|
super();
|
|
24
|
-
this.
|
|
37
|
+
this.Vendor = Vendor;
|
|
38
|
+
this.TenantId = TenantId;
|
|
39
|
+
this.SiteId = SiteId;
|
|
25
40
|
this.Payload = Payload;
|
|
26
41
|
}
|
|
27
42
|
}
|
|
28
43
|
function IntegrationProvenance_$reflection() {
|
|
29
44
|
return (0, _Reflection.record_type)("F1.Studio.Provenance.IntegrationProvenance", [], IntegrationProvenance, ()=>[
|
|
30
45
|
[
|
|
31
|
-
"
|
|
46
|
+
"Vendor",
|
|
47
|
+
_Reflection.string_type
|
|
48
|
+
],
|
|
49
|
+
[
|
|
50
|
+
"TenantId",
|
|
51
|
+
_Reflection.string_type
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
"SiteId",
|
|
32
55
|
_Reflection.string_type
|
|
33
56
|
],
|
|
34
57
|
[
|
|
@@ -36,6 +59,46 @@ function IntegrationProvenance_$reflection() {
|
|
|
36
59
|
_Reflection.string_type
|
|
37
60
|
]
|
|
38
61
|
]);
|
|
62
|
+
}
|
|
63
|
+
class ImportOrigin extends _Types.Record {
|
|
64
|
+
constructor(Vendor, TenantId, SiteId){
|
|
65
|
+
super();
|
|
66
|
+
this.Vendor = Vendor;
|
|
67
|
+
this.TenantId = TenantId;
|
|
68
|
+
this.SiteId = SiteId;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function ImportOrigin_$reflection() {
|
|
72
|
+
return (0, _Reflection.record_type)("F1.Studio.Provenance.ImportOrigin", [], ImportOrigin, ()=>[
|
|
73
|
+
[
|
|
74
|
+
"Vendor",
|
|
75
|
+
_Reflection.string_type
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
"TenantId",
|
|
79
|
+
_Reflection.string_type
|
|
80
|
+
],
|
|
81
|
+
[
|
|
82
|
+
"SiteId",
|
|
83
|
+
_Reflection.string_type
|
|
84
|
+
]
|
|
85
|
+
]);
|
|
86
|
+
}
|
|
87
|
+
function ImportOriginModule_create(vendor, tenantId, siteId) {
|
|
88
|
+
const blank = _String.isNullOrWhiteSpace;
|
|
89
|
+
if (blank(vendor)) {
|
|
90
|
+
throw new Error("ImportOrigin: vendor is required (e.g. \"coremr\").");
|
|
91
|
+
}
|
|
92
|
+
if (blank(tenantId)) {
|
|
93
|
+
throw new Error("ImportOrigin: tenantId is required — a blueprint belongs to an organisation.");
|
|
94
|
+
}
|
|
95
|
+
if (blank(siteId)) {
|
|
96
|
+
throw new Error("ImportOrigin: siteId is required — every formId/itemId/choiceId in the payload is scoped to ONE CoreMR database, and without it the provenance cannot be resolved back.");
|
|
97
|
+
}
|
|
98
|
+
return new ImportOrigin(vendor.trim(), tenantId.trim(), siteId.trim());
|
|
99
|
+
}
|
|
100
|
+
function ImportOriginModule_provenance(o, payload) {
|
|
101
|
+
return new IntegrationProvenance(o.Vendor, o.TenantId, o.SiteId, payload);
|
|
39
102
|
} //# sourceMappingURL=Provenance.ts.map
|
|
40
103
|
|
|
41
104
|
//# sourceMappingURL=Provenance.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../FormSpec.TS/FormSpec.FS/Provenance.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"sources":["../../FormSpec.TS/FormSpec.FS/Provenance.ts"],"names":["blank","vendor","tenantId","siteId","o","payload"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6CgBA,MAAAA,QAAAA,0BAAAA;IACJ,IAAGA,MAAMC,SAAAA;QAAY,MAAA,IAAA,MAAS;;IAC9B,IAAGD,MAAME,WAAAA;QAAc,MAAA,IAAA,MAAS;;IAChC,IAAGF,MAAMG,SAAAA;QACL,MAAA,IAAA,MAAS;;IACb,OAAA,IAAA,aAAWF,OAAAA,IAAAA,IAA0BC,SAAAA,IAAAA,IAA0BC,OAAAA,IAAAA;;;WAI/D,IAAA,sBAAWC,EAAAA,MAAAA,EAAqBA,EAAAA,QAAAA,EAAqBA,EAAAA,MAAAA,EAAoBC"}
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FormSpec – Build & Publish
|
|
2
2
|
|
|
3
|
-
**Version: `5.0.0-alpha.
|
|
3
|
+
**Version: `5.0.0-alpha.166`**
|
|
4
4
|
|
|
5
5
|
TypeScript package generated from F# via Fable. Runtime uses external `@fable-org/fable-library-js`.
|
|
6
6
|
|
|
@@ -63,17 +63,17 @@ Notes:
|
|
|
63
63
|
### From Verdaccio (local testing)
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
npm install @f1studio/form-spec@5.0.0-alpha.
|
|
67
|
-
pnpm add @f1studio/form-spec@5.0.0-alpha.
|
|
68
|
-
bun add @f1studio/form-spec@5.0.0-alpha.
|
|
66
|
+
npm install @f1studio/form-spec@5.0.0-alpha.166 --registry http://localhost:4873
|
|
67
|
+
pnpm add @f1studio/form-spec@5.0.0-alpha.166 --registry http://localhost:4873
|
|
68
|
+
bun add @f1studio/form-spec@5.0.0-alpha.166 --registry http://localhost:4873
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
### From npm (public registry)
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
|
-
npm install @f1studio/form-spec@5.0.0-alpha.
|
|
75
|
-
pnpm add @f1studio/form-spec@5.0.0-alpha.
|
|
76
|
-
bun add @f1studio/form-spec@5.0.0-alpha.
|
|
74
|
+
npm install @f1studio/form-spec@5.0.0-alpha.166
|
|
75
|
+
pnpm add @f1studio/form-spec@5.0.0-alpha.166
|
|
76
|
+
bun add @f1studio/form-spec@5.0.0-alpha.166
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
Entry points:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../FormSpec.TS/Thoth.Json/packages/Thoth.Json/Encode.ts"],"names":["value","o","enumerator","values","forLoopVar","object","enc1","v1","enc2","v2","enc3","v3","enc4","v4","enc5","v5","enc6","v6","enc7","v7","enc8","v8","list","tuple2","keyEncoder","valueEncoder","tupledArg","space","encoder","nil","arg10","encoderRef","extra","matchValue","t","setters","targetKey","caseStrategy","fi","encode","autoEncoder","skipNullField","source","target","set","patternInput","info","fields","len","fieldTypes","i","fullname","seq","enumType","clo2","encoders","x","option","keyType","
|
|
1
|
+
{"version":3,"sources":["../../../../FormSpec.TS/Thoth.Json/packages/Thoth.Json/Encode.ts"],"names":["value","o","enumerator","values","forLoopVar","object","enc1","v1","enc2","v2","enc3","v3","enc4","v4","enc5","v5","enc6","v6","enc7","v7","enc8","v8","list","tuple2","keyEncoder","valueEncoder","tupledArg","space","encoder","nil","arg10","encoderRef","extra","matchValue","t","setters","targetKey","caseStrategy","fi","encode","autoEncoder","skipNullField","source","target","set","patternInput","info","fields","len","fieldTypes","i","fullname","seq","enumType","clo2","encoders","x","option","keyType","activePatternResult15293","_arg1","clo4","activePatternResult15337","_arg2","autoEncodeRecordsAndUnions","unit","int64","uint64","bigint","decimal","datetime","datetimeOffset","timespan","guid","v","y","e","makeExtra","toString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAyCqDA;;;kCA4BNA;;gBAYlB,eAAA;;IA0BjBC,MAAAA,IAAAA,CAAAA;IAEgBC,MAAAA,iBAAA,mBAAA,EAAAC;IAApB,IAAA;QAAA,MAAoBD,UAAAA,CAAAA,0CAAAA,GAAAA;YAAfE,MAAAA,aAAeF,UAAAA,CAAAA,uDAAAA;YAChBD,CAAAA,CADCG,UAAAA,CAAAA,EAAAA,CAAAA,GAAAA,UAAAA,CAAAA,EAAAA;;;QAAL,IAAA,iBAAA,EAAoBF;;WAGhBD;;;WA2BJ,MAAA,IAAA,CAAUE;;;WAEgC,MAAA,IAAA,CAAUA;;;WAa5BE,WAAd,WAAA,EAAVF;;;iCAE0CH;;;eAG1C,cAAA,EAAAA,OAAe,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oBAASF,WAAAA,QAAAA,CAAoB2C;;;;IAuK5C,IAAA1C,SAAAA,MAAAA;QAEM,WAAA,QAAA,EAAA,CAAA,MAAA,YAA2B,IAAA,gBAAA,CAAXN,SAAAA,CAAAA,EAAAA,OAAoB,aAAA,EAApCM,OAAAA,MAAAA;;QADF,WAAA,UAAA,EAAA;;;;;;;;;;;;QAmBC2C,KADAA;IALHtC,MAAAA,qBAAe,kBAAA,EAAWA,cAAAA,IAAAA,+BAAAA;IAC1BI,MAAAA,sBAAgB,kBAAA,EAAWA,eAAc;IAW7C,WAAA,uCAAA,EAAA,2BAAA,GANOkC,OADAA,QADH,oBAAA,EAAAzC,QACQ,eAAA,EAAiBG,mBAAtBsC,OAII,kBAAA,MADA,WAAA,EAAA,CAAA,IAAqBC,EAAAA,IAAAA,EADxB5C,QAEuB,MAHxB2C,GAAAA,GAAAA,IASCnC,YAAaqC,UAAU7C,QAAOK,gBAAaI,iBAAcP;;;IA2B7DG,MAAAA,qBAAe,kBAAA,EAAWA,cAAAA,IAAAA,+BAAAA;IAC1BI,MAAAA,sBAAgB,kBAAA,EAAWA,eAAc;IAC7C,OAAAD,YAAaqC,UAAU7C,QAAOK,gBAAaI,iBAAcP;;;WAkEX4C,SAASnD,OAAM3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@f1studio/form-spec",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.166",
|
|
4
4
|
"description": "F1 Core - Form specification and types",
|
|
5
5
|
"main": "./FormSpec.FS/Interop/FormSpec.Api.Option.js",
|
|
6
6
|
"types": "./FormSpec.FS/Interop/FormSpec.Api.Option.d.ts",
|
|
@@ -29,6 +29,10 @@
|
|
|
29
29
|
"types": "./FormSpec.FS/Interop/Facade/BlueprintFilledForm.d.ts",
|
|
30
30
|
"default": "./FormSpec.FS/Interop/Facade/BlueprintFilledForm.js"
|
|
31
31
|
},
|
|
32
|
+
"./Interop/Facade/FormItemLookup": {
|
|
33
|
+
"types": "./FormSpec.FS/Interop/Facade/FormItemLookup.d.ts",
|
|
34
|
+
"default": "./FormSpec.FS/Interop/Facade/FormItemLookup.js"
|
|
35
|
+
},
|
|
32
36
|
"./Interop/Facade/FormAnswersGate": {
|
|
33
37
|
"types": "./FormSpec.FS/Interop/Facade/FormAnswersGate.d.ts",
|
|
34
38
|
"default": "./FormSpec.FS/Interop/Facade/FormAnswersGate.js"
|
|
@@ -99,7 +99,7 @@ export function addImportWarningsToCustomData(spec: Spec_FormSpec$1<Spec_FieldTy
|
|
|
99
99
|
return spec;
|
|
100
100
|
}
|
|
101
101
|
else {
|
|
102
|
-
return new Spec_FormSpec$1(spec.Id, spec.Code, spec.Title, spec.Abstract, spec.Version, spec.FormSpecVersion, spec.Steps, spec.CategoryTags, spec.Score, spec.AssociatedCodes, spec.RequiresReview, spec.RequiresReviewAndApproval, spec.ClinicalPathway, spec.Lifecycle, spec.FilledMeta, add<string, string>("coremr_import_warnings", toString(0, Auto_generateBoxedEncoder_437914C6(list_type(string_type), undefined, undefined, undefined)(warnings)), defaultArg<FSharpMap<string, string>>(spec.CustomData, empty_1<string, string>({
|
|
102
|
+
return new Spec_FormSpec$1(spec.Id, spec.Code, spec.Title, spec.Abstract, spec.Version, spec.FormSpecVersion, spec.Steps, spec.CategoryTags, spec.Score, spec.VendorScore, spec.AssociatedCodes, spec.RequiresReview, spec.RequiresReviewAndApproval, spec.ClinicalPathway, spec.Lifecycle, spec.FilledMeta, add<string, string>("coremr_import_warnings", toString(0, Auto_generateBoxedEncoder_437914C6(list_type(string_type), undefined, undefined, undefined)(warnings)), defaultArg<FSharpMap<string, string>>(spec.CustomData, empty_1<string, string>({
|
|
103
103
|
Compare: comparePrimitives,
|
|
104
104
|
}))), spec.Provenance, spec.Classification);
|
|
105
105
|
}
|
|
@@ -371,7 +371,7 @@ export function Converters_tryStringToFieldKey(s: string): Option<Shared_FieldKe
|
|
|
371
371
|
}
|
|
372
372
|
|
|
373
373
|
export function Converters_formSpecToLibrary<UserField>(spec: Spec_FormSpec$1<UserField>, categoryTags: FSharpList<CategoryTag_$union>): Spec_FormSpec$1<UserField> {
|
|
374
|
-
return new Spec_FormSpec$1(spec.Id, spec.Code, spec.Title, spec.Abstract, spec.Version, spec.FormSpecVersion, spec.Steps, map<CategoryTag_$union, string>(CategoryTag__get_toString, categoryTags), spec.Score, spec.AssociatedCodes, spec.RequiresReview, spec.RequiresReviewAndApproval, spec.ClinicalPathway, spec.Lifecycle, spec.FilledMeta, spec.CustomData, spec.Provenance, spec.Classification);
|
|
374
|
+
return new Spec_FormSpec$1(spec.Id, spec.Code, spec.Title, spec.Abstract, spec.Version, spec.FormSpecVersion, spec.Steps, map<CategoryTag_$union, string>(CategoryTag__get_toString, categoryTags), spec.Score, spec.VendorScore, spec.AssociatedCodes, spec.RequiresReview, spec.RequiresReviewAndApproval, spec.ClinicalPathway, spec.Lifecycle, spec.FilledMeta, spec.CustomData, spec.Provenance, spec.Classification);
|
|
375
375
|
}
|
|
376
376
|
|
|
377
377
|
export function Converters_formSpecFromLibrary<UserField>(spec: Spec_FormSpec$1<UserField>): [Spec_FormSpec$1<UserField>, FSharpList<CategoryTag_$union>] {
|
|
@@ -1309,6 +1309,34 @@ export function Spec_Score_$reflection(): TypeInfo {
|
|
|
1309
1309
|
return record_type("F1.Studio.Spec.Score", [], Spec_Score, () => [["MaxScore", int32_type], ["ScoreRanges", list_type(Spec_ScoreRange_$reflection())]]);
|
|
1310
1310
|
}
|
|
1311
1311
|
|
|
1312
|
+
export class Spec_VendorScoreBand extends Record implements IEquatable<Spec_VendorScoreBand>, IComparable<Spec_VendorScoreBand> {
|
|
1313
|
+
readonly Label: string;
|
|
1314
|
+
readonly Min: int32;
|
|
1315
|
+
constructor(Label: string, Min: int32) {
|
|
1316
|
+
super();
|
|
1317
|
+
this.Label = Label;
|
|
1318
|
+
this.Min = (Min | 0);
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
export function Spec_VendorScoreBand_$reflection(): TypeInfo {
|
|
1323
|
+
return record_type("F1.Studio.Spec.VendorScoreBand", [], Spec_VendorScoreBand, () => [["Label", string_type], ["Min", int32_type]]);
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
export class Spec_VendorScore extends Record implements IEquatable<Spec_VendorScore>, IComparable<Spec_VendorScore> {
|
|
1327
|
+
readonly ScaleName: string;
|
|
1328
|
+
readonly Bands: FSharpList<Spec_VendorScoreBand>;
|
|
1329
|
+
constructor(ScaleName: string, Bands: FSharpList<Spec_VendorScoreBand>) {
|
|
1330
|
+
super();
|
|
1331
|
+
this.ScaleName = ScaleName;
|
|
1332
|
+
this.Bands = Bands;
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
export function Spec_VendorScore_$reflection(): TypeInfo {
|
|
1337
|
+
return record_type("F1.Studio.Spec.VendorScore", [], Spec_VendorScore, () => [["ScaleName", string_type], ["Bands", list_type(Spec_VendorScoreBand_$reflection())]]);
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1312
1340
|
export type Spec_FormLifecycle_$union =
|
|
1313
1341
|
| Spec_FormLifecycle<0>
|
|
1314
1342
|
| Spec_FormLifecycle<1>
|
|
@@ -1441,6 +1469,7 @@ export class Spec_FormSpec$1<FieldType> extends Record implements IEquatable<Spe
|
|
|
1441
1469
|
readonly Steps: FSharpList<Spec_FormStep$1<FieldType>>;
|
|
1442
1470
|
readonly CategoryTags: FSharpList<string>;
|
|
1443
1471
|
readonly Score: Option<Spec_Score>;
|
|
1472
|
+
readonly VendorScore: Option<Spec_VendorScore>;
|
|
1444
1473
|
readonly AssociatedCodes: FSharpList<string>;
|
|
1445
1474
|
readonly RequiresReview: boolean;
|
|
1446
1475
|
readonly RequiresReviewAndApproval: boolean;
|
|
@@ -1450,7 +1479,7 @@ export class Spec_FormSpec$1<FieldType> extends Record implements IEquatable<Spe
|
|
|
1450
1479
|
readonly CustomData: Option<FSharpMap<string, string>>;
|
|
1451
1480
|
readonly Provenance: Option<IntegrationProvenance>;
|
|
1452
1481
|
readonly Classification: Spec_FormClassification_$union;
|
|
1453
|
-
constructor(Id: string, Code: Option<string>, Title: string, Abstract: string, Version: string, FormSpecVersion: string, Steps: FSharpList<Spec_FormStep$1<FieldType>>, CategoryTags: FSharpList<string>, Score: Option<Spec_Score>, AssociatedCodes: FSharpList<string>, RequiresReview: boolean, RequiresReviewAndApproval: boolean, ClinicalPathway: Option<ClinicalPathway_ClinicalPathwaySpec>, Lifecycle: Spec_FormLifecycle_$union, FilledMeta: Option<Spec_FilledMeta>, CustomData: Option<FSharpMap<string, string>>, Provenance: Option<IntegrationProvenance>, Classification: Spec_FormClassification_$union) {
|
|
1482
|
+
constructor(Id: string, Code: Option<string>, Title: string, Abstract: string, Version: string, FormSpecVersion: string, Steps: FSharpList<Spec_FormStep$1<FieldType>>, CategoryTags: FSharpList<string>, Score: Option<Spec_Score>, VendorScore: Option<Spec_VendorScore>, AssociatedCodes: FSharpList<string>, RequiresReview: boolean, RequiresReviewAndApproval: boolean, ClinicalPathway: Option<ClinicalPathway_ClinicalPathwaySpec>, Lifecycle: Spec_FormLifecycle_$union, FilledMeta: Option<Spec_FilledMeta>, CustomData: Option<FSharpMap<string, string>>, Provenance: Option<IntegrationProvenance>, Classification: Spec_FormClassification_$union) {
|
|
1454
1483
|
super();
|
|
1455
1484
|
this.Id = Id;
|
|
1456
1485
|
this.Code = Code;
|
|
@@ -1461,6 +1490,7 @@ export class Spec_FormSpec$1<FieldType> extends Record implements IEquatable<Spe
|
|
|
1461
1490
|
this.Steps = Steps;
|
|
1462
1491
|
this.CategoryTags = CategoryTags;
|
|
1463
1492
|
this.Score = Score;
|
|
1493
|
+
this.VendorScore = VendorScore;
|
|
1464
1494
|
this.AssociatedCodes = AssociatedCodes;
|
|
1465
1495
|
this.RequiresReview = RequiresReview;
|
|
1466
1496
|
this.RequiresReviewAndApproval = RequiresReviewAndApproval;
|
|
@@ -1474,7 +1504,7 @@ export class Spec_FormSpec$1<FieldType> extends Record implements IEquatable<Spe
|
|
|
1474
1504
|
}
|
|
1475
1505
|
|
|
1476
1506
|
export function Spec_FormSpec$1_$reflection(gen0: TypeInfo): TypeInfo {
|
|
1477
|
-
return record_type("F1.Studio.Spec.FormSpec`1", [gen0], Spec_FormSpec$1, () => [["Id", class_type("System.Guid")], ["Code", option_type(string_type)], ["Title", string_type], ["Abstract", string_type], ["Version", string_type], ["FormSpecVersion", string_type], ["Steps", list_type(Spec_FormStep$1_$reflection(gen0))], ["CategoryTags", list_type(string_type)], ["Score", option_type(Spec_Score_$reflection())], ["AssociatedCodes", list_type(string_type)], ["RequiresReview", bool_type], ["RequiresReviewAndApproval", bool_type], ["ClinicalPathway", option_type(ClinicalPathway_ClinicalPathwaySpec_$reflection())], ["Lifecycle", Spec_FormLifecycle_$reflection()], ["FilledMeta", option_type(Spec_FilledMeta_$reflection())], ["CustomData", option_type(class_type("Microsoft.FSharp.Collections.FSharpMap`2", [string_type, string_type]))], ["Provenance", option_type(IntegrationProvenance_$reflection())], ["Classification", Spec_FormClassification_$reflection()]]);
|
|
1507
|
+
return record_type("F1.Studio.Spec.FormSpec`1", [gen0], Spec_FormSpec$1, () => [["Id", class_type("System.Guid")], ["Code", option_type(string_type)], ["Title", string_type], ["Abstract", string_type], ["Version", string_type], ["FormSpecVersion", string_type], ["Steps", list_type(Spec_FormStep$1_$reflection(gen0))], ["CategoryTags", list_type(string_type)], ["Score", option_type(Spec_Score_$reflection())], ["VendorScore", option_type(Spec_VendorScore_$reflection())], ["AssociatedCodes", list_type(string_type)], ["RequiresReview", bool_type], ["RequiresReviewAndApproval", bool_type], ["ClinicalPathway", option_type(ClinicalPathway_ClinicalPathwaySpec_$reflection())], ["Lifecycle", Spec_FormLifecycle_$reflection()], ["FilledMeta", option_type(Spec_FilledMeta_$reflection())], ["CustomData", option_type(class_type("Microsoft.FSharp.Collections.FSharpMap`2", [string_type, string_type]))], ["Provenance", option_type(IntegrationProvenance_$reflection())], ["Classification", Spec_FormClassification_$reflection()]]);
|
|
1478
1508
|
}
|
|
1479
1509
|
|
|
1480
1510
|
export function Spec_Evaluator__get_Key(x: Spec_Evaluator_$union): string {
|
|
@@ -30,7 +30,7 @@ export function buildFormSpecFromResultStepsMap(details: FormSpecMetadata, steps
|
|
|
30
30
|
})));
|
|
31
31
|
}, sortBy<[Values_StepOrder, FSharpMap<Shared_FieldKey, FieldDetails$1<Spec_FieldType_$union>>], int32>((tupledArg: [Values_StepOrder, FSharpMap<Shared_FieldKey, FieldDetails$1<Spec_FieldType_$union>>]): int32 => tupledArg[0].fields[0], toList<Values_StepOrder, FSharpMap<Shared_FieldKey, FieldDetails$1<Spec_FieldType_$union>>>(stepsMap), {
|
|
32
32
|
Compare: comparePrimitives,
|
|
33
|
-
})), empty<string>(), details.MaxScore, empty<string>(), false, false, undefined, Spec_FormLifecycle_Draft(newGuid()), undefined, undefined, undefined, Spec_FormClassification_General());
|
|
33
|
+
})), empty<string>(), details.MaxScore, undefined, empty<string>(), false, false, undefined, Spec_FormLifecycle_Draft(newGuid()), undefined, undefined, undefined, Spec_FormClassification_General());
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
@@ -123,7 +123,7 @@ export function updateField<FieldType>(spec: Spec_FormSpec$1<FieldType>, fieldKe
|
|
|
123
123
|
else {
|
|
124
124
|
return step;
|
|
125
125
|
}
|
|
126
|
-
}, spec.Steps), spec.CategoryTags, spec.Score, spec.AssociatedCodes, spec.RequiresReview, spec.RequiresReviewAndApproval, spec.ClinicalPathway, spec.Lifecycle, spec.FilledMeta, spec.CustomData, spec.Provenance, spec.Classification);
|
|
126
|
+
}, spec.Steps), spec.CategoryTags, spec.Score, spec.VendorScore, spec.AssociatedCodes, spec.RequiresReview, spec.RequiresReviewAndApproval, spec.ClinicalPathway, spec.Lifecycle, spec.FilledMeta, spec.CustomData, spec.Provenance, spec.Classification);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
/**
|
|
@@ -413,7 +413,7 @@ export function Helpers_FormSpecMutators_updateFormFieldInFormSpecStep<UserField
|
|
|
413
413
|
else {
|
|
414
414
|
return s;
|
|
415
415
|
}
|
|
416
|
-
}, formSpec.Steps), formSpec.CategoryTags, formSpec.Score, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
416
|
+
}, formSpec.Steps), formSpec.CategoryTags, formSpec.Score, formSpec.VendorScore, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
417
417
|
}
|
|
418
418
|
|
|
419
419
|
/**
|
|
@@ -427,7 +427,7 @@ export function Helpers_FormSpecMutators_updateFormStepInFormSpec<UserField>(for
|
|
|
427
427
|
else {
|
|
428
428
|
return s;
|
|
429
429
|
}
|
|
430
|
-
}, formSpec.Steps), formSpec.CategoryTags, formSpec.Score, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
430
|
+
}, formSpec.Steps), formSpec.CategoryTags, formSpec.Score, formSpec.VendorScore, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
431
431
|
}
|
|
432
432
|
|
|
433
433
|
/**
|
|
@@ -442,7 +442,7 @@ export function Helpers_FormSpecMutators_addFormFieldToStep<UserField>(formStep:
|
|
|
442
442
|
else {
|
|
443
443
|
return s;
|
|
444
444
|
}
|
|
445
|
-
}, formSpec.Steps), formSpec.CategoryTags, formSpec.Score, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
445
|
+
}, formSpec.Steps), formSpec.CategoryTags, formSpec.Score, formSpec.VendorScore, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
446
446
|
}
|
|
447
447
|
|
|
448
448
|
/**
|
|
@@ -456,7 +456,7 @@ export function Helpers_FormSpecMutators_removeFormFieldFromFormSpec<UserField>(
|
|
|
456
456
|
else {
|
|
457
457
|
return s;
|
|
458
458
|
}
|
|
459
|
-
}, formSpec.Steps), formSpec.CategoryTags, formSpec.Score, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
459
|
+
}, formSpec.Steps), formSpec.CategoryTags, formSpec.Score, formSpec.VendorScore, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
460
460
|
}
|
|
461
461
|
|
|
462
462
|
/**
|
|
@@ -489,7 +489,7 @@ export function Helpers_FormSpecMutators_moveFormFieldUpInFormSpec<UserField>(fo
|
|
|
489
489
|
else {
|
|
490
490
|
return s;
|
|
491
491
|
}
|
|
492
|
-
}, formSpec.Steps), formSpec.CategoryTags, formSpec.Score, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
492
|
+
}, formSpec.Steps), formSpec.CategoryTags, formSpec.Score, formSpec.VendorScore, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
/**
|
|
@@ -515,7 +515,7 @@ export function Helpers_FormSpecMutators_moveFormFieldDownInFormSpec<UserField>(
|
|
|
515
515
|
else {
|
|
516
516
|
return s;
|
|
517
517
|
}
|
|
518
|
-
}, formSpec.Steps), formSpec.CategoryTags, formSpec.Score, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
518
|
+
}, formSpec.Steps), formSpec.CategoryTags, formSpec.Score, formSpec.VendorScore, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
519
519
|
}
|
|
520
520
|
|
|
521
521
|
/**
|
|
@@ -535,7 +535,7 @@ export function Helpers_FormSpecMutators_moveFieldByKeyToPositionInFormStepSpec<
|
|
|
535
535
|
else {
|
|
536
536
|
return s;
|
|
537
537
|
}
|
|
538
|
-
}, formSpec.Steps), formSpec.CategoryTags, formSpec.Score, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
538
|
+
}, formSpec.Steps), formSpec.CategoryTags, formSpec.Score, formSpec.VendorScore, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
539
539
|
}
|
|
540
540
|
else {
|
|
541
541
|
return formSpec;
|
|
@@ -558,7 +558,7 @@ export function Helpers_FormSpecMutators_moveFormStepUpInFormSpec<UserField>(for
|
|
|
558
558
|
}
|
|
559
559
|
}, formSpec.Steps), {
|
|
560
560
|
Compare: comparePrimitives,
|
|
561
|
-
})), formSpec.CategoryTags, formSpec.Score, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
561
|
+
})), formSpec.CategoryTags, formSpec.Score, formSpec.VendorScore, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
562
562
|
}
|
|
563
563
|
|
|
564
564
|
/**
|
|
@@ -577,14 +577,14 @@ export function Helpers_FormSpecMutators_moveFormStepDownInFormSpec<UserField>(f
|
|
|
577
577
|
}
|
|
578
578
|
}, formSpec.Steps), {
|
|
579
579
|
Compare: comparePrimitives,
|
|
580
|
-
})), formSpec.CategoryTags, formSpec.Score, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
580
|
+
})), formSpec.CategoryTags, formSpec.Score, formSpec.VendorScore, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
581
581
|
}
|
|
582
582
|
|
|
583
583
|
/**
|
|
584
584
|
* Removes a form step from a FormSpec.
|
|
585
585
|
*/
|
|
586
586
|
export function Helpers_FormSpecMutators_removeFormStepFromFormSpec<UserField>(formStepOrder: int32, formSpec: Spec_FormSpec$1<UserField>): Spec_FormSpec$1<UserField> {
|
|
587
|
-
return new Spec_FormSpec$1(formSpec.Id, formSpec.Code, formSpec.Title, formSpec.Abstract, formSpec.Version, formSpec.FormSpecVersion, mapIndexed<Spec_FormStep$1<UserField>, Spec_FormStep$1<UserField>>((i: int32, s_1: Spec_FormStep$1<UserField>): Spec_FormStep$1<UserField> => (new Spec_FormStep$1(i + 1, s_1.StepLabel, s_1.Fields)), filter<Spec_FormStep$1<UserField>>((s: Spec_FormStep$1<UserField>): boolean => (s.StepOrder !== formStepOrder), formSpec.Steps)), formSpec.CategoryTags, formSpec.Score, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
587
|
+
return new Spec_FormSpec$1(formSpec.Id, formSpec.Code, formSpec.Title, formSpec.Abstract, formSpec.Version, formSpec.FormSpecVersion, mapIndexed<Spec_FormStep$1<UserField>, Spec_FormStep$1<UserField>>((i: int32, s_1: Spec_FormStep$1<UserField>): Spec_FormStep$1<UserField> => (new Spec_FormStep$1(i + 1, s_1.StepLabel, s_1.Fields)), filter<Spec_FormStep$1<UserField>>((s: Spec_FormStep$1<UserField>): boolean => (s.StepOrder !== formStepOrder), formSpec.Steps)), formSpec.CategoryTags, formSpec.Score, formSpec.VendorScore, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
588
588
|
}
|
|
589
589
|
|
|
590
590
|
/**
|
|
@@ -608,7 +608,7 @@ export function Helpers_FormSpecTransformers_flattenSpecSteps<UserField>(formSpe
|
|
|
608
608
|
break;
|
|
609
609
|
}
|
|
610
610
|
};
|
|
611
|
-
return new Spec_FormSpec$1(formSpec.Id, formSpec.Code, formSpec.Title, formSpec.Abstract, formSpec.Version, formSpec.FormSpecVersion, singleton(new Spec_FormStep$1(1, "Complete Form", flatten(formSpec.Steps, empty<Spec_FormField$1<UserField>>()))), formSpec.CategoryTags, formSpec.Score, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
611
|
+
return new Spec_FormSpec$1(formSpec.Id, formSpec.Code, formSpec.Title, formSpec.Abstract, formSpec.Version, formSpec.FormSpecVersion, singleton(new Spec_FormStep$1(1, "Complete Form", flatten(formSpec.Steps, empty<Spec_FormField$1<UserField>>()))), formSpec.CategoryTags, formSpec.Score, formSpec.VendorScore, formSpec.AssociatedCodes, formSpec.RequiresReview, formSpec.RequiresReviewAndApproval, formSpec.ClinicalPathway, formSpec.Lifecycle, formSpec.FilledMeta, formSpec.CustomData, formSpec.Provenance, formSpec.Classification);
|
|
612
612
|
}
|
|
613
613
|
|
|
614
614
|
/**
|
|
@@ -3,40 +3,53 @@ import { exists, length, isEmpty, FSharpList, cons, singleton, empty } from "@fa
|
|
|
3
3
|
import { FSharpResult$2_$union, FSharpResult$2_Ok, FSharpResult$2_Error } from "@fable-org/fable-library-js/Result.js";
|
|
4
4
|
import { Spec_FieldType_$union, Spec_FormSpec$1 } from "../../../FormSpec.js";
|
|
5
5
|
import { ListMetadata, convertWithMapAndProvenance } from "./CoreMRSourceMap.js";
|
|
6
|
+
import { ImportOrigin } from "../../../Provenance.js";
|
|
6
7
|
import { CoreMRChoice, CoreMRItem, CoreMRFormData } from "../../CorEMR/CoreMRTypes.js";
|
|
7
8
|
import { defaultArg, Option } from "@fable-org/fable-library-js/Option.js";
|
|
8
9
|
import { FSharpMap } from "@fable-org/fable-library-js/Map.js";
|
|
9
10
|
import { int32 } from "@fable-org/fable-library-js/Int32.js";
|
|
10
11
|
import { ElementTypeInfo } from "./CorEMRElementTypeMap.js";
|
|
12
|
+
import { FormSystemAdapter$1, FormMetadata, FormSystemFeatures } from "../FormSystemAdapter.js";
|
|
11
13
|
import { buildReport } from "./CorEMRSemanticReportBuilder.js";
|
|
12
14
|
import { nonHeadingItems } from "./CorEMRSectioning.js";
|
|
13
15
|
import { compare } from "@fable-org/fable-library-js/BigInt.js";
|
|
14
16
|
import { int32ToString } from "@fable-org/fable-library-js/Util.js";
|
|
15
|
-
import { FormSystemAdapter$1, FormSystemFeatures, FormMetadata } from "../FormSystemAdapter.js";
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Convert with list metadata (IsScored, EncounterTypes) from FormListItem.
|
|
19
20
|
* Use when importing from fetch-coremr-forms where FormListItem is available.
|
|
20
21
|
* When elementTypes is Some (from bridge templates endpoint), use it for ValueEncoding; else fallback to CorEMRElementTypeMap.
|
|
22
|
+
* ⭐ `origin` is REQUIRED — the tenant and database this import is being made FROM. Without them the
|
|
23
|
+
* provenance names a product and nothing else, and its ids resolve to no database.
|
|
21
24
|
*/
|
|
22
|
-
export function convertWithListMetadata(formData: CoreMRFormData, listMetadata: ListMetadata, elementTypes: Option<FSharpMap<int32, ElementTypeInfo>>): FSharpResult$2_$union<Spec_FormSpec$1<Spec_FieldType_$union>, FSharpList<string>> {
|
|
25
|
+
export function convertWithListMetadata(origin: ImportOrigin, formData: CoreMRFormData, listMetadata: ListMetadata, elementTypes: Option<FSharpMap<int32, ElementTypeInfo>>): FSharpResult$2_$union<Spec_FormSpec$1<Spec_FieldType_$union>, FSharpList<string>> {
|
|
23
26
|
let arg: string;
|
|
24
27
|
try {
|
|
25
|
-
return FSharpResult$2_Ok<Spec_FormSpec$1<Spec_FieldType_$union>, FSharpList<string>>(convertWithMapAndProvenance(formData, listMetadata, elementTypes));
|
|
28
|
+
return FSharpResult$2_Ok<Spec_FormSpec$1<Spec_FieldType_$union>, FSharpList<string>>(convertWithMapAndProvenance(origin, formData, listMetadata, elementTypes));
|
|
26
29
|
}
|
|
27
30
|
catch (ex: any) {
|
|
28
31
|
return FSharpResult$2_Error<Spec_FormSpec$1<Spec_FieldType_$union>, FSharpList<string>>(cons((arg = ex.message, toText(printf("CorEMR conversion failed: %s"))(arg)), (ex.stack == null) ? empty<string>() : singleton(" Stack: " + ex.stack)));
|
|
29
32
|
}
|
|
30
33
|
}
|
|
31
34
|
|
|
32
|
-
export const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
export const supportedFeatures: FormSystemFeatures = new FormSystemFeatures(true, true, true, true, true);
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* CorEMR adapter implementation.
|
|
39
|
+
* ⭐ A FUNCTION OF ITS ORIGIN, not a value. There is no adapter that does not know which tenant and
|
|
40
|
+
* which database it is importing from — that is what makes a site-less import unrepresentable rather
|
|
41
|
+
* than merely discouraged.
|
|
42
|
+
*/
|
|
43
|
+
export function adapterFor(origin: ImportOrigin): FormSystemAdapter$1<CoreMRFormData> {
|
|
44
|
+
return new FormSystemAdapter$1("coremr", (template: CoreMRFormData): FSharpResult$2_$union<Spec_FormSpec$1<Spec_FieldType_$union>, FSharpList<string>> => {
|
|
45
|
+
let arg: string;
|
|
46
|
+
try {
|
|
47
|
+
return FSharpResult$2_Ok<Spec_FormSpec$1<Spec_FieldType_$union>, FSharpList<string>>(convertWithMapAndProvenance(origin, template, undefined, undefined));
|
|
48
|
+
}
|
|
49
|
+
catch (ex: any) {
|
|
50
|
+
return FSharpResult$2_Error<Spec_FormSpec$1<Spec_FieldType_$union>, FSharpList<string>>(cons((arg = ex.message, toText(printf("CorEMR conversion failed: %s"))(arg)), (ex.stack == null) ? empty<string>() : singleton(" Stack: " + ex.stack)));
|
|
51
|
+
}
|
|
52
|
+
}, buildReport, (template_2: CoreMRFormData): FSharpResult$2_$union<void, FSharpList<string>> => (isEmpty(template_2.Items) ? FSharpResult$2_Error<void, FSharpList<string>>(singleton("Template has no items")) : (isNullOrWhiteSpace(template_2.Metadata.FormName) ? FSharpResult$2_Error<void, FSharpList<string>>(singleton("Template has no name")) : FSharpResult$2_Ok<void, FSharpList<string>>(undefined))), (template_3: CoreMRFormData): FormMetadata => (new FormMetadata(template_3.Metadata.FormName, defaultArg(template_3.Metadata.Description, ""), length<CoreMRItem>(nonHeadingItems(template_3.Items)), exists<CoreMRChoice>((c: CoreMRChoice): boolean => (compare(c.Score, 0n) > 0), template_3.Choices), !isEmpty(template_3.Triggers), int32ToString(template_3.Metadata.VersionNumber))), supportedFeatures);
|
|
53
|
+
}
|
|
41
54
|
|
|
42
55
|
//# sourceMappingURL=CorEMRAdapter.ts.map
|
|
@@ -2,7 +2,7 @@ import { isNullOrWhiteSpace } from "@fable-org/fable-library-js/String.js";
|
|
|
2
2
|
import { Helpers_generateDeterministicGuidRaw, Helpers_canonicalizeFieldKey } from "../../../Helpers.js";
|
|
3
3
|
import { int32 } from "@fable-org/fable-library-js/Int32.js";
|
|
4
4
|
import { CoreMRChoice, CoreMRItem } from "../../CorEMR/CoreMRTypes.js";
|
|
5
|
-
import { Spec_FormField$1, Spec_FieldType_$union, Spec_FieldType_UnsupportedField, Spec_UnsupportedFieldInfo, Spec_FieldType_PluginField, Spec_PluginFieldConfig, Spec_FieldType_Message, Spec_MessageInfo, Spec_MessageType_Info,
|
|
5
|
+
import { Spec_FormField$1, Spec_FieldType_$union, Spec_FieldType_UnsupportedField, Spec_UnsupportedFieldInfo, Spec_FieldType_PluginField, Spec_PluginFieldConfig, Spec_FieldType_Message, Spec_MessageInfo, Spec_MessageType_Info, Spec_FieldType_Signature, Spec_SignatureInfo, Spec_FieldType_DateTimeLocal, Spec_FieldType_Date, Spec_FieldType_CheckboxList, Spec_MultiChoiceInfo, Spec_FieldType_Dropdown, Spec_FieldType_Radio, Spec_SingleChoiceInfo, Spec_FieldType_TextArea, Spec_FieldType_Text, Spec_TextInfo, Shared_FieldOption, Shared_FieldOptionKey, Shared_FieldKey } from "../../../FormSpec.js";
|
|
6
6
|
import { isEmpty, ofArray, FSharpList, sortBy, map } from "@fable-org/fable-library-js/List.js";
|
|
7
7
|
import { comparePrimitives } from "@fable-org/fable-library-js/Util.js";
|
|
8
8
|
import { getElementTypeInfo } from "./CorEMRElementTypeMap.js";
|
|
@@ -45,62 +45,62 @@ export function isNeedsDocumentationType(item: CoreMRItem): boolean {
|
|
|
45
45
|
return getElementTypeInfo(item.ItemTypeId).IsNeedsDocumentation;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* CoreMR item → FormSpec `FieldType`, decided by THE CONTROL THE SITE STATES.
|
|
50
|
+
*
|
|
51
|
+
* ⚖️ RE-KEYED 2026-09-23 (FLIP-9 Part D). This was `match item.ItemTypeId with` over 24 hardcoded
|
|
52
|
+
* integers — 24 arms producing 11 distinct outcomes, 13 of them byte-identical duplicates — and
|
|
53
|
+
* `item.ItemTypeName` was never read, so the site's own vocabulary was DECORATIVE. Even at
|
|
54
|
+
* 5.5.0+9704, which states `form_item_types` in full, a type-61 item still became whatever the
|
|
55
|
+
* constant said.
|
|
56
|
+
*
|
|
57
|
+
* ⭐ `ItemTypeName` now carries THE CONTROL: stated by the site at 9704 (`form_item_types.php_class`)
|
|
58
|
+
* and declared by conduit at 10245, which ships no such table. ⇒ **No CoreMR integer appears in this
|
|
59
|
+
* function.** A second EHR supplies controls and needs no new branch here.
|
|
60
|
+
*
|
|
61
|
+
* 🔴 WHAT THIS FUNCTION DELIBERATELY DOES NOT DECIDE — measured, conduit `audit/260923-1655`:
|
|
62
|
+
* • whether several options may be chosen — that is the ITEM's own stated `item_choices.score`
|
|
63
|
+
* (FLIP-8), never the type. A "multi-select" type produces ONE answer row per cell 99.6% of
|
|
64
|
+
* the time.
|
|
65
|
+
* • whether it offers options at all — STRUCTURAL: `hasChoices`, below, from the item's own rows.
|
|
66
|
+
* 21 items of type 20 state none, and 73 of 132 type-140 items state some.
|
|
67
|
+
*/
|
|
48
68
|
export function mapFieldType(item: CoreMRItem, choices: FSharpList<CoreMRChoice>): Spec_FieldType_$union {
|
|
49
69
|
const mappedChoices: FSharpList<Shared_FieldOption> = mapChoices(choices);
|
|
50
70
|
const hasChoices: boolean = !isEmpty(mappedChoices);
|
|
51
|
-
const matchValue:
|
|
71
|
+
const matchValue: string = item.ItemTypeName;
|
|
52
72
|
switch (matchValue) {
|
|
53
|
-
case
|
|
73
|
+
case "ShortAnswer":
|
|
54
74
|
return Spec_FieldType_Text(new Spec_TextInfo(undefined));
|
|
55
|
-
case
|
|
75
|
+
case "NoteEssay":
|
|
56
76
|
return Spec_FieldType_TextArea(new Spec_TextInfo(undefined));
|
|
57
|
-
case
|
|
58
|
-
|
|
59
|
-
case 21:
|
|
60
|
-
return Spec_FieldType_Radio(new Spec_SingleChoiceInfo(mappedChoices));
|
|
61
|
-
case 25:
|
|
62
|
-
return Spec_FieldType_Dropdown(new Spec_SingleChoiceInfo(mappedChoices));
|
|
63
|
-
case 26:
|
|
64
|
-
return Spec_FieldType_CheckboxList(new Spec_MultiChoiceInfo(mappedChoices));
|
|
65
|
-
case 30:
|
|
66
|
-
return Spec_FieldType_Radio(new Spec_SingleChoiceInfo(hasChoices ? mappedChoices : buildImplicitYesNoOptions(item)));
|
|
67
|
-
case 31:
|
|
77
|
+
case "MultipleChoice":
|
|
78
|
+
case "MultipleChoicePlusNotes":
|
|
68
79
|
return Spec_FieldType_Radio(new Spec_SingleChoiceInfo(hasChoices ? mappedChoices : buildImplicitYesNoOptions(item)));
|
|
69
|
-
case
|
|
80
|
+
case "DropDown":
|
|
81
|
+
case "DropDownPlusNotes":
|
|
70
82
|
return Spec_FieldType_Dropdown(new Spec_SingleChoiceInfo(mappedChoices));
|
|
71
|
-
case
|
|
72
|
-
|
|
73
|
-
case 41:
|
|
83
|
+
case "CheckboxSeries":
|
|
84
|
+
case "CheckboxSeriesPlusNotes":
|
|
74
85
|
return Spec_FieldType_CheckboxList(new Spec_MultiChoiceInfo(mappedChoices));
|
|
75
|
-
case
|
|
86
|
+
case "DateField":
|
|
76
87
|
return Spec_FieldType_Date(new Spec_TextInfo(undefined));
|
|
77
|
-
case
|
|
78
|
-
return Spec_FieldType_Signature(new Spec_SignatureInfo(undefined));
|
|
79
|
-
case 60:
|
|
88
|
+
case "DateFieldWithTime":
|
|
80
89
|
return Spec_FieldType_DateTimeLocal(new Spec_TextInfo(undefined));
|
|
81
|
-
case
|
|
90
|
+
case "SignatureAndDate":
|
|
91
|
+
case "SignatureAndDateWithTime":
|
|
82
92
|
return Spec_FieldType_Signature(new Spec_SignatureInfo(undefined));
|
|
83
|
-
case
|
|
84
|
-
throw new Error(
|
|
85
|
-
case
|
|
86
|
-
|
|
87
|
-
case 121:
|
|
93
|
+
case "FormHeading":
|
|
94
|
+
throw new Error(`a heading reached mapFieldType (item ${item.ItemId}); headings become Steps and must be filtered by CorEMRSectioning first`);
|
|
95
|
+
case "FormInstructions":
|
|
96
|
+
case "DisplayFormId":
|
|
88
97
|
return Spec_FieldType_Message(new Spec_MessageInfo("", Spec_MessageType_Info(), item.Label, undefined));
|
|
89
|
-
case
|
|
98
|
+
case "PatientVitals":
|
|
90
99
|
return Spec_FieldType_PluginField(new Spec_PluginFieldConfig("Fable.Form.Simple.Bulma.Fields.VitalsField", undefined, undefined));
|
|
91
|
-
case
|
|
92
|
-
case 132:
|
|
93
|
-
return Spec_FieldType_Message(new Spec_MessageInfo("", Spec_MessageType_Info(), item.Label, undefined));
|
|
94
|
-
case 133:
|
|
95
|
-
case 134:
|
|
96
|
-
case 135:
|
|
97
|
-
return Spec_FieldType_Message(new Spec_MessageInfo("", Spec_MessageType_Info(), item.Label, undefined));
|
|
98
|
-
case 140:
|
|
100
|
+
case "AllergyFinder":
|
|
99
101
|
return Spec_FieldType_PluginField(new Spec_PluginFieldConfig("Fable.Form.Simple.Bulma.Fields.AllergyFinderField", undefined, undefined));
|
|
100
|
-
case 143:
|
|
101
|
-
return Spec_FieldType_CheckboxList(new Spec_MultiChoiceInfo(mappedChoices));
|
|
102
102
|
default:
|
|
103
|
-
return Spec_FieldType_UnsupportedField(new Spec_UnsupportedFieldInfo(item.ItemId, defaultArg(item.Code, ""),
|
|
103
|
+
return Spec_FieldType_UnsupportedField(new Spec_UnsupportedFieldInfo(item.ItemId, defaultArg(item.Code, ""), item.ItemTypeId));
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|