MedEx.MeasurementEvent (med_ex v0.2.0)

Copy Markdown View Source

Sparse exact decimal measurements with explicit missing values and raw provenance.

Summary

Types

metric()

@type metric() ::
  {:value, integer(), -18..18, :unknown | String.t()} | {:missing, String.t()}

t()

@type t() :: %MedEx.MeasurementEvent{
  acquisition_id: String.t(),
  boot_id: String.t(),
  descriptor_ref: String.t(),
  device_status: :unknown | map(),
  device_time: :unknown | map(),
  event_id: String.t(),
  gateway_sequence: non_neg_integer(),
  metrics: %{required(String.t()) => metric()},
  provenance: [map()],
  raw: {:bytes, binary()} | {:sha256, String.t()},
  receipt_time: term(),
  schema_version: 1,
  source_epoch: non_neg_integer(),
  source_record_id: String.t() | nil,
  source_ref: String.t(),
  stream_id: String.t()
}

Functions

validate(e)