Commit Graph

4 Commits

Author SHA1 Message Date
James 831ab61445 fix: add JPEG 2000 and RLE support via gdcmconv (install libgdcm-tools)
The decompressDICOM path used gdcmconv which wasn't installed on the
server, silently failing all compressed DICOM imports.

Fix:
- Install libgdcm-tools (gdcmconv 3.0.22) on forge
- Expand isCompressedTransferSyntax to explicitly cover:
  - JPEG 2000 Lossless (1.2.840.10008.1.2.4.90)
  - JPEG 2000 Lossy (1.2.840.10008.1.2.4.91)
  - JPEG 2000 Multi-component (1.2.840.10008.1.2.4.92/.93)
  - RLE Lossless (1.2.840.10008.1.2.5)
  - Deflated Explicit VR (1.2.840.10008.1.2.1.99)
  - JPEG-LS already covered by 1.2.840.10008.1.2.4 prefix
- gdcmconv -w handles all of these natively

gdcmconv is now available at /usr/bin/gdcmconv (v3.0.22).
JPEG 2000 lossless DICOMs from any scanner will now import correctly.
2026-03-23 12:20:36 -04:00
James bf57e28e71 fix: replace naive byte-scan findTag with DICOM stream walker
The old findTag scanned raw bytes for the 4-byte tag pattern, which
caused false matches inside Siemens CSA private OB blobs (e.g. the
large 0029,1020 Series Header). This corrupted body_part and other
fields on Siemens MAGNETOM Sola MRIs because findTag(0x0018, 0x0015)
hit a matching byte sequence inside the binary payload before reaching
the real BodyPartExamined element.

Fix: walkToTag() walks the DICOM element stream sequentially, reading
VR and length fields to skip element values entirely. Falls back to
byte-scan only on corrupt/truncated length fields. findLastTag updated
to use the same walker.
2026-03-23 12:09:31 -04:00
James a2141bb5d3 Checkpoint: all pending changes across lib, portal, api, tools
Extraction prompts refined, dossier sections expanded, MCP tools
enhanced, genome/oauth/upload improvements, health-poller added,
import-genome removed, landing/pricing/dashboard template updates,
carousel images, consent/docs templates, rquery/dbquery tools,
CLAUDE.md and docs updates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:37:44 -04:00
James cc1dd7690c Lab reference charts, import tracking, DossierFromEntry consolidation
- Fix lab chart reference bands: parse DOB in DossierFromEntry, generate
  deterministic ref_ids in import-caliper (was collapsing 4363 rows to 1)
- Consolidate DossierFromEntry into lib/dbcore.go (eliminate portal duplicate)
- Add Import field to entries for batch undo (NextImportID, all import paths)
- MyChart direct JSON parsing (skip Gemini for structured lab data)
- Multi-order extraction from markdown/text tables
- Normalize progress callback for UI feedback
- DICOM import, genome import, API, portal, MCP, translation updates
- Remove test DICOM data from repo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 05:15:03 -05:00