improve
parent
0f856d5753
commit
bac0f31a6b
|
@ -1,6 +1,6 @@
|
||||||
<action>
|
<action>
|
||||||
<field name="string">Reason</field>
|
<field name="string">Reason</field>
|
||||||
<field name="view_cls">form_popup</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>
|
<field name="target">_popup</field>
|
||||||
</action>
|
</action>
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<field name="string">Patients</field>
|
<field name="string">Patients</field>
|
||||||
<field name="view_cls">multi_view</field>
|
<field name="view_cls">multi_view</field>
|
||||||
<field name="model">clinic.patient</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="tabs">[["All",[]],["Archived",[["active","=","False"]]]]</field>
|
||||||
<field name="menu">clinic_menu</field>
|
<field name="menu">clinic_menu</field>
|
||||||
<field name="limit">25</field>
|
<field name="limit">25</field>
|
||||||
|
|
|
@ -16,11 +16,16 @@
|
||||||
<group span="6" columns="1">
|
<group span="6" columns="1">
|
||||||
<field name="product_id"/>
|
<field name="product_id"/>
|
||||||
<field name="dialyzer_type"/>
|
<field name="dialyzer_type"/>
|
||||||
<field name="use_time" readonly="1"/>
|
<field name="use_time"/>
|
||||||
<field name="max_use_time"/>
|
<field name="max_use_time"/>
|
||||||
<field name="description"/>
|
<field name="description"/>
|
||||||
<field name="company_id" invisible="1"/>
|
<field name="company_id" invisible="1"/>
|
||||||
</group>
|
</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>
|
<foot>
|
||||||
<button string="Confirm" type="success" states="new" method="confirm"/>
|
<button string="Confirm" type="success" states="new" method="confirm"/>
|
||||||
<button string="Drop" type="danger" icon="remove" states="active" method="drop"/>
|
<button string="Drop" type="danger" icon="remove" states="active" method="drop"/>
|
||||||
|
|
|
@ -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="hd_case_id" invisible="1"/>
|
||||||
<field name="note" nolabel="1" width="450" height="200"/>
|
<field name="note" nolabel="1" width="450" height="200"/>
|
||||||
<separator string="Good issue: remove line below if no need to create."/>
|
<separator string="Good issue: remove line below if no need to create."/>
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
<field name="trt_no"/>
|
<field name="trt_no"/>
|
||||||
<field name="type_id"/>
|
<field name="type_id"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<!--<field name="hn"/>-->
|
|
||||||
<field name="reg_date"/>
|
<field name="reg_date"/>
|
||||||
<field name="partner_id"/>
|
<field name="partner_id"/>
|
||||||
<field name="categ_id"/>
|
<field name="categ_id"/>
|
||||||
|
@ -44,6 +43,14 @@
|
||||||
<field name="company_id" invisible="1"/>
|
<field name="company_id" invisible="1"/>
|
||||||
</group>
|
</group>
|
||||||
</tab>
|
</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">
|
<tab string="Health Information">
|
||||||
<field name="smoke"/>
|
<field name="smoke"/>
|
||||||
<field name="withdrawal"/>
|
<field name="withdrawal"/>
|
||||||
|
@ -98,7 +105,6 @@
|
||||||
</tab>
|
</tab>
|
||||||
<tab string="Other">
|
<tab string="Other">
|
||||||
<group form_layout="stacked">
|
<group form_layout="stacked">
|
||||||
<field name="cycle_id" span="2"/>
|
|
||||||
<field name="hn_no" span="2"/>
|
<field name="hn_no" span="2"/>
|
||||||
</group>
|
</group>
|
||||||
</tab>
|
</tab>
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="branch_id"/>
|
<field name="branch_id"/>
|
||||||
<field name="department_id"/>
|
<field name="department_id"/>
|
||||||
<!--<field name="categ_id"/>-->
|
|
||||||
<field name="doctor_id"/>
|
<field name="doctor_id"/>
|
||||||
<field name="type_id"/>
|
<field name="type_id"/>
|
||||||
|
<field name="cycles"/>
|
||||||
<field name="image" preview='1'/>
|
<field name="image" preview='1'/>
|
||||||
</list>
|
</list>
|
||||||
|
|
|
@ -25,7 +25,8 @@ from . import hd_case
|
||||||
from . import hd_case_line
|
from . import hd_case_line
|
||||||
from . import hd_case_expense
|
from . import hd_case_expense
|
||||||
from . import hd_case_staff
|
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_payment
|
||||||
from . import hd_case_dialyzer
|
from . import hd_case_dialyzer
|
||||||
from . import dialyzer
|
from . import dialyzer
|
||||||
|
|
|
@ -716,9 +716,9 @@ class HDCase(Model):
|
||||||
hct=data["hct"]
|
hct=data["hct"]
|
||||||
msg=""
|
msg=""
|
||||||
# XXX do not hard code
|
# XXX do not hard code
|
||||||
if(hct<36):
|
if(hct<=36):
|
||||||
msg="สามารถเบิกค่ายาสูงสุดไม่เกิน 1,125บาท ต่อ สัปดาห์"
|
msg="สามารถเบิกค่ายาสูงสุดไม่เกิน 1,125บาท ต่อ สัปดาห์"
|
||||||
elif(hct>=36 and hct<=39):
|
elif(hct>36 and hct<=39):
|
||||||
msg="สามารถเบิกค่ายาสูงสุดไม่เกิน 750บาท ต่อ สัปดาห์"
|
msg="สามารถเบิกค่ายาสูงสุดไม่เกิน 750บาท ต่อ สัปดาห์"
|
||||||
elif(hct> 39):
|
elif(hct> 39):
|
||||||
msg="ไม่สามารถเบิกค่ายาฉีดได้ทุกตัว"
|
msg="ไม่สามารถเบิกค่ายาฉีดได้ทุกตัว"
|
||||||
|
|
|
@ -4,7 +4,7 @@ class Hdcaseline(Model):
|
||||||
_name="clinic.hd.case.line"
|
_name="clinic.hd.case.line"
|
||||||
_fields={
|
_fields={
|
||||||
"hd_case_id": fields.Many2One("clinic.hd.case","HD Case",required=True,on_delete="cascade"),
|
"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),
|
"product_id": fields.Many2One("product","Product",search=True),
|
||||||
"description": fields.Char("Description",search=True),
|
"description": fields.Char("Description",search=True),
|
||||||
"qty":fields.Integer("QTY"),
|
"qty":fields.Integer("QTY"),
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from netforce.model import Model, fields, get_model
|
from netforce.model import Model, fields, get_model
|
||||||
|
|
||||||
class HDCaseDiscont(Model):
|
class HDCasePopupDiscontinue(Model):
|
||||||
_name="clinic.hd.case.discont"
|
_name="clinic.hd.case.popup.discontinue"
|
||||||
_transient=True
|
_transient=True
|
||||||
|
|
||||||
_fields={
|
_fields={
|
||||||
|
@ -72,5 +72,5 @@ class HDCaseDiscont(Model):
|
||||||
'flash': '%s has been cancelled'%hd_case.number,
|
'flash': '%s has been cancelled'%hd_case.number,
|
||||||
}
|
}
|
||||||
|
|
||||||
HDCaseDiscont.register()
|
HDCasePopupDiscontinue.register()
|
||||||
|
|
|
@ -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()
|
|
@ -100,6 +100,7 @@ class Patient(Model):
|
||||||
'department_id': fields.Many2One("clinic.department","Department"),
|
'department_id': fields.Many2One("clinic.department","Department"),
|
||||||
'cycle_id': fields.Many2One("clinic.cycle","Last Cycle",function="_get_last_cycle"),
|
'cycle_id': fields.Many2One("clinic.cycle","Last Cycle",function="_get_last_cycle"),
|
||||||
'branch_id': fields.Many2One("clinic.branch","Branch",search=True),
|
'branch_id': fields.Many2One("clinic.branch","Branch",search=True),
|
||||||
|
'cycles': fields.Many2Many("clinic.cycle","Cycles"),
|
||||||
}
|
}
|
||||||
|
|
||||||
def _get_number(self,context={}):
|
def _get_number(self,context={}):
|
||||||
|
|
|
@ -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:
|
report:
|
||||||
- doctor detail (for accounting)
|
- doctor detail (for accounting)
|
||||||
- patient visit
|
- patient visit
|
||||||
|
|
Loading…
Reference in New Issue