conv_bal
watcha.h 2014-10-20 10:02:57 +07:00
parent 3e44efcbbc
commit 28431a348b
10 changed files with 28 additions and 105 deletions

View File

@ -28,6 +28,7 @@
<field name="bp_stop"/>
<field name="per_bp_stop"/>
<field name="hct" onchange="onchange_hct"/>
<field name="pop_txt" nolabel="1"/>
<field name="dialyzers" nolabel="1">
<list>
<field name="dialyzer_id" domain="[['patient_id','=',parent.patient_id],['state','=','active']]" onchange="onchange_dialyzer"/>

View File

@ -1,4 +1,13 @@
<list model="clinic.hd.case">
<search>
<field name="number"/>
<field name="time_start"/>
<field name="time_stop"/>
<field name="patient_id"/>
<field name="cycle_id"/>
<field name="doctor_id"/>
<field name="nurse_id"/>
</search>
<field name="number"/>
<field name="time_start"/>
<field name="time_stop"/>

View File

@ -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

View File

@ -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={}):

View File

@ -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()

View File

@ -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:

View File

@ -1,58 +0,0 @@
<center>
<h2>
Dialyzers [Drop]
</h2>
</center>
<table class="table table-striped">
<thead class="scroll-header">
<tr>
<th>
Number
</th>
<th>
Use (Time)
</th>
<th>
Max Use (Time)
</th>
<th>
Create Date
</th>
<th>
Expire Date
</th>
<th>
Patient
</th>
</tr>
</thead>
<tbody>
{{#each lines context=context}}
<tr>
<td>
{{number}}
</td>
<td>
{{usetime}}
</td>
<td>
{{maxuse}}
</td>
<td>
{{createdate}}
</td>
<td>
{{expdate}}
</td>
<td>
{{patient}}
</td>
</tr>
{{/each}}
</tbody>
<tfoot>
<tr style="font-weight:bold">
</tr>
</tfoot>
</table>

View File

@ -18,7 +18,7 @@
<tr>
<td>{{topic}}</td>
<td>{{month}}</td>
<td><a style="text-decoration: underline" href="ui#name=clinic_hd_case&tab_no=3">{{amount}}</a></td>
<td><a style="text-decoration: underline" href="ui#name=clinic_report_hd_dialy&defaults.date_from='2014-10-17'&defaults.date_to='2014-10-18'">{{amount}}</a></td>
</tr>
{{/each}}
</tbody>

View File

@ -1 +0,0 @@
<h1>Hello HBS</h1>

View File

@ -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