Advanced Concept Management
Deep dive into FERIN's concept modeling capabilities: inheritance, composition, domains, and codeset incorporation.
Concept Plane Overview
FERIN's concept plane separates meaning from representation. Concepts define what things mean, while register items represent concrete instances with specific content.
┌─────────────────────────────────────────────────────────┐
│ Concept Plane │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Concept │───▶│ Concept │───▶│ Concept │ │
│ │ Version 1│ │ Version 2│ │ Version 3│ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Item │ │ Item │ │ Item │ │
│ │ Version 1│ │ Version 2│ │ Version 3│ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │
└─────────────────────────────────────────────────────────┘This separation enables:
- Definitions to evolve without changing item identifiers
- Items to be linked to stable concepts
- Concept relationships independent of item content
- Richer semantic modeling than simple key-value pairs
Concept Definition Lifecycle
Concepts have their own lifecycle, parallel to but distinct from register items.
Creating Concepts
// Concept definition
{
"conceptId": "urn:example:concept:meter",
"currentDefinition": "The metre is the length of the path travelled by light in vacuum during a time interval of 1/299 792 458 of a second.",
"versions": [
{
"version": 1,
"definition": "The metre is the length equal to 1,650,763.73 wavelengths...",
"date": "1960-10-14",
"changeReason": "Initial definition based on krypton-86"
},
{
"version": 2,
"definition": "The metre is the length of the path travelled by light...",
"date": "1983-10-20",
"changeReason": "Refined definition based on speed of light"
}
]
}When to Version Concepts
Create a new concept version when:
- The definition changes in a way that affects meaning
- Clarifications significantly alter interpretation
- Scientific understanding evolves
- Regulatory requirements change the definition
Concept Inheritance (Is-A)
Inheritance defines "is-a" relationships where a concept specializes its parent.
Inheritance Semantics
// Inheritance hierarchy
SI Base Unit
└── is-a ──▶ Unit of Measure
Length Unit
├── is-a ──▶ SI Base Unit
└── is-a ──▶ Unit of Measure
Meter
└── is-a ──▶ Length Unit
// What this means:
// - Meter IS A Length Unit
// - Length Unit IS A Unit of Measure
// - Properties flow down the hierarchy
// - Queries can traverse up or downImplementation Considerations
- Single vs Multiple Inheritance: FERIN supports multiple inheritance (a concept can have multiple parents)
- Depth: Limit hierarchy depth for performance (recommend max 5-7 levels)
- Cycles: Detect and prevent circular inheritance
- Versioning: Inheritance relationships can change over time; track when relationships were added/removed
Querying Hierarchies
Find All Specializations
GET /api/v1/concepts/{id}/descendantsReturns all concepts that inherit from this concept.
Find All Generalizations
GET /api/v1/concepts/{id}/ancestorsReturns all concepts this concept inherits from.
Find Siblings
GET /api/v1/concepts/{id}/siblingsReturns concepts sharing the same parent.
Concept Composition (Has-Part)
Composition defines "has-part" relationships for complex concepts.
Composition Semantics
// Composition structure
Address
├── has-part ──▶ Street Address (required, 1)
├── has-part ──▶ City (required, 1)
├── has-part ──▶ State (optional, 0..1)
├── has-part ──▶ Postal Code (required, 1)
└── has-part ──▶ Country (required, 1)
// What this means:
// - An Address IS COMPOSED OF these parts
// - Parts have cardinality (required/optional, min/max)
// - Parts can themselves be composed of partsCardinality
Specify how many of each part are allowed:
| Notation | Meaning | Example |
|---|---|---|
| 1 | Exactly one (required) | Country |
| 0..1 | Zero or one (optional) | State |
| 1..* | One or more | Phone Numbers |
| 0..* | Zero or more | Aliases |
| n..m | Between n and m | 2..3 Priorities |
Composition Validation
Use composition definitions to validate data:
- Check that all required parts are present
- Verify part count is within cardinality bounds
- Validate part types match composition definition
- Navigate composition for queries and display
Concept Domains
Domains define constrained value sets that concepts can reference.
Domain Definition
// Define a domain
{
"domainId": "unit-status",
"name": "Unit Status",
"description": "Valid status values for units of measure",
"values": [
{ "code": "current", "definition": "Currently valid for use" },
{ "code": "deprecated", "definition": "No longer recommended" },
{ "code": "historical", "definition": "Of historical interest only" }
],
"governance": {
"changePolicy": "Changes require Control Body approval"
}
}Using Domains in Concepts
// Concept referencing a domain
{
"conceptId": "meter",
"definition": "...",
"attributes": {
"status": {
"type": "domain",
"domain": "unit-status",
"value": "current"
},
"quantity": {
"type": "domain",
"domain": "physical-quantities",
"value": "length"
}
}
}Domain Benefits
- Centralized management: Change values in one place
- Validation: Ensure concepts use only valid values
- Consistency: Same value set used across concepts
- Governance: Control domain changes independently
Extensible Domains
Some domains allow local extensions:
// Base domain
Country Codes (ISO 3166-1)
- US, GB, FR, DE, ...
// Extended domain (local additions)
Country Codes (Extended)
- extends: Country Codes (ISO 3166-1)
- additions:
- XX (Unknown)
- ZZ (Not Applicable)Codeset Incorporation
Incorporate external code sets as concepts while maintaining linkage to source authority.
Incorporation Process
- Identify source codeset and licensing terms
- Define incorporation scope (full, partial, with extensions)
- Create concepts for each code
- Link concepts to source codeset
- Define synchronization strategy
Incorporation Metadata
// Incorporated codeset reference
{
"codesetId": "iso-3166-1",
"source": {
"name": "ISO 3166-1",
"url": "https://www.iso.org/iso-3166-country-codes.html",
"version": "2024-01",
"license": "ISO copyright, requires license"
},
"incorporationDate": "2024-03-15",
"scope": "alpha-2 codes only",
"extensions": [
{ "code": "XX", "reason": "Internal: Unknown country" }
],
"syncStrategy": "manual review on update"
}Incorporated Concept Example
{
"conceptId": "country-US",
"source": {
"codeset": "iso-3166-1",
"code": "US",
"officialName": "United States of America"
},
"localDefinition": "United States of America including territories",
"extensions": {
"region": "North America"
},
"incorporated": true,
"lastSync": "2024-03-15"
}Synchronization Strategies
| Strategy | When to Use | Effort |
|---|---|---|
| Manual Review | Critical registers, any change is significant | High |
| Automated with Approval | Regular updates, changes need governance | Medium |
| Automated | Trusted source, low risk of breaking changes | Low |
| Snapshot | Reference specific version, no updates | None (after initial) |
Concept Relationships Summary
| Relationship | Type | Direction | Use Case |
|---|---|---|---|
| is-a | Inheritance | Child → Parent | Specialization hierarchies |
| has-part | Composition | Whole → Part | Complex concept structure |
| supersedes | Temporal | New → Old | Version replacement |
| relates-to | Association | Either | Custom relationships |
| incorporated-from | Provenance | Local → Source | External codeset linkage |
Implementation Checklist
Basic Concepts
- ☐ Concept definition and storage
- ☐ Concept versioning
- ☐ Concept-to-item linking
- ☐ Definition change tracking
Relationships
- ☐ Inheritance (is-a) support
- ☐ Composition (has-part) support
- ☐ Custom relationship types
- ☐ Relationship versioning
Advanced Features
- ☐ Domain definitions
- ☐ Domain validation
- ☐ Codeset incorporation
- ☐ Sync mechanisms
Queries
- ☐ Hierarchy traversal
- ☐ Composition navigation
- ☐ Cross-concept queries
- ☐ Version-aware queries