This commit is contained in:
Ross
2023-08-07 22:12:47 +01:00
parent a435d82f52
commit 5e33d5f869
+7 -6
View File
@@ -380,12 +380,13 @@ def extract_image_dicom_json_from_ds(ds, url):
d = {}
for key in to_keep:
val = ds[key].value
if key in ds:
val = ds[key].value
if type(val) == pydicom.multival.MultiValue:
d[key] = list(val)
else:
d[key] = val
if type(val) == pydicom.multival.MultiValue:
d[key] = list(val)
else:
d[key] = val
return {"metadata": d, "url": f"dicomweb:{url}"}
@@ -411,7 +412,7 @@ class SeriesImage(SeriesImageBase):
except FileNotFoundError:
return []
except InvalidDicomError:
return []
return {"url": f"dicomweb:{REMOTE_URL}{self.image.url}"}
class SeriesFinding(models.Model):