Filter Patient By tab

conv_bal
chayut.s 2014-10-01 18:27:06 +07:00
commit f54fa28c75
2 changed files with 14 additions and 19 deletions

View File

@ -6,17 +6,17 @@
</button>
</head>
<tabs>
<tab string="Patient's Data">
<tab string="Personal Info">
<field name="number"/>
<field name="name"/>
<field name="type"/>
<field name="reg_date"/>
<field name="name"/>
<field name="birthday"/>
<field name="age"/>
<field name="card_type"/>
<field name="card_no"/>
<field name="exp_date"/>
<field name="telephone"/>
<field name="tel"/>
<field name="mobile"/>
<field name="gender"/>
<field name="marital_status"/>
@ -27,7 +27,7 @@
<field name="weight"/>
<field name="height"/>
</tab>
<tab string="Patient's Data +">
<tab string="Health Info">
<field name="smoke" span="12"/>
<field name="salary" span="12"/>
<field name="withdrawal" span="12"/>
@ -92,10 +92,6 @@
<field name="check20" span="12"/>
<field name="comarbid2"/>
</tab>
<tab string="Healthcare">
<field name="doctorsss"/>
<field name="nurses"/>
</tab>
</tabs>
<related>
<field name="addresses"/>

View File

@ -21,24 +21,23 @@ class Patient(Model):
return res # -> {1: 30, 2: 45,.....}
_fields={
"number": fields.Char("Patient ID",required=True,search=True),
"number": fields.Char("Patient No.",required=True,search=True),
"name": fields.Char("Name",required=True,search=True),
"reg_date": fields.Date("Reg.Date",required=False,search=True),
"birthday": fields.Date("Date of birth",required=False,search=True),
"telephone": fields.Char("Telephone",required=False,search=True),
"reg_date": fields.Date("Register Date",required=False,search=True),
"birthday": fields.Date("Date of Birth",required=False,search=True),
"tel": fields.Char("Tel.",required=False,search=True),
"mobile": fields.Char("Mobile",required=False,search=True),
"job": fields.Char("Job"),
"job": fields.Char("Job/Position"),
"graduation": fields.Selection([("junior_high_school", "Junior High School"),("senior_hish_school","Senior High School"),("vocational_certificate", "Vocational Certificate"),("High_vocational_certificate", "High Vocational Certificate"),("ba", "B.A.(Bachelor of Arts)"),("ma","M.A.(Master of Arts)"),("phd","Ph.D.(Doctor of Philosophy)")],"Graduation"),
"age": fields.Integer("Age", function="_get_age"),
"weight": fields.Integer("Weight (cm)"),
"height": fields.Integer("Height (Kg)"),
"type": fields.Selection([("mg","Medical Govement"),("sc","Social Security"),("nhso","NHSO (30฿)"),("personal","Personal"),("other","Other")],"Type of treatment",required=False),
"weight": fields.Float("Weight (cm)"),
"height": fields.Float("Height (Kg)"),
"type": fields.Selection([("mg","Medical Govement"),("sc","Social Security"),("nhso","NHSO (30฿)"),("personal","Personal"),("other","Other")],"Type of Treatment",required=False),
"card_type": fields.Selection([("iden_id","Identity Card"),("passport","Passport")],"Card Type",required=True),
'card_no' : fields.Char("Card No."),
"app_no": fields.Char("Application No."),
"salary": fields.Selection([["20000","5,001-20,000"],["50000","20,001-50,000"],["100000","50,001-100,000"],["100001","100,000+"]], "Salary"),
'exp_date' : fields.Date("Expiry Date"),
"state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status",required=False),
"addresses": fields.One2Many("address","related_id","Addresses"),
"gender": fields.Selection([("male","Male"),("female","Female")],"Gender",required=False),
"marital_status": fields.Selection([("single","Single"),("marry","Marry"),("divorce","Divorce"),("separated","Saparated"),("widowed","Widowed")],"Marital Status",required=False),
@ -133,8 +132,8 @@ class Patient(Model):
_defaults={
"state": "mg",
"date": lambda *a: time.strftime("%Y-%m-%d"),
"type": "mg",
"reg_date": lambda *a: time.strftime("%Y-%m-%d"),
"number": _get_number,
"company_id": lambda *a: get_active_company(),
}