Vetspire.Events.Event (vetspire v3.0.0)

View Source

Event log entry, used for auditing and reporting.

Summary

Functions

If the only metadata filter is encounter_id, we will extract the ids and pick all events for those.

Types

t()

@type t() :: %Vetspire.Events.Event{
  __meta__: term(),
  id: term(),
  inserted_at: term(),
  location: term(),
  location_id: term(),
  metadata: term(),
  org: term(),
  org_id: term(),
  provider: term(),
  provider_id: term(),
  type: term(),
  updated_at: term()
}

Functions

changeset(event, attrs \\ %{})

query_metadata(query, metadata)

If the only metadata filter is encounter_id, we will extract the ids and pick all events for those.

Otherwise, it does exact matching on any other metadata filters.

Potential improvement for the future: allow mixing of encounter_id and other metadata filters.