Commit Graph

6 Commits

Author SHA1 Message Date
James 20c33d2fb2 Document processing pipeline: OpenRouter OCR + Stepfun extraction
- Switch OCR from Fireworks Qwen to Gemini 3 Flash via OpenRouter
- Switch extraction/translation to Stepfun Step 3.5 Flash via OpenRouter
- Add CallOpenRouter() to lib/llm.go (OpenAI-compatible API)
- Add OpenRouter API key support to lib/config.go
- Fix extraction preamble causing Stepfun reasoning model to return null content
  (heavy user-message preamble → short system message)
- Fix timestamp fallback: no date = 0, not today
- Fix document type: use file extension instead of hardcoded "pdf"
- Fix findUploadByFilename: Value filter was silently ignored, returning all uploads
- Fix entryQuery: skip category filter when EntryID is specified
- Fix extraction prompt contamination: replace real patient examples with generic ones
- Add reprocess button (↻) for document uploads
- Add delete cascade for upload entries (removes created document/extraction entries)
- Add upload/reprocess/delete logging throughout pipeline
- Consolidated templates, translations, email templates, landing pages
- Portal: defense, genome, dossier sections, MCP, OAuth updates
- Tools: translate pipeline improvements

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 05:28:05 -04:00
James 7cbca827b3 Translation pipeline: translate tool, YAML-driven language infrastructure, auto-dispatch
- Add tools/translate: MiniMax/GPT-oss draft → GLM 5 review pipeline via OpenRouter
  Supports 10 templates + YAML, 21 languages, provider routing (Fireworks/Groq)
- portal/main.go: render() auto-picks localized templates (page_xx.tmpl)
  Removes per-handler Lookup boilerplate from landing/pricing/faq handlers
- base.tmpl: dynamic language dropdown from {{.Languages}}, current lang first
- en.yaml: lang_* keys define all 22 languages (YAML-driven, no hardcoded lists)
- All existing YAMLs: added language_name key
- New: tr.yaml (Turkish), translated templates for de/es/nl/da/ja
- Makefile: translate build target

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:34:09 -04:00
James ee40b3a81b import-renpho, v2 readings API, dashboard lab chips, portal updates
- Add import-renpho: Go binary to sync Renpho body composition data
  into inou vitals via direct EntryWrite (AES-128/ECB Renpho API client,
  13 body metrics, dedup, auto RBAC grants, -setup/-discover modes)
- Add POST /api/v2/readings endpoint for batch vital ingest
- Fix dashboard lab chip: filter by lab_order not lab_report
- Portal: upload handler, dossier page rework, dashboard updates
- Remove tools/fix-lang (replaced by toolkit translate)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 04:54:58 -05: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
James 75e9ec7722 Refactor: Remove legacy v2, data, roles modules; update auth, queries, translations, portal MCP tools 2026-02-13 15:30:22 -05:00
Johan 94946baf00 Initial commit 2026-02-01 02:43:27 -05:00