patient.html
| 1 | {{define "title"}}{{.P.Name}}{{end}} |
| 2 | {{define "content"}} |
| 3 | {{$p := .P}} |
| 4 | <nav aria-label="breadcrumb"><ul><li><a href="/patienten">Patienten</a></li><li>{{$p.Name}}</li></ul></nav> |
| 5 | <header class="patient-head"> |
| 6 | <h1>{{$p.Name}}{{if $p.Archived}} <small class="muted">(archiviert)</small>{{end}}</h1> |
| 7 | <p class="muted">{{with $p.Dob}}geb. {{.}}{{end}}{{with $p.Phone}} · {{.}}{{end}}{{with $p.Email}} · {{.}}{{if not $p.EmailConsent}} (keine E-Mail-Einwilligung){{end}}{{end}}</p> |
| 8 | </header> |
| 9 | |
| 10 | <article id="befunde"> |
| 11 | <h3>Befunde</h3> |
| 12 | {{if .Befunde}} |
| 13 | <div class="tablewrap"> |
| 14 | <table class="list"> |
| 15 | <thead><tr><th>Datum</th><th>Befund</th><th class="hide-sm">Diagnose</th><th></th></tr></thead> |
| 16 | <tbody> |
| 17 | {{range .Befunde}} |
| 18 | <tr><td>{{de .Date}}</td><td><a href="/befund/{{.ID}}"><strong>{{.Title}}</strong></a></td><td class="muted hide-sm">{{diag .Data}}</td> |
| 19 | <td class="nowrap"><a href="/befund/{{.ID}}/druck" target="_blank">Druck</a></td></tr> |
| 20 | {{end}} |
| 21 | </tbody> |
| 22 | </table> |
| 23 | </div> |
| 24 | {{else}}<p class="muted">Noch kein Befund.</p>{{end}} |
| 25 | <div class="actions"> |
| 26 | <form method="post" action="/patient/{{$p.ID}}/befund" class="inline"><button type="submit">+ Erstbefund (leer)</button></form> |
| 27 | {{with .Befunde}}{{$last := index . 0}} |
| 28 | <form method="post" action="/patient/{{$p.ID}}/befund" class="inline"> |
| 29 | <input type="hidden" name="kopie" value="{{$last.ID}}"> |
| 30 | <button type="submit" class="secondary" title="Übernimmt alle Angaben aus dem letzten Befund – nur Veränderungen neu erfassen">+ Wiederbefund (Kopie vom {{de $last.Date}})</button> |
| 31 | </form> |
| 32 | {{if gt (len .) 1}}<a role="button" class="outline" href="/patient/{{$p.ID}}/vergleich">Befunde vergleichen</a>{{end}} |
| 33 | {{end}} |
| 34 | </div> |
| 35 | </article> |
| 36 | |
| 37 | {{if gt (len .Trend) 1}} |
| 38 | <article id="trend"> |
| 39 | <h3>Verlauf der Kernwerte</h3> |
| 40 | <div class="tablewrap"> |
| 41 | <table class="list"> |
| 42 | <thead><tr><th>Datum</th><th class="hide-sm">Befund</th><th>NRS jetzt</th><th>NRS max</th><th>PSFS Ø</th></tr></thead> |
| 43 | <tbody>{{range .Trend}}<tr><td>{{de .Date}}</td><td class="hide-sm"><a href="/befund/{{.ID}}">{{.Title}}</a></td><td>{{.Now}}</td><td>{{.Worst}}</td><td>{{.PSFS}}</td></tr>{{end}}</tbody> |
| 44 | </table> |
| 45 | </div> |
| 46 | <small class="muted">Orientierung: Änderungen um etwa 2 Punkte auf NRS bzw. PSFS gelten in Studien häufig als klinisch relevant. Details im Vergleich.</small> |
| 47 | </article> |
| 48 | {{end}} |
| 49 | |
| 50 | <article id="verlauf"> |
| 51 | <h3>Behandlungsverlauf</h3> |
| 52 | <form method="post" action="/patient/{{$p.ID}}/verlauf" class="session-form"> |
| 53 | <input type="date" name="date" value="{{.Today}}" aria-label="Datum"> |
| 54 | <input name="goal" placeholder="Ziel + Maßnahme(n)" aria-label="Ziel und Maßnahmen"> |
| 55 | <textarea name="note" rows="2" placeholder="Reaktion, Re-Test, Bemerkung" aria-label="Bemerkung"></textarea> |
| 56 | <button type="submit">+ Eintrag</button> |
| 57 | </form> |
| 58 | {{range .Sessions}} |
| 59 | <div class="session"> |
| 60 | <div class="session-head"><strong>{{de .Date}}</strong> {{.Goal}} |
| 61 | <span class="session-actions"> |
| 62 | <form method="post" action="/verlauf/{{.ID}}/zusammenfassung" class="inline"><button type="submit" class="link small-link" title="Zusammenfassung dieser Behandlung für den Patienten">📝 Für Patient</button></form> |
| 63 | <form method="post" action="/verlauf/{{.ID}}/loeschen" class="inline"><button type="submit" class="link" title="Löschen">✕</button></form> |
| 64 | </span> |
| 65 | </div> |
| 66 | {{with .Note}}<div class="session-note">{{.}}</div>{{end}} |
| 67 | </div> |
| 68 | {{else}}<p class="muted">Noch keine Behandlungen dokumentiert.</p>{{end}} |
| 69 | </article> |
| 70 | |
| 71 | <article id="zusammenfassungen"> |
| 72 | <h3>Zusammenfassungen für den Patienten</h3> |
| 73 | {{if .Summaries}} |
| 74 | <ul class="summaries">{{range .Summaries}} |
| 75 | <li><a href="/zusammenfassung/{{.ID}}"><strong>{{.Title}}</strong></a> |
| 76 | <small class="muted">{{de .Date}} · {{if eq .Kind "gesamt"}}Gesamt{{else}}Behandlung{{end}}</small> |
| 77 | <a href="/zusammenfassung/{{.ID}}/druck" target="_blank" class="small-link">Druck</a></li> |
| 78 | {{end}}</ul> |
| 79 | {{else}}<p class="muted">Zum Mitgeben: eine Gesamtzusammenfassung (Beschwerden, Ziele, Plan, Übungen, Fortschritt) oder nach jeder Behandlung über „📝 Für Patient“ im Behandlungsverlauf.</p>{{end}} |
| 80 | <form method="post" action="/patient/{{$p.ID}}/zusammenfassung" class="inline"><button type="submit" class="secondary">+ Gesamtzusammenfassung</button></form> |
| 81 | </article> |
| 82 | |
| 83 | <article id="dokumente"> |
| 84 | <h3>Dokumente</h3> |
| 85 | {{if .Docs}} |
| 86 | <div class="docs"> |
| 87 | {{range .Docs}} |
| 88 | <figure class="doc"> |
| 89 | <a href="/dokumente/{{.Filename}}" target="_blank" class="doc-preview"> |
| 90 | {{if isImage .Filename}}<img src="/dokumente/{{.Filename}}" alt="{{.Title}}" loading="lazy"> |
| 91 | {{else if isPDF .Filename}}<span class="doc-icon">PDF</span> |
| 92 | {{else}}<span class="doc-icon">{{.Original}}</span>{{end}} |
| 93 | </a> |
| 94 | <figcaption> |
| 95 | <a href="/dokumente/{{.Filename}}" target="_blank"><strong>{{.Title}}</strong></a> |
| 96 | <small class="muted">{{de .Date}}{{with .Category}} · {{.}}{{end}} · {{size .Size}}</small> |
| 97 | <form method="post" action="/dokument/{{.ID}}/loeschen" class="inline"><button type="submit" class="link" title="Dokument löschen">✕</button></form> |
| 98 | </figcaption> |
| 99 | </figure> |
| 100 | {{end}} |
| 101 | </div> |
| 102 | {{else}}<p class="muted">Noch keine Dokumente. Verordnungen, Arztbriefe, Bildgebung oder Fotos hier ablegen.</p>{{end}} |
| 103 | <form method="post" action="/patient/{{$p.ID}}/dokumente" enctype="multipart/form-data" class="doc-form"> |
| 104 | <input type="file" name="files" accept="application/pdf,image/*,.heic,.heif,.tif,.tiff" multiple required aria-label="Dateien (PDF oder Foto)"> |
| 105 | <input name="title" placeholder="Titel (optional, sonst Dateiname)" aria-label="Titel"> |
| 106 | <input name="category" list="dl-doccat" placeholder="Kategorie" aria-label="Kategorie"> |
| 107 | <datalist id="dl-doccat">{{range .DocCategories}}<option value="{{.}}">{{end}}</datalist> |
| 108 | <input type="date" name="date" value="{{.Today}}" aria-label="Datum des Dokuments"> |
| 109 | <button type="submit">Hochladen</button> |
| 110 | </form> |
| 111 | <small class="muted">Mehrere Dateien auf einmal möglich. Auf Handy/Tablet kann direkt fotografiert werden.</small> |
| 112 | </article> |
| 113 | |
| 114 | <div class="grid"> |
| 115 | <article id="wissen"> |
| 116 | <h3>Wissen zum Fall</h3> |
| 117 | {{if .Linked}}<ul class="links">{{range .Linked}} |
| 118 | <li><span class="kind kind-{{.Kind}}">{{kindLabel .Kind}}</span> <a href="/eintrag/{{.ID}}">{{.Title}}</a> |
| 119 | <form method="post" action="/patient/{{$p.ID}}/wissen/{{.ID}}/loeschen" class="inline"><button type="submit" class="link" title="Entfernen">✕</button></form></li> |
| 120 | {{end}}</ul>{{else}}<p class="muted">Krankheitsbild oder Protokoll verknüpfen – dann sind Tests, Übungen und Quellen einen Klick entfernt.</p>{{end}} |
| 121 | {{if .Linkable}} |
| 122 | <form method="post" action="/patient/{{$p.ID}}/wissen" class="row"> |
| 123 | <select name="entry" aria-label="Eintrag" required><option value="">Eintrag wählen …</option> |
| 124 | {{range .Linkable}}<option value="{{.ID}}">{{kindLabel .Kind}}: {{.Title}}</option>{{end}} |
| 125 | </select> |
| 126 | <button type="submit" class="secondary">Verknüpfen</button> |
| 127 | </form> |
| 128 | {{end}} |
| 129 | </article> |
| 130 | |
| 131 | <article id="handouts"> |
| 132 | <h3>Heimprogramme</h3> |
| 133 | {{if .Handouts}}<ul>{{range .Handouts}}<li><a href="/handout/{{.ID}}">{{.Title}}</a> <small class="muted">{{.Count}} Übung(en) · {{date .Updated}}</small></li>{{end}}</ul>{{end}} |
| 134 | <form method="post" action="/patient/{{$p.ID}}/handout" class="row"> |
| 135 | <input name="title" placeholder="Titel, z. B. Woche 1" aria-label="Titel"> |
| 136 | <button type="submit" class="secondary">+ Handout</button> |
| 137 | </form> |
| 138 | </article> |
| 139 | </div> |
| 140 | |
| 141 | <details> |
| 142 | <summary>Stammdaten bearbeiten</summary> |
| 143 | <form method="post" action="/patient/{{$p.ID}}"> |
| 144 | <div class="grid"> |
| 145 | <label>Name <input name="name" value="{{$p.Name}}" required></label> |
| 146 | <label>Geburtsdatum/Alter <input name="dob" value="{{$p.Dob}}"></label> |
| 147 | <label>Telefon <input name="phone" value="{{$p.Phone}}"></label> |
| 148 | </div> |
| 149 | <label>E-Mail <input type="email" name="email" value="{{$p.Email}}" autocomplete="off"></label> |
| 150 | <label class="consent"><input type="checkbox" name="email_consent" value="1"{{if $p.EmailConsent}} checked{{end}}> |
| 151 | Patient ist einverstanden, Zusammenfassungen mit Gesundheitsinformationen per E-Mail zu erhalten |
| 152 | (Einwilligung nach Art. 9 DSGVO, schriftlich dokumentieren – z. B. unter „Dokumente“).</label> |
| 153 | <label>Notizen <textarea name="notes" rows="3">{{$p.Notes}}</textarea></label> |
| 154 | <button type="submit">Speichern</button> |
| 155 | </form> |
| 156 | <div class="actions"> |
| 157 | <form method="post" action="/patient/{{$p.ID}}/archiv" class="inline"> |
| 158 | <input type="hidden" name="archiv" value="{{if $p.Archived}}0{{else}}1{{end}}"> |
| 159 | <button type="submit" class="secondary outline">{{if $p.Archived}}Aus Archiv holen{{else}}Archivieren (Behandlung abgeschlossen){{end}}</button> |
| 160 | </form> |
| 161 | <details class="danger"> |
| 162 | <summary>Patient löschen …</summary> |
| 163 | <form method="post" action="/patient/{{$p.ID}}/loeschen"> |
| 164 | <p>Alle Befunde, Behandlungen und Verknüpfungen von „{{$p.Name}}“ werden endgültig gelöscht.</p> |
| 165 | <button type="submit" class="danger">Endgültig löschen</button> |
| 166 | </form> |
| 167 | </details> |
| 168 | </div> |
| 169 | </details> |
| 170 | {{end}} |
| 171 |