replace nurse, doctor to personal with diff type
parent
16fdf098e0
commit
62f2c584aa
|
@ -32,8 +32,7 @@ class GenVisit(Model):
|
||||||
'friday': fields.Boolean("Fridays"),
|
'friday': fields.Boolean("Fridays"),
|
||||||
'sathurday': fields.Boolean("Sathurday"),
|
'sathurday': fields.Boolean("Sathurday"),
|
||||||
'sunday': fields.Boolean("Sunday"),
|
'sunday': fields.Boolean("Sunday"),
|
||||||
'doctor_id': fields.Many2One("clinic.doctor","Doctor"),
|
'doctor_id': fields.Many2One("clinic.personal","Doctor",domain=[['type','=','doctor']]),
|
||||||
'nurse_id': fields.Many2One("clinic.nurse","Nurse"),
|
|
||||||
'department_id': fields.Many2One("clinic.department","Department"),
|
'department_id': fields.Many2One("clinic.department","Department"),
|
||||||
'duration': fields.Integer("Duration (hrs)", function="_get_duration"),
|
'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"),
|
"patient_type": fields.Selection([("mg","Medical Government"),("sc","Social Security"),("nhso","NHSO (30฿)"),("personal","Personal"),("others","Others")],"Patient Type"),
|
||||||
|
|
|
@ -34,7 +34,7 @@ class HDCase(Model):
|
||||||
"time_stop": fields.DateTime("Time stop",required=True,search=True),
|
"time_stop": fields.DateTime("Time stop",required=True,search=True),
|
||||||
"date": fields.Date("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),
|
"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),
|
"department_id": fields.Many2One("clinic.department", "Department",search=True),
|
||||||
"wh_start": fields.Float("Wt.Kg start"),
|
"wh_start": fields.Float("Wt.Kg start"),
|
||||||
"wh_stop": fields.Float("Wt.Kg stop"),
|
"wh_stop": fields.Float("Wt.Kg stop"),
|
||||||
|
|
|
@ -30,8 +30,8 @@ class Visit(Model):
|
||||||
"time_start": fields.DateTime("Time Start",required=True),
|
"time_start": fields.DateTime("Time Start",required=True),
|
||||||
"time_stop": fields.DateTime("Time Stop",required=True),
|
"time_stop": fields.DateTime("Time Stop",required=True),
|
||||||
"patient_id": fields.Many2One("clinic.patient","Patient",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.personal","Doctor", domain=[['type','=','doctor']],search=True),
|
||||||
"nurse_id": fields.Many2One("clinic.nurse","Nurse",search=True),
|
"nurse_id": fields.Many2One("clinic.personal","Confirm By", domain=[['type','=','nurse']],search=True),
|
||||||
"department_id": fields.Many2One("clinic.department", "Department",search=True),
|
"department_id": fields.Many2One("clinic.department", "Department",search=True),
|
||||||
"comments": fields.One2Many("message","related_id","Comments"),
|
"comments": fields.One2Many("message","related_id","Comments"),
|
||||||
"company_id": fields.Many2One("company","Company"),
|
"company_id": fields.Many2One("company","Company"),
|
||||||
|
@ -64,7 +64,7 @@ class Visit(Model):
|
||||||
|
|
||||||
def _get_nurse(self,context={}):
|
def _get_nurse(self,context={}):
|
||||||
user_id=get_active_user()
|
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:
|
if nurse_ids:
|
||||||
return nurse_ids[0]
|
return nurse_ids[0]
|
||||||
return None
|
return None
|
||||||
|
@ -106,6 +106,7 @@ class Visit(Model):
|
||||||
obj=self.browse(ids)[0]
|
obj=self.browse(ids)[0]
|
||||||
vals={
|
vals={
|
||||||
'patient_id': obj.patient_id.id,
|
'patient_id': obj.patient_id.id,
|
||||||
|
'nurse_id': obj.nurse_id.id,
|
||||||
'department_id': obj.department_id.id,
|
'department_id': obj.department_id.id,
|
||||||
'time_start': obj.time_start,
|
'time_start': obj.time_start,
|
||||||
'time_stop': obj.time_stop,
|
'time_stop': obj.time_stop,
|
||||||
|
|
|
@ -5,6 +5,10 @@ cycle item:
|
||||||
list's nurse
|
list's nurse
|
||||||
list's patient & doctor
|
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
|
after finish hd case -> show popup to check nurse and doctor after finish
|
||||||
|
|
||||||
formalar
|
formalar
|
||||||
|
|
Loading…
Reference in New Issue