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


id: TEDY.01 template: tool-feature module: tedy state: Proposed traces-from: [] # TODO: link terminology-editor user stories source-refs:

  • reference-editor/app/src/app/resources/code-system
  • reference-editor/app/src/app/resources/_lib/code-system/model/code-system.ts
  • terminology-server (/ts/code-systems)
  • helex-tx/libs/tedy/src/lib/client/codeSystemClient.ts
  • helex-tx/libs/tedy/src/lib/client/conceptClient.ts
  • helex-tx/libs/tedy/src/lib/types/codeSystem.ts author: TEDY bootstrap created: 2026-08-08 updated: 2026-08-08

TEDY.01 – Code System (Common Spec)

Description

Common specification for Code System management in TEDY — browse, view, and author FHIR CodeSystems over terminology-server (/ts/code-systems). This root spec owns the shared vocabulary, data model, value sets, FHIR mapping, privileges, common API surface, and navigation so the child (screen) specs don’t duplicate them.

terminology-server owns the persistence + FHIR model; TEDY is the React client. Derived via spec-authoring.md (Step-1 dev-tx.example scan, Step-2 reference-editor + terminology-server reconcile).

Child specs:

Glossary Terms

Term (canonical)Meaning
Code SystemA FHIR CodeSystem — a managed set of concepts (codes) with designations, versions, properties.
ConceptA single code within a Code System (its content).
VersionA CodeSystemVersion with a publication status (draft/active/retired) + release date.
DesignationA concept’s localized display/definition (designationType = display/definition, per language).
PublisherCodeSystem.publisher — resolved via the publisher value set when it is a code, else free text.
SpaceA reference-platform authoring workspace a resource belongs to.
Content modeCodeSystem.content — complete / supplement / fragment / example / not-present.

Business Feature Sitemap

flowchart LR
    US["(TODO) US: manage code systems"] --> ROOT[TEDY.01]
    ROOT --> LST[TEDY.01.1 List]
    ROOT --> CRT[TEDY.01.2 Add]
    ROOT --> VIEW[TEDY.01.3 View]
    LST -->|Add code system| CRT
    LST -->|row / ID| VIEW
    CRT -->|save| VIEW

Data Model

Shared model for list / create / view. terminology-server owns the tables; TEDY consumes the JSON envelopes.

Entity / Resourcethe reference platform APIFHIR resourceNotes
CodeSystem/ts/code-systemsCodeSystemlist + detail; lastVersion decorated
CodeSystemVersion/ts/code-systems/{id}/versionsCodeSystem.versionstatus ∈ draft/active/retired
CodeSystemConcept/ts/code-systems/{id}/conceptsCodeSystem.conceptcontent; display from designations
List envelopen/an/a{ data: [...], meta: { total, offset } }
Single-resource envelopen/an/aresource root fields

Shared CodeSystem fields

FieldTypeCardinalityRule
idstring1..1immutable identity (the code-system id)
uristring0..1canonical URL; unique
namestring0..1machine name
titleLocalizedName0..1multilingual display
descriptionLocalizedName0..1
publisherstring0..1code from publisher VS or free text
contentcode0..1codesystem-content-mode
caseSensitivecode0..1cs / ci
baseCodeSystemstring0..1for supplements
versions / lastVersionCodeSystemVersion[]0..*version + status + releaseDate + conceptsTotal
conceptsCodeSystemConcept[]0..*code + versions[].designations[]

Used value sets (resolved via @helex/tx)

FieldValueSetCanonical URLBinding
publisherpublisherhttps://tx.example/fhir/ValueSet/publisherextensible
version statuspublication-statushttp://hl7.org/fhir/ValueSet/publication-statusrequired
contentcodesystem-content-modehttp://hl7.org/fhir/ValueSet/codesystem-content-moderequired

FHIR Mapping (Common)

Internal fieldFHIR R5 pathMappingNotes
idCodeSystem.iddirect
uriCodeSystem.urldirect
nameCodeSystem.namedirect
titleCodeSystem.titletransformLocalizedName → language-resolved title
publisherCodeSystem.publisherdirect
contentCodeSystem.contentdirect
caseSensitiveCodeSystem.caseSensitivetransformcs/ci → boolean
lastVersion.versionCodeSystem.versiondirect
concepts[]CodeSystem.concept[]transformdesignations → concept.display + designation

Common Rules

  • Phase-0 TEDY is read-only (browse/view). Authoring (create/edit) writes via POST /ts/code-systems/transaction (child TEDY.01.2 / future edit).
  • Concept display resolves from versions[].designations[] where designationType='display' (match language → preferred → first), fallback to the code.
  • Publisher display resolves via the publisher value set (@helex/tx), fallback to the raw value when free text.
  • Value-set-backed selects use TxConceptSelect(url=…) (see spec-authoring.md; dev proxies /api/tx/$expand→the reference platform FHIR).

Shared Privileges

ActionPrivilege
View / browseauthenticated (dev: guest via the reference platform yupi)
Create / edit / delete / versions / conceptsCodeSystem.write (the reference platform {id}.CodeSystem.write)

Common API Surface

MethodPathPrivilegeDescription
GET/ts/code-systemsreadlist (params: textContains, publisher, versionStatus, spaceId, content, lastVersionDecorated, lang)
GET/ts/code-systems/{id}readload one (?decorate=true)
GET/ts/code-systems/{id}/versionsreadversions
GET/ts/code-systems/{id}/conceptsreadconcepts (params: textContains, codeContains, displayLanguage)
POST/ts/code-systems/transactionwritecreate/update (authoring)
GET/spacesreadspaces (for the Space filter)
GET/fhir/ValueSet/$expand?url=…readvalue-set expansion (publisher/status/content)

All TEDY calls go through @helex/tedy’s txApi (/txapi → dev-tx.example /api).

Sitemap / Navigation

  • /tedy/code-systems — list (TEDY.01.1)
  • /tedy/code-systems/new — create (TEDY.01.2, pending)
  • /tedy/code-systems/{id} — view (TEDY.01.3)

(Standalone Router basename="/tedy"; menu routes are basename-relative — see spec-authoring/dev notes.)

Non-functional Requirements

RequirementTarget
List load< 2s; server-side pagination (20/page); no eager concept load
Detail + concepts load< 2s; concepts paged (20/page)
Search debounce~400ms

Business Tests

  1. List, view, and (future) create all operate over /ts/code-systems* with the shared envelope.
  2. Publisher/status/content render via their value sets; concept display via designations.
  3. Write actions require CodeSystem.write; read is open on the guest dev server.

Traces

  • traces-from: TODO user stories
  • children: TEDY.01.1, TEDY.01.2, TEDY.01.3