Class SnomedUuids
java.lang.Object
network.ike.docs.koncept.SnomedUuids
Derives the Tinkar PublicId UUID for a SNOMED CT concept from its SCTID.
This reproduces dev.ikm.tinkar.common.util.uuid.UuidUtil.fromSNOMED
exactly: a Type-5 (name-based, SHA-1) UUID computed over the SNOMED CT
namespace and the SCTID string. It is replicated here — rather than
depending on dev.ikm.tinkar:common — to avoid the
ike-docs → tinkar-core reverse-dependency cycle
(IKE-Network/ike-issues#215, #216): tinkar-core builds its own
documentation through this extension. The replication is pinned to the
upstream output by SnomedUuidsTest.
The derived UUID matches the identicon Komet renders for a concept only
when that concept's datastore PublicId is exactly this single SNOMED
UUID. Concepts carrying additional or non-SNOMED primordial UUIDs must
supply explicit uuids in their koncept definition instead.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UUIDThe SNOMED CT Type-5 namespace, identical todev.ikm.tinkar.common.util.uuid.UuidUtil.SNOMED_NAMESPACE. -
Method Summary
Modifier and TypeMethodDescriptionstatic UUIDfromSnomed(String sctid) Derives the Tinkar UUID for a SNOMED CT concept from its SCTID.static UUIDComputes an RFC 4122 Type-5 (name-based, SHA-1) UUID, byte-for-byte compatible withUuidT5Generator.getUuidWithEncoding(namespace, name, "UTF-8"): SHA-1 over the namespace's 16 raw bytes followed by the UTF-8 bytes of the name, with the version and IETF variant bits set.
-
Field Details
-
SNOMED_NAMESPACE
The SNOMED CT Type-5 namespace, identical todev.ikm.tinkar.common.util.uuid.UuidUtil.SNOMED_NAMESPACE.
-
-
Method Details
-
fromSnomed
Derives the Tinkar UUID for a SNOMED CT concept from its SCTID.- Parameters:
sctid- the SNOMED CT concept identifier (e.g."84114007")- Returns:
- the deterministic Type-5 UUID for that concept
- Throws:
NullPointerException- ifsctidisnull
-
type5
Computes an RFC 4122 Type-5 (name-based, SHA-1) UUID, byte-for-byte compatible withUuidT5Generator.getUuidWithEncoding(namespace, name, "UTF-8"): SHA-1 over the namespace's 16 raw bytes followed by the UTF-8 bytes of the name, with the version and IETF variant bits set.- Parameters:
namespace- the namespace UUIDname- the name to hash within the namespace- Returns:
- the generated Type-5 UUID
- Throws:
NullPointerException- ifnamespaceornameisnullIllegalStateException- if the SHA-1 algorithm is unavailable
-