MedicationRecordListItem is one medicine in a medication record list, with its status and when it applies. It renders as a <li>. Every word is the consumer's.
Status: experimental — new, implemented and unit-tested in every headless library; not yet exercised in a composed flow.
Example
ramipril 5 mg capsule, oral, once a day Active
Show demo markup
<ul class="medication-record-list" data-status="known" aria-label="Current medicines"><li class="medication-record-list-item" data-status="active">ramipril 5 mg capsule, oral, once a day <span class="medication-record-list-item-status">Active</span> <time class="medication-record-list-item-effective" datetime="2025-03-03">Since 3 Mar 2025</time></li></ul>
Usage example
<MedicationRecordListItem
status="active"
statusLabel="Active"
effective="2025-03-03"
effectiveLabel="Since 3 Mar 2025"
>
ramipril 5 mg capsule, oral, once a day
</MedicationRecordListItem>
Show Svelte source
// In your Svelte component:
import MedicationRecordListItem from "lily-design-system-svelte-headless/components/MedicationRecordListItem/MedicationRecordListItem.svelte";
<MedicationRecordListItem>
<!-- content -->
</MedicationRecordListItem>
Usage
<MedicationRecordListItem
status="active"
statusLabel="Active"
effective="2025-03-03"
effectiveLabel="Since 3 Mar 2025"
>
ramipril 5 mg capsule, oral, once a day
</MedicationRecordListItem>
Props
subjectLabel: string (optional) -- whose record it is, when it is not the patient's ("Mother", "Fetus 1"); rendered first as -subject, so a relative's history is never read as the patient's
children: slot — the medicine, usually a MedicationView
statusLabel: string (optional; required when status is set) — the status in words
effective: string (optional) — when the medicine applies, for <time datetime>
effectiveLabel: string (optional) — that date as the consumer writes it; the <time> shows only when set
...restProps: any — additional HTML attributes spread onto the root
Keyboard Interactions
None. This is not an interactive component.
ARIA
No ARIA beyond the native <li>; every status is text, never colour alone
When to Use
Use inside medication-record-list for each entry.
Use when the entry's statuses and dates matter to the reader.
When Not to Use
Do not use outside a medication-record-list.
Do not use for "none known" or "not recorded" — that is the list's status.
Headless
This headless component ships zero CSS and decides nothing visual. The consumer provides all styling targeting the .medication-record-list-item class hook, and every word.
Styles
.medication-record-list-item and its parts, and [data-status].
Testing
Each part renders, each status as text and as data-*, dates as <time datetime>
Only the given parts render
A status without words raises a development warning
Advice
Take every word from your own translation, including the status words; Lily ships none.
Map FHIR codes to these values in your code; Lily does not read FHIR resources.
Format dates with Intl.DateTimeFormat, with the month as text so they cannot be read two ways.
Implementation Notes
Renders <li class="medication-record-list-item"> with parts -status, -effective
status (active, completed, entered-in-error, intended, stopped, on-hold, unknown, not-taken) renders as data-status, and statusLabel as text; a status without words raises a development warning
-effective is a <time datetime>, shown only when its label is given
Related components
medication-record-list — a list of a patient's medicines, whose status is never blank
Generated from this component's canonical metadata — the machine-checked source the implementations are held to.
Metadata
Component: medication-record-list-item
PascalCase: MedicationRecordListItem
Description: one medicine in a medication record list, with its status and when it applies
Status: experimental — new, implemented and unit-tested in every headless library; not yet exercised in a composed flow
HTML tag: <li>
CSS class: .medication-record-list-item
Interactive: no
ARIA
No ARIA beyond the native <li>; every status is text, never colour alone
Keyboard
Not interactive
Props
subjectLabel: string (optional) -- whose record it is, when it is not the patient's ("Mother", "Fetus 1"); rendered first as -subject, so a relative's history is never read as the patient's
children: slot — the medicine, usually a MedicationView