{% with total_items=history|length %}
{% for item in history %}
History pemeriksaan pasien tanggal {{item.created_at|date:'d M Y'}}{{ item.nama_dokter }}
{% for x in riwayatpenyakitpasien %}
{% if item.id == x.pendaftaran_id %}
• {% if x.icd10.diagnosa|striptags != "None" %} {{ x.icd10.kode }} - {{ x.icd10.diagnosa }} {% else %} - {% endif %}
{% endif %}
{% endfor %}
{{ item.tindakan }}
{{forloop.counter}} / {{total_items}}
{%endfor%}
{%endwith%}