@cosyte/synth 0.1.3 → 0.1.5
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/CHANGELOG.md +22 -0
- package/README.md +28 -24
- package/dist/astm/index.cjs +109 -84
- package/dist/astm/index.cjs.map +1 -1
- package/dist/astm/index.d.cts +4 -3
- package/dist/astm/index.d.ts +4 -3
- package/dist/astm/index.mjs +109 -84
- package/dist/astm/index.mjs.map +1 -1
- package/dist/ccda/index.cjs +24 -2
- package/dist/ccda/index.cjs.map +1 -1
- package/dist/ccda/index.d.cts +5 -4
- package/dist/ccda/index.d.ts +5 -4
- package/dist/ccda/index.mjs +24 -2
- package/dist/ccda/index.mjs.map +1 -1
- package/dist/deid/index.cjs +98 -47
- package/dist/deid/index.cjs.map +1 -1
- package/dist/deid/index.d.cts +4 -3
- package/dist/deid/index.d.ts +4 -3
- package/dist/deid/index.mjs +98 -47
- package/dist/deid/index.mjs.map +1 -1
- package/dist/{example-codes-88f3_bQZ.d.cts → example-codes-4RnyF7bV.d.cts} +2 -1
- package/dist/{example-codes-88f3_bQZ.d.ts → example-codes-4RnyF7bV.d.ts} +2 -1
- package/dist/fhir/index.cjs +33 -2
- package/dist/fhir/index.cjs.map +1 -1
- package/dist/fhir/index.d.cts +4 -3
- package/dist/fhir/index.d.ts +4 -3
- package/dist/fhir/index.mjs +33 -2
- package/dist/fhir/index.mjs.map +1 -1
- package/dist/hl7/index.cjs +33 -3
- package/dist/hl7/index.cjs.map +1 -1
- package/dist/hl7/index.d.cts +4 -3
- package/dist/hl7/index.d.ts +4 -3
- package/dist/hl7/index.mjs +33 -3
- package/dist/hl7/index.mjs.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -8
- package/dist/index.d.ts +13 -8
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/ncpdp/index.cjs +57 -14
- package/dist/ncpdp/index.cjs.map +1 -1
- package/dist/ncpdp/index.d.cts +3 -2
- package/dist/ncpdp/index.d.ts +3 -2
- package/dist/ncpdp/index.mjs +57 -14
- package/dist/ncpdp/index.mjs.map +1 -1
- package/dist/{providers-DcPrqmp5.d.cts → providers-B48qUwHU.d.cts} +2 -1
- package/dist/{providers-DcPrqmp5.d.ts → providers-B48qUwHU.d.ts} +2 -1
- package/dist/{quirk-DmqYw3Vk.d.ts → quirk-BCSs1jPt.d.cts} +3 -2
- package/dist/{quirk-CilFUhwX.d.cts → quirk-BfObsiWV.d.ts} +3 -2
- package/dist/x12/index.cjs +82 -33
- package/dist/x12/index.cjs.map +1 -1
- package/dist/x12/index.d.cts +3 -2
- package/dist/x12/index.d.ts +3 -2
- package/dist/x12/index.mjs +82 -33
- package/dist/x12/index.mjs.map +1 -1
- package/package.json +29 -31
|
@@ -102,4 +102,5 @@ declare const EXAMPLE_ENCOUNTER_TYPES: readonly CodeConcept[];
|
|
|
102
102
|
*/
|
|
103
103
|
declare const EXAMPLE_ENCOUNTER_CLASSES: readonly CodeConcept[];
|
|
104
104
|
|
|
105
|
-
export {
|
|
105
|
+
export { EXAMPLE_ALLERGENS as E, EXAMPLE_ALLERGY_MANIFESTATIONS as a, EXAMPLE_CONDITIONS as b, EXAMPLE_DIAGNOSTIC_REPORTS as c, EXAMPLE_ENCOUNTER_CLASSES as d, EXAMPLE_ENCOUNTER_TYPES as e, EXAMPLE_ETHNICITY_CATEGORIES as f, EXAMPLE_LAB_OBSERVATIONS as g, EXAMPLE_MEDICATIONS as h, EXAMPLE_PROCEDURES as i, EXAMPLE_RACE_CATEGORIES as j, EXAMPLE_VACCINES as k, EXAMPLE_VITAL_SIGNS as l };
|
|
106
|
+
export type { CodeConcept as C, QuantConcept as Q };
|
|
@@ -102,4 +102,5 @@ declare const EXAMPLE_ENCOUNTER_TYPES: readonly CodeConcept[];
|
|
|
102
102
|
*/
|
|
103
103
|
declare const EXAMPLE_ENCOUNTER_CLASSES: readonly CodeConcept[];
|
|
104
104
|
|
|
105
|
-
export {
|
|
105
|
+
export { EXAMPLE_ALLERGENS as E, EXAMPLE_ALLERGY_MANIFESTATIONS as a, EXAMPLE_CONDITIONS as b, EXAMPLE_DIAGNOSTIC_REPORTS as c, EXAMPLE_ENCOUNTER_CLASSES as d, EXAMPLE_ENCOUNTER_TYPES as e, EXAMPLE_ETHNICITY_CATEGORIES as f, EXAMPLE_LAB_OBSERVATIONS as g, EXAMPLE_MEDICATIONS as h, EXAMPLE_PROCEDURES as i, EXAMPLE_RACE_CATEGORIES as j, EXAMPLE_VACCINES as k, EXAMPLE_VITAL_SIGNS as l };
|
|
106
|
+
export type { CodeConcept as C, QuantConcept as Q };
|
package/dist/fhir/index.cjs
CHANGED
|
@@ -34,11 +34,42 @@ function sfc32Next(s) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
// src/codes.ts
|
|
37
|
-
var SYNTH_FATAL_CODES = {
|
|
37
|
+
var SYNTH_FATAL_CODES = Object.freeze({
|
|
38
|
+
/**
|
|
39
|
+
* A format was requested that this build cannot generate through a real parser builder/serializer.
|
|
40
|
+
* Fatal, never a hand-written byte fallback.
|
|
41
|
+
*
|
|
42
|
+
* **No code path in this build raises it.** All six formats generate, so it is reserved for a
|
|
43
|
+
* future format that does not, and is kept because removing a published code is a breaking change.
|
|
44
|
+
* An unsupported *kind* within a format that does generate is `SYNTH_UNSUPPORTED_KIND`.
|
|
45
|
+
*/
|
|
46
|
+
SYNTH_UNSUPPORTED_FORMAT: "SYNTH_UNSUPPORTED_FORMAT",
|
|
47
|
+
/**
|
|
48
|
+
* A vendor quirk was requested that the target format's profile system does not support. Fatal,
|
|
49
|
+
* never a silent no-op and never a fabricated quirk.
|
|
50
|
+
*/
|
|
51
|
+
SYNTH_UNSUPPORTED_QUIRK: "SYNTH_UNSUPPORTED_QUIRK",
|
|
52
|
+
/**
|
|
53
|
+
* A quirk transform found no structural anchor to mutate, so the fixture would not carry the
|
|
54
|
+
* deviation it is labelled with. Fatal: a golden file that lies about its parser verdict is worse
|
|
55
|
+
* than no golden file.
|
|
56
|
+
*/
|
|
57
|
+
SYNTH_QUIRK_ANCHOR_ABSENT: "SYNTH_QUIRK_ANCHOR_ABSENT",
|
|
58
|
+
/**
|
|
59
|
+
* A bare parse of a freshly-generated quirk artifact did not produce exactly the declared intended
|
|
60
|
+
* warning code(s). Fatal, never emit a mislabeled fixture.
|
|
61
|
+
*/
|
|
62
|
+
SYNTH_INTENDED_WARNING_MISMATCH: "SYNTH_INTENDED_WARNING_MISMATCH",
|
|
63
|
+
/** A concept's code-system URI has no OID mapping in the C-CDA example-code table. Fatal. */
|
|
64
|
+
SYNTH_UNMAPPED_CODE_SYSTEM: "SYNTH_UNMAPPED_CODE_SYSTEM",
|
|
65
|
+
/** A money value could not be read as an X12 decimal. Fatal: a generator never rounds to a float. */
|
|
66
|
+
SYNTH_INVALID_DECIMAL: "SYNTH_INVALID_DECIMAL",
|
|
38
67
|
/** An integer range was requested with its maximum below its minimum. Fatal. */
|
|
39
68
|
SYNTH_INVALID_RANGE: "SYNTH_INVALID_RANGE",
|
|
40
69
|
/** A value was drawn from an empty pool. Fatal, never a fabricated substitute. */
|
|
41
70
|
SYNTH_EMPTY_POOL: "SYNTH_EMPTY_POOL",
|
|
71
|
+
/** A `defineSynthProfile` spec was not usable (a missing or blank `name`). Fatal. */
|
|
72
|
+
SYNTH_INVALID_PROFILE: "SYNTH_INVALID_PROFILE",
|
|
42
73
|
/**
|
|
43
74
|
* A caller-supplied selector (a message kind, a document type, a corpus mix entry, a claim
|
|
44
75
|
* variant, a Bundle type, a resource profile) is not in the closed set that governs it. Fatal:
|
|
@@ -55,7 +86,7 @@ var SYNTH_FATAL_CODES = {
|
|
|
55
86
|
* mislabelled artifact is worse than no artifact.
|
|
56
87
|
*/
|
|
57
88
|
SYNTH_PROFILE_NOT_GENERATED: "SYNTH_PROFILE_NOT_GENERATED"
|
|
58
|
-
};
|
|
89
|
+
});
|
|
59
90
|
var SYNTH_FATAL_MESSAGES = Object.freeze({
|
|
60
91
|
SYNTH_UNSUPPORTED_FORMAT: "The requested format is not generable by this build. A generator has no byte fallback: it builds through a parser's own serializer or it refuses.",
|
|
61
92
|
SYNTH_UNSUPPORTED_QUIRK: "The requested vendor quirk is not in the target format's quirk registry. Compare the request against that format's exported registry (HL7_QUIRKS, CCDA_QUIRKS, ASTM_QUIRKS).",
|