From 3215e9b638a6fb2d43684d7095b68a2ba8c718f0 Mon Sep 17 00:00:00 2001 From: "chayut.s" Date: Fri, 24 Oct 2014 13:58:31 +0700 Subject: [PATCH 1/5] Link Report to Data --- netforce_clinic/models/report_hd_detail.py | 43 +++++++++++++-------- netforce_clinic/models/report_hd_madical.py | 25 ++++++++++-- netforce_clinic/models/report_hd_summary.py | 1 - 3 files changed, 49 insertions(+), 20 deletions(-) diff --git a/netforce_clinic/models/report_hd_detail.py b/netforce_clinic/models/report_hd_detail.py index d218e18..1e43cc5 100644 --- a/netforce_clinic/models/report_hd_detail.py +++ b/netforce_clinic/models/report_hd_detail.py @@ -1,7 +1,7 @@ import time from netforce.model import Model, fields, get_model -#from netforce.access import get_active_company + class ReportHDDetail(Model): _name="clinic.report.hd.detail" @@ -15,6 +15,8 @@ class ReportHDDetail(Model): "date_from": fields.Date("From"), "date_to": fields.Date("To"), "cycle_id": fields.Many2One("clinic.cycle","Cycle"), + "type": fields.Selection([("mg","Medical Goverment"),("sc","Social Security"),("nhso","NHSO (30B)"),("personal","Personal"),("other","Other")],"Type"), + } _defaults={ @@ -38,20 +40,14 @@ class ReportHDDetail(Model): date_from=time.strftime("%Y-%m-%d") date_to=time.strftime("%Y-%m-%d") - # print('date_from ',date_from) + defaults=context.get("defaults") if defaults: if defaults.get("date_from"): date_from=defaults['date_from'] if defaults.get("date_to"): date_to=defaults['date_to'] - # date_to=context['date_to'] - # default => key => dataults - # date_from=context['date_from'] - # print(context['date_from']) - #'2014-10-13' - # print('date_from ',date_from) - # print('date_to ',date_to) + PATIENT_TYPE={ "mg":"Medical Government", "sc":"Social Security", @@ -84,7 +80,11 @@ class ReportHDDetail(Model): dom.append([ 'doctor_id','=',obj.doctor_id.id, ]) - + if obj.type_id: + dom.append([ + 'type','=',obj.type_id.id, + ]) + dom.append(['time_start', ">=", date_from+" 00:00:00"]) dom.append(['time_stop',"<=", date_to+" 23:59:59"]) lines=[] @@ -92,10 +92,17 @@ class ReportHDDetail(Model): index=0 no_patient=0 for hd_case in get_model("clinic.hd.case").search_browse(dom,order="cycle_id.sequence"): + #print('='*50) + #for line in hd_case.line: + # dialyzer_id=line.dialyzer_id + # if dialyzer_id: + # dialyzer_number=line.number or "" + # print(dialyzer_number) + + #print('='*50) patient_type=hd_case.patient_id.type patient_type=PATIENT_TYPE.get(patient_type) - #dialyzer_name=hd_case.dialyzers.id - #dialyzer_name=DIALYZER_NAME.get(dialyzer_name) + #dialyzer=get_model("clinic.dialyzer").search_browse([]) cycle_name=hd_case.cycle_id.name or "" show_cycle=False if not cycle_name in cycles: @@ -122,14 +129,18 @@ class ReportHDDetail(Model): vals={ 'show_cycle': show_cycle, 'cycle' : cycle_name, - 'patient': hd_case.patient_id.name, + 'patient_id': hd_case.patient_id.id, + 'patient_name': hd_case.patient_id.name, 'patient_type' : patient_type, 'no_patient': 0, - 'doctor' : hd_case.doctor_id.name, + 'doctor_id': hd_case.doctor_id.id, + 'doctor_name' : hd_case.doctor_id.name, 'total' : hd_case.total, + 'hd_case_id' : hd_case.id, 'rc_no' : hd_case.number, - 'dialyzer_name' : 'DZ-xxx', - 'nurse' : hd_case.nurse_id.name, + 'dialyzer_number' : 'DZ-XXXX', + 'nurse_id': hd_case.nurse_id.id, + 'nurse_name' : hd_case.nurse_id.name, } lines.append(vals) diff --git a/netforce_clinic/models/report_hd_madical.py b/netforce_clinic/models/report_hd_madical.py index c2de473..d75d294 100644 --- a/netforce_clinic/models/report_hd_madical.py +++ b/netforce_clinic/models/report_hd_madical.py @@ -46,22 +46,30 @@ class ReportHDMadical(Model): weekday, total_day=monthrange(year, month) time_start='2014-%s-01 00:00:00'%(month) time_stop='2014-%s-%s 23:59:59'%(month,total_day) - + dom=[] dom.append(['state','=','completed']) dom.append(['time_start','>=',time_start]) dom.append(['time_stop','<=',time_stop]) - #hd_cases=get_model("clinic.hd.case.gm.line").search_browse(dom) + for product in get_model("clinic.hd.case.gm.line").search_browse([]): + product_id=product.product_id + print(product_id) + if product_id: + product_name=product.description or "" + product_id=product.product_id or "" + lines=[ { - 'madical' : 'H4', + 'product_id' : 'MD-XXXX', + 'madical' : product_name, 'sc': '437', 'uc': '', 'buy' : '4', 'total' : '441', }, { + 'product_id' : 'MD-XXXX', 'madical' : 'H2', 'sc': '', 'uc': '', @@ -69,6 +77,7 @@ class ReportHDMadical(Model): 'total' : '', }, { + 'product_id' : 'MD-XXXX', 'madical' : 'Epr4', 'sc': '216', 'uc': '', @@ -76,6 +85,7 @@ class ReportHDMadical(Model): 'total' : '216', }, { + 'product_id' : 'MD-XXXX', 'madical' : 'Epr2', 'sc': '', 'uc': '', @@ -83,6 +93,7 @@ class ReportHDMadical(Model): 'total' : '', }, { + 'product_id' : 'MD-XXXX', 'madical' : 'Epk4', 'sc': '70', 'uc': '', @@ -90,6 +101,7 @@ class ReportHDMadical(Model): 'total' : '70', }, { + 'product_id' : 'MD-XXXX', 'madical' : 'Epk2', 'sc': '', 'uc': '', @@ -97,6 +109,7 @@ class ReportHDMadical(Model): 'total' : '', }, { + 'product_id' : 'MD-XXXX', 'madical' : 'Epg4', 'sc': '98', 'uc': '', @@ -104,6 +117,7 @@ class ReportHDMadical(Model): 'total' : '98', }, { + 'product_id' : 'MD-XXXX', 'madical' : 'Epg2', 'sc': '', 'uc': '', @@ -111,6 +125,7 @@ class ReportHDMadical(Model): 'total' : '', }, { + 'product_id' : 'MD-XXXX', 'madical' : 'Rng4', 'sc': '34', 'uc': '', @@ -118,6 +133,7 @@ class ReportHDMadical(Model): 'total' : '43', }, { + 'product_id' : 'MD-XXXX', 'madical' : 'Rng2', 'sc': '', 'uc': '', @@ -125,6 +141,7 @@ class ReportHDMadical(Model): 'total' : '', }, { + 'product_id' : 'MD-XXXX', 'madical' : 'Epi4', 'sc': '264', 'uc': '', @@ -132,6 +149,7 @@ class ReportHDMadical(Model): 'total' : '43', }, { + 'product_id' : 'MD-XXXX', 'madical' : 'Epi2', 'sc': '', 'uc': '', @@ -139,6 +157,7 @@ class ReportHDMadical(Model): 'total' : '', }, { + 'product_id' : 'MD-XXXX', 'madical' : 'Vnf', 'sc': '', 'uc': '', diff --git a/netforce_clinic/models/report_hd_summary.py b/netforce_clinic/models/report_hd_summary.py index bcbf3d0..6d33ac2 100644 --- a/netforce_clinic/models/report_hd_summary.py +++ b/netforce_clinic/models/report_hd_summary.py @@ -55,7 +55,6 @@ class ReportHDSummary(Model): dom.append(['time_start','>=',time_start]) dom.append(['time_stop','<=',time_stop]) - dom=[] dom.append(['type','=','mg']) patients_mg=len(get_model("clinic.patient").search(dom)) From 96ca8834a30beb492d4ad91352556c85482a251a Mon Sep 17 00:00:00 2001 From: "chayut.s" Date: Mon, 27 Oct 2014 09:38:52 +0700 Subject: [PATCH 2/5] xxx --- netforce_clinic/models/__init__.py | 3 +- netforce_clinic/models/report_hd_medical.py | 183 ++++++++++++++++++++ netforce_clinic/models/report_hd_payment.py | 174 +++++++++++++++++++ 3 files changed, 359 insertions(+), 1 deletion(-) create mode 100644 netforce_clinic/models/report_hd_medical.py create mode 100644 netforce_clinic/models/report_hd_payment.py diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py index 342b8d4..17c390f 100644 --- a/netforce_clinic/models/__init__.py +++ b/netforce_clinic/models/__init__.py @@ -30,7 +30,7 @@ from . import gen_visit from . import gen_visit_line from . import report_hd_detail from . import report_hd_summary -from . import report_hd_madical +from . import report_hd_medical from . import input_data from . import fin_setting from . import import_data_mg @@ -39,3 +39,4 @@ from . import import_data_sc from . import translate from . import payment from . import account_payment +from . import report_hd_payment diff --git a/netforce_clinic/models/report_hd_medical.py b/netforce_clinic/models/report_hd_medical.py new file mode 100644 index 0000000..77e34a6 --- /dev/null +++ b/netforce_clinic/models/report_hd_medical.py @@ -0,0 +1,183 @@ +import time + +from datetime import datetime +from calendar import monthrange +from netforce.model import Model,fields,get_model + +class ReportHDMedical(Model): + _name="clinic.report.hd.medical" + _string="Hemodialysis Report Medical Summary" + _transient=True + + _fields={ + "date": fields.Date("Month", required=True), + } + + _defaults={ + 'date': lambda *a: time.strftime("%Y-%m-%d"), + } + + def get_report_data(self,ids,context={}): + + for item in get_model("company").search_browse([]): + company_name=item.name + + date=datetime.now().strftime("%Y-%m-%d") + #datemonth=datetime.now().strftime("%m") + if ids: + obj=self.browse(ids)[0] + date=obj.date + year=int(date[0:4]) + month=int(date[5:7]) + month_str=datetime.strptime(date,'%Y-%m-%d').strftime("%B") + + #dom=[] + #dom.append(['fee_type','=','mg']) + + weekday, total_day=monthrange(year, month) + time_start='2014-%s-01 00:00:00'%(month) + time_stop='2014-%s-%s 23:59:59'%(month,total_day) + + dom=[] + dom.append(['state','=','completed']) + dom.append(['time_start','>=',time_start]) + dom.append(['time_stop','<=',time_stop]) + + for product in get_model("clinic.hd.case.gm.line").search_browse([]): + product_id=product.product_id.Product_id + #product_total=len(product_id) + #print(product_id) + if product_id: + product_name=product.description or "" + #product_id=product.product_id.id or "" + + + lines=[ + { + 'product_id' : 'MD-XXXX', + 'madical' : product_name, + 'mg': '', + 'uc': '437', + 'sc': '', + 'buy' : '4', + 'total' : '441', + }, + { + 'product_id' : 'MD-XXXX', + 'madical' : 'H2', + 'mg': '', + 'uc': '', + 'sc': '', + 'buy' : '', + 'total' : '', + }, + { + 'product_id' : 'MD-XXXX', + 'madical' : 'Epr4', + 'mg': '', + 'uc': '216', + 'sc': '', + 'buy' : '', + 'total' : '216', + }, + { + 'product_id' : 'MD-XXXX', + 'madical' : 'Epr2', + 'mg': '437', + 'uc': '', + 'sc': '', + 'buy' : '', + 'total' : '', + }, + { + 'product_id' : 'MD-XXXX', + 'madical' : 'Epk4', + 'mg': '437', + 'uc': '70', + 'sc': '', + 'buy' : '', + 'total' : '70', + }, + { + 'product_id' : 'MD-XXXX', + 'madical' : 'Epk2', + 'mg': '437', + 'uc': '', + 'sc': '', + 'buy' : '', + 'total' : '', + }, + { + 'product_id' : 'MD-XXXX', + 'madical' : 'Epg4', + 'mg': '437', + 'uc': '98', + 'sc': '', + 'buy' : '', + 'total' : '98', + }, + { + 'product_id' : 'MD-XXXX', + 'madical' : 'Epg2', + 'mg': '437', + 'uc': '', + 'sc': '', + 'buy' : '', + 'total' : '', + }, + { + 'product_id' : 'MD-XXXX', + 'madical' : 'Rng4', + 'mg': '437', + 'uc': '34', + 'sc': '', + 'buy' : '9', + 'total' : '43', + }, + { + 'product_id' : 'MD-XXXX', + 'madical' : 'Rng2', + 'mg': '437', + 'uc': '', + 'sc': '', + 'buy' : '', + 'total' : '', + }, + { + 'product_id' : 'MD-XXXX', + 'madical' : 'Epi4', + 'mg': '437', + 'uc': '264', + 'sc': '', + 'buy' : '9', + 'total' : '43', + }, + { + 'product_id' : 'MD-XXXX', + 'madical' : 'Epi2', + 'mg': '437', + 'uc': '', + 'sc': '', + 'buy' : '', + 'total' : '', + }, + { + 'product_id' : 'MD-XXXX', + 'madical' : 'Vnf', + 'mg': '437', + 'uc': '', + 'sc': '', + 'buy' : '', + 'total' : '', + }, + ] + + data={ + 'month': month_str, + 'year': year, + 'lines': lines, + 'company_name': company_name, + } + return data + +ReportHDMedical.register() diff --git a/netforce_clinic/models/report_hd_payment.py b/netforce_clinic/models/report_hd_payment.py new file mode 100644 index 0000000..f8969f2 --- /dev/null +++ b/netforce_clinic/models/report_hd_payment.py @@ -0,0 +1,174 @@ +import time + +from netforce.model import Model, fields, get_model + + +class ReportHDPayment(Model): + _name="clinic.report.hd.payment" + _string="Hemodialysis Report Payment" + _transient=True + + _fields={ + "patient_id" : fields.Many2One("clinic.patient","Patient"), + "doctor_id" : fields.Many2One("clinic.doctor","Doctor"), + "nurse_id" : fields.Many2One("clinic.nurse","Nurse"), + "date_from": fields.Date("From"), + "date_to": fields.Date("To"), + "cycle_id": fields.Many2One("clinic.cycle","Cycle"), + "type": fields.Selection([("mg","Medical Goverment"),("sc","Social Security"),("nhso","NHSO (30B)"),("personal","Personal"),("other","Other")],"Type"), + + } + + _defaults={ + 'date_from': lambda *a: time.strftime("%Y-%m-%d"), + 'date_to': lambda *a: time.strftime("%Y-%m-%d"), + } + + _order="cycle_id desc" + + + def get_report_data(self,ids,context={}): + + # company_id=get_active_company + # comp=get_model("company").browse(company_id) + # context=> dict + # inside context => keys => defaults => type => dict + # dict => key: value => '', 1, [], {} + # context['default'] => defaults(dict) => key => inside key => value => '2014-10-22' + for item in get_model("company").search_browse([]): + company_name=item.name + + date_from=time.strftime("%Y-%m-%d") + date_to=time.strftime("%Y-%m-%d") + + defaults=context.get("defaults") + if defaults: + if defaults.get("date_from"): + date_from=defaults['date_from'] + if defaults.get("date_to"): + date_to=defaults['date_to'] + + PATIENT_TYPE={ + "mg":"Medical Government", + "sc":"Social Security", + "nhso":"NHSO (30฿)", + "personal": "Personal", + "others": "Others", + } + + dom=[] + dom.append(['state','=','completed']) + if ids: + obj=self.browse(ids)[0] + if obj.date_from: + date_from=obj.date_from + if obj.date_to: + date_to=obj.date_to + if obj.cycle_id: + dom.append([ + 'cycle_id','=',obj.cycle_id.id, + ]) + if obj.patient_id: + dom.append([ + 'patient_id','=',obj.patient_id.id, + ]) + if obj.nurse_id: + dom.append([ + 'nurse_id','=',obj.nurse_id.id, + ]) + if obj.doctor_id: + dom.append([ + 'doctor_id','=',obj.doctor_id.id, + ]) + if obj.type_id: + dom.append([ + 'type','=',obj.type_id.id, + ]) + + dom.append(['time_start', ">=", date_from+" 00:00:00"]) + dom.append(['time_stop',"<=", date_to+" 23:59:59"]) + lines=[] + cycles=[] + index=0 + no_patient=0 + for hd_case in get_model("clinic.hd.case").search_browse(dom,order="cycle_id.sequence"): + #print('='*50) + #for line in hd_case.line: + # dialyzer_id=line.dialyzer_id + # if dialyzer_id: + # dialyzer_number=line.number or "" + # print(dialyzer_number) + + #print('='*50) + patient_type=hd_case.patient_id.type + patient_type=PATIENT_TYPE.get(patient_type) + #dialyzer=get_model("clinic.dialyzer").search_browse([]) + cycle_name=hd_case.cycle_id.name or "" + show_cycle=False + if not cycle_name in cycles: + cycles.append(cycle_name) + show_cycle=True + vals={ + 'color': 'success', + 'show_cycle': False, + 'cycle' : "", + 'patient': "", + 'no_patient': no_patient, + 'patient_type' : "", + 'doctor' : "", + 'total' : "", + 'rc_no' : "", + 'dialyzer_name' : "", + 'nurse' : "", + } + lines.append(vals) + no_patient=1 + else: + no_patient+=1 + index+=1 + vals={ + 'show_cycle': show_cycle, + 'cycle' : cycle_name, + 'patient_id': hd_case.patient_id.id, + 'patient_name': hd_case.patient_id.name, + 'patient_type' : patient_type, + 'no_patient': 0, + 'doctor_id': hd_case.doctor_id.id, + 'doctor_name' : hd_case.doctor_id.name, + 'total' : hd_case.total, + 'hd_case_id' : hd_case.id, + 'rc_no' : hd_case.number, + 'dialyzer_number' : 'DZ-XXXX', + 'nurse_id': hd_case.nurse_id.id, + 'nurse_name' : hd_case.nurse_id.name, + } + lines.append(vals) + + # XXX + if lines: + vals={ + 'color': 'success', + 'show_cycle': False, + 'cycle' : "", + 'patient': "", + 'no_patient': no_patient, + 'patient_type' : "", + 'doctor' : "", + 'total' : "", + 'rc_no' : "", + 'dialyzer_name' : "", + 'nurse' : "", + } + lines.append(vals) + #XXX + del lines[0] + data={ + 'lines': lines, + 'same_date': date_from==date_to, + 'date_from': date_from, + 'date_to': date_to, + 'company_name': company_name, + } + return data + +ReportHDPayment.register() From 0a04faccf639fe505edf42d2a930ebe93dd6b1a4 Mon Sep 17 00:00:00 2001 From: "chayut.s" Date: Mon, 27 Oct 2014 10:30:35 +0700 Subject: [PATCH 3/5] clean --- .../actions/clinic_report_hd_madical.xml | 8 - .../layouts/clinic_report_hd_madical.xml | 3 - netforce_clinic/models/report_hd_madical.py | 177 ------------------ .../reports/report_hd_madical.xlsx | Bin 7156 -> 0 bytes .../templates/report_hd_madical.hbs | 29 --- 5 files changed, 217 deletions(-) delete mode 100644 netforce_clinic/actions/clinic_report_hd_madical.xml delete mode 100644 netforce_clinic/layouts/clinic_report_hd_madical.xml delete mode 100644 netforce_clinic/models/report_hd_madical.py delete mode 100644 netforce_clinic/reports/report_hd_madical.xlsx delete mode 100644 netforce_clinic/templates/report_hd_madical.hbs diff --git a/netforce_clinic/actions/clinic_report_hd_madical.xml b/netforce_clinic/actions/clinic_report_hd_madical.xml deleted file mode 100644 index 4101bef..0000000 --- a/netforce_clinic/actions/clinic_report_hd_madical.xml +++ /dev/null @@ -1,8 +0,0 @@ - - Medical Report Summary - report - clinic.report.hd.madical - report_hd_madical - report_hd_madical - clinic_menu - diff --git a/netforce_clinic/layouts/clinic_report_hd_madical.xml b/netforce_clinic/layouts/clinic_report_hd_madical.xml deleted file mode 100644 index fcd40ac..0000000 --- a/netforce_clinic/layouts/clinic_report_hd_madical.xml +++ /dev/null @@ -1,3 +0,0 @@ -
- - diff --git a/netforce_clinic/models/report_hd_madical.py b/netforce_clinic/models/report_hd_madical.py deleted file mode 100644 index d75d294..0000000 --- a/netforce_clinic/models/report_hd_madical.py +++ /dev/null @@ -1,177 +0,0 @@ -import time - -from datetime import datetime -from calendar import monthrange -from netforce.model import Model,fields,get_model - -class ReportHDMadical(Model): - _name="clinic.report.hd.madical" - _string="Hemodialysis Report Madical Summary" - _transient=True - - _fields={ - "date": fields.Date("Month", required=True), - } - - _defaults={ - 'date': lambda *a: time.strftime("%Y-%m-%d"), - } - - def get_report_data(self,ids,context={}): - - for item in get_model("company").search_browse([]): - company_name=item.name - - date=datetime.now().strftime("%Y-%m-%d") - #datemonth=datetime.now().strftime("%m") - if ids: - obj=self.browse(ids)[0] - date=obj.date - year=int(date[0:4]) - month=int(date[5:7]) - month_str=datetime.strptime(date,'%Y-%m-%d').strftime("%B") - - next_month = str(month + 1) - if next_month == 13: - next_month = 12 - #next_month_str=datetime.strptime(next_month,'%m').strftime("%B") - previous_month = str(month - 1) - if previous_month == 0: - previous_month = 12 - #previous_month_str=datetime.strptime(previous_month,'%m').strftime("%B") - - #madical=get_model("clinic.hd.case.gm.line").search_browse() - #patients_mg=get_model("clinic.patient").search_browse(['type','=','mg']) - - weekday, total_day=monthrange(year, month) - time_start='2014-%s-01 00:00:00'%(month) - time_stop='2014-%s-%s 23:59:59'%(month,total_day) - - dom=[] - dom.append(['state','=','completed']) - dom.append(['time_start','>=',time_start]) - dom.append(['time_stop','<=',time_stop]) - - for product in get_model("clinic.hd.case.gm.line").search_browse([]): - product_id=product.product_id - print(product_id) - if product_id: - product_name=product.description or "" - product_id=product.product_id or "" - - lines=[ - { - 'product_id' : 'MD-XXXX', - 'madical' : product_name, - 'sc': '437', - 'uc': '', - 'buy' : '4', - 'total' : '441', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'H2', - 'sc': '', - 'uc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epr4', - 'sc': '216', - 'uc': '', - 'buy' : '', - 'total' : '216', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epr2', - 'sc': '', - 'uc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epk4', - 'sc': '70', - 'uc': '', - 'buy' : '', - 'total' : '70', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epk2', - 'sc': '', - 'uc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epg4', - 'sc': '98', - 'uc': '', - 'buy' : '', - 'total' : '98', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epg2', - 'sc': '', - 'uc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Rng4', - 'sc': '34', - 'uc': '', - 'buy' : '9', - 'total' : '43', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Rng2', - 'sc': '', - 'uc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epi4', - 'sc': '264', - 'uc': '', - 'buy' : '9', - 'total' : '43', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epi2', - 'sc': '', - 'uc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Vnf', - 'sc': '', - 'uc': '', - 'buy' : '', - 'total' : '', - }, - ] - - data={ - 'month': month_str, - 'year': year, - 'lines': lines, - 'company_name': company_name, - } - return data - -ReportHDMadical.register() diff --git a/netforce_clinic/reports/report_hd_madical.xlsx b/netforce_clinic/reports/report_hd_madical.xlsx deleted file mode 100644 index 65c30fd0c562c10b8976a3c068892cca2ee73bb1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7156 zcmdT}XIPV4whjo=lu$x1k*1*-Ksr)X1O=o71f@$8kluSQ;V4Z&I#NPM!~`kQtAI4= zAT?C!C3FZ}ICIa)Ju`Fe%+Fb0o+LZjdw*H)DtXu1s)|?eKmbBQLI5G9hAiNcket6a za4@xU*vA17B=c%DcA|IWzw`U-sc78TN zq`VKNOGGAVg5u@w>y$^Y|3c5X!5 z;Gh`zMs#6~&-KM;USu1875!+IMjQ=i`3`4E^~GH!I%1 zVdHA+U}Y_^yR)V5#KxTjU9h!$fPs?iXVZaK6H3zBda;50#$z zKpAw1O;^9id>_WtKHgmx3||gymbrGdAQLaRp~Z!;#vi-BhNjc(%AA}w=ZO3SrYNkY z9Py)(=hZI3h-yKN8l&#&Wwk3P=MT462Cl()JGSNfQ*gSd)Qfbke750Mt#WKU`(!+P zozwu~na0<4ov6!!`K>^&TBOl5H}4&S9qYq+$$4p3rV+Mp#er#R!mdPv1}~X6JV0H+7In69UM)hyjXa*gBJ>|FJdoAcEg@;|rEjvUuY$Crdk)yQo zo6$|m8uZd*FvR<{m<QUjXo4etG3_SgGzcL!~%wCRF@4H))AipWQCyQ!}zq~U`K z5}hNnt15BZPI=PjvgLhrJE?lifw?B9 z_2_o$%+r!;G&BsM@i@Si2F+fr(%8!-i&+igNqK@=`Jk!aw=$aFjj~94%3VA=3h|H( zN3eT8^NHu_;jhB4mF?Xaoj0R-KPm1j+q*L(m5`dKK_#^(g&e_J9r*v@xF^XwD?BNxU|Cut0}6N!cK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;$kE?gCQH(lhj2^C949HQDbg$p;wmGw?`@M5pPqWT3eWCmL z|I)wi+>&2L$Jo}v^mp3!w&Q}f$?ki}&UqW%g^@j%uLL;bQ&7m>aEX&-r{0n&v-nYW zOMdKo=DI{}>mz~puS)y9QTX6kA)!pV`$V*c*>|kNCxusbNI6&>*xYTe510dSijtBQ zL~nk8)7UZ{nSY7z}46$FkxPT)U5>0?CWYFi@S*iPbh6Mbo+XN{L| zkRVbor|pGtwq!a<*QVjCz4&=Q@Hd?Puo-F1!U|Wr-4;#>1e+Vv$3{m~R8>0lE7}k% z$V;2mw3*1o++p{Dr-@62cPcp{2b2V;m;~!u#l-gNYPaG>VV&8Ef z_UTyCs7`YeQs5=KUG<2cZg=i?OnjyU>IfB~Sg53U7ndCjyLd1BjvGAG!Elc1$zLK% zd5)}(jIE86sg0AtQ+GR4N4?*hzOhOwzc<5=sWd+3b$!KQ8L%N>kKp^wUXEpJD9@T= z)X?dSIoIm3SE%)mW)4kI-Nx()?3>n9=_q~F2iJEAAmg|G{gcnj3!3|9pmo$GOL@9h zxT;^jL~y}cX>GFD^<;AMHgOo!cqCo8wyB@pflTC4wRLPAD7@NWtw?B{W67DnGW(sr zZGm{UW;vZ=n=XSxD@((q930U6A&5AmR9p6=%E#10xsLLzEJlaCGJmM({kAE2@2cP$ zcPssBTVmzYTXqlBu9L}=8b*(_8e$zRglLNm?#6*YWU+Le2h?e&p3CXlED5cl5~kvg z*A1$HKU;0^%x?P|_j0c6?XuWti+WzU+F#eklY#)U(>dN@^w6Z|bAO>&Zw@rEjI@*R z+Fy=2x@G_L8yb;Nd*uT0t@NBg{&TdS;a&JL4lW4r>wxC+3B|<$&Ht54$2EUmc)5Xp zae(nl=+1BTua7hSywBwl>7w2LO9am8;Q2oPwE6$%T`m^|7v -

