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

TEDY.16 — Unified resource metadata (CS · VS · CM · SD)

State: Proposed — analysis + comparison + unification plan. Dataset parity required (no field may be dropped except the Permissions and Settings sections). Template: tool-feature. Prefix: TEDY.

Why

The reference editor builds Code System / Value Set / Map Set (ConceptMap) / Structure Definition edit screens from one shared ResourceFormComponent (resources/resource/components/resource-form.component, i18n entities.resource.*) plus shared sub-components (Identifiers, Configuration attributes, Copyright, Permissions, Settings) — each resource type adds only its type-specific groups. TEDY currently hand-rolls a reduced per-type form (CodeSystemFormFields etc.), so the CS metadata dataset is materially smaller than the reference. This spec unifies TEDY on a shared ResourceMetadataForm and closes the dataset gap. Structure Map (SM) will adopt the same shape later.

Verified live on ehr-feed-category: the reference editor’s /resources/code-systems/ehr-feed-category/{details,edit} vs TEDY’s /tedy/code-systems/ehr-feed-category/details (+ the Add page).

Shared resource fields (the unified core — entities.resource.*)

Common to CS/VS/CM/SD, provided by the shared form:

FieldKindNotes
titlemulti-language, requiredper-language inputs + “Add translation”
otherTitlerepeatable {language, name}“Add other title”
idtext, required in add, immutable on editid-change is a separate confirm modal
nametextcomputable name
publishervalue-set select (publisher) + Custom free-text toggle
uritext, required
descriptionmulti-language
purposemulti-language
topictext + tags
useContextrepeatable {type, value}
sourceReferencetext
replacesresource search (same type)
experimentalcheckbox
externalWebSourcetext

Shared sub-sections (also cross-type):

  • Identifiers — repeatable {system, value} with “frequently used” quick-adds (TEDY already has TxIdentifier).
  • Configuration attributes — repeatable, “often used” quick-adds.
  • Contacts — repeatable.
  • Copyrightcopyright holder / jurisdiction (VS select) / statement.
  • Permissions (admin/editor/viewer/endorser) — excluded from TEDY (dataset-reduction exception; access is via *.{Type}.* privileges).
  • Settings (review required / approval required) — excluded from TEDY (dataset-reduction exception).

Per-type extensions

  • Code Systemcontent (VS codesystem-content-mode, required; supplement reveals baseCodeSystem search) · caseSensitive (radio ci/cs, required) · hierarchyMeaning · sequence (for concept code) · Designations table (code / uri / required / preferred / showInList / description / order) · Properties table (code / uri / type / required / showInList / description / order) · related ValueSet (“all-codes”) · version. Save = CodeSystemTransactionRequest {codeSystem, properties, valueSet, version}.
  • Value Set — compose (rule sets) + expansion + version (already modelled in TEDY.02).
  • Map Set (ConceptMap) — scope (source/target) + associations + version (TEDY.03).
  • Structure Definition — content (FSH/JSON) + contentType/contentFormat (TEDY.05, partial).

Difference lists (reference ↔ TEDY-current, CS ehr-feed-category)

View / details

TEDY shows: ID · URI · Name · Title (single) · Publisher · Content · Case sensitive · Base code system · Hierarchy meaning · Replaces · Sequence · Experimental · External web source · Other titles · Description · Purpose · Source reference · Properties (Name+Type only).

Missing in TEDY (present in dev):

  1. Title as multi-language (dev lists English/Estonian; TEDY shows one).
  2. Topic.
  3. Use context.
  4. Identifiers section.
  5. Configuration attributes section.
  6. Designations table (code/uri/required/preferred/showInList/description/order).
  7. Properties — dev shows uri/type/required/showInList/description/order; TEDY shows only name/type.
  8. Contacts.
  9. Copyright block (holder / jurisdiction / statement).
  10. Human-readable enum labels (dev “Complete” / “Case insensitive” vs TEDY raw complete / ci).
  11. (excluded) Permissions, Settings.

Edit

TEDY edit (CodeSystemFormFields) = the view set as inputs (ID, URI, Name, Publisher, Content, Case sensitive, Base code system, Hierarchy meaning, Replaces, Title, Other titles, Description, Purpose, Source reference, Experimental, External web source, Identifiers).

Missing vs dev edit: Topic · Use context · Sequence for concept code · Configuration attributes · Designations editor · Properties editor (rich table + “often used”) · Contacts · Copyright/holder/jurisdiction/statement · Publisher Custom toggle · multi-language Description/Purpose · (excluded) Permissions/Settings.

Add (create)

TEDY Add (CodeSystemCreate → same CodeSystemFormFields) has the identical reduced set → same gaps as Edit. Dev’s Add is the same component in add mode (full field set); id required + editable only in add.

Business logic & constraints (from the reference editor’s code-system-edit)

  • One component serves view (:id/details) / edit (:id/edit) / add via mode + viewMode.
  • id required in add, immutable on edit (dedicated id-change modal).
  • uri required; title required; content required (default complete); caseSensitive required (default ci).
  • content === 'supplement'baseCodeSystem required/visible.
  • canEdit = {id}.CodeSystem.write.
  • Defaults on load: copyright/permissions/settings/topic ??= {}, identifiers/properties/configurationAttributes ??= [].
  • Save is a transaction: {codeSystem, properties, valueSet (related), version} — CS edit can also create/refresh the “all-codes” ValueSet and a version.
  • Designations/Properties rows carry order + showInList + required/preferred flags; “often used” quick-add seeds common rows.

Implementation plan (phased; no dataset reduction except Permissions/Settings)

Progress — CS-first parity (done):

  • Shared reusable editors built in components/resource-meta/ResourceMetaEditors.tsx: TopicField, UseContextEditor, ConfigAttributesEditor, ContactsEditor, CopyrightFields (the building blocks of the eventual ResourceMetadataForm).
  • CodeSystem type extended: topic, useContext[], configurationAttributes[], copyright{holder,jurisdiction,statement} (added to existing otherTitle, contacts, identifiers, properties).
  • CS edit/create (CodeSystemFormFields) gained: Sequence, Topic, Use context, Configuration attributes, Contacts, Copyright (on top of the existing multi-language title/description/purpose, otherTitle, identifiers).
  • CS view (CodeSystemMetadata) renders Topic, Use context, Configuration attributes, Contacts, Copyright, with human-readable Content/Case-sensitivity labels.
  • New fields persist automatically (part of the CodeSystem object in the transaction save).

Remaining (CS):

  1. Designations editor + rich Properties editor (code/uri/type/required/preferred/showInList/description/order) — the largest gap; currently properties are viewed as name/type and edited via the concept-presentation config.
  2. Publisher Custom free-text toggle (currently a value-set select).

Then (other types): 3. Extract the CS common block + resource-meta editors into one ResourceMetadataForm and adopt in VS / CM / SD (keeping type-specific groups, TEDY.02/.03/.05). 4. SM later (same shape).

UI may be reorganised (grouped sections/accordions) as long as no field is dropped except Permissions/Settings.

Data model additions

CodeSystem (and shared resource fields) need: otherTitle[], topic, useContext[], contacts[], copyright{holder,jurisdiction,statement}, configurationAttributes[], sequence, plus rich properties[] (uri/type/required/preferred/showInList/description/orderNumber) and designations[]. Additive/nullable; align field names with the terminology-server wire model.

See TEDY.01 Code System and open questions in TEDY-new-modules-open-questions.md.