{% extends '../template.html' %}
{% block title %}Rekam Medis{% endblock %}
{% block subcontent %}
	<h2>Rekam Medis > Pilih Pasien</h2>

	<div style="border-bottom:1px dashed grey;margin-bottom:10px;">
		<form method="get" id="form_cari">
			<table class="data" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td>No. RekMed</td>
					<td><input type="text" name="no_rekmed" value="{{ kriteria.0 }}"/></td>
				</tr>
				<tr>
					<td>Nama</td>
					<td><input type="text" name="nama" value="{{ kriteria.1 }}"/></td>
				</tr>
				<tr>
					<td>Nomor KK</td>
					<td><input type="text" name="no_kk" value="{{ kriteria.2 }}"/></td>
				</tr>
			</table>
			<br/><input type="submit" value="Cari" class="med_btn"/>
		</form>
		<br/>
	</div>
	{% if data.length > 0 %}	
	<table class="data">
		<tr>
			<th>No. RekMed</th>
			<th>No. KK</th>
			<th>Nama</th>
			<th>Tgl Lahir</th>
			<th>Jns Kel</th>
			<th>No. BPJS</th>
			<th></th>
		</tr>
		{% for row in data %}
			<tr>
				<td>{{row.no_rekmed}}</td>
				<td>{{row.no_kk}}</td>
				<td>{{row.nama}}</td>
				<td>{{row.tgl_lahir}}</td>
				<td>{{row.sex}}</td>
				<td>{{row.no_bpjs}}</td>
				<td>
					<a href="{% nav admin_rekmed %}/{{ row.no_rekmed }}">RekMed</a>
				</td>
			</tr>
		{% endfor %}
	</table>
	
	{% else %}
		Data tidak ditemukan.<br/>
	{% endif %}
	
	{% for p in page %}
	<a href="{{ p.link }}" class="{% if p.active == 'yes' %}active{% endif %} page">{{ p.number }}</a>
	{% endfor %}
{% endblock %}