- Summary of the Madical -

-

- [{{company_name}}]
- As at {{month}} {{year}} -

- - - - - - - - - - - {{#each lines}} - - - - - - - - {{/each}} - -
MadicalSocial SecurityucBuyTotal
{{madical}}{{sc}}{{uc}}{{buy}}{{total}}
From 13045e3f638148cfeea705bd5b24b27f3072b2fd Mon Sep 17 00:00:00 2001 From: "chayut.s" Date: Mon, 27 Oct 2014 10:31:49 +0700 Subject: [PATCH 4/5] ... --- netforce_clinic/layouts/clinic_menu.xml | 6 +++-- .../layouts/clinic_report_hd_detail.xml | 14 +++++----- .../templates/report_hd_detail.hbs | 26 +++++++------------ .../templates/report_hd_summary.hbs | 13 ++++++++-- 4 files changed, 32 insertions(+), 27 deletions(-) diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml index 74810d1..aa9dbf6 100644 --- a/netforce_clinic/layouts/clinic_menu.xml +++ b/netforce_clinic/layouts/clinic_menu.xml @@ -22,8 +22,10 @@
-
- +
+ +
+ " diff --git a/netforce_clinic/layouts/clinic_report_hd_detail.xml b/netforce_clinic/layouts/clinic_report_hd_detail.xml index b07f88c..a16cb78 100644 --- a/netforce_clinic/layouts/clinic_report_hd_detail.xml +++ b/netforce_clinic/layouts/clinic_report_hd_detail.xml @@ -1,10 +1,12 @@
- - - - - - + + + + + + + +
diff --git a/netforce_clinic/templates/report_hd_detail.hbs b/netforce_clinic/templates/report_hd_detail.hbs index 19b18ad..3579c17 100644 --- a/netforce_clinic/templates/report_hd_detail.hbs +++ b/netforce_clinic/templates/report_hd_detail.hbs @@ -9,7 +9,7 @@ {{/if}} - +
- @@ -33,6 +30,9 @@ + @@ -53,26 +53,18 @@ {{else}} - + {{/if}} - - - - + + + + {{/each}} diff --git a/netforce_clinic/templates/report_hd_summary.hbs b/netforce_clinic/templates/report_hd_summary.hbs index af2deb1..ca07430 100644 --- a/netforce_clinic/templates/report_hd_summary.hbs +++ b/netforce_clinic/templates/report_hd_summary.hbs @@ -4,10 +4,12 @@

[{{company_name}}]
- As at {{month}} {{year}}

+

+ As at {{month}} {{year}} +

-
@@ -18,9 +18,6 @@ Patient - Doctor - Patient Type Dialyzer + Doctor + Nurse {{no_patient}}{{patient}}{{patient_name}} - {{doctor}} - {{patient_type}} {{total}} - {{rc_no}} - - {{dialyzer_name}} - - {{nurse}} - {{rc_no}}{{dialyzer_number}}{{doctor_name}}{{nurse_name}}
+
@@ -22,4 +24,11 @@ {{/each}} + + + + + + +
Topic Month
From 12ff2c49fb44cbb56f68305bcd0494f45b912a87 Mon Sep 17 00:00:00 2001 From: "chayut.s" Date: Mon, 27 Oct 2014 18:44:40 +0700 Subject: [PATCH 5/5] customize report --- .../actions/clinic_report_hd_medical.xml | 8 + .../actions/clinic_report_hd_payment.xml | 8 + netforce_clinic/layouts/clinic_menu.xml | 2 - netforce_clinic/models/report_hd_detail.py | 20 +-- netforce_clinic/models/report_hd_medical.py | 154 +++--------------- netforce_clinic/models/report_hd_summary.py | 14 +- netforce_clinic/reports/report_hd_detail.xlsx | Bin 6092 -> 6131 bytes .../reports/report_hd_medical.xlsx | Bin 0 -> 5801 bytes .../reports/report_hd_payment.xlsx | Bin 0 -> 7156 bytes .../templates/report_hd_detail.hbs | 2 +- .../templates/report_hd_madical_old.hbs | 29 ++++ .../templates/report_hd_medical.hbs | 48 ++++++ .../templates/report_hd_payment.hbs | 61 +++++++ 13 files changed, 191 insertions(+), 155 deletions(-) create mode 100644 netforce_clinic/actions/clinic_report_hd_medical.xml create mode 100644 netforce_clinic/actions/clinic_report_hd_payment.xml create mode 100644 netforce_clinic/reports/report_hd_medical.xlsx create mode 100644 netforce_clinic/reports/report_hd_payment.xlsx create mode 100644 netforce_clinic/templates/report_hd_madical_old.hbs create mode 100644 netforce_clinic/templates/report_hd_medical.hbs create mode 100644 netforce_clinic/templates/report_hd_payment.hbs diff --git a/netforce_clinic/actions/clinic_report_hd_medical.xml b/netforce_clinic/actions/clinic_report_hd_medical.xml new file mode 100644 index 0000000..09b0345 --- /dev/null +++ b/netforce_clinic/actions/clinic_report_hd_medical.xml @@ -0,0 +1,8 @@ + + Medical Report Summary + report + clinic.report.hd.medical + report_hd_medical + report_hd_medical + clinic_menu + diff --git a/netforce_clinic/actions/clinic_report_hd_payment.xml b/netforce_clinic/actions/clinic_report_hd_payment.xml new file mode 100644 index 0000000..54ad850 --- /dev/null +++ b/netforce_clinic/actions/clinic_report_hd_payment.xml @@ -0,0 +1,8 @@ + + Payment Report Summary + report + clinic.report.hd.payment + report_hd_payment + report_hd_payment + clinic_menu + diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml index c95b3dd..70a49bd 100644 --- a/netforce_clinic/layouts/clinic_menu.xml +++ b/netforce_clinic/layouts/clinic_menu.xml @@ -33,8 +33,6 @@
" -
-
diff --git a/netforce_clinic/models/report_hd_detail.py b/netforce_clinic/models/report_hd_detail.py index 1e43cc5..08054e2 100644 --- a/netforce_clinic/models/report_hd_detail.py +++ b/netforce_clinic/models/report_hd_detail.py @@ -82,7 +82,7 @@ class ReportHDDetail(Model): ]) if obj.type_id: dom.append([ - 'type','=',obj.type_id.id, + 'type','=',obj.type_id.name, ]) dom.append(['time_start', ">=", date_from+" 00:00:00"]) @@ -92,17 +92,13 @@ class ReportHDDetail(Model): index=0 no_patient=0 for hd_case in get_model("clinic.hd.case").search_browse(dom,order="cycle_id.sequence"): - #print('='*50) - #for line in hd_case.line: - # dialyzer_id=line.dialyzer_id - # if dialyzer_id: - # dialyzer_number=line.number or "" - # print(dialyzer_number) - - #print('='*50) + + for total in get_model("clinic.hd.case.line").search_browse([]): + total_fee=total.price or "" + + dialyzer_number=hd_case.dlz_id.id or "" patient_type=hd_case.patient_id.type patient_type=PATIENT_TYPE.get(patient_type) - #dialyzer=get_model("clinic.dialyzer").search_browse([]) cycle_name=hd_case.cycle_id.name or "" show_cycle=False if not cycle_name in cycles: @@ -135,10 +131,10 @@ class ReportHDDetail(Model): 'no_patient': 0, 'doctor_id': hd_case.doctor_id.id, 'doctor_name' : hd_case.doctor_id.name, - 'total' : hd_case.total, + 'total' : total_fee, 'hd_case_id' : hd_case.id, 'rc_no' : hd_case.number, - 'dialyzer_number' : 'DZ-XXXX', + 'dialyzer_number' : dialyzer_number, 'nurse_id': hd_case.nurse_id.id, 'nurse_name' : hd_case.nurse_id.name, } diff --git a/netforce_clinic/models/report_hd_medical.py b/netforce_clinic/models/report_hd_medical.py index 77e34a6..777e820 100644 --- a/netforce_clinic/models/report_hd_medical.py +++ b/netforce_clinic/models/report_hd_medical.py @@ -37,141 +37,35 @@ class ReportHDMedical(Model): weekday, total_day=monthrange(year, month) time_start='2014-%s-01 00:00:00'%(month) time_stop='2014-%s-%s 23:59:59'%(month,total_day) - + dom=[] dom.append(['state','=','completed']) dom.append(['time_start','>=',time_start]) dom.append(['time_stop','<=',time_stop]) - for product in get_model("clinic.hd.case.gm.line").search_browse([]): - product_id=product.product_id.Product_id - #product_total=len(product_id) - #print(product_id) - if product_id: - product_name=product.description or "" - #product_id=product.product_id.id or "" - - - lines=[ - { - 'product_id' : 'MD-XXXX', - 'madical' : product_name, - 'mg': '', - 'uc': '437', - 'sc': '', - 'buy' : '4', - 'total' : '441', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'H2', - 'mg': '', - 'uc': '', - 'sc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epr4', - 'mg': '', - 'uc': '216', - 'sc': '', - 'buy' : '', - 'total' : '216', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epr2', - 'mg': '437', - 'uc': '', - 'sc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epk4', - 'mg': '437', - 'uc': '70', - 'sc': '', - 'buy' : '', - 'total' : '70', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epk2', - 'mg': '437', - 'uc': '', - 'sc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epg4', - 'mg': '437', - 'uc': '98', - 'sc': '', - 'buy' : '', - 'total' : '98', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epg2', - 'mg': '437', - 'uc': '', - 'sc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Rng4', - 'mg': '437', - 'uc': '34', - 'sc': '', - 'buy' : '9', - 'total' : '43', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Rng2', - 'mg': '437', - 'uc': '', - 'sc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epi4', - 'mg': '437', - 'uc': '264', - 'sc': '', - 'buy' : '9', - 'total' : '43', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epi2', - 'mg': '437', - 'uc': '', - 'sc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Vnf', - 'mg': '437', - 'uc': '', - 'sc': '', - 'buy' : '', - 'total' : '', - }, - ] - + lines=[] + index=0 + for product in get_model("product").search_browse(['type','=','stock']): + product_id=product.id or "" + product_code=product.code or "" + product_name=product.name or "" + product_amount=len(str(product_code)) + #total=len(str(product_amount)) + + index+=1 + vals={ + 'product_code' : product_code, + 'medical' : product_name, + 'mg' : '-', + 'uc' : '-', + 'sc' : '-', + 'buy' : '-', + 'amount' : product_amount, + 'product_id': product_id, + } + lines.append(vals) + + data={ 'month': month_str, 'year': year, diff --git a/netforce_clinic/models/report_hd_summary.py b/netforce_clinic/models/report_hd_summary.py index 6d33ac2..64b357e 100644 --- a/netforce_clinic/models/report_hd_summary.py +++ b/netforce_clinic/models/report_hd_summary.py @@ -19,9 +19,6 @@ class ReportHDSummary(Model): } def get_report_data(self,ids,context={}): - # company_id=get_active_company - # company_name=get_model("company").search("name") - # company_name=get_model("company").search_browse() for item in get_model("company").search_browse([]): company_name=item.name @@ -51,10 +48,6 @@ class ReportHDSummary(Model): time_start='2014-%s-01'%(month) # 2014-10-20 time_stop='2014-%s-%s'%(month,total_day) - dom=[] - dom.append(['time_start','>=',time_start]) - dom.append(['time_stop','<=',time_stop]) - dom=[] dom.append(['type','=','mg']) patients_mg=len(get_model("clinic.patient").search(dom)) @@ -66,14 +59,15 @@ class ReportHDSummary(Model): patients_nhso=len(get_model("clinic.patient").search(dom)) dom.append(['type','=','pn']) patients_pn=len(get_model("clinic.patient").search(dom)) - + #New Patients + #dom.append(['type','=','All']) patients=len(get_model("clinic.patient").search_browse(['type','=','All'])) - #new_patients=len(patients) - + dom=[] dom.append(['state','=','completed']) dom.append(['time_start','>=',time_start]) dom.append(['time_stop','<=',time_stop]) + cur_total_case=len(get_model("clinic.hd.case").search(dom)) weekday, prev_total_day=monthrange(year, previous_month) diff --git a/netforce_clinic/reports/report_hd_detail.xlsx b/netforce_clinic/reports/report_hd_detail.xlsx index f8cb9027271e05bc4433addb84350e09abc5f64a..1e67ae720fcd943bbfce35b68f5f39fa11e7cacd 100644 GIT binary patch delta 3765 zcmZ8k1yB@R*Iq)p77!#Pq*H{YL6)VK?gmlmUK#;efhDAI6_AjU?ofIGiAAJjm3%>R zL1HOInjc?hzTfXVGk5NpbI)_?}JrGdQBeut7$D zIdL`E?f%k4nEaWiFYgcQR&*wljq(G%5k>p{t^JmN;M@D0q8e|zWxvhPhQu-1P0Y6l z^Cu%W3sj`k)7Mg{eX_ERdfiWHZ#%T>N(U=Tp$SG`n?QURB)q~~^%Ev?bSvm^W%are zG2b;_z#5x<%pRl6`{ct?W-L1KbuK?^1Y)$@#J}>+iaRg9_tdahmDgtkJxmcu6XNc64V{VAYIWng=-di&@=5p2c?%#upH-6Y6#V@Y?+nB z*>u#Ui9l4@;w5kR9dtaT^^s zjTQ~q^IRpAIrI18KsxRyi+6cb4;9A3ROpEzI1y1I!foC8Mu69Y;7K6r8 zQ0UXF&NTPAh+U#|#+U(`LEjW=ia7wKGrQ1vqTOk9h`%qz}-9mFTvut;fIS84>DGpzZgr zmvknjdGkTeg=xh=+#o&|xu&TV!@UG&I;~N~bw6jize&(eu>eB=rVK)dij<34q+! z)7|ktU@8ds<$kkjE5}uoXa?Kh6<`8CB0!8ogf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G>VV&8Ef z_UTyCs7`YeQs5=KUG<2cZg=i?OnjyU>IfB~Sg53U7ndCjyLd1BjvGAG!Elc1$zLK% zd5)}(jIE86sg0AtQ+GR4N4?*hzOhOwzc<5=sWd+3b$!KQ8L%N>kKp^wUXEpJD9@T= z)X?dSIoIm3SE%)mW)4kI-Nx()?3>n9=_q~F2iJEAAmg|G{gcnj3!3|9pmo$GOL@9h zxT;^jL~y}cX>GFD^<;AMHgOo!cqCo8wyB@pflTC4wRLPAD7@NWtw?B{W67DnGW(sr zZGm{UW;vZ=n=XSxD@((q930U6A&5AmR9p6=%E#10xsLLzEJlaCGJmM({kAE2@2cP$ zcPssBTVmzYTXqlBu9L}=8b*(_8e$zRglLNm?#6*YWU+Le2h?e&p3CXlED5cl5~kvg z*A1$HKU;0^%x?P|_j0c6?XuWti+WzU+F#eklY#)U(>dN@^w6Z|bAO>&Zw@rEjI@*R z+Fy=2x@G_L8yb;Nd*uT0t@NBg{&TdS;a&JL4lW4r>wxC+3B|<$&Ht54$2EUmc)5Xp zae(nl=+1BTua7hSywBwl>7w2LO9am8;Q2oPwE6$%T`m^|7v {{rc_no}} - {{dialyzer_number}} + {{dialyzer_number}} {{doctor_name}} {{nurse_name}} diff --git a/netforce_clinic/templates/report_hd_madical_old.hbs b/netforce_clinic/templates/report_hd_madical_old.hbs new file mode 100644 index 0000000..43c24b7 --- /dev/null +++ b/netforce_clinic/templates/report_hd_madical_old.hbs @@ -0,0 +1,29 @@ +
+

+ Summary of the Madical +

+

+ [{{company_name}}]
+ As at {{month}} {{year}} +

+
+ + + + + + + + + + {{#each lines}} + + + + + + + + {{/each}} + +
MadicalSocial SecurityucBuyTotal
{{madical}}{{sc}}{{uc}}{{buy}}{{total}}
diff --git a/netforce_clinic/templates/report_hd_medical.hbs b/netforce_clinic/templates/report_hd_medical.hbs new file mode 100644 index 0000000..7a9890f --- /dev/null +++ b/netforce_clinic/templates/report_hd_medical.hbs @@ -0,0 +1,48 @@ +
+

+ Summary of the Medical +

+

+ [{{company_name}}]
+

+

+ As at {{month}} {{year}} +

+
+ + + + + + + + + + + + + + {{#each lines}} + + + + + + + + + + {{/each}} + + + + + + + + + + + + +
Product IDProduct NameMGUCNHSO (30B)PayTotal
{{product_code}}{{medical}}{{mg}}{{uc}}{{sc}}{{buy}}{{amount}}
----32
diff --git a/netforce_clinic/templates/report_hd_payment.hbs b/netforce_clinic/templates/report_hd_payment.hbs new file mode 100644 index 0000000..aaabe16 --- /dev/null +++ b/netforce_clinic/templates/report_hd_payment.hbs @@ -0,0 +1,61 @@ +
+

Detail of the Hemodialysis

+

Payment

+

[{{company_name}}]

+

+ {{#if same_date}} + As at {{fmt_date date_from}} + {{else}} + From {{fmt_date date_from}} to {{fmt_date date_to}} + {{/if}} +

+
+ + + + + + + + + + + + {{#each lines context=context}} + {{#if show_cycle}} + + + + {{/if}} + + + + + + {{#if total}} + + + {{else}} + + {{/if}} + + {{/each}} + + + + + + +
+ Cycle + + RC.No + + Doctor + + Nurce + + HD Fee +
+ {{cycle}} +
{{rc_no}}{{doctor_name}}{{nurse_name}}Total{{total}}{{total}}