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.02.2 template: resource-create module: tedy state: Proposed traces-from: [] source-refs:

  • reference-editor/app/src/app/resources/value-set/containers/edit/value-set-edit.component.ts
  • reference-editor/app/src/app/resources/value-set/services/value-set.service.ts # POST /ts/value-sets/transaction
  • helex-tx/modules/tedy/frontend/src/pages/code-system/CodeSystemFormFields.tsx # reference pattern author: TEDY bootstrap created: 2026-08-08 updated: 2026-08-08

TEDY.02.2 – Add Value Set

Feature grouping

Child of TEDY.02 – Value Set (Common Spec). Siblings: TEDY.02.1 List, TEDY.02.3 View.

Description

Create a new Value Set. Reached from the list’s Add value set action (value-sets/new). Reuses the shared ResourceForm + field pattern (like TEDY.01.2), writing via POST /ts/value-sets/transaction (body ValueSetTransactionRequest {valueSet, version?, identifiers?}); on success navigate into the new record’s shell.

Import FHIR is a second create entry point (file import → POST /file-importer/value-set/process), owned by Exo — out of scope here.

Form fields (General)

FieldWidgetRequiredMaps to
IDAppInput (create-only)valueSet.id
URIAppInputvalueSet.uri
NameAppInputvalueSet.name
PublisherTxConceptSelect (publisher VS)valueSet.publisher
ExperimentalAppSwitchvalueSet.experimental
TitleAppLocalizedNamevalueSet.title
DescriptionAppLocalizedNamevalueSet.description
PurposeAppLocalizedNamevalueSet.purpose
IdentifiersTxIdentifier (allowCustom)valueSet.identifiers

No content/caseSensitive (those are Code System fields). A Value Set has no owned concepts — members come later from the version’s compose rules (TEDY.02.3 Rules tab). Required NOT-NULL fields are enforced server-side on transaction; validate id, uri, title client-side (confirm the exact NOT-NULL set on first save, as done for CodeSystem).

Write

POST /ts/value-sets/transaction{ valueSet: { id, uri, name, title, publisher, description, purpose, experimental, identifiers } } (strip decorated versions/lastVersion/snapshot). On success → /tedy/value-sets/{id}/summary.

Related (post-create, in the view): create a first version (POST .../versions) and add compose rules (POST .../versions/{v}/rules), then expand to populate members.

Business Tests

  1. Add opens the create form with ID/URI/Title required.
  2. Save posts ValueSetTransactionRequest and navigates to the new value set’s summary.
  3. Requires ValueSet.write (guest dev can write).