@cosyte/synth 0.1.1 → 0.1.2
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 +21 -0
- package/LICENSE +1 -1
- package/README.md +9 -8
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- be69f2d: Generated C-CDA documents change: the parser peers are bounded to their 0.1 releases, and `@cosyte/ccda` 0.1 builds each CCD and Referral Note differently for the same seed.
|
|
8
|
+
|
|
9
|
+
Output change: every C-CDA document, for every seed, is now built by `@cosyte/ccda` 0.1, whose builder writes more of what C-CDA R2.1 asks for. Against the same seed on the previous release:
|
|
10
|
+
- the patient gains `raceCode` and `ethnicGroupCode` with `nullFlavor="UNK"`;
|
|
11
|
+
- the author gains a `representedOrganization`;
|
|
12
|
+
- a CCD gains a `documentationOf` service event, and a Referral Note an `informationRecipient`, each with unknown values;
|
|
13
|
+
- problem and allergy concern acts gain the `CONC` code;
|
|
14
|
+
- allergy reaction observations gain an `id`, which shifts the generated ids after them;
|
|
15
|
+
- the Medications section's templateIds move to the 2014-06-09 extension;
|
|
16
|
+
- the vital signs organizer is coded with LOINC 74728-7 instead of SNOMED CT 46680005;
|
|
17
|
+
- immunizations carry `negationInd="false"`;
|
|
18
|
+
- results organizers carry an `effectiveTime` interval with an unknown end;
|
|
19
|
+
- the Social History section moves earlier in the document.
|
|
20
|
+
A C-CDA golden file committed from an earlier release no longer matches and has to be regenerated. Every value stays synthetic. HL7 v2, FHIR R4 and US Core, X12, NCPDP, and ASTM documents are byte-identical for the seeds the determinism baseline records, and their committed golden files still match.
|
|
21
|
+
|
|
22
|
+
Peer ranges: `@cosyte/hl7`, `@cosyte/fhir`, `@cosyte/ccda`, `@cosyte/x12`, `@cosyte/ncpdp`, `@cosyte/astm` and `@cosyte/deid` move from `>=0.0.0` (or `>=0.0.1`) to `^0.1.0`, the releases this package is tested against. A project that pins one of them to a 0.0.x release has to move it to 0.1 to install this version.
|
|
23
|
+
|
|
3
24
|
## 0.1.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<a href="https://cosyte.com">
|
|
2
2
|
<picture>
|
|
3
3
|
<source media="(prefers-color-scheme: dark)" srcset="https://cosyte.com/tile/cosyte-lockup-tile-on-dark-1200x300.png">
|
|
4
|
-
<img alt="Cosyte
|
|
4
|
+
<img alt="The Cosyte logo on its own white ground: the icon beside the word Cosyte." src="https://cosyte.com/tile/cosyte-lockup-tile-on-light-1200x300.png">
|
|
5
5
|
</picture>
|
|
6
6
|
</a>
|
|
7
7
|
|
|
8
8
|
# @cosyte/synth
|
|
9
9
|
|
|
10
|
-
>
|
|
11
|
-
> built through each parser's own builder, and **never real PHI**.
|
|
10
|
+
> Seeded, reproducible **synthetic healthcare fixtures** for Node.js and TypeScript: spec-clean, never real PHI.
|
|
12
11
|
|
|
13
12
|
`@cosyte/synth` generates reproducible synthetic test corpora across the six Cosyte formats (HL7 v2,
|
|
14
13
|
FHIR R4 / US Core, C-CDA, X12, NCPDP, and ASTM). It is a **consumer** of the
|
|
@@ -18,8 +17,8 @@ date, phone, and address from a **guaranteed-non-colliding synthetic source**. I
|
|
|
18
17
|
**format/conformance generator, not a clinical simulator**: it does not model disease progression
|
|
19
18
|
(that is Synthea).
|
|
20
19
|
|
|
21
|
-
> **Status:**
|
|
22
|
-
> live; this page never repeats it. Below 1.0, a breaking change raises the minor version and the
|
|
20
|
+
> **Status:** the 0.1 line, published to npm. The version shown on the npm package page is the one
|
|
21
|
+
> that is live; this page never repeats it. Below 1.0, a breaking change raises the minor version and the
|
|
23
22
|
> changelog says what broke. The generator is **feature-complete**: the
|
|
24
23
|
> seeded-PRNG core, the synthetic-safety providers, and the round-trip harness; **generation across all
|
|
25
24
|
> six formats**, HL7 v2 (`ADT`/`ORU`/`ORM`/`SIU`/`VXU`), FHIR R4 / US Core (the full clinical
|
|
@@ -42,6 +41,8 @@ date, phone, and address from a **guaranteed-non-colliding synthetic source**. I
|
|
|
42
41
|
npm install @cosyte/synth @cosyte/hl7 @cosyte/fhir @cosyte/ccda @cosyte/x12 @cosyte/ncpdp @cosyte/astm
|
|
43
42
|
```
|
|
44
43
|
|
|
44
|
+
Node.js 22 or later, tested on 22 and 24.
|
|
45
|
+
|
|
45
46
|
`@cosyte/hl7`, `@cosyte/fhir`, `@cosyte/ccda`, `@cosyte/x12`, `@cosyte/ncpdp`, `@cosyte/astm`, and
|
|
46
47
|
`@cosyte/deid` are **optional peer dependencies**, each needed only for its subpath (`@cosyte/synth/hl7`,
|
|
47
48
|
`@cosyte/synth/fhir`, `@cosyte/synth/ccda`, `@cosyte/synth/x12`, `@cosyte/synth/ncpdp`,
|
|
@@ -164,7 +165,7 @@ corpus.artifacts.every((a) => a.warnings.length === 0); // true
|
|
|
164
165
|
|
|
165
166
|
`@cosyte/x12` is an **optional peer dependency**, needed only for the `@cosyte/synth/x12` subpath.
|
|
166
167
|
|
|
167
|
-
**Deferred:** the **270** eligibility _request_ (`@cosyte/x12` ships `build270`
|
|
168
|
+
**Deferred:** the **270** eligibility _request_ (`@cosyte/x12` ships `build270` on its 0.1 line, but `synth`
|
|
168
169
|
does not generate a 270 yet) and **vendor-quirk mode**.
|
|
169
170
|
|
|
170
171
|
## Generate an NCPDP message
|
|
@@ -265,7 +266,7 @@ astmQuirkRoundTrip(generateAstmQuirk({ seed: 1, quirk: "unknown-escape" })).inte
|
|
|
265
266
|
A quirk a format's profile system does not support fails closed with a stable `SYNTH_UNSUPPORTED_QUIRK`
|
|
266
267
|
diagnostic, never a silently-wrong fixture, and so do the other selectors: a message kind, a
|
|
267
268
|
document type, a corpus mix entry, an `837` variant, a Bundle type. Each is checked against its own set
|
|
268
|
-
before anything is generated, so an
|
|
269
|
+
before anything is generated, so an unrecognized one is a fatal `SYNTH_UNSUPPORTED_KIND` rather than a
|
|
269
270
|
mislabelled corpus. Every refusal carries a code and a fixed message from a frozen table, and quotes
|
|
270
271
|
nothing you passed. Every quirk is grounded in a **publicly-documented** deviation or a parser's
|
|
271
272
|
**public** profile, never a private vendor corpus.
|
|
@@ -342,4 +343,4 @@ isSyntheticNpi(safe.npi(rng)); // true, always a deliberately-invalid-Luhn NPI (
|
|
|
342
343
|
|
|
343
344
|
## License
|
|
344
345
|
|
|
345
|
-
MIT
|
|
346
|
+
MIT, copyright Cosyte LLC. See [LICENSE](https://github.com/cosyte/synth/blob/main/LICENSE).
|
package/dist/index.cjs
CHANGED