From fe20240d78278ce04780d83f8ddd806e52610298 Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Thu, 30 Apr 2015 22:10:55 +0700 Subject: [PATCH] improve report --- .../clinic_report_labor_cost_staff.xml | 8 ++ .../layouts/clinic_report_hd_case_summary.xml | 6 +- .../clinic_report_labor_cost_staff.xml | 9 ++ .../layouts/clinic_report_medical_detail.xml | 1 + .../layouts/clinic_report_medical_summary.xml | 1 + netforce_clinic/models/__init__.py | 1 + .../models/report_hd_case_summary.py | 15 ++- netforce_clinic/models/report_labor_cost.py | 10 +- .../models/report_labor_cost_staff.py | 113 ++++++++++++++++++ .../models/report_medical_detail.py | 15 ++- .../models/report_medical_summary.py | 30 +++-- netforce_clinic/models/visit_board.py | 6 +- .../reports/report_labor_cost_staff.xlsx | Bin 0 -> 6946 bytes .../templates/report_hd_case_summary.hbs | 4 +- .../templates/report_labor_cost.hbs | 4 +- .../templates/report_labor_cost_staff.hbs | 32 +++++ 16 files changed, 228 insertions(+), 27 deletions(-) create mode 100644 netforce_clinic/actions/clinic_report_labor_cost_staff.xml create mode 100644 netforce_clinic/layouts/clinic_report_labor_cost_staff.xml create mode 100644 netforce_clinic/models/report_labor_cost_staff.py create mode 100644 netforce_clinic/reports/report_labor_cost_staff.xlsx create mode 100644 netforce_clinic/templates/report_labor_cost_staff.hbs diff --git a/netforce_clinic/actions/clinic_report_labor_cost_staff.xml b/netforce_clinic/actions/clinic_report_labor_cost_staff.xml new file mode 100644 index 0000000..2e0a93d --- /dev/null +++ b/netforce_clinic/actions/clinic_report_labor_cost_staff.xml @@ -0,0 +1,8 @@ + + Report Labor Cost Staff + report + clinic.report.labor.cost.staff + report_labor_cost_staff + report_labor_cost_staff + account_menu + diff --git a/netforce_clinic/layouts/clinic_report_hd_case_summary.xml b/netforce_clinic/layouts/clinic_report_hd_case_summary.xml index ce1f391..e7949c1 100644 --- a/netforce_clinic/layouts/clinic_report_hd_case_summary.xml +++ b/netforce_clinic/layouts/clinic_report_hd_case_summary.xml @@ -2,7 +2,7 @@ - - - + + + diff --git a/netforce_clinic/layouts/clinic_report_labor_cost_staff.xml b/netforce_clinic/layouts/clinic_report_labor_cost_staff.xml new file mode 100644 index 0000000..95897a7 --- /dev/null +++ b/netforce_clinic/layouts/clinic_report_labor_cost_staff.xml @@ -0,0 +1,9 @@ +
+ + + + + + + + diff --git a/netforce_clinic/layouts/clinic_report_medical_detail.xml b/netforce_clinic/layouts/clinic_report_medical_detail.xml index 3eb7701..1b80654 100644 --- a/netforce_clinic/layouts/clinic_report_medical_detail.xml +++ b/netforce_clinic/layouts/clinic_report_medical_detail.xml @@ -6,6 +6,7 @@ + diff --git a/netforce_clinic/layouts/clinic_report_medical_summary.xml b/netforce_clinic/layouts/clinic_report_medical_summary.xml index bfd0bf0..c389457 100644 --- a/netforce_clinic/layouts/clinic_report_medical_summary.xml +++ b/netforce_clinic/layouts/clinic_report_medical_summary.xml @@ -5,4 +5,5 @@ + diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py index b797965..1db6984 100644 --- a/netforce_clinic/models/__init__.py +++ b/netforce_clinic/models/__init__.py @@ -82,6 +82,7 @@ from . import report_staff_fee_detail from . import report_staff_fee_sum from . import report_payment_matching from . import report_labor_cost +from . import report_labor_cost_staff from . import report_labor_cost_summary from . import report_labor_cost_detail from . import report_labor_cost_sub_detail diff --git a/netforce_clinic/models/report_hd_case_summary.py b/netforce_clinic/models/report_hd_case_summary.py index 4d8dbff..2cece3b 100644 --- a/netforce_clinic/models/report_hd_case_summary.py +++ b/netforce_clinic/models/report_hd_case_summary.py @@ -19,6 +19,7 @@ class ReportHDCaseSummary(Model): "date_to": fields.Date("To", required=True), 'branch_id': fields.Many2One("clinic.branch","Branch"), 'department_id': fields.Many2One("clinic.department","Departments"), + 'report_type': fields.Selection([['completed','Completed'],['not_completed','Not Completed']],"Report Type"), } def _get_date_from(self,context={}): @@ -49,6 +50,7 @@ class ReportHDCaseSummary(Model): 'date_to': _get_date_to, 'branch_id': _get_branch, 'department_id': _get_department, + 'report_type': 'completed', } def get_report_data(self,ids,context={}): @@ -63,6 +65,7 @@ class ReportHDCaseSummary(Model): date_to=defaults.get('date_to',date) branch_id=defaults.get("branch_id",None) department_id=defaults.get("department_id",None) + report_type=defaults.get('report_type','completed') if branch_id: branch_id=branch_id[0] if department_id: @@ -80,7 +83,7 @@ class ReportHDCaseSummary(Model): year=int(date[0:4]) date_from=obj.date_from date_to=obj.date_to - + report_type=obj.report_type or 'completed' prev_year=year next_year=year prev_month=crr_month-1 @@ -111,13 +114,17 @@ class ReportHDCaseSummary(Model): dom=[] dom.append(["date",">=",date_from]) dom.append(["date","<=",date_to]) - dom.append(["state","in",["completed","waiting_payment","paid"]]) + if report_type=='completed': + dom.append(["state","in",["waiting_payment","paid"]]) + else: + dom.append(["state","not in",["waiting_payment","paid"]]) #dom.append(['patient_id.walkin','=','no']) if branch_id: dom.append(['branch_id','=',branch_id]) if department_id: dom.append(['department_id','=',department_id]) crr_total=len(get_model("clinic.hd.case").search(dom)) + print('---> dom ', dom) items={} items['topic%s'%count]={ 'month': month_str, @@ -261,12 +268,15 @@ class ReportHDCaseSummary(Model): line['unit']=unit lines.append(line) index+=1 + if report_type=='not_completed': + lines[0]['topic']='%s (ไม่สำเร็จ)'%lines[0]['topic'] context['defaults']={ 'date': date, 'date_from': date_from, 'date_to': date_to, 'branch_id': branch_id, 'department_id': department_id, + 'report_type': report_type, } medicals=get_model("clinic.report.medical.summary").get_report_data(ids=[],context=context) @@ -279,6 +289,7 @@ class ReportHDCaseSummary(Model): branch=get_model("clinic.branch").browse(branch_id) sub_name="(%s)" % branch.name or "" data={ + 'report_type': report_type, 'branch_id': branch_id, 'department_id': department_id, 'date_from': date_from, diff --git a/netforce_clinic/models/report_labor_cost.py b/netforce_clinic/models/report_labor_cost.py index 6ed865f..23cdcb8 100644 --- a/netforce_clinic/models/report_labor_cost.py +++ b/netforce_clinic/models/report_labor_cost.py @@ -234,10 +234,9 @@ class ReportLaborCost(Model): ['branch_id','=',brch_id], ['date','>=',date_from], ['date','<=',date_to], - ['state','in',['waiting_payment','paid']], ] - dom2=dom1+[['doctor_id2.number','=','']] - dom3=dom1+[['doctor_id2.number','!=','']] + dom2=dom1+[['walkin','=',True]] + dom3=dom1+[['walkin','=',False]] dlines.append({ 'name': dt_name, 'qty': "{0:.2f}".format(round(qty,2)), @@ -267,14 +266,13 @@ class ReportLaborCost(Model): dom4=[ ['date','>=',date_from], ['date','<=',date_to], - ['state','in',['waiting_payment','paid']], - ['doctor_id2.number','!=',''], + ['walkin','=',False], ] if department_id: dom4.append(['department_id','=',department_id]) if branch_id: dom4.append(['branch_id','=',branch_id]) - dom5=dom4+[['doctor_id2.number','=','']] + dom5=dom4+[['walkin','=',True]] dlines.append({ 'name': 'รวม', 'qty': 0, diff --git a/netforce_clinic/models/report_labor_cost_staff.py b/netforce_clinic/models/report_labor_cost_staff.py new file mode 100644 index 0000000..e1ab90c --- /dev/null +++ b/netforce_clinic/models/report_labor_cost_staff.py @@ -0,0 +1,113 @@ +import time +from calendar import monthrange + +from netforce.model import Model,fields,get_model + +class ReportLaborCostStaff(Model): + _name="clinic.report.labor.cost.staff" + _string="Report Labor Cost Staff" + _transient=True + + _fields={ + "date": fields.Date("Month"), + "date_from": fields.Date("From", required=True), + "date_to": fields.Date("To", required=True), + "branch_id": fields.Many2One("clinic.branch","Branch"), + "cycle_id": fields.Many2One("clinic.cycle","Cycle"), + "department_id": fields.Many2One("clinic.department","Department"), + 'walkin': fields.Boolean("Walkin"), + } + + def _get_date_from(self,context={}): + year,month,day=time.strftime("%Y-%m-%d").split("-") + #return '%s-%s-01'%(year,month) + return '%s-%s-%s'%(year,month,day) + + def _get_date_to(self,context={}): + year,month,day=time.strftime("%Y-%m-%d").split("-") + weekday, total_day=monthrange(int(year), int(month)) + #return "%s-%s-%s"%(year,month,total_day) + return "%s-%s-%s"%(year,month,day) + + def default_get(self,field_names=None,context={},**kw): + defaults=context.get("defaults",{}) + date_from=defaults.get("date_from", self._get_date_from()) + date_to=defaults.get("date_to", self._get_date_to()) + walkin=defaults.get("walkin", False) + print('defaults ', defaults) + res={ + 'date': time.strftime("%Y-%m-%d"), + 'date_from': date_from, + 'date_to': date_to, + 'walkin': walkin, + } + return res + + def get_report_data(self,ids,context={}): + defaults=self.default_get(context=context) + date_from=defaults['date_from'] + date_to=defaults['date_to'] + branch_id=defaults.get("branch_id") + department_id=defaults.get("department_id") + cycle_id=defaults.get("cycle_id") + walkin=defaults.get("walkin") + print('walkin ', walkin) + dom=[] + if ids: + obj=self.browse(ids)[0] + date_from=obj.date_from + date_to=obj.date_to + branch_id=obj.branch_id.id + department_id=obj.department_id.id + cycle_id=obj.cycle_id.id + walkin=obj.walkin + dom.append(['date','>=',date_from]) + dom.append(['date','<=',date_to]) + dom.append(['hd_case_id.state','in',['waiting_payment','paid']]) + if branch_id: + dom.append(['hd_case_id.branch_id','=',branch_id]) + if department_id: + dom.append(['hd_case_id.department_id','=',department_id]) + if cycle_id: + dom.append(['hd_case_id.cycle_id','=',cycle_id]) + lines=[] + for sline in get_model("clinic.hd.case.staff").search_browse(dom): + hdcase=sline.hd_case_id + staff=sline.staff_id + if walkin and staff: + continue + lines.append({ + 'id': sline.id, + 'date': sline.date, + 'number': hdcase.number or '', + 'staff_name': staff.name or '', + 'staff_id': staff.id or '', + 'department_name': sline.department_id.name or '', + }) + data={ + 'date_from': date_from, + 'date_to': date_to, + 'lines': lines, + } + return data + + def onchange_date(self,context={}): + data=context['data'] + date=data['date'] + year,month,day=date.split("-") + weekday, total_day=monthrange(int(year), int(month)) + data['date_from']="%s-%s-01"%(year,month) + data['date_to']="%s-%s-%s"%(year,month,total_day) + return data + + def onchange_branch(self,context={}): + data=context['data'] + data['department_id']=None + return data + + def onchange_from(self,context={}): + data=context['data'] + data['date_to']=data['date_from'] + return data + +ReportLaborCostStaff.register() diff --git a/netforce_clinic/models/report_medical_detail.py b/netforce_clinic/models/report_medical_detail.py index ca9070a..60cf69b 100644 --- a/netforce_clinic/models/report_medical_detail.py +++ b/netforce_clinic/models/report_medical_detail.py @@ -18,6 +18,7 @@ class ReportMedicalDetail(Model): 'types': fields.Many2Many("clinic.patient.type","Types"), "branch_id": fields.Many2One("clinic.branch","Branch"), "department_id": fields.Many2One("clinic.department","Department"), + 'report_type': fields.Selection([['completed','Completed'],['not_completed','Not Completed']],"Report Type"), } # in case link from another report @@ -29,8 +30,9 @@ class ReportMedicalDetail(Model): date_from=defaults.get('date_from','%s-%s-01'%(year,month)) date_to=defaults.get('date_to',"%s-%s-%s"%(year,month,total_day)) categ_id=defaults.get('categ_id',None) + report_type=defaults.get('report_type',"completed") if not categ_id: - categ_ids=get_model("product.categ").search([['code','=','EPO']]) + categ_ids=get_model("product.categ").search([['code','=','MDC']]) if categ_ids: categ_id=categ_ids[0] branch_id=defaults.get('branch_id',None) @@ -54,7 +56,6 @@ class ReportMedicalDetail(Model): product_id=defaults.get("product_id",None) if product_id: product_id=int(product_id) - print('xx ',product_id) res={ 'date': date, 'date_from': date_from, @@ -64,7 +65,9 @@ class ReportMedicalDetail(Model): 'department_id': department_id, 'types': types, 'product_id': product_id, + 'report_type': report_type, } + print('report_type ', report_type) return res def get_report_data(self,ids,context={}): @@ -78,6 +81,7 @@ class ReportMedicalDetail(Model): department_id=defaults.get("department_id") product_id=defaults.get('product_id') types=defaults.get('types') + report_type=defaults.get('report_type','completed') if ids: obj=self.browse(ids)[0] prod_categ_id=obj.prod_categ_id.id @@ -88,6 +92,7 @@ class ReportMedicalDetail(Model): month=obj.date_from.split("-")[1] time_start=obj.date_from time_stop=obj.date_to + report_type=obj.report_type or 'completed' dom=[ ['hd_case_id.date','>=',time_start], ['hd_case_id.date','<=',time_stop], @@ -97,13 +102,17 @@ class ReportMedicalDetail(Model): if department_id: dom.append(['hd_case_id.department_id','=',department_id]) if prod_categ_id: - dom.append(['product_categ_id','=',prod_categ_id]) + dom.append(['product_categ_id.id','child_of',prod_categ_id]) if product_id: dom.append(['product_id','=',product_id]) if types and ids: dom.append(['hd_case_id.patient_type_id','in',[t.id for t in types]]) elif types: dom.append(['hd_case_id.patient_type_id','in',[t_id for t_id in types]]) + if report_type=='completed': + dom.append(["hd_case_id.state","in",["waiting_payment","paid"]]) + else: + dom.append(["hd_case_id.state","not in",["waiting_payment","paid"]]) lines=[] total_qty=0 for line in get_model('clinic.hd.case.line').search_browse(dom): diff --git a/netforce_clinic/models/report_medical_summary.py b/netforce_clinic/models/report_medical_summary.py index 577af77..4ee091e 100644 --- a/netforce_clinic/models/report_medical_summary.py +++ b/netforce_clinic/models/report_medical_summary.py @@ -17,6 +17,7 @@ class ReportMedicalSummary(Model): "prod_categ_id": fields.Many2One("product.categ","Category"), "branch_id": fields.Many2One("clinic.branch","Branch"), "department_id": fields.Many2One("clinic.department","Department"), + 'report_type': fields.Selection([['completed','Completed'],['not_completed','Not Completed']],"Report Type"), } # in case link from another report @@ -28,8 +29,9 @@ class ReportMedicalSummary(Model): date_from=defaults.get('date_from','%s-%s-01'%(year,month)) date_to=defaults.get('date_to',"%s-%s-%s"%(year,month,total_day)) categ_id=defaults.get('categ_id',None) + report_type=defaults.get('report_type',"completed") if not categ_id: - categ_ids=get_model("product.categ").search([['parent_id.code','=','MDC']]) + categ_ids=get_model("product.categ").search([['code','=','MDC']]) if categ_ids: categ_id=categ_ids[0] branch_id=defaults.get('branch_id',None) @@ -54,6 +56,7 @@ class ReportMedicalSummary(Model): 'prod_categ_id': categ_id, 'branch_id': branch_id, 'department_id': department_id, + 'report_type': report_type, } return res @@ -66,6 +69,7 @@ class ReportMedicalSummary(Model): prod_categ_id=defaults.get("prod_categ_id") branch_id=defaults.get("branch_id") department_id=defaults.get("department_id") + report_type=defaults.get("report_type","completed") if ids: obj=self.browse(ids)[0] prod_categ_id=obj.prod_categ_id.id @@ -74,17 +78,21 @@ class ReportMedicalSummary(Model): month=obj.date_from.split("-")[1] time_start=obj.date_from time_stop=obj.date_to - + report_type=obj.report_type or "completed" + print('report_type ---> ', report_type) products={} patient_types={t['id']: t['name'] for t in get_model('clinic.patient.type').search_read([[]],['name'],order="name")} dom=[] dom.append(['type','=','stock']) if prod_categ_id: - dom.append(['categ_id','=',prod_categ_id]) - print('dom ', dom) + dom.append(['categ_id.id','child_of',prod_categ_id]) + categ_ids=set() for prod in get_model("product").search_browse(dom): prod_code=prod.code or "" + categ=prod.categ_id + if categ and categ.parent_id: + categ_ids.update({categ.id}) products[prod_code]={} for patient_type_id,type_name in patient_types.items(): products[prod_code][patient_type_id]={ @@ -101,17 +109,24 @@ class ReportMedicalSummary(Model): dom.append(['branch_id','=',branch_id]) if department_id: dom.append(['department_id','=',department_id]) + if report_type=='completed': + dom.append(["state","in",["waiting_payment","paid"]]) + else: + dom.append(["state","not in",["waiting_payment","paid"]]) for hd_case in get_model('clinic.hd.case').search_browse(dom): patient_type_id=hd_case.patient_type_id.id for line in hd_case.lines: prod=line.product_id prod_code=prod.code or "" + categ=line.product_categ_id if not prod_code or not prod.active: continue - if line.type=='fee' or prod.type=='service': - continue - if prod_categ_id and prod_categ_id != prod.categ_id.id: + if categ and categ.id not in list(categ_ids): continue + #if line.type=='fee' or prod.type=='service': + #continue + #if prod_categ_id and prod_categ_id != prod.categ_id.id: + #continue products[prod_code][patient_type_id]['qty']+=line.qty lines=[] @@ -194,6 +209,7 @@ class ReportMedicalSummary(Model): 'lines': lines, 'month': month_str, 'year': year, + 'report_type': report_type, } return data diff --git a/netforce_clinic/models/visit_board.py b/netforce_clinic/models/visit_board.py index a109846..de85027 100644 --- a/netforce_clinic/models/visit_board.py +++ b/netforce_clinic/models/visit_board.py @@ -166,9 +166,11 @@ class VisitBoard(Model): hd_case_number=hd_case.number hd_case_state=hd_case.state if hd_case_state=='completed': - visit_color='#99ff99' + #visit_color='#99ff99' + visit_color='' elif hd_case_state=='in_progress': - visit_color='#f9e37d' + #visit_color='#f9e37d' + visit_color='' pass number=visit.number if number=='/': diff --git a/netforce_clinic/reports/report_labor_cost_staff.xlsx b/netforce_clinic/re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O=c3D z;A;dM15KqD=~%t7F(&v<5FfYgum&av2@sE#pK);ZmYvkagoi$p`U3QPvMU()tOG=T zBsnl*TSXPwmO9j~EPqQJ8_TKUM%+R#4ie;BIt#w}_EJjTCp+jWLc08lZE!u+S9hVs z`{2zMAT_6F#X;(m{(+f4?3G-YA?$Kc8jO97{?~1onH&mz7wl`Mp<_^@{kVnjvxk0t z3*kTGryB~tCjRU&Ut8=yf)4dnzZ&kpX8-J)Uc1mgLJTDd|IYrGC;e;s&u-$ix%wmW zQ62X8R_m{Ies>pga1V3T}g*K|fUwU=__bOI+e_7?b z^YCkxpT~>;{4Fzte_7@GIqKIcKkM@KDDop*3$*C>A9^Zx+ElKt-h literal 0 HcmV?d00001 diff --git a/netforce_clinic/templates/report_hd_case_summary.hbs b/netforce_clinic/templates/report_hd_case_summary.hbs index eb1b76e..777a307 100644 --- a/netforce_clinic/templates/report_hd_case_summary.hbs +++ b/netforce_clinic/templates/report_hd_case_summary.hbs @@ -122,7 +122,7 @@
- รวมจำนวนยาที่ใช้ประจำเดือน + รวมจำนวนยาที่ใช้ประจำเดือน
@@ -140,7 +140,7 @@ {{#each sub_lines}} - {{qty}} + {{qty}} {{/each}} diff --git a/netforce_clinic/templates/report_labor_cost.hbs b/netforce_clinic/templates/report_labor_cost.hbs index 359a2ca..3b4c7dd 100644 --- a/netforce_clinic/templates/report_labor_cost.hbs +++ b/netforce_clinic/templates/report_labor_cost.hbs @@ -72,7 +72,7 @@ {{qty}} {{else}} - {{view "link" string=qty action="clinic_hd_case" action_options=option_qty}} + {{view "link" string=qty action="clinic_report_labor_cost_staff" action_options=option_qty}} {{/if}} {{/each}} @@ -84,7 +84,7 @@ {{else}} {{#if walkin_qty}} - {{view "link" string=qty2 action="clinic_hd_case" action_options=option_qty2}} + {{view "link" string=qty2 action="clinic_report_labor_cost_staff" action_options=option_qty2}} {{else}} 0.00 {{/if}} diff --git a/netforce_clinic/templates/report_labor_cost_staff.hbs b/netforce_clinic/templates/report_labor_cost_staff.hbs new file mode 100644 index 0000000..35f1d5f --- /dev/null +++ b/netforce_clinic/templates/report_labor_cost_staff.hbs @@ -0,0 +1,32 @@ +
+
+ + + + + + + + + + {{#each lines}} + + + + + + {{/each}} + + + + + + +
HDCaseDoctorDepartment
+ {{view "link" string=number action="clinic_hd_case_staff" action_options="mode=form" active_id=id}} + + {{view "link" string=staff_name action="clinic_staff" action_options="mode=form" active_id=staff_id}} + + {{department_name}} +
+