Commit
•
a4478d7
1
Parent(s):
408b86f
chore: Use new `TagResult` struct for semantic search results
Browse files
lib/medical_transcription_web/live/home_live/index.ex
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
defmodule MedicalTranscriptionWeb.HomeLive.Index do
|
2 |
use MedicalTranscriptionWeb, :live_view
|
|
|
3 |
|
4 |
@impl Phoenix.LiveView
|
5 |
def mount(_params, _session, socket) do
|
@@ -42,11 +43,15 @@ defmodule MedicalTranscriptionWeb.HomeLive.Index do
|
|
42 |
</div>
|
43 |
<% end %>
|
44 |
|
45 |
-
<.table id="streamed_result" rows={@streams.transcription_rows}>
|
46 |
-
<:col :let={row} label="Start"><%=
|
47 |
-
<:col :let={row} label="End"><%=
|
48 |
-
<:col :let={row} label="Text"><%=
|
49 |
-
<:col :let={row} label="Codes"
|
|
|
|
|
|
|
|
|
50 |
</.table>
|
51 |
</div>
|
52 |
</form>
|
|
|
1 |
defmodule MedicalTranscriptionWeb.HomeLive.Index do
|
2 |
use MedicalTranscriptionWeb, :live_view
|
3 |
+
alias AudioTagger.Classifier.TagResult
|
4 |
|
5 |
@impl Phoenix.LiveView
|
6 |
def mount(_params, _session, socket) do
|
|
|
43 |
</div>
|
44 |
<% end %>
|
45 |
|
46 |
+
<.table id="streamed_result" rows={@streams.transcription_rows} row_item={fn {_dom_id, row} -> row end}>
|
47 |
+
<:col :let={row} label="Start"><%= row.start_mark %></:col>
|
48 |
+
<:col :let={row} label="End"><%= row.end_mark %></:col>
|
49 |
+
<:col :let={row} label="Text"><%= row.text %></:col>
|
50 |
+
<:col :let={row} label="Codes">
|
51 |
+
<%= for %TagResult{code: code, label: label, score: score} <- row.tags do %>
|
52 |
+
<%= "#{code}: #{label} (#{score})" %>
|
53 |
+
<% end %>
|
54 |
+
</:col>
|
55 |
</.table>
|
56 |
</div>
|
57 |
</form>
|