2014-10-01 17:33:21 +00:00
|
|
|
from netforce.model import Model, fields
|
|
|
|
|
2014-11-05 07:22:23 +00:00
|
|
|
class PatientComorbidity(Model):
|
|
|
|
_name="clinic.patient.comorbidity"
|
|
|
|
_string="Patient Patient Comorbidity"
|
2014-10-01 17:33:21 +00:00
|
|
|
_fields={
|
2015-03-02 04:03:07 +00:00
|
|
|
"patient_id": fields.Many2One("clinic.patient","Patient",required=True,on_delete="cascade",domain=[['state','=','admit']]),
|
2014-10-01 17:33:21 +00:00
|
|
|
"comorbility_id": fields.Many2One("clinic.comorbidity","Comorbidity"),
|
|
|
|
"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
|
|
|
PatientComorbidity.register()
|