diff --git a/netforce_clinic/layouts/clinic_patient_list.xml b/netforce_clinic/layouts/clinic_patient_list.xml index 9342926..e261242 100644 --- a/netforce_clinic/layouts/clinic_patient_list.xml +++ b/netforce_clinic/layouts/clinic_patient_list.xml @@ -13,5 +13,6 @@ + diff --git a/netforce_clinic/models/report_discontinue_patient.py b/netforce_clinic/models/report_discontinue_patient.py index 310026d..1267eb7 100644 --- a/netforce_clinic/models/report_discontinue_patient.py +++ b/netforce_clinic/models/report_discontinue_patient.py @@ -72,6 +72,8 @@ class ReportDiscontinuePatient(Model): dom=[] dom.append(['resign_date','>=',time_start]) dom.append(['resign_date','<=',time_stop]) + dom.append(['walkin','=',"no"]) + dom.append(['dispose','=',True]) if branch_id: dom.append(['branch_id','=',branch_id]) if department_id: diff --git a/netforce_clinic/models/report_hd_case_summary.py b/netforce_clinic/models/report_hd_case_summary.py index 72f91bf..1e0bdeb 100644 --- a/netforce_clinic/models/report_hd_case_summary.py +++ b/netforce_clinic/models/report_hd_case_summary.py @@ -184,7 +184,7 @@ class ReportHDCaseSummary(Model): resign_patients=[] for pt in get_model('clinic.patient').search_browse(dom): resign_patients_qty+=1 - resign_patients.append(pt.name) + resign_patients.append(pt.id) dom=replace_quote('%s'%dom) items['topic%s'%count]={ 'month': month_str, @@ -231,17 +231,18 @@ class ReportHDCaseSummary(Model): time_stop='%s-%s-%s'%(year,str(crr_month).zfill(2),crr_total_day) dom.append(['reg_date','<=',time_stop]) 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: dom.append(['branch_id','=',branch_id]) if department_id: dom.append(['department_id','=',department_id]) - dom.append(['walkin','=',"no"]) - dom.append(['dispose','=',False]) npatients_qty=0 for pt in get_model("clinic.patient").search(dom): npatients_qty+=1 dom=replace_quote('%s'%dom) - print(">>> <<< ", dom) items[tkey]={ 'month': '', 'qty': npatients_qty, diff --git a/netforce_clinic/models/report_recent_patient.py b/netforce_clinic/models/report_recent_patient.py index 8249b5e..23917a6 100644 --- a/netforce_clinic/models/report_recent_patient.py +++ b/netforce_clinic/models/report_recent_patient.py @@ -71,11 +71,12 @@ class ReportRecentPatient(Model): dom=[] dom.append(['reg_date','>=',time_start]) dom.append(['reg_date','<=',time_stop]) + dom.append(['walkin','=',"no"]) + dom.append(['dispose','=',False]) if branch_id: dom.append(['branch_id','=',branch_id]) if department_id: dom.append(['department_id','=',department_id]) - print("recent ", dom) records=get_model('clinic.patient').search_browse(dom) lines=[] no=1