Skip to content

Concepts

Fatunmbi Daniel edited this page Jul 19, 2026 · 1 revision

Concepts

A glossary of the domain these types describe. Read this once, and the type names read themselves.

Concept

A single clinical idea (a drug, a lab test, a diagnosis) with a stable id, independent of which coding system named it. Concept, ConceptProjection, and friends model it.

It exists so you can refer to one clinical idea across vocabularies without tying your code to any single source system.

Vocabulary

A source coding system such as SNOMED CT, RxNorm, or LOINC. The VocabularyId enum lists the ones HOLON supports.

It exists to name where a concept came from, using stable identifiers both client and server agree on.

Domain

What kind of thing a concept is (a Drug, a Measurement, a Condition). The DomainId enum names them.

It exists so you can filter and reason about concepts by category without inspecting each one.

ServiceResult

How every HOLON service returns success or failure without throwing: ok(data) or err(message, code). Callers branch on .success instead of wrapping each call in try/catch.

It exists to make failure part of the return type, visible to the type checker, rather than a control-flow surprise.

ErrorCode and HolonError

ErrorCode is one shared enum of failure reasons. HolonError is one error class that carries it. Whatever surfaces an error, from the client to a service, speaks the same codes.

They exist so a caught error means the same thing everywhere, and so you can match on err.code rather than on message strings.

See also

Clone this wiki locally