From f63090ae621a314db0c4a58cee6e3980fca10ff2 Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Thu, 19 Mar 2015 07:56:47 +0700 Subject: [PATCH] report claim / no claim --- .../clinic_report_account_hd_case_summary.xml | 2 +- netforce_clinic/models/matching_hdcase.py | 1 + .../models/report_account_hd_case_summary.py | 8 ++++++++ .../report_account_hd_case_summary.xlsx | Bin 4965 -> 5743 bytes .../report_account_hd_case_summary.hbs | 12 ++++++++---- netforce_clinic/todo.txt | 3 +++ 6 files changed, 21 insertions(+), 5 deletions(-) diff --git a/netforce_clinic/layouts/clinic_report_account_hd_case_summary.xml b/netforce_clinic/layouts/clinic_report_account_hd_case_summary.xml index b81e50e..aa048fd 100644 --- a/netforce_clinic/layouts/clinic_report_account_hd_case_summary.xml +++ b/netforce_clinic/layouts/clinic_report_account_hd_case_summary.xml @@ -1,6 +1,6 @@
- + diff --git a/netforce_clinic/models/matching_hdcase.py b/netforce_clinic/models/matching_hdcase.py index 94770e8..f36c847 100644 --- a/netforce_clinic/models/matching_hdcase.py +++ b/netforce_clinic/models/matching_hdcase.py @@ -113,6 +113,7 @@ class MatchingHDCase(Model): name=name.upper() products[name]=prod['id'] dom=[] + dom.append(['patient_id.walkin',"=","no"]) #XXX dom.append(['date',">=",date_from]) dom.append(['date',"<=",date_to]) dom.append(['state','!=','cancelled']) diff --git a/netforce_clinic/models/report_account_hd_case_summary.py b/netforce_clinic/models/report_account_hd_case_summary.py index c613528..53fec3a 100644 --- a/netforce_clinic/models/report_account_hd_case_summary.py +++ b/netforce_clinic/models/report_account_hd_case_summary.py @@ -71,6 +71,7 @@ class ReportAccountHDCaseSummary(Model): dom=[ ['date','>=', date_from], ['date','<=', date_to], + ['patient_id.walkin','=','no'], ] if ptype_id: dom.append(['patient_type_id','=',ptype_id]) @@ -217,6 +218,8 @@ class ReportAccountHDCaseSummary(Model): 'total_qty': total_qty, 'types': types, 'reimbursable': reimbursable, + 'is_reim': reimbursable=='yes' and True or False, + 'ptype_id': ptype_id, } if not reimbursable: data['title']='' @@ -240,5 +243,10 @@ class ReportAccountHDCaseSummary(Model): data=context['data'] data['department_id']=None return data + + def onchange_datefrom(self,context={}): + data=context['data'] + data['date_to']=data['date_from'] + return data ReportAccountHDCaseSummary.register() diff --git a/netforce_clinic/reports/report_account_hd_case_summary.xlsx b/netforce_clinic/reports/report_account_hd_case_summary.xlsx index 4080997bd9b109de2f5ac5615faceb5865dfc131..11e745e405c8793df93fe1ff3cd7c1eb93a01a76 100644 GIT binary patch delta 3353 zcmZu!c{CLI7awE`W6dsPnQVz{L)I8EW6PRl>>46#mY7C%ni!1rQT9EPi1B1ZDBFk; zgFzJWY-QilPw$=ce((Lx@BZ<<_kPd4_uTI}_jB*}E=q37vY10@&T#=47#IM@bioZQ z+*CAYyit;h=T9M1hgu3XWbYI_rN)JvbDsZx<5_6uR*Pj(rlbjJ>9P0d`XE8dF1oUL zv7b8s^eD^2UEt8mVH8Ftp2LJhMTLamqI8AY51*Fz=D$!ZJ|yeY3@F{yDhMOCoB~*GSP3h|mpEP^^@F z>!>v8X2*^GWaoq}zcKyt#5Ez4QpcN0#sz#hyq=eCsqWw@{`CT*nADQq!&X?zS?DpL zioslv6lg7_S8q?SQi9!`7LIY~(&q6gm>a2HCIeYPrLM^D9$cUW;OK?e^h5G>h@qu` zQIg(CA;x49b?7^YFrG{d_dTlj?)FHvl|l_?9O&<*nGkKdmF!;Hr9{Frz;m;t%Q+#z zl3sY@z*dqJjsOd~bq|+as4DX`g)p7C_OwDn?AbDevg)WN%iXB)jn%bj<%y0@d#>BJqq)@VC zgewBow$1_RGmtjtj-fk;$u;No!u_n=y0uVxPG!WPcsS3 zdr-U{9$L1xx91M@@e=k5Eqo7oDtr|BX`@eYd{DGo5E%2`{|7k@T$3l31m;(=NqWD% z?+zJPDUwT?zKE~NT3_p%5of~6A)L#n&*`FE67V!u@d4#wW*dGYVwVklBiWkhA|oM+ zQwfUH?qI=#pvJ140Oy(0Y=IQ7X<@aF`D9P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f38;3PjYrWW4URG3_`zh?g= z1Ttg+^z=xeLe@mD-2ywha~V~N*jlc@35+~C|Kl!;R6E^%CA}jx2=$CYnZoq+ou%eK z6ue~ryfGS;LDQusvmM{4ss@#HlUMJb)vEY`xb@dVF45J-~a zU&E?L^D%zuKOCY0m@tmw6iwboc5C`lDB8IS=-A-aL`M%frmraw|4;*p$W>rS0@ zem3D;a-#7pvWKAjB8rrOC=!Z4%6Dwk67G1Gf0#1Rj|a++4h|~Md>-1kdiiX@ORUWK z?{FP)RH!`v8z0%p?T4QHbuF$VE+eknFW(rjrIM!tlA6_*{F2lyDu$M9>Npc`O~MR> z3_C<`914stCn!NyRKh*8Qzi-d0%FcaErYf@$I|Z3$+MoZe-yK&K17B4-#z~*zvbBw zLcNEHAk+bzugYXz+sTUrC(nJO9xr>uQAF>Q%d`hN1!Owu)Ji1*|}L5 z@cA>C5s_qJzqFE6kC_}8ca)Nhx%fTEnD6`b?iwH`)x1*N0o-&ylJ|qnKX)6=*qt!+8E~P&u2iBgc;O|>DUZB=(D0BXBgO;Be5jXgan(M z6l4-@pxGha@6xHS2%-CYv_8p9KCrU_pc^sumnoeBl-zR|GcS5LgC0(m?$4|3zufSp zBcKt3>OH60cQGPu7zPW}E+xOx`AO~A5X{h%U0Tlz{+rq+(EoWH=R+5MnVrXiA-~A3 z4AcJUeu(Zcl)!E_|G$_JAH#HIem?!aGBD8ZAqFNwgyDOj$1K;Lg5AC9+HK(A?--B= zH_=vDau4)-hme1Oba{ycVTrv?D8dpPDiC6au+(0Siu52|V)x_i-LorjzlE6qkxN8+ g542oXnXIu3xUegOLcc*kAksminTY%W=w9i60hwx-E&u=k diff --git a/netforce_clinic/templates/report_account_hd_case_summary.hbs b/netforce_clinic/templates/report_account_hd_case_summary.hbs index f3f8b21..872faa2 100644 --- a/netforce_clinic/templates/report_account_hd_case_summary.hbs +++ b/netforce_clinic/templates/report_account_hd_case_summary.hbs @@ -17,10 +17,14 @@ {{else}} {{/ifeq}} - {{#each types}} - {{name}}: {{qty}} - {{/each}} - Total: {{total_qty}} + {{#if ptype_id}} + Total: {{total_qty}} + {{else}} + {{#each types}} + {{name}}: {{qty}} + {{/each}} + Total: {{total_qty}} + {{/if}} diff --git a/netforce_clinic/todo.txt b/netforce_clinic/todo.txt index 7a920c0..159be6f 100644 --- a/netforce_clinic/todo.txt +++ b/netforce_clinic/todo.txt @@ -1,3 +1,6 @@ +===== +- if department of staff or patient not related to department profile of user , it will show error's permission denied. +===== - report - walkin - receipt **