@cosyte/synth 0.0.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.
- package/CHANGELOG.md +414 -0
- package/LICENSE +21 -0
- package/README.md +325 -0
- package/dist/astm/index.cjs +847 -0
- package/dist/astm/index.cjs.map +1 -0
- package/dist/astm/index.d.cts +418 -0
- package/dist/astm/index.d.ts +418 -0
- package/dist/astm/index.mjs +828 -0
- package/dist/astm/index.mjs.map +1 -0
- package/dist/ccda/index.cjs +1103 -0
- package/dist/ccda/index.cjs.map +1 -0
- package/dist/ccda/index.d.cts +380 -0
- package/dist/ccda/index.d.ts +380 -0
- package/dist/ccda/index.mjs +1077 -0
- package/dist/ccda/index.mjs.map +1 -0
- package/dist/deid/index.cjs +2809 -0
- package/dist/deid/index.cjs.map +1 -0
- package/dist/deid/index.d.cts +464 -0
- package/dist/deid/index.d.ts +464 -0
- package/dist/deid/index.mjs +2793 -0
- package/dist/deid/index.mjs.map +1 -0
- package/dist/example-codes-DeXcnCSK.d.cts +105 -0
- package/dist/example-codes-DeXcnCSK.d.ts +105 -0
- package/dist/fhir/index.cjs +1429 -0
- package/dist/fhir/index.cjs.map +1 -0
- package/dist/fhir/index.d.cts +772 -0
- package/dist/fhir/index.d.ts +772 -0
- package/dist/fhir/index.mjs +1384 -0
- package/dist/fhir/index.mjs.map +1 -0
- package/dist/hl7/index.cjs +1012 -0
- package/dist/hl7/index.cjs.map +1 -0
- package/dist/hl7/index.d.cts +548 -0
- package/dist/hl7/index.d.ts +548 -0
- package/dist/hl7/index.mjs +990 -0
- package/dist/hl7/index.mjs.map +1 -0
- package/dist/index.cjs +535 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +407 -0
- package/dist/index.d.ts +407 -0
- package/dist/index.mjs +488 -0
- package/dist/index.mjs.map +1 -0
- package/dist/ncpdp/index.cjs +714 -0
- package/dist/ncpdp/index.cjs.map +1 -0
- package/dist/ncpdp/index.d.cts +432 -0
- package/dist/ncpdp/index.d.ts +432 -0
- package/dist/ncpdp/index.mjs +695 -0
- package/dist/ncpdp/index.mjs.map +1 -0
- package/dist/providers-OLz3zAc-.d.cts +343 -0
- package/dist/providers-OLz3zAc-.d.ts +343 -0
- package/dist/quirk-DmkgoZdh.d.cts +239 -0
- package/dist/quirk-JLyO1Ncj.d.ts +239 -0
- package/dist/x12/index.cjs +920 -0
- package/dist/x12/index.cjs.map +1 -0
- package/dist/x12/index.d.cts +484 -0
- package/dist/x12/index.d.ts +484 -0
- package/dist/x12/index.mjs +892 -0
- package/dist/x12/index.mjs.map +1 -0
- package/package.json +210 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A tiny, curated, **license-clean** pool of example codes for filling coded fields in generated FHIR
|
|
3
|
+
* resources (`Observation.code`, `Condition.code`, `MedicationRequest.medication[x]`, and the OMB
|
|
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
|
+
* **no** SNOMED/LOINC/RxNorm content. The pool exists only so a
|
|
7
|
+
* generated resource is *structurally* realistic; a consumer who needs their own codes supplies them.
|
|
8
|
+
*
|
|
9
|
+
* Nothing here is PHI — codes and their display text are not patient identifiers. The synthetic-safety
|
|
10
|
+
* invariant governs identity fields (name/DOB/identifier/telecom/address), which come from `../safe`.
|
|
11
|
+
*
|
|
12
|
+
* @module
|
|
13
|
+
*/
|
|
14
|
+
/** A coded concept: a `system` URI, a `code`, and its human-readable `display`. */
|
|
15
|
+
interface CodeConcept {
|
|
16
|
+
/** The code-system URI (`Coding.system`). */
|
|
17
|
+
readonly system: string;
|
|
18
|
+
/** The code value (`Coding.code`). */
|
|
19
|
+
readonly code: string;
|
|
20
|
+
/** The human-readable display text (`Coding.display`). */
|
|
21
|
+
readonly display: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
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 — it only keeps a
|
|
26
|
+
* generated result inside a structurally-sane band.
|
|
27
|
+
*/
|
|
28
|
+
interface QuantConcept extends CodeConcept {
|
|
29
|
+
/** The UCUM unit code (`Quantity.code` and, as text, `Quantity.unit`). */
|
|
30
|
+
readonly unit: string;
|
|
31
|
+
/** Inclusive lower bound of the synthetic value (in `unit`). */
|
|
32
|
+
readonly low: number;
|
|
33
|
+
/** Inclusive upper bound of the synthetic value (in `unit`). */
|
|
34
|
+
readonly high: number;
|
|
35
|
+
/** Decimal places to render (keeps the emitted `decimal` lexical form stable and realistic). */
|
|
36
|
+
readonly decimals: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* LOINC laboratory-result example codes (for a US Core Laboratory Result `Observation`). Public LOINC
|
|
40
|
+
* identifiers used purely as illustrative structural fillers, with UCUM units and synthetic value bands.
|
|
41
|
+
*/
|
|
42
|
+
declare const EXAMPLE_LAB_OBSERVATIONS: readonly QuantConcept[];
|
|
43
|
+
/**
|
|
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 —
|
|
46
|
+
* multi-component vitals (e.g. blood-pressure panel `85354-9`) are not generated.
|
|
47
|
+
*/
|
|
48
|
+
declare const EXAMPLE_VITAL_SIGNS: readonly QuantConcept[];
|
|
49
|
+
/**
|
|
50
|
+
* SNOMED CT problem/condition example codes (for a US Core `Condition.code`). Public SNOMED identifiers
|
|
51
|
+
* used as structural fillers; `@cosyte/synth` bundles no SNOMED content.
|
|
52
|
+
*/
|
|
53
|
+
declare const EXAMPLE_CONDITIONS: readonly CodeConcept[];
|
|
54
|
+
/**
|
|
55
|
+
* RxNorm medication example codes (for a US Core `MedicationRequest.medicationCodeableConcept`). Public
|
|
56
|
+
* RxNorm identifiers used as structural fillers; `@cosyte/synth` bundles no RxNorm content.
|
|
57
|
+
*/
|
|
58
|
+
declare const EXAMPLE_MEDICATIONS: readonly CodeConcept[];
|
|
59
|
+
/**
|
|
60
|
+
* OMB race categories (US Core `us-core-race` `ombCategory`) — the five OMB categories, public code
|
|
61
|
+
* facts from the CDC Race & Ethnicity code system (`urn:oid:2.16.840.1.113883.6.238`).
|
|
62
|
+
*/
|
|
63
|
+
declare const EXAMPLE_RACE_CATEGORIES: readonly CodeConcept[];
|
|
64
|
+
/**
|
|
65
|
+
* OMB ethnicity categories (US Core `us-core-ethnicity` `ombCategory`) — the two OMB categories, public
|
|
66
|
+
* code facts from the CDC Race & Ethnicity code system.
|
|
67
|
+
*/
|
|
68
|
+
declare const EXAMPLE_ETHNICITY_CATEGORIES: readonly CodeConcept[];
|
|
69
|
+
/**
|
|
70
|
+
* CVX vaccine-administered example codes (for a US Core `Immunization.vaccineCode`). Public CDC CVX
|
|
71
|
+
* identifiers used as structural fillers; `@cosyte/synth` bundles no CVX content.
|
|
72
|
+
*/
|
|
73
|
+
declare const EXAMPLE_VACCINES: readonly CodeConcept[];
|
|
74
|
+
/**
|
|
75
|
+
* Allergen-substance example codes (for a US Core `AllergyIntolerance.code`). Public RxNorm / SNOMED CT
|
|
76
|
+
* identifiers used as structural fillers; no terminology content is bundled.
|
|
77
|
+
*/
|
|
78
|
+
declare const EXAMPLE_ALLERGENS: readonly CodeConcept[];
|
|
79
|
+
/**
|
|
80
|
+
* Allergy-reaction manifestation example codes (for `AllergyIntolerance.reaction.manifestation`).
|
|
81
|
+
* Public SNOMED CT clinical-finding identifiers used as structural fillers.
|
|
82
|
+
*/
|
|
83
|
+
declare const EXAMPLE_ALLERGY_MANIFESTATIONS: readonly CodeConcept[];
|
|
84
|
+
/**
|
|
85
|
+
* SNOMED CT procedure example codes (for a US Core `Procedure.code`). Public SNOMED identifiers used as
|
|
86
|
+
* structural fillers — **not** CPT (which is never bundled).
|
|
87
|
+
*/
|
|
88
|
+
declare const EXAMPLE_PROCEDURES: readonly CodeConcept[];
|
|
89
|
+
/**
|
|
90
|
+
* LOINC diagnostic-report example codes (for a US Core Laboratory `DiagnosticReport.code`). Public LOINC
|
|
91
|
+
* panel identifiers used as structural fillers.
|
|
92
|
+
*/
|
|
93
|
+
declare const EXAMPLE_DIAGNOSTIC_REPORTS: readonly CodeConcept[];
|
|
94
|
+
/**
|
|
95
|
+
* SNOMED CT encounter-type example codes (for a US Core `Encounter.type`). Public SNOMED identifiers
|
|
96
|
+
* used as structural fillers.
|
|
97
|
+
*/
|
|
98
|
+
declare const EXAMPLE_ENCOUNTER_TYPES: readonly CodeConcept[];
|
|
99
|
+
/**
|
|
100
|
+
* HL7 v3 `ActCode` encounter-class example codes (for `Encounter.class`, a single `Coding`). Public
|
|
101
|
+
* ActCode identifiers used as structural fillers.
|
|
102
|
+
*/
|
|
103
|
+
declare const EXAMPLE_ENCOUNTER_CLASSES: readonly CodeConcept[];
|
|
104
|
+
|
|
105
|
+
export { type CodeConcept as C, EXAMPLE_ALLERGENS as E, type QuantConcept as Q, 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 };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A tiny, curated, **license-clean** pool of example codes for filling coded fields in generated FHIR
|
|
3
|
+
* resources (`Observation.code`, `Condition.code`, `MedicationRequest.medication[x]`, and the OMB
|
|
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
|
+
* **no** SNOMED/LOINC/RxNorm content. The pool exists only so a
|
|
7
|
+
* generated resource is *structurally* realistic; a consumer who needs their own codes supplies them.
|
|
8
|
+
*
|
|
9
|
+
* Nothing here is PHI — codes and their display text are not patient identifiers. The synthetic-safety
|
|
10
|
+
* invariant governs identity fields (name/DOB/identifier/telecom/address), which come from `../safe`.
|
|
11
|
+
*
|
|
12
|
+
* @module
|
|
13
|
+
*/
|
|
14
|
+
/** A coded concept: a `system` URI, a `code`, and its human-readable `display`. */
|
|
15
|
+
interface CodeConcept {
|
|
16
|
+
/** The code-system URI (`Coding.system`). */
|
|
17
|
+
readonly system: string;
|
|
18
|
+
/** The code value (`Coding.code`). */
|
|
19
|
+
readonly code: string;
|
|
20
|
+
/** The human-readable display text (`Coding.display`). */
|
|
21
|
+
readonly display: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
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 — it only keeps a
|
|
26
|
+
* generated result inside a structurally-sane band.
|
|
27
|
+
*/
|
|
28
|
+
interface QuantConcept extends CodeConcept {
|
|
29
|
+
/** The UCUM unit code (`Quantity.code` and, as text, `Quantity.unit`). */
|
|
30
|
+
readonly unit: string;
|
|
31
|
+
/** Inclusive lower bound of the synthetic value (in `unit`). */
|
|
32
|
+
readonly low: number;
|
|
33
|
+
/** Inclusive upper bound of the synthetic value (in `unit`). */
|
|
34
|
+
readonly high: number;
|
|
35
|
+
/** Decimal places to render (keeps the emitted `decimal` lexical form stable and realistic). */
|
|
36
|
+
readonly decimals: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* LOINC laboratory-result example codes (for a US Core Laboratory Result `Observation`). Public LOINC
|
|
40
|
+
* identifiers used purely as illustrative structural fillers, with UCUM units and synthetic value bands.
|
|
41
|
+
*/
|
|
42
|
+
declare const EXAMPLE_LAB_OBSERVATIONS: readonly QuantConcept[];
|
|
43
|
+
/**
|
|
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 —
|
|
46
|
+
* multi-component vitals (e.g. blood-pressure panel `85354-9`) are not generated.
|
|
47
|
+
*/
|
|
48
|
+
declare const EXAMPLE_VITAL_SIGNS: readonly QuantConcept[];
|
|
49
|
+
/**
|
|
50
|
+
* SNOMED CT problem/condition example codes (for a US Core `Condition.code`). Public SNOMED identifiers
|
|
51
|
+
* used as structural fillers; `@cosyte/synth` bundles no SNOMED content.
|
|
52
|
+
*/
|
|
53
|
+
declare const EXAMPLE_CONDITIONS: readonly CodeConcept[];
|
|
54
|
+
/**
|
|
55
|
+
* RxNorm medication example codes (for a US Core `MedicationRequest.medicationCodeableConcept`). Public
|
|
56
|
+
* RxNorm identifiers used as structural fillers; `@cosyte/synth` bundles no RxNorm content.
|
|
57
|
+
*/
|
|
58
|
+
declare const EXAMPLE_MEDICATIONS: readonly CodeConcept[];
|
|
59
|
+
/**
|
|
60
|
+
* OMB race categories (US Core `us-core-race` `ombCategory`) — the five OMB categories, public code
|
|
61
|
+
* facts from the CDC Race & Ethnicity code system (`urn:oid:2.16.840.1.113883.6.238`).
|
|
62
|
+
*/
|
|
63
|
+
declare const EXAMPLE_RACE_CATEGORIES: readonly CodeConcept[];
|
|
64
|
+
/**
|
|
65
|
+
* OMB ethnicity categories (US Core `us-core-ethnicity` `ombCategory`) — the two OMB categories, public
|
|
66
|
+
* code facts from the CDC Race & Ethnicity code system.
|
|
67
|
+
*/
|
|
68
|
+
declare const EXAMPLE_ETHNICITY_CATEGORIES: readonly CodeConcept[];
|
|
69
|
+
/**
|
|
70
|
+
* CVX vaccine-administered example codes (for a US Core `Immunization.vaccineCode`). Public CDC CVX
|
|
71
|
+
* identifiers used as structural fillers; `@cosyte/synth` bundles no CVX content.
|
|
72
|
+
*/
|
|
73
|
+
declare const EXAMPLE_VACCINES: readonly CodeConcept[];
|
|
74
|
+
/**
|
|
75
|
+
* Allergen-substance example codes (for a US Core `AllergyIntolerance.code`). Public RxNorm / SNOMED CT
|
|
76
|
+
* identifiers used as structural fillers; no terminology content is bundled.
|
|
77
|
+
*/
|
|
78
|
+
declare const EXAMPLE_ALLERGENS: readonly CodeConcept[];
|
|
79
|
+
/**
|
|
80
|
+
* Allergy-reaction manifestation example codes (for `AllergyIntolerance.reaction.manifestation`).
|
|
81
|
+
* Public SNOMED CT clinical-finding identifiers used as structural fillers.
|
|
82
|
+
*/
|
|
83
|
+
declare const EXAMPLE_ALLERGY_MANIFESTATIONS: readonly CodeConcept[];
|
|
84
|
+
/**
|
|
85
|
+
* SNOMED CT procedure example codes (for a US Core `Procedure.code`). Public SNOMED identifiers used as
|
|
86
|
+
* structural fillers — **not** CPT (which is never bundled).
|
|
87
|
+
*/
|
|
88
|
+
declare const EXAMPLE_PROCEDURES: readonly CodeConcept[];
|
|
89
|
+
/**
|
|
90
|
+
* LOINC diagnostic-report example codes (for a US Core Laboratory `DiagnosticReport.code`). Public LOINC
|
|
91
|
+
* panel identifiers used as structural fillers.
|
|
92
|
+
*/
|
|
93
|
+
declare const EXAMPLE_DIAGNOSTIC_REPORTS: readonly CodeConcept[];
|
|
94
|
+
/**
|
|
95
|
+
* SNOMED CT encounter-type example codes (for a US Core `Encounter.type`). Public SNOMED identifiers
|
|
96
|
+
* used as structural fillers.
|
|
97
|
+
*/
|
|
98
|
+
declare const EXAMPLE_ENCOUNTER_TYPES: readonly CodeConcept[];
|
|
99
|
+
/**
|
|
100
|
+
* HL7 v3 `ActCode` encounter-class example codes (for `Encounter.class`, a single `Coding`). Public
|
|
101
|
+
* ActCode identifiers used as structural fillers.
|
|
102
|
+
*/
|
|
103
|
+
declare const EXAMPLE_ENCOUNTER_CLASSES: readonly CodeConcept[];
|
|
104
|
+
|
|
105
|
+
export { type CodeConcept as C, EXAMPLE_ALLERGENS as E, type QuantConcept as Q, 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 };
|