Add new tab to patient file for manual checking.

This commit is contained in:
Mikaël Ates 2016-01-18 18:10:48 +01:00
parent fb708c2549
commit 5a54a3580d
1 changed files with 61 additions and 0 deletions

View File

@ -23,6 +23,7 @@
<li><a href="#edit" id="tab-edit" class="patient-tab">{% trans "Profile" %}</a></li>
<li><a href="#alerts" id="tab-alert" class="patient-tab">{% trans "Alerts" %}</a></li>
<li><a href="#monitoring-profile" id="tab-monitoring-profile" class="patient-tab">{% trans "Monitoring profile" %}</a></li>
<li><a href="#manual-checking" id="tab-manual-checking" class="patient-tab">{% trans "Manual checking" %}</a></li>
</ul>
</div>
<div class="tab-content" id="dashboard">
@ -220,5 +221,65 @@
</form>
</div>
</div>
<div class="tab-content" id="manual-checking">
<div class="tab-content-inner">
<div class="tab-manual-checking-inner-left">
<form action="" method="post" id="patient-form" class="default-form">{% csrf_token %}
{% trans "Temperature" %}
{{ forms.t_check.as_p }}
<input type="submit" value="{% trans "Add" %}"/>
</form>
<form action="" method="post" id="patient-form" class="default-form">{% csrf_token %}
{% trans "Heartrate" %}
{{ forms.hr_check.as_p }}
<input type="submit" value="{% trans "Add" %}"/>
</form>
</div>
<div class="tab-manual-checking-inner-right">
{% if t_checks %}
<div class="manual-checking-table">
{% trans "Temperature" %}
<table>
<tr>
<th colspan="3">{% trans "Manual checks" %}</th>
<th colspan="3">{% trans "Automatic checks" %}</th>
</tr>
{% for check_m, check_a in t_checks %}
<tr>
<td>{{ check_m.date|date:"d/m/Y" }}</td>
<td>{{ check_m.time }}</td>
<td>{{ check_m.value }} {% trans "°C" %}</td>
<td>{% if check_a %}{{ check_a.0.date|date:"d/m/Y" }}{% endif %}</td>
<td>{% if check_a %}{{ check_a.0.time }}{% endif %}</td>
<td>{% if check_a %}{{ check_a.1 }} {% trans "°C" %}{% endif %}</td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
{% if hr_checks %}
<div class="manual-checking-table">
{% trans "Heartrate" %}
<table>
<tr>
<th colspan="3">{% trans "Manual checks" %}</th>
<th colspan="3">{% trans "Automatic checks" %}</th>
</tr>
{% for check_m, check_a in hr_checks %}
<tr>
<td>{{ check_m.date|date:"d/m/Y" }}</td>
<td>{{ check_m.time }}</td>
<td>{{ check_m.value }} {% trans "PPM" %}</td>
<td>{% if check_a %}{{ check_a.0.date|date:"d/m/Y" }}{% endif %}</td>
<td>{% if check_a %}{{ check_a.0.time }}{% endif %}</td>
<td>{% if check_a %}{{ check_a.1 }} {% trans "PPM" %}{% endif %}</td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}