From 9de345409c483039f709f3f31db2f84552b26369 Mon Sep 17 00:00:00 2001 From: SPP Date: Fri, 1 Jun 2018 16:12:42 +0700 Subject: [PATCH] [FIX] report hdcase summary not show dispose patient cause is timestamp --- .../models/report_discontinue_patient.py | 13 ++----------- netforce_clinic/models/report_hd_case_detail.py | 2 ++ netforce_clinic/models/report_recent_patient.py | 4 ++-- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/netforce_clinic/models/report_discontinue_patient.py b/netforce_clinic/models/report_discontinue_patient.py index 3078d48..32e80be 100644 --- a/netforce_clinic/models/report_discontinue_patient.py +++ b/netforce_clinic/models/report_discontinue_patient.py @@ -70,18 +70,9 @@ class ReportDiscontinuePatient(Model): department_id=obj.department_id.id # new patient of this month dom=[] - dom.append(['date','>=',time_start]) - dom.append(['date','<=',time_stop]) + dom.append(['date','>=',"%s 00:00:00"%(time_start)]) + dom.append(['date','<=',"%s 23:59:59"%(time_stop)]) dom.append(['type','=','out']) - #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: - #dom.append(['department_id','=',department_id]) - print("dom ", dom) records=get_model('clinic.patient.move').search_browse(dom) lines=[] no=1 diff --git a/netforce_clinic/models/report_hd_case_detail.py b/netforce_clinic/models/report_hd_case_detail.py index e27b7f8..2ad38d6 100644 --- a/netforce_clinic/models/report_hd_case_detail.py +++ b/netforce_clinic/models/report_hd_case_detail.py @@ -113,6 +113,8 @@ class ReportHDCaseDetail(Model): report_type=obj.report_type or 'topic1' hdcase_type=obj.hdcase_type or 'completed' patient_type_id=obj.patient_type_id.id + time_start="%s 00:00:00"%(time_start) + time_stop="%s 23:59:59"%(time_stop) prev_year=year next_year=year prev_month=crr_month-1 diff --git a/netforce_clinic/models/report_recent_patient.py b/netforce_clinic/models/report_recent_patient.py index bd1670c..112074a 100644 --- a/netforce_clinic/models/report_recent_patient.py +++ b/netforce_clinic/models/report_recent_patient.py @@ -69,8 +69,8 @@ class ReportRecentPatient(Model): department_id=obj.department_id.id # new patient of this month dom=[] - dom.append(['date','>=',time_start]) - dom.append(['date','<=',time_stop]) + dom.append(['date','>=',"%s 00:00:00"%(time_start)]) + dom.append(['date','<=',"%s 23:59:59"%(time_stop)]) dom.append(['type','=',"in"]) records=get_model('clinic.patient.move').search_browse(dom) lines=[]