Skip to content

Commit

Permalink
modified sql query in download_from_selection in case of instance dow…
Browse files Browse the repository at this point in the history
…nload to be able to catch attributes necessary for hierarchy template
  • Loading branch information
DanielaSchacherer committed Sep 30, 2024
1 parent bbef810 commit e93bad2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions idc_index/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ def fetch_index(self, index) -> None:
file.write(response.content)

index_table = pd.read_parquet(filepath)
# index_table = index_table.merge(
# self.index[["series_aws_url", "SeriesInstanceUID"]],
# on="SeriesInstanceUID", how="left"
# )
setattr(self.__class__, index, index_table)
self.indices_overview[index]["installed"] = True

Expand Down Expand Up @@ -1617,6 +1621,7 @@ def download_from_selection(
downloadDir=downloadDir,
dirTemplate=dirTemplate,
)

if sopInstanceUID:
sql = f"""
WITH temp as
Expand All @@ -1633,6 +1638,8 @@ def download_from_selection(
temp
JOIN
sm_instance_index using (sopInstanceUID)
JOIN
index using (seriesInstanceUID)
"""
else:
sql = f"""
Expand Down

0 comments on commit e93bad2

Please sign in to comment.