Skip to content

@kaiord/core


@kaiord/core / deriveExternalId

Function: deriveExternalId()

deriveExternalId(input): string

Defined in: packages/core/src/domain/ingest/derive-external-id.ts:11

Derives a stable external id for a health record from its payload + measuredAt timestamp.

The k1: prefix is a version tag: if the hash projection ever changes, the prefix can be bumped to k2: so downstream migration code can distinguish old ids from new ones without inspecting content.

Parameters

input

measuredAt

string

payload

Record<string, unknown>

Returns

string