Seleccionar idstudy segun identifierfield para redirect

This commit is contained in:
2025-10-28 09:47:34 -03:00
parent 5c0d6cf828
commit 5625cb3bb1

View File

@ -79,13 +79,13 @@ defmodule ApiWeb.Redirect do
query =
if studyidentifier == "IDSTUDY" do
from s in "study",
where: s.accessionnumber == ^accessionnumber,
where: s.accessionnumber == ^accession,
select: %{
idstudy: s.idstudy
}
else
from s in "study",
where: s.accessionnumber == ^accessionnumber,
where: s.accessionnumber == ^accession,
select: %{
idstudy: s.idstudy
}