66 lines
3.3 KiB
HTML
66 lines
3.3 KiB
HTML
{% extends 'user_base.html' %}
|
|
{% import "_macros.html" as macros %}
|
|
{% block title %} P_info|COVID-19 Detector {% endblock %}
|
|
{% block specific_info %}
|
|
<div class="col-md-8">
|
|
<h1 class="mb-3">病人信息</h1>
|
|
{%if not appointments%}
|
|
<p>您暂时还没有任何病人哦~</p>
|
|
{%endif%}
|
|
{%for appointment in appointments%}
|
|
{% set appointment_date= appointment.date.strftime('%Y-%m-%d') %}
|
|
{% if today_str<appointment_date%} {%else%} {% set patient=User.query.get(appointment.patient_id) %} <div
|
|
class="container" style="border: 2px solid #ddd;">
|
|
<div class="appointment-info">
|
|
<div class="appointment-row" style="margin-top: 15px;">
|
|
<span class="appointment-row-label">就诊人 </span>
|
|
<span class="appointment-row-value" style="margin-left: 60px;">
|
|
<a href="{{ url_for('user.mypatient_info', appointment_id=appointment.id) }}"
|
|
style="text-decoration: underline;">{{appointment.name}}
|
|
</a>
|
|
</span>
|
|
|
|
</div>
|
|
<div class="appointment-row">
|
|
<span class="appointment-row-label">就诊时间</span>
|
|
<span class="appointment-row-value" style="color: red;margin-left: 60px;">{{ appointment.date
|
|
}} {%if
|
|
appointment.time==1%}上午{%else%}下午{%endif%}</span>
|
|
<span style="color: white;background-color:#17A2B8;">{{appointment.num}}号</span>
|
|
</div>
|
|
<div class="appointment-row">
|
|
<span class="appointment-row-label">联系方式</span>
|
|
<span class="appointment-row-value" style="margin-left: 60px;">{{appointment.phone}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="btn-group mb-3" style="margin-top: 5px;">
|
|
<button type="button" class="datebtn btn-light">发送消息</button>
|
|
{% set report = Report.query.filter_by(appointment_id=appointment.id).first() %}
|
|
{% if report %}
|
|
<form method="POST" action="/check_report">
|
|
<input type="hidden" name="report" value="{{ report.id }}">
|
|
<button type="submit" class="datebtn btn-light">查看报告</button>
|
|
</form>
|
|
{% else %}
|
|
<form method="POST" action="/write_report">
|
|
<input type="hidden" name="appointment" value="{{ appointment.id }}">
|
|
<button type="submit" class="datebtn btn-light">撰写报告</button>
|
|
</form>
|
|
{% endif %}
|
|
{%if today_str!=appointment_date or appointment.status=="Called" %}
|
|
<button type="button" class="datebtn btn-light" disabled style="opacity: 0.7;"> 叫号 </button>
|
|
{%elif today_str==appointment_date and appointment.status!="status"%}
|
|
<form method="POST" action="/call_number">
|
|
<input type="hidden" name="appointment" value="{{ appointment.id }}">
|
|
<button type="submit" class="datebtn btn-light"> 叫号 </button>
|
|
</form>
|
|
{%endif%}
|
|
</div>
|
|
</div>
|
|
{%endif%}
|
|
{%endfor%}
|
|
<div class="pagination" style="margin-top: 20px;">
|
|
{{macros.pagination_widget(pagination,'.my_patient',docid=current_user.id)}}
|
|
</div>
|
|
</div>
|
|
{% endblock %} |