replace nurse, doctor to personal with diff type

conv_bal
watcha.h 2014-11-02 00:43:54 +07:00
parent 16fdf098e0
commit 62f2c584aa
4 changed files with 10 additions and 6 deletions

View File

@ -32,8 +32,7 @@ class GenVisit(Model):
'friday': fields.Boolean("Fridays"),
'sathurday': fields.Boolean("Sathurday"),
'sunday': fields.Boolean("Sunday"),
'doctor_id': fields.Many2One("clinic.doctor","Doctor"),
'nurse_id': fields.Many2One("clinic.nurse","Nurse"),
'doctor_id': fields.Many2One("clinic.personal","Doctor",domain=[['type','=','doctor']]),
'department_id': fields.Many2One("clinic.department","Department"),
'duration': fields.Integer("Duration (hrs)", function="_get_duration"),
"patient_type": fields.Selection([("mg","Medical Government"),("sc","Social Security"),("nhso","NHSO (30฿)"),("personal","Personal"),("others","Others")],"Patient Type"),

View File

@ -34,7 +34,7 @@ class HDCase(Model):
"time_stop": fields.DateTime("Time stop",required=True,search=True),
"date": fields.Date("Time stop",required=True,search=True),
"patient_id": fields.Many2One("clinic.patient","Patient",required=True,search=True),
"doctor_id": fields.Many2One("clinic.doctor","Doctor", required=False,search=True),
"nurse_id": fields.Many2One("clinic.personal","Approve By", domain=[['type','=','nurse']],required=True),
"department_id": fields.Many2One("clinic.department", "Department",search=True),
"wh_start": fields.Float("Wt.Kg start"),
"wh_stop": fields.Float("Wt.Kg stop"),

View File

@ -30,8 +30,8 @@ class Visit(Model):
"time_start": fields.DateTime("Time Start",required=True),
"time_stop": fields.DateTime("Time Stop",required=True),
"patient_id": fields.Many2One("clinic.patient","Patient",required=True,search=True),
"doctor_id": fields.Many2One("clinic.doctor","Doctor",search=True),
"nurse_id": fields.Many2One("clinic.nurse","Nurse",search=True),
"doctor_id": fields.Many2One("clinic.personal","Doctor", domain=[['type','=','doctor']],search=True),
"nurse_id": fields.Many2One("clinic.personal","Confirm By", domain=[['type','=','nurse']],search=True),
"department_id": fields.Many2One("clinic.department", "Department",search=True),
"comments": fields.One2Many("message","related_id","Comments"),
"company_id": fields.Many2One("company","Company"),
@ -64,7 +64,7 @@ class Visit(Model):
def _get_nurse(self,context={}):
user_id=get_active_user()
nurse_ids=get_model("clinic.nurse").search([['user_id','=',user_id]])
nurse_ids=get_model("clinic.personal").search([['user_id','=',user_id],['type','=','nurse']])
if nurse_ids:
return nurse_ids[0]
return None
@ -106,6 +106,7 @@ class Visit(Model):
obj=self.browse(ids)[0]
vals={
'patient_id': obj.patient_id.id,
'nurse_id': obj.nurse_id.id,
'department_id': obj.department_id.id,
'time_start': obj.time_start,
'time_stop': obj.time_stop,

View File

@ -5,6 +5,10 @@ cycle item:
list's nurse
list's patient & doctor
idea:
show popup to complete hd case
approve by nurse
after finish hd case -> show popup to check nurse and doctor after finish
formalar