diff --git a/lib/api_web/live/index_live.ex b/lib/api_web/live/index_live.ex index be5f8ec..1f712e8 100644 --- a/lib/api_web/live/index_live.ex +++ b/lib/api_web/live/index_live.ex @@ -122,6 +122,7 @@ defmodule ApiWeb.IndexLive do join: p in "patient", on: p.idpatient == s.idpatient, left_join: sr in "studyreport", on: sr.idstudy == s.idstudy, + left_join: st in "statuses", on: st.idstatus == sr.idstatus, where: p.patientid == ^patientid, select: %{ idstudy: s.idstudy, @@ -133,7 +134,7 @@ defmodule ApiWeb.IndexLive do accession: s.accessionnumber, patientname: p.patientname, status: sr.idstatus, - statusname: sr.statusname, + statusname: st.statusname, studydescription: s.studydescription }, order_by: [desc: s.studydate]