3
# Copyright (C) 2008-2010 Luis Falcon
5
# This program is free software: you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation, either version 3 of the License, or
8
# (at your option) any later version.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with this program. If not, see <http://www.gnu.org/licenses/>.
20
from osv import fields, osv
23
class surgery (osv.osv):
24
_name = "medical.surgery"
25
_description = "Surgery"
27
'name' : fields.many2one ('medical.procedure','Code', help="Procedure Code, for example ICD-10-PCS Code 7-character string"),
28
'pathology' : fields.many2one ('medical.pathology','Base condition', help="Base Condition / Reason"),
29
'classification' : fields.selection ([
33
], 'Surgery Classification', select=True),
34
'surgeon' : fields.many2one('medical.physician','Surgeon', help="Surgeon who did the procedure"),
35
'date': fields.datetime ('Date of the surgery'),
36
'age': fields.char ('Patient age',size=3,help='Patient age at the moment of the surgery. Can be estimative'),
37
'description' : fields.char ('Description', size=128),
38
'extra_info' : fields.text ('Extra Info'),
44
# Add to the Medical patient_data class (medical.patient) the surgery field.
46
class medical_patient (osv.osv):
47
_name = "medical.patient"
48
_inherit = "medical.patient"
50
'surgery' : fields.many2many ('medical.surgery', 'patient_surgery_rel','patient_id','surgery_id', 'Surgeries'),