Plan: align the TEDY Code System Summary with reference-editor
Why. The new TEDY summary (/tedy/code-systems/:id/summary) and the reference-editor
original (dev-tx.example/resources/code-systems/:id/summary) diverge noticeably.
This plan maps the old layout to the new one widget-by-widget and phases the work.
Sources compared:
- Old:
reference-editor/app/src/app/resources/code-system/containers/summary/code-system-summary.component.html(+widgets/*,code-system-info-widget,resource-context.component). - New:
modules/tedy/frontend/src/pages/code-system/{CodeSystemShell,CodeSystemSummary}.tsx+widgets/*.
Side-by-side
| Area | reference-editor (old) | TEDY (new) today | Gap → action |
|---|---|---|---|
| Header | resource-context: icon + localized title + version selector dropdown + status | TedyResourceShell: icon + title + tab strip; version-selector slot exists, unwired | P4 wire a version selector into the shell’s tabBarExtraContent slot |
| Info card | Compact icon-prefixed lines: 🔑 id (copyable) · description · 🔗 uri (copyable) · ▤ properties (names) · ⚙ case-sensitivity + content-mode + experimental · ☎ contacts/telecoms · 📍 publisher (resolved) · 🏷 linked VS link | AppCard + SectionHeading + FieldItem label/value grid: id · uri · name · publisher · content · caseSensitive · description | P1 rebuild as the compact icon-list; add missing: copy-to-clipboard, properties, experimental, contacts, linked-VS link |
| Versions card | Title bar: Compare + Add version; rows: version · date range · count · status · language · add-to-release · linked VS · per-row Compare | Title + Add version; rows: version · status · releaseDate · count · Edit / transition / Delete | P2 add Compare (card + row), date-range, language, linked-VS columns; keep the new lifecycle actions (an improvement) |
| Unlinked concepts (right col) | Backend management table (Concept·Version·Designation·Author·Task·Status, checkboxes) + Link-to-version dropdown + Add concept | (only a read-only concepts preview) | P3a = the R2 concepts work; big build |
| Tasks (right col) | resource-tasks-widget (triage-gated) + opened/all toggle + Add task + task modal | (absent) | P3b reuse EMR flow module widgets; privilege-gated |
| Related artifacts (right col) | resource-related-artifact-widget | (absent) | P3c new domain widget (@helex/tedy) over /ts/.../related-artifacts |
| Value sets (right col) | Value-set impacts list (affected/ok icon, source/current version, reason) | (absent) | P3d new domain widget; needs the impacts endpoint |
| Layout | 2-col m-form-row, several cards per column | 2-col CSS grid, info+versions left / concepts preview right | Converges naturally as P1–P3 land |
Phased plan
P1 — Info-card visual parity (quick, highest visual payoff). ✅ DELIVERED (commit 4f49cd9). New reusable Tedy* UI components live in libs/tedy/src/lib/ui/ — TedyInfoCard (compact card), TedyInfoLine (icon-prefixed compacted line + optional copy-to-clipboard), TedyInlineMeta (divider-separated inline segments). CodeSystemInfoWidget now renders the reference platform-style icon-list (key/link/bars/setting/environment/tag): id + uri copyable, properties, settings line (case-sensitivity + content + experimental), resolved publisher, linked VS. Verified on administrative-gender-cz.
Original P1 scope: Replace the
FieldItem grid in CodeSystemInfoWidget with the reference platform compact icon-list:
@ant-design/icons (Key/Link/Bars/Setting/Contacts/Environment/Tag) prefixing
each line; id + uri get a copy-to-clipboard affordance; render description,
properties (names, when loaded), a settings line (case-sensitivity label +
content-mode + experimental), contacts/telecoms, resolved publisher, and a
linked-VS AppLink. Keep the localized-name + TxConceptDisplay publisher
resolution already in place. No backend change; ~half a day.
P2 — Versions card parity. ✅ DELIVERED (commit 0c05f7c). Versions widget gained Dates (release–expiration), Supported languages, and Value set columns; a card-level Compare button (disabled with <2 versions) wired to a CodeSystemVersionCompare placeholder page (code-systems/:id/compare — diff view deferred). Lifecycle actions retained. Also (per user ask) the Concepts ResourceList gained a filter button (Status: draft/active/retired → codeSystemEntityStatus). Verified on anesteesia-liigid.
Original P2 scope: Extend the versions widget columns to match (date range, language, linked VS) and add a card-level Compare action (+ per-row). Keep the TEDY lifecycle actions (Add/Edit/activate·retire·draft/ Delete) — they exceed the old widget and stay. Compare view itself is a separate screen (defer the compare page to its own task; wire the button to a stub/route first).
P3 — Right-column widgets (the largest gap; each already tracked in
resource-context-gap.md):
- P3a Unlinked/managed concepts — ✅ DELIVERED (commit
45a6ed6).CodeSystemUnlinkedConceptsWidget(backend entity-versions table viaGET .../entity-versions?unlinked=true&status=draft,active) with row selection, search, and a Link-to-<draft-version>action (POST .../versions/{v}/concepts/link); replaces the concepts preview. Verified onanesteesia-liigid(surfaces the unlinked draft concept “4”). Deferred sub-flows: Author/Task columns + create-task, and concept authoring (Add concept) — still R2. - P3b Tasks — ✅ DELIVERED (commit
a0ff69f). the reference platform-native widget overGET /tm/tasks?context=CodeSystem|{id}(NOT the EMRflowmodule — that’s a different backend). Read-only list; create/triage flows later. - P3c Related artifacts — ✅ DELIVERED (
a0ff69f).POST /related-artifacts→useRelatedArtifacts→ card. - P3d Value-set impacts — ✅ DELIVERED (
a0ff69f).GET .../value-set-impacts→useValueSetImpacts→ card (affected/ok flag, source vs current version).
Verified on anesteesia-liigid: Related artifacts = ValueSet anesthesia-types;
Value sets = anesthesia-types 0.0.1 (ok, source 1.0.0 / current 1.0.0); Tasks = none.
P4 — Header version selector. ✅ DELIVERED (commit a0ff69f). CodeSystemShell
populates the shell’s tabBarExtraContent slot with a version AppSelect
(backed by useCodeSystemVersions), tracks the choice in ?version=, and
exposes it via Outlet context (CodeSystemOutletContext.version) for
version-scoped tabs, matching resource-context’s selector.
Recommended order & sizing
- P1 (icon-list info card) — do first; it’s most of the “looks different” and is cheap + backend-free.
- P2 (versions columns + Compare button) — small, rounds out the left column.
- P4 (header version selector) — small, high perceived parity.
- P3a–d — schedule as the R2/R4 phases; each is a real build (backend + widget). P3c/P3d are self-contained; P3a (concepts mgmt) and P3b (tasks) are the heaviest.
Decisions to confirm
- Info card is a shared visual idiom. Building the icon-list inside
@helex/tedy(widget) is fine; if a reusable “icon field list” primitive is wanted in@helex/ui, that’s a separate sign-off-gated change — not assumed here. - Contacts reuse the planned
FhirContact(@helex/fhir, composingFhirTelecom) — seeresource-context-gap.md. - Value-set impacts: verify
impactsendpoint on terminology-server before P3d; otherwise show only the linked value set(s).