~eduardo-bayardo-bias/bias-trunk/bias_trunk

« back to all changes in this revision

Viewing changes to medical_surgery/medical_surgery.py

  • Committer: Eduardo Bayardo
  • Date: 2011-06-23 21:44:20 UTC
  • Revision ID: eduardo@eduardo-20110623214420-w63z1yahu6bo8kw9
agregue vista de costos de movimientos de stock para tener traceabilidad de costo estandar en modulo bias_product_related_cost

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# coding=utf-8
 
2
 
 
3
#    Copyright (C) 2008-2010  Luis Falcon
 
4
 
 
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.
 
9
 
 
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.
 
14
 
 
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/>.
 
17
 
 
18
 
 
19
 
 
20
from osv import fields, osv
 
21
 
 
22
 
 
23
class surgery (osv.osv):
 
24
        _name = "medical.surgery"
 
25
        _description = "Surgery"
 
26
        _columns = {
 
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 ([
 
30
                                ('o','Optional'),
 
31
                                ('r','Required'),
 
32
                                ('u','Urgent'),
 
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'),
 
39
                }
 
40
 
 
41
surgery ()
 
42
 
 
43
 
 
44
# Add to the Medical patient_data class (medical.patient) the surgery field.
 
45
 
 
46
class medical_patient (osv.osv):
 
47
        _name = "medical.patient"
 
48
        _inherit = "medical.patient"
 
49
        _columns = {
 
50
                'surgery' : fields.many2many ('medical.surgery', 'patient_surgery_rel','patient_id','surgery_id', 'Surgeries'),
 
51
                
 
52
        }
 
53
 
 
54
medical_patient ()
 
55
 
 
56
 
 
57
 
 
58