diff --git a/ippisite/ippidb/models.py b/ippisite/ippidb/models.py index 2c08a2226c82f52a75520f955fe2f55279b723a3..66dcac113ded49202ea6fc28a8797f19df35daaf 100644 --- a/ippisite/ippidb/models.py +++ b/ippisite/ippidb/models.py @@ -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): """ diff --git a/ippisite/ippidb/templates/ippidb/testcytotoxdescription_card.html b/ippisite/ippidb/templates/ippidb/testcytotoxdescription_card.html index 599cac2b73756f8324cbfe893600ea05f07110b1..8fd985f5d2e262ea3e7d994742beed0e40e961e6 100644 --- a/ippisite/ippidb/templates/ippidb/testcytotoxdescription_card.html +++ b/ippisite/ippidb/templates/ippidb/testcytotoxdescription_card.html @@ -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 diff --git a/ippisite/ippidb/templates/ippidb/testpkdescription_card.html b/ippisite/ippidb/templates/ippidb/testpkdescription_card.html index bf8d6f5c2cb17039cfd914e89ad9260e3342f018..477bb94058c8335e2c146c4438d1c43c91501db3 100644 --- a/ippisite/ippidb/templates/ippidb/testpkdescription_card.html +++ b/ippisite/ippidb/templates/ippidb/testpkdescription_card.html @@ -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