report report
parent
a7faddcfcd
commit
6e547eae65
|
@ -69,13 +69,14 @@ class ReportVisit(Model):
|
||||||
records=get_model('clinic.visit').search_browse(dom)
|
records=get_model('clinic.visit').search_browse(dom)
|
||||||
lines=[]
|
lines=[]
|
||||||
no=1
|
no=1
|
||||||
for record in records:
|
for record in sorted(records,key=lambda x: (x.patient_id.id,x.visit_date)):
|
||||||
lines.append({
|
lines.append({
|
||||||
'no': no,
|
'no': no,
|
||||||
'vid': record.id,
|
'vid': record.id,
|
||||||
'cid': record.cycle_id.id,
|
'cid': record.cycle_id.id,
|
||||||
'cname': record.cycle_id.name or "",
|
'cname': record.cycle_id.name or "",
|
||||||
'pid': record.patient_id.id or '',
|
'pid': record.patient_id.id or '',
|
||||||
|
'hn': record.patient_id.hn_no or '',
|
||||||
'pname': record.patient_id.name or '',
|
'pname': record.patient_id.name or '',
|
||||||
'tname': record.patient_id.type_id.name or '',
|
'tname': record.patient_id.type_id.name or '',
|
||||||
'tid': record.patient_id.type_id.id or '',
|
'tid': record.patient_id.type_id.id or '',
|
||||||
|
|
Binary file not shown.
|
@ -18,6 +18,7 @@
|
||||||
<th>#</th>
|
<th>#</th>
|
||||||
<th>วันที่</th>
|
<th>วันที่</th>
|
||||||
<th>รอบ</th>
|
<th>รอบ</th>
|
||||||
|
<th>HN</th>
|
||||||
<th>ผู้ป่วย</th>
|
<th>ผู้ป่วย</th>
|
||||||
<th>สิทธ์</th>
|
<th>สิทธ์</th>
|
||||||
<th>แพทย์</th>
|
<th>แพทย์</th>
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
<td>{{no}}</td>
|
<td>{{no}}</td>
|
||||||
<td><a href="/ui#name=clinic_visit&active_id={{vid}}&mode=form">{{date}}</a></td>
|
<td><a href="/ui#name=clinic_visit&active_id={{vid}}&mode=form">{{date}}</a></td>
|
||||||
<td><a href="/ui#name=clinic_cycle&active_id={{cid}}&mode=form">{{cname}}</a></td>
|
<td><a href="/ui#name=clinic_cycle&active_id={{cid}}&mode=form">{{cname}}</a></td>
|
||||||
|
<td>{{hn}}</td>
|
||||||
<td><a href="/ui#name=clinic_patient&active_id={{pid}}&mode=form">{{pname}}</a></td>
|
<td><a href="/ui#name=clinic_patient&active_id={{pid}}&mode=form">{{pname}}</a></td>
|
||||||
<td><a href="/ui#name=clinic_patient&active_id={{tid}}&mode=form">{{tname}}</a></td>
|
<td><a href="/ui#name=clinic_patient&active_id={{tid}}&mode=form">{{tname}}</a></td>
|
||||||
<td><a href="/ui#name=clinic_staff&active_id={{did}}&mode=form">{{dname}}</a></td>
|
<td><a href="/ui#name=clinic_staff&active_id={{did}}&mode=form">{{dname}}</a></td>
|
||||||
|
|
Loading…
Reference in New Issue