@f1studio/form-spec 5.0.0-alpha.166 → 5.0.0-alpha.168
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/CorEMRTemplateMapper.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.js +11 -7
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.js.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js.map +1 -1
- package/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.js +13 -4
- package/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.js.map +1 -1
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.d.ts +96 -17
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.js +501 -64
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.js.map +1 -1
- package/FormSpec.FS/Provenance.d.ts +15 -7
- package/FormSpec.FS/Provenance.d.ts.map +1 -1
- package/FormSpec.FS/Provenance.js +11 -11
- 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 +1 -1
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.ts +23 -19
- package/src/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.ts +11 -2
- package/src/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.ts +463 -53
- package/src/FormSpec.FS/Provenance.ts +23 -15
- package/src/vye-os-contracts-fs/src/Core/Ids.ts +8 -8
- package/vye-os-contracts-fs/src/Core/Ids.d.ts +4 -4
- package/vye-os-contracts-fs/src/Core/Ids.d.ts.map +1 -1
- package/vye-os-contracts-fs/src/Core/Ids.js +18 -18
|
@@ -6,42 +6,50 @@ import { isNullOrWhiteSpace } from "@fable-org/fable-library-js/String.js";
|
|
|
6
6
|
export class IntegrationProvenance extends Record implements IEquatable<IntegrationProvenance>, IComparable<IntegrationProvenance> {
|
|
7
7
|
readonly Vendor: string;
|
|
8
8
|
readonly TenantId: string;
|
|
9
|
-
readonly
|
|
9
|
+
readonly DbName: string;
|
|
10
10
|
readonly Payload: string;
|
|
11
|
-
constructor(Vendor: string, TenantId: string,
|
|
11
|
+
constructor(Vendor: string, TenantId: string, DbName: string, Payload: string) {
|
|
12
12
|
super();
|
|
13
13
|
this.Vendor = Vendor;
|
|
14
14
|
this.TenantId = TenantId;
|
|
15
|
-
this.
|
|
15
|
+
this.DbName = DbName;
|
|
16
16
|
this.Payload = Payload;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export function IntegrationProvenance_$reflection(): TypeInfo {
|
|
21
|
-
return record_type("F1.Studio.Provenance.IntegrationProvenance", [], IntegrationProvenance, () => [["Vendor", string_type], ["TenantId", string_type], ["
|
|
21
|
+
return record_type("F1.Studio.Provenance.IntegrationProvenance", [], IntegrationProvenance, () => [["Vendor", string_type], ["TenantId", string_type], ["DbName", string_type], ["Payload", string_type]]);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export class ImportOrigin extends Record implements IEquatable<ImportOrigin>, IComparable<ImportOrigin> {
|
|
25
25
|
readonly Vendor: string;
|
|
26
26
|
readonly TenantId: string;
|
|
27
|
-
readonly
|
|
28
|
-
constructor(Vendor: string, TenantId: string,
|
|
27
|
+
readonly DbName: string;
|
|
28
|
+
constructor(Vendor: string, TenantId: string, DbName: string) {
|
|
29
29
|
super();
|
|
30
30
|
this.Vendor = Vendor;
|
|
31
31
|
this.TenantId = TenantId;
|
|
32
|
-
this.
|
|
32
|
+
this.DbName = DbName;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export function ImportOrigin_$reflection(): TypeInfo {
|
|
37
|
-
return record_type("F1.Studio.Provenance.ImportOrigin", [], ImportOrigin, () => [["Vendor", string_type], ["TenantId", string_type], ["
|
|
37
|
+
return record_type("F1.Studio.Provenance.ImportOrigin", [], ImportOrigin, () => [["Vendor", string_type], ["TenantId", string_type], ["DbName", string_type]]);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
|
-
* ⛔ FAILS LOUDLY. A blank tenant or
|
|
42
|
-
* whose payload can never be resolved back, and it must not be written at all.
|
|
41
|
+
* ⛔ FAILS LOUDLY. A blank tenant or database is not "unknown, fill it in later" — it is an
|
|
42
|
+
* import whose payload can never be resolved back, and it must not be written at all.
|
|
43
|
+
*
|
|
44
|
+
* ⚖️ THE PARAMETER WAS NAMED `siteId` UNTIL 2026-09-25 (#123 W3b) AND THE VALUE NEVER CHANGED.
|
|
45
|
+
* ⚰️ It has always been a LEVEL 3 **database name** — `coremr_st_johns_fl` — and the failure
|
|
46
|
+
* message said so in words (*"scoped to ONE CoreMR database"*) while the parameter said
|
|
47
|
+
* LEVEL 2 in its name. ⭐ That is the whole #123 defect in four lines: **the comment was
|
|
48
|
+
* right, the name was wrong, and nothing could disagree because there was only ever one
|
|
49
|
+
* value.** The language is [`TAXONOMY_SSOT.md`](../../../../TAXONOMY_SSOT.md) — a SITE is a
|
|
50
|
+
* place (a minted Guid, #106); a DB NAME is what a connection opens.
|
|
43
51
|
*/
|
|
44
|
-
export function ImportOriginModule_create(vendor: string, tenantId: string,
|
|
52
|
+
export function ImportOriginModule_create(vendor: string, tenantId: string, dbName: string): ImportOrigin {
|
|
45
53
|
const blank = isNullOrWhiteSpace;
|
|
46
54
|
if (blank(vendor)) {
|
|
47
55
|
throw new Error("ImportOrigin: vendor is required (e.g. \"coremr\").");
|
|
@@ -49,17 +57,17 @@ export function ImportOriginModule_create(vendor: string, tenantId: string, site
|
|
|
49
57
|
if (blank(tenantId)) {
|
|
50
58
|
throw new Error("ImportOrigin: tenantId is required — a blueprint belongs to an organisation.");
|
|
51
59
|
}
|
|
52
|
-
if (blank(
|
|
53
|
-
throw new Error("ImportOrigin:
|
|
60
|
+
if (blank(dbName)) {
|
|
61
|
+
throw new Error("ImportOrigin: dbName is required — every formId/itemId/choiceId in the payload is scoped to ONE CoreMR database, and without it the provenance cannot be resolved back.");
|
|
54
62
|
}
|
|
55
|
-
return new ImportOrigin(vendor.trim(), tenantId.trim(),
|
|
63
|
+
return new ImportOrigin(vendor.trim(), tenantId.trim(), dbName.trim());
|
|
56
64
|
}
|
|
57
65
|
|
|
58
66
|
/**
|
|
59
67
|
* The provenance for a payload read under this origin.
|
|
60
68
|
*/
|
|
61
69
|
export function ImportOriginModule_provenance(o: ImportOrigin, payload: string): IntegrationProvenance {
|
|
62
|
-
return new IntegrationProvenance(o.Vendor, o.TenantId, o.
|
|
70
|
+
return new IntegrationProvenance(o.Vendor, o.TenantId, o.DbName, payload);
|
|
63
71
|
}
|
|
64
72
|
|
|
65
73
|
//# sourceMappingURL=Provenance.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Union } from "@fable-org/fable-library-js/Types.js";
|
|
2
2
|
import { class_type, union_type, string_type, TypeInfo } from "@fable-org/fable-library-js/Reflection.js";
|
|
3
3
|
|
|
4
|
-
export class
|
|
4
|
+
export class DbName extends Union<0, "DbName"> {
|
|
5
5
|
constructor(Item: string) {
|
|
6
6
|
super();
|
|
7
7
|
this.tag = 0;
|
|
@@ -10,15 +10,15 @@ export class SiteId extends Union<0, "SiteId"> {
|
|
|
10
10
|
readonly tag: 0;
|
|
11
11
|
readonly fields: [string];
|
|
12
12
|
cases() {
|
|
13
|
-
return ["
|
|
13
|
+
return ["DbName"];
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export function
|
|
18
|
-
return union_type("Vye.Contracts.Core.
|
|
17
|
+
export function DbName_$reflection(): TypeInfo {
|
|
18
|
+
return union_type("Vye.Contracts.Core.DbName", [], DbName, () => [[["Item", string_type]]]);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export class
|
|
21
|
+
export class TenantId extends Union<0, "TenantId"> {
|
|
22
22
|
constructor(Item: string) {
|
|
23
23
|
super();
|
|
24
24
|
this.tag = 0;
|
|
@@ -27,12 +27,12 @@ export class PlatformTenantId extends Union<0, "PlatformTenantId"> {
|
|
|
27
27
|
readonly tag: 0;
|
|
28
28
|
readonly fields: [string];
|
|
29
29
|
cases() {
|
|
30
|
-
return ["
|
|
30
|
+
return ["TenantId"];
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
export function
|
|
35
|
-
return union_type("Vye.Contracts.Core.
|
|
34
|
+
export function TenantId_$reflection(): TypeInfo {
|
|
35
|
+
return union_type("Vye.Contracts.Core.TenantId", [], TenantId, () => [[["Item", class_type("System.Guid")]]]);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export class OrgId extends Union<0, "OrgId"> {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Union } from "@fable-org/fable-library-js/Types.js";
|
|
2
2
|
import { TypeInfo } from "@fable-org/fable-library-js/Reflection.js";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class DbName extends Union<0, "DbName"> {
|
|
4
4
|
constructor(Item: string);
|
|
5
5
|
readonly tag: 0;
|
|
6
6
|
readonly fields: [string];
|
|
7
7
|
cases(): string[];
|
|
8
8
|
}
|
|
9
|
-
export declare function
|
|
10
|
-
export declare class
|
|
9
|
+
export declare function DbName_$reflection(): TypeInfo;
|
|
10
|
+
export declare class TenantId extends Union<0, "TenantId"> {
|
|
11
11
|
constructor(Item: string);
|
|
12
12
|
readonly tag: 0;
|
|
13
13
|
readonly fields: [string];
|
|
14
14
|
cases(): string[];
|
|
15
15
|
}
|
|
16
|
-
export declare function
|
|
16
|
+
export declare function TenantId_$reflection(): TypeInfo;
|
|
17
17
|
export declare class OrgId extends Union<0, "OrgId"> {
|
|
18
18
|
constructor(Item: string);
|
|
19
19
|
readonly tag: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ids.d.ts","sourceRoot":"","sources":["../../../../FormSpec.TS/vye-os-contracts-fs/src/Core/Ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,OAAO,EAAuC,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAE1G,qBAAa,MAAO,SAAQ,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC;gBAC9B,IAAI,EAAE,MAAM;IAKxB,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;IAChB,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC;IAC1B,KAAK;CAGR;AAED,wBAAgB,kBAAkB,IAAI,QAAQ,CAE7C;AAED,qBAAa,
|
|
1
|
+
{"version":3,"file":"Ids.d.ts","sourceRoot":"","sources":["../../../../FormSpec.TS/vye-os-contracts-fs/src/Core/Ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,OAAO,EAAuC,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAE1G,qBAAa,MAAO,SAAQ,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC;gBAC9B,IAAI,EAAE,MAAM;IAKxB,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;IAChB,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC;IAC1B,KAAK;CAGR;AAED,wBAAgB,kBAAkB,IAAI,QAAQ,CAE7C;AAED,qBAAa,QAAS,SAAQ,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC;gBAClC,IAAI,EAAE,MAAM;IAKxB,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;IAChB,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC;IAC1B,KAAK;CAGR;AAED,wBAAgB,oBAAoB,IAAI,QAAQ,CAE/C;AAED,qBAAa,KAAM,SAAQ,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC;gBAC5B,IAAI,EAAE,MAAM;IAKxB,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;IAChB,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC;IAC1B,KAAK;CAGR;AAED,wBAAgB,iBAAiB,IAAI,QAAQ,CAE5C;AAED,qBAAa,iBAAkB,SAAQ,KAAK,CAAC,CAAC,EAAE,mBAAmB,CAAC;gBACpD,IAAI,EAAE,MAAM;IAKxB,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;IAChB,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC;IAC1B,KAAK;CAGR;AAED,wBAAgB,6BAA6B,IAAI,QAAQ,CAExD"}
|
|
@@ -9,6 +9,12 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
+
get DbName () {
|
|
13
|
+
return DbName;
|
|
14
|
+
},
|
|
15
|
+
get DbName_$reflection () {
|
|
16
|
+
return DbName_$reflection;
|
|
17
|
+
},
|
|
12
18
|
get OrgId () {
|
|
13
19
|
return OrgId;
|
|
14
20
|
},
|
|
@@ -21,25 +27,19 @@ _export(exports, {
|
|
|
21
27
|
get PatientExternalId_$reflection () {
|
|
22
28
|
return PatientExternalId_$reflection;
|
|
23
29
|
},
|
|
24
|
-
get
|
|
25
|
-
return
|
|
26
|
-
},
|
|
27
|
-
get PlatformTenantId_$reflection () {
|
|
28
|
-
return PlatformTenantId_$reflection;
|
|
29
|
-
},
|
|
30
|
-
get SiteId () {
|
|
31
|
-
return SiteId;
|
|
30
|
+
get TenantId () {
|
|
31
|
+
return TenantId;
|
|
32
32
|
},
|
|
33
|
-
get
|
|
34
|
-
return
|
|
33
|
+
get TenantId_$reflection () {
|
|
34
|
+
return TenantId_$reflection;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
const _Types = require("@fable-org/fable-library-js/Types.js");
|
|
38
38
|
const _Reflection = require("@fable-org/fable-library-js/Reflection.js");
|
|
39
|
-
class
|
|
39
|
+
class DbName extends _Types.Union {
|
|
40
40
|
cases() {
|
|
41
41
|
return [
|
|
42
|
-
"
|
|
42
|
+
"DbName"
|
|
43
43
|
];
|
|
44
44
|
}
|
|
45
45
|
constructor(Item){
|
|
@@ -50,8 +50,8 @@ class SiteId extends _Types.Union {
|
|
|
50
50
|
];
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
return (0, _Reflection.union_type)("Vye.Contracts.Core.
|
|
53
|
+
function DbName_$reflection() {
|
|
54
|
+
return (0, _Reflection.union_type)("Vye.Contracts.Core.DbName", [], DbName, ()=>[
|
|
55
55
|
[
|
|
56
56
|
[
|
|
57
57
|
"Item",
|
|
@@ -60,10 +60,10 @@ function SiteId_$reflection() {
|
|
|
60
60
|
]
|
|
61
61
|
]);
|
|
62
62
|
}
|
|
63
|
-
class
|
|
63
|
+
class TenantId extends _Types.Union {
|
|
64
64
|
cases() {
|
|
65
65
|
return [
|
|
66
|
-
"
|
|
66
|
+
"TenantId"
|
|
67
67
|
];
|
|
68
68
|
}
|
|
69
69
|
constructor(Item){
|
|
@@ -74,8 +74,8 @@ class PlatformTenantId extends _Types.Union {
|
|
|
74
74
|
];
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
return (0, _Reflection.union_type)("Vye.Contracts.Core.
|
|
77
|
+
function TenantId_$reflection() {
|
|
78
|
+
return (0, _Reflection.union_type)("Vye.Contracts.Core.TenantId", [], TenantId, ()=>[
|
|
79
79
|
[
|
|
80
80
|
[
|
|
81
81
|
"Item",
|