clinic/netforce_clinic/models/patient_morbidity.py

18 lines
548 B
Python
Raw Normal View History

2014-10-01 17:33:21 +00:00
from netforce.model import Model, fields
2014-11-05 07:22:23 +00:00
class PatientMorbidity(Model):
_name="clinic.patient.morbidity"
_string="Patient Patient Morbidity"
2014-10-01 17:33:21 +00:00
_fields={
"patient_id": fields.Many2One("clinic.patient","Patient",required=True,on_delete="cascade"),
2014-11-05 07:22:23 +00:00
"morbility_id": fields.Many2One("clinic.morbidity","Morbidity"),
2014-10-01 17:33:21 +00:00
"ans": fields.Selection([['yes','Yes'],['no','No']], "Answer"),
"analysis_date": fields.Date("Analysis Date"),
}
_defaults={
'ans': "no",
}
2014-11-05 07:22:23 +00:00
PatientMorbidity.register()