# termbank.pdhc — Technical description

Bulk canonical terminology store for the PDHC platform. Substantive
content below; historical scaffolding note preserved for context.

*Scaffold created 2026-04-24 per Phase 1.a. Phases 1–3 shipped; document
kept current thereafter per Rule 25.*

## Role in PDHC

Bulk canonical terminology store. Read-only over HTTP. Mutations via import CLI only.

Imports:
- Socialstyrelsen termbank (full XML release)
- LOINC (current release)
- ICD-10 / ICD-11
- ATC
- SNOMED CT International + SE subset

Owns the canonical URI namespace (`https://termbank.pdhc.se/CodeSystem/<system>/<code>`). `plan.pdhc` mirrors these URIs into its curated working set; `rosetta.pdhc` stores mappings that point to them. No other service mints canonical URIs.

## Data model (target — see `readme.md` §1.b)

- `Concept` — primary row, keyed by canonical_uri.
- `ConceptDesignation` — localised displays.
- `ConceptProperty` — source-specific attributes.
- `ImportRun` — bookkeeping per import.
- `AuditLog` — Rule 24 log for imports.

## APIs (target — see `readme.md` §3)

- `GET /CodeSystem/:system/:code`
- `GET /Concept/:canonical_uri`
- `GET /search?q=&system=&limit=`
- `GET /fhir/metadata` — CapabilityStatement
- `GET /health`

## Ports

9010 reserved · 9011 Postgres · 9012 Flask · 9013 reserved.

## Not-yet-implemented

See `readme.md` for the full plan. At 1.a close only the scaffold exists.
