Commit
•
157d2d3
1
Parent(s):
69739b2
docs: `tag_result` doc, attributes, and story
Browse files
lib/medical_transcription_web/components/components.ex
CHANGED
@@ -155,6 +155,17 @@ defmodule MedicalTranscriptionWeb.Components do
|
|
155 |
"""
|
156 |
end
|
157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
def tag_result(assigns) do
|
159 |
~H"""
|
160 |
<div class="flex items-center gap-4 px-[14px] py-3 text-sm">
|
|
|
155 |
"""
|
156 |
end
|
157 |
|
158 |
+
attr :code_vector_id, :string, required: true
|
159 |
+
attr :text, :string, required: true
|
160 |
+
attr :score, :float, required: true
|
161 |
+
attr :weighting, :list, required: true
|
162 |
+
attr :code, :string, required: true
|
163 |
+
attr :label, :string, required: true
|
164 |
+
|
165 |
+
@doc """
|
166 |
+
Display a single code and its description, along with buttons to provide feedback on the relevance of the code to the
|
167 |
+
passed transcribed `text`.
|
168 |
+
"""
|
169 |
def tag_result(assigns) do
|
170 |
~H"""
|
171 |
<div class="flex items-center gap-4 px-[14px] py-3 text-sm">
|
storybook/components/tag_result.story.exs
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
defmodule MedicalTranscriptionWeb.Storybook.TagResult do
|
2 |
+
use PhoenixStorybook.Story, :component
|
3 |
+
|
4 |
+
def function, do: &MedicalTranscriptionWeb.Components.tag_result/1
|
5 |
+
|
6 |
+
def variations do
|
7 |
+
[
|
8 |
+
%Variation{
|
9 |
+
id: :default,
|
10 |
+
attributes: %{
|
11 |
+
code_vector_id: 1,
|
12 |
+
text:
|
13 |
+
"This 55-year-old man with known coronary artery disease comes for a follow-up visit today. ",
|
14 |
+
score: 1.07,
|
15 |
+
weighting: [:positive, :positive],
|
16 |
+
code: "74685",
|
17 |
+
label: "Coronary artery anomaly"
|
18 |
+
}
|
19 |
+
}
|
20 |
+
]
|
21 |
+
end
|
22 |
+
end
|