From f3e9392de0382084de680db99c0fa32901f0ea12 Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Fri, 3 Jul 2015 09:48:25 +0700 Subject: [PATCH] show hdcase# --- netforce_clinic/models/report_cycle_item.py | 8 ++++++++ netforce_clinic/templates/report_cycle_item.hbs | 3 +++ 2 files changed, 11 insertions(+) diff --git a/netforce_clinic/models/report_cycle_item.py b/netforce_clinic/models/report_cycle_item.py index 7cb0cc1..78e5f41 100644 --- a/netforce_clinic/models/report_cycle_item.py +++ b/netforce_clinic/models/report_cycle_item.py @@ -133,6 +133,12 @@ class ReportCycleItem(Model): dlz_drop=True cancel=False row_color='' + def reformat_number(number=''): + if not number: + return "" + number=number.replace("HDC/","") + number=number.replace("HDC-","") + return number lines.append({ 'dlz_drop': dlz_drop, 'cancel': cancel, @@ -147,6 +153,8 @@ class ReportCycleItem(Model): 'date': hdcase.date, 'epo': hdcase.epo, 'mdc': hdcase.mdc, + 'hdcase_number': reformat_number(hdcase.number), + 'hdcase_id': hdcase.id, 'mdc_name': hdcase.mdc_name or hdcase.epo, 'fee': abs(hdcase.fee), 'dlz_name': hdcase.dlz_name, diff --git a/netforce_clinic/templates/report_cycle_item.hbs b/netforce_clinic/templates/report_cycle_item.hbs index 3094f61..494f853 100644 --- a/netforce_clinic/templates/report_cycle_item.hbs +++ b/netforce_clinic/templates/report_cycle_item.hbs @@ -9,6 +9,7 @@ วันที่ รอบ No + HDC# ชื่อ-สกุล แพทย์ สิทธ์ @@ -31,6 +32,7 @@ {{date_txt}} {{cseq_txt}} {{no}} + {{hdcase_number}} {{pname}} {{dname}} {{tname}} @@ -46,6 +48,7 @@ {{/ifeq}} {{no}} + {{hdcase_number}} {{pname}} {{dname}} {{tname}}