@cosyte/terminology 0.0.2 → 0.0.4

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/dist/index.d.cts CHANGED
@@ -2667,8 +2667,8 @@ type ComplexMapInput = {
2667
2667
  *
2668
2668
  * Liberal on load: a structurally unusable RF2 *row* is skipped and surfaced as a warning; only an
2669
2669
  * unusable *source* (empty content, header missing required columns) is a fatal
2670
- * {@link FATAL_CODES.TERM_CROSSWALK_MALFORMED}. Ships **no** SNOMED content — the rows are the
2671
- * caller's, under their own licence.
2670
+ * {@link FATAL_CODES.TERM_CROSSWALK_MALFORMED}. Ships **no** SNOMED CT release or refset — the rows
2671
+ * are the caller's, under their own licence.
2672
2672
  *
2673
2673
  * @param input - Structured `rows`, or a raw RF2 extended-map refset `content`.
2674
2674
  * @returns The immutable {@link ComplexMap}.
@@ -2808,7 +2808,8 @@ declare const SNOMEDCT_SYSTEM = "http://snomed.info/sct";
2808
2808
  * fabricates** an `RXCUI` or a relationship absent from the loaded data — an absent concept is a typed
2809
2809
  * {@link RxNormUnknown}, an unresolvable NDC a typed {@link NdcUnmapped}, never a guess.
2810
2810
  *
2811
- * **No RxNorm content is bundled**: the engine ships the graph *machinery*; the caller
2811
+ * **No RxNorm release is bundled**: the engine ships the graph *machinery*, and RxNorm's
2812
+ * relationship and term-type *names* (`RELA`, `TERM_TYPES`); the caller
2812
2813
  * supplies the RRF release (the public-domain Current Prescribable Content, or the full BYO
2813
2814
  * release).
2814
2815
  *
@@ -3018,14 +3019,14 @@ interface RxNormGraph {
3018
3019
  * value) is **skipped and surfaced** as a `TERM_RXNORM_MALFORMED_ROW` warning, never a partial
3019
3020
  * concept/edge, never a crash. Rows that are simply *not of interest* (a non-`RXNORM` atom, an
3020
3021
  * atom-level relationship, a non-`NDC` attribute) are skipped **silently** — they are expected, not
3021
- * faults. Ships **no** RxNorm content: every concept/edge is the caller's release.
3022
+ * faults. Ships **no** RxNorm release: every concept/edge is the caller's.
3022
3023
  *
3023
3024
  * @packageDocumentation
3024
3025
  */
3025
3026
 
3026
3027
  /**
3027
3028
  * A raw RxNorm RRF release, BYO. The caller supplies the public-domain Current Prescribable Content
3028
- * subset or the full (licensed) release; the engine bundles **no** RxNorm content.
3029
+ * subset or the full (licensed) release; the engine bundles **no** RxNorm release.
3029
3030
  */
3030
3031
  interface RxNormGraphSource {
3031
3032
  /** The raw `RXNCONSO.RRF` content (pipe-delimited concept/atom names). */
@@ -3042,7 +3043,7 @@ interface RxNormGraphSource {
3042
3043
  *
3043
3044
  * Parses `RXNCONSO` (concepts), `RXNREL` (directed edges, normalized to the documented direction), and
3044
3045
  * — when supplied — `RXNSAT` (NDC attributes). Liberal on load: a structurally unusable row is a
3045
- * skipped, surfaced {@link RxNormLoadWarning}, never partial. Ships **no** RxNorm content — the graph
3046
+ * skipped, surfaced {@link RxNormLoadWarning}, never partial. Ships **no** RxNorm release — the graph
3046
3047
  * is entirely the caller's release.
3047
3048
  *
3048
3049
  * A concept is typed only by a **defining** atom, never by a synonym-class one and never by file
@@ -3055,7 +3056,7 @@ interface RxNormGraphSource {
3055
3056
  * ```ts
3056
3057
  * import { loadRxNormGraph } from "@cosyte/terminology";
3057
3058
  *
3058
- * // Synthetic rows in the RxNorm RRF wire format (no real RxNorm content is bundled).
3059
+ * // Synthetic rows in the RxNorm RRF wire format (no RxNorm release is bundled).
3059
3060
  * const graph = loadRxNormGraph({
3060
3061
  * conso: "1|ENG||||||||||RXNORM|IN||lisinopril||N||\n2|ENG||||||||||RXNORM|SCDC||lisinopril 10 MG||N||",
3061
3062
  * // "SCDC(2) has_ingredient IN(1)": subject=RXCUI2=2, object=RXCUI1=1.
@@ -3309,8 +3310,8 @@ declare function approximateMatch(graph: RxNormGraph, query: string, options?: A
3309
3310
  * The RxNorm **relationship (`RELA`) vocabulary** and the **direction convention** the drug graph is
3310
3311
  * built on — encoded here as published identity facts (like the code-system OID↔URI facts in
3311
3312
  * {@link ../systems/registry}), grounded firsthand on the NLM RxNorm Technical Documentation and the
3312
- * UMLS Reference Manual. **No RxNorm content is bundled** — only the relationship *names* and the
3313
- * *rule* for reading a row's direction.
3313
+ * UMLS Reference Manual. **No RxNorm release is bundled** — what ships is the relationship *names*
3314
+ * and the *rule* for reading a row's direction.
3314
3315
  *
3315
3316
  * **The direction rule (a documented medication-safety trap).** From the
3316
3317
  * RxNorm Technical Documentation (§12.7) and the UMLS Reference Manual, verbatim: *"the direction of
@@ -3419,7 +3420,7 @@ declare const RXNORM_SYSTEM = "http://www.nlm.nih.gov/research/umls/rxnorm";
3419
3420
  /**
3420
3421
  * The RxNorm **term-type (`TTY`) vocabulary** relevant to the drug graph — the normal-form ladder and
3421
3422
  * the cross-link kinds — encoded as published identity facts (grounded firsthand on the NLM RxNorm
3422
- * Technical Documentation, Appendix 5). **No RxNorm content is bundled**: these are the
3423
+ * Technical Documentation, Appendix 5). **No RxNorm release is bundled**: what ships is these
3423
3424
  * *labels*, not the drug list.
3424
3425
  *
3425
3426
  * The RxNorm normal-form graph runs `IN → SCDC → SCD → SBD` (ingredient → clinical-drug component →
@@ -3500,8 +3501,9 @@ declare function isSynonymTermType(tty: TermType): boolean;
3500
3501
  * **FHIR Terminology Module** (`$translate`, `$lookup`, `$validate-code`, `$expand`, …), operating
3501
3502
  * over **consumer-supplied** FHIR resources. It ships the *engine* and **no code-system release**
3502
3503
  * (SNOMED CT / CPT / LOINC / UMLS / RxNorm are strictly BYO). It is not content-free: see
3503
- * **What is bundled** at the end of this note for the UCUM unit table, the code-system *identities*
3504
- * (OID ↔ URI) and the SNOMED CT concepts the crosswalk resolver names, each with its copyright.
3504
+ * **What is bundled** at the end of this note, which includes the UCUM unit table, the code-system
3505
+ * *identities* (OID ↔ URI), the SNOMED CT concepts the crosswalk resolver names and RxNorm's
3506
+ * relationship and term-type names, each with its copyright.
3505
3507
  *
3506
3508
  * **Code-system identity and ConceptMap translation:**
3507
3509
  *
@@ -3558,7 +3560,7 @@ declare function isSynonymTermType(tty: TermType): boolean;
3558
3560
  *
3559
3561
  * - {@link loadRxNormGraph} — load `RXNCONSO` (concepts, typed by `TTY`), `RXNREL` (directed `RELA`
3560
3562
  * edges, normalized to the documented `RXCUI2 ⟶RELA⟶ RXCUI1` direction), and optionally `RXNSAT`
3561
- * (NDC attributes) into an immutable graph. Ships **no** RxNorm content — BYO release.
3563
+ * (NDC attributes) into an immutable graph. Ships **no** RxNorm release — BYO.
3562
3564
  * - {@link ingredientsOf} / {@link genericFor} / {@link brandsFor} / {@link doseFormsOf} /
3563
3565
  * {@link consistsOf} / {@link relatedByRela} — graph navigation following **authored** edges only
3564
3566
  * (the engine never synthesizes an inverse). An absent `RXCUI` is a typed {@link RxNormUnknown}.
@@ -3581,8 +3583,21 @@ declare function isSynonymTermType(tty: TermType): boolean;
3581
3583
  * - the **SNOMED CT concepts the crosswalk resolver names**, each with its description: the four
3582
3584
  * map-category concepts ({@link MAP_CATEGORIES}) a complex-map row's `mapCategoryId` refers to, and
3583
3585
  * the two gender findings (`248152002` Female, `248153007` Male) a gender `IFA` rule is written
3584
- * against. SNOMED CT is copyright © International Health Terminology Standards Development
3585
- * Organisation.
3586
+ * against. Further SNOMED CT identifiers, and ICD-10-CM codes, appear in the API documentation
3587
+ * examples, which are distributed in the compiled declaration files and in the build's
3588
+ * sourcemaps. SNOMED CT is copyright © International Health Terminology Standards
3589
+ * Development Organisation.
3590
+ * - the **RxNorm relationship and term-type names** the drug-graph API is written against: the
3591
+ * relationship names in {@link RELA} / {@link RELA_INVERSE} (`has_ingredient`, `tradename_of`, …),
3592
+ * and the term-type codes in {@link TERM_TYPES}, each with its name as published by the U.S.
3593
+ * National Library of Medicine (`SCD` reads "Semantic Clinical Drug"). Individual RxNorm
3594
+ * identifiers also appear in the API documentation examples, with their RxNorm names and term
3595
+ * types (for instance `RXCUI` `316151`, "lisinopril 10 MG"), and in `README.md` as well as the
3596
+ * places named above. RxNorm is produced by the National Library of Medicine; no RxNorm release
3597
+ * is bundled.
3598
+ *
3599
+ * The `LICENSE` file that ships with this package carries the MIT text for the package's own code
3600
+ * and a third-party notices section naming each of the above.
3586
3601
  *
3587
3602
  * The content packs that would change this (the CMS GEM files, the RxNorm Current Prescribable
3588
3603
  * subset) are not bundled; a caller supplies them, as they do a SNOMED CT, CPT, LOINC, UMLS or VSAC
package/dist/index.d.ts CHANGED
@@ -2667,8 +2667,8 @@ type ComplexMapInput = {
2667
2667
  *
2668
2668
  * Liberal on load: a structurally unusable RF2 *row* is skipped and surfaced as a warning; only an
2669
2669
  * unusable *source* (empty content, header missing required columns) is a fatal
2670
- * {@link FATAL_CODES.TERM_CROSSWALK_MALFORMED}. Ships **no** SNOMED content — the rows are the
2671
- * caller's, under their own licence.
2670
+ * {@link FATAL_CODES.TERM_CROSSWALK_MALFORMED}. Ships **no** SNOMED CT release or refset — the rows
2671
+ * are the caller's, under their own licence.
2672
2672
  *
2673
2673
  * @param input - Structured `rows`, or a raw RF2 extended-map refset `content`.
2674
2674
  * @returns The immutable {@link ComplexMap}.
@@ -2808,7 +2808,8 @@ declare const SNOMEDCT_SYSTEM = "http://snomed.info/sct";
2808
2808
  * fabricates** an `RXCUI` or a relationship absent from the loaded data — an absent concept is a typed
2809
2809
  * {@link RxNormUnknown}, an unresolvable NDC a typed {@link NdcUnmapped}, never a guess.
2810
2810
  *
2811
- * **No RxNorm content is bundled**: the engine ships the graph *machinery*; the caller
2811
+ * **No RxNorm release is bundled**: the engine ships the graph *machinery*, and RxNorm's
2812
+ * relationship and term-type *names* (`RELA`, `TERM_TYPES`); the caller
2812
2813
  * supplies the RRF release (the public-domain Current Prescribable Content, or the full BYO
2813
2814
  * release).
2814
2815
  *
@@ -3018,14 +3019,14 @@ interface RxNormGraph {
3018
3019
  * value) is **skipped and surfaced** as a `TERM_RXNORM_MALFORMED_ROW` warning, never a partial
3019
3020
  * concept/edge, never a crash. Rows that are simply *not of interest* (a non-`RXNORM` atom, an
3020
3021
  * atom-level relationship, a non-`NDC` attribute) are skipped **silently** — they are expected, not
3021
- * faults. Ships **no** RxNorm content: every concept/edge is the caller's release.
3022
+ * faults. Ships **no** RxNorm release: every concept/edge is the caller's.
3022
3023
  *
3023
3024
  * @packageDocumentation
3024
3025
  */
3025
3026
 
3026
3027
  /**
3027
3028
  * A raw RxNorm RRF release, BYO. The caller supplies the public-domain Current Prescribable Content
3028
- * subset or the full (licensed) release; the engine bundles **no** RxNorm content.
3029
+ * subset or the full (licensed) release; the engine bundles **no** RxNorm release.
3029
3030
  */
3030
3031
  interface RxNormGraphSource {
3031
3032
  /** The raw `RXNCONSO.RRF` content (pipe-delimited concept/atom names). */
@@ -3042,7 +3043,7 @@ interface RxNormGraphSource {
3042
3043
  *
3043
3044
  * Parses `RXNCONSO` (concepts), `RXNREL` (directed edges, normalized to the documented direction), and
3044
3045
  * — when supplied — `RXNSAT` (NDC attributes). Liberal on load: a structurally unusable row is a
3045
- * skipped, surfaced {@link RxNormLoadWarning}, never partial. Ships **no** RxNorm content — the graph
3046
+ * skipped, surfaced {@link RxNormLoadWarning}, never partial. Ships **no** RxNorm release — the graph
3046
3047
  * is entirely the caller's release.
3047
3048
  *
3048
3049
  * A concept is typed only by a **defining** atom, never by a synonym-class one and never by file
@@ -3055,7 +3056,7 @@ interface RxNormGraphSource {
3055
3056
  * ```ts
3056
3057
  * import { loadRxNormGraph } from "@cosyte/terminology";
3057
3058
  *
3058
- * // Synthetic rows in the RxNorm RRF wire format (no real RxNorm content is bundled).
3059
+ * // Synthetic rows in the RxNorm RRF wire format (no RxNorm release is bundled).
3059
3060
  * const graph = loadRxNormGraph({
3060
3061
  * conso: "1|ENG||||||||||RXNORM|IN||lisinopril||N||\n2|ENG||||||||||RXNORM|SCDC||lisinopril 10 MG||N||",
3061
3062
  * // "SCDC(2) has_ingredient IN(1)": subject=RXCUI2=2, object=RXCUI1=1.
@@ -3309,8 +3310,8 @@ declare function approximateMatch(graph: RxNormGraph, query: string, options?: A
3309
3310
  * The RxNorm **relationship (`RELA`) vocabulary** and the **direction convention** the drug graph is
3310
3311
  * built on — encoded here as published identity facts (like the code-system OID↔URI facts in
3311
3312
  * {@link ../systems/registry}), grounded firsthand on the NLM RxNorm Technical Documentation and the
3312
- * UMLS Reference Manual. **No RxNorm content is bundled** — only the relationship *names* and the
3313
- * *rule* for reading a row's direction.
3313
+ * UMLS Reference Manual. **No RxNorm release is bundled** — what ships is the relationship *names*
3314
+ * and the *rule* for reading a row's direction.
3314
3315
  *
3315
3316
  * **The direction rule (a documented medication-safety trap).** From the
3316
3317
  * RxNorm Technical Documentation (§12.7) and the UMLS Reference Manual, verbatim: *"the direction of
@@ -3419,7 +3420,7 @@ declare const RXNORM_SYSTEM = "http://www.nlm.nih.gov/research/umls/rxnorm";
3419
3420
  /**
3420
3421
  * The RxNorm **term-type (`TTY`) vocabulary** relevant to the drug graph — the normal-form ladder and
3421
3422
  * the cross-link kinds — encoded as published identity facts (grounded firsthand on the NLM RxNorm
3422
- * Technical Documentation, Appendix 5). **No RxNorm content is bundled**: these are the
3423
+ * Technical Documentation, Appendix 5). **No RxNorm release is bundled**: what ships is these
3423
3424
  * *labels*, not the drug list.
3424
3425
  *
3425
3426
  * The RxNorm normal-form graph runs `IN → SCDC → SCD → SBD` (ingredient → clinical-drug component →
@@ -3500,8 +3501,9 @@ declare function isSynonymTermType(tty: TermType): boolean;
3500
3501
  * **FHIR Terminology Module** (`$translate`, `$lookup`, `$validate-code`, `$expand`, …), operating
3501
3502
  * over **consumer-supplied** FHIR resources. It ships the *engine* and **no code-system release**
3502
3503
  * (SNOMED CT / CPT / LOINC / UMLS / RxNorm are strictly BYO). It is not content-free: see
3503
- * **What is bundled** at the end of this note for the UCUM unit table, the code-system *identities*
3504
- * (OID ↔ URI) and the SNOMED CT concepts the crosswalk resolver names, each with its copyright.
3504
+ * **What is bundled** at the end of this note, which includes the UCUM unit table, the code-system
3505
+ * *identities* (OID ↔ URI), the SNOMED CT concepts the crosswalk resolver names and RxNorm's
3506
+ * relationship and term-type names, each with its copyright.
3505
3507
  *
3506
3508
  * **Code-system identity and ConceptMap translation:**
3507
3509
  *
@@ -3558,7 +3560,7 @@ declare function isSynonymTermType(tty: TermType): boolean;
3558
3560
  *
3559
3561
  * - {@link loadRxNormGraph} — load `RXNCONSO` (concepts, typed by `TTY`), `RXNREL` (directed `RELA`
3560
3562
  * edges, normalized to the documented `RXCUI2 ⟶RELA⟶ RXCUI1` direction), and optionally `RXNSAT`
3561
- * (NDC attributes) into an immutable graph. Ships **no** RxNorm content — BYO release.
3563
+ * (NDC attributes) into an immutable graph. Ships **no** RxNorm release — BYO.
3562
3564
  * - {@link ingredientsOf} / {@link genericFor} / {@link brandsFor} / {@link doseFormsOf} /
3563
3565
  * {@link consistsOf} / {@link relatedByRela} — graph navigation following **authored** edges only
3564
3566
  * (the engine never synthesizes an inverse). An absent `RXCUI` is a typed {@link RxNormUnknown}.
@@ -3581,8 +3583,21 @@ declare function isSynonymTermType(tty: TermType): boolean;
3581
3583
  * - the **SNOMED CT concepts the crosswalk resolver names**, each with its description: the four
3582
3584
  * map-category concepts ({@link MAP_CATEGORIES}) a complex-map row's `mapCategoryId` refers to, and
3583
3585
  * the two gender findings (`248152002` Female, `248153007` Male) a gender `IFA` rule is written
3584
- * against. SNOMED CT is copyright © International Health Terminology Standards Development
3585
- * Organisation.
3586
+ * against. Further SNOMED CT identifiers, and ICD-10-CM codes, appear in the API documentation
3587
+ * examples, which are distributed in the compiled declaration files and in the build's
3588
+ * sourcemaps. SNOMED CT is copyright © International Health Terminology Standards
3589
+ * Development Organisation.
3590
+ * - the **RxNorm relationship and term-type names** the drug-graph API is written against: the
3591
+ * relationship names in {@link RELA} / {@link RELA_INVERSE} (`has_ingredient`, `tradename_of`, …),
3592
+ * and the term-type codes in {@link TERM_TYPES}, each with its name as published by the U.S.
3593
+ * National Library of Medicine (`SCD` reads "Semantic Clinical Drug"). Individual RxNorm
3594
+ * identifiers also appear in the API documentation examples, with their RxNorm names and term
3595
+ * types (for instance `RXCUI` `316151`, "lisinopril 10 MG"), and in `README.md` as well as the
3596
+ * places named above. RxNorm is produced by the National Library of Medicine; no RxNorm release
3597
+ * is bundled.
3598
+ *
3599
+ * The `LICENSE` file that ships with this package carries the MIT text for the package's own code
3600
+ * and a third-party notices section naming each of the above.
3586
3601
  *
3587
3602
  * The content packs that would change this (the CMS GEM files, the RxNorm Current Prescribable
3588
3603
  * subset) are not bundled; a caller supplies them, as they do a SNOMED CT, CPT, LOINC, UMLS or VSAC
package/dist/index.mjs CHANGED
@@ -4701,7 +4701,7 @@ function approximateMatch(graph, query, options = {}) {
4701
4701
  }
4702
4702
 
4703
4703
  // src/index.ts
4704
- var VERSION = "0.0.2";
4704
+ var VERSION = "0.0.4";
4705
4705
 
4706
4706
  export { COMPLEX_MAP_SOURCE_SYSTEM, DIAGNOSTIC_CODES, FATAL_CODES, HL7_V2_OID_ROOT, HL7_V2_URL_PREFIX, ICD10CM_ORDER_FILE_FIELDS, ICD10CM_SYSTEM, ICD9CM_SYSTEM, MAP_CATEGORIES, NO_MAP_CATEGORIES, RELA, RELA_INVERSE, RXNORM_SYSTEM, SNOMEDCT_SYSTEM, SYSTEM_IDENTITIES, TERM_TYPES, TerminologyError, VERSION, applyComplexMap, applyGem, approximateMatch, asTermType, brandsFor, buildSubsumption, codeableConcept, coding, consistsOf, defaultStatusMapper, doseFormsOf, expand, genericFor, getArray, getBoolean, getConcept, getNumber, getString, ingredientsOf, invertGem, isA, isJsonObject, isSynonymTermType, isUnknownSystem, loadCodeSystem, loadComplexMap, loadConceptMap, loadGems, loadRxNormGraph, loadUcumEssence, loadValueSet, lookup, makeStatus, matchesFilter, parseCsv, parseCsvSource, parseFhirCodeSystem, parseFixedWidth, parseRrf, parseRrfLine, parseUcum, reduce, relatedByRela, resolveNdc, resolveSystem, sliceField, translate, ucumEqual, unsupportedOps, validateCode, validateCodeInValueSet, validateUcum };
4707
4707
  //# sourceMappingURL=index.mjs.map