-
Notifications
You must be signed in to change notification settings - Fork 0
Concepts
A glossary of the domain these types describe. Read this once, and the type names read themselves.
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.
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.
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.
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 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.
- Guides: how to use each of these in code.
- API-Reference: the full symbol list.