From e9253f1712c98b02330b0424c2cbec5ec3e70607 Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Mon, 4 May 2015 17:35:11 +0700 Subject: [PATCH] improve --- .../actions/clinic_hd_case_dlz.xml | 1 + netforce_clinic/models/:w | 78 ++++++++++++++++++ netforce_clinic/models/__init__.py | 3 + netforce_clinic/models/district.py | 21 +++++ netforce_clinic/models/hd_case.py | 4 +- netforce_clinic/models/hd_case_popup_dlz.py | 62 +++++++++++--- netforce_clinic/models/patient.py | 18 ++++ netforce_clinic/models/province.py | 20 +++++ netforce_clinic/models/report_cycle_item.py | 49 +++++++++-- netforce_clinic/models/setting.py | 22 +++-- netforce_clinic/models/subdistrict.py | 21 +++++ .../reports/report_cycle_item.xlsx | Bin 5650 -> 5439 bytes .../reports/report_cycle_item.xlsx.old | Bin 0 -> 5544 bytes .../templates/report_cycle_item.hbs | 78 ++++++++++++------ 14 files changed, 329 insertions(+), 48 deletions(-) create mode 100644 netforce_clinic/models/:w create mode 100644 netforce_clinic/models/district.py create mode 100644 netforce_clinic/models/province.py create mode 100644 netforce_clinic/models/subdistrict.py create mode 100644 netforce_clinic/reports/report_cycle_item.xlsx.old diff --git a/netforce_clinic/actions/clinic_hd_case_dlz.xml b/netforce_clinic/actions/clinic_hd_case_dlz.xml index 1791768..fe4482f 100644 --- a/netforce_clinic/actions/clinic_hd_case_dlz.xml +++ b/netforce_clinic/actions/clinic_hd_case_dlz.xml @@ -2,5 +2,6 @@ New Dialyzer form_popup clinic.hd.case.popup.dlz + 800 _popup diff --git a/netforce_clinic/models/:w b/netforce_clinic/models/:w new file mode 100644 index 0000000..19677df --- /dev/null +++ b/netforce_clinic/models/:w @@ -0,0 +1,78 @@ +from netforce.model import Model, fields, get_model + +class HDCasePopupDlz(Model): + _name="clinic.hd.case.popup.dlz" + _transient=True + + _fields={ + "hd_case_id": fields.Many2One("clinic.hd.case","HdCase",required=True,on_delete="cascade"), + 'product_id': fields.Many2One("product", "Product",required=True), + "dialyzer_type": fields.Selection([("low","low flux"),("high","high flux"),("dbl","dbl hifulx")],"Dialyzer Type"), + "max_use_time": fields.Integer("Max Use Time"), + "exp_date": fields.Date("Expiry Date"), + "note": fields.Text("Note"), + "membrane_type": fields.Selection([("unsub","Unsub cellul"),("sub","Sub cellul"),("synthetic","Synthetic")],"Membrane Type"), + } + + def __get_hd_case_id(self,context={}): + hd_case_id=context.get("refer_id") + print("clinic.hd.case.popup.dlz default") + if not hd_case_id: + return None + return int(hd_case_id) + + def default_get(self,field_names=None,context={},**kw): + defaults=context.get("defaults",{}) + hdcase_id=defaults.get('hd_case_id') + dialyzer_type=defaults.get('dialyzer_type') + if not hdcase_id: + hdcase_id=context.get("refer_id") + if hdcase_id: + hdcase=get_model('clinic.hd.case').browse(hdcase_id) + dom=[] + for dlz in get_model('clinic.dialyzer').search_browse(dom): + dialyzer_type=dlz.dialyzer_type or "low" + pass + res={ + 'hd_case_id': hdcase_id, + 'dialyzer_type': 'low', + 'max_use_time': 10, + } + print('res', res) + return res + + def new_dlz(self,ids,context={}): + obj=self.browse(ids)[0] + hd_case=obj.hd_case_id + res={} + if hd_case: + context['is_wiz']=True + context['pop_id']=obj.id + res=hd_case.new_dialyzer(context=context) + print('res ', res) + return res + + def onchange_product(self,context={}): + data=context['data'] + hdcase_id=data['hd_case_id'] + patient=None + if hdcase_id: + hdcase=get_model('clinic.hd.case').browse(hdcase_id) + patient=hdcase.patient_id + product_id=data['product_id'] + data['membrane_type']=None + data['dialyzer_type']=None + data['max_use_time']=10 + dom=[] + if patient: + dom.append(['patient_id','=',patient.id]) + for dlz in get_model("clinic.dialyzer").search_browse(dom): + prod=dlz.product_id + if prod.id==product_id: + data['membrane_type']=dlz.membrane_type + data['dialyzer_type']=dlz.dialyzer_type or "low" + data['max_use_time']=dlz.max_use_time or 10 + break + return data + +HDCasePopupDlz.register() diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py index 1db6984..69ecfcf 100644 --- a/netforce_clinic/models/__init__.py +++ b/netforce_clinic/models/__init__.py @@ -133,3 +133,6 @@ from . import report_shop from . import account_tax_component from . import report_thai_wht_certif from . import num2word +from . import province +#from . import district +#from . import subdistrict diff --git a/netforce_clinic/models/district.py b/netforce_clinic/models/district.py new file mode 100644 index 0000000..be9380d --- /dev/null +++ b/netforce_clinic/models/district.py @@ -0,0 +1,21 @@ +from netforce.model import Model, fields + +class District(Model): + _inherit="district" + + def _get_sort_name(self,ids,context={}): + res={} + for obj in self.browse(ids): + sname='' + if obj.name: + sname=obj.name[0:1] + res[obj.id]=sname + return res + + _fields={ + "name": fields.Char("Name",required=True,search=True,translate=True), + "sort_name": fields.Char("Sort Name",function="_get_sort_name",store=True), + } + _order="sort_name asc" + +District.register() diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index 18c942d..eb0fad4 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -868,8 +868,8 @@ class HDCase(Model): for obj in self.browse(ids): is_decrease=context.get('is_decrease') for dlz_line in obj.dialyzers: - membrane_type=dlz_line.membrane_type or '' - dialyzer_type=dlz_line.dialyzer_type or '' + membrane_type=dlz_line.membrane_type or 'unsub' + dialyzer_type=dlz_line.dialyzer_type or 'low' use_time=dlz_line.use_time or 0 max_use_time=dlz_line.max_use_time or 0 desc=dlz_line.description or '' diff --git a/netforce_clinic/models/hd_case_popup_dlz.py b/netforce_clinic/models/hd_case_popup_dlz.py index 35afccc..74765c5 100644 --- a/netforce_clinic/models/hd_case_popup_dlz.py +++ b/netforce_clinic/models/hd_case_popup_dlz.py @@ -14,18 +14,40 @@ class HDCasePopupDlz(Model): "membrane_type": fields.Selection([("unsub","Unsub cellul"),("sub","Sub cellul"),("synthetic","Synthetic")],"Membrane Type"), } - def _get_hd_case_id(self,context={}): + def __get_hd_case_id(self,context={}): hd_case_id=context.get("refer_id") print("clinic.hd.case.popup.dlz default") if not hd_case_id: return None return int(hd_case_id) - - _defaults={ - 'hd_case_id': _get_hd_case_id, - 'dialyzer_type': 'low', - 'max_use_time': 10, - } + + def default_get(self,field_names=None,context={},**kw): + defaults=context.get("defaults",{}) + hdcase_id=defaults.get('hd_case_id') + dialyzer_type=defaults.get('dialyzer_type', "low") + membrane_type=defaults.get('membrane_type', "unsub") + product_id=defaults.get('product_id', None) + max_use_time=defaults.get('max_use_time', 10) + if not hdcase_id: + hdcase_id=context.get("refer_id") + if hdcase_id: + hdcase_id=int(hdcase_id) + hdcase=get_model('clinic.hd.case').browse(hdcase_id) + for line in hdcase.dialyzers: + dlz=line.dialyzer_id + product_id=dlz.product_id.id + dialyzer_type=dlz.dialyzer_type or "low" + membrane_type=dlz.membrane_type or "unsub" + max_use_time=dlz.max_use_time or 10 + res={ + 'hd_case_id': hdcase_id, + 'dialyzer_type': dialyzer_type, + 'membrane_type': membrane_type, + 'max_use_time': max_use_time, + 'product_id': product_id, + } + print('res', res) + return res def new_dlz(self,ids,context={}): obj=self.browse(ids)[0] @@ -40,17 +62,37 @@ class HDCasePopupDlz(Model): def onchange_product(self,context={}): data=context['data'] + hdcase_id=data['hd_case_id'] + patient=None + if hdcase_id: + hdcase=get_model('clinic.hd.case').browse(hdcase_id) + patient=hdcase.patient_id product_id=data['product_id'] data['membrane_type']=None data['dialyzer_type']=None - #data['max_use_time']=None - for dlz in get_model("clinic.dialyzer").search_browse([]): + data['max_use_time']=10 + dom=[] + if patient: + dom.append(['patient_id','=',patient.id]) + count=0 + for dlz in get_model("clinic.dialyzer").search_browse(dom): prod=dlz.product_id if prod.id==product_id: + count+=1 data['membrane_type']=dlz.membrane_type data['dialyzer_type']=dlz.dialyzer_type or "low" - data['max_use_time']=dlz.max_use_time or 0 + data['max_use_time']=dlz.max_use_time or 10 break + # search from another patient + if not count: + dom=[] + for dlz in get_model("clinic.dialyzer").search_browse(dom): + prod=dlz.product_id + if prod.id==product_id: + data['membrane_type']=dlz.membrane_type + data['dialyzer_type']=dlz.dialyzer_type or "low" + data['max_use_time']=dlz.max_use_time or 10 + break return data HDCasePopupDlz.register() diff --git a/netforce_clinic/models/patient.py b/netforce_clinic/models/patient.py index d94aeee..0b7c708 100644 --- a/netforce_clinic/models/patient.py +++ b/netforce_clinic/models/patient.py @@ -328,6 +328,24 @@ class Patient(Model): super().delete(ids) def write(self,ids,vals,**kw): + if 'cycles' in vals.keys(): + index=0 + for cvals in vals['cycles']: + mode=cvals[0] + if mode=='delete': + continue + elif mode=='create': + cycle_vals=cvals[1] + elif mode=='write': + continue + cycle_vals=cvals[2] + cdom=[] + for f, v in cycle_vals.items(): + cdom.append([f,'=',v]) + print('cdom ', cdom) + for c in get_model('clinic.patient.cycle').search_browse(cdom): + c.delete() + index+=1 if 'type_id' in vals.keys(): #update patient in hd case which state is condition below for obj in self.browse(ids): diff --git a/netforce_clinic/models/province.py b/netforce_clinic/models/province.py new file mode 100644 index 0000000..a55cbf4 --- /dev/null +++ b/netforce_clinic/models/province.py @@ -0,0 +1,20 @@ +from netforce.model import Model, fields + +class Province(Model): + _inherit="province" + def _get_sort_name(self,ids,context={}): + res={} + for obj in self.browse(ids): + sname='' + if obj.name: + sname=obj.name[0:1] + res[obj.id]=sname + return res + + _fields={ + "name": fields.Char("Name",required=True,search=True,translate=True), + "sort_name": fields.Char("Sort Name",function="_get_sort_name",store=True), + } + _order="sort_name asc" + +Province.register() diff --git a/netforce_clinic/models/report_cycle_item.py b/netforce_clinic/models/report_cycle_item.py index b0326fd..2ca5ba9 100644 --- a/netforce_clinic/models/report_cycle_item.py +++ b/netforce_clinic/models/report_cycle_item.py @@ -97,7 +97,10 @@ class ReportCycleItem(Model): cycles[cycle.id]=[] for line in citem.lines: nurse=line.nurse_id - cycles[cycle.id].append(nurse.name) + cycles[cycle.id].append({ + 'name': nurse.name, + 'first_name': nurse.first_name or "", + }) for hdcase in citem.hd_cases: patient=hdcase.patient_id vascular=patient.vascular_acc @@ -116,11 +119,14 @@ class ReportCycleItem(Model): dlz_use="%sทิ้ง"%dlz_use dlz_drop=True cancel=False + row_color='' if hdcase.state=='cancelled': cancel=True + row_color='#b6b6b6' lines.append({ 'dlz_drop': dlz_drop, 'cancel': cancel, + 'row_color': row_color, 'pname': patient.name or '', 'pid': patient.id or '', 'hn': patient.hn_no, @@ -154,13 +160,38 @@ class ReportCycleItem(Model): elif branch_id: branch=get_model("clinic.branch").browse(branch_id) company_name+=" ("+branch.name+")" - no=1 nlines=[] index=0 old=[] total_fee=0 total_mdc=0 + dates={} + no=0 + count=0 + sub_fee=0 + sub_mdc=0 + pt=0 for line in sorted(lines,key=lambda x:(x['date'],x['cseq'])): + pt+=1 + date=line['date'] or '' + key='%s-%s'%(date,line['cseq']) + if key not in dates.keys(): + no=1 + count=0 + sub_fee=0 + sub_mdc=0 + for x in lines: + if x['cseq']==line['cseq'] and x['date']==date: + sub_fee+=x['fee'] or 0 + sub_mdc+=x['mdc'] or 0 + count+=1 + line['date_txt']=line['date'] + line['cseq_txt']=line['cseq'] + dates[key]=0 + else: + no+=1 + dates[key]+=1 + line['no']=no total_fee+=line.get("fee",0) total_mdc+=line.get("mdc",0) cid=line['cid'] @@ -172,10 +203,17 @@ class ReportCycleItem(Model): cres=cycles[cid] line['nurse']='' if index < len(cres): - line['nurse']=cres[index] - line['no']=no + line['nurse']=cres[index]['name'] + line['nfirst_name']=cres[index]['first_name'] nlines.append(line) - no+=1 + if no==count: + nlines.append({ + 'sub': 'show', + 'row_color': '#dfdfdf', + 'no': count, + 'fee': sub_fee, + 'mdc': sub_mdc, + }) vscl_lines=[] for k,v in vasculars.items(): vscl_lines.append({ @@ -198,6 +236,7 @@ class ReportCycleItem(Model): 'month': month_str, 'date_from': date_from, 'date_to': date_to, + 'total_pt': pt, 'total_fee': total_fee, 'total_mdc': total_mdc, 'total_pt': total_pt, diff --git a/netforce_clinic/models/setting.py b/netforce_clinic/models/setting.py index d150b92..72b71d7 100644 --- a/netforce_clinic/models/setting.py +++ b/netforce_clinic/models/setting.py @@ -161,15 +161,21 @@ class ClinicSetting(Model): if user_id !=1: print("Only admin!!") return - for sline in get_model("clinic.hd.case.staff").search_browse([]): - hdcase=sline.hd_case_id - sline.write({ - 'date': hdcase.date, + for pv in get_model("province").search_browse([]): + name=(pv.name or "")[0:1] + pv.write({ + 'sort_name': name, }) - print('update ', sline.id, hdcase.date) - #obj=self.browse(ids)[0] - #obj.del_duplicate_staff() - #obj.merge_staff() + #for dt in get_model("district").search_browse([]): + #name=(dt.name or "")[0:1] + #dt.write({ + #'sort_name': name, + #}) + #for sdt in get_model("subdistrict").search_browse([]): + #name=(sdt.name or "")[0:1] + #sdt.write({ + #'sort_name': name, + #}) print("Done!") def merge_staff(self,ids,context={}): diff --git a/netforce_clinic/models/subdistrict.py b/netforce_clinic/models/subdistrict.py new file mode 100644 index 0000000..20d963e --- /dev/null +++ b/netforce_clinic/models/subdistrict.py @@ -0,0 +1,21 @@ +from netforce.model import Model, fields + +class SubDistrict(Model): + _inherit="subdistrict" + + def _get_sort_name(self,ids,context={}): + res={} + for obj in self.browse(ids): + sname='' + if obj.name: + sname=obj.name[0:1] + res[obj.id]=sname + return res + + _fields={ + "name": fields.Char("Name",required=True,search=True,translate=True), + "sort_name": fields.Char("Sort Name",function="_get_sort_name",store=True), + } + _order="sort_name asc" + +SubDistrict.register() diff --git a/netforce_clinic/reports/report_cycle_item.xlsx b/netforce_clinic/reports/report_cycle_item.xlsx index fc924f8a2c1a2e9d2938138c6ade58fba7ebf61b..58b5d3f937aec40fb80b0fa6a7ec382227f92dfa 100644 GIT binary patch delta 3339 zcmaJ^XH*k98!l9#$cC07DnkTHQ7BZ9C8JQV2xZDrhU`(cOtmsv_G&?tRS;yTY!JN2 zluc2Qb(sYjA_!b$C?NP1?>Tq<_;SwkCU25AImvmFJRwT8NU|F00Z)JdAP@)uLl;)D z^3VZkIZ2F83I~t!5|2efk-dcyAD`vL4`O3`bL5F?L}jP_UDV0Ry8bue$^I3;U!1w@ z($m=`lM>c<4XB~x@Wxljd)|MNRFroL^@`6!Ua(1Gvp&ld1M=zZ+4FC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xmwK6BjVzWu%Ggb5E7%E^Y*$n2~$aYc8K1TgPxD~S?Wigrqd&16?5w!v?jb8g*sU8 z;K>E=n#pcH4i&9=f6{Jr`NJzE{}zwSzd#Y~2S4pRy?~%423ns2;sZB7syWmPiL6M0 zm}Sl;d-nO8;DeAE95%`hbN5#Wm+dXaH99HZ<6=z(Tk$!TjlbKQr!%?zhdsPUXLppn^0q SEG#%Ubl6J>c2df}y#57Izk6!{ literal 0 HcmV?d00001 diff --git a/netforce_clinic/templates/report_cycle_item.hbs b/netforce_clinic/templates/report_cycle_item.hbs index 00a119e..c8fffd2 100644 --- a/netforce_clinic/templates/report_cycle_item.hbs +++ b/netforce_clinic/templates/report_cycle_item.hbs @@ -4,16 +4,16 @@ ระหว่างวันที่ {{date_from}} ถึง {{date_to}} - +
- + - + @@ -22,39 +22,70 @@ {{#each lines }} {{#if cancel}} - + {{else}} {{/if}} - - - + {{#ifeq sub "show"}} + + {{/ifeq}} + {{#if cseq_txt}} + + + - - + + - - - + + {{else}} + {{#ifeq sub "show"}} + + {{else}} + + {{/ifeq}} + + + + + + + + + + + {{/if}} + {{/each}} - - - - - - - - - - - + + + + + + + + + + +
# วันที่ รอบNo ชื่อ-สกุล แพทย์ สิทธ์ จ.น.เงินยาฉีดยาฉีด DZ N/U พยาบาล
{{no}}{{date}}{{cname}}
{{date_txt}}{{cseq_txt}}{{no}} {{pname}} {{dname}} {{tname}}{{fee}}{{mdc}}{{currency fee zero=""}}{{currency mdc zero=""}} {{dlz_name}} {{dlz_use}}View
{{nfirst_name}}รวม{{no}}{{pname}}{{dname}}{{tname}}{{currency fee zero=""}}{{currency mdc}}{{dlz_name}}{{dlz_use}}{{nfirst_name}}
{{currency total_fee zero=""}}{{currency total_mdc}}รวมทั้งหมด{{total_pt}}{{currency total_fee zero=""}}{{currency total_mdc}}
+ + + + {{#each vscl_lines}} + + + {{/each}} + + +
{{description}} = {{qty}}
+