diff --git a/atlas/tables.py b/atlas/tables.py index 8197214c..23572f94 100755 --- a/atlas/tables.py +++ b/atlas/tables.py @@ -58,7 +58,7 @@ class CaseTable(tables.Table): def __init__(self, data=None, *args, **kwargs): super().__init__( data.prefetch_related( - #"condition", "condition__synonym" + "author",#"condition", "condition__synonym" ), *args, **kwargs, @@ -115,8 +115,16 @@ class SeriesTable(tables.Table): ) sequence = ("view", "popup", "images", "case") + def __init__(self, data=None, *args, **kwargs): + super().__init__( + data.prefetch_related( + "modality", "case", "examination", "plane", "contrast", "author", "findings", "images" + ), + *args, + **kwargs, + ) + def render_popup(self, value, record): - print(self) return format_html( """Popup""", record.pk, @@ -147,6 +155,15 @@ class ConditionTable(tables.Table): fields = ("primary", "subspecialty", "rcr_curriculum_map", "rcr_curriculum") sequence = ("name",) + def __init__(self, data=None, *args, **kwargs): + super().__init__( + data.prefetch_related( + "subspecialty", "rcr_curriculum_map", "parent" + ), + *args, + **kwargs, + ) + def render_synonym(self, value, record): return format_html(record.get_synonym_link()) return f"{record.get_synonym_link()}" @@ -306,7 +323,7 @@ class CaseCollectionTable(tables.Table): def __init__(self, data=None, *args, **kwargs): super().__init__( data.prefetch_related( - #"condition", "condition__synonym" + "author", #"conditionI"", "condition__synonym" ), *args, **kwargs,