Class SnomedUuids

java.lang.Object
network.ike.docs.koncept.SnomedUuids

public final class SnomedUuids extends Object
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-docstinkar-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

    Fields
    Modifier and Type
    Field
    Description
    static final UUID
    The SNOMED CT Type-5 namespace, identical to dev.ikm.tinkar.common.util.uuid.UuidUtil.SNOMED_NAMESPACE.
  • Method Summary

    Modifier and Type
    Method
    Description
    static UUID
    Derives the Tinkar UUID for a SNOMED CT concept from its SCTID.
    static UUID
    type5(UUID namespace, String name)
    Computes an RFC 4122 Type-5 (name-based, SHA-1) UUID, byte-for-byte compatible with UuidT5Generator.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.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SNOMED_NAMESPACE

      public static final UUID SNOMED_NAMESPACE
      The SNOMED CT Type-5 namespace, identical to dev.ikm.tinkar.common.util.uuid.UuidUtil.SNOMED_NAMESPACE.
  • Method Details

    • fromSnomed

      public static UUID fromSnomed(String sctid)
      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 - if sctid is null
    • type5

      public static UUID type5(UUID namespace, String name)
      Computes an RFC 4122 Type-5 (name-based, SHA-1) UUID, byte-for-byte compatible with UuidT5Generator.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 UUID
      name - the name to hash within the namespace
      Returns:
      the generated Type-5 UUID
      Throws:
      NullPointerException - if namespace or name is null
      IllegalStateException - if the SHA-1 algorithm is unavailable