@cosyte/synth 0.1.0 → 0.1.1

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +10 -2
  2. package/README.md +19 -19
  3. package/dist/astm/index.cjs.map +1 -1
  4. package/dist/astm/index.d.cts +6 -6
  5. package/dist/astm/index.d.ts +6 -6
  6. package/dist/astm/index.mjs.map +1 -1
  7. package/dist/ccda/index.cjs.map +1 -1
  8. package/dist/ccda/index.d.cts +2 -2
  9. package/dist/ccda/index.d.ts +2 -2
  10. package/dist/ccda/index.mjs.map +1 -1
  11. package/dist/deid/index.cjs.map +1 -1
  12. package/dist/deid/index.d.cts +3 -3
  13. package/dist/deid/index.d.ts +3 -3
  14. package/dist/deid/index.mjs.map +1 -1
  15. package/dist/fhir/index.cjs.map +1 -1
  16. package/dist/fhir/index.d.cts +1 -1
  17. package/dist/fhir/index.d.ts +1 -1
  18. package/dist/fhir/index.mjs.map +1 -1
  19. package/dist/hl7/index.cjs.map +1 -1
  20. package/dist/hl7/index.d.cts +3 -3
  21. package/dist/hl7/index.d.ts +3 -3
  22. package/dist/hl7/index.mjs.map +1 -1
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +5 -5
  26. package/dist/index.d.ts +5 -5
  27. package/dist/index.mjs +1 -1
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/ncpdp/index.cjs.map +1 -1
  30. package/dist/ncpdp/index.d.cts +2 -2
  31. package/dist/ncpdp/index.d.ts +2 -2
  32. package/dist/ncpdp/index.mjs.map +1 -1
  33. package/dist/{providers-BQtPk3PN.d.cts → providers-DcPrqmp5.d.cts} +2 -2
  34. package/dist/{providers-BQtPk3PN.d.ts → providers-DcPrqmp5.d.ts} +2 -2
  35. package/dist/{quirk-C_lZrspq.d.cts → quirk-CilFUhwX.d.cts} +1 -1
  36. package/dist/{quirk-Bzx9g8KG.d.ts → quirk-DmqYw3Vk.d.ts} +1 -1
  37. package/dist/x12/index.cjs.map +1 -1
  38. package/dist/x12/index.d.cts +3 -3
  39. package/dist/x12/index.d.ts +3 -3
  40. package/dist/x12/index.mjs.map +1 -1
  41. package/package.json +33 -43
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 5dcf91e: Doc comments that ship in the type declarations now write a range with "to" instead of an en dash, for example "the `0` to `7` frame number" and "a seeded 1 to 4".
8
+
9
+ No generated value, export, warning code or seed mapping changes. The README and the documentation pages get the same edit, and the repository's dash check now refuses the en dash, literal or encoded, as it already refused the em dash.
10
+
3
11
  ## 0.1.0
4
12
 
5
13
  ### Minor Changes
@@ -164,7 +172,7 @@
164
172
  to write it in the changeset. No runtime code, no public API, no warning code, no generated byte and
165
173
  no synthetic-safety behaviour changed.
166
174
 
167
- - da7cbdb: The package description, the README, the documentation pages and the exported quirk-registry prose no longer use the em dash, matching the cosyte house voice.
175
+ - da7cbdb: The package description, the README, the documentation pages and the exported quirk-registry prose no longer use the em dash, matching the Cosyte house voice.
168
176
 
169
177
  **Nothing about generation changed.** No export was added, removed or renamed, no warning or fatal
170
178
  code moved, and a given seed still produces byte-identical output for every format. The rewrite is
@@ -681,7 +689,7 @@ changesets that release consumed. This package is on the pre-alpha `0.0.x` ladde
681
689
  used to quote were quirk names, format labels, code-system URIs and money strings. What was wrong
682
690
  was the _shape_: every fatal took a value parameter, and the only thing keeping PHI out of a
683
691
  diagnostic was that callers happened to be passing harmless values. The audit of the thirteen
684
- cosyte repos found that the single property separating the packages that leak from the ones that
692
+ Cosyte repos found that the single property separating the packages that leak from the ones that
685
693
  are genuinely prevented is exactly this: whether the message factory takes a value parameter at
686
694
  all. It now does not.
687
695
 
package/README.md CHANGED
@@ -8,12 +8,12 @@
8
8
  # @cosyte/synth
9
9
 
10
10
  > Deterministic, seedable **synthetic healthcare-fixture generator** for Node.js and TypeScript:
11
- > spec-clean by construction, and **never real PHI**.
11
+ > built through each parser's own builder, and **never real PHI**.
12
12
 
13
- `@cosyte/synth` generates reproducible synthetic test corpora across the six cosyte formats (HL7 v2,
13
+ `@cosyte/synth` generates reproducible synthetic test corpora across the six Cosyte formats (HL7 v2,
14
14
  FHIR R4 / US Core, C-CDA, X12, NCPDP, and ASTM). It is a **consumer** of the
15
- cosyte parsers, not a parser: it builds each artifact **through the parser's own builder/serializer**
16
- (so the output is spec-clean by the same mechanism the parser proves) and draws every identifier, name,
15
+ Cosyte parsers, not a parser: it builds each artifact **through the parser's own builder/serializer**
16
+ (so each artifact re-parses through that parser with zero warnings) and draws every identifier, name,
17
17
  date, phone, and address from a **guaranteed-non-colliding synthetic source**. It is a
18
18
  **format/conformance generator, not a clinical simulator**: it does not model disease progression
19
19
  (that is Synthea).
@@ -21,8 +21,8 @@ date, phone, and address from a **guaranteed-non-colliding synthetic source**. I
21
21
  > **Status:** `0.1`, published to npm. The version shown on the npm package page is the one that is
22
22
  > live; this page never repeats it. Below 1.0, a breaking change raises the minor version and the
23
23
  > changelog says what broke. The generator is **feature-complete**: the
24
- > seeded-PRNG core, the synthetic-safety providers, and the round-trip harness; **spec-clean generation
25
- > across all six formats**, HL7 v2 (`ADT`/`ORU`/`ORM`/`SIU`/`VXU`), FHIR R4 / US Core (the full clinical
24
+ > seeded-PRNG core, the synthetic-safety providers, and the round-trip harness; **generation across all
25
+ > six formats**, HL7 v2 (`ADT`/`ORU`/`ORM`/`SIU`/`VXU`), FHIR R4 / US Core (the full clinical
26
26
  > set + `collection`/`transaction`/`document` Bundles), C-CDA R2.1 (CCD + Referral Note), X12 005010
27
27
  > (837P/I/D, 835, 271), NCPDP (SCRIPT NewRx / RxRenewal / RxChange + Telecom B1/B2/B3), and ASTM (E1394
28
28
  > record reports + E1381 framing), each built **through its parser's own builder/serializer**; **vendor-quirk
@@ -136,7 +136,7 @@ corpus.artifacts.every((a) => a.warnings.length === 0); // true, all spec-clean
136
136
 
137
137
  `@cosyte/ccda` is an **optional peer dependency**, needed only for the `@cosyte/synth/ccda` subpath.
138
138
 
139
- ## Generate a spec-clean X12 transaction
139
+ ## Generate an X12 transaction
140
140
 
141
141
  The `@cosyte/synth/x12` subpath builds HIPAA **005010** transactions **through `@cosyte/x12`'s domain
142
142
  builders** (`build837P/I/D`, `build835`, `build271`), so the ISA/GS/ST…SE/GE/IEA envelope, the
@@ -159,15 +159,15 @@ roundTrip(generate271({ seed: 3 })).specClean; // true
159
159
 
160
160
  // Or a reproducible mixed corpus (837P/I/D + 835 + 271):
161
161
  const corpus = x12Corpus({ seed: 42 });
162
- corpus.artifacts.every((a) => a.warnings.length === 0); // true, all spec-clean
162
+ corpus.artifacts.every((a) => a.warnings.length === 0); // true
163
163
  ```
164
164
 
165
165
  `@cosyte/x12` is an **optional peer dependency**, needed only for the `@cosyte/synth/x12` subpath.
166
166
 
167
- **Deferred:** the **270** eligibility _request_ (`@cosyte/x12` ships a `build271` but no `build270`, and
168
- `synth` never hand-writes bytes around a missing builder) and **vendor-quirk mode**.
167
+ **Deferred:** the **270** eligibility _request_ (`@cosyte/x12` ships `build270` from 0.1.0, but `synth`
168
+ does not generate a 270 yet) and **vendor-quirk mode**.
169
169
 
170
- ## Generate a spec-clean NCPDP message
170
+ ## Generate an NCPDP message
171
171
 
172
172
  The `@cosyte/synth/ncpdp` subpath builds both NCPDP standards **through `@cosyte/ncpdp`'s own emit
173
173
  surface**, so each message round-trips through the parser with **zero warnings**. It emits **SCRIPT**
@@ -193,7 +193,7 @@ telecomRoundTrip(generateB1({ seed: 777 })).specClean; // true
193
193
 
194
194
  // Or a reproducible mixed corpus (NewRx + RxRenewal + RxChange + B1 + B2 + B3):
195
195
  const corpus = ncpdpCorpus({ seed: 42 });
196
- corpus.artifacts.every((a) => a.warnings.length === 0); // true, all spec-clean
196
+ corpus.artifacts.every((a) => a.warnings.length === 0); // true
197
197
  ```
198
198
 
199
199
  `@cosyte/ncpdp` is an **optional peer dependency**, needed only for the `@cosyte/synth/ncpdp` subpath.
@@ -201,7 +201,7 @@ corpus.artifacts.every((a) => a.warnings.length === 0); // true, all spec-clean
201
201
  **Deferred:** vendor-quirk mode. SCRIPT coverage tracks the parser's builder surface: the
202
202
  renewal/change _responses_ land as `@cosyte/ncpdp` grows builders.
203
203
 
204
- ## Generate a spec-clean ASTM message
204
+ ## Generate an ASTM message
205
205
 
206
206
  The `@cosyte/synth/astm` subpath builds ASTM laboratory messages **through `@cosyte/astm`'s own emit
207
207
  surface**: `buildAstmMessage` for the E1394 record layer, `composeAstmFrames` for the E1381 frame
@@ -224,12 +224,12 @@ import {
224
224
  // (so they stay DISTINCT, exactly as @cosyte/astm keeps them on parse).
225
225
  astmRoundTrip(generateAstmResult({ seed: 12345 })).specClean; // true, zero warnings, byte-stable
226
226
 
227
- // The E1381-framed twin: the modulo-256 checksum and 0–7 frame numbers are computed by @cosyte/astm.
227
+ // The E1381-framed twin: the modulo-256 checksum and 0 to 7 frame numbers are computed by @cosyte/astm.
228
228
  astmFramedRoundTrip(generateAstmResultFramed({ seed: 12345 })).specClean; // true
229
229
 
230
230
  // Or a reproducible mixed corpus (a result report + an order):
231
231
  const corpus = astmCorpus({ seed: 42 });
232
- corpus.artifacts.every((a) => a.warnings.length === 0); // true, all spec-clean
232
+ corpus.artifacts.every((a) => a.warnings.length === 0); // true
233
233
  ```
234
234
 
235
235
  `@cosyte/astm` is an **optional peer dependency**, needed only for the `@cosyte/synth/astm` subpath.
@@ -276,7 +276,7 @@ vendor-attributed corpus** to ground.
276
276
  ## Co-validate with `@cosyte/deid` (the pairing loop)
277
277
 
278
278
  The `@cosyte/synth/deid` subpath is a deterministic **closed-loop co-validation harness** for the
279
- `synth` ⇄ `deid` pair: it **generates** a spec-clean artifact, **plants** distinctive synthetic PHI
279
+ `synth` ⇄ `deid` pair: it **generates** an artifact, **plants** distinctive synthetic PHI
280
280
  sentinels at the patient loci, **de-identifies** it through `@cosyte/deid`, and **verifies** every
281
281
  sentinel is gone from the output (a surviving sentinel is a hard failure) while the clinical payload
282
282
  survives (the over-scrub guard).
@@ -332,12 +332,12 @@ isSyntheticNpi(safe.npi(rng)); // true, always a deliberately-invalid-Luhn NPI (
332
332
  phones, RFC 2606/6761 `example.*` domains, RFC 5737/3849 TEST-NET IPs, a synthetic assigning
333
333
  authority for MRNs). A CI gate proves it.
334
334
  **No generated value can be real or plausibly-real PHI.**
335
- - **Spec-clean by the parser's own judgment**, built through the parser's conservative serializer, and
336
- checked by feeding the artifact straight back in: a spec-clean artifact re-parses with zero warnings.
335
+ - **Checked by the parser's own judgment**, built through the parser's conservative serializer and
336
+ fed straight back in: each artifact re-parses with zero warnings.
337
337
  - **Deterministic**, a hand-rolled seeded PRNG (`sfc32`/`splitmix32`); `Math.random` is lint-banned.
338
338
  A seed, and only the seed, determines the output, byte-for-byte, anywhere.
339
339
  - **Immutable**, generated artifacts and the `Corpus` result are deep-frozen.
340
- - **Zero third-party runtime dependencies**, the parser peers are first-party cosyte packages,
340
+ - **Zero third-party runtime dependencies**, the parser peers are first-party Cosyte packages,
341
341
  vendored for dev/test; dual ESM + CJS, validated with `attw`.
342
342
 
343
343
  ## License