Package network.ike.docs.koncept
package network.ike.docs.koncept
Koncept AsciiDoc Extension — inline markup for clinical knowledge concepts.
Overview
This package provides an AsciidoctorJ extension that introduces the
k:ConceptName[] inline macro for referencing clinical and
knowledge-engineering concepts in AsciiDoc documents.
Each reference renders as a clickable SVG badge and is automatically
collected into a "Referenced Koncepts" glossary appended to the document.
Extension Architecture
The extension consists of three cooperating components:
KonceptInlineMacro- Processes
k:Name[]syntax during document conversion. Renders backend-appropriate markup (SVG for HTML, styled phrase for DocBook, bold text for Prawn PDF) and registers each reference in a document-scoped registry. KonceptGlossaryProcessor- Postprocessor that consumes the registry after conversion,
resolves definitions from a
KonceptDefinitionSource, and appends a structured glossary and colophon to the output. KonceptExtensionRegistry- SPI entry point that auto-registers the inline macro with AsciidoctorJ. The glossary postprocessor is registered separately per-execution to avoid Prawn PDF backend incompatibility.
Koncept Definitions
Definitions are sourced via the KonceptDefinitionSource
strategy interface. The default implementation,
YamlKonceptDefinitionSource, loads from
YAML files. Each definition includes:
- Natural language definition text
- Description logic axiom using Unicode DL notation (≡, ⊓, ∃, ∀, ⊑, etc.)
- Optional SNOMED CT concept identifier (SCTID)
- Optional OWL IRI
Usage
In AsciiDoc source:
The patient presented with k:HeartFailure[] and k:AorticStenosis[].
A label override: k:HeartFailure[Congestive Heart Failure].
In a YAML definitions file (koncepts.yml):
HeartFailure:
label: Heart Failure
definition: >
A clinical syndrome characterized by the heart's inability
to pump sufficient blood to meet metabolic demands.
axiom: "≡ ClinicalSyndrome ⊓ ∃hasPathology.(InsufficientCardiacOutput)"
sctid: "84114007"
Backend Support
| Backend | Inline Rendering | Glossary |
|---|---|---|
| html5 | SVG badge with anchor link | HTML definition list |
| docbook5 | DocBook link + phrase | DocBook glossary |
| pdf (Prawn) | Bold + code styled text | Not supported |
- Since:
- 1.0.0
- See Also:
-
ClassDescriptionA definition source that chains multiple sources in priority order.Immutable definition of a Koncept, including natural language definition, description logic axiom, and optional terminology identifiers.Builder for constructing KonceptDefinition instances from parsed YAML or programmatic sources.Strategy interface for resolving Koncept definitions.Tracks references to a single Koncept within a document.SPI entry point for automatic registration of Koncept extensions with AsciidoctorJ.AsciidoctorJ postprocessor that generates a "Referenced Koncepts" glossary section and a colophon at the end of the document.AsciidoctorJ inline macro processor that handles
k:ConceptName[]syntax in AsciiDoc documents.Generates inline SVG badge markup for Koncept references.Loads Koncept definitions from a YAML file.