{{define "patients"}}
{{if .KpiFilter}}
KPI Filter: {{if eq .KpiFilter "invited"}}Invited Staff{{end}} {{if eq .KpiFilter "total_staff"}}Total Staff{{end}} {{if eq .KpiFilter "inprogress"}}In Progress{{end}} {{if eq .KpiFilter "checkedout"}}Checked Out{{end}}
{{end}}
{{template "patients-rows-content" .}}
{{if .HasMore}}Memuat data berikutnya...{{else}}Semua data sudah ditampilkan{{end}}
{{end}} {{define "patients-rows"}}
{{template "patients-rows-content" .}}
{{end}} {{define "patients-rows-content"}} {{if not .Patients}}

Belum ada data pasien pada filter ini.

{{else}} {{range .Patients}} {{if and (gt .DoneCount 0) (eq .DoneCount (len .Stations))}}
{{else}}
{{end}}
{{.Name | initials}}

{{.Name}}

{{if $.IsRange}}

{{.Date | fmtDate}}

{{end}}
Check-in: {{if .InTime}}{{.InTime}}{{else}}-{{end}} {{if and .InTime .HasOut}} Check-out: {{.OutTime}} {{else if .InTime}} In Progress {{end}} {{if eq .ProgressStatus "done"}} Done {{else if eq .ProgressStatus "partial"}} Progress / Partial {{else}} Not Yet {{end}} {{.DoneCount}}/{{len .Stations}} station selesai
{{if .Stations}}
{{range .Stations}} {{if .Done}}
{{.Station}} Process: {{if .ProcessAt}}{{.ProcessAt}}{{else}}-{{end}} | Done: {{if .DoneAt}}{{.DoneAt}}{{else}}-{{end}}
{{else if .Progress}}
{{.Station}} Process: {{if .ProcessAt}}{{.ProcessAt}}{{else}}-{{end}} | Done: {{if .DoneAt}}{{.DoneAt}}{{else}}-{{end}}
{{else}}
{{.Station}} Process: {{if .ProcessAt}}{{.ProcessAt}}{{else}}-{{end}} | Done: {{if .DoneAt}}{{.DoneAt}}{{else}}-{{end}}
{{end}} {{end}}
{{end}}
{{end}} {{end}} {{end}}