report(90%)
parent
fd33b9b1d0
commit
82cc4eb6ab
|
@ -13,5 +13,6 @@
|
||||||
<field name="walkin"/>
|
<field name="walkin"/>
|
||||||
<field name="department_names"/>
|
<field name="department_names"/>
|
||||||
<field name="doctor_id"/>
|
<field name="doctor_id"/>
|
||||||
|
<field name="dispose"/>
|
||||||
<!--<field name="image" preview='1'/>-->
|
<!--<field name="image" preview='1'/>-->
|
||||||
</list>
|
</list>
|
||||||
|
|
|
@ -72,6 +72,8 @@ class ReportDiscontinuePatient(Model):
|
||||||
dom=[]
|
dom=[]
|
||||||
dom.append(['resign_date','>=',time_start])
|
dom.append(['resign_date','>=',time_start])
|
||||||
dom.append(['resign_date','<=',time_stop])
|
dom.append(['resign_date','<=',time_stop])
|
||||||
|
dom.append(['walkin','=',"no"])
|
||||||
|
dom.append(['dispose','=',True])
|
||||||
if branch_id:
|
if branch_id:
|
||||||
dom.append(['branch_id','=',branch_id])
|
dom.append(['branch_id','=',branch_id])
|
||||||
if department_id:
|
if department_id:
|
||||||
|
|
|
@ -184,7 +184,7 @@ class ReportHDCaseSummary(Model):
|
||||||
resign_patients=[]
|
resign_patients=[]
|
||||||
for pt in get_model('clinic.patient').search_browse(dom):
|
for pt in get_model('clinic.patient').search_browse(dom):
|
||||||
resign_patients_qty+=1
|
resign_patients_qty+=1
|
||||||
resign_patients.append(pt.name)
|
resign_patients.append(pt.id)
|
||||||
dom=replace_quote('%s'%dom)
|
dom=replace_quote('%s'%dom)
|
||||||
items['topic%s'%count]={
|
items['topic%s'%count]={
|
||||||
'month': month_str,
|
'month': month_str,
|
||||||
|
@ -231,17 +231,18 @@ class ReportHDCaseSummary(Model):
|
||||||
time_stop='%s-%s-%s'%(year,str(crr_month).zfill(2),crr_total_day)
|
time_stop='%s-%s-%s'%(year,str(crr_month).zfill(2),crr_total_day)
|
||||||
dom.append(['reg_date','<=',time_stop])
|
dom.append(['reg_date','<=',time_stop])
|
||||||
dom.append(['type_id','=',ptype['id']])
|
dom.append(['type_id','=',ptype['id']])
|
||||||
|
dom.append(['walkin','=',"no"])
|
||||||
|
dom.append(['dispose','=',False])
|
||||||
|
#if resign_patients:
|
||||||
|
#dom.append(['id','not in',resign_patients])
|
||||||
if branch_id:
|
if branch_id:
|
||||||
dom.append(['branch_id','=',branch_id])
|
dom.append(['branch_id','=',branch_id])
|
||||||
if department_id:
|
if department_id:
|
||||||
dom.append(['department_id','=',department_id])
|
dom.append(['department_id','=',department_id])
|
||||||
dom.append(['walkin','=',"no"])
|
|
||||||
dom.append(['dispose','=',False])
|
|
||||||
npatients_qty=0
|
npatients_qty=0
|
||||||
for pt in get_model("clinic.patient").search(dom):
|
for pt in get_model("clinic.patient").search(dom):
|
||||||
npatients_qty+=1
|
npatients_qty+=1
|
||||||
dom=replace_quote('%s'%dom)
|
dom=replace_quote('%s'%dom)
|
||||||
print(">>> <<< ", dom)
|
|
||||||
items[tkey]={
|
items[tkey]={
|
||||||
'month': '',
|
'month': '',
|
||||||
'qty': npatients_qty,
|
'qty': npatients_qty,
|
||||||
|
|
|
@ -71,11 +71,12 @@ class ReportRecentPatient(Model):
|
||||||
dom=[]
|
dom=[]
|
||||||
dom.append(['reg_date','>=',time_start])
|
dom.append(['reg_date','>=',time_start])
|
||||||
dom.append(['reg_date','<=',time_stop])
|
dom.append(['reg_date','<=',time_stop])
|
||||||
|
dom.append(['walkin','=',"no"])
|
||||||
|
dom.append(['dispose','=',False])
|
||||||
if branch_id:
|
if branch_id:
|
||||||
dom.append(['branch_id','=',branch_id])
|
dom.append(['branch_id','=',branch_id])
|
||||||
if department_id:
|
if department_id:
|
||||||
dom.append(['department_id','=',department_id])
|
dom.append(['department_id','=',department_id])
|
||||||
print("recent ", dom)
|
|
||||||
records=get_model('clinic.patient').search_browse(dom)
|
records=get_model('clinic.patient').search_browse(dom)
|
||||||
lines=[]
|
lines=[]
|
||||||
no=1
|
no=1
|
||||||
|
|
Loading…
Reference in New Issue