diff --git a/netforce_clinic/layouts/clinic_hd_case_form.xml b/netforce_clinic/layouts/clinic_hd_case_form.xml index d03cdb9..0bc1f6f 100644 --- a/netforce_clinic/layouts/clinic_hd_case_form.xml +++ b/netforce_clinic/layouts/clinic_hd_case_form.xml @@ -28,6 +28,7 @@ + diff --git a/netforce_clinic/layouts/clinic_hd_case_list.xml b/netforce_clinic/layouts/clinic_hd_case_list.xml index 89ca460..fd09d59 100644 --- a/netforce_clinic/layouts/clinic_hd_case_list.xml +++ b/netforce_clinic/layouts/clinic_hd_case_list.xml @@ -1,4 +1,13 @@ + + + + + + + + + diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py index a58cdde..565a8f0 100644 --- a/netforce_clinic/models/__init__.py +++ b/netforce_clinic/models/__init__.py @@ -13,7 +13,6 @@ from . import patient_cause_line from . import patient_comorbidity_line from . import patient_morbidity_line from . import race -from . import report_dialyzer_drop from . import schedule from . import setting from . import visit diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index 95df288..7c0ee1b 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -64,6 +64,7 @@ class HDcase(Model): "fee_total": fields.Float("Total",function="get_gmtotal",readonly=True,function_multi=True), 'note': fields.Text("Note"), "cycle_id": fields.Many2One("clinic.cycle","Cycle"), + 'pop_txt': fields.Char("POP TEXT", readonly=True), } def _get_number(self,context={}): @@ -97,6 +98,7 @@ class HDcase(Model): "number": _get_number, "company_id": lambda *a: get_active_company(), "fee": 1500, + 'show_pop': False, } _order="date desc,number desc" @@ -175,7 +177,9 @@ class HDcase(Model): data=context['data'] hct=data['hct'] if(hct<=39): - data['hct']=0 + data['pop_txt']='xxxxxxxxxxxxxxxxx' + else: + data['pop_txt']='' return data def cancelled(self,ids,context={}): diff --git a/netforce_clinic/models/report_dialyzer_drop.py b/netforce_clinic/models/report_dialyzer_drop.py deleted file mode 100644 index 0e229e4..0000000 --- a/netforce_clinic/models/report_dialyzer_drop.py +++ /dev/null @@ -1,37 +0,0 @@ -import time - -from netforce.model import Model, fields, get_model - -class DialyzerDrop(Model): - _name="report.dialyzer.drop" - _string="Dialyzer [Drop]" - _transient=True - - _fields={ - "date": fields.Date("Date"), - } - - _defaults={ - 'date': lambda *a: time.strftime("%Y-%m-%d"), - } - - def get_report_data(self,ids,context={}): - lines=[] - - hd_cases=get_model("clinic.dialyzer").search_browse(['state','=','drop']) - for dialyzer_ids in hd_cases: - lines.append({ - 'number' : dialyzer_ids.number, - 'usetime': dialyzer_ids.use_time, - 'maxuse' : dialyzer_ids.max_use_time, - 'createdate' : dialyzer_ids.date, - 'expdate' : dialyzer_ids.exp_date, - 'patient' : dialyzer_ids.patient_id.name, - }) - - data={ - 'lines': lines or "Dialyzer Drop [Empty]", - } - return data - -DialyzerDrop.register() diff --git a/netforce_clinic/models/report_hd_dialy.py b/netforce_clinic/models/report_hd_dialy.py index 423b6ba..f84792c 100644 --- a/netforce_clinic/models/report_hd_dialy.py +++ b/netforce_clinic/models/report_hd_dialy.py @@ -36,6 +36,12 @@ class ReportHDDialy(Model): date_from=time.strftime("%Y-%m-%d") date_to=time.strftime("%Y-%m-%d") + defaults=context.get("defaults") + if defaults.get("date_from"): + date_from=defaults.get("date_from") + if defaults.get("date_to"): + date_to=defaults.get("date_to") + dom=[] dom.append(['state','=','completed']) if ids: @@ -66,8 +72,6 @@ class ReportHDDialy(Model): for hd_case in get_model("clinic.hd.case").search_browse(dom,order="cycle_id.sequence"): patient_type=hd_case.patient_id.type patient_type=PATIENT_TYPE.get(patient_type) - #dialyzer_name=hd_case.dialyzers.id - #dialyzer_name=DIALYZER_NAME.get(dialyzer_name) cycle_name=hd_case.cycle_id.name or "" show_cycle=False if not cycle_name in cycles: diff --git a/netforce_clinic/templates/report_dialyzer_drop.hbs b/netforce_clinic/templates/report_dialyzer_drop.hbs deleted file mode 100644 index a990eac..0000000 --- a/netforce_clinic/templates/report_dialyzer_drop.hbs +++ /dev/null @@ -1,58 +0,0 @@ -
-

- Dialyzers [Drop] -

-
- - - - - - - - - - - - - {{#each lines context=context}} - - - - - - - - - {{/each}} - - - - - - -
- Number - - Use (Time) - - Max Use (Time) - - Create Date - - Expire Date - - Patient -
- {{number}} - - {{usetime}} - - {{maxuse}} - - {{createdate}} - - {{expdate}} - - {{patient}} -
diff --git a/netforce_clinic/templates/report_hd_monthly.hbs b/netforce_clinic/templates/report_hd_monthly.hbs index 078950f..4862c78 100644 --- a/netforce_clinic/templates/report_hd_monthly.hbs +++ b/netforce_clinic/templates/report_hd_monthly.hbs @@ -18,7 +18,7 @@ {{topic}} {{month}} - {{amount}} + {{amount}} {{/each}} diff --git a/netforce_clinic/templates/round.hbs b/netforce_clinic/templates/round.hbs deleted file mode 100644 index 8813e52..0000000 --- a/netforce_clinic/templates/round.hbs +++ /dev/null @@ -1 +0,0 @@ -

Hello HBS

diff --git a/netforce_clinic/todo.txt b/netforce_clinic/todo.txt index 33d8862..5e28c66 100644 --- a/netforce_clinic/todo.txt +++ b/netforce_clinic/todo.txt @@ -1,7 +1,10 @@ +==== + - import data + - payment + - NHSO + - SSO ===== - select diaylizer at treatment page - - + select diaylizer at treatment page -> ok ===== step: nurse @@ -19,7 +22,6 @@ 3. go to hd case - select dialyzer - if not we can no do treament - ===== todo ###### - import payment