Commit 2935a6fa authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

add Cytotoxicity and PK test results to contribution view

WIP on #224
parent c92d7a67
Pipeline #32996 failed with stages
in 13 minutes and 33 seconds
......@@ -1319,6 +1319,10 @@ class CompoundCytotoxicityResult(models.Model):
self.test_cytotoxicity_description.id, self.compound.id
)
@property
def ref(self):
return RefCompoundBiblio.objects.get(compound=self.compound, bibliography=self.test_cytotoxicity_description.biblio)
class TestPKDescription(models.Model):
"""
......@@ -1378,6 +1382,10 @@ class CompoundPKResult(models.Model):
self.test_pk_description.id, self.compound.id
)
@property
def ref(self):
return RefCompoundBiblio.objects.get(compound=self.compound, bibliography=self.test_pk_description.biblio)
class CompoundAction(models.Model):
"""
......
......@@ -12,5 +12,19 @@
<span style="font-family: BrandonGrotesqueBld;">{{object|verbose_name:'cell_line'}}: </span>{{object.cell_line}}
</div>
</div>
<table class="table">
<tr>
<th>Compound</th>
<th>Toxicity</th>
</tr>
{% for result in object.compoundcytotoxicityresult_set.all %}
<tr>
<td>{{result.ref.compound_name}}</td>
<td>{{result.toxicity}}</td>
</tr>
{% endfor %}
</table>
</div>
{%endif%}
\ No newline at end of file
......@@ -26,5 +26,25 @@
</span>{{object.dose_interval}}
</div>
</div>
<table class="table">
<tr>
{% with result=object.compoundpkresult_set.first %}
<th>Compound</th>
<th>{{result|verbose_name:'tolerated'}}</th>
<th>{{result|verbose_name:'t_demi'}} / {{result|verbose_name:'t_max'}}</th>
<th>{{result|verbose_name:'auc_av'}} / {{result|verbose_name:'clearance_av'}} / {{result|verbose_name:'c_max_av'}} / {{result|verbose_name:'voldistribution_av'}}</th>
{% endwith %}
</tr>
{% for result in object.compoundpkresult_set.all %}
<tr>
<td>{{result.ref.compound_name}}</td>
<td>{{result.tolerated}}</td>
<td>{{result.t_demi}} / {{result.t_max}}</td>
<td>{{result.auc_av}} / {{result.clearance_av}} / {{result.c_max_av}} / {{result.voldistribution_av}}</td>
</tr>
{% endfor %}
</table>
</div>
{%endif%}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment