noahsettersten
commited on
Commit
•
90dc507
1
Parent(s):
1532ad8
test: Clean up test names
Browse files
test/medical_transcription/coding_test.exs
CHANGED
@@ -47,7 +47,7 @@ defmodule MedicalTranscription.CodingTest do
|
|
47 |
@input_text "This 55-year-old man with known coronary artery disease comes for a follow-up visit today."
|
48 |
@feedback_text "A 42-year-old man arrived for a return check-up who had a past history of coronary artery disease."
|
49 |
|
50 |
-
test "
|
51 |
# One negative feedback item moves the code from 1st to 4th (x0.9).
|
52 |
# The net result of 2 negative and 1 positive (x0.891) is to remove the code from the results.
|
53 |
create_code_feedback!(@feedback_text, false, "74685")
|
@@ -59,7 +59,7 @@ defmodule MedicalTranscription.CodingTest do
|
|
59 |
assert Enum.all?(results, &(&1.weighting == [:none]))
|
60 |
end
|
61 |
|
62 |
-
test "Weighting
|
63 |
# E.g. weighting up a code that isn't in the initial results
|
64 |
create_code_feedback!(@feedback_text, true, "V4589")
|
65 |
results = Coding.process_chunk(@input_text)
|
|
|
47 |
@input_text "This 55-year-old man with known coronary artery disease comes for a follow-up visit today."
|
48 |
@feedback_text "A 42-year-old man arrived for a return check-up who had a past history of coronary artery disease."
|
49 |
|
50 |
+
test "Codes can be weighted multiple times when multiple prior feedback items exist for a single code" do
|
51 |
# One negative feedback item moves the code from 1st to 4th (x0.9).
|
52 |
# The net result of 2 negative and 1 positive (x0.891) is to remove the code from the results.
|
53 |
create_code_feedback!(@feedback_text, false, "74685")
|
|
|
59 |
assert Enum.all?(results, &(&1.weighting == [:none]))
|
60 |
end
|
61 |
|
62 |
+
test "Weighting can cause codes to appear in results that wouldn't have been included from the initial similarity query" do
|
63 |
# E.g. weighting up a code that isn't in the initial results
|
64 |
create_code_feedback!(@feedback_text, true, "V4589")
|
65 |
results = Coding.process_chunk(@input_text)
|