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}}</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 | <form method="post" action="/verlauf/{{.ID}}/loeschen" class="inline"><button type="submit" class="link" title="Löschen">✕</button></form> |
| 62 | </div> |
| 63 | {{with .Note}}<div class="session-note">{{.}}</div>{{end}} |
| 64 | </div> |
| 65 | {{else}}<p class="muted">Noch keine Behandlungen dokumentiert.</p>{{end}} |
| 66 | </article> |
| 67 | |
| 68 | <div class="grid"> |
| 69 | <article id="wissen"> |
| 70 | <h3>Wissen zum Fall</h3> |
| 71 | {{if .Linked}}<ul class="links">{{range .Linked}} |
| 72 | <li><span class="kind kind-{{.Kind}}">{{kindLabel .Kind}}</span> <a href="/eintrag/{{.ID}}">{{.Title}}</a> |
| 73 | <form method="post" action="/patient/{{$p.ID}}/wissen/{{.ID}}/loeschen" class="inline"><button type="submit" class="link" title="Entfernen">✕</button></form></li> |
| 74 | {{end}}</ul>{{else}}<p class="muted">Krankheitsbild oder Protokoll verknüpfen – dann sind Tests, Übungen und Quellen einen Klick entfernt.</p>{{end}} |
| 75 | {{if .Linkable}} |
| 76 | <form method="post" action="/patient/{{$p.ID}}/wissen" class="row"> |
| 77 | <select name="entry" aria-label="Eintrag" required><option value="">Eintrag wählen …</option> |
| 78 | {{range .Linkable}}<option value="{{.ID}}">{{kindLabel .Kind}}: {{.Title}}</option>{{end}} |
| 79 | </select> |
| 80 | <button type="submit" class="secondary">Verknüpfen</button> |
| 81 | </form> |
| 82 | {{end}} |
| 83 | </article> |
| 84 | |
| 85 | <article id="handouts"> |
| 86 | <h3>Heimprogramme</h3> |
| 87 | {{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}} |
| 88 | <form method="post" action="/patient/{{$p.ID}}/handout" class="row"> |
| 89 | <input name="title" placeholder="Titel, z. B. Woche 1" aria-label="Titel"> |
| 90 | <button type="submit" class="secondary">+ Handout</button> |
| 91 | </form> |
| 92 | </article> |
| 93 | </div> |
| 94 | |
| 95 | <details> |
| 96 | <summary>Stammdaten bearbeiten</summary> |
| 97 | <form method="post" action="/patient/{{$p.ID}}"> |
| 98 | <div class="grid"> |
| 99 | <label>Name <input name="name" value="{{$p.Name}}" required></label> |
| 100 | <label>Geburtsdatum/Alter <input name="dob" value="{{$p.Dob}}"></label> |
| 101 | <label>Telefon <input name="phone" value="{{$p.Phone}}"></label> |
| 102 | </div> |
| 103 | <label>Notizen <textarea name="notes" rows="3">{{$p.Notes}}</textarea></label> |
| 104 | <button type="submit">Speichern</button> |
| 105 | </form> |
| 106 | <div class="actions"> |
| 107 | <form method="post" action="/patient/{{$p.ID}}/archiv" class="inline"> |
| 108 | <input type="hidden" name="archiv" value="{{if $p.Archived}}0{{else}}1{{end}}"> |
| 109 | <button type="submit" class="secondary outline">{{if $p.Archived}}Aus Archiv holen{{else}}Archivieren (Behandlung abgeschlossen){{end}}</button> |
| 110 | </form> |
| 111 | <details class="danger"> |
| 112 | <summary>Patient löschen …</summary> |
| 113 | <form method="post" action="/patient/{{$p.ID}}/loeschen"> |
| 114 | <p>Alle Befunde, Behandlungen und Verknüpfungen von „{{$p.Name}}“ werden endgültig gelöscht.</p> |
| 115 | <button type="submit" class="danger">Endgültig löschen</button> |
| 116 | </form> |
| 117 | </details> |
| 118 | </div> |
| 119 | </details> |
| 120 | {{end}} |
| 121 |