18 lines
		
	
	
		
			568 B
		
	
	
	
		
			Python
		
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			568 B
		
	
	
	
		
			Python
		
	
	
| from netforce.model import Model, fields
 | |
| 
 | |
| class PatientMorbidityLine(Model):
 | |
|     _name="clinic.patient.morbidity.line"
 | |
|     _string="Patient Patient Morbidity Line"
 | |
|     _fields={
 | |
|         "patient_id": fields.Many2One("clinic.patient","Patient",required=True,on_delete="cascade"),
 | |
|         "morbility_id": fields.Many2One("clinic.comorbidity","Morbidity"),
 | |
|         "ans": fields.Selection([['yes','Yes'],['no','No']], "Answer"),
 | |
|         "analysis_date": fields.Date("Analysis Date"),
 | |
|     }
 | |
|     
 | |
|     _defaults={
 | |
|         'ans': "no",
 | |
|     }
 | |
| 
 | |
| PatientMorbidityLine.register()
 |