From 973fafa5d408fa0ea9db7e79934ae1fb46053b47 Mon Sep 17 00:00:00 2001 From: "chayut.s" Date: Mon, 20 Oct 2014 16:03:17 +0700 Subject: [PATCH 1/2] report --- .../layouts/clinic_hd_case_form.xml | 4 +- netforce_clinic/models/__init__.py | 5 +- netforce_clinic/models/hd_case.py | 30 ++-- netforce_clinic/models/report_hd_detail.py | 152 +++++++++++++++++ netforce_clinic/models/report_hd_madical.py | 153 ++++++++++++++++++ netforce_clinic/models/report_hd_summary.py | 145 +++++++++++++++++ netforce_clinic/models/visit.py | 2 +- 7 files changed, 475 insertions(+), 16 deletions(-) create mode 100644 netforce_clinic/models/report_hd_detail.py create mode 100644 netforce_clinic/models/report_hd_madical.py create mode 100644 netforce_clinic/models/report_hd_summary.py diff --git a/netforce_clinic/layouts/clinic_hd_case_form.xml b/netforce_clinic/layouts/clinic_hd_case_form.xml index d03cdb9..7bdc242 100644 --- a/netforce_clinic/layouts/clinic_hd_case_form.xml +++ b/netforce_clinic/layouts/clinic_hd_case_form.xml @@ -26,8 +26,10 @@ - + + + diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py index a58cdde..51e1022 100644 --- a/netforce_clinic/models/__init__.py +++ b/netforce_clinic/models/__init__.py @@ -30,8 +30,9 @@ from . import file_sheet from . import cycle from . import gen_visit from . import gen_visit_line -from . import report_hd_dialy -from . import report_hd_monthly +from . import report_hd_detail +from . import report_hd_summary from . import payment from . import payment_line from . import input_data +from . import report_hd_madical diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index 95df288..5a32949 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -1,6 +1,6 @@ import time -from datetime import datetime +from datetime import datetime from netforce.model import Model, fields, get_model from netforce.utils import get_data_path from netforce.access import get_active_user,set_active_user @@ -22,6 +22,7 @@ class HDcase(Model): res[obj.id]=total_time return res + _fields={ "number": fields.Char("Number",required=True,search=True), "time_start": fields.DateTime("Time start",required=True,search=True), @@ -41,9 +42,9 @@ class HDcase(Model): "epo_tn" : fields.Char("EpoTn (Drug name)"), "epo_unit" : fields.Integer("EpoUnit (Unit of Used drug)"), "hct": fields.Integer("HCT %", required=True), + "hct_alert" : fields.Char("",function="onchange_hct",readonly=True,function_multi=True), "check_goverment_pay" : fields.Boolean("The Government Pay"), "check_personal_pay" : fields.Boolean("Pay yourself"), - "hct": fields.Integer("HCT %(>39)"), "state": fields.Selection([("draft","Draft"),("in_progress","In Progress"),("completed","Completed"),("discountinued","Discountinued"),("in_completed","In completed")],"Status",required=True), "dialyzers": fields.One2Many("clinic.dialyzer.line","hd_case_id","Dialyzers"), "lines": fields.One2Many("clinic.hd.case.line","hd_case_id","Lines"), @@ -95,8 +96,7 @@ class HDcase(Model): "time_stop": lambda *a: time.strftime("%Y-%m-%d %H:%M:%S"), 'nurse_id': _get_nurse, "number": _get_number, - "company_id": lambda *a: get_active_company(), - "fee": 1500, + "company_id": lambda *a: get_active_company() } _order="date desc,number desc" @@ -171,13 +171,6 @@ class HDcase(Model): data['total']=total return data - def onchange_hct(self,context={}): - data=context['data'] - hct=data['hct'] - if(hct<=39): - data['hct']=0 - return data - def cancelled(self,ids,context={}): obj=self.browse(ids)[0] obj.write({" state":"cancelled"}) @@ -460,6 +453,19 @@ class HDcase(Model): else: data['fee']=0.0 return data + + def onchange_hct(self,context={}): + data=context['data'] + hct_alert=data.get("hct","") + if(hct_alert<=36): + data['hct_alert']="Reimbursement of medicines : 1,125/Week" + elif(36<=hct_alert<=39): + data['hct_alert']="Reimbursement of medicines : 750/Week" + elif(hct_alert>39): + data['hct_alert']="Can not be drawn" + else: + data['hct_alert']="" + return data def undo(self,ids,context={}): obj=self.browse(ids)[0] @@ -484,6 +490,6 @@ class HDcase(Model): 'active_id': obj.id, }, 'flash': '%s has been undo'%obj.number, - } + } HDcase.register() diff --git a/netforce_clinic/models/report_hd_detail.py b/netforce_clinic/models/report_hd_detail.py new file mode 100644 index 0000000..9ee6aec --- /dev/null +++ b/netforce_clinic/models/report_hd_detail.py @@ -0,0 +1,152 @@ +import time +import pprint + +from netforce.model import Model, fields, get_model + +class ReportHDDetail(Model): + _name="clinic.report.hd.detail" + _string="Hemodialysis Report Detail" + _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"), + } + + _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={}): + # context=> dict + # inside context => keys => defaults => type => dict + # dict => key: value => '', 1, [], {} + # context['default'] => defaults(dict) => key => inside key => value => '2014-10-22' + 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", + "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.doctor_id: + dom.append([ + 'doctor_id','=',obj.doctor_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"): + 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) + 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': hd_case.patient_id.name, + 'patient_type' : patient_type, + 'no_patient': 0, + 'doctor' : hd_case.doctor_id.name, + 'total' : hd_case.total, + 'rc_no' : hd_case.number, + 'dialyzer_name' : 'DZ-xxx', + 'nurse' : 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, + } + return data + +ReportHDDetail.register() diff --git a/netforce_clinic/models/report_hd_madical.py b/netforce_clinic/models/report_hd_madical.py new file mode 100644 index 0000000..b316a13 --- /dev/null +++ b/netforce_clinic/models/report_hd_madical.py @@ -0,0 +1,153 @@ +import time + +from datetime import datetime +from calendar import monthrange +from netforce.model import Model,fields + +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={}): + 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]) + #hd_cases=get_model("clinic.hd.case.gm.line").search_browse(dom) + + lines=[ + { + 'madical' : 'H4', + 'sc': '437', + 'uc': '', + 'buy' : '4', + 'total' : '441', + }, + { + 'madical' : 'H2', + 'sc': '', + 'uc': '', + 'buy' : '', + 'total' : '', + }, + { + 'madical' : 'Epr4', + 'sc': '216', + 'uc': '', + 'buy' : '', + 'total' : '216', + }, + { + 'madical' : 'Epr2', + 'sc': '', + 'uc': '', + 'buy' : '', + 'total' : '', + }, + { + 'madical' : 'Epk4', + 'sc': '70', + 'uc': '', + 'buy' : '', + 'total' : '70', + }, + { + 'madical' : 'Epk2', + 'sc': '', + 'uc': '', + 'buy' : '', + 'total' : '', + }, + { + 'madical' : 'Epg4', + 'sc': '98', + 'uc': '', + 'buy' : '', + 'total' : '98', + }, + { + 'madical' : 'Epg2', + 'sc': '', + 'uc': '', + 'buy' : '', + 'total' : '', + }, + { + 'madical' : 'Rng4', + 'sc': '34', + 'uc': '', + 'buy' : '9', + 'total' : '43', + }, + { + 'madical' : 'Rng2', + 'sc': '', + 'uc': '', + 'buy' : '', + 'total' : '', + }, + { + 'madical' : 'Epi4', + 'sc': '264', + 'uc': '', + 'buy' : '9', + 'total' : '43', + }, + { + 'madical' : 'Epi2', + 'sc': '', + 'uc': '', + 'buy' : '', + 'total' : '', + }, + { + 'madical' : 'Vnf', + 'sc': '', + 'uc': '', + 'buy' : '', + 'total' : '', + }, + ] + + data={ + 'month': month_str, + 'year': year, + 'lines': lines, + } + return data + +ReportHDMadical.register() diff --git a/netforce_clinic/models/report_hd_summary.py b/netforce_clinic/models/report_hd_summary.py new file mode 100644 index 0000000..bd4d8ce --- /dev/null +++ b/netforce_clinic/models/report_hd_summary.py @@ -0,0 +1,145 @@ +import time + +from datetime import datetime +from calendar import monthrange +from netforce.model import Model, fields, get_model + +class ReportHDSummary(Model): + _name="clinic.report.hd.summary" + _string="Hemodialysis Report 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={}): + date=datetime.now().strftime("%Y-%m-%d") + dom=[] + if ids: + obj=self.browse(ids)[0] + date=obj.date + + month=int(date[5:7]) + year=int(date[0:4]) + weekday, total_day=monthrange(year, month) + #date_from="%s-%s-01"%(year,month) + #date_to="%s-%s-%s"%(year,month,total_day) + 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 = month-1 + if previous_month == 0: + previous_month = 12 + #tip previous_month=str(month-1 == 0 and 12 or month) + previous_month_str=datetime.strptime('%s'%previous_month,'%m').strftime("%B") + + patients=get_model("clinic.patient").search_browse(['type','=','All']) + patients_mg=get_model("clinic.patient").search_browse(['type','=','mg']) + patients_sc=get_model("clinic.patient").search_browse(['type','=','sc']) + patients_nhso=get_model("clinic.patient").search_browse(['type','=','nhso']) + patients_pn=get_model("clinic.patient").search_browse(['type','=','personal']) + + new_patients=len(patients) + + time_start='2014-%s-01'%(month) # 2014-10-20 + time_stop='2014-%s-%s'%(month,total_day) + + 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) + time_start_pre='2014-%s-01'%(previous_month) # 2014-10-20 + time_stop_pre='2014-%s-%s'%(previous_month,prev_total_day) + + dom=[] + dom.append(['state','=','completed']) + dom.append(['time_start','>=',time_start_pre]) + dom.append(['time_stop','<=',time_stop_pre]) + prev_total_case=len(get_model("clinic.hd.case").search(dom)) + + lines=[ + { + 'topic': 'The number of times the Hemodialysis', + 'month': month_str, + 'amount': cur_total_case, + 'date_from': time_start, + 'date_to': time_stop, + }, + { + 'topic':'The number of cases brought', + 'month': previous_month_str, + 'amount': prev_total_case, + 'date_from': time_start_pre, + 'date_to': time_stop_pre, + }, + { + 'topic':'Number of new patients', + 'month': month_str, + 'amount': new_patients, + 'date_from': time_start, + 'date_to': time_stop, + }, + { + 'topic':'Number of patients discharged', + 'month': month_str, + 'amount': 'N/A', + 'date_from': time_start, + 'date_to': time_stop, + }, + { + 'topic':'The number of cases brought', + 'month': next_month_str, + 'amount': 0, + 'date_from': time_start, + 'date_to': time_stop, + }, + { + 'topic':'Number of patients withdrawn Social Security', + 'month': '', + 'amount': len(patients_sc), + 'date_from': "", + 'date_to': "", + }, + { + 'topic':'Number of patients withdrawn Medical Government', + 'month':'', + 'amount': len(patients_mg), + 'date_from': "", + 'date_to': "", + }, + { + 'topic':'Number of patients withdrawn NHSO(30B)', + 'month':'', + 'amount': len(patients_nhso), + 'date_from': "", + 'date_to': "", + }, + { + 'topic':'Many patients pay themselves', + 'month': '', + 'amount': len(patients_pn), + 'date_from': "", + 'date_to': "", + }, + ] + + data={ + 'month': month_str, + 'year': year, + 'lines': lines, + } + #print("data", data) + return data + +ReportHDSummary.register() diff --git a/netforce_clinic/models/visit.py b/netforce_clinic/models/visit.py index af14153..962f045 100644 --- a/netforce_clinic/models/visit.py +++ b/netforce_clinic/models/visit.py @@ -13,7 +13,7 @@ class Visit(Model): _name_field="number" _multi_company=True - def _get_visit_date(self,ids,context): + def _get_visit_date(self,ids,context={}): res={} for obj in self.browse(ids): res[obj.id]=obj.time_start[0:10] From 0a4068fd91966fe5de7bb8dac0d3cfe42b7edf30 Mon Sep 17 00:00:00 2001 From: "chayut.s" Date: Mon, 20 Oct 2014 18:48:39 +0700 Subject: [PATCH 2/2] fix error link report_summary --- .../actions/clinic_report_hd_detail.xml | 8 ++ .../actions/clinic_report_hd_madical.xml | 8 ++ .../actions/clinic_report_hd_summary.xml | 8 ++ netforce_clinic/actions/clinic_translate.xml | 7 ++ netforce_clinic/cd | 1 + netforce_clinic/layouts/clinic_menu.xml | 7 +- .../layouts/clinic_report_hd_detail.xml | 10 +++ .../layouts/clinic_report_hd_madical.xml | 3 + .../layouts/clinic_report_hd_summary.xml | 3 + .../layouts/clinic_translate_form.xml | 4 + .../layouts/clinic_translate_list.xml | 4 + netforce_clinic/models/__init__.py | 1 + netforce_clinic/models/hd_case.py | 3 +- netforce_clinic/models/report_hd_detail.py | 4 + netforce_clinic/models/report_hd_summary.py | 26 +++--- netforce_clinic/models/setting.py | 3 + netforce_clinic/models/translate.py | 13 +++ netforce_clinic/reports/report_hd_detail.xlsx | Bin 0 -> 6092 bytes .../reports/report_hd_madical.xlsx | Bin 0 -> 6302 bytes .../reports/report_hd_summary.xlsx | Bin 0 -> 5298 bytes .../templates/report_hd_detail.hbs | 84 ++++++++++++++++++ .../templates/report_hd_madical.hbs | 29 ++++++ .../templates/report_hd_summary.hbs | 25 ++++++ 23 files changed, 237 insertions(+), 14 deletions(-) create mode 100644 netforce_clinic/actions/clinic_report_hd_detail.xml create mode 100644 netforce_clinic/actions/clinic_report_hd_madical.xml create mode 100644 netforce_clinic/actions/clinic_report_hd_summary.xml create mode 100644 netforce_clinic/actions/clinic_translate.xml create mode 100644 netforce_clinic/cd create mode 100644 netforce_clinic/layouts/clinic_report_hd_detail.xml create mode 100644 netforce_clinic/layouts/clinic_report_hd_madical.xml create mode 100644 netforce_clinic/layouts/clinic_report_hd_summary.xml create mode 100644 netforce_clinic/layouts/clinic_translate_form.xml create mode 100644 netforce_clinic/layouts/clinic_translate_list.xml create mode 100644 netforce_clinic/models/translate.py create mode 100644 netforce_clinic/reports/report_hd_detail.xlsx create mode 100644 netforce_clinic/reports/report_hd_madical.xlsx create mode 100644 netforce_clinic/reports/report_hd_summary.xlsx create mode 100644 netforce_clinic/templates/report_hd_detail.hbs create mode 100644 netforce_clinic/templates/report_hd_madical.hbs create mode 100644 netforce_clinic/templates/report_hd_summary.hbs diff --git a/netforce_clinic/actions/clinic_report_hd_detail.xml b/netforce_clinic/actions/clinic_report_hd_detail.xml new file mode 100644 index 0000000..523c839 --- /dev/null +++ b/netforce_clinic/actions/clinic_report_hd_detail.xml @@ -0,0 +1,8 @@ + --> + HD Report Detail + report + clinic.report.hd.detail + report_hd_detail + report_hd_detail + clinic_menu + diff --git a/netforce_clinic/actions/clinic_report_hd_madical.xml b/netforce_clinic/actions/clinic_report_hd_madical.xml new file mode 100644 index 0000000..4101bef --- /dev/null +++ b/netforce_clinic/actions/clinic_report_hd_madical.xml @@ -0,0 +1,8 @@ + + Medical Report Summary + report + clinic.report.hd.madical + report_hd_madical + report_hd_madical + clinic_menu + diff --git a/netforce_clinic/actions/clinic_report_hd_summary.xml b/netforce_clinic/actions/clinic_report_hd_summary.xml new file mode 100644 index 0000000..354018e --- /dev/null +++ b/netforce_clinic/actions/clinic_report_hd_summary.xml @@ -0,0 +1,8 @@ + + HD Report Summary + report + clinic.report.hd.summary + report_hd_summary + report_hd_summary + clinic_menu + diff --git a/netforce_clinic/actions/clinic_translate.xml b/netforce_clinic/actions/clinic_translate.xml new file mode 100644 index 0000000..4c174f1 --- /dev/null +++ b/netforce_clinic/actions/clinic_translate.xml @@ -0,0 +1,7 @@ + + Translation + multi_view + clinic.translate + list,form + clinic_menu + diff --git a/netforce_clinic/cd b/netforce_clinic/cd new file mode 100644 index 0000000..792d600 --- /dev/null +++ b/netforce_clinic/cd @@ -0,0 +1 @@ +# diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml index 904d368..74810d1 100644 --- a/netforce_clinic/layouts/clinic_menu.xml +++ b/netforce_clinic/layouts/clinic_menu.xml @@ -20,12 +20,15 @@
- - + + +
+ + diff --git a/netforce_clinic/layouts/clinic_report_hd_detail.xml b/netforce_clinic/layouts/clinic_report_hd_detail.xml new file mode 100644 index 0000000..b07f88c --- /dev/null +++ b/netforce_clinic/layouts/clinic_report_hd_detail.xml @@ -0,0 +1,10 @@ +
+ + + + + + + + +
diff --git a/netforce_clinic/layouts/clinic_report_hd_madical.xml b/netforce_clinic/layouts/clinic_report_hd_madical.xml new file mode 100644 index 0000000..fcd40ac --- /dev/null +++ b/netforce_clinic/layouts/clinic_report_hd_madical.xml @@ -0,0 +1,3 @@ +
+ + diff --git a/netforce_clinic/layouts/clinic_report_hd_summary.xml b/netforce_clinic/layouts/clinic_report_hd_summary.xml new file mode 100644 index 0000000..decc455 --- /dev/null +++ b/netforce_clinic/layouts/clinic_report_hd_summary.xml @@ -0,0 +1,3 @@ +
+ + diff --git a/netforce_clinic/layouts/clinic_translate_form.xml b/netforce_clinic/layouts/clinic_translate_form.xml new file mode 100644 index 0000000..27c8779 --- /dev/null +++ b/netforce_clinic/layouts/clinic_translate_form.xml @@ -0,0 +1,4 @@ +
+ + + diff --git a/netforce_clinic/layouts/clinic_translate_list.xml b/netforce_clinic/layouts/clinic_translate_list.xml new file mode 100644 index 0000000..38a44f2 --- /dev/null +++ b/netforce_clinic/layouts/clinic_translate_list.xml @@ -0,0 +1,4 @@ + + + + diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py index 4ce3c5e..1a77dc0 100644 --- a/netforce_clinic/models/__init__.py +++ b/netforce_clinic/models/__init__.py @@ -35,3 +35,4 @@ from . import payment from . import payment_line from . import input_data from . import report_hd_madical +from . import translate diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index 72b89d1..10099df 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -42,7 +42,7 @@ class HDcase(Model): "epo_tn" : fields.Char("EpoTn (Drug name)"), "epo_unit" : fields.Integer("EpoUnit (Unit of Used drug)"), "hct": fields.Integer("HCT %", required=True), - "hct_alert" : fields.Char("",function="onchange_hct",readonly=True,function_multi=True), + "hct_alert" : fields.Char("",readonly=True,function_multi=True), "check_goverment_pay" : fields.Boolean("The Government Pay"), "check_personal_pay" : fields.Boolean("Pay yourself"), "state": fields.Selection([("draft","Draft"),("in_progress","In Progress"),("completed","Completed"),("discountinued","Discountinued"),("in_completed","In completed")],"Status",required=True), @@ -458,6 +458,7 @@ class HDcase(Model): def onchange_hct(self,context={}): + print(">"*50) data=context['data'] hct_alert=data.get("hct","") if(hct_alert<=36): diff --git a/netforce_clinic/models/report_hd_detail.py b/netforce_clinic/models/report_hd_detail.py index 9ee6aec..cf7e506 100644 --- a/netforce_clinic/models/report_hd_detail.py +++ b/netforce_clinic/models/report_hd_detail.py @@ -70,6 +70,10 @@ class ReportHDDetail(Model): 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, diff --git a/netforce_clinic/models/report_hd_summary.py b/netforce_clinic/models/report_hd_summary.py index bd4d8ce..ca0412e 100644 --- a/netforce_clinic/models/report_hd_summary.py +++ b/netforce_clinic/models/report_hd_summary.py @@ -41,33 +41,37 @@ class ReportHDSummary(Model): #tip previous_month=str(month-1 == 0 and 12 or month) previous_month_str=datetime.strptime('%s'%previous_month,'%m').strftime("%B") - patients=get_model("clinic.patient").search_browse(['type','=','All']) + + 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]) + + patients=get_model("clinic.patient").search_browse(['type','=','All']) + new_patients=len(patients) patients_mg=get_model("clinic.patient").search_browse(['type','=','mg']) patients_sc=get_model("clinic.patient").search_browse(['type','=','sc']) patients_nhso=get_model("clinic.patient").search_browse(['type','=','nhso']) patients_pn=get_model("clinic.patient").search_browse(['type','=','personal']) - - new_patients=len(patients) - - time_start='2014-%s-01'%(month) # 2014-10-20 - time_stop='2014-%s-%s'%(month,total_day) - + 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) time_start_pre='2014-%s-01'%(previous_month) # 2014-10-20 time_stop_pre='2014-%s-%s'%(previous_month,prev_total_day) - + dom=[] dom.append(['state','=','completed']) dom.append(['time_start','>=',time_start_pre]) dom.append(['time_stop','<=',time_stop_pre]) prev_total_case=len(get_model("clinic.hd.case").search(dom)) - + lines=[ { 'topic': 'The number of times the Hemodialysis', @@ -100,7 +104,7 @@ class ReportHDSummary(Model): { 'topic':'The number of cases brought', 'month': next_month_str, - 'amount': 0, + 'amount': 'N/A', 'date_from': time_start, 'date_to': time_stop, }, diff --git a/netforce_clinic/models/setting.py b/netforce_clinic/models/setting.py index 4c9d05c..4dd86c3 100644 --- a/netforce_clinic/models/setting.py +++ b/netforce_clinic/models/setting.py @@ -17,6 +17,9 @@ class ClinicSetting(Model): "sc_partner_id": fields.Many2One("partner","Partner Social Security"), "ar_sc_id": fields.Many2One("account.account","Account Receiveble Social Security"), "ap_sc_id": fields.Many2One("account.account","Account Payment Social Security"), + #"ori_str": fields.Char("ori_str","Original String"), + #"translate": fields.Char("translate","Translation"), + } ClinicSetting.register() diff --git a/netforce_clinic/models/translate.py b/netforce_clinic/models/translate.py new file mode 100644 index 0000000..9ad41b1 --- /dev/null +++ b/netforce_clinic/models/translate.py @@ -0,0 +1,13 @@ +from netforce.model import Model, fields + +class Translate(Model): + _name="clinic.translate" + _string="Translate" + + _fields={ + "original_string": fields.Char("original_string","Original String",required=True,search=True), + "translate": fields.Char("translate","Translate"), + } + + +Translate.register() diff --git a/netforce_clinic/reports/report_hd_detail.xlsx b/netforce_clinic/reports/report_hd_detail.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..f8cb9027271e05bc4433addb84350e09abc5f64a GIT binary patch literal 6092 zcmaJ_1z1$w)~2Mpq#NlR5D=uh8|m&Iy4yjeQ5cZ!lx_x)4k;Kf(x(wWJhH?Mj6lm?_!NvJ-u1p$N zMC8E*9R$5j2=HknlD4XYL{Gez4+;f;x-}O_<0kbA3Wz{8C@n;ZR|q~C6_83_z_&Sj zogw#H*0s!lEhg@oBp^Q<8@5Xhanu{7AJbK2z_A=Io9=ZwrAcyuuO;XHYNXNq!sOYC zSs_IW$ZEkVAkx{`6!Fe#>pZ&je9><4DpnT+i%hL9-IWFTteGIl3Qex)ym}R*D z?RaYA(pow>WU6gWTt1fps;JB}hBeF4?wQTnbur*hFOe1yFjI_RGxEc&hfp)BZ2WC| zlFIgo-IuOOCOa`WbtM#3o3ikx<@;$1Bf#BX|2JUB?w{~=;`$pKA6KBGg{!M0r?0cq z-#8_zIQDR3zC5@gl7;mtpjgHTLSiJUZZ6>aHC85ipC-*T+y!%z8=_n9O(ai1Pden! zcKBjpzcIapVOi{ zLD;xpNKv&EI@B8RLxXGNSYavyew0Y7(h#xUg-yN9qx-Jf5{iXwnjetOJ&1)i3ZzN| zOlrnkEVFU(qMSNku0LNFqoe#vKU@`&t@+dk?Te`m)qy{TE82Xedhp&g!^v?|noMQY z;zA(812Srdm;Rsc=gs(!$dLSv%mXGKcGlLO9$bI@@H~Lir@!R!UJy69vorjAu9^>W z@4<{WQ^RUAw0?+h+iPPnI?=f(RFHOFKYo~3g zcW=G2yy#Trt5Qe7r3AqtAHdDX>Q1~kRFQby{cRG(_^GYYj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*ZVKI8Jk z-0xe%e^+Gien-dB6=?kck8|RP>ODL%ut1r$APZp)+!qS1a9)q_@nvYdQ=T&rA4xUZ z&vh~>%unR)i*yXg0kRw#rh;l8QNQKq&m)yUBQY=Jb&g$px_gSvNDHL*bH$pr!-20% zf3GO`qyqHVmGYv5h9Q3t>4{NnD+y(fU^F%#&a6C`=epM9L@=eJFYb-&BElG2OCK3s zst8a7O{Q=Im8Ym zFP)feT=ue8;x~(-e$(1%+vP|(MbFC84!h_Ftq7~7EQ{A5zP{foG?EDn3JR1xT65pN zW6Xz<(qz#+h8E`LG454rR+#kK>-D@q%n+BP-1XNA*d}1 z;^$=2?uxE@%j71hiG{0xZJzXX!2AYi&reciDx5+{i2IiG(*<$%ZNN^B0WEkSTEzO9 z2bO6&&enhnk}XG=J&_dqzGE1E~iug}*Ktx1X6(mmQ9kW4xP4 zAZ#c3CzHGO@b`Rh2jT$0iJojkp{l#115eVUa39r8^j}OA@f7)*{th&;FI{q%q zJqVM(jP!n}|1MMh8Rz%C(SwZl%K-O`>^{!_E9(6j<#%fSu#fs>7pQ+l`9Hg=KO_9k z10N{-FY84A_j~+{(EsWDdo6vSiofhF=HJ8rn>haI`g@^yD7L>W_P)COS$hBU{ymu< yiqS7C$N$ayU#00!_us#ahm8AWkM2?YfAUXV>Cyc@77h;W{t&xgA0MKJtN#J6DSB=I literal 0 HcmV?d00001 diff --git a/netforce_clinic/reports/report_hd_madical.xlsx b/netforce_clinic/reports/report_hd_madical.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..a802b45a05e7229ef0b89fc6b4b654c2a6e2fba1 GIT binary patch literal 6302 zcmaJ_1yoes+6E*BsTsO)1`z2I7-aa#SaU-240Flfu`Rg{O@I|^xdbz|^AioDm0#NHpKB1wESu3jE~0R6&TyhsJ_y*?4C z2rofoKbsZrxPEo(=}S_^f7n<8;wb{QBV~1Hq$2Vc9 zj?y*0yYMKNzAgwp1NZQ^H8Qz&0snd!TzEKZF?$-W9dzXXx}tDhHp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tnm6iF)P@K8DUQ}VnKpg znw+8ty;%}OWzTS2aDyeg6Z@uN_ZIVg(MECG zwxpA$E*FgXHu9dqwo|RF+T_h!ixcYIdUG|Cv{5B)@rmSS(Z0j8y2zr|;RT*%%Iehu zLmMo$_PPiT^$u#g92O&~{DN&v`gE>)&p37|bp&qB6i{^b>>MjvZ9!@iJC?wC%hwhM zXgj}LUu;~jf+Lw;wwCx`&#cjxDN`*=JCW@{=H$>j6}eH5+7KKRf{2=|erP;SM)29xAFStIKQ_?SH|Qo2wqCT%W?jzP5I|2zc&O|t<*1c;Qt)uKN_n)NBCWU zUNsKCKzGT@zy8PHZN#6!zt_?$jrt24gnzyM--`9m(BBKqRk8gA6Vm@Iy?;jko=jK8 w=oh>$Gw9!i`|r~9XZY_s<0|8RVf>QC|B`=dN;tSz58+>4;+N~AKzVide?zC-d;kCd literal 0 HcmV?d00001 diff --git a/netforce_clinic/reports/report_hd_summary.xlsx b/netforce_clinic/reports/report_hd_summary.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..2e639747d21bd582953078831307070dfaf3fcb8 GIT binary patch literal 5298 zcmaJ_2|QG7`?ieiOBjuvjD#{srI0Pl*!O+k!k8f=jHR-Kw`7SJl6}vF$V3K(jO?=S zA#0YAB{6*FegE%Q|Gw{guk)L8=KOx=xzBm7=iJwQo!da062MMILqkKRY-^xK_6z7w z{@eSydLbbaq&?i9V!o|Jw>X1wIr}cYo8k=Tw>Am%W1ndXv(VQQ$uAGUv{rrtdRV=#kj(lyj z?{h`A#mJXO$ZKzC)Z>rppXe@kxDPh+63cXZ z-n8QwgS%f3!QZy9X=<4AsmTxu5;OXn`$7FD^A`R`WQV4>j}pV~rBQLOPnNAp&EOU)Z4*C=1B*%D%8Eiq_! zd|qkvYD2Syg_6Nm363o{XjwJ{*Gx4lWc8Uf=t?qBQz;3~YbO;eeYphBJAKEwNGZSi zaLBW-%JDSa47V+>C#NlxOP!?Z)5grFI+!!Xql-`9V-1o2#;3*$#|H)^o_h1g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nUO#dmpzmNVknMh*v6Nx92 r__uKXEls}<|MkrvW!z7!o;=Hc$v*>as#BzkXiql9ll8G>C7t~Xb%^Kl literal 0 HcmV?d00001 diff --git a/netforce_clinic/templates/report_hd_detail.hbs b/netforce_clinic/templates/report_hd_detail.hbs new file mode 100644 index 0000000..f1907a5 --- /dev/null +++ b/netforce_clinic/templates/report_hd_detail.hbs @@ -0,0 +1,84 @@ +
+

Detail of the Hemodialysis

+

Clinic [Ratchawat]

+

+ {{#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 no_patient}} + + + {{else}} + + + {{/if}} + + + + + + + + {{/each}} + + + + + + +
+ Cycle + + Patient + + Doctor + + Patient Type + + HD Fee + + RC.No + + Dialyzer + + Nurse +
+ {{cycle}} +
TOTAL{{no_patient}}{{patient}} + {{doctor}} + + {{patient_type}} + + {{total}} + + {{rc_no}} + + {{dialyzer_name}} + + {{nurse}} +
diff --git a/netforce_clinic/templates/report_hd_madical.hbs b/netforce_clinic/templates/report_hd_madical.hbs new file mode 100644 index 0000000..dabd546 --- /dev/null +++ b/netforce_clinic/templates/report_hd_madical.hbs @@ -0,0 +1,29 @@ +
+

+ Summary of the Madical +

+

+ [Ratchawat : Saamsan4]
+ As at {{month}} {{year}} +

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

+ Summary of the Hemodialysis +

+

+ [Ratchawat : Saamsan4]
+ As at {{month}} {{year}} +

+
+ + + + + + + + {{#each lines}} + + + + + + {{/each}} + +
TopicMonthAmount
{{topic}}{{month}}{{amount}}