2015-03-04 07:42:18 +00:00
|
|
|
from netforce.model import Model, fields
|
|
|
|
|
|
|
|
class SettingAccountPatient(Model):
|
|
|
|
_name="clinic.setting.account.patient"
|
|
|
|
_string="Setting Account Patient"
|
|
|
|
|
|
|
|
_fields={
|
|
|
|
"setting_id": fields.Many2One("clinic.setting","Setting",required=True,on_delete="cascade"),
|
|
|
|
"patient_id": fields.Many2One("clinic.patient","Patient",domain=[["state","=","admit"]]),
|
|
|
|
'partner_id': fields.Many2One("partner","Contact"),
|
|
|
|
'type_id': fields.Many2One("clinic.patient.type","Type"),
|
2015-03-11 07:46:24 +00:00
|
|
|
'hn': fields.Char("HN"),
|
|
|
|
'card_no': fields.Char("ID Card",size=13),
|
2015-03-04 07:42:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
_order="type_id,patient_id"
|
|
|
|
|
|
|
|
SettingAccountPatient.register()
|