AuditLogRow
ComplexAccess
<co-audit-log-row>AuditLogRow is one audit entry: time, action, user and role, what changed, patient, IP and reason, with old and new values.
import { AuditLogRow } from 'health-components';
Examples
Log
Actions
Usage
<AuditLogRow event={{ time: "10/09 10:42", action: "btg", user: "Ana Ortiz MD", role: "Provider", what: "opened chart", patient: "Nora Scott", reason: "Emergency treatment" }} />
When to use
- Audit log, privacy review, break-the-glass review.
When not to use
- Clinical history: Timeline.
Variants and states
| Variant | What it is |
|---|---|
| actions | view, edit, delete, export, btg, login, sign. |
| change | Old and new value chip. |
Accessibility
- Action has icon and word.
Do and don't
- Do: Show reason for break the glass.
- Don't: Allow editing audit rows.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
event * | AuditLogEvent | — | {time, action, user, role, what, patient?, ip?, reason?, change?}; required |
Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, plus className and event handlers on the root element.
Angular, Vue and HTML
Register the elements once (Angular guide), then use <co-audit-log-row>. Attributes take strings; arrays and objects are set as properties (Angular [prop], Vue :prop) or as JSON attributes. Callbacks are DOM events with the value in event.detail.
Angular template
<co-audit-log-row default-checked auto-focus [event]="event"></co-audit-log-row>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | event | {time, action, user, role, what, patient?, ip?, reason?, change?}; required |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus |