18 lines
593 B
Python
18 lines
593 B
Python
from netforce.model import Model, fields
|
|
|
|
class PatientComorbidity(Model):
|
|
_name="clinic.patient.comorbidity"
|
|
_string="Patient Patient Comorbidity"
|
|
_fields={
|
|
"patient_id": fields.Many2One("clinic.patient","Patient",required=True,on_delete="cascade",domain=[['state','=','admit']]),
|
|
"comorbility_id": fields.Many2One("clinic.comorbidity","Comorbidity"),
|
|
"ans": fields.Selection([['yes','Yes'],['no','No']], "Answer"),
|
|
"analysis_date": fields.Date("Analysis Date"),
|
|
}
|
|
|
|
_defaults={
|
|
'ans': "no",
|
|
}
|
|
|
|
PatientComorbidity.register()
|