TEDY.11 — Naming Systems
State: Built — list + create/edit form (standard ResourceList + ResourceForm).
Template: tool-feature. Prefix: TEDY.
Overview
A Naming System registers a naming authority for a code system / value set / identifier — the canonical name plus the external identifiers (OID/UUID/URI) that refer to it. Served off /ts/naming-systems; string id. status is a publication lifecycle managed via activate/retire (created as draft); created is server-set.
Data model (libs/tedy/src/lib/types/namingSystem.ts)
NamingSystem { id?:string, names?:LocalizedName, kind?, codeSystem?, source?, description?, status?, created?, identifiers?:NamingSystemIdentifier[] }.
kind—codesystem|valueset|identifier|root(FHIR namingsystem-type).codeSystem— referenced code system id, relevant whenkind === 'codesystem'.description— plain string (not localized).status—draft|active|retired.NamingSystemIdentifier { type?, value?, preferred? }—typefromoid/uuid/uri/other; exactly onepreferred.
NamingSystemSearchParams extends QueryParams { textContains?, lang? }.
REST API (base /ts/naming-systems)
GET /ts/naming-systems— paged search (textContains).GET /ts/naming-systems/{id}— load one.POST /ts/naming-systems— upsert (create and edit both POST the full object; there is no PUT).POST /ts/naming-systems/{id}/activate·POST /ts/naming-systems/{id}/retire— lifecycle.DELETE /ts/naming-systems/{id}.
Client: libs/tedy/src/lib/client/namingSystemClient.ts; hook: useNamingSystems / useNamingSystem / namingSystemKeys.
Business rules / constraints
- Only
draftnaming systems are editable. The reference list opensdraftin the edit form andactive/retiredin a read-only view. TEDY mirrors this — the form drops toviewmode when the record’s status is notdraft(subtitle: “Only draft naming systems can be edited — read-only.”). New records are created asdraft. idis immutable on edit (create-only; disabled in edit).codeSystemis required whenkind === 'codesystem'(validated on save).- Lifecycle is action-driven, not a form field: Activate only from
draft; Retire unless alreadyretired; Delete allowed for any status. All gated on*.NamingSystem.write.
Screens
- List (
pages/NamingSystemList.tsx,resource-list) — a standardResourceList: ID (link → the form) · Name · Source · Kind (tag) · Status (tag).textContainssearch; Add (gated*.NamingSystem.write); per-row lifecycle actions — Activate (draft), Retire (unless retired), Delete (confirm). - Form (
pages/naming-system/NamingSystemForm.tsx) — a standardResourceFormwith declarativesections: ID (required; immutable on edit viamodeOverride:'view'), Name (localized, required), Kind (select), Code system (referenced CS id), Source, Description (textarea), and a repeatable Identifiers editor (type select + value input + preferred star + add/remove). Create + edit;POSTthen return to the list. Same load-gated mount as Defined Properties (ResourceFormseeds once fromdataController.current).- Validation: ID + name + kind required;
codeSystemrequired whenkind === 'codesystem'.
- Validation: ID + name + kind required;
Routes & nav
/naming-systems (list), /naming-systems/new, /naming-systems/:id/edit. Nav: Terminology → Naming Systems (tedyMenu.ts).
Privileges
*.NamingSystem.write gates Add / edit / activate / retire / delete. Read is open.
i18n
tedy.namingSystem.* (fields.*, kind.*, status.*, list.*, validation.*, notifications.*, identifier labels).