Skip to content

Commit

Permalink
fixing bugs of fields that were not coming through to the ltbi follow up
Browse files Browse the repository at this point in the history
  • Loading branch information
fredkingham committed Mar 18, 2019
1 parent 909a01f commit 04edd26
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
9 changes: 6 additions & 3 deletions apps/tb/templates/tb/letters/ltbi_follow_up.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,11 @@ <h2>
<div class="row content-offset-below-10">
<div class="col-md-12">
<p>
<b>{{ imaging.imaging_type }}:</b><br />
{{ imaging.details }}<br />
<b>
{{ imaging.imaging_type }}
{% if imaging.site %}({{ imaging.site }}){% endif %}:
</b><br />
{{ imaging.date | date }} {{ imaging.details }}<br />
</p>
</div>
</div>
Expand All @@ -192,7 +195,7 @@ <h2>
<div class="col-md-12">
<p>
<b>{{ other_investigation.name }}:</b><br />
{{ other_investigation.details }}
{{ other_investigation.date | date }} {{ other_investigation.details }}
</p>
</div>
</div>
Expand Down
19 changes: 12 additions & 7 deletions apps/tb/templates/tb/letters/ltbi_initial_assessment.html
Original file line number Diff line number Diff line change
Expand Up @@ -264,20 +264,25 @@ <h2>
</div>

{% for imaging in imaging_list %}
<div class="row content-offset-below-10">
<div class="col-md-12">
<p>
<b>{{ imaging.imaging_type }}:</b><br /> {{ imaging.details }}
</p>
</div>
<div class="row content-offset-below-10">
<div class="col-md-12">
<p>
<b>
{{ imaging.imaging_type }}
{% if imaging.site %}({{ imaging.site }}){% endif %}:
</b><br />
{{ imaging.date | date }} {{ imaging.details }}<br />
</p>
</div>
</div>
{% endfor %}

{% for other_investigation in other_investigation_list %}
<div class="row content-offset-below-10">
<div class="col-md-12">
<p>
<b>{{ other_investigation.name }}:</b><br /> {{ other_investigation.details }}
<b>{{ other_investigation.name }}:</b><br />
{{ other_investigation.date | date }} {{ other_investigation.details }}
</p>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions apps/tb/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ def get_context_data(self, *args, **kwargs):
ctx["adverse_reaction_list"] = episode.adversereaction_set.all()
ctx["past_medication_list"] = episode.antimicrobial_set.all()
ctx["allergies_list"] = patient.allergies_set.all()
ctx["imaging_list"] = episode.imaging_set.all()
ctx["other_investigation_list"] = episode.otherinvestigation_set.all()
obs = episode.observation_set.order_by("-datetime").last()
if obs:
ctx["weight"] = obs.weight
return ctx


Expand All @@ -44,11 +49,6 @@ def get_context_data(self, *args, **kwargs):
ctx["symptom_complex_list"] = episode.symptomcomplex_set.all()
# TODO this has to change

ctx["imaging_list"] = episode.imaging_set.all()
ctx["other_investigation_list"] = episode.otherinvestigation_set.all()
obs = episode.observation_set.order_by("-datetime").last()
if obs:
ctx["weight"] = obs.weight
ctx["patient"] = patient
ctx["tb_history"] = patient.tbhistory_set.get()
ctx["results"] = get_tb_summary_information(patient)
Expand Down

0 comments on commit 04edd26

Please sign in to comment.