@cosyte/dicom 0.0.3 → 0.0.5
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 +417 -70
- package/README.md +28 -14
- package/dist/index.cjs +641 -190
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.mjs +641 -190
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
package/dist/index.d.cts
CHANGED
|
@@ -2260,6 +2260,19 @@ type AnnexEOption = "CleanPixelData" | "CleanRecognizableVisual" | "CleanGraphic
|
|
|
2260
2260
|
* (deferred to `@cosyte/dicom-pixel`). When pixel data is present it always
|
|
2261
2261
|
* warns rather than claiming the image is clean.
|
|
2262
2262
|
*
|
|
2263
|
+
* **`RetainLongitudinalTemporal` gives you the full-dates branch.** PS3.15
|
|
2264
|
+
* §E.3.6 is *two* options, and Table E.1-1 gives them separate columns:
|
|
2265
|
+
* `Rtn. Long. Full Dates` (keep dates and times as they are) and
|
|
2266
|
+
* `Rtn. Long. Modif. Dates` (keep them only as modified/shifted values). One
|
|
2267
|
+
* name here covers both, and it carries the **full-dates** column - the *less*
|
|
2268
|
+
* protective branch. That is not a rounding difference: the two columns disagree
|
|
2269
|
+
* on **169** rows, and on every one of them full-dates says `K` (keep the real
|
|
2270
|
+
* value) where modified-dates says `C` (clean it). Activate it only when real
|
|
2271
|
+
* dates are genuinely required; leave it off and the Basic Profile action
|
|
2272
|
+
* applies, which removes or empties them. Date *shifting* is not implemented at
|
|
2273
|
+
* this layer - a caller who needs the modified-dates behaviour shifts the values
|
|
2274
|
+
* themselves after the call.
|
|
2275
|
+
*
|
|
2263
2276
|
* @example
|
|
2264
2277
|
* const retain: DeidentifyOption[] = ["RetainLongitudinalTemporal", "RetainSafePrivate"];
|
|
2265
2278
|
*/
|
|
@@ -2317,6 +2330,13 @@ interface DeidentifiedAttribute {
|
|
|
2317
2330
|
readonly applied: AppliedAction;
|
|
2318
2331
|
/** Tag/index chain for an attribute inside a sequence; omitted at the root. */
|
|
2319
2332
|
readonly contextPath?: readonly string[];
|
|
2333
|
+
/**
|
|
2334
|
+
* Present when the action came from a Table E.1-1 row that names a
|
|
2335
|
+
* repeating-group family rather than this single tag: the mask that matched,
|
|
2336
|
+
* e.g. `"60xx4000"` for Overlay Comments in any overlay plane. `tag` is always
|
|
2337
|
+
* the concrete tag that was in the file. Absent for every exact-tag row.
|
|
2338
|
+
*/
|
|
2339
|
+
readonly repeatingGroup?: string;
|
|
2320
2340
|
}
|
|
2321
2341
|
/**
|
|
2322
2342
|
* The audit trail returned alongside the de-identified dataset. Contains no
|
|
@@ -2458,6 +2478,11 @@ declare class DeidentifyError extends Error {
|
|
|
2458
2478
|
* (see {@link resolveAction}), and applies it: `X` remove, `Z` zero-length, `D`
|
|
2459
2479
|
* VR-consistent dummy (falling back to `Z` where no safe dummy exists), `C`
|
|
2460
2480
|
* conservative blank, `U` deterministic consistent-UID remap, `K` keep.
|
|
2481
|
+
* - Resolves the three Table E.1-1 rows the standard states as a repeating-group
|
|
2482
|
+
* mask (`(50xx,xxxx)` Curve Data, `(60xx,3000)` Overlay Data, `(60xx,4000)`
|
|
2483
|
+
* Overlay Comments) across the groups PS3.5 §7.6 bounds them to, on an
|
|
2484
|
+
* exact-tag miss. A match is removed *and* reported, with
|
|
2485
|
+
* `DeidentifiedAttribute.repeatingGroup` naming the mask.
|
|
2461
2486
|
* - Recurses into kept sequences and **re-encodes** them so nested PHI is removed
|
|
2462
2487
|
* in the *serialized* bytes too - not just the object model (the Phase 5 writer
|
|
2463
2488
|
* blits `SQ` spans verbatim, so a rebuilt `items` array alone would not survive
|
package/dist/index.d.ts
CHANGED
|
@@ -2260,6 +2260,19 @@ type AnnexEOption = "CleanPixelData" | "CleanRecognizableVisual" | "CleanGraphic
|
|
|
2260
2260
|
* (deferred to `@cosyte/dicom-pixel`). When pixel data is present it always
|
|
2261
2261
|
* warns rather than claiming the image is clean.
|
|
2262
2262
|
*
|
|
2263
|
+
* **`RetainLongitudinalTemporal` gives you the full-dates branch.** PS3.15
|
|
2264
|
+
* §E.3.6 is *two* options, and Table E.1-1 gives them separate columns:
|
|
2265
|
+
* `Rtn. Long. Full Dates` (keep dates and times as they are) and
|
|
2266
|
+
* `Rtn. Long. Modif. Dates` (keep them only as modified/shifted values). One
|
|
2267
|
+
* name here covers both, and it carries the **full-dates** column - the *less*
|
|
2268
|
+
* protective branch. That is not a rounding difference: the two columns disagree
|
|
2269
|
+
* on **169** rows, and on every one of them full-dates says `K` (keep the real
|
|
2270
|
+
* value) where modified-dates says `C` (clean it). Activate it only when real
|
|
2271
|
+
* dates are genuinely required; leave it off and the Basic Profile action
|
|
2272
|
+
* applies, which removes or empties them. Date *shifting* is not implemented at
|
|
2273
|
+
* this layer - a caller who needs the modified-dates behaviour shifts the values
|
|
2274
|
+
* themselves after the call.
|
|
2275
|
+
*
|
|
2263
2276
|
* @example
|
|
2264
2277
|
* const retain: DeidentifyOption[] = ["RetainLongitudinalTemporal", "RetainSafePrivate"];
|
|
2265
2278
|
*/
|
|
@@ -2317,6 +2330,13 @@ interface DeidentifiedAttribute {
|
|
|
2317
2330
|
readonly applied: AppliedAction;
|
|
2318
2331
|
/** Tag/index chain for an attribute inside a sequence; omitted at the root. */
|
|
2319
2332
|
readonly contextPath?: readonly string[];
|
|
2333
|
+
/**
|
|
2334
|
+
* Present when the action came from a Table E.1-1 row that names a
|
|
2335
|
+
* repeating-group family rather than this single tag: the mask that matched,
|
|
2336
|
+
* e.g. `"60xx4000"` for Overlay Comments in any overlay plane. `tag` is always
|
|
2337
|
+
* the concrete tag that was in the file. Absent for every exact-tag row.
|
|
2338
|
+
*/
|
|
2339
|
+
readonly repeatingGroup?: string;
|
|
2320
2340
|
}
|
|
2321
2341
|
/**
|
|
2322
2342
|
* The audit trail returned alongside the de-identified dataset. Contains no
|
|
@@ -2458,6 +2478,11 @@ declare class DeidentifyError extends Error {
|
|
|
2458
2478
|
* (see {@link resolveAction}), and applies it: `X` remove, `Z` zero-length, `D`
|
|
2459
2479
|
* VR-consistent dummy (falling back to `Z` where no safe dummy exists), `C`
|
|
2460
2480
|
* conservative blank, `U` deterministic consistent-UID remap, `K` keep.
|
|
2481
|
+
* - Resolves the three Table E.1-1 rows the standard states as a repeating-group
|
|
2482
|
+
* mask (`(50xx,xxxx)` Curve Data, `(60xx,3000)` Overlay Data, `(60xx,4000)`
|
|
2483
|
+
* Overlay Comments) across the groups PS3.5 §7.6 bounds them to, on an
|
|
2484
|
+
* exact-tag miss. A match is removed *and* reported, with
|
|
2485
|
+
* `DeidentifiedAttribute.repeatingGroup` naming the mask.
|
|
2461
2486
|
* - Recurses into kept sequences and **re-encodes** them so nested PHI is removed
|
|
2462
2487
|
* in the *serialized* bytes too - not just the object model (the Phase 5 writer
|
|
2463
2488
|
* blits `SQ` spans verbatim, so a rebuilt `items` array alone would not survive
|