clean
parent
918d2f1353
commit
bc40c35d9f
|
@ -2,7 +2,7 @@
|
||||||
<field name="string">Doctors</field>
|
<field name="string">Doctors</field>
|
||||||
<field name="view_cls">multi_view</field>
|
<field name="view_cls">multi_view</field>
|
||||||
<field name="model">clinic.doctor</field>
|
<field name="model">clinic.doctor</field>
|
||||||
<field name="tabs">[["All",[]],["Draft",[["state","=","draft"]]],["Active",[["state","=","active"]]],["Deactive",[["state","=","deactive"]]]]</field>
|
<field name="tabs">[["All",[]],["Temporaly",[["type","=","temporary"]]],["Permanent",[["type","=","permanent"]]]]</field>
|
||||||
<field name="modes">list,page,form</field>
|
<field name="modes">list,page,form</field>
|
||||||
<field name="menu">clinic_menu</field>
|
<field name="menu">clinic_menu</field>
|
||||||
</action>
|
</action>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<field name="string">Nurses</field>
|
<field name="string">Nurses</field>
|
||||||
<field name="view_cls">multi_view</field>
|
<field name="view_cls">multi_view</field>
|
||||||
<field name="model">clinic.nurse</field>
|
<field name="model">clinic.nurse</field>
|
||||||
<field name="tabs">[["All",[]],["Draft",[["state","=","draft"]]],["Active",[["state","=","active"]]],["Deactive",[["state","=","deactive"]]]]</field>
|
<field name="tabs">[["All",[]],["Temporaly",[["type","=","temporary"]]],["Permanent",[["type","=","permanent"]]]]</field>
|
||||||
<field name="modes">list,page,form</field>
|
<field name="modes">list,page,form</field>
|
||||||
<field name="menu">clinic_menu</field>
|
<field name="menu">clinic_menu</field>
|
||||||
</action>
|
</action>
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<action>
|
||||||
|
<field name="type">method</field>
|
||||||
|
<field name="model">clinic.hd.case</field>
|
||||||
|
<field name="method">view_hdcase</field>
|
||||||
|
</action>
|
|
@ -1,43 +1,26 @@
|
||||||
<form model="clinic.doctor">
|
<form model="clinic.doctor">
|
||||||
<head>
|
<head>
|
||||||
<field name="state"/>
|
<field name="type"/>
|
||||||
<button string="Options" dropdown="1">
|
<button string="Options" dropdown="1">
|
||||||
<item string="Send Confirm visit"/>
|
<item string="Item1"/>
|
||||||
</button>
|
</button>
|
||||||
</head>
|
</head>
|
||||||
<separator string="Doctor Information"/>
|
|
||||||
<group span="12" colunm="2">
|
|
||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
</group>
|
<field name="name"/>
|
||||||
<group span="12" colunm="2">
|
|
||||||
<field name="first_name"/>
|
|
||||||
<field name="last_name"/>
|
|
||||||
</group>
|
|
||||||
<group span="12" colunm="2">
|
|
||||||
<field name="card_id"/>
|
<field name="card_id"/>
|
||||||
<field name="card_expire"/>
|
<field name="card_expire"/>
|
||||||
</group>
|
<field name="cert_no"/>
|
||||||
<field name="number2"/>
|
<field name="cert_date"/>
|
||||||
<field name="licen_issued"/>
|
<field name="birthday"/>
|
||||||
<field name="birthday" span="12"/>
|
<field name="department_id"/>
|
||||||
<group span="12" colunm="2">
|
|
||||||
<field name="telephone"/>
|
<field name="telephone"/>
|
||||||
<field name="mobile"/>
|
<field name="mobile"/>
|
||||||
<field name="department_id"/>
|
<field name="type"/>
|
||||||
</group>
|
|
||||||
<related>
|
<related>
|
||||||
<field name="addresses"/>
|
<field name="addresses"/>
|
||||||
</related>
|
|
||||||
<related>
|
|
||||||
<field name="visits"/>
|
<field name="visits"/>
|
||||||
</related>
|
|
||||||
<related>
|
|
||||||
<field name="hd_cases"/>
|
<field name="hd_cases"/>
|
||||||
</related>
|
|
||||||
<related>
|
|
||||||
<field name="patients"/>
|
<field name="patients"/>
|
||||||
</related>
|
|
||||||
<related>
|
|
||||||
<field name="comments"/>
|
<field name="comments"/>
|
||||||
</related>
|
</related>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
<list model="clinic.doctor">
|
<list model="clinic.doctor">
|
||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
<field name="first_name"/>
|
<field name="name"/>
|
||||||
<field name="last_name"/>
|
<field name="type"/>
|
||||||
<field name="date"/>
|
|
||||||
<field name="state"/>
|
|
||||||
</list>
|
</list>
|
||||||
|
|
|
@ -1,42 +1,26 @@
|
||||||
<form model="clinic.nurse">
|
<form model="clinic.nurse">
|
||||||
<head>
|
<head>
|
||||||
<field name="state"/>
|
<field name="type"/>
|
||||||
<button string="Options" dropdown="1">
|
<button string="Options" dropdown="1">
|
||||||
<item string="Item1"/>
|
<item string="Item1"/>
|
||||||
</button>
|
</button>
|
||||||
</head>
|
</head>
|
||||||
<group span="12" colunm="2">
|
|
||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
</group>
|
|
||||||
<group span="12" colunm="2">
|
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="lname"/>
|
|
||||||
</group>
|
|
||||||
<group span="12" colunm="2">
|
|
||||||
<field name="card_id"/>
|
<field name="card_id"/>
|
||||||
<field name="card_expire"/>
|
<field name="card_expire"/>
|
||||||
</group>
|
<field name="cert_no"/>
|
||||||
<field name="number2"/>
|
<field name="cert_date"/>
|
||||||
<field name="licen_issued"/>
|
<field name="birthday"/>
|
||||||
<field name="birthday" span="12"/>
|
<field name="department_id"/>
|
||||||
<group span="12" colunm="2">
|
|
||||||
<field name="telephone"/>
|
<field name="telephone"/>
|
||||||
<field name="mobile"/>
|
<field name="mobile"/>
|
||||||
<field name="department_id"/>
|
<field name="type"/>
|
||||||
</group>
|
|
||||||
<related>
|
<related>
|
||||||
<field name="addresses"/>
|
<field name="addresses"/>
|
||||||
</related>
|
|
||||||
<related>
|
|
||||||
<field name="visits"/>
|
<field name="visits"/>
|
||||||
</related>
|
|
||||||
<related>
|
|
||||||
<field name="hd_cases"/>
|
<field name="hd_cases"/>
|
||||||
</related>
|
|
||||||
<related>
|
|
||||||
<field name="patients"/>
|
<field name="patients"/>
|
||||||
</related>
|
|
||||||
<related>
|
|
||||||
<field name="comments"/>
|
<field name="comments"/>
|
||||||
</related>
|
</related>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<list model="clinic.nurse">
|
<list model="clinic.nurse">
|
||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="state"/>
|
<field name="type"/>
|
||||||
</list>
|
</list>
|
||||||
|
|
|
@ -7,40 +7,25 @@
|
||||||
</head>
|
</head>
|
||||||
<tabs>
|
<tabs>
|
||||||
<tab string="Patient's Data">
|
<tab string="Patient's Data">
|
||||||
<group span="12" colunm="1">
|
|
||||||
<field name="type"/>
|
|
||||||
</group>
|
|
||||||
<group span="12" colunm="1">
|
|
||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
<field name="date"/>
|
<field name="type"/>
|
||||||
</group>
|
<field name="reg_date"/>
|
||||||
<group span="12" colunm="2">
|
<field name="name"/>
|
||||||
<field name="first_name"/>
|
|
||||||
<field name="last_name"/>
|
|
||||||
</group>
|
|
||||||
<group span="12" colunm="2">
|
|
||||||
<field name="birthday"/>
|
<field name="birthday"/>
|
||||||
<field name="age"/>
|
<field name="age"/>
|
||||||
</group>
|
|
||||||
<group span="12" colunm="2">
|
|
||||||
<field name="card_type"/>
|
<field name="card_type"/>
|
||||||
</group>
|
<field name="card_no"/>
|
||||||
<group span="12" colunm="2">
|
<field name="exp_date"/>
|
||||||
<field name="iden_id"/>
|
|
||||||
<field name="exp_id"/>
|
|
||||||
</group>
|
|
||||||
<field name="telephone"/>
|
<field name="telephone"/>
|
||||||
<field name="mobile"/>
|
<field name="mobile"/>
|
||||||
<field name="gender" span="12"/>
|
<field name="gender"/>
|
||||||
<field name="marital_status" span="12"/>
|
<field name="marital_status"/>
|
||||||
<group span="12" colunm="2">
|
|
||||||
<field name="nationality"/>
|
<field name="nationality"/>
|
||||||
<field name="race"/>
|
<field name="race"/>
|
||||||
</group>
|
<field name="graduation"/>
|
||||||
<field name="graduation" span="12"/>
|
<field name="job"/>
|
||||||
<field name="job" span="12"/>
|
<field name="weight"/>
|
||||||
<field name="weight" span="12"/>
|
<field name="height"/>
|
||||||
<field name="height" span="12"/>
|
|
||||||
</tab>
|
</tab>
|
||||||
<tab string="Patient's Data +">
|
<tab string="Patient's Data +">
|
||||||
<field name="smoke" span="12"/>
|
<field name="smoke" span="12"/>
|
||||||
|
@ -114,14 +99,8 @@
|
||||||
</tabs>
|
</tabs>
|
||||||
<related>
|
<related>
|
||||||
<field name="addresses"/>
|
<field name="addresses"/>
|
||||||
</related>
|
|
||||||
<related>
|
|
||||||
<field name="visits"/>
|
|
||||||
</related>
|
|
||||||
<related>
|
|
||||||
<field name="hd_cases"/>
|
<field name="hd_cases"/>
|
||||||
</related>
|
<field name="visits"/>
|
||||||
<related>
|
|
||||||
<field name="comments"/>
|
<field name="comments"/>
|
||||||
</related>
|
</related>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<list model="clinic.patient">
|
<list model="clinic.patient">
|
||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
<field name="first_name"/>
|
<field name="name"/>
|
||||||
<field name="last_name"/>
|
<field name="reg_date"/>
|
||||||
<field name="date"/>
|
<field name="type"/>
|
||||||
<field name="state"/>
|
|
||||||
</list>
|
</list>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<separator string="Visit Info"/>
|
<separator string="Visit Info"/>
|
||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
<field name="department"/>
|
<field name="department"/>
|
||||||
<field name="date"/>
|
<field name="visit_date"/>
|
||||||
<field name="cycle"/>
|
<field name="cycle"/>
|
||||||
<field name="patient_id"/>
|
<field name="patient_id"/>
|
||||||
<field name="doctor_id"/>
|
<field name="doctor_id"/>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<list model="clinic.visit">
|
<list model="clinic.visit">
|
||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
<field name="date"/>
|
<field name="visit_date"/>
|
||||||
<field name="cycle"/>
|
<field name="cycle"/>
|
||||||
<field name="patient_id"/>
|
<field name="patient_id"/>
|
||||||
<field name="doctor_id"/>
|
<field name="doctor_id"/>
|
||||||
|
|
|
@ -7,22 +7,18 @@ class Doctor(Model):
|
||||||
_name="clinic.doctor"
|
_name="clinic.doctor"
|
||||||
_string="Doctor"
|
_string="Doctor"
|
||||||
_audit_log=True
|
_audit_log=True
|
||||||
_name_field="name"
|
|
||||||
_multi_company=True
|
_multi_company=True
|
||||||
_fields={
|
_fields={
|
||||||
"number": fields.Char("Doctor No.",required=True,search=True),
|
"number": fields.Char("Doctor No.",required=True,search=True),
|
||||||
"first_name": fields.Char("First name",required=True,search=True),
|
"name": fields.Char("Name",required=True,search=True),
|
||||||
"last_name" : fields.Char("Last name",required=False),
|
|
||||||
"date": fields.Date("Create Date",required=True,search=True),
|
|
||||||
"card_id" : fields.Char("Identity ID"),
|
"card_id" : fields.Char("Identity ID"),
|
||||||
"card_expire" : fields.Date("Expire Date"),
|
"card_expire" : fields.Date("Expire Date"),
|
||||||
"birthday": fields.Date("Date of birth",required=False,search=True),
|
"birthday": fields.Date("Date of Birth",search=True),
|
||||||
"telephone": fields.Char("Telephone",required=False,search=True),
|
"telephone": fields.Char("Telephone",search=True),
|
||||||
"department": fields.Selection([("temporary","Temporary"),("permanent","Permanent")], "Dapartment"),
|
"type": fields.Selection([("temporary","Temporary"),("permanent","Permanent")],"Type"),
|
||||||
"mobile": fields.Char("Mobile",required=False,search=True),
|
"mobile": fields.Char("Mobile",required=False,search=True),
|
||||||
#"licen" : fields.char("licens medicine No."),
|
"cert_no" : fields.Char("Certificate No."),
|
||||||
"number2" : fields.Char("Certificate No."),
|
"cert_date" : fields.Date("Certificate Date"),
|
||||||
"licen_issued" : fields.Date("Issued on"),
|
|
||||||
"birthday": fields.Date("BirthDay",search=True),
|
"birthday": fields.Date("BirthDay",search=True),
|
||||||
"telephone": fields.Char("Telephone",search=True),
|
"telephone": fields.Char("Telephone",search=True),
|
||||||
"department_id": fields.Many2One("clinic.department", "Department",search=True),
|
"department_id": fields.Many2One("clinic.department", "Department",search=True),
|
||||||
|
@ -31,8 +27,8 @@ class Doctor(Model):
|
||||||
"addresses": fields.One2Many("address","related_id","Addresses"),
|
"addresses": fields.One2Many("address","related_id","Addresses"),
|
||||||
"comments": fields.One2Many("message","related_id","Comments"),
|
"comments": fields.One2Many("message","related_id","Comments"),
|
||||||
"patients": fields.Many2Many("clinic.patient","Patients"),
|
"patients": fields.Many2Many("clinic.patient","Patients"),
|
||||||
"visits" : fields.One2Many("clinic.visit","doctor_id","Visits"),
|
"visits": fields.One2Many("clinic.visit","nurse_id","Visits"),
|
||||||
"hd_cases" : fields.One2Many("clinic.hd.case","doctor_id","HD Cases"),
|
"hd_cases": fields.One2Many("clinic.hd.case","nurse_id","HD cases"),
|
||||||
"company_id": fields.Many2One("company","Company"),
|
"company_id": fields.Many2One("company","Company"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,22 +44,17 @@ class Doctor(Model):
|
||||||
|
|
||||||
|
|
||||||
_defaults={
|
_defaults={
|
||||||
"state": "draft",
|
"type": "temporary",
|
||||||
"date": lambda *a: time.strftime("%Y-%m-%d"),
|
"date": lambda *a: time.strftime("%Y-%m-%d"),
|
||||||
"number": _get_number,
|
"number": _get_number,
|
||||||
"company_id": lambda *a: get_active_company(),
|
"company_id": lambda *a: get_active_company(),
|
||||||
}
|
}
|
||||||
_order="date desc,number desc"
|
_order="date desc,number desc"
|
||||||
|
|
||||||
def name_get(self,ids,context={}):
|
|
||||||
vals=[]
|
|
||||||
for obj in self.browse(ids):
|
|
||||||
name='%s %s'%(obj.first_name or "", obj.last_name or "")
|
|
||||||
vals.append((obj.id,name))
|
|
||||||
return vals
|
|
||||||
|
|
||||||
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"})
|
||||||
|
|
||||||
|
|
||||||
Doctor.register()
|
Doctor.register()
|
||||||
|
|
|
@ -205,4 +205,12 @@ class HDcase(Model):
|
||||||
}
|
}
|
||||||
return vals
|
return vals
|
||||||
|
|
||||||
|
def view_hdcase(self,ids,context={}):
|
||||||
|
return {
|
||||||
|
'name': 'clinic_hd_case',
|
||||||
|
'mode': 'form',
|
||||||
|
'form_view_xml': 'clinic_hd_case_form',
|
||||||
|
'active_id': ids[0],
|
||||||
|
}
|
||||||
|
|
||||||
HDcase.register()
|
HDcase.register()
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
from netforce.model import Model, fields, get_model
|
|
||||||
from netforce.utils import get_data_path
|
|
||||||
import time
|
import time
|
||||||
from netforce.access import get_active_user
|
|
||||||
|
from netforce.model import Model, fields, get_model
|
||||||
from netforce.access import get_active_company
|
from netforce.access import get_active_company
|
||||||
|
|
||||||
class Nurse(Model):
|
class Nurse(Model):
|
||||||
|
@ -12,17 +11,15 @@ class Nurse(Model):
|
||||||
_multi_company=True
|
_multi_company=True
|
||||||
_fields={
|
_fields={
|
||||||
"number": fields.Char("Nurse No.",required=True,search=True),
|
"number": fields.Char("Nurse No.",required=True,search=True),
|
||||||
"name": fields.Char("First name",required=True,search=True),
|
"name": fields.Char("Name",required=True,search=True),
|
||||||
#"last_name" : fields.char("Last name"),
|
|
||||||
"lname" : fields.Char("Last name"),
|
|
||||||
"card_id" : fields.Char("Identity ID"),
|
"card_id" : fields.Char("Identity ID"),
|
||||||
"card_expire" : fields.Date("Expire Date"),
|
"card_expire" : fields.Date("Expire Date"),
|
||||||
"birthday": fields.Date("Date of Birth",search=True),
|
"birthday": fields.Date("Date of Birth",search=True),
|
||||||
"telephone": fields.Char("Telephone",search=True),
|
"telephone": fields.Char("Telephone",search=True),
|
||||||
"department": fields.Selection([("temporary","Temporary"),("permanent","Permanent")],"Department"),
|
"type": fields.Selection([("temporary","Temporary"),("permanent","Permanent")],"Type"),
|
||||||
"mobile": fields.Char("Mobile",required=False,search=True),
|
"mobile": fields.Char("Mobile",required=False,search=True),
|
||||||
"number2" : fields.Char("Certificate No."),
|
"cert_no" : fields.Char("Certificate No."),
|
||||||
"licen_issued" : fields.Date("Issued on"),
|
"cert_date" : fields.Date("Certificate Date"),
|
||||||
"birthday": fields.Date("BirthDay",search=True),
|
"birthday": fields.Date("BirthDay",search=True),
|
||||||
"telephone": fields.Char("Telephone",search=True),
|
"telephone": fields.Char("Telephone",search=True),
|
||||||
"department_id": fields.Many2One("clinic.department", "Department",search=True),
|
"department_id": fields.Many2One("clinic.department", "Department",search=True),
|
||||||
|
@ -48,7 +45,7 @@ class Nurse(Model):
|
||||||
|
|
||||||
|
|
||||||
_defaults={
|
_defaults={
|
||||||
"state": "draft",
|
"type": "temporary",
|
||||||
"date": lambda *a: time.strftime("%Y-%m-%d"),
|
"date": lambda *a: time.strftime("%Y-%m-%d"),
|
||||||
"number": _get_number,
|
"number": _get_number,
|
||||||
"company_id": lambda *a: get_active_company(),
|
"company_id": lambda *a: get_active_company(),
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
from netforce.model import Model, fields, get_model
|
|
||||||
from netforce.utils import get_data_path
|
|
||||||
import time
|
import time
|
||||||
from netforce.access import get_active_user
|
|
||||||
|
from netforce.model import Model, fields, get_model
|
||||||
from netforce.access import get_active_company
|
from netforce.access import get_active_company
|
||||||
|
|
||||||
class Patient(Model):
|
class Patient(Model):
|
||||||
_name="clinic.patient"
|
_name="clinic.patient"
|
||||||
_string="Patient"
|
_string="Patient"
|
||||||
_audit_log=True
|
_audit_log=True
|
||||||
_name_field="name"
|
|
||||||
_multi_company=True
|
_multi_company=True
|
||||||
|
|
||||||
def _get_age(self,ids,context):
|
def _get_age(self,ids,context):
|
||||||
|
@ -23,11 +21,9 @@ class Patient(Model):
|
||||||
return res # -> {1: 30, 2: 45,.....}
|
return res # -> {1: 30, 2: 45,.....}
|
||||||
|
|
||||||
_fields={
|
_fields={
|
||||||
#Patient's Data
|
|
||||||
"number": fields.Char("Patient ID",required=True,search=True),
|
"number": fields.Char("Patient ID",required=True,search=True),
|
||||||
"first_name": fields.Char("First Name",required=True,search=True),
|
"name": fields.Char("Name",required=True,search=True),
|
||||||
"last_name": fields.Char("Last Name",required=False,search=True),
|
"reg_date": fields.Date("Reg.Date",required=False,search=True),
|
||||||
"date": fields.Date("Create Date",required=False,search=True),
|
|
||||||
"birthday": fields.Date("Date of birth",required=False,search=True),
|
"birthday": fields.Date("Date of birth",required=False,search=True),
|
||||||
"telephone": fields.Char("Telephone",required=False,search=True),
|
"telephone": fields.Char("Telephone",required=False,search=True),
|
||||||
"mobile": fields.Char("Mobile",required=False,search=True),
|
"mobile": fields.Char("Mobile",required=False,search=True),
|
||||||
|
@ -38,10 +34,10 @@ class Patient(Model):
|
||||||
"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 of treatment",required=False),
|
"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([("iden_id","Identity Card"),("passport","Passport")],"Card Type",required=True),
|
||||||
'iden_id' : fields.Char("Card No."),
|
'card_no' : fields.Char("Card No."),
|
||||||
"app_no": fields.Char("Application 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"),
|
"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_date' : fields.Date("Expiry Date"),
|
||||||
"state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status",required=False),
|
"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")],"Gender",required=False),
|
"gender": fields.Selection([("male","Male"),("female","Female")],"Gender",required=False),
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
from netforce.model import Model, fields, get_model
|
from netforce.model import Model, fields, get_model
|
||||||
from netforce.utils import get_data_path
|
|
||||||
import time
|
|
||||||
from netforce.access import get_active_user
|
|
||||||
from netforce.access import get_active_company
|
from netforce.access import get_active_company
|
||||||
|
|
||||||
class Visit(Model):
|
class Visit(Model):
|
||||||
|
@ -12,10 +9,10 @@ class Visit(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),
|
||||||
"patient_id": fields.Many2One("clinic.patient","Patients",required=True,search=True),
|
"patient_id": fields.Many2One("clinic.patient","Patient",required=True,search=True),
|
||||||
"doctor_id": fields.Many2One("clinic.doctor","Doctor",search=True),
|
"doctor_id": fields.Many2One("clinic.doctor","Doctor",search=True),
|
||||||
"nurse_id": fields.Many2One("clinic.nurse","Nurse",search=True),
|
"nurse_id": fields.Many2One("clinic.nurse","Nurse",search=True),
|
||||||
"date": fields.Date("Visit Date",required=True,search=True),
|
"visit_date": fields.Date("Visit Date",required=True,search=True),
|
||||||
"department": fields.Char("Department",required=False,search=True),
|
"department": fields.Char("Department",required=False,search=True),
|
||||||
"cycle": fields.Selection([("1","One"),("2","Two"),("3","Tree"),("4","Four")],"Cycle",required=True),
|
"cycle": fields.Selection([("1","One"),("2","Two"),("3","Tree"),("4","Four")],"Cycle",required=True),
|
||||||
"state": fields.Selection([("pending","Pending"),("confirmed","Confirmed"),("canceled","Canceled")],"Status",required=True),
|
"state": fields.Selection([("pending","Pending"),("confirmed","Confirmed"),("canceled","Canceled")],"Status",required=True),
|
||||||
|
|
Loading…
Reference in New Issue