conv_bal
watcha.h 2014-10-01 23:14:52 +07:00
parent f54fa28c75
commit 1ee80f051a
24 changed files with 269 additions and 125 deletions

View File

@ -0,0 +1,6 @@
<action>
<field name="string">Graduations</field>
<field name="view_cls">multi_view</field>
<field name="model">clinic.graduation</field>
<field name="menu">clinic_menu</field>
</action>

View File

@ -0,0 +1,6 @@
<action>
<field name="string">Nationalities</field>
<field name="view_cls">multi_view</field>
<field name="model">clinic.nation</field>
<field name="menu">clinic_menu</field>
</action>

View File

@ -2,6 +2,6 @@
<field name="string">Patients</field>
<field name="view_cls">multi_view</field>
<field name="model">clinic.patient</field>
<field name="tabs">[["All",[]],["Medical Goverment",[["type","=","mg"]]],["Social Security",[["type","=","sc"]]],["NHSO(30$)",[["type","=","nhso"]]],["Personal",[["type","=","personal"]]],["Other",[["type","=","other"]]]]</field>
<field name="tabs">[["All",[]],["Medical Goverment",[["type","=","mg"]]],["Social Security",[["type","=","sc"]]],["NHSO(30฿)",[["type","=","nhso"]]],["Personal",[["type","=","personal"]]],["Others",[["type","=","other"]]]]</field>
<field name="menu">clinic_menu</field>
</action>

View File

@ -0,0 +1,6 @@
<action>
<field name="string">Races</field>
<field name="view_cls">multi_view</field>
<field name="model">clinic.race</field>
<field name="menu">clinic_menu</field>
</action>

View File

@ -2,22 +2,36 @@
<head>
<field name="type"/>
<button string="Options" dropdown="1">
<item string="Item1"/>
<item string="Copy"/>
</button>
</head>
<field name="number"/>
<tabs>
<tab string="General">
<group span="6" columns="1">
<field name="type" required="1"/>
<field name="name"/>
<field name="card_id"/>
<field name="card_expire"/>
<field name="cert_no"/>
<field name="cert_date"/>
<field name="birthday"/>
<field name="number"/>
<field name="identification"/>
<field name="expiry_card"/>
<field name="department_id"/>
<field name="telephone"/>
<field name="birthday"/>
</group>
<group span="6" columns="1">
<field name="picture"/>
<field name="user_id"/>
<field name="email"/>
<field name="mobile"/>
<field name="type"/>
<field name="phone"/>
</group>
<separator string="Address Information"/>
<field name="addresses" view="form_list"/>
</tab>
<tab string="Professional Information">
<field name="prof_license"/>
<field name="prof_license_date"/>
</tab>
</tabs>
<related>
<field name="addresses"/>
<field name="visits"/>
<field name="hd_cases"/>
<field name="patients"/>

View File

@ -0,0 +1,3 @@
<form model="clinic.education">
<field name="name"/>
</form>

View File

@ -0,0 +1,3 @@
<list model="clinic.education">
<field name="name"/>
</list>

View File

@ -0,0 +1,3 @@
<form model="clinic.graduation">
<field name="name"/>
</form>

View File

@ -0,0 +1,3 @@
<list model="clinic.graduation">
<field name="name"/>
</list>

View File

@ -10,6 +10,9 @@
</item>
<item string="Settings">
<item string="Departments" action="clinic_department"/>
<item string="Graduations" action="clinic_grade"/>
<item string="Nationalities" action="clinic_nation"/>
<item string="Races" action="clinic_race"/>
<item string="Clinic Setting" action="clinic_setting"/>
</item>
</menu>

View File

@ -0,0 +1,3 @@
<form model="clinic.nation">
<field name="name"/>
</form>

View File

@ -0,0 +1,3 @@
<list model="clinic.nation">
<field name="name"/>
</list>

View File

@ -2,22 +2,36 @@
<head>
<field name="type"/>
<button string="Options" dropdown="1">
<item string="Item1"/>
<item string="Copy"/>
</button>
</head>
<field name="number"/>
<tabs>
<tab string="General">
<group span="6" columns="1">
<field name="type" required="1"/>
<field name="name"/>
<field name="card_id"/>
<field name="card_expire"/>
<field name="cert_no"/>
<field name="cert_date"/>
<field name="birthday"/>
<field name="number"/>
<field name="identification"/>
<field name="expiry_card"/>
<field name="department_id"/>
<field name="telephone"/>
<field name="birthday"/>
</group>
<group span="6" columns="1">
<field name="picture"/>
<field name="user_id"/>
<field name="email"/>
<field name="mobile"/>
<field name="type"/>
<field name="phone"/>
</group>
<separator string="Address Information"/>
<field name="addresses" view="form_list"/>
</tab>
<tab string="Professional Information">
<field name="prof_license"/>
<field name="prof_license_date"/>
</tab>
</tabs>
<related>
<field name="addresses"/>
<field name="visits"/>
<field name="hd_cases"/>
<field name="patients"/>

View File

@ -1,53 +1,57 @@
<form model="clinic.patient">
<head>
<field name="state"/>
<field name="type"/>
<button string="Options" dropdown="1">
<item string="Send Confirm visit"/>
</button>
</head>
<tabs>
<tab string="Personal Info">
<field name="number"/>
<field name="name"/>
<field name="type"/>
<field name="name"/>
<field name="reg_date"/>
<field name="job"/>
<field name="salary"/>
<field name="gender"/>
<field name="marital_status"/>
<tabs>
<tab string="General Information">
<group span="6" columns="1">
<field name="birthday"/>
<field name="age"/>
<field name="card_type"/>
<field name="card_no"/>
<field name="exp_date"/>
<field name="tel"/>
<field name="mobile"/>
<field name="gender"/>
<field name="marital_status"/>
<field name="nationality"/>
<field name="race"/>
<field name="graduation"/>
<field name="job"/>
<field name="picture"/>
<field name="phone"/>
<field name="email"/>
</group>
<group span="6" columns="1">
<field name="nation_id"/>
<field name="race_id"/>
<field name="grad_id"/>
<field name="weight"/>
<field name="height"/>
<field name="mobile"/>
</group>
<separator string="Address Information"/>
<field name="addresses" view="form_list"/>
</tab>
<tab string="Health Info">
<field name="smoke" span="12"/>
<field name="salary" span="12"/>
<field name="withdrawal" span="12"/>
<group span="12" colunm="2">
<tab string="Health Information">
<field name="smoke"/>
<field name="withdrawal"/>
<field name="first_hemodialysis"/>
<field name="hemodialysis"/>
</group>
<field name="first_treatment" span="12"/>
<group span="12" colunm="2">
<field name="first_treatment"/>
<field name="clinic_after"/>
<field name="clinic_after_name"/>
</group>
<field name="first_permanent_vascular_access" span="12"/>
<field name="first_tenckhoff_catheters" span="12"/>
<field name="start_date_clinic" span="12"/>
<field name="waiting_transplantation" span="12"/>
<field name="first_permanent_vascular_access"/>
<field name="first_tenckhoff_catheters"/>
<field name="start_date_clinic"/>
<field name="waiting_transplantation"/>
<field name="who_transplantation"/>
<field name="reason_of_chronic_renal_failure"/>
<separator string="Cause of chronic renal failure"/>
<group span="12" colunm="3">
</tab>
<tab string="Cause Of Chronic Renal Failure">
<field name="ac_mi"/>
<field name="co_an"/>
<field name="ce_ac"/>
@ -63,7 +67,6 @@
<field name="hyperucemia"/>
<field name="cga"/>
<field name="parathy"/>
</group>
</tab>
<tab string="Co-marbid">
<separator string="Co-morbidity, before RRT"/>
@ -94,7 +97,6 @@
</tab>
</tabs>
<related>
<field name="addresses"/>
<field name="hd_cases"/>
<field name="visits"/>
<field name="comments"/>

View File

@ -0,0 +1,3 @@
<form model="clinic.race">
<field name="name"/>
</form>

View File

@ -0,0 +1,3 @@
<list model="clinic.race">
<field name="name"/>
</list>

View File

@ -7,4 +7,8 @@ from . import clinic_hd_case_line
from . import clinic_hd_case_line_detail
from . import clinic_dialyzer
from . import clinic_department
from . import clinic_education
from . import clinic_setting
from . import clinic_graduation
from . import clinic_nation
from . import clinic_race

View File

@ -8,28 +8,41 @@ class Doctor(Model):
_string="Doctor"
_audit_log=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
_fields={
"number": fields.Char("Doctor No.",required=True,search=True),
"name": fields.Char("Name",required=True,search=True),
"card_id" : fields.Char("Identity ID"),
"card_expire" : fields.Date("Expire Date"),
"birthday": fields.Date("Date of Birth",search=True),
"telephone": fields.Char("Telephone",search=True),
"type": fields.Selection([("temporary","Temporary"),("permanent","Permanent")],"Type"),
"identification" : fields.Char("Identification"),
"expiry_card" : fields.Date("Expiry Card"),
"birthday": fields.Date("Birthday",search=True),
"age": fields.Integer("Age", function="_get_age"),
"type": fields.Selection([["temporary","Temporary"],["permanent","Permanent"]],"Type"),
"mobile": fields.Char("Mobile",required=False,search=True),
"cert_no" : fields.Char("Certificate No."),
"cert_date" : fields.Date("Certificate Date"),
"phone": fields.Char("Phone",search=True),
'email': fields.Char("Email"),
"prof_license" : fields.Char("Professional License."),
"prof_license_date" : fields.Date("Professional License Date"),
"birthday": fields.Date("BirthDay",search=True),
"telephone": fields.Char("Telephone",search=True),
"department_id": fields.Many2One("clinic.department", "Department",search=True),
"mobile": fields.Char("Mobile",search=True),
"state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status"),
"patients": fields.Many2Many("clinic.patient","Patients"),
"addresses": fields.One2Many("address","related_id","Addresses"),
"comments": fields.One2Many("message","related_id","Comments"),
"patients": fields.Many2Many("clinic.patient","Patients"),
"visits": fields.One2Many("clinic.visit","nurse_id","Visits"),
"hd_cases": fields.One2Many("clinic.hd.case","nurse_id","HD cases"),
"hd_cases": fields.One2Many("clinic.hd.case","nurse_id","HD Cases"),
"company_id": fields.Many2One("company","Company"),
"user_id": fields.Many2One("base.user","User"),
'picture': fields.File("Picture"),
}
def _get_number(self,context={}):

View File

@ -0,0 +1,11 @@
from netforce.model import Model, fields
class Education(Model):
_name="clinic.education"
_string="Education"
_fields={
"name": fields.Char("Name",required=True,search=True),
}
Education.register()

View File

@ -0,0 +1,11 @@
from netforce.model import Model, fields
class Graduation(Model):
_name="clinic.graduation"
_string="Graduation"
_fields={
"name": fields.Char("Name",required=True,search=True),
}
Graduation.register()

View File

@ -0,0 +1,11 @@
from netforce.model import Model, fields
class Nation(Model):
_name="clinic.nation"
_string="Nationality"
_fields={
"name": fields.Char("Name",required=True,search=True),
}
Nation.register()

View File

@ -7,30 +7,42 @@ class Nurse(Model):
_name="clinic.nurse"
_string="Nurse"
_audit_log=True
_name_field="name"
_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
_fields={
"number": fields.Char("Nurse No.",required=True,search=True),
"number": fields.Char("Doctor No.",required=True,search=True),
"name": fields.Char("Name",required=True,search=True),
"card_id" : fields.Char("Identity ID"),
"card_expire" : fields.Date("Expire Date"),
"birthday": fields.Date("Date of Birth",search=True),
"telephone": fields.Char("Telephone",search=True),
"type": fields.Selection([("temporary","Temporary"),("permanent","Permanent")],"Type"),
"identification" : fields.Char("Identification"),
"expiry_card" : fields.Date("Expiry Card"),
"birthday": fields.Date("Birthday",search=True),
"age": fields.Integer("Age", function="_get_age"),
"type": fields.Selection([["temporary","Temporary"],["permanent","Permanent"]],"Type"),
"mobile": fields.Char("Mobile",required=False,search=True),
"cert_no" : fields.Char("Certificate No."),
"cert_date" : fields.Date("Certificate Date"),
"phone": fields.Char("Phone",search=True),
'email': fields.Char("Email"),
"prof_license" : fields.Char("Professional License."),
"prof_license_date" : fields.Date("Professional License Date"),
"birthday": fields.Date("BirthDay",search=True),
"telephone": fields.Char("Telephone",search=True),
"department_id": fields.Many2One("clinic.department", "Department",search=True),
"mobile": fields.Char("Mobile",search=True),
"state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status"),
"patients": fields.Many2Many("clinic.patient","Patients"),
"addresses": fields.One2Many("address","related_id","Addresses"),
"comments": fields.One2Many("message","related_id","Comments"),
"patients": fields.Many2Many("clinic.patient","Patients"),
"visits": fields.One2Many("clinic.visit","nurse_id","Visits"),
"hd_cases": fields.One2Many("clinic.hd.case","nurse_id","HD cases"),
"hd_cases": fields.One2Many("clinic.hd.case","nurse_id","HD Cases"),
"company_id": fields.Many2One("company","Company"),
"user_id": fields.Many2One("base.user","User"),
'picture': fields.File("Picture"),
}
def _get_number(self,context={}):
@ -53,10 +65,4 @@ class Nurse(Model):
_order="date desc,number desc"
def void(self,ids,context={}):
obj=self.browse(ids)[0]
obj.write({"state":"voided"})
Nurse.register()

View File

@ -21,19 +21,20 @@ class Patient(Model):
return res # -> {1: 30, 2: 45,.....}
_fields={
"type": fields.Selection([("mg","Medical Govement"),("sc","Social Security"),("nhso","NHSO (30฿)"),("personal","Personal"),("other","Other")],"Patient Type",required=False),
"number": fields.Char("Patient No.",required=True,search=True),
"name": fields.Char("Name",required=True,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),
"birthday": fields.Date("Birthday",required=False,search=True),
"phone": fields.Char("Phone",required=False,search=True),
"mobile": fields.Char("Mobile",required=False,search=True),
"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"),
'picture': fields.File("Picture"),
'email': fields.Char("Email"),
"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_type": fields.Selection([("identification","Identification"),("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"),
@ -41,8 +42,9 @@ class Patient(Model):
"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),
"nationality": fields.Char("Nationality",search=True),
"race": fields.Char("Race",search=True),
"nation_id": fields.Many2One("clinic.nation","Nationality"),
"race_id": fields.Many2One("clinic.race","Race"),
"grad_id": fields.Many2One("clinic.graduation","Graduation"),
#Patient's +
"smoke": fields.Selection([("never","Never"),("stopped","Stopped"),("smoked","Smoked")],"Smoking"),
"withdrawal" : fields.Selection([("social_security","Social Security"),("health_insurance","Health Insurance"),("etc","ETC.")],"Right of withdrawal"),

View File

@ -0,0 +1,11 @@
from netforce.model import Model, fields
class Race(Model):
_name="clinic.race"
_string="Race"
_fields={
"name": fields.Char("Name",required=True,search=True),
}
Race.register()