compare.html
| 1 | {{define "title"}}Vergleich – {{.P.Name}}{{end}} |
| 2 | {{define "content"}} |
| 3 | <nav aria-label="breadcrumb"><ul><li><a href="/patienten">Patienten</a></li><li><a href="/patient/{{.P.ID}}">{{.P.Name}}</a></li><li>Vergleich</li></ul></nav> |
| 4 | <h2>Befundvergleich</h2> |
| 5 | {{if lt (len .Befunde) 2}}<p class="muted">Für einen Vergleich werden mindestens zwei Befunde benötigt.</p>{{else}} |
| 6 | <form method="get" action="/patient/{{.P.ID}}/vergleich" class="row compare-pick"> |
| 7 | <select name="a" aria-label="Ausgangsbefund">{{range .Befunde}}<option value="{{.ID}}"{{if and $.A (eq .ID $.A.ID)}} selected{{end}}>{{de .Date}} – {{.Title}}</option>{{end}}</select> |
| 8 | <span class="arrow" aria-hidden="true">→</span> |
| 9 | <select name="b" aria-label="Vergleichsbefund">{{range .Befunde}}<option value="{{.ID}}"{{if and $.B (eq .ID $.B.ID)}} selected{{end}}>{{de .Date}} – {{.Title}}</option>{{end}}</select> |
| 10 | <button type="submit">Vergleichen</button> |
| 11 | </form> |
| 12 | |
| 13 | {{if .A}} |
| 14 | {{range .Tables}} |
| 15 | <article> |
| 16 | <h3>{{.Title}}</h3> |
| 17 | <div class="tablewrap"><table class="list"> |
| 18 | <thead><tr><th></th><th>Wert</th><th>{{de $.A.Date}}</th><th>{{de $.B.Date}}</th><th>Δ</th></tr></thead> |
| 19 | <tbody> |
| 20 | {{range .Rows}}{{$k := .Key}}{{range $i, $c := .Cells}} |
| 21 | <tr><td>{{if eq $i 0}}<strong>{{$k}}</strong>{{end}}</td><td class="muted">{{$c.Label}}</td><td>{{$c.A}}</td><td>{{$c.B}}</td><td class="delta">{{$c.Delta}}</td></tr> |
| 22 | {{end}}{{end}} |
| 23 | </tbody> |
| 24 | </table></div> |
| 25 | </article> |
| 26 | {{end}} |
| 27 | |
| 28 | <article> |
| 29 | <h3>Geänderte Angaben</h3> |
| 30 | {{if .Fields}} |
| 31 | <div class="tablewrap"><table class="list cmp"> |
| 32 | <thead><tr><th>Feld</th><th>{{de .A.Date}} – {{.A.Title}}</th><th>{{de .B.Date}} – {{.B.Title}}</th></tr></thead> |
| 33 | <tbody>{{range .Fields}}<tr><td><small class="muted">{{.Section}}</small><br>{{.Label}}</td><td class="pre">{{.A}}</td><td class="pre">{{.B}}</td></tr>{{end}}</tbody> |
| 34 | </table></div> |
| 35 | {{else}}<p class="muted">Keine Unterschiede in den Textfeldern.</p>{{end}} |
| 36 | </article> |
| 37 | <p class="muted"><small>Δ = Differenz der Zahlenwerte (bei Neutral-Null je Position, nur geänderte). Ob eine Änderung klinisch relevant ist, hängt vom Instrument ab (MCID) – bei NRS und PSFS meist ca. 2 Punkte.</small></p> |
| 38 | {{end}} |
| 39 | {{end}} |
| 40 | {{end}} |
| 41 |