@cosyte/terminology 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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - b9772b6: The `resolveSystem` documentation in the type declarations no longer says `@cosyte/transform` uses it, which was never true.
8
+
9
+ No code system, map, value set, result, or diagnostic changes. The README now names the package that does use this engine, `@cosyte/cli`, for its `map-codes` command, and the `LICENSE` names the copyright holder by its legal name, Cosyte LLC.
10
+
3
11
  ## 0.1.1
4
12
 
5
13
  ### Patch Changes
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Cosyte
3
+ Copyright (c) 2026 Cosyte LLC
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,7 +1,7 @@
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: a plus mark set in two overlapping rounded squares, one solid and one outlined, beside the Cosyte wordmark" src="https://cosyte.com/tile/cosyte-lockup-tile-on-light-1200x300.png">
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
 
@@ -12,14 +12,14 @@
12
12
 
13
13
  `@cosyte/terminology` is **not a wire parser**. It mirrors the FHIR **Terminology Module**
14
14
  (`$translate`, `$lookup`, `$validate-code`, `$expand`, …), operating over **consumer-supplied** FHIR
15
- resources. It is the sibling engine `@cosyte/transform` and, later, the parsers' code-system
16
- recognition consume. It ships the **engine, and no code-system release**: SNOMED CT, CPT, LOINC,
17
- UMLS/RxNorm, and VSAC value sets are strictly bring-your-own. It is not content-free, though: what it
18
- _does_ bundle, including the UCUM unit table, the code-system _identities_ (OID ↔ canonical URI), the
19
- SNOMED CT concepts the crosswalk resolver names and RxNorm's relationship and term-type names, is
20
- listed with its copyright under [What is bundled](#what-is-bundled).
21
-
22
- > **Status:** `0.1.0`, **published on npm.** The public API is settled: below `1.0.0` a breaking
15
+ resources, and `@cosyte/cli` uses it to translate codes in its `map-codes` command. It ships the
16
+ **engine, and no code-system release**: SNOMED CT, CPT, LOINC, UMLS/RxNorm, and VSAC value sets are
17
+ strictly bring-your-own. It is not content-free, though: what it _does_ bundle, including the UCUM
18
+ unit table, the code-system _identities_ (OID ↔ canonical URI), the SNOMED CT concepts the crosswalk
19
+ resolver names, and RxNorm's relationship and term-type names, is listed with its copyright under
20
+ [What is bundled](#what-is-bundled).
21
+
22
+ > **Status:** the 0.1 line, **published on npm.** The public API is settled: below `1.0.0` a breaking
23
23
  > change ships in a new minor version, never a patch, and the changelog says what broke. The
24
24
  > **engine is complete**, every operation below ships today. The surface:
25
25
  >
@@ -44,20 +44,22 @@ listed with its copyright under [What is bundled](#what-is-bundled).
44
44
  >
45
45
  > **Bring your own data.** The engine is whole; **no code-system release is bundled.** It runs over
46
46
  > the FHIR resources and standard releases _you_ supply: SNOMED CT, CPT, LOINC, UMLS/RxNorm, the CMS
47
- > GEM files, the NLM complex-map refset and VSAC value sets are all bring-your-own, under whatever
47
+ > GEM files, the NLM complex-map refset, and VSAC value sets are all bring-your-own, under whatever
48
48
  > terms their steward sets. The content packs that would change that (RxNorm Prescribable, ICD-10-CM)
49
49
  > are not bundled either. For the things that **are** bundled, and under whose copyright, see
50
50
  > [What is bundled](#what-is-bundled).
51
51
 
52
52
  ## Install
53
53
 
54
- > **On npm.** `@cosyte/terminology` is **published**, on the `0.1.x` line. The command below
54
+ > **On npm.** `@cosyte/terminology` is **published**, on the 0.1 line. The command below
55
55
  > installs the real package; the registry, not this page, is the authority on the exact version.
56
56
 
57
57
  ```bash
58
58
  npm install @cosyte/terminology
59
59
  ```
60
60
 
61
+ Node.js 22 or later, tested on 22 and 24.
62
+
61
63
  Runnable programs for the main jobs are in
62
64
  [`examples/`](https://github.com/cosyte/terminology/tree/main/examples).
63
65
 
@@ -159,7 +161,7 @@ functional-test cases it claims, and claims no more than it runs: see
159
161
  `vendor/ucum/NOTICE.md`: see [What is bundled](#what-is-bundled).
160
162
 
161
163
  > **Case-sensitive (c/s) mode only.** UCUM's normative interchange mode (the one FHIR/HL7 bind to)
162
- > is case-sensitive (`m` = metre, `M` = mega, `Pa` = pascal, `pA` = picoampere). The
164
+ > is case-sensitive (`m` = meter, `M` = mega, `Pa` = pascal, `pA` = picoampere). The
163
165
  > case-**insensitive** (c/i) spelling variant is **not** supported; a c/i-only string returns a typed
164
166
  > `TERM_UCUM_INVALID` (fail-safe, never silently reinterpreted). Magnitude conversion is likewise a
165
167
  > deliberate non-goal (recognition and canonicalization only).
@@ -195,18 +197,18 @@ can tell what was run from what was not:
195
197
 
196
198
  - **Snapshot: upstream commit `33d37fc0f8efaed5832032f3a73956f66d4d4f23`.** The suite publishes no
197
199
  version field, so the commit is the version, and it is the version these counts were produced
198
- against. A pinned copy of the cases sits in the repository with their origin and licence recorded
200
+ against. A pinned copy of the cases sits in the repository with their origin and license recorded
199
201
  beside them; they are third-party material and are not part of the published package.
200
202
  - **Suites in scope: `simple-cases`, `parameters`, `validation`. Operations in scope: `$expand` and
201
203
  ValueSet `$validate-code`.** The suite's other suites and its other operations are not run, and no
202
204
  conformance to them is claimed.
203
205
  - **Cases ran: 101. Passed: 20. Declined: 81.** The three add up: every case that ran is exactly one
204
206
  of them. Those three suites declare 112 cases in total; the rest declare a different operation,
205
- are marked in the suite for one server's own behaviour, or are held out of the measurement, and
207
+ are marked in the suite for one server's own behavior, or are held out of the measurement, and
206
208
  none of those is run or counted anywhere above.
207
209
  - **A declined case is one this library has no answer for, named rather than counted as a pass.** It
208
210
  asks for a request parameter the public API takes no argument for (`activeOnly`,
209
- `displayLanguage`, `includeDesignations` and others), for HTTP or language negotiation that a
211
+ `displayLanguage`, `includeDesignations`, and others), for HTTP or language negotiation that a
210
212
  library call cannot perform, or it is met by this engine's own typed refusal. Every decline is
211
213
  recorded with its case and its reason.
212
214
  - **A case that answers differently fails the run, and is never recorded as a decline.** The counts
@@ -214,16 +216,16 @@ can tell what was run from what was not:
214
216
 
215
217
  The cases are written for a **server** answering over HTTP, and this package is a library, so they
216
218
  are driven in process through the public API and the comparison is narrower than a server's would
217
- be: an expansion is compared on its membership (system, code and display), a `$validate-code` case
219
+ be: an expansion is compared on its membership (system, code, and display), a `$validate-code` case
218
220
  on its recorded `result`. The recorded responses declare their own tolerances and those are
219
- honoured as declared; every tolerance applied beyond them is written down beside the counts, on the
221
+ honored as declared; every tolerance applied beyond them is written down beside the counts, on the
220
222
  ground that a tolerance nobody can see is indistinguishable from a pass that was not earned.
221
223
 
222
224
  The package's own test suite reproduces the run and holds these figures to it, so they cannot go
223
225
  stale in silence.
224
226
 
225
227
  **This is a measurement, not an endorsement.** HL7 publishes these cases and reviews outcomes under
226
- its own process. Nothing here is an approval, a certification or an endorsement of this package by
228
+ its own process. Nothing here is an approval, a certification, or an endorsement of this package by
227
229
  HL7 or by anyone else.
228
230
 
229
231
  ## Navigate the RxNorm drug graph
@@ -246,7 +248,7 @@ basis-of-strength substances by `has_boss`, a one-to-many relation with a differ
246
248
  targets can be a `PIN` or a plain `IN`, and which `ingredientsOf` does not follow. Read the `tty` of
247
249
  what comes back rather than assuming it.
248
250
 
249
- A concept is typed by its **defining** atom, whichever line of `RXNCONSO` that sits on. `PSN`, `SY`
251
+ A concept is typed by its **defining** atom, whichever line of `RXNCONSO` that sits on. `PSN`, `SY`,
250
252
  and `TMSY` type a _name_ rather than a concept, so they never establish an `RXCUI`'s term type. An
251
253
  `RXCUI` no defining atom could type is left out of the graph and reported as
252
254
  `TERM_RXNORM_UNTYPED_CONCEPT` on `graph.warnings`, rather than loaded under a synonym's term type:
@@ -294,21 +296,21 @@ _names_, listed under [What is bundled](#what-is-bundled).
294
296
  - **Liberal load, conservative assertion.** Malformed input degrades to a typed diagnostic; a 1:many
295
297
  mapping returns the full candidate set, never collapsed to one.
296
298
  - **Value-free diagnostic messages.** Nothing you configured and nothing your release or resource
297
- contained reaches a `message`, `detail`, `reason` or `err.stack` (not a column name, not a
299
+ contained reaches a `message`, `detail`, `reason`, or `err.stack` (not a column name, not a
298
300
  canonical URI, not a unit atom) at any length. What sits beside a message is a locus: a line
299
301
  number, a column count, an index path into your own resource (`compose.include[2]`), or a fixed
300
302
  token naming which file of a release it came from. The
301
- **objects** are a different matter: a typed `unknown`/`unmapped` outcome names the code, unit or
303
+ **objects** are a different matter: a typed `unknown`/`unmapped` outcome names the code, unit, or
302
304
  NDC you asked about, so log the `code` and the locus rather than the whole result: a code _in
303
305
  patient context_ can be PHI.
304
306
  - **Zero runtime dependencies. Dual ESM + CJS.** Node stdlib only; built with `tsup`, validated with
305
307
  `attw`. A release you load is frozen, its indexes included: a code system's concepts, a GEM's or a
306
- complex map's entries and a drug graph's concepts, edges and NDCs are each a read-only **view** of a
307
- map rather than the map itself, so nothing holding one can add, delete or clear an entry, whichever
308
+ complex map's entries, and a drug graph's concepts, edges, and NDCs are each a read-only **view** of a
309
+ map rather than the map itself, so nothing holding one can add, delete, or clear an entry, whichever
308
310
  way it tries. A view is not a `Map` instance, so a model carrying one cannot be `structuredClone`d
309
311
  or posted to a worker: copy out what you need (`new Map(cs.concepts)`). The bundled unit table is frozen deeply, atom by atom and definition by
310
312
  definition, because it is shared with the engine's own reducer; its two lookup maps refuse `set`,
311
- `delete` and `clear` by name, and an entry forced past that through `Map.prototype` changes nothing
313
+ `delete`, and `clear` by name, and an entry forced past that through `Map.prototype` changes nothing
312
314
  the engine reads, because `parseUcum` resolves an atom by scanning the frozen atom array rather than
313
315
  through a lookup map. The AST and
314
316
  the reduction that `parseUcum` and `reduce` hand back are per-call values you own, and mutating one
@@ -335,7 +337,7 @@ with its copyright:
335
337
  ICD-10-CM codes, appear in the API documentation examples, which are distributed in the compiled
336
338
  declaration files and in the build's sourcemaps. SNOMED CT is copyright
337
339
  © International Health Terminology Standards Development Organisation. **No SNOMED CT release or
338
- refset is bundled**: you supply the map rows under your own SNOMED CT licence.
340
+ refset is bundled**: you supply the map rows under your own SNOMED CT license.
339
341
  - **The RxNorm relationship and term-type names** the drug-graph API is written against: the
340
342
  relationship names in `RELA` / `RELA_INVERSE` (`has_ingredient`, `tradename_of`, …), and the
341
343
  term-type codes in `TERM_TYPES`, each with its name as published by the U.S. National Library of
@@ -349,6 +351,8 @@ no claim about whether any particular use of these materials is permitted to you
349
351
 
350
352
  ## License
351
353
 
352
- MIT © Cosyte: this package's own code. The bundled third-party materials above stay under their own
353
- copyright and licences; the `LICENSE` file that ships with this package carries the MIT text and a
354
- third-party notices section naming each of them.
354
+ [MIT](https://github.com/cosyte/terminology/blob/main/LICENSE) © Cosyte LLC: this package's own code.
355
+ The bundled third-party materials above stay under their own copyright and licenses; the `LICENSE` file
356
+ that ships with this package carries the MIT text and a third-party notices section naming each of
357
+ them. The code-system and standards names this package uses belong to their owners: see
358
+ [TRADEMARKS.md](https://github.com/cosyte/terminology/blob/main/TRADEMARKS.md).
package/dist/index.cjs CHANGED
@@ -4979,7 +4979,7 @@ function approximateMatch(graph, query, options = {}) {
4979
4979
  }
4980
4980
 
4981
4981
  // src/index.ts
4982
- var VERSION = "0.1.1";
4982
+ var VERSION = "0.1.2";
4983
4983
 
4984
4984
  exports.COMPLEX_MAP_SOURCE_SYSTEM = COMPLEX_MAP_SOURCE_SYSTEM;
4985
4985
  exports.DIAGNOSTIC_CODES = DIAGNOSTIC_CODES;