Customize fields
parent
3801ae16ea
commit
e5f2c3751a
|
@ -14,6 +14,7 @@
|
||||||
<field name="birthday"/>
|
<field name="birthday"/>
|
||||||
<field name="telephone"/>
|
<field name="telephone"/>
|
||||||
<field name="mobile"/>
|
<field name="mobile"/>
|
||||||
|
<field name="department"/>
|
||||||
</tab>
|
</tab>
|
||||||
</tabs>
|
</tabs>
|
||||||
<related>
|
<related>
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
<menu string="Clinic">
|
<menu string="Clinic">
|
||||||
<item string="Dashboard" action="clinic_board"/>
|
<item string="Dashboard" action="clinic_board"/>
|
||||||
<item string="Genaral Data">
|
|
||||||
<item string="Patient" action="clinic_patient"/>
|
<item string="Patient" action="clinic_patient"/>
|
||||||
<item string="Doctor" action="clinic_doctor"/>
|
<item string="Doctor" action="clinic_doctor"/>
|
||||||
<item string="Nurse" action="clinic_nurse"/>
|
<item string="Nurse" action="clinic_nurse"/>
|
||||||
</item>
|
|
||||||
<item string="Clinic">
|
|
||||||
<item string="Visit" action="clinic_visit"/>
|
<item string="Visit" action="clinic_visit"/>
|
||||||
<item string="HD case treatment" action="clinic_hd_case"/>
|
<item string="HD Case Treatment" action="clinic_hd_case"/>
|
||||||
<item string="Dialyzer" action="clinic_dialyzer"/>
|
<item string="Dialyzer" action="clinic_dialyzer"/>
|
||||||
</item>
|
|
||||||
<item string="Settings">
|
<item string="Settings">
|
||||||
<item string="Clinic Setting" action="clinic_setting"/>
|
<item string="Clinic Setting" action="clinic_setting"/>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -6,37 +6,63 @@
|
||||||
</button>
|
</button>
|
||||||
</head>
|
</head>
|
||||||
<tabs>
|
<tabs>
|
||||||
<tab string="Patient">
|
<tab string="Patient's Data">
|
||||||
<separator string="Patient Info"/>
|
<group span="12" colunm="1">
|
||||||
<field name="number"/>
|
|
||||||
<field name="type"/>
|
<field name="type"/>
|
||||||
<field name="name"/>
|
</group>
|
||||||
|
<group span="12" colunm="1">
|
||||||
|
<field name="number"/>
|
||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
|
</group>
|
||||||
|
<group span="12" colunm="2">
|
||||||
|
<field name="first_name"/>
|
||||||
|
<field name="last_name"/>
|
||||||
|
</group>
|
||||||
|
<group span="12" colunm="2">
|
||||||
<field name="birthday"/>
|
<field name="birthday"/>
|
||||||
|
<field name="age"/>
|
||||||
|
</group>
|
||||||
|
<group span="12" colunm="2">
|
||||||
|
<field name="card_type"/>
|
||||||
|
</group>
|
||||||
|
<group span="12" colunm="2">
|
||||||
|
<field name="iden_id"/>
|
||||||
|
<field name="exp_id"/>
|
||||||
|
</group>
|
||||||
<field name="telephone"/>
|
<field name="telephone"/>
|
||||||
<field name="mobile"/>
|
<field name="mobile"/>
|
||||||
<field name="job"/>
|
<field name="gender" span="12"/>
|
||||||
<field name="age"/>
|
<field name="marital_status" span="12"/>
|
||||||
<field name="weight"/>
|
<group span="12" colunm="2">
|
||||||
<field name="height"/>
|
|
||||||
<field name="card_type"/>
|
|
||||||
<field name="exp_id"/>
|
|
||||||
<field name="gender"/>
|
|
||||||
<field name="marital_status"/>
|
|
||||||
<field name="nationality"/>
|
<field name="nationality"/>
|
||||||
<field name="race"/>
|
<field name="race"/>
|
||||||
<separator string="Decare"/>
|
</group>
|
||||||
<field name="smoke"/>
|
<field name="graduation" span="12"/>
|
||||||
|
<field name="job" span="12"/>
|
||||||
|
<field name="weight" span="12"/>
|
||||||
|
<field name="height" span="12"/>
|
||||||
|
</tab>
|
||||||
|
<tab string="Patient's Data +">
|
||||||
|
<field name="smoke" span="12"/>
|
||||||
|
<field name="salary" span="12"/>
|
||||||
|
<field name="withdrawal" span="12"/>
|
||||||
|
<group span="12" colunm="2">
|
||||||
<field name="first_hemodialysis"/>
|
<field name="first_hemodialysis"/>
|
||||||
<field name="hemodialysis"/>
|
<field name="hemodialysis"/>
|
||||||
|
</group>
|
||||||
|
<field name="first_treatment" span="12"/>
|
||||||
|
<group span="12" colunm="2">
|
||||||
<field name="clinic_after"/>
|
<field name="clinic_after"/>
|
||||||
<field name="clinic_after_name"/>
|
<field name="clinic_after_name"/>
|
||||||
<field name="first_permanent_vascular_access"/>
|
</group>
|
||||||
<field name="first_tenckhoff_catheters"/>
|
<field name="first_permanent_vascular_access" span="12"/>
|
||||||
<field name="start_date_clinic"/>
|
<field name="first_tenckhoff_catheters" span="12"/>
|
||||||
<field name="waiting_transplantation"/>
|
<field name="start_date_clinic" span="12"/>
|
||||||
|
<field name="waiting_transplantation" span="12"/>
|
||||||
<field name="who_transplantation"/>
|
<field name="who_transplantation"/>
|
||||||
<field name="reason_of_chronic_renal_failure"/>
|
<field name="reason_of_chronic_renal_failure"/>
|
||||||
|
<separator string="Cause of chronic renal failure"/>
|
||||||
|
<group span="12" colunm="3">
|
||||||
<field name="ac_mi"/>
|
<field name="ac_mi"/>
|
||||||
<field name="co_an"/>
|
<field name="co_an"/>
|
||||||
<field name="ce_ac"/>
|
<field name="ce_ac"/>
|
||||||
|
@ -52,10 +78,15 @@
|
||||||
<field name="hyperucemia"/>
|
<field name="hyperucemia"/>
|
||||||
<field name="cga"/>
|
<field name="cga"/>
|
||||||
<field name="parathy"/>
|
<field name="parathy"/>
|
||||||
|
</group>
|
||||||
|
</tab>
|
||||||
|
<tab string="Co-marbid">
|
||||||
<field name="comarbid"/>
|
<field name="comarbid"/>
|
||||||
|
</tab>
|
||||||
|
<tab string="Morbidity">
|
||||||
<field name="comarbid2"/>
|
<field name="comarbid2"/>
|
||||||
</tab>
|
</tab>
|
||||||
<tab string="Doctor">
|
<tab string="Healthcare">
|
||||||
<field name="doctorsss"/>
|
<field name="doctorsss"/>
|
||||||
<field name="nurses"/>
|
<field name="nurses"/>
|
||||||
</tab>
|
</tab>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<list model="clinic.patient">
|
<list model="clinic.patient">
|
||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
<field name="name"/>
|
<field name="first_name"/>
|
||||||
|
<field name="last_name"/>
|
||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
</list>
|
</list>
|
||||||
|
|
|
@ -12,7 +12,7 @@ class Doctor(Model):
|
||||||
_multi_company=True
|
_multi_company=True
|
||||||
_fields={
|
_fields={
|
||||||
"number": fields.Char("Number",required=True,search=True),
|
"number": fields.Char("Number",required=True,search=True),
|
||||||
"name": fields.Char("Name Surname",required=True,search=True),
|
"name": fields.Char("Name",required=True,search=True),
|
||||||
"date": fields.Date("Create Date",required=True,search=True),
|
"date": fields.Date("Create Date",required=True,search=True),
|
||||||
"birthday": fields.Date("BirthDay",required=True,search=True),
|
"birthday": fields.Date("BirthDay",required=True,search=True),
|
||||||
"telephone": fields.Char("Telephone",required=True,search=True),
|
"telephone": fields.Char("Telephone",required=True,search=True),
|
||||||
|
|
|
@ -12,7 +12,7 @@ class Nurse(Model):
|
||||||
_multi_company=True
|
_multi_company=True
|
||||||
_fields={
|
_fields={
|
||||||
"number": fields.Char("Number",required=True,search=True),
|
"number": fields.Char("Number",required=True,search=True),
|
||||||
"name": fields.Char("Name Surname",required=True,search=True),
|
"name": fields.Char("Name",required=True,search=True),
|
||||||
"date": fields.Date("Create Date",required=True,search=True),
|
"date": fields.Date("Create Date",required=True,search=True),
|
||||||
"birthday": fields.Date("BirthDay",required=True,search=True),
|
"birthday": fields.Date("BirthDay",required=True,search=True),
|
||||||
"telephone": fields.Char("Telephone",required=True,search=True),
|
"telephone": fields.Char("Telephone",required=True,search=True),
|
||||||
|
|
|
@ -10,38 +10,54 @@ class Patient(Model):
|
||||||
_audit_log=True
|
_audit_log=True
|
||||||
_name_field="name"
|
_name_field="name"
|
||||||
_multi_company=True
|
_multi_company=True
|
||||||
|
|
||||||
|
def _get_age(self,ids,context):
|
||||||
|
res={}
|
||||||
|
year_now=int(time.strftime("%Y"))
|
||||||
|
for obj in self.browse(ids):
|
||||||
|
age=0
|
||||||
|
if obj.birthday:
|
||||||
|
year_bd=int(obj.birthday[0:4])
|
||||||
|
age=year_now-year_bd
|
||||||
|
res[obj.id]=age
|
||||||
|
return res # -> {1: 30, 2: 45,.....}
|
||||||
|
|
||||||
_fields={
|
_fields={
|
||||||
"number": fields.Char("Number",required=True,search=True),
|
"number": fields.Char("Patient ID",required=True,search=True),
|
||||||
"name": fields.Char("Name Surname",required=True,search=True),
|
"first_name": fields.Char("First Name",required=True,search=True),
|
||||||
"date": fields.Date("Create Date",required=True,search=True),
|
"last_name": fields.Char("Last Name",required=False,search=True),
|
||||||
"birthday": fields.Date("BirthDay",required=True,search=True),
|
"date": fields.Date("Create Date",required=False,search=True),
|
||||||
"telephone": fields.Char("Telephone",required=True,search=True),
|
"birthday": fields.Date("BirthDay",required=False,search=True),
|
||||||
"mobile": fields.Char("Mobile",required=True,search=True),
|
"telephone": fields.Char("Telephone",required=False,search=True),
|
||||||
|
"mobile": fields.Char("Mobile",required=False,search=True),
|
||||||
"job": fields.Char("Job"),
|
"job": fields.Char("Job"),
|
||||||
"age": fields.Integer("Age"),
|
"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)"),
|
"weight": fields.Integer("Weight (cm)"),
|
||||||
"height": fields.Integer("Height (Kg)"),
|
"height": fields.Integer("Height (Kg)"),
|
||||||
"type": fields.Selection([("mg","Medical Govement"),("sc","Social Security"),("nhso","NHSO (30฿)"),("personal","Personal"),("other","Other")],"Type",required=True),
|
"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")],"ID From",required=True),
|
"card_type": fields.Selection([("iden_id","Identity Card"),("passport","Passport")],"Card Type",required=True),
|
||||||
'iden_id' : fields.Char("Identity ID"),
|
'iden_id' : fields.Char("Card No."),
|
||||||
"app_no": fields.Char("Application No."),
|
"app_no": fields.Char("Application No."),
|
||||||
"salary": fields.Float("Salary"),
|
"salary": fields.Selection([("20000","5,001-20,000"),("50000","20,001-50,000"),("100000","50,001-100,000"),("100001","100,000+")], "Salary"),
|
||||||
'exp_id' : fields.Date("Expiry Date"),
|
'exp_id' : fields.Date("Expiry Date"),
|
||||||
"state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status",required=True),
|
"state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status",required=False),
|
||||||
"addresses": fields.One2Many("address","related_id","Addresses"),
|
"addresses": fields.One2Many("address","related_id","Addresses"),
|
||||||
"gender": fields.Selection([("male","Male"),("female","Female")],"Gendel",required=True),
|
"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=True),
|
"marital_status": fields.Selection([("single","Single"),("marry","Marry"),("divorce","Divorce"),("separated","Saparated"),("widowed","Widowed")],"Marital Status",required=False),
|
||||||
"nationality": fields.Char("Nationality",search=True),
|
"nationality": fields.Char("Nationality",search=True),
|
||||||
"race": fields.Char("Race",search=True),
|
"race": fields.Char("Race",search=True),
|
||||||
"smoke": fields.Boolean("Smoke ?"),
|
"smoke": fields.Selection([("never","Never"),("stopped","Stopped"),("smoked","Smoked")],"Smoking"),
|
||||||
"first_hemodialysis": fields.Date("First time Hemodialysis",required=True),
|
"withdrawal" : fields.Selection([("social_security","Social Security"),("health_insurance","Health Insurance"),("etc","ETC.")],"Right of withdrawal"),
|
||||||
"hemodialysis": fields.Char("First Hemodialysis",required=True),
|
"first_treatment" : fields.Selection([("hd","HD"),("test","Test")], "First treatment"),
|
||||||
"clinic_after": fields.Selection([("small","Small"),("medium","Medium"),("large","Large")],"Clinic Lastime",required=True),
|
"first_hemodialysis": fields.Date("First time Hemodialysis",required=False),
|
||||||
"clinic_after_name": fields.Char("Clinic after name",required=True),
|
"hemodialysis": fields.Char("First Hemodialysis",required=False),
|
||||||
"first_permanent_vascular_access": fields.Date("First time Permanent Vascular",required=True),
|
"clinic_after": fields.Selection([("small","Small"),("medium","Medium"),("large","Large")],"Clinic Lastime",required=False),
|
||||||
"first_tenckhoff_catheters": fields.Date("First time Tenckhoff Catheters",required=True),
|
"clinic_after_name": fields.Char("Clinic after name",required=False),
|
||||||
"start_date_clinic": fields.Date("Start Date Clinic",required=True),
|
"first_permanent_vascular_access": fields.Date("First time Permanent Vascular",required=False),
|
||||||
"waiting_transplantation": fields.Boolean("Kidney Transplantation Waiting ?"),
|
"first_tenckhoff_catheters": fields.Date("First time Tenckhoff Catheters",required=False),
|
||||||
|
"start_date_clinic": fields.Date("Start Date Clinic",required=False),
|
||||||
|
"waiting_transplantation": fields.Selection([("yes","Yes"),("no","No")],"Kidney Transplantation Waiting ?"),
|
||||||
"who_transplantation": fields.Char("Who is Transplantation?"),
|
"who_transplantation": fields.Char("Who is Transplantation?"),
|
||||||
"reason_of_chronic_renal_failure": fields.Char("Reason chronic renal failure ?"),
|
"reason_of_chronic_renal_failure": fields.Char("Reason chronic renal failure ?"),
|
||||||
"ac_mi": fields.Boolean("Acute MI"),
|
"ac_mi": fields.Boolean("Acute MI"),
|
||||||
|
@ -72,6 +88,19 @@ class Patient(Model):
|
||||||
}
|
}
|
||||||
|
|
||||||
def _get_number(self,context={}):
|
def _get_number(self,context={}):
|
||||||
|
seq_name="clinic_patient"
|
||||||
|
seq_id=get_model("sequence").find_sequence(name=seq_name)
|
||||||
|
if not seq_id:
|
||||||
|
raise Exception("Sequence not found: '%s'"%seq_name)
|
||||||
|
while 1:
|
||||||
|
num=get_model("sequence").get_next_number(seq_id)
|
||||||
|
if not num:
|
||||||
|
return None
|
||||||
|
get_model("sequence").increment_number(seq_id)
|
||||||
|
return num
|
||||||
|
|
||||||
|
return
|
||||||
|
#XXXX
|
||||||
while 1:
|
while 1:
|
||||||
num=get_model("sequence").get_number("clinic_patient")
|
num=get_model("sequence").get_number("clinic_patient")
|
||||||
if not num:
|
if not num:
|
||||||
|
@ -91,7 +120,6 @@ class Patient(Model):
|
||||||
_order="date desc,number desc"
|
_order="date desc,number desc"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def void(self,ids,context={}):
|
def void(self,ids,context={}):
|
||||||
obj=self.browse(ids)[0]
|
obj=self.browse(ids)[0]
|
||||||
obj.write({"state":"voided"})
|
obj.write({"state":"voided"})
|
||||||
|
|
Loading…
Reference in New Issue