TEDY.10 — Defined Properties
State: Built — list + create/edit form (standard ResourceList + ResourceForm).
Template: tool-feature. Prefix: TEDY.
Overview
A Defined Property is a globally-registered property/designation definition that code systems reference by name — the shared vocabulary behind concept property values and designations. Served off /ts/defined-properties; numeric id. used is server-computed (true when at least one code system references the definition).
Data model (libs/tedy/src/lib/types/definedProperty.ts)
DefinedProperty { id?:number, name?, kind?, type?, uri?, description?:LocalizedName, rule?:PropertyRule, used?:boolean }.
kind—property|designation.type— FHIR concept-property type (code,Coding,string,integer,boolean,dateTime,decimal).rule—PropertyRule { codeSystems?, valueSet?, filters? }; carried through unchanged, not edited in this slice (the reference edit form doesn’t edit it either).used— read-only; flagged with an info marker in the list.
DefinedPropertySearchParams extends QueryParams { textContains? }.
REST API (base /ts/defined-properties)
GET /ts/defined-properties— paged search (textContains).GET /ts/defined-properties/{id}— load one.POST /ts/defined-properties(create) /PUT /ts/defined-properties/{id}(update) —saveDefinedPropertyupserts by presence ofid.POST /ts/defined-properties/{id}/update-related— re-propagate the definition to the code systems that use it (the list’s row action).
Client: libs/tedy/src/lib/client/definedPropertyClient.ts; hook: useDefinedProperties / useDefinedProperty / definedPropertyKeys.
Business rules / constraints
- A
useddefined property locks its identity (referenced by ≥1 code system): in the reference edit form, whenusedthe name / URI / kind / type become read-only while the description stays editable — and there is no delete for defined properties at all. TEDY mirrors this exactly — those four fields getmodeOverride:'view'whenused(Save still applies the description change; subtitle: “In use by a code system — only the description can be changed.”), and the list has no delete action.usedis server-computed, so the constraint is also enforced backend-side. - Editing/adding requires
*.DefinedProperty.write.
Screens
- List (
pages/DefinedPropertyList.tsx,resource-list) — a standardResourceList: Name (link, with ausedinfo marker) · Description · URI · Kind (tag) · Type.textContainssearch; Add (gated*.DefinedProperty.write) → the form; per-row Update related properties action. No delete. - Form (
pages/defined-property/DefinedPropertyForm.tsx,resource-create/resource-management) — a standardResourceFormwith declarativesections: Name (required), URI, Kind (select), Type (select of the concept-property types), Description (localized). Create + edit;POST/PUTthen return to the list.- When the property is
used, name/URI/kind/type are locked (view) and only Description is editable; the whole form isviewwhen the user lacks*.DefinedProperty.write. - The form mount is gated until the record loads into the
dataController—ResourceFormseeds its antd form fromdataController.currentonce at mount, so an asyncdc.loadmust complete before it first renders (areadyflag set in the load effect).
- When the property is
Routes & nav
/defined-properties (list), /defined-properties/new, /defined-properties/:id/edit. Nav: Terminology → Defined Properties (tedyMenu.ts).
Privileges
*.DefinedProperty.write gates Add / edit / update-related. Read is open (list/view).
i18n
tedy.definedProperty.* (fields.*, kind.*, list.*, validation.*, notifications.*, updateRelated, usedHint).