2015-01-15 07:37:36 +00:00
|
|
|
from netforce.model import Model, fields
|
|
|
|
|
|
|
|
class PatientCycle(Model):
|
|
|
|
_name="clinic.patient.cycle"
|
|
|
|
_string="Patient Cycle"
|
|
|
|
_key=['patient_id','cycle_id','day']
|
|
|
|
|
|
|
|
_fields={
|
|
|
|
"patient_id": fields.Many2One('clinic.patient',"Patient",required=True,on_delete="cascade",search=True),
|
|
|
|
"cycle_id": fields.Many2One('clinic.cycle',"Cycle",search=True),
|
2015-01-15 08:45:11 +00:00
|
|
|
"department_id": fields.Many2One('clinic.department',"Department",search=True),
|
2015-01-16 04:00:24 +00:00
|
|
|
'day': fields.Selection([('mon', 'Monday'), ('tue','Tuesday'), ('wed','Wedsday'),('thu','Thursday'),('fri','Friday'),('sat','Satherday'),('sun','Sunday')], 'Day',search=True),
|
2015-01-15 07:37:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
PatientCycle.register()
|