diff --git a/netforce_clinic/actions/clinic_comorbidity.xml b/netforce_clinic/actions/clinic_comorbidity.xml new file mode 100644 index 0000000..322d1ae --- /dev/null +++ b/netforce_clinic/actions/clinic_comorbidity.xml @@ -0,0 +1,6 @@ + + Comorbidities + multi_view + clinic.comorbidity + clinic_menu + diff --git a/netforce_clinic/actions/clinic_morbidity.xml b/netforce_clinic/actions/clinic_morbidity.xml new file mode 100644 index 0000000..c547d08 --- /dev/null +++ b/netforce_clinic/actions/clinic_morbidity.xml @@ -0,0 +1,6 @@ + + Morbidities + multi_view + clinic.morbidity + clinic_menu + diff --git a/netforce_clinic/layouts/clinic_comorbidity_form.xml b/netforce_clinic/layouts/clinic_comorbidity_form.xml new file mode 100644 index 0000000..c53b88a --- /dev/null +++ b/netforce_clinic/layouts/clinic_comorbidity_form.xml @@ -0,0 +1,3 @@ +
+ + diff --git a/netforce_clinic/layouts/clinic_comorbidity_list.xml b/netforce_clinic/layouts/clinic_comorbidity_list.xml new file mode 100644 index 0000000..60c4d5e --- /dev/null +++ b/netforce_clinic/layouts/clinic_comorbidity_list.xml @@ -0,0 +1,3 @@ + + + diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml index 293dc06..085f9c8 100644 --- a/netforce_clinic/layouts/clinic_menu.xml +++ b/netforce_clinic/layouts/clinic_menu.xml @@ -14,6 +14,8 @@ + + diff --git a/netforce_clinic/layouts/clinic_morbidity_form.xml b/netforce_clinic/layouts/clinic_morbidity_form.xml new file mode 100644 index 0000000..05a78c9 --- /dev/null +++ b/netforce_clinic/layouts/clinic_morbidity_form.xml @@ -0,0 +1,3 @@ +
+ + diff --git a/netforce_clinic/layouts/clinic_morbidity_list.xml b/netforce_clinic/layouts/clinic_morbidity_list.xml new file mode 100644 index 0000000..87709e0 --- /dev/null +++ b/netforce_clinic/layouts/clinic_morbidity_list.xml @@ -0,0 +1,3 @@ + + + diff --git a/netforce_clinic/layouts/clinic_patient_form.xml b/netforce_clinic/layouts/clinic_patient_form.xml index 13e8069..505d378 100644 --- a/netforce_clinic/layouts/clinic_patient_form.xml +++ b/netforce_clinic/layouts/clinic_patient_form.xml @@ -61,30 +61,23 @@ - - - - - - - - - - - - - - - - - + + + + + + + - - - - + + + + + + + diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py index 6030d75..d10c368 100644 --- a/netforce_clinic/models/__init__.py +++ b/netforce_clinic/models/__init__.py @@ -1,5 +1,9 @@ +from . import comorbidity +from . import morbidity from . import patient from . import patient_cause_line +from . import patient_comorbidity_line +from . import patient_morbidity_line from . import doctor from . import nurse from . import visit diff --git a/netforce_clinic/models/comorbidity.py b/netforce_clinic/models/comorbidity.py new file mode 100644 index 0000000..af156f8 --- /dev/null +++ b/netforce_clinic/models/comorbidity.py @@ -0,0 +1,11 @@ +from netforce.model import Model, fields + +class Comorbidity(Model): + _name="clinic.comorbidity" + _string="Comorbidity" + + _fields={ + "name": fields.Char("Name",required=True,search=True), + } + +Comorbidity.register() diff --git a/netforce_clinic/models/morbidity.py b/netforce_clinic/models/morbidity.py new file mode 100644 index 0000000..83305d8 --- /dev/null +++ b/netforce_clinic/models/morbidity.py @@ -0,0 +1,11 @@ +from netforce.model import Model, fields + +class Morbidity(Model): + _name="clinic.morbidity" + _string="Morbidity" + + _fields={ + "name": fields.Char("Name",required=True,search=True), + } + +Morbidity.register() diff --git a/netforce_clinic/models/patient.py b/netforce_clinic/models/patient.py index e0c121f..d1b0f7f 100644 --- a/netforce_clinic/models/patient.py +++ b/netforce_clinic/models/patient.py @@ -45,7 +45,6 @@ class Patient(Model): "nation_id": fields.Many2One("clinic.nation","Nationality"), "race_id": fields.Many2One("clinic.race","Race"), "grad_id": fields.Many2One("clinic.graduation","Graduation"), - #Patient's + "smoke": fields.Selection([("never","Never"),("stopped","Stopped"),("smoked","Smoked")],"Smoking"), "withdrawal" : fields.Selection([("social_security","Social Security"),("health_insurance","Health Insurance"),("etc","ETC.")],"Right of withdrawal"), "first_treatment" : fields.Selection([("hd","HD"),("test","Test")], "First treatment"), @@ -61,29 +60,10 @@ class Patient(Model): "reason_of_chronic_renal_failure": fields.Char("Reason chronic renal failure ?"), 'cause_lines': fields.One2Many("clinic.patient.cause.line","patient_id","Cause Line"), #Co-marbid - "check1" : fields.Boolean("The patient had been diagnosed, Acute MI or Unstable angina"), - "check2" : fields.Boolean("The patient had been diagnosed, Coronary angioplasty or CABG"), - "check3" : fields.Boolean("The patient had been diagnosed, Cerebrovascular accident"), - "check4" : fields.Boolean("The patient had been diagnosed, PVD or Amputation"), - "check5" : fields.Boolean("The patient had been diagnosed, Congestive heart failure"), - "check6" : fields.Boolean("The patient had been diagnosed, Hypertension"), - "check7" : fields.Boolean("The patient had been diagnosed, Diabetes"), - "check8" : fields.Boolean("The patient had been diagnosed, COPD"), - "check9" : fields.Boolean("The patient had been diagnosed, Asthma"), - "check10" : fields.Boolean("The patient had been diagnosed, Pulmonary tuberculosis"), - "check11" : fields.Boolean("The patient had been diagnosed, of cancer"), - "check12" : fields.Boolean("The patient had been diagnosed, Cirrhosis"), - "check13" : fields.Boolean("The patient had been diagnosed, Dyslipidemia"), - "check14" : fields.Boolean("The patient had been diagnosed, PRCA"), - "check15" : fields.Boolean("The patient had been diagnosed, Hyperurinecemia"), - "check16" : fields.Boolean("The patient had been diagnosed, Chronic gouty arthitis"), - "check17" : fields.Boolean("The patient had been diagnosed, Parathyroidectomy"), #"comarbid" : fields.char("Co-morbid Other"), + 'comorbility_lines': fields.One2Many("clinic.patient.comorbidity.line","patient_id","Comorbility"), #Morbidity - "check18" : fields.Boolean("Ischemic Heart Disease"), - "check19" : fields.Boolean("Of cancer"), - "check20" : fields.Boolean("Cerebrovascular accident"), - "comarbid2": fields.Char("Co-morbid Other"), + 'morbility_lines': fields.One2Many("clinic.patient.morbidity.line","patient_id","Morbility"), #Healthcare "comments": fields.One2Many("message","related_id","Comments"), "company_id": fields.Many2One("company","Company"), diff --git a/netforce_clinic/models/patient_cause_line.py b/netforce_clinic/models/patient_cause_line.py index 1cecb33..aafe330 100644 --- a/netforce_clinic/models/patient_cause_line.py +++ b/netforce_clinic/models/patient_cause_line.py @@ -6,7 +6,7 @@ class PatientCauseLine(Model): _name="clinic.patient.cause.line" _string="Patient Cause Line" _fields={ - "patient_id": fields.Many2One("clinic.patient","Patient",required=True), + "patient_id": fields.Many2One("clinic.patient","Patient",required=True,on_delete="cascade"), "cause_id": fields.Many2One("clinic.cause.chronic","Cause"), "date_cause": fields.Date("Date Cause"), } diff --git a/netforce_clinic/models/patient_comorbidity_line.py b/netforce_clinic/models/patient_comorbidity_line.py new file mode 100644 index 0000000..90c7529 --- /dev/null +++ b/netforce_clinic/models/patient_comorbidity_line.py @@ -0,0 +1,19 @@ +import time + +from netforce.model import Model, fields + +class PatientComorbidityLine(Model): + _name="clinic.patient.comorbidity.line" + _string="Patient Patient Comorbidity Line" + _fields={ + "patient_id": fields.Many2One("clinic.patient","Patient",required=True,on_delete="cascade"), + "comorbility_id": fields.Many2One("clinic.comorbidity","Comorbidity"), + "ans": fields.Selection([['yes','Yes'],['no','No']], "Answer"), + "analysis_date": fields.Date("Analysis Date"), + } + + _defaults={ + 'ans': "no", + } + +PatientComorbidityLine.register() diff --git a/netforce_clinic/models/patient_morbidity_line.py b/netforce_clinic/models/patient_morbidity_line.py new file mode 100644 index 0000000..f9fc7cc --- /dev/null +++ b/netforce_clinic/models/patient_morbidity_line.py @@ -0,0 +1,17 @@ +from netforce.model import Model, fields + +class PatientMorbidityLine(Model): + _name="clinic.patient.morbidity.line" + _string="Patient Patient Morbidity Line" + _fields={ + "patient_id": fields.Many2One("clinic.patient","Patient",required=True,on_delete="cascade"), + "morbility_id": fields.Many2One("clinic.comorbidity","Morbidity"), + "ans": fields.Selection([['yes','Yes'],['no','No']], "Answer"), + "analysis_date": fields.Date("Analysis Date"), + } + + _defaults={ + 'ans': "no", + } + +PatientMorbidityLine.register()