Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Resource dashboard (ResourceContext) — gap analysis & implementation plan

Why: the TEDY detail page (TedyResourceForm — a single flat metadata+versions+concepts view) is a fraction of reference-editor’s resource screen. Audited https://dev-tx.example/resources/code-systems/anesteesia-liigid/summary and the reference-editor source. This documents the gap and the plan to close it.

What reference-editor actually renders

The screen is a shared, route-driven tabbed resource shell (resources/resource/components/resource-context.component.ts) wrapping per-tab pages built from widget cards.

  • tw-resource-context — inputs resourceType (CodeSystem|ValueSet|MapSet|ImplementationGuide|TerminologyServer|StructureDefinition), resource, version, versions, conceptCode, mode (summary|details|concepts|properties|provenance|checklist|…). Renders a top page-bar: resource-type label, localized title, a tab strip (per-type conditional: Summary·Metadata·Concepts·Properties·Provenance·Checklist, +SD elements/fsh/json/uml), and a version selector (“All versions” + per-version routing). Route- and privilege-aware (twPrivileged, twPrivilegeContext).
  • Summary tab = a 2-column grid of cards:
    • tw-code-system-info-widget — icon-annotated summary (id, uri, properties, case-sensitivity + content, contact email/url, publisher, linked ValueSet).
    • tw-code-system-versions-widget — version rows (version, date range, concept count, status tag, language, Add to release, linked VS) + Compare + Add version.
    • tw-code-system-unlinked-conceptsbackend table (CONCEPT·VERSION·DESIGNATION·AUTHOR·TASK·STATUS, row checkboxes) + search + Link to <version> dropdown + Add concept.
    • tw-resource-tasks-widget (+ tw-resource-task-modal) — Opened/All tasks, Add task, task rows.
    • tw-resource-related-artifact-widget — related artifacts.
    • Value-sets card — referenced VS with rule-source / “version matches latest” indicator.

Shared widget family (resources/resource/components/): resource-context, resource-side-info, resource-form, resource-version-form, resource-identifiers, resource-contacts, resource-configuration-attributes, resource-multi-language-view, resource-readonly-concept, resource-tasks-widget, resource-task-modal, resource-related-artifact-widget, resource-release-modal, resource-fhir-import-modal.

Mapping: reference-editor → @helex/ui → TEDY status

reference-editor (Marina)@helex/ui primitive availableTEDY statusAction
tw-resource-context (tabbed shell)EntityHeader + PageTabs + AppSelect (compose)❌ missing (only flat TedyResourceForm)Build TedyResourceShell
version selector (“All versions”)AppSelect/AppDropdownpart of shell
code-system-info-widget (icon summary)AppCard+FieldItem/AppDescriptions⚠️ partial (flat FieldItems)CodeSystemInfoWidget
code-system-versions-widgetAppCard+AppTable+AppTag⚠️ flat list onlyCodeSystemVersionsWidget
code-system-unlinked-concepts (backend table + checkboxes + link/add)AppTable/AppDataGrid (selection)⚠️ simple read-only concepts tableextend CodeSystemConcepts (columns, selection, actions)
resource-tasks-widget + resource-task-modalAppTable+AppModalTedyTasksWidget + task modal (+ tasks client)
resource-related-artifact-widgetAppCard+AppListRelatedArtifactsWidget
value-sets cardAppCard+AppTag+AppLinkReferencedValueSetsWidget
resource-form (Metadata edit)ResourceForm⚠️ view-onlyedit mode (+ sub-widgets below)
resource-identifiersTxIdentifier (@helex/tx) — value model IS FHIR Identifier[]✅ reusefree-form (allowCustom/omit concepts) mirrors the reference platform’s plain system+value table; VS-backed via the $expand adapter. No FhirIdentifier exists.
resource-contacts (ContactDetail[] = name + telecoms)FhirTelecom (ContactPoint) + FhirAddress exist; no contact widgetbuild in @helex/fhircreate FhirContact (ContactDetail editor) composing FhirTelecom — standard FHIR datatype, lives with the other Fhir* widgets (shared, sign-off-gated)
resource-configuration-attributesAppEditableTableConfigurationAttributes
resource-multi-language-viewAppLocalizedName⚠️ have input, not viewsmall helper
resource-version-formResourceFormVersionForm
resource-release-modal / resource-fhir-import-modalAppModallater (release → Press; FHIR import → Exo)
twPrivileged / twPrivilegeContextuseModule().canWrite() (@helex/core)⚠️ not wired per-resourceuseTedyPrivilege(id,'CodeSystem') wrapper

Note: @helex/ui has the primitives (EntityHeader, PageTabs, AppSelect, AppTable/AppDataGrid, AppCard, AppTag, FieldItem, AppModal, AppDropdown, AppDivider) — the gap is the composed, terminology-aware shell + the domain widgets, which are TEDY-specific → build in @helex/tedy (do NOT bloat @helex/ui; per the leaned-down convention).

Missing components (to build in @helex/tedy)

  1. TedyResourceShell — the ResourceContext equivalent: resourceType+resource+versions+mode; header (icon, localized title, version selector) + route-driven tab strip; wraps routed tab pages. Backed by EntityHeader+PageTabs+AppSelect. (Foundational — everything else mounts inside it.)
  2. Summary widgets: CodeSystemInfoWidget, CodeSystemVersionsWidget, RelatedArtifactsWidget, ReferencedValueSetsWidget.
  3. Concepts: extend CodeSystemConcepts → backend table with the reference platform columns (Concept·Version·Designation·Author·Task·Status), row selection, Link to version + Add concept (and later the concepts tab page + tree).
  4. Tasks: TedyTasksWidget + task modal + a tasks client (or reuse EMR flow).
  5. Metadata edit: ResourceForm edit mode for CodeSystem + sub-widgets: reuse @helex/tx TxIdentifier (identifiers), new FhirContact in @helex/fhir (contacts, composing FhirTelecom), ConfigurationAttributes, VersionForm. (No FhirIdentifier — identifiers = TxIdentifier.)
  6. Privilege gating: useTedyPrivilege(resourceId, 'CodeSystem') (wraps @helex/core useModule) for {id}.CodeSystem.write.
  7. Later/other modules: resource-release-modal → Press; resource-fhir-import-modal → Exo.

Implementation plan (phased)

  • Phase R1 — Shell + Summary (read-only). ← DELIVERED (this change). TedyResourceShell (@helex/tedy) = EntityHeader + PageTabs (merged) + a version-selector slot (tabBarExtraContent) + routed <Outlet>. Code System detail is now a nested route code-systems/:id → shell with tabs Summary · Metadata · Concepts (read-only): CodeSystemShell loads once and shares via Outlet context; CodeSystemSummary = CodeSystemInfoWidget + CodeSystemVersionsWidget + concepts preview; CodeSystemMetadata = full field view; CodeSystemConceptsTab = the concepts table. Flat CodeSystemDetail/TedyResourceForm-for-detail retired (TedyResourceForm kept for create/edit). Properties/Provenance/Checklist tabs + RelatedArtifacts/ValueSets/Tasks widgets + version selector wiring follow in later phases.
  • Phase R2 — Concepts tab. Full concepts backend table (the reference platform columns + selection) + the concepts tree/search drawer (reuse @helex/tx TxConceptTree/TxConceptSearchDrawer where they fit the reference platform /ts/*, else fresh).
  • Phase R3 — Metadata edit + versions. Metadata edit + write flow DELIVERED (commit ec538bf); create page DELIVERED (TEDY.01.2, commit f0918f9). @helex/tedy saveCodeSystemPOST /ts/code-systems/transaction; Metadata tab is now view/edit via ResourceForm (hideHeader, inside the shell) + useDataController, editing uri/name/title/description/publisher (TxConceptSelect)/content/caseSensitive/baseCodeSystem/identifiers (TxIdentifier); save invalidates the shell query → back to view. The edit fields were extracted into a shared CodeSystemFormFields and reused by CodeSystemCreate (ResourceForm in create mode, id editable only on create, content/caseSensitive seeded, required-field validation), reached from the list’s Add code system action (code-systems/new) and navigating into the new record’s shell on success. Both verified end-to-end (guest write works on dev; create persists title={en:...}/content/caseSensitive and lands on the summary tab). Version form + lifecycle DELIVERED (commit 493ec33): @helex/tedy versionClient (saveCodeSystemVersion POST-new/PUT-existing, changeCodeSystemVersionStatus draft/activate/retire, deleteCodeSystemVersion) + useCodeSystemVersions hooks; shared VersionFormFields (version key create-only, release/expiration dates bridged to AppDatePicker’s dayjs, supported/preferred languages, algorithm, description, identifiers) reused by standalone CodeSystemVersionCreate/CodeSystemVersionEdit pages (code-systems/:id/versions/new + /:versionCode/edit); the Summary versions widget now lists live versions with Add version, per-row Edit, a single-step status transition (draft→active→retired, retired→draft), and confirmed Delete, invalidating on each change. Verified end-to-end (create+activate via UI; edit/retire/draft/delete via the same endpoints; note: editing an active version’s metadata is frozen server-side, matching reference-editor). Still pending: contacts (FhirContact) + config-attributes sub-widgets, per-resource privilege gating, and the Import FHIR create entry point (owned by Exo).
  • Phase R4 — Tasks + related artifacts + value sets widgets (Tasks may reuse EMR flow).
  • Phase R5 — Generalize. Extract TedyResourceShell + shared widgets so ValueSet/MapSet/NamingSystem reuse them (the resourceType switch), mirroring reference-editor’s shared resource-* family.

Sequencing note: R1 is the unlock — it establishes the shell every terminology resource hangs off, and immediately closes the biggest visual/functional gap. Each phase is spec-first (update the TEDY.01 family: shell/summary → TEDY.01.3; metadata edit → TEDY.01.2 + a versions spec; concepts tab → a new child).

Verify

Per phase: npx tsc -p tsconfig.json --noEmit (module) + browser parity check against dev-tx.example/resources/code-systems/{id}/{tab} for each tab. Keep column/label/tab order matched to reference-editor (record deltas in the specs’ Differences tables).