From 790e601425c8ce72b5980cd8cd1934ecac841c90 Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Thu, 12 Mar 2015 17:28:58 +0700 Subject: [PATCH] improve --- .../actions/clinic_hd_case_print.xml | 6 + .../actions/clinic_print_hd_case_summary.xml | 6 + .../layouts/clinic_cycle_item_form.xml | 4 +- .../layouts/clinic_hd_case_print.xml | 11 + .../layouts/clinic_matching_payment_form.xml | 6 +- netforce_clinic/layouts/clinic_menu.xml | 1 + .../layouts/clinic_report_hd_case_summary.xml | 1 + netforce_clinic/layouts/clinic_staff_form.xml | 4 +- netforce_clinic/models/__init__.py | 1 + netforce_clinic/models/hd_case_print.py | 268 ++++++++++++++++++ netforce_clinic/models/patient.py | 3 +- netforce_clinic/models/report_cycle_item.py | 1 + .../models/report_hd_case_summary.py | 14 + .../reports/hd_case_summary_pdf.odt | Bin 0 -> 11305 bytes netforce_clinic/todo.txt | 58 +--- 15 files changed, 320 insertions(+), 64 deletions(-) create mode 100644 netforce_clinic/actions/clinic_hd_case_print.xml create mode 100644 netforce_clinic/actions/clinic_print_hd_case_summary.xml create mode 100644 netforce_clinic/layouts/clinic_hd_case_print.xml create mode 100644 netforce_clinic/models/hd_case_print.py create mode 100644 netforce_clinic/reports/hd_case_summary_pdf.odt diff --git a/netforce_clinic/actions/clinic_hd_case_print.xml b/netforce_clinic/actions/clinic_hd_case_print.xml new file mode 100644 index 0000000..6867f7c --- /dev/null +++ b/netforce_clinic/actions/clinic_hd_case_print.xml @@ -0,0 +1,6 @@ + + form_view + clinic.hd.case.print + clinic_hd_case_print + clinic_menu + diff --git a/netforce_clinic/actions/clinic_print_hd_case_summary.xml b/netforce_clinic/actions/clinic_print_hd_case_summary.xml new file mode 100644 index 0000000..389cd1e --- /dev/null +++ b/netforce_clinic/actions/clinic_print_hd_case_summary.xml @@ -0,0 +1,6 @@ + + report_odt2 + clinic.hd.case.print + get_report_data + hd_case_summary_pdf + diff --git a/netforce_clinic/layouts/clinic_cycle_item_form.xml b/netforce_clinic/layouts/clinic_cycle_item_form.xml index 2ce57dd..f05f0c2 100644 --- a/netforce_clinic/layouts/clinic_cycle_item_form.xml +++ b/netforce_clinic/layouts/clinic_cycle_item_form.xml @@ -20,8 +20,8 @@ - - + + diff --git a/netforce_clinic/layouts/clinic_hd_case_print.xml b/netforce_clinic/layouts/clinic_hd_case_print.xml new file mode 100644 index 0000000..41d2ecd --- /dev/null +++ b/netforce_clinic/layouts/clinic_hd_case_print.xml @@ -0,0 +1,11 @@ +
+ + + + + + + diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml index 7f2aeb4..5eb30a6 100644 --- a/netforce_clinic/layouts/clinic_menu.xml +++ b/netforce_clinic/layouts/clinic_menu.xml @@ -48,6 +48,7 @@ + diff --git a/netforce_clinic/layouts/clinic_report_hd_case_summary.xml b/netforce_clinic/layouts/clinic_report_hd_case_summary.xml index 5a4be2a..ce1f391 100644 --- a/netforce_clinic/layouts/clinic_report_hd_case_summary.xml +++ b/netforce_clinic/layouts/clinic_report_hd_case_summary.xml @@ -4,4 +4,5 @@ + diff --git a/netforce_clinic/layouts/clinic_staff_form.xml b/netforce_clinic/layouts/clinic_staff_form.xml index 56e9440..ec929b3 100644 --- a/netforce_clinic/layouts/clinic_staff_form.xml +++ b/netforce_clinic/layouts/clinic_staff_form.xml @@ -35,8 +35,8 @@ - - + + diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py index cbeb309..9979dc5 100644 --- a/netforce_clinic/models/__init__.py +++ b/netforce_clinic/models/__init__.py @@ -37,6 +37,7 @@ from . import hd_case_popup_discontinue from . import hd_case_popup_dlz from . import hd_case_payment from . import hd_case_dialyzer +from . import hd_case_print from . import dialyzer from . import cycle from . import cycle_item diff --git a/netforce_clinic/models/hd_case_print.py b/netforce_clinic/models/hd_case_print.py new file mode 100644 index 0000000..bbe5e19 --- /dev/null +++ b/netforce_clinic/models/hd_case_print.py @@ -0,0 +1,268 @@ +import time +from datetime import datetime +from calendar import monthrange + +from netforce.model import Model, fields, get_model +from netforce.access import get_active_company +from . import utils + +class HDCasePrint(Model): + _name="clinic.hd.case.print" + _transient=True + + _fields={ + "date": fields.Date("Month"), + "date_from": fields.Date("From", required=True), + "date_to": fields.Date("To", required=True), + } + + def default_get(self,field_names=None,context={},**kw): + defaults=context.get("defaults",{}) + date=defaults.get('date',time.strftime("%Y-%m-%d")) + year,month=time.strftime("%Y-%m").split("-") + weekday, total_day=monthrange(int(year), int(month)) + date_from=defaults.get('date_from','%s-%s-01'%(year,month)) + date_to=defaults.get('date_to',"%s-%s-%s"%(year,month,total_day)) + res={ + 'date': date, + 'date_from': date_from, + 'date_to': date_to, + } + return res + + 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 get_data(self,context={}): + return + + def get_report_data(self,ids,context={}): + company_id=get_active_company() + company=get_model("company").browse(company_id) + + date=datetime.now().strftime("%Y-%m-%d") + year=int(date[0:4]) + crr_month=int(date[5:7]) + weekday, crr_total_day=monthrange(year, crr_month) + branch_id=None + department_id=None + time_start='%s-%s-01 00:00:00'%(year,str(crr_month).zfill(2)) + time_stop='%s-%s-%s 23:59:59'%(year,str(crr_month).zfill(2),crr_total_day) + if ids: + obj=self.browse(ids)[0] + branch_id=obj.branch_id.id + department_id=obj.department_id.id + date=obj.date + crr_month=int(date[5:7]) #XXX + time_start='%s 00:00:00'%obj.date_from + time_stop='%s 23:59:59'%obj.date_to + year=int(date[0:4]) + + prev_year=year + next_year=year + prev_month=crr_month-1 + next_month=crr_month+1 + if crr_month==1: + prev_month=12 + prev_year-=1 + if crr_month==12: + next_month=1 + next_year+=1 + + month_str=utils.MONTHS['th_TH'][crr_month] + next_month_str=utils.MONTHS['th_TH'][next_month] + prev_month_str=utils.MONTHS['th_TH'][prev_month] + + def encode_url(dom): + dom='%s'%dom + dom=urllib.quote(dom.encode('utf-8')) + return dom + + def replace_quote(dom=""): + return dom.replace("'","\"") + + count=1 + # number of hd case of this month + dom=[] + dom.append(["time_start",">=",time_start]) + dom.append(["time_stop","<=",time_stop]) + dom.append(["state","in",["completed","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)) + items={} + items['topic%s'%count]={ + 'month': month_str, + 'qty': crr_total or 0, + 'action': 'clinic_hd_case', + 'action_options': 'mode=list&search_domain=%s&tab_no=0'%replace_quote('%s'%dom), + } + count+=1 + + # number of patient from previous + dom=[] + weekday, prev_total_day=monthrange(prev_year, prev_month) + time_stop='%s-%s-%s'%(prev_year,str(prev_month).zfill(2),prev_total_day) + dom.append(['reg_date','<=',time_stop]) + if branch_id: + dom.append(['branch_id','=',branch_id]) + if department_id: + dom.append(['department_id','=',department_id]) + npatient=len(get_model("clinic.patient").search(dom)) + dom=replace_quote('%s'%dom) + items['topic%s'%count]={ + 'month': prev_month_str, + 'qty': npatient or 0, + 'action': 'clinic_patient', + 'action_options': 'mode=list&search_domain=%s'%dom, + } + count+=1 + + # new patient of this month + dom=[] + weekday, crr_total_day=monthrange(prev_year, crr_month) + time_start='%s-%s-01'%(year,str(crr_month).zfill(2)) + time_stop='%s-%s-%s'%(year,str(crr_month).zfill(2),crr_total_day) + dom.append(['reg_date','>=',time_start]) + dom.append(['reg_date','<=',time_stop]) + if branch_id: + dom.append(['branch_id','=',branch_id]) + if department_id: + dom.append(['department_id','=',department_id]) + new_patients=get_model('clinic.patient').search_browse(dom) + dom=replace_quote('%s'%dom) + items['topic%s'%count]={ + 'month': month_str, + 'qty': len(new_patients) or 0, + 'action': 'clinic_patient', + 'action_options': 'mode=list&search_domain=%s'%dom, + } + count+=1 + + # number for patient who resign for this month + dom=[] + time_start='%s-%s-01'%(year,str(crr_month).zfill(2)) + time_stop='%s-%s-%s'%(year,str(crr_month).zfill(2),crr_total_day) + dom.append(['resign_date','>=',time_start]) + dom.append(['resign_date','<=',time_stop]) + if branch_id: + dom.append(['branch_id','=',branch_id]) + if department_id: + dom.append(['department_id','=',department_id]) + resign_patients_qty=0 + resign_patients=[] + for pt in get_model('clinic.patient').search_browse(dom): + resign_patients_qty+=1 + resign_patients.append(pt.name) + + del dom[-1] + dom=replace_quote('%s'%dom) + items['topic%s'%count]={ + 'month': month_str, + 'qty': resign_patients_qty, + 'action': 'clinic_patient', + 'action_options': 'mode=list&search_domain=%s&tab_no=2'%dom, + } + count+=1 + # all patient who are in hospital on select month + dom=[] + weekday, crr_total_day=monthrange(year, crr_month) + time_stop='%s-%s-%s'%(year,str(crr_month).zfill(2),crr_total_day) + dom.append(['reg_date','<=',time_stop]) + if branch_id: + dom.append(['branch_id','=',branch_id]) + if department_id: + dom.append(['department_id','=',department_id]) + total_patient=get_model('clinic.patient').search_browse(dom) + dom=replace_quote('%s'%dom) + total_patient_qty=len(total_patient) or 0 + items['topic%s'%count]={ + 'month': next_month_str, + 'qty': total_patient_qty-resign_patients_qty, + 'action': 'clinic_patient', + 'action_options': 'mode=list&search_domain=%s'%dom, + } + count+=1 + + topics=utils.TOPICS + for ptype in get_model("clinic.patient.type").search_read([[]],['name']): + tkey='topic%s'%count + topics.update({ + tkey:{ + 'name': ptype['name'], + 'unit': 'คน', + } + }) + + + dom=[] + time_start='%s-%s-01'%(year,str(crr_month).zfill(2)) + time_stop='%s-%s-%s'%(year,str(crr_month).zfill(2),crr_total_day) + dom.append(['reg_date','<=',time_stop]) + dom.append(['type_id','=',ptype['id']]) + dom.append(['name','not in', resign_patients]) + npatients_qty=0 + for pt in get_model("clinic.patient").search(dom): + npatients_qty+=1 + dom=replace_quote('%s'%dom) + items[tkey]={ + 'month': '', + 'qty': npatients_qty, + 'action': 'clinic_patient', + 'action_options': 'mode=list&search_domain=%s'%dom, + } + count+=1 + + lines=[] + index=1 + for item in items: + topic='topic%s'%index + name=utils.TOPICS[topic]['name'] + unit=utils.TOPICS[topic]['unit'] + line=items[topic] + line['topic']=name + line['unit']=unit + lines.append(line) + index+=1 + + context['defaults']={ + 'date': date, + 'branch_id': branch_id, + 'department_id': department_id, + } + + medicals=get_model("clinic.report.medical.summary").get_report_data(ids=[],context=context) + year=year+543 + sub_name='' + if department_id: + dpt=get_model("clinic.department").browse(department_id) + sub_name="(%s)" % dpt.name or "" + elif branch_id: + branch=get_model("clinic.branch").browse(branch_id) + sub_name="(%s)" % branch.name or "" + data={ + 'branch_id': branch_id, + 'department_id': department_id, + 'date': date, + 'month': month_str, + 'year': year, + 'lines': lines, + 'recent_patients': get_model("clinic.report.recent.patient").get_report_data(ids=[],context=context)['lines'], + 'resign_patients': get_model("clinic.report.discontinue.patient").get_report_data(ids=[],context=context)['lines'], + 'medicals': medicals['lines'], + 'titles': medicals['titles'], + 'company_name': '%s %s'% (company.name or "", sub_name), + 'parent_company_name': company.parent_id.name or "", + } + return data + +HDCasePrint.register() diff --git a/netforce_clinic/models/patient.py b/netforce_clinic/models/patient.py index 297e1a7..298d5b3 100644 --- a/netforce_clinic/models/patient.py +++ b/netforce_clinic/models/patient.py @@ -172,7 +172,8 @@ class Patient(Model): return b_ids[0] _defaults={ - "number": _get_number, + #"number": _get_number, + "number": "", "reg_date": lambda *a: time.strftime("%Y-%m-%d"), "company_id": lambda *a: get_active_company(), 'branch_id': _get_branch, diff --git a/netforce_clinic/models/report_cycle_item.py b/netforce_clinic/models/report_cycle_item.py index af70a26..3e42de5 100644 --- a/netforce_clinic/models/report_cycle_item.py +++ b/netforce_clinic/models/report_cycle_item.py @@ -1,4 +1,5 @@ import time +from calendar import monthrange from netforce.model import Model,fields,get_model from netforce.access import get_active_company diff --git a/netforce_clinic/models/report_hd_case_summary.py b/netforce_clinic/models/report_hd_case_summary.py index d1325b7..b754912 100644 --- a/netforce_clinic/models/report_hd_case_summary.py +++ b/netforce_clinic/models/report_hd_case_summary.py @@ -272,5 +272,19 @@ class ReportHDCaseSummary(Model): data=context['data'] data['department_id']=None return data + + def get_report_data2(self,context={}): + data={} + return data + + def run_report(self,ids,context={}): + return { + 'next': { + 'name': 'clinic_print_hd_case_summary', + 'refer_id': ids[0], + 'action_options': 'convert=pdf', + } + } + ReportHDCaseSummary.register() diff --git a/netforce_clinic/reports/hd_case_summary_pdf.odt b/netforce_clinic/reports/hd_case_summary_pdf.odt new file mode 100644 index 0000000000000000000000000000000000000000..db963d36163dc61d8f92766df1f5916d1ec6f3ca GIT binary patch literal 11305 zcmeHtcU)6T*KVXrQv?L07ij_sB!Cc_D7{Em5h(!z1W18|-g|FSR6vm;O(`NpLQ%Sa zfPkR%CL%~Lf`Ir1&*A7fujl=J_x^kD@Y`he%zD;ZGnrXC>zS>mMNGl~0GtE>^2wZ3 z&D+4#0ssKu=pr-$kO(9k=ZS&CFc>F;;Hwsu9rQ8*wD z?t#<$o3dcx>Febr0Kn1pLm3*n%j*6&M!*io!zw=#uAgbwNRY_yR@2kZ>#%XAS+;Dd?}# z&>x2WXz_4Dpd96S>~S~@6a;d2cL%ydfM^#xkhqMD4CqHM&!47jtpAe3xVkv~kg~A` z!JXho!^VQdf#RTJ*&`4Cw@w|&{^}AMjsDBf(HQ<1;tz9RF)<0yANR+W>|AVYoc@yk zWdHb2lFT#&+d^M3UWW3v37y~_=ZIZV7LNUOdKLA zc2QJZ%t#yz1&c$)#Nj5Q89?9IM_(+B2*Fr6_=0$9e4hr8*W2z3uPy2?P=`< z$0~ru!GF5)kB+}f+qk;?mdMq$5Xa~484g`@DLyDij?22%*5j}S8r>>)s9#5z{3}a^|0+ zm|rBt|Ab>;E-*V67{>ls82o34JKDwOxJ~lUHiEw{Fl!v#<+wv!>dzh&8YSv(kHEpP z7??G|o&OL7^ML+blsGsN<3w1GTt7A?^e7m~^I#E#MmS+F9BpGL!G#|1#T4bcOQ`nEO)o< zZ%RVIYdfR7Cq9#QXr1p)>cVd!@w%BP=Y3E1sAt#p(sJrH7de4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(W^#NN=vBQ6;32hA;V9Lo>VBYsmvG=NuI%KVt7^OkLJ~(l-^r(7QZ7 z%?4w{8xVC z?~b=J{+$v!MjqS$X%7H6q9T445<(9C&t&>nHstSL(@)$Ve8|sxx!>sd4|e3=mHpi* z&)+Efl`Z+->UsJbJ-@Oi|E`As{G}}XM$b<+<=?d&@hLwG=egfZ_21Z)f7kSPe@uR( z=_lLrzts}|8!bQCmp`-|FTJBt98)Mq{L9bM`Wr3(!p0o0%44O!#@i$I ok - - P อ้วน - - claim - - not claim - - patient - - create/ update visit - - matching payment - - get hn from account setting - - new feature HN - - split invoice (fee & another) - - schedule job - - create visit next month - - - run script - - update level's nurse -> ok - - report k. boy (sub detail) -> ok - - ** update accounting - - link ref -> ok - - bug -> ok - - wht (david) -> p yui test - -=============================== - - - compute labor cost - - update level -> ok - - set patient_id with domain state=='admit' -> ok - convbal -> not yet (wait yui) -> ok but have to update memo - post 10,000 invoices per one time -> ask david - patient & staff - - split name -> not yet - staff have multi department -> added but set have to set permission - - many2many - show epo(yes) in list of hd case ->ok - matching payment > ok - create contact from staff -> ok - script to clear invoice -> ok +report cycle item : + - sunanna can not see