{#each data.groups as group}
{@const first = group.items[0] ?? group.prio[0]}
{#if data.groupByStation}
{#if first.patient.room}
Station {first.patient.room?.station.name}
{:else}
Keine Station
{/if}
{:else}
{humanDate(dateFromYMD(first.current_version.date), false, true)}
{/if}
{#each group.prio as entry}
{/each}
{#each group.items as entry}
{/each}
{/each}