From 6e547eae65a676d93dfc6e11922aca8de5473be1 Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Thu, 15 Jan 2015 23:26:44 +0700 Subject: [PATCH] report report --- netforce_clinic/models/report_visit.py | 3 ++- netforce_clinic/reports/report_visit.xlsx | Bin 5206 -> 5230 bytes netforce_clinic/templates/report_visit.hbs | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/netforce_clinic/models/report_visit.py b/netforce_clinic/models/report_visit.py index 9ee2155..868cd25 100644 --- a/netforce_clinic/models/report_visit.py +++ b/netforce_clinic/models/report_visit.py @@ -69,13 +69,14 @@ class ReportVisit(Model): records=get_model('clinic.visit').search_browse(dom) lines=[] no=1 - for record in records: + for record in sorted(records,key=lambda x: (x.patient_id.id,x.visit_date)): lines.append({ 'no': no, 'vid': record.id, 'cid': record.cycle_id.id, 'cname': record.cycle_id.name or "", 'pid': record.patient_id.id or '', + 'hn': record.patient_id.hn_no or '', 'pname': record.patient_id.name or '', 'tname': record.patient_id.type_id.name or '', 'tid': record.patient_id.type_id.id or '', diff --git a/netforce_clinic/reports/report_visit.xlsx b/netforce_clinic/reports/report_visit.xlsx index 879078ac38b1779e26966bc64e306efcab30328b..a18be86f7658b08aa540c5c6eb08747fe28f783a 100644 GIT binary patch delta 2012 zcmZWqc{J3E7yr(Thru*8Gc=YN$u^6nNOme~#umzwWM^XR)fis$W-1ZcCLzvLlfn;W z$tZ?A+tfq0iI5(ZX{vc1Aw~G{&hPwAzw^6)+)}{BxOq!sk2E3*Hl8i!Hbxj*jg^Eq^xmt(wT^Zv;3SqnQ zYzxZ%(mHKjSQc=jF}`T$|o-N{>b^rsNc;F){z5n-};;{_$0y+ExyIu78p z=%|JKAXJrIa`+RjB{#uV##7zDb|r97Lrs}iR&pv^_ReASi(FvULQ~WDgJ)wW#1N4W z?Q0uCM{48Vp@mM5y4`$I^_d=>&t^E;=#(VcZrk}>LL(y7dN*JDdM8p&vI zwkIp4q(_7+74e+`pQyx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N#)Wqaew?r&X^kHKj53_X1+PD!%Epos3SV{6 zdzKy73%$$p{lqf^gOsL6?_GFzh-YVU*ba7yS`>vW4GCq1KC1wW=D|F&_m=$3%xYyLYUn8;Hl}DIEQZ6Bnw@HT zf)S{Zmde0N%@;1Vkg#nsG+NF~7yQ2h8L;Ytuyznb@`IQ&jT`~H>Stnjw?Q}g4r)rI z?5BFFbBOy!4T@Nl>D|?4N9^#iPn8^-w8stfMs*VsykC=UW@P286u%;BlMl8IkQ(Cp zC(R++Wl3vNLI{X%^xiP|*>;N!l6wy3aHAOMgK{#RccO*p2G9qcSr49ra0T>tkodv1qg zkj4{oY->`yD$L!L*N{^w4q@=mfRGz`RmG2y-=+Bgzb|<*6eh{!B4DCG8L}x%j9Fu0 zqM)BA$SE*k=An{#AwuqhiMt#NT@s%e7G}Qjh#9AT*8!lo0RT^&hea^%RtUla7mSgQ o2*6sH06~0!znz##rx#b;Lo%s$%<+Z&i=Ix_<&$Cq@*ac#18*FB>;M1& diff --git a/netforce_clinic/templates/report_visit.hbs b/netforce_clinic/templates/report_visit.hbs index 0063263..e70c58e 100644 --- a/netforce_clinic/templates/report_visit.hbs +++ b/netforce_clinic/templates/report_visit.hbs @@ -18,6 +18,7 @@ # วันที่ รอบ + HN ผู้ป่วย สิทธ์ แพทย์ @@ -29,6 +30,7 @@ {{no}} {{date}} {{cname}} + {{hn}} {{pname}} {{tname}} {{dname}}