{{define "person-row"}} {{if .Name}}{{.Name}}{{else}}Geen naam{{end}} {{.Function}} {{.Address}} {{if .AGB}}AGB: {{.AGB}}{{end}} {{end}} {{define "medi-group-epi"}} {{$root := .}} {{if HasEndDates .Episodes }} {{end}} {{if eq .Extra.verbose_icpc_description "true"}} {{else}} {{end}} {{range .Episodes}} {{if HasEndDates $.Episodes }} {{end}} {{if eq $root.Extra.verbose_icpc_description "true"}} {{else}} {{if eq .Description ""}} {{else}} {{end}} {{end}} {{end}}
DatumEinddatumType ICPC BeschrijvingBeschrijving arts
{{.Date}}{{.EndDate}}{{.Type}} {{.ICPC}}{{.Title}} {{.Description}}{{.Title}}{{.Description}}
{{end}} {{define "medi-group-ica"}} {{$root := .}} {{if eq $root.Extra.verbose_icpc_description "true"}} {{else}} {{end}} {{range .Indicators}} {{if eq $root.Extra.verbose_icpc_description "true"}} {{else}} {{end}} {{end}}
Datum Type ICPC Beschrijving
{{.Date}} {{.Type}} {{.ICPC}} {{.Title}}{{.Description}}
{{end}}

Huisarts

{{template "person-row" .GP}} {{if .Pharmacy.Anchor}}{{template "person-row" .Pharmacy}}{{end}}
{{if .Practitioners}}

Medebehandelaren

{{range .Practitioners}} {{template "person-row" .}}{{end}}
{{end}}

Patiënt

Naam: {{.Patient.Name}} {{if .Patient.BSN}}
BSN: {{.Patient.BSN}} {{end}}
Geboortedatum: {{.Patient.Birthdate}}
Adres: {{.Patient.Address}}
Geslacht: {{.Patient.Gender}} {{range .Patient.OtherFields}}
{{.Key}}: {{.Value}} {{end}}
{{if .Memo}}

Memo

{{.Memo}}
{{end}} {{if .Episodes}}

Episodelijst

{{template "medi-group-epi" .}}
{{end}} {{if .Indicators}}

Contra-indicaties, interacties en allergieën

{{template "medi-group-ica" .}}
{{end}} {{if .Medication}}

Medicatieoverzicht

{{range $index, $med := .Medication}} {{if gt (len $med.Fold) 1}} {{range $fold := $med.Fold}} {{end}} {{else}} {{end}} {{end }}
Recept Gebruiksvoorschrift Hoeveelheid Ingang Vervalt
{{$med.Recipe}} {{$med.Instructions}} {{ YieldDosage $med }} {{$med.StartDate}} {{$med.EndDate}}
{{ if ne $med.Instructions $fold.Instructions}}{{$fold.Instructions}}{{else}}{{end}} {{ YieldDosage $fold }} {{$fold.StartDate}} {{$fold.EndDate}}
{{$med.Recipe}} {{$med.Instructions}} {{ YieldDosage $med }} {{$med.StartDate}} {{$med.EndDate}}
{{end}} {{if .Journal}}

Journaal

{{range .Journal}}
{{.Date}}
{{if .Results}}
{{range .Results}} {{end}}
Identificatie Resultaat Beschrijving
{{.Kind}} {{.Result}} {{if eq .Identification "Buiten normaalwaarde"}}{{.Identification}}{{else}}{{.Identification}}{{end}} {{if and .Identification .Description}}
{{end}} {{.Description}}
{{end}} {{range .Lines}}
{{if .SOEP}}
{{.SOEP}}: {{ConvertLinebreaks .Text}} {{end}} {{if .Kind}} {{.Kind}}{{if .Text}}:{{end}} {{ConvertLinebreaks .Text}} {{end}}
{{end}}
{{end}} {{end}} {{if .Extra.csrf_token }}

{{end}}