Commits

Bruno Villasanti committed 557c20b Merge

Merge with default

Change select=1|2 to select=True

  • Participants
  • Parent commits 8f8b0f9, f9acb46
  • Branches unstable

Comments (0)

Files changed (5)

tryton/health_genetics/health_genetics.py

     _name = 'gnuhealth.disease.gene'
     _description = __doc__
 
-    name = fields.Char('Official Symbol', select='1')
-    long_name = fields.Char('Official Long Name', select='1')
+    name = fields.Char('Official Symbol', select=True)
+    long_name = fields.Char('Official Long Name', select=True)
     gene_id = fields.Char('Gene ID',
-        help="default code from NCBI Entrez database.", select='2')
+        help="default code from NCBI Entrez database.", select=True)
     chromosome = fields.Char('Affected Chromosome',
-        help="Name of the affected chromosome", select='2')
+        help="Name of the affected chromosome", select=True)
     location = fields.Char('Location', help="Locus of the chromosome")
     dominance = fields.Selection([
         ('d', 'dominant'),
         ('r', 'recessive'),
-        ], 'Dominance', select='2')
+        ], 'Dominance', select=True)
     info = fields.Text('Information', help="Name of the protein(s) affected")
 
     def get_rec_name(self, ids, name):
     _name = 'gnuhealth.patient.genetic.risk'
     _description = __doc__
 
-    patient = fields.Many2One('gnuhealth.patient', 'Patient', select='1')
+    patient = fields.Many2One('gnuhealth.patient', 'Patient', select=True)
     disease_gene = fields.Many2One('gnuhealth.disease.gene',
-        'Disease Gene', select='1')
+        'Disease Gene', select=True)
 
 PatientGeneticRisk()
 
     _name = 'gnuhealth.patient.family.diseases'
     _description = __doc__
 
-    patient = fields.Many2One('gnuhealth.patient', 'Patient', select='1')
-    name = fields.Many2One('gnuhealth.pathology', 'Disease', select='1')
+    patient = fields.Many2One('gnuhealth.patient', 'Patient', select=True)
+    name = fields.Many2One('gnuhealth.pathology', 'Disease', select=True)
     xory = fields.Selection([
         ('m', 'Maternal'),
         ('f', 'Paternal'),
-        ], 'Maternal or Paternal', select='1')
+        ], 'Maternal or Paternal', select=True)
 
     relative = fields.Selection([
         ('mother', 'Mother'),
         ], 'Relative',
         help="First degree = siblings, mother and father; second degree = " \
         "Uncles, nephews and Nieces; third degree = Grandparents and cousins",
-        select='1')
+        select=True)
 
 FamilyDiseases()
 

tryton/health_inpatient/health_inpatient.py

     _name = 'gnuhealth.inpatient.registration'
     _description = __doc__
 
-    name = fields.Char('Registration Code', readonly=True, select="2")
+    name = fields.Char('Registration Code', readonly=True, select=True)
     patient = fields.Many2One('gnuhealth.patient', 'Patient',
-     required=True, select="1")
+     required=True, select=True)
     admission_type = fields.Selection([
         ('routine', 'Routine'),
         ('maternity', 'Maternity'),
         ('elective', 'Elective'),
         ('urgent', 'Urgent'),
         ('emergency', 'Emergency'),
-        ], 'Admission type', required=True, select="1")
+        ], 'Admission type', required=True, select=True)
     hospitalization_date = fields.DateTime('Hospitalization date',
-        required=True, select="1")
+        required=True, select=True)
     discharge_date = fields.DateTime('Discharge date', required=True,
-     select="1")
+     select=True)
     attending_physician = fields.Many2One('gnuhealth.physician',
-        'Attending Physician',select="2")
+        'Attending Physician',select=True)
     operating_physician = fields.Many2One('gnuhealth.physician',
         'Operating Physician')
     admission_reason = fields.Many2One('gnuhealth.pathology',
-        'Reason for Admission', help="Reason for Admission", select="1")
+        'Reason for Admission', help="Reason for Admission", select=True)
     bed = fields.Many2One('gnuhealth.hospital.bed', 'Hospital Bed',
-     required=True, select="2")
+     required=True, select=True)
     nursing_plan = fields.Text('Nursing Plan')
     discharge_plan = fields.Text('Discharge Plan')
 
         ('cancelled', 'cancelled'),
         ('confirmed', 'confirmed'),
         ('hospitalized', 'hospitalized'),
-        ), 'Status', select="1")
+        ), 'Status', select=True)
 
 # Method to check for availability and make the hospital bed reservation
 

tryton/health_lab/health_lab.py

     _description = __doc__
 
     name = fields.Char('Test', 
-        help="Test type, eg X-Ray, hemogram,biopsy...", required=True, select="1")
+        help="Test type, eg X-Ray, hemogram,biopsy...", required=True, select=True)
     code = fields.Char('Code', 
-        help="Short name - code for the test", required=True, select="1")
+        help="Short name - code for the test", required=True, select=True)
     info = fields.Text('Description')
     product_id = fields.Many2One('product.product', 'Service', required=True)
     critearea = fields.One2Many('gnuhealth.lab.test.critearea', 'test_type_id',
 
     name = fields.Char('ID', help="Lab result ID",readonly=True)
     test = fields.Many2One('gnuhealth.lab.test_type', 'Test type',
-        help="Lab test type", required=True, select="1")
+        help="Lab test type", required=True, select=True)
     patient = fields.Many2One('gnuhealth.patient', 'Patient',
-     help="Patient ID", required=True, select="1")
+     help="Patient ID", required=True, select=True)
     pathologist = fields.Many2One('gnuhealth.physician', 'Pathologist',
-        help="Pathologist", select="2")
+        help="Pathologist", select=True)
     requestor = fields.Many2One('gnuhealth.physician', 'Physician',
-        help="Doctor who requested the test", select="2")
+        help="Doctor who requested the test", select=True)
     results = fields.Text('Results')
     diagnosis = fields.Text('Diagnosis')
     critearea = fields.One2Many('gnuhealth.lab.test.critearea', 'gnuhealth_lab_id',
         'Lab Test Critearea')
-    date_requested = fields.DateTime('Date requested', required=True, select="1")
-    date_analysis = fields.DateTime('Date of the Analysis', select="1")
+    date_requested = fields.DateTime('Date requested', required=True, select=True)
+    date_analysis = fields.DateTime('Date of the Analysis', select=True)
 
     def __init__(self):
         super(Lab, self).__init__()
     _name = 'gnuhealth.lab.test.units'
     _description = __doc__
 
-    name = fields.Char('Unit', select="1")
-    code = fields.Char('Code', select="1")
+    name = fields.Char('Unit', select=True)
+    code = fields.Char('Code', select=True)
 
     def __init__(self):
         super(GnuHealthLabTestUnits, self).__init__()
     _name = 'gnuhealth.lab.test.critearea'
     _description = __doc__
 
-    name = fields.Char('Analyte', required=True, select="1")
+    name = fields.Char('Analyte', required=True, select=True)
     excluded = fields.Boolean('Excluded',help='Select this option when' \
         ' this analyte is excluded from the test')
     result = fields.Float('Value')
          on_change_with=['result', 'lower_limit', 'upper_limit'])
     units = fields.Many2One('gnuhealth.lab.test.units', 'Units')
     test_type_id = fields.Many2One('gnuhealth.lab.test_type', 'Test type',
-     select="2")
-    gnuhealth_lab_id = fields.Many2One('gnuhealth.lab', 'Test Cases', select="2")
+     select=True)
+    gnuhealth_lab_id = fields.Many2One('gnuhealth.lab', 'Test Cases', select=True)
     sequence = fields.Integer('Sequence')
 
     def __init__(self):
     _description = __doc__
 
     name = fields.Many2One('gnuhealth.lab.test_type', 'Test Type', required=True,
-     select="1")
-    date = fields.DateTime('Date', select="2")
+     select=True)
+    date = fields.DateTime('Date', select=True)
     state = fields.Selection([
         ('draft', 'Draft'),
         ('tested', 'Tested'),
         ('cancel', 'Cancel'),
-        ], 'State', readonly=True, select="1")
+        ], 'State', readonly=True, select=True)
     patient_id = fields.Many2One('gnuhealth.patient', 'Patient', required=True,
-     select="1")
+     select=True)
     doctor_id = fields.Many2One('gnuhealth.physician', 'Doctor',
-        help="Doctor who Request the lab test.", select="1")
+        help="Doctor who Request the lab test.", select=True)
 
     def default_date(self):
         return datetime.now()

tryton/health_lifestyle/health_lifestyle.py

     _name = 'gnuhealth.patient.recreational_drugs'
     _description = __doc__
 
-    patient = fields.Many2One('gnuhealth.patient', 'Patient', select='1')
+    patient = fields.Many2One('gnuhealth.patient', 'Patient', select=True)
     recreational_drug = fields.Many2One('gnuhealth.drugs_recreational',
-        'Recreational Drug', select='1')
+        'Recreational Drug', select=True)
 
 PatientRecreationalDrugs()
 

tryton/health_surgery/health_surgery.py

         ('o', 'Optional'),
         ('r', 'Required'),
         ('u', 'Urgent'),
-        ], 'Surgery Classification', select='1')
+        ], 'Surgery Classification', select=True)
     surgeon = fields.Many2One('gnuhealth.physician', 'Surgeon',
         help="Surgeon who did the procedure")
     anesthetist = fields.Many2One('gnuhealth.physician', 'Anesthetist',
                     'upper portion of tonsils and uvula'),
         ('Class 3', 'Soft and hard palate and base of the uvula are visible'),
         ('Class 4', 'Only Hard Palate visible'),
-        ], 'Mallampati Score', select='1')
+        ], 'Mallampati Score', select=True)
     preop_bleeding_risk = fields.Boolean('Risk of Massive bleeding',
         help="Check this box if patient has a risk of loosing more than 500 " \
         "ml in adults of over 7ml/kg in infants. If so, make sure that " \
 
     name = fields.Many2One('gnuhealth.surgery', 'Surgery')
     procedure = fields.Many2One('gnuhealth.procedure', 'Code', required=True,
-        select="1",
+        select=True,
         help="Procedure Code, for example ICD-10-PCS Code 7-character string")
     notes = fields.Text('Notes')