clinic/netforce_clinic/models/patient_comorbidity_line.py

20 lines
593 B
Python
Raw Normal View History

2014-10-01 17:33:21 +00:00
import time
from netforce.model import Model, fields
class PatientComorbidityLine(Model):
_name="clinic.patient.comorbidity.line"
_string="Patient Patient Comorbidity Line"
_fields={
"patient_id": fields.Many2One("clinic.patient","Patient",required=True,on_delete="cascade"),
"comorbility_id": fields.Many2One("clinic.comorbidity","Comorbidity"),
"ans": fields.Selection([['yes','Yes'],['no','No']], "Answer"),
"analysis_date": fields.Date("Analysis Date"),
}
_defaults={
'ans': "no",
}
PatientComorbidityLine.register()