← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~echeverrifm/oemedical/oemedical_socioeconomics into lp:oemedical

 

Federico Manuel Echeverri Choux has proposed merging lp:~echeverrifm/oemedical/oemedical_socioeconomics into lp:oemedical.

Requested reviews:
  OEmedical Commiter (oemedical-commiter)

For more details, see:
https://code.launchpad.net/~echeverrifm/oemedical/oemedical_socioeconomics/+merge/205523

[IMP] Improve oemedical socioeconomics module (Fix oemedical_socioeconomics_view.xml view, improve menu, add security file .csv and remove groups of oemedical_security.xml )

[IMP] Improve oemedical socioeconomics module (Fix some problems to install, Remove comments, improve dependences and move files 
-- 
https://code.launchpad.net/~echeverrifm/oemedical/oemedical_socioeconomics/+merge/205523
Your team OEmedical Commiter is requested to review the proposed merge of lp:~echeverrifm/oemedical/oemedical_socioeconomics into lp:oemedical.
=== modified file 'oemedical_socioeconomics/__openerp__.py'
--- oemedical_socioeconomics/__openerp__.py	2014-01-15 10:20:02 +0000
+++ oemedical_socioeconomics/__openerp__.py	2014-02-10 04:56:39 +0000
@@ -34,124 +34,31 @@
 ##############################################################################
 {
 
-    'name': 'OeMedical : Free Health and Hospital Information System',
+    'name': 'OeMedical : Socioeconomics',
     'version': '1.0',
     'author': "OeMEdical Team",
     'category': 'Generic Modules/Others',
-    'depends': ['base', 'sale', 'purchase', 'account', 'product'],
+    'depends': ['oemedical'],
     'application': True,
     'description': """
 
-About OeMedical
----------------
-
-OeMedical is a multi-user, highly scalable, centralized Electronic
-Medical Record (EMR) and Hospital Information System for openERP.
-
-OeMedical provides a free universal Health and Hospital Information System,
-so doctors and institutions all over the world,
-specially in developing countries will benefit from a centralized,
-high quality, secure and scalable system.
-
-OeMedical at a glance:
-
-    * Strong focus in family medicine and Primary Health Care
-    
-    * Major interest in Socio-economics (housing conditions, substance abuse,
-    education...)
-    
-    * Diseases and Medical procedures standards (like ICD-10 / ICD-10-PCS ...)
-    
-    * Patient Genetic and Hereditary risks : Over 4200 genes related to
-    diseases (NCBI / Genecards)
-    
-    * Epidemiological and other statistical reports
-    
-    * 100% paperless patient examination and history taking
-    
-    * Patient Administration 
-    (creation, evaluations / consultations, history ... )
-    
-    * Doctor Administration
-    
-    * Lab Administration
-    
-    * Medicine / Drugs information (vademécum)
-    
-    * Medical stock and supply chain management
-    
-    * Hospital Financial Administration
-    
-    * Designed with industry standards in mind
-    
-    * Open Source : Licensed under AGPL
-    
+About OeMedical Socio Economics
+-------------------------------
+
 """,
     "website": "http://launchpad.net/oemedical";,
     "licence": "AGPL v3",
     "data": [
-        'sequence/oemedical_sequence.xml',
-        'views/oemedical_secondary_condition_view.xml',
-        'views/oemedical_pathology_category_view.xml',
-        'views/oemedical_signs_and_symptoms_view.xml',
-        'views/product_product_view.xml',
-        'views/oemedical_physician_view.xml',
-        'views/oemedical_directions_view.xml',
-        'views/oemedical_insurance_view.xml',
-        'views/res_partner_view.xml',
-        'views/oemedical_pathology_view.xml',
-        'views/oemedical_operational_area_view.xml',
-        'views/oemedical_ethnicity_view.xml',
-        'views/oemedical_operational_sector_view.xml',
-        'views/oemedical_prescription_order_view.xml',
-        'views/oemedical_medicament_category_view.xml',
-        'views/oemedical_insurance_plan_view.xml',
-        'views/oemedical_diagnostic_hypothesis_view.xml',
-        'views/oemedical_procedure_view.xml',
-        'views/oemedical_medication_template_view.xml',
-        'views/oemedical_vaccination_view.xml',
-        'views/oemedical_medication_dosage_view.xml',
-        'views/oemedical_family_member_view.xml',
-        'views/oemedical_hospital_ward_view.xml',
-        'views/oemedical_hospital_or_view.xml',
-        'views/oemedical_drug_form_view.xml',
-        'views/oemedical_patient_medication_view.xml',
-        'views/oemedical_patient_evaluation_view.xml',
-        'views/oemedical_hospital_building_view.xml',
-        'views/oemedical_patient_view.xml',
-        'views/oemedical_prescription_line_view.xml',
-        'views/oemedical_patient_disease_view.xml',
-        'views/oemedical_drug_route_view.xml',
-        'views/oemedical_hospital_unit_view.xml',
-        'views/oemedical_appointment_view.xml',
-        'views/oemedical_specialty_view.xml',
-        'views/oemedical_family_view.xml',
-        'views/oemedical_hospital_bed_view.xml',
-        'views/oemedical_occupation_view.xml',
-        'views/oemedical_disease_group_members_view.xml',
-        'views/oemedical_medicament_view.xml',
-        'views/oemedical_pathology_group_view.xml',
-        #'views/oemedical_gynecology_and_obstetrics_view.xml',   # view has errors, please correct before enabling....
-        #'views/oemedical_lifestyle_view.xml',
-        'views/data/recreational_drugs.xml',
-        #'views/oemedical_disease_gene_view.xml',  # view has errors, please correct before enabling....
-        'views/data/disease_genes.xml',
-        #'views/oemedical_socioeconomics_view.xml', # view has errors, please correct before enabling....
-        #'views/oemedical_lab_view.xml',  # view has errors, please correct before enabling....
+        'views/oemedical_menu.xml',
+        'views/oemedical_socioeconomics_view.xml', # view has errors, please correct before enabling....
         'security/oemedical_security.xml',
         'security/ir.model.access.csv',
-        'oemedical_menu.xml',
     ],
     "demo": [
 
     ],
     'test':[
-            'test/physician.yml',
-            'test/patient.yml',
-            'test/partners.yml',
-            'test/insurance_plan.yml',
-            'test/insurance.yml',
-            'test/physician_speciality.yml'
+
     ],
     'css': [
 
@@ -163,6 +70,6 @@
 
     ],
     "active": False,
-    "installable": False,
+    "installable": True,
 }
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== modified file 'oemedical_socioeconomics/models/__init__.py'
--- oemedical_socioeconomics/models/__init__.py	2014-01-15 10:20:02 +0000
+++ oemedical_socioeconomics/models/__init__.py	2014-02-10 04:56:39 +0000
@@ -18,3 +18,5 @@
 
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
+import oemedical_socioeconomics

=== added file 'oemedical_socioeconomics/models/oemedical_socioeconomics.py'
--- oemedical_socioeconomics/models/oemedical_socioeconomics.py	1970-01-01 00:00:00 +0000
+++ oemedical_socioeconomics/models/oemedical_socioeconomics.py	2014-02-10 04:56:39 +0000
@@ -0,0 +1,128 @@
+# -*- coding: utf-8 -*-
+#/#############################################################################
+#
+#    Tech-Receptives Solutions Pvt. Ltd.
+#    Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
+#    Special Credit and Thanks to Thymbra Latinoamericana S.A.
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#/#############################################################################
+
+from openerp.osv import fields, orm
+from openerp.tools.translate import _
+from dateutil.relativedelta import relativedelta
+from datetime import datetime
+
+
+class OeMedicalSocioeconomics(orm.Model):
+
+    _inherit='oemedical.patient'
+
+    _columns={
+            'ses' : fields.selection([
+                (None, ''),
+                ('0', 'Lower'),
+                ('1', 'Lower-middle'),
+                ('2', 'Middle'),
+                ('3', 'Middle-upper'),
+                ('4', 'Higher'),
+                ], 'Socioeconomics', help="SES - Socioeconomic Status", sort=False),
+            'housing' : fields.selection([
+                (None, ''),
+                ('0', 'Shanty, deficient sanitary conditions'),
+                ('1', 'Small, crowded but with good sanitary conditions'),
+                ('2', 'Comfortable and good sanitary conditions'),
+                ('3', 'Roomy and excellent sanitary conditions'),
+                ('4', 'Luxury and excellent sanitary conditions'),
+                ], 'Housing conditions', help="Housing and sanitary living conditions", sort=False),
+            'hostile_area' : fields.boolean('Hostile Area', help="Check if patient lives in a zone of high hostility (eg, war)"),
+            'sewers' : fields.boolean('Sanitary Sewers'),
+            'water' : fields.boolean('Running Water'),
+            'trash' : fields.boolean('Trash recollection'),
+            'electricity' : fields.boolean('Electrical supply'),
+            'gas' : fields.boolean('Gas supply'),
+            'telephone' : fields.boolean('Telephone'),
+            'television' : fields.boolean('Television'),
+            'internet' : fields.boolean('Internet'),
+            'single_parent' : fields.boolean('Single parent family'),
+            'domestic_violence' : fields.boolean('Domestic violence'),
+            'working_children' : fields.boolean('Working children'),
+            'teenage_pregnancy' : fields.boolean('Teenage pregnancy'),
+            'sexual_abuse' : fields.boolean('Sexual abuse'),
+            'drug_addiction' : fields.boolean('Drug addiction'),
+            'school_withdrawal' : fields.boolean('School withdrawal'),
+            'prison_past' : fields.boolean('Has been in prison'),
+            'prison_current' : fields.boolean('Is currently in prison'),
+            'relative_in_prison' : fields.boolean('Relative in prison', help="Check if someone from the nuclear family - parents sibblings  is or has been in prison"),
+            'ses_notes' : fields.text('Extra info'),
+            'fam_apgar_help' : fields.selection([
+                (None, ''),
+                ('0', 'None'),
+                ('1', 'Moderately'),
+                ('2', 'Very much'),
+                ], 'Help from family',
+                help="Is the patient satisfied with the level of help coming from the family when there is a problem ?", sort=False),
+            'fam_apgar_discussion' : fields.selection([
+                (None, ''),
+                ('0', 'None'),
+                ('1', 'Moderately'),
+                ('2', 'Very much'),
+                ], 'Problems discussion',
+                help="Is the patient satisfied with the level talking over the problems as family ?", sort=False),
+            'fam_apgar_decisions' : fields.selection([
+                (None, ''),
+                ('0', 'None'),
+                ('1', 'Moderately'),
+                ('2', 'Very much'),
+                ], 'Decision making',
+                help="Is the patient satisfied with the level of making important decisions as a group ?", sort=False),
+            'fam_apgar_timesharing' : fields.selection([
+                (None, ''),
+                ('0', 'None'),
+                ('1', 'Moderately'),
+                ('2', 'Very much'),
+                ], 'Time sharing',
+                help="Is the patient satisfied with the level of time that they spend together ?", sort=False),
+            'fam_apgar_affection' : fields.selection([
+                (None, ''),
+                ('0', 'None'),
+                ('1', 'Moderately'),
+                ('2', 'Very much'),
+                ], 'Family affection',
+                help="Is the patient satisfied with the level of affection coming from the family ?", sort=False),
+            'fam_apgar_score' : fields.integer('Score', help="Total Family APGAR 7 - 10 : Functional Family 4 - 6  : Some level of disfunction \n" \
+                "0 - 3  : Severe disfunctional family \n"), 
+            'income' : fields.selection([
+                (None, ''),
+                ('h', 'High'),
+                ('m', 'Medium / Average'),
+                ('l', 'Low'),
+                ], 'Income', sort=False),
+            'education' : fields.selection([
+                (None, ''),
+                ('0', 'None'),
+                ('1', 'Incomplete Primary School'),
+                ('2', 'Primary School'),
+                ('3', 'Incomplete Secondary School'),
+                ('4', 'Secondary School'),
+                ('5', 'University'),
+                ], 'Education Level', help="Education Level", sort=False),
+            'works_at_home' : fields.boolean('Works at home', help="Check if the patient works at his / her house"),
+            'hours_outside' : fields.integer('Hours outside home', help="Number of hours a day the patient spend outside the house"),
+
+                }
+
+
+OeMedicalSocioeconomics()

=== removed file 'oemedical_socioeconomics/oemedical_menu.xml'
--- oemedical_socioeconomics/oemedical_menu.xml	2014-01-15 10:20:02 +0000
+++ oemedical_socioeconomics/oemedical_menu.xml	1970-01-01 00:00:00 +0000
@@ -1,211 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<openerp>
-	<data>
-		<menuitem id="oemedical_root" name="OeMedical" sequence="10" />
-
-
-<!--Menu Patient-->
-
-		<menuitem id="oemedical_patient_root" name="Patient" parent="oemedical_root"
-			sequence="10" />
-		<menuitem id="oemedical_patient" name=" Patient"
-			parent="oemedical_patient_root" sequence="10"
-			action="act_open_oemedical_patient_view" />
-
-		<menuitem id="oemedical_family" name=" Family" parent="oemedical_patient_root"
-			sequence="20" action="act_open_oemedical_family_view" />
-
-		<menuitem id="oemedical_family_member" name=" Family Member"
-			parent="oemedical_patient_root" sequence="30"
-			action="act_open_oemedical_family_member_view" />
-
-
-<!--Appointment-->
-
-		<menuitem id="oemedical_appoitment_root" name="Appoitment"
-			parent="oemedical_root" sequence="20" />
-
-		<menuitem id="oemedical_appointment" name=" Appointment"
-			parent="oemedical_appoitment_root" sequence="10"
-			action="act_open_oemedical_appointment_view" />
-
-<!--Prescriptions-->
-
-		<menuitem id="oemedical_prescription_root" name="Prescription"
-			parent="oemedical_root" sequence="30" />
-
-		<menuitem id="oemedical_prescription_order" name="Prescription Order"
-			parent="oemedical_prescription_root" sequence="10"
-			action="act_open_oemedical_prescription_order_view" />
-
-<!--       Laboratory    -->
-		<menuitem name="Laboratory" id="oemedical_laboratory_menu" 
-            parent="oemedical_root" sequence="4"/>
-
-
-<!--Configurations-->
-
-		<menuitem id="oemedical_root_sub" name="Configuration"
-			parent="oemedical_root" sequence="100" />
-
-<!--       Laboratory       -->
-		<menuitem name="Laboratory" id="oemedical_conf_laboratory" 
-            parent="oemedical_root_sub" sequence="3"/>
-
-
-<!-- Diseases -->
-
-		<menuitem id="oemedical_root_disease" name="Disease"
-			parent="oemedical_root_sub" sequence="10" />
-
-<!--  Menu of Pathology-->
-
-		<menuitem id="oemedical_pathology_category" name=" Pathology Category"	
-            parent="oemedical_root_disease" sequence="10"	
-            action="act_open_oemedical_pathology_category_view" />
-
-		<menuitem id="oemedical_pathology" name=" Pathology" 
-            parent="oemedical_root_disease"   sequence="30" 
-            action="act_open_oemedical_pathology_view" />
-
-		<menuitem id="oemedical_pathology_group" name=" Pathology Group" 
-            parent="oemedical_root_disease" sequence="20"
-            action="act_open_oemedical_pathology_group_view" />
-
-		<menuitem id="oemedical_root_disease_cat" name="Categories"
-			parent="oemedical_root_disease" sequence="100" />
-
-		<menuitem id="oemedical_disease_group_members" name=" Disease Group"
-			parent="oemedical_root_disease_cat" sequence="10"
-			action="act_open_oemedical_disease_group_members_view" />
-
-<!-- Misc -->
-
-		<menuitem id="oemedical_root_misc" name="Misc"
-			parent="oemedical_root_sub" sequence="200" />
-
-<!-- Occupation  ( Config/misc/Occupation) )--> 
-
-		<menuitem id="oemedical_occupation" name=" Occupation"
-			parent="oemedical_root_misc" sequence="20"
-			action="act_open_oemedical_occupation_view" />
-
-<!-- Medical Specialty  ( Config/misc/specialty) )--> 
-
-		<menuitem id="oemedical_specialty" name=" Medical Specialty"
-            parent="oemedical_root_misc" sequence="10" 
-            action="act_open_oemedical_specialty_view" />
-
-<!-- Ethnicity  ( Config/misc/Ethnicity) )--> 
-
-		<menuitem id="oemedical_ethnicity" name="Ethnicity" parent="oemedical_root_misc"
-			sequence="10" action="act_open_oemedical_ethnicity_view" />
-
-
-
-
-
-
-<!--Medicaments-->
-
-		<menuitem id="oemedical_medicament_root" name="Medicaments"
-			parent="oemedical_root_sub" sequence="50" />
-
-
-		<menuitem id="oemedical_medicament" name="Medicaments"
-			parent="oemedical_medicament_root" sequence="10"
-			action="act_open_oemedical_medicament_view" />
-
-		<menuitem id="oemedical_medication_template" name=" Medication Template"
-			parent="oemedical_medicament_root" sequence="20"
-			action="act_open_oemedical_medication_template_view" />
-
-		<menuitem id="oemedical_medication_frequencies" name="Medication Frequencies"
-			parent="oemedical_medicament_root" sequence="30"
-			action="act_open_oemedical_medication_dosage_view" />
-
-		<menuitem id="oemedical_drug_route" name=" Drug Admin Route"
-			parent="oemedical_medicament_root" sequence="80"
-			action="act_open_oemedical_drug_route_view" />
-
-		<menuitem id="oemedical_drug_form" name=" Drug Form"
-            parent="oemedical_medicament_root" sequence="90"
-            action="act_open_oemedical_drug_form_view" />
-
-
-		<menuitem id="oemedical_medicament_category" name=" Medicament Category"
-			parent="oemedical_medicament_root" sequence="100"
-			action="act_open_oemedical_medicament_category_view" />
-
-<!--Hospital Centers-->
-
-		<menuitem id="oemedical_health_center_root" name="Health Center"
-			parent="oemedical_root_sub" sequence="10" />
-
-		<menuitem id="oemedical_hospital_building" name=" Hospital Building"
-			parent="oemedical_health_center_root" sequence="10"
-			action="act_open_oemedical_hospital_building_view" />
-
-		<menuitem id="oemedical_hospital_unit" name=" Hospital Unit"
-			parent="oemedical_health_center_root" sequence="20"
-			action="act_open_oemedical_hospital_unit_view" />
-
-		<menuitem id="oemedical_hospital_ward" name=" Hospital Ward"
-			parent="oemedical_health_center_root" sequence="30"
-			action="act_open_oemedical_hospital_ward_view" />
-
-		<menuitem id="oemedical_hospital_or" name=" Hospital Or"
-			parent="oemedical_health_center_root" sequence="40"
-			action="act_open_oemedical_hospital_or_view" />
-		
-		<menuitem id="oemedical_hospital_bed" name=" Hospital Bed"
-			parent="oemedical_health_center_root" sequence="50"
-			action="act_open_oemedical_hospital_bed_view" />
-
-		<menuitem id="oemedical_operational_area" name=" Operational Area"
-			parent="oemedical_health_center_root" sequence="60"
-			action="act_open_oemedical_operational_area_view" />
-
-		<menuitem id="oemedical_operational_sector" name=" Operational Sector"
-			parent="oemedical_health_center_root" sequence="70"
-			action="act_open_oemedical_operational_sector_view" />
-
-
-<!--    Physician Conf    -->
-
-        <menuitem name="Health Professionals" id="oemedical_conf_physicians"
-            parent="oemedical_root_sub" sequence="20" />
-
-		<menuitem id="oemedical_physician" name=" Physician" parent="oemedical_conf_physicians"
-			sequence="10" action="act_open_oemedical_physician_view" />
-
-
-<!--    Insurance     -->
-
-        <menuitem name="Insurances" id="oemedical_conf_insurances"
-            parent="oemedical_root_misc" sequence="20" />
-
-		<menuitem id="oemedical_insurance" name=" Insurance" 
-            parent="oemedical_conf_insurances"	sequence="10" 
-            action="act_open_oemedical_insurance_view" />
-
-		<menuitem id="oemedical_insurance_plan" name=" Insurance Plan"
-			parent="oemedical_conf_insurances" sequence="20"
-			action="act_open_oemedical_insurance_plan_view" />
-
-
-
-
-		<menuitem id="oemedical_diagnostic_hypothesis" name=" Diagnostic Hypothesis"
-			parent="oemedical_root_sub" sequence="10"
-			action="act_open_oemedical_diagnostic_hypothesis_view" />
-		<menuitem id="oemedical_predure" name=" Procedure" parent="oemedical_root_sub"
-			sequence="10" action="act_open_oemedical_procedure_view" />
-
-		<menuitem id="oemedical_vaccination" name=" Vaccination"
-			parent="oemedical_root_sub" sequence="10"
-			action="act_open_oemedical_vaccination_view" />
-
-
-	</data>
-</openerp>

=== removed directory 'oemedical_socioeconomics/oemedical_socioeconomics'
=== removed file 'oemedical_socioeconomics/oemedical_socioeconomics/__init__.py'
--- oemedical_socioeconomics/oemedical_socioeconomics/__init__.py	2014-01-15 10:20:02 +0000
+++ oemedical_socioeconomics/oemedical_socioeconomics/__init__.py	1970-01-01 00:00:00 +0000
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-#    Tech-Receptives Solutions Pvt. Ltd.
-#    Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
-#    Special Credit and Thanks to Thymbra Latinoamericana S.A.
-#
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU Affero General Public License as
-#    published by the Free Software Foundation, either version 3 of the
-#    License, or (at your option) any later version.
-#
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU Affero General Public License for more details.
-#
-#    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-
-import oemedical_socioeconomics

=== removed file 'oemedical_socioeconomics/oemedical_socioeconomics/oemedical_socioeconomics.py'
--- oemedical_socioeconomics/oemedical_socioeconomics/oemedical_socioeconomics.py	2014-01-15 10:20:02 +0000
+++ oemedical_socioeconomics/oemedical_socioeconomics/oemedical_socioeconomics.py	1970-01-01 00:00:00 +0000
@@ -1,128 +0,0 @@
-# -*- coding: utf-8 -*-
-#/#############################################################################
-#
-#    Tech-Receptives Solutions Pvt. Ltd.
-#    Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
-#    Special Credit and Thanks to Thymbra Latinoamericana S.A.
-#
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU Affero General Public License as
-#    published by the Free Software Foundation, either version 3 of the
-#    License, or (at your option) any later version.
-#
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU Affero General Public License for more details.
-#
-#    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-#/#############################################################################
-
-from openerp.osv import fields, orm
-from openerp.tools.translate import _
-from dateutil.relativedelta import relativedelta
-from datetime import datetime
-
-
-class OeMedicalSocioeconomics(orm.Model):
-
-    _inherit='oemedical.patient'
-
-    _columns={
-            'ses' : fields.selection([
-                (None, ''),
-                ('0', 'Lower'),
-                ('1', 'Lower-middle'),
-                ('2', 'Middle'),
-                ('3', 'Middle-upper'),
-                ('4', 'Higher'),
-                ], 'Socioeconomics', help="SES - Socioeconomic Status", sort=False),
-            'housing' : fields.selection([
-                (None, ''),
-                ('0', 'Shanty, deficient sanitary conditions'),
-                ('1', 'Small, crowded but with good sanitary conditions'),
-                ('2', 'Comfortable and good sanitary conditions'),
-                ('3', 'Roomy and excellent sanitary conditions'),
-                ('4', 'Luxury and excellent sanitary conditions'),
-                ], 'Housing conditions', help="Housing and sanitary living conditions", sort=False),
-            'hostile_area' : fields.boolean('Hostile Area', help="Check if patient lives in a zone of high hostility (eg, war)"),
-            'sewers' : fields.boolean('Sanitary Sewers'),
-            'water' : fields.boolean('Running Water'),
-            'trash' : fields.boolean('Trash recollection'),
-            'electricity' : fields.boolean('Electrical supply'),
-            'gas' : fields.boolean('Gas supply'),
-            'telephone' : fields.boolean('Telephone'),
-            'television' : fields.boolean('Television'),
-            'internet' : fields.boolean('Internet'),
-            'single_parent' : fields.boolean('Single parent family'),
-            'domestic_violence' : fields.boolean('Domestic violence'),
-            'working_children' : fields.boolean('Working children'),
-            'teenage_pregnancy' : fields.boolean('Teenage pregnancy'),
-            'sexual_abuse' : fields.boolean('Sexual abuse'),
-            'drug_addiction' : fields.boolean('Drug addiction'),
-            'school_withdrawal' : fields.boolean('School withdrawal'),
-            'prison_past' : fields.boolean('Has been in prison'),
-            'prison_current' : fields.boolean('Is currently in prison'),
-            'relative_in_prison' : fields.boolean('Relative in prison', help="Check if someone from the nuclear family - parents sibblings  is or has been in prison"),
-            'ses_notes' : fields.text('Extra info'),
-            'fam_apgar_help' : fields.selection([
-                (None, ''),
-                ('0', 'None'),
-                ('1', 'Moderately'),
-                ('2', 'Very much'),
-                ], 'Help from family',
-                help="Is the patient satisfied with the level of help coming from the family when there is a problem ?", sort=False),
-            'fam_apgar_discussion' : fields.selection([
-                (None, ''),
-                ('0', 'None'),
-                ('1', 'Moderately'),
-                ('2', 'Very much'),
-                ], 'Problems discussion',
-                help="Is the patient satisfied with the level talking over the problems as family ?", sort=False),
-            'fam_apgar_decisions' : fields.selection([
-                (None, ''),
-                ('0', 'None'),
-                ('1', 'Moderately'),
-                ('2', 'Very much'),
-                ], 'Decision making',
-                help="Is the patient satisfied with the level of making important decisions as a group ?", sort=False),
-            'fam_apgar_timesharing' : fields.selection([
-                (None, ''),
-                ('0', 'None'),
-                ('1', 'Moderately'),
-                ('2', 'Very much'),
-                ], 'Time sharing',
-                help="Is the patient satisfied with the level of time that they spend together ?", sort=False),
-            'fam_apgar_affection' : fields.selection([
-                (None, ''),
-                ('0', 'None'),
-                ('1', 'Moderately'),
-                ('2', 'Very much'),
-                ], 'Family affection',
-                help="Is the patient satisfied with the level of affection coming from the family ?", sort=False),
-            'fam_apgar_score' : fields.integer('Score', help="Total Family APGAR 7 - 10 : Functional Family 4 - 6  : Some level of disfunction \n" \
-                "0 - 3  : Severe disfunctional family \n"), 
-            'income' : fields.selection([
-                (None, ''),
-                ('h', 'High'),
-                ('m', 'Medium / Average'),
-                ('l', 'Low'),
-                ], 'Income', sort=False),
-            'education' : fields.selection([
-                (None, ''),
-                ('0', 'None'),
-                ('1', 'Incomplete Primary School'),
-                ('2', 'Primary School'),
-                ('3', 'Incomplete Secondary School'),
-                ('4', 'Secondary School'),
-                ('5', 'University'),
-                ], 'Education Level', help="Education Level", sort=False),
-            'works_at_home' : fields.boolean('Works at home', help="Check if the patient works at his / her house"),
-            'hours_outside' : fields.integer('Hours outside home', help="Number of hours a day the patient spend outside the house"),
-
-                }
-
-
-OeMedicalSocioeconomics()

=== removed file 'oemedical_socioeconomics/oemedical_socioeconomics/oemedical_socioeconomics_view.xml'
--- oemedical_socioeconomics/oemedical_socioeconomics/oemedical_socioeconomics_view.xml	2014-01-15 10:20:02 +0000
+++ oemedical_socioeconomics/oemedical_socioeconomics/oemedical_socioeconomics_view.xml	1970-01-01 00:00:00 +0000
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<openerp>
-	<data>
-
-        <record model="ir.ui.view" id="view_oemedical_patient_form_socio_economics">
-            <field name="name">oemedical.patient.view.inherit.socio_economics</field>
-            <field name="model">oemedical.patient</field>
-            <field name="inherit_id" ref="oemedical.view_oemedical_patient_form" />
-            <field name="type">form</field>
-            <field name="arch" type="xml">
-                <data>
-                    <xpath expr="//notebook/page[@string='Misc']" position="before">
-                        <page string="Socioeconomics" id="page_socioeconomics">
-                            <notebook>
-                                <page string="Main" id="page_ses_main">
-                                    <group colspan="4" col="4" id="group_ses_holder2">
-                                        <field name="ses"/>
-                                        <field name="housing"/>
-                                        <field name="education"/>
-<!--                                        <field name="occupation"/>-->
-                                    </group>
-                                    <newline/>
-                                    <group col="6" id="group_socioecomics_work">
-                                        <newline/>
-                                        <field name="works_at_home"/>
-                                        <field name="hours_outside"/>
-                                        <field name="hostile_area"/>
-                                    </group>
-                                    <newline/>
-                                    <newline/>
-                                    <group string="Notes" id="group_ses_notes">
-                                        <field colspan="4" name="ses_notes"/>
-                                    </group>
-                                </page>
-                                <page string="Infrastructure" id="page_infrastructure">
-
-                                    <group colspan="4" col="8" id="group_ses_infraestructure">
-                                        <field name="sewers"/>
-                                        <field name="water"/>
-                                        <field name="trash"/>
-                                        <field name="electricity"/>
-                                        <field name="gas"/>
-                                        <field name="telephone"/>
-                                        <field name="television"/>
-                                        <field name="internet"/>
-
-                                    </group>
-                                </page>
-                                <page string="Family" id="page_family">
-                                    <group colspan="4" col="6" string="Family APGAR" id="group_ses_family_apgar">
-                                        <field name="fam_apgar_help" />
-                                        <field name="fam_apgar_discussion"/>
-                                        <field name="fam_apgar_decisions"/>
-                                        <field name="fam_apgar_timesharing"/>
-                                        <field name="fam_apgar_affection"/>
-                                        <field name="fam_apgar_score"/>
-                                    </group>
-                                    <newline/>
-                                    <group colspan="4" col="8" string="Other Family Issues" id="group_ses_other_family_issues">
-                                        <field name="single_parent"/>
-                                        <field name="domestic_violence"/>
-                                        <field name="working_children"/>
-                                        <field name="teenage_pregnancy"/>
-                                        <field name="sexual_abuse"/>
-                                        <field name="drug_addiction"/>
-                                        <field name="school_withdrawal"/>
-                                        <field name="prison_past"/>
-                                        <field name="prison_current"/>
-                                        <field name="relative_in_prison"/>
-                                    </group>
-                                </page>
-                            </notebook>
-                        </page>
-                    </xpath>
-                </data>
-            </field>
-        </record>
-
-	</data>
-</openerp>

=== added file 'oemedical_socioeconomics/security/ir.model.access.csv'
--- oemedical_socioeconomics/security/ir.model.access.csv	1970-01-01 00:00:00 +0000
+++ oemedical_socioeconomics/security/ir.model.access.csv	2014-02-10 04:56:39 +0000
@@ -0,0 +1,1 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink

=== modified file 'oemedical_socioeconomics/security/oemedical_security.xml'
--- oemedical_socioeconomics/security/oemedical_security.xml	2014-01-08 06:02:09 +0000
+++ oemedical_socioeconomics/security/oemedical_security.xml	2014-02-10 04:56:39 +0000
@@ -2,56 +2,7 @@
 <openerp>
 <data noupdate="0">
 
-    <record id="group_oemedical_user" model="res.groups">
-        <field name="name">OEMedical User</field>
-        <field name="category_id" ref="base.module_category_accounting_and_finance"/>
-        <field name="users" eval="[(4, ref('base.user_root'))]"/>
-        <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
-    </record>
-
-    <record id="group_oemedical_doctor" model="res.groups">
-        <field name="name">OEMedical Doctor</field>
-        <field name="category_id" ref="base.module_category_accounting_and_finance"/>
-        <field name="users" eval="[(4, ref('base.user_root'))]"/>
-        <field name="implied_ids" eval="[(4, ref('group_oemedical_user')),(4, ref('base.group_user'))]"/>
-    </record>
-
-    <record id="group_oemedical_assistant" model="res.groups">
-        <field name="name">OEMedical Assistant</field>
-        <field name="category_id" ref="base.module_category_accounting_and_finance"/>
-        <field name="users" eval="[(4, ref('base.user_root'))]"/>
-        <field name="implied_ids" eval="[(4, ref('group_oemedical_user')),(4, ref('base.group_user'))]"/>
-    </record>
-
-    <record id="group_oemedical_center_manager" model="res.groups">
-        <field name="name">OEMedical Center Manager</field>
-        <field name="category_id" ref="base.module_category_accounting_and_finance"/>
-        <field name="implied_ids" eval="[(4, ref('group_oemedical_user')),(4, ref('group_oemedical_doctor'))]"/>
-    </record>
-
-    <record id="group_oemedical_manager" model="res.groups">
-        <field name="name">OEMedical Manager</field>
-        <field name="category_id" ref="base.module_category_accounting_and_finance"/>
-        <field name="implied_ids" eval="[(4, ref('group_oemedical_center_manager'))]"/>
-    </record>
-
-</data>
-
-<data noupdate="0">
-    <record id="oemedical_appointment_access_rule_physician" model="ir.rule">
-        <field name="name">Appointment Entry</field>
-        <field name="model_id" ref="model_oemedical_appointment"/>
-        <field name="global" eval="True"/>
-        <field name="groups" eval="[(4, ref('group_oemedical_doctor'))]"/>
-        <field name="domain_force">[('doctor.user_id', '=', user.id)]</field>
-    </record>
-
-    <record id="oemedical_appointment_access_rule_assistant" model="ir.rule">
-        <field name="name">Appointment Entry</field>
-        <field name="model_id" ref="model_oemedical_appointment"/>
-        <field name="global" eval="True"/>
-        <field name="groups" eval="[(4, ref('group_oemedical_assistant'))]"/>
-        <field name="domain_force">[('institution','=',user.parent_id.id)]</field>
-    </record>
-</data>
+</data>
+
+
 </openerp>

=== added file 'oemedical_socioeconomics/views/oemedical_menu.xml'
--- oemedical_socioeconomics/views/oemedical_menu.xml	1970-01-01 00:00:00 +0000
+++ oemedical_socioeconomics/views/oemedical_menu.xml	2014-02-10 04:56:39 +0000
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+	<data>
+		<menuitem id="oemedical_root" name="OeMedical" sequence="10" />
+
+
+
+	</data>
+</openerp>

=== added file 'oemedical_socioeconomics/views/oemedical_socioeconomics_view.xml'
--- oemedical_socioeconomics/views/oemedical_socioeconomics_view.xml	1970-01-01 00:00:00 +0000
+++ oemedical_socioeconomics/views/oemedical_socioeconomics_view.xml	2014-02-10 04:56:39 +0000
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+	<data>
+
+        <record model="ir.ui.view" id="view_oemedical_patient_form_socio_economics">
+            <field name="name">oemedical.patient.view.inherit.socio_economics</field>
+            <field name="model">oemedical.patient</field>
+            <field name="inherit_id" ref="oemedical.view_oemedical_patient_form" />
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <data>
+                    <xpath expr="//notebook/page[@string='General Information']" position="after">
+                        <page string="Socioeconomics" id="page_socioeconomics">
+                            <notebook>
+                                <page string="Main" id="page_ses_main">
+                                    <group colspan="4" col="4" id="group_ses_holder2">
+                                        <field name="ses"/>
+                                        <field name="housing"/>
+                                        <field name="education"/>
+<!--                                        <field name="occupation"/>-->
+                                    </group>
+                                    <newline/>
+                                    <group col="6" id="group_socioecomics_work">
+                                        <newline/>
+                                        <field name="works_at_home"/>
+                                        <field name="hours_outside"/>
+                                        <field name="hostile_area"/>
+                                    </group>
+                                    <newline/>
+                                    <newline/>
+                                    <group string="Notes" id="group_ses_notes">
+                                        <field colspan="4" name="ses_notes"/>
+                                    </group>
+                                </page>
+                                <page string="Infrastructure" id="page_infrastructure">
+
+                                    <group colspan="4" col="8" id="group_ses_infraestructure">
+                                        <field name="sewers"/>
+                                        <field name="water"/>
+                                        <field name="trash"/>
+                                        <field name="electricity"/>
+                                        <field name="gas"/>
+                                        <field name="telephone"/>
+                                        <field name="television"/>
+                                        <field name="internet"/>
+
+                                    </group>
+                                </page>
+                                <page string="Family" id="page_family">
+                                    <group colspan="4" col="6" string="Family APGAR" id="group_ses_family_apgar">
+                                        <field name="fam_apgar_help" />
+                                        <field name="fam_apgar_discussion"/>
+                                        <field name="fam_apgar_decisions"/>
+                                        <field name="fam_apgar_timesharing"/>
+                                        <field name="fam_apgar_affection"/>
+                                        <field name="fam_apgar_score"/>
+                                    </group>
+                                    <newline/>
+                                    <group colspan="4" col="8" string="Other Family Issues" id="group_ses_other_family_issues">
+                                        <field name="single_parent"/>
+                                        <field name="domestic_violence"/>
+                                        <field name="working_children"/>
+                                        <field name="teenage_pregnancy"/>
+                                        <field name="sexual_abuse"/>
+                                        <field name="drug_addiction"/>
+                                        <field name="school_withdrawal"/>
+                                        <field name="prison_past"/>
+                                        <field name="prison_current"/>
+                                        <field name="relative_in_prison"/>
+                                    </group>
+                                </page>
+                            </notebook>
+                        </page>
+                    </xpath>
+                </data>
+            </field>
+        </record>
+
+	</data>
+</openerp>


Follow ups