timgremore
commited on
Commit
•
ad34bdd
1
Parent(s):
8f56351
fix: Formatting
Browse files
test/medical_transcription/coding_test.exs
CHANGED
@@ -52,7 +52,8 @@ defmodule MedicalTranscription.CodingTest do
|
|
52 |
{:ok, input_chunk: input_chunk, feedback_chunk: feedback_chunk}
|
53 |
end
|
54 |
|
55 |
-
test "Codes can be weighted multiple times when multiple prior feedback items exist for a single code",
|
|
|
56 |
# One negative feedback item moves the code from 1st to 4th (x0.9).
|
57 |
# The net result of 2 negative and 1 positive (x0.891) is to remove the code from the results.
|
58 |
create_code_feedback!(@feedback_text, false, "74685")
|
@@ -64,7 +65,8 @@ defmodule MedicalTranscription.CodingTest do
|
|
64 |
assert Enum.all?(results, &(&1.weighting == [:none]))
|
65 |
end
|
66 |
|
67 |
-
test "Weighting can cause codes to appear in results that wouldn't have been included from the initial similarity query",
|
|
|
68 |
# E.g. weighting up a code that isn't in the initial results
|
69 |
create_code_feedback!(@feedback_text, true, "V4589")
|
70 |
results = Coding.process_chunk(chunk)
|
@@ -103,7 +105,9 @@ defmodule MedicalTranscription.CodingTest do
|
|
103 |
assert Enum.map(results, & &1.weighting) == [[:none], [:none], [:none], [:negative]]
|
104 |
end
|
105 |
|
106 |
-
test "Code with low similarity score is removed from result when prior negative feedback", %{
|
|
|
|
|
107 |
create_code_feedback!(@feedback_text, false, "V717")
|
108 |
results = Coding.process_chunk(chunk)
|
109 |
|
|
|
52 |
{:ok, input_chunk: input_chunk, feedback_chunk: feedback_chunk}
|
53 |
end
|
54 |
|
55 |
+
test "Codes can be weighted multiple times when multiple prior feedback items exist for a single code",
|
56 |
+
%{input_chunk: chunk} do
|
57 |
# One negative feedback item moves the code from 1st to 4th (x0.9).
|
58 |
# The net result of 2 negative and 1 positive (x0.891) is to remove the code from the results.
|
59 |
create_code_feedback!(@feedback_text, false, "74685")
|
|
|
65 |
assert Enum.all?(results, &(&1.weighting == [:none]))
|
66 |
end
|
67 |
|
68 |
+
test "Weighting can cause codes to appear in results that wouldn't have been included from the initial similarity query",
|
69 |
+
%{input_chunk: chunk} do
|
70 |
# E.g. weighting up a code that isn't in the initial results
|
71 |
create_code_feedback!(@feedback_text, true, "V4589")
|
72 |
results = Coding.process_chunk(chunk)
|
|
|
105 |
assert Enum.map(results, & &1.weighting) == [[:none], [:none], [:none], [:negative]]
|
106 |
end
|
107 |
|
108 |
+
test "Code with low similarity score is removed from result when prior negative feedback", %{
|
109 |
+
input_chunk: chunk
|
110 |
+
} do
|
111 |
create_code_feedback!(@feedback_text, false, "V717")
|
112 |
results = Coding.process_chunk(chunk)
|
113 |
|