conv_bal
watcha.h@almacom.co.th 2015-01-15 12:15:46 +07:00
parent 0f856d5753
commit bac0f31a6b
13 changed files with 59 additions and 14 deletions

View File

@ -1,6 +1,6 @@
<action>
<field name="string">Reason</field>
<field name="view_cls">form_popup</field>
<field name="model">clinic.hd.case.discont</field>
<field name="model">clinic.hd.case.popup.discontinue</field>
<field name="target">_popup</field>
</action>

View File

@ -2,7 +2,6 @@
<field name="string">Patients</field>
<field name="view_cls">multi_view</field>
<field name="model">clinic.patient</field>
<!--<field name="tabs">[["All",[]],["Archived",[["active","=","False"]]],["Social Security",[["type","=","sc"]]],["UC",[["type","=","uc"]]],["Others",[["type","=","others"]]]]</field>-->
<field name="tabs">[["All",[]],["Archived",[["active","=","False"]]]]</field>
<field name="menu">clinic_menu</field>
<field name="limit">25</field>

View File

@ -16,11 +16,16 @@
<group span="6" columns="1">
<field name="product_id"/>
<field name="dialyzer_type"/>
<field name="use_time" readonly="1"/>
<field name="use_time"/>
<field name="max_use_time"/>
<field name="description"/>
<field name="company_id" invisible="1"/>
</group>
<group span="6" columns="1">
</group>
<group span="6" columns="1">
<separator string="Note: Use time will count automatic after finish HD Case."/>
</group>
<foot>
<button string="Confirm" type="success" states="new" method="confirm"/>
<button string="Drop" type="danger" icon="remove" states="active" method="drop"/>

View File

@ -1,4 +1,4 @@
<form model="clinic.hd.case.discont">
<form model="clinic.hd.case.popup.discontinue">
<field name="hd_case_id" invisible="1"/>
<field name="note" nolabel="1" width="450" height="200"/>
<separator string="Good issue: remove line below if no need to create."/>

View File

@ -11,7 +11,6 @@
<field name="trt_no"/>
<field name="type_id"/>
<field name="name"/>
<!--<field name="hn"/>-->
<field name="reg_date"/>
<field name="partner_id"/>
<field name="categ_id"/>
@ -44,6 +43,14 @@
<field name="company_id" invisible="1"/>
</group>
</tab>
<tab string="Cycles">
<group span="8" columns="1">
<field name="cycles"/>
</group>
<group span="4" columns="1">
<field name="cycle_id"/>
</group>
</tab>
<tab string="Health Information">
<field name="smoke"/>
<field name="withdrawal"/>
@ -98,7 +105,6 @@
</tab>
<tab string="Other">
<group form_layout="stacked">
<field name="cycle_id" span="2"/>
<field name="hn_no" span="2"/>
</group>
</tab>

View File

@ -8,8 +8,8 @@
<field name="name"/>
<field name="branch_id"/>
<field name="department_id"/>
<!--<field name="categ_id"/>-->
<field name="doctor_id"/>
<field name="type_id"/>
<field name="cycles"/>
<field name="image" preview='1'/>
</list>

View File

@ -25,7 +25,8 @@ from . import hd_case
from . import hd_case_line
from . import hd_case_expense
from . import hd_case_staff
from . import hd_case_discont
from . import hd_case_popup_discontinue
from . import hd_case_popup_dlz
from . import hd_case_payment
from . import hd_case_dialyzer
from . import dialyzer

View File

@ -716,9 +716,9 @@ class HDCase(Model):
hct=data["hct"]
msg=""
# XXX do not hard code
if(hct<36):
if(hct<=36):
msg="สามารถเบิกค่ายาสูงสุดไม่เกิน 1,125บาท ต่อ สัปดาห์"
elif(hct>=36 and hct<=39):
elif(hct>36 and hct<=39):
msg="สามารถเบิกค่ายาสูงสุดไม่เกิน 750บาท ต่อ สัปดาห์"
elif(hct> 39):
msg="ไม่สามารถเบิกค่ายาฉีดได้ทุกตัว"

View File

@ -4,7 +4,7 @@ class Hdcaseline(Model):
_name="clinic.hd.case.line"
_fields={
"hd_case_id": fields.Many2One("clinic.hd.case","HD Case",required=True,on_delete="cascade"),
"hd_case_dis_id": fields.Many2One("clinic.hd.case.discont","HD Case",on_delete="cascade"),
"hd_case_dis_id": fields.Many2One("clinic.hd.case.popup.discontinue","HD Case",on_delete="cascade"),
"product_id": fields.Many2One("product","Product",search=True),
"description": fields.Char("Description",search=True),
"qty":fields.Integer("QTY"),

View File

@ -1,7 +1,7 @@
from netforce.model import Model, fields, get_model
class HDCaseDiscont(Model):
_name="clinic.hd.case.discont"
class HDCasePopupDiscontinue(Model):
_name="clinic.hd.case.popup.discontinue"
_transient=True
_fields={
@ -72,5 +72,5 @@ class HDCaseDiscont(Model):
'flash': '%s has been cancelled'%hd_case.number,
}
HDCaseDiscont.register()
HDCasePopupDiscontinue.register()

View File

@ -0,0 +1,23 @@
from netforce.model import Model, fields, get_model
class HDCasePopupDlz(Model):
_name="clinic.hd.case.popup.dlz"
_transient=True
_fields={
"hd_case_id": fields.Many2One("clinic.hd.case","HdCase",required=True,on_delete="cascade"),
"note": fields.Text("Description"),
}
def _get_hd_case_id(self,context={}):
hd_case_id=context.get("refer_id")
print("hd case deault")
if not hd_case_id:
return None
return int(hd_case_id)
_defaults={
'hd_case_id': _get_hd_case_id,
}
HDCasePopupDlz.register()

View File

@ -100,6 +100,7 @@ class Patient(Model):
'department_id': fields.Many2One("clinic.department","Department"),
'cycle_id': fields.Many2One("clinic.cycle","Last Cycle",function="_get_last_cycle"),
'branch_id': fields.Many2One("clinic.branch","Branch",search=True),
'cycles': fields.Many2Many("clinic.cycle","Cycles"),
}
def _get_number(self,context={}):

View File

@ -1,3 +1,13 @@
=======
generate visit ใหม่
popup select dyalyzer
- visit
- confirm: if pt has dialyzer -> auto select else empty (need to select on hd case)
- click pay -> cash -> not update use time (dlz)
- reset use time -> how ?
=======
report:
- doctor detail (for accounting)
- patient visit