|
defmodule MedicodeWeb.Storybook.KeywordHighlighter do |
|
use PhoenixStorybook.Story, :component |
|
|
|
alias Medicode.Transcriptions.TranscriptionChunkKeyword |
|
|
|
def function, do: &MedicodeWeb.Components.KeywordHighlighter.highlight/1 |
|
|
|
def variations do |
|
[ |
|
%Variation{ |
|
id: :default, |
|
attributes: %{ |
|
text: |
|
" This 55-year-old man with known coronary artery disease comes for a follow-up visit today. ", |
|
keywords: [ |
|
%TranscriptionChunkKeyword{ |
|
score: 0.92, |
|
keyword: "known coronary artery disease" |
|
}, |
|
%TranscriptionChunkKeyword{score: 0.77, keyword: "visit today"} |
|
] |
|
} |
|
} |
|
] |
|
end |
|
end |
|
|