timgremore
commited on
Commit
•
146e8af
1
Parent(s):
8b9fa1b
fix: Coding test
Browse files
test/medical_transcription/coding_test.exs
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
defmodule Medicode.CodingTest do
|
2 |
use Medicode.DataCase
|
3 |
|
|
|
4 |
import Medicode.TranscriptionChunksFixtures
|
5 |
|
6 |
alias Medicode.Coding
|
@@ -21,11 +22,13 @@ defmodule Medicode.CodingTest do
|
|
21 |
end
|
22 |
|
23 |
def create_code_feedback!(text, response, for_code) do
|
|
|
24 |
code_vector = Repo.one(from v in CodeVector, where: v.code == ^for_code)
|
25 |
text_vector = Coding.compute_vector_as_list(text)
|
26 |
|
27 |
changeset =
|
28 |
CodeFeedback.changeset(%CodeFeedback{}, %{
|
|
|
29 |
text: text,
|
30 |
text_vector: text_vector,
|
31 |
response: response,
|
|
|
1 |
defmodule Medicode.CodingTest do
|
2 |
use Medicode.DataCase
|
3 |
|
4 |
+
import Medicode.AccountsFixtures
|
5 |
import Medicode.TranscriptionChunksFixtures
|
6 |
|
7 |
alias Medicode.Coding
|
|
|
22 |
end
|
23 |
|
24 |
def create_code_feedback!(text, response, for_code) do
|
25 |
+
user = user_fixture()
|
26 |
code_vector = Repo.one(from v in CodeVector, where: v.code == ^for_code)
|
27 |
text_vector = Coding.compute_vector_as_list(text)
|
28 |
|
29 |
changeset =
|
30 |
CodeFeedback.changeset(%CodeFeedback{}, %{
|
31 |
+
user_id: user.id,
|
32 |
text: text,
|
33 |
text_vector: text_vector,
|
34 |
response: response,
|