@cosyte/synth 0.0.7 → 0.0.9
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 +149 -17
- package/README.md +47 -45
- package/dist/astm/index.cjs +7 -7
- package/dist/astm/index.cjs.map +1 -1
- package/dist/astm/index.d.cts +47 -47
- package/dist/astm/index.d.ts +47 -47
- package/dist/astm/index.mjs +7 -7
- package/dist/astm/index.mjs.map +1 -1
- package/dist/ccda/index.cjs +15 -15
- package/dist/ccda/index.cjs.map +1 -1
- package/dist/ccda/index.d.cts +31 -31
- package/dist/ccda/index.d.ts +31 -31
- package/dist/ccda/index.mjs +15 -15
- package/dist/ccda/index.mjs.map +1 -1
- package/dist/deid/index.cjs +15 -15
- package/dist/deid/index.cjs.map +1 -1
- package/dist/deid/index.d.cts +37 -37
- package/dist/deid/index.d.ts +37 -37
- package/dist/deid/index.mjs +15 -15
- package/dist/deid/index.mjs.map +1 -1
- package/dist/{example-codes-DeXcnCSK.d.cts → example-codes-88f3_bQZ.d.cts} +8 -8
- package/dist/{example-codes-DeXcnCSK.d.ts → example-codes-88f3_bQZ.d.ts} +8 -8
- package/dist/fhir/index.cjs +12 -12
- package/dist/fhir/index.cjs.map +1 -1
- package/dist/fhir/index.d.cts +46 -46
- package/dist/fhir/index.d.ts +46 -46
- package/dist/fhir/index.mjs +12 -12
- package/dist/fhir/index.mjs.map +1 -1
- package/dist/hl7/index.cjs +6 -6
- package/dist/hl7/index.cjs.map +1 -1
- package/dist/hl7/index.d.cts +45 -45
- package/dist/hl7/index.d.ts +45 -45
- package/dist/hl7/index.mjs +6 -6
- package/dist/hl7/index.mjs.map +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -49
- package/dist/index.d.ts +49 -49
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +1 -1
- package/dist/ncpdp/index.cjs +3 -3
- package/dist/ncpdp/index.cjs.map +1 -1
- package/dist/ncpdp/index.d.cts +42 -42
- package/dist/ncpdp/index.d.ts +42 -42
- package/dist/ncpdp/index.mjs +3 -3
- package/dist/ncpdp/index.mjs.map +1 -1
- package/dist/{providers-OLz3zAc-.d.cts → providers-B9uVinAe.d.cts} +24 -24
- package/dist/{providers-OLz3zAc-.d.ts → providers-B9uVinAe.d.ts} +24 -24
- package/dist/{quirk-C9t9CkPS.d.ts → quirk-HZdznAkM.d.ts} +23 -23
- package/dist/{quirk-DYMDojVw.d.cts → quirk-IaHp4z7N.d.cts} +23 -23
- package/dist/x12/index.cjs +6 -6
- package/dist/x12/index.cjs.map +1 -1
- package/dist/x12/index.d.cts +44 -44
- package/dist/x12/index.d.ts +44 -44
- package/dist/x12/index.mjs +6 -6
- package/dist/x12/index.mjs.map +1 -1
- package/package.json +3 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A tiny, curated, **license-clean** pool of example codes for filling coded fields in generated FHIR
|
|
3
3
|
* resources (`Observation.code`, `Condition.code`, `MedicationRequest.medication[x]`, and the OMB
|
|
4
|
-
* race/ethnicity categories). These are **public code facts
|
|
5
|
-
* and US Core specification examples
|
|
4
|
+
* race/ethnicity categories). These are **public code facts**: codes drawn from the published FHIR R4
|
|
5
|
+
* and US Core specification examples, not copyrighted terminology tables: `@cosyte/synth` bundles
|
|
6
6
|
* **no** SNOMED/LOINC/RxNorm content. The pool exists only so a
|
|
7
7
|
* generated resource is *structurally* realistic; a consumer who needs their own codes supplies them.
|
|
8
8
|
*
|
|
9
|
-
* Nothing here is PHI
|
|
9
|
+
* Nothing here is PHI: codes and their display text are not patient identifiers. The synthetic-safety
|
|
10
10
|
* invariant governs identity fields (name/DOB/identifier/telecom/address), which come from `../safe`.
|
|
11
11
|
*
|
|
12
12
|
* @module
|
|
@@ -22,7 +22,7 @@ interface CodeConcept {
|
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* A quantitative observation concept: a LOINC code plus the UCUM unit and a plausible synthetic value
|
|
25
|
-
* range the seeded generator draws within. The range implies **no** real measurement
|
|
25
|
+
* range the seeded generator draws within. The range implies **no** real measurement: it only keeps a
|
|
26
26
|
* generated result inside a structurally-sane band.
|
|
27
27
|
*/
|
|
28
28
|
interface QuantConcept extends CodeConcept {
|
|
@@ -42,7 +42,7 @@ interface QuantConcept extends CodeConcept {
|
|
|
42
42
|
declare const EXAMPLE_LAB_OBSERVATIONS: readonly QuantConcept[];
|
|
43
43
|
/**
|
|
44
44
|
* LOINC vital-sign example codes (for a US Core Vital Signs `Observation`). Public LOINC identifiers
|
|
45
|
-
* with their required UCUM units and synthetic value bands. Simple single-value vitals only
|
|
45
|
+
* with their required UCUM units and synthetic value bands. Simple single-value vitals only:
|
|
46
46
|
* multi-component vitals (e.g. blood-pressure panel `85354-9`) are not generated.
|
|
47
47
|
*/
|
|
48
48
|
declare const EXAMPLE_VITAL_SIGNS: readonly QuantConcept[];
|
|
@@ -57,12 +57,12 @@ declare const EXAMPLE_CONDITIONS: readonly CodeConcept[];
|
|
|
57
57
|
*/
|
|
58
58
|
declare const EXAMPLE_MEDICATIONS: readonly CodeConcept[];
|
|
59
59
|
/**
|
|
60
|
-
* OMB race categories (US Core `us-core-race` `ombCategory`)
|
|
60
|
+
* OMB race categories (US Core `us-core-race` `ombCategory`): the five OMB categories, public code
|
|
61
61
|
* facts from the CDC Race & Ethnicity code system (`urn:oid:2.16.840.1.113883.6.238`).
|
|
62
62
|
*/
|
|
63
63
|
declare const EXAMPLE_RACE_CATEGORIES: readonly CodeConcept[];
|
|
64
64
|
/**
|
|
65
|
-
* OMB ethnicity categories (US Core `us-core-ethnicity` `ombCategory`)
|
|
65
|
+
* OMB ethnicity categories (US Core `us-core-ethnicity` `ombCategory`): the two OMB categories, public
|
|
66
66
|
* code facts from the CDC Race & Ethnicity code system.
|
|
67
67
|
*/
|
|
68
68
|
declare const EXAMPLE_ETHNICITY_CATEGORIES: readonly CodeConcept[];
|
|
@@ -83,7 +83,7 @@ declare const EXAMPLE_ALLERGENS: readonly CodeConcept[];
|
|
|
83
83
|
declare const EXAMPLE_ALLERGY_MANIFESTATIONS: readonly CodeConcept[];
|
|
84
84
|
/**
|
|
85
85
|
* SNOMED CT procedure example codes (for a US Core `Procedure.code`). Public SNOMED identifiers used as
|
|
86
|
-
* structural fillers
|
|
86
|
+
* structural fillers, **not** CPT (which is never bundled).
|
|
87
87
|
*/
|
|
88
88
|
declare const EXAMPLE_PROCEDURES: readonly CodeConcept[];
|
|
89
89
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A tiny, curated, **license-clean** pool of example codes for filling coded fields in generated FHIR
|
|
3
3
|
* resources (`Observation.code`, `Condition.code`, `MedicationRequest.medication[x]`, and the OMB
|
|
4
|
-
* race/ethnicity categories). These are **public code facts
|
|
5
|
-
* and US Core specification examples
|
|
4
|
+
* race/ethnicity categories). These are **public code facts**: codes drawn from the published FHIR R4
|
|
5
|
+
* and US Core specification examples, not copyrighted terminology tables: `@cosyte/synth` bundles
|
|
6
6
|
* **no** SNOMED/LOINC/RxNorm content. The pool exists only so a
|
|
7
7
|
* generated resource is *structurally* realistic; a consumer who needs their own codes supplies them.
|
|
8
8
|
*
|
|
9
|
-
* Nothing here is PHI
|
|
9
|
+
* Nothing here is PHI: codes and their display text are not patient identifiers. The synthetic-safety
|
|
10
10
|
* invariant governs identity fields (name/DOB/identifier/telecom/address), which come from `../safe`.
|
|
11
11
|
*
|
|
12
12
|
* @module
|
|
@@ -22,7 +22,7 @@ interface CodeConcept {
|
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* A quantitative observation concept: a LOINC code plus the UCUM unit and a plausible synthetic value
|
|
25
|
-
* range the seeded generator draws within. The range implies **no** real measurement
|
|
25
|
+
* range the seeded generator draws within. The range implies **no** real measurement: it only keeps a
|
|
26
26
|
* generated result inside a structurally-sane band.
|
|
27
27
|
*/
|
|
28
28
|
interface QuantConcept extends CodeConcept {
|
|
@@ -42,7 +42,7 @@ interface QuantConcept extends CodeConcept {
|
|
|
42
42
|
declare const EXAMPLE_LAB_OBSERVATIONS: readonly QuantConcept[];
|
|
43
43
|
/**
|
|
44
44
|
* LOINC vital-sign example codes (for a US Core Vital Signs `Observation`). Public LOINC identifiers
|
|
45
|
-
* with their required UCUM units and synthetic value bands. Simple single-value vitals only
|
|
45
|
+
* with their required UCUM units and synthetic value bands. Simple single-value vitals only:
|
|
46
46
|
* multi-component vitals (e.g. blood-pressure panel `85354-9`) are not generated.
|
|
47
47
|
*/
|
|
48
48
|
declare const EXAMPLE_VITAL_SIGNS: readonly QuantConcept[];
|
|
@@ -57,12 +57,12 @@ declare const EXAMPLE_CONDITIONS: readonly CodeConcept[];
|
|
|
57
57
|
*/
|
|
58
58
|
declare const EXAMPLE_MEDICATIONS: readonly CodeConcept[];
|
|
59
59
|
/**
|
|
60
|
-
* OMB race categories (US Core `us-core-race` `ombCategory`)
|
|
60
|
+
* OMB race categories (US Core `us-core-race` `ombCategory`): the five OMB categories, public code
|
|
61
61
|
* facts from the CDC Race & Ethnicity code system (`urn:oid:2.16.840.1.113883.6.238`).
|
|
62
62
|
*/
|
|
63
63
|
declare const EXAMPLE_RACE_CATEGORIES: readonly CodeConcept[];
|
|
64
64
|
/**
|
|
65
|
-
* OMB ethnicity categories (US Core `us-core-ethnicity` `ombCategory`)
|
|
65
|
+
* OMB ethnicity categories (US Core `us-core-ethnicity` `ombCategory`): the two OMB categories, public
|
|
66
66
|
* code facts from the CDC Race & Ethnicity code system.
|
|
67
67
|
*/
|
|
68
68
|
declare const EXAMPLE_ETHNICITY_CATEGORIES: readonly CodeConcept[];
|
|
@@ -83,7 +83,7 @@ declare const EXAMPLE_ALLERGENS: readonly CodeConcept[];
|
|
|
83
83
|
declare const EXAMPLE_ALLERGY_MANIFESTATIONS: readonly CodeConcept[];
|
|
84
84
|
/**
|
|
85
85
|
* SNOMED CT procedure example codes (for a US Core `Procedure.code`). Public SNOMED identifiers used as
|
|
86
|
-
* structural fillers
|
|
86
|
+
* structural fillers, **not** CPT (which is never bundled).
|
|
87
87
|
*/
|
|
88
88
|
declare const EXAMPLE_PROCEDURES: readonly CodeConcept[];
|
|
89
89
|
/**
|
package/dist/fhir/index.cjs
CHANGED
|
@@ -37,11 +37,11 @@ function sfc32Next(s) {
|
|
|
37
37
|
var SYNTH_FATAL_CODES = {
|
|
38
38
|
/** An integer range was requested with its maximum below its minimum. Fatal. */
|
|
39
39
|
SYNTH_INVALID_RANGE: "SYNTH_INVALID_RANGE",
|
|
40
|
-
/** A value was drawn from an empty pool. Fatal
|
|
40
|
+
/** A value was drawn from an empty pool. Fatal, never a fabricated substitute. */
|
|
41
41
|
SYNTH_EMPTY_POOL: "SYNTH_EMPTY_POOL",
|
|
42
42
|
/**
|
|
43
43
|
* A caller-supplied selector (a message kind, a document type, a corpus mix entry, a claim
|
|
44
|
-
* variant, a Bundle type, a resource profile) is not in the closed set that governs it. Fatal
|
|
44
|
+
* variant, a Bundle type, a resource profile) is not in the closed set that governs it. Fatal:
|
|
45
45
|
* see `resolveKind`: a selector union is erased at run time, and a selector that falls through
|
|
46
46
|
* either mislabels the fixture or hands the value to a peer builder that quotes it back.
|
|
47
47
|
*/
|
|
@@ -114,7 +114,7 @@ function createRng(seed) {
|
|
|
114
114
|
var SYNTHETIC_ASSIGNING_AUTHORITY = Object.freeze({
|
|
115
115
|
/** The human-readable assigning-authority namespace id (HL7 HD.1). */
|
|
116
116
|
namespaceId: "COSYTE-SYNTH",
|
|
117
|
-
/** The universal id
|
|
117
|
+
/** The universal id, an OID under HL7's example arc `2.16.840.1.113883.19` (HD.2). */
|
|
118
118
|
universalId: "2.16.840.1.113883.19.999",
|
|
119
119
|
/** The universal id type (HD.3). */
|
|
120
120
|
universalIdType: "ISO"
|
|
@@ -423,23 +423,23 @@ var SYSTEM = Object.freeze({
|
|
|
423
423
|
IDENTIFIER_TYPE: "http://terminology.hl7.org/CodeSystem/v2-0203",
|
|
424
424
|
/** OMB race & ethnicity category system (US Core race/ethnicity `ombCategory`). */
|
|
425
425
|
OMB_RACE_ETHNICITY: "urn:oid:2.16.840.1.113883.6.238",
|
|
426
|
-
/** LOINC
|
|
426
|
+
/** LOINC, `Observation.code` (lab + vital-signs). */
|
|
427
427
|
LOINC: "http://loinc.org",
|
|
428
|
-
/** SNOMED CT
|
|
428
|
+
/** SNOMED CT, `Condition.code`. */
|
|
429
429
|
SNOMED: "http://snomed.info/sct",
|
|
430
|
-
/** RxNorm
|
|
430
|
+
/** RxNorm, `MedicationRequest.medicationCodeableConcept` + an allergen substance. */
|
|
431
431
|
RXNORM: "http://www.nlm.nih.gov/research/umls/rxnorm",
|
|
432
|
-
/** UCUM
|
|
432
|
+
/** UCUM, `Quantity.system` for units of measure. */
|
|
433
433
|
UCUM: "http://unitsofmeasure.org",
|
|
434
|
-
/** CVX (CDC vaccine administered)
|
|
434
|
+
/** CVX (CDC vaccine administered), `Immunization.vaccineCode`. */
|
|
435
435
|
CVX: "http://hl7.org/fhir/sid/cvx",
|
|
436
|
-
/** HL7 v3 `ActCode
|
|
436
|
+
/** HL7 v3 `ActCode`, `Encounter.class`. */
|
|
437
437
|
V3_ACT_CODE: "http://terminology.hl7.org/CodeSystem/v3-ActCode",
|
|
438
|
-
/** HL7 v2 `0074` diagnostic-service-section
|
|
438
|
+
/** HL7 v2 `0074` diagnostic-service-section, `DiagnosticReport.category` (`LAB`). */
|
|
439
439
|
DIAGNOSTIC_SERVICE_SECTION: "http://terminology.hl7.org/CodeSystem/v2-0074",
|
|
440
|
-
/** HL7 Terminology `allergyintolerance-clinical
|
|
440
|
+
/** HL7 Terminology `allergyintolerance-clinical`, `AllergyIntolerance.clinicalStatus`. */
|
|
441
441
|
ALLERGY_CLINICAL: "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
|
|
442
|
-
/** HL7 Terminology `allergyintolerance-verification
|
|
442
|
+
/** HL7 Terminology `allergyintolerance-verification`, `AllergyIntolerance.verificationStatus`. */
|
|
443
443
|
ALLERGY_VERIFICATION: "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
|
|
444
444
|
});
|
|
445
445
|
|