xxx
parent
92adab36f1
commit
3f1845cc06
|
@ -16,14 +16,14 @@
|
|||
<list model="clinic.hd.case" colors='{"#cfc":[["state","=","completed"]],"#f9e37d":[["state","=","in_progress"]],"#bcbbb9":[["state","=","cancelled"]],"#ACD1E9":[["state","=","waiting_payment"]],"#70DB93":[["state","=","paid"]]}'>
|
||||
<field name="sickbed_id" domain="[['available','=',true]]" span="2"/>
|
||||
<field name="patient_id" span="2"/>
|
||||
<field name="time_start" span="2"/>
|
||||
<!--<field name="time_start" span="2"/>-->
|
||||
<field name="wt_start" span="2"/>
|
||||
<field name="bp_start" span="2"/>
|
||||
<field name="membrane_type" span="2"/>
|
||||
<field name="vascular_acc" span="2"/>
|
||||
<field name="bid_flow_rate" span="2"/>
|
||||
<field name="ultrafittration" span="2"/>
|
||||
<field name="time_stop" span="2"/>
|
||||
<!--<field name="time_stop" span="2"/>-->
|
||||
<field name="wt_stop" span="2"/>
|
||||
<field name="bp_stop" span="2"/>
|
||||
<field name="hd_case_id" span="2"/>
|
||||
|
|
|
@ -38,15 +38,14 @@
|
|||
<item string="Visit Board" action="clinic_visit_board"/>
|
||||
<!--<item string="Generate Visit" action="clinic_gen_visit_form"/>-->
|
||||
</item>
|
||||
<item string="HD Cases">
|
||||
<item string="HD Cases" action="clinic_hd_case"/>
|
||||
<divider/>
|
||||
<header string="REPORTS"/>
|
||||
<item string="HD Cases" action="clinic_hd_case"/>
|
||||
<item string="Reports">
|
||||
<item string="HD Case Summary" action="clinic_report_hd_case_summary"/>
|
||||
<item string="Medical Summary" action="clinic_report_medical_summary"/>
|
||||
<item string="Recent Patient" action="clinic_report_recent_patient"/>
|
||||
<item string="Discontinue Patient" action="clinic_report_discontinue_patient"/>
|
||||
</item>
|
||||
<!--
|
||||
<item string="Others">
|
||||
<header string="TESTING"/>
|
||||
<item string="Import Product" action="import_clinic_product"/>
|
||||
|
@ -54,6 +53,7 @@
|
|||
<item string="Import Visit" action="import_clinic_visit"/>
|
||||
<item string="Import HD Case" action="import_clinic_hd_case"/>
|
||||
</item>
|
||||
-->
|
||||
<item string="Settings">
|
||||
<item string="Branch" action="clinic_branch"/>
|
||||
<item string="Departments" action="clinic_department"/>
|
||||
|
|
|
@ -85,7 +85,9 @@ class VisitBoard(Model):
|
|||
}
|
||||
|
||||
patient_types={t['id']:t['name'] for t in get_model("clinic.patient.type").search_read([[]],['name'])}
|
||||
cycle_names={t['id']:t['name'] for t in get_model("clinic.cycle").search_read([[]],['name'])}
|
||||
types={}
|
||||
cycles={}
|
||||
no=1
|
||||
for visit in get_model("clinic.visit").search_browse(dom):
|
||||
hd_case_id=None
|
||||
|
@ -144,6 +146,12 @@ class VisitBoard(Model):
|
|||
[ptype.setdefault(t,0) for t in patient_types.keys()]
|
||||
types[visit_date]=ptype
|
||||
types[visit_date][patient.type_id.id]+=1
|
||||
|
||||
if not cycles.get(visit_date):
|
||||
cycle_name={}
|
||||
[cycle_name.setdefault(cid,0) for cid in cycle_names.keys()]
|
||||
cycles[visit_date]=cycle_name
|
||||
cycles[visit_date][cycle.id]+=1
|
||||
|
||||
dates=[]
|
||||
index=0
|
||||
|
@ -166,7 +174,9 @@ class VisitBoard(Model):
|
|||
index+=1
|
||||
# footer
|
||||
line=empty_line.copy()
|
||||
line['details']='รวม %s: %s'%(total_qty,', '.join('%s %s'%(patient_types[k],v) for k,v in types[date].items()))
|
||||
patient_str='[%s]'%', '.join('%s %s'%(patient_types[k],v) for k,v in types[date].items())
|
||||
cycle_str='[%s]'%', '.join('%s: %s'%(cycle_names[k],v) for k,v in cycles[date].items())
|
||||
line['details']='รวม %s: %s'%(total_qty,', '.join([cycle_str,patient_str]))
|
||||
line['footer']=True
|
||||
line['title']=False
|
||||
lines.insert(index,line)
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<thead>
|
||||
<th>รอบ</th>
|
||||
<th>#</th>
|
||||
<th>เลขที่อ้างอิง</th>
|
||||
<th>ใบนัดแพทย์</th>
|
||||
<th>HN</th>
|
||||
<th>ผู้ป่วย</th>
|
||||
<th>สิทธ์</th>
|
||||
|
|
Loading…
Reference in New Issue