From 534b172e4dc71fd6f66762c75a969fb567ff435b Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Wed, 1 Oct 2014 23:59:35 +0700 Subject: [PATCH] rename --- .../actions/clinic_cause_chronic.xml | 6 ++++ .../layouts/clinic_cause_chronic_form.xml | 5 ++++ .../layouts/clinic_cause_chronic_list.xml | 5 ++++ netforce_clinic/layouts/clinic_menu.xml | 1 + .../layouts/clinic_patient_form.xml | 21 ++++--------- netforce_clinic/models/__init__.py | 30 ++++++++++--------- netforce_clinic/models/cause_chronic.py | 17 +++++++++++ .../{clinic_department.py => department.py} | 0 .../{clinic_dialyzer.py => dialyzer.py} | 0 .../models/{clinic_doctor.py => doctor.py} | 0 .../{clinic_education.py => education.py} | 0 .../{clinic_graduation.py => graduation.py} | 0 .../models/{clinic_hd_case.py => hd_case.py} | 0 ...clinic_hd_case_line.py => hd_case_line.py} | 0 ..._line_detail.py => hd_case_line_detail.py} | 0 .../models/{clinic_nation.py => nation.py} | 0 .../models/{clinic_nurse.py => nurse.py} | 0 .../models/{clinic_patient.py => patient.py} | 18 +---------- netforce_clinic/models/patient_cause_line.py | 18 +++++++++++ .../models/{clinic_race.py => race.py} | 0 .../models/{clinic_setting.py => setting.py} | 0 .../models/{clinic_visit.py => visit.py} | 0 22 files changed, 75 insertions(+), 46 deletions(-) create mode 100644 netforce_clinic/actions/clinic_cause_chronic.xml create mode 100644 netforce_clinic/layouts/clinic_cause_chronic_form.xml create mode 100644 netforce_clinic/layouts/clinic_cause_chronic_list.xml create mode 100644 netforce_clinic/models/cause_chronic.py rename netforce_clinic/models/{clinic_department.py => department.py} (100%) rename netforce_clinic/models/{clinic_dialyzer.py => dialyzer.py} (100%) rename netforce_clinic/models/{clinic_doctor.py => doctor.py} (100%) rename netforce_clinic/models/{clinic_education.py => education.py} (100%) rename netforce_clinic/models/{clinic_graduation.py => graduation.py} (100%) rename netforce_clinic/models/{clinic_hd_case.py => hd_case.py} (100%) rename netforce_clinic/models/{clinic_hd_case_line.py => hd_case_line.py} (100%) rename netforce_clinic/models/{clinic_hd_case_line_detail.py => hd_case_line_detail.py} (100%) rename netforce_clinic/models/{clinic_nation.py => nation.py} (100%) rename netforce_clinic/models/{clinic_nurse.py => nurse.py} (100%) rename netforce_clinic/models/{clinic_patient.py => patient.py} (89%) create mode 100644 netforce_clinic/models/patient_cause_line.py rename netforce_clinic/models/{clinic_race.py => race.py} (100%) rename netforce_clinic/models/{clinic_setting.py => setting.py} (100%) rename netforce_clinic/models/{clinic_visit.py => visit.py} (100%) diff --git a/netforce_clinic/actions/clinic_cause_chronic.xml b/netforce_clinic/actions/clinic_cause_chronic.xml new file mode 100644 index 0000000..2f10ba5 --- /dev/null +++ b/netforce_clinic/actions/clinic_cause_chronic.xml @@ -0,0 +1,6 @@ + + CauseChronics + multi_view + clinic.cause.chronic + clinic_menu + diff --git a/netforce_clinic/layouts/clinic_cause_chronic_form.xml b/netforce_clinic/layouts/clinic_cause_chronic_form.xml new file mode 100644 index 0000000..04f7ada --- /dev/null +++ b/netforce_clinic/layouts/clinic_cause_chronic_form.xml @@ -0,0 +1,5 @@ +
+ + + + diff --git a/netforce_clinic/layouts/clinic_cause_chronic_list.xml b/netforce_clinic/layouts/clinic_cause_chronic_list.xml new file mode 100644 index 0000000..f1a3f27 --- /dev/null +++ b/netforce_clinic/layouts/clinic_cause_chronic_list.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml index 9f3d64b..293dc06 100644 --- a/netforce_clinic/layouts/clinic_menu.xml +++ b/netforce_clinic/layouts/clinic_menu.xml @@ -13,6 +13,7 @@ + diff --git a/netforce_clinic/layouts/clinic_patient_form.xml b/netforce_clinic/layouts/clinic_patient_form.xml index 22c1431..13e8069 100644 --- a/netforce_clinic/layouts/clinic_patient_form.xml +++ b/netforce_clinic/layouts/clinic_patient_form.xml @@ -52,21 +52,12 @@ - - - - - - - - - - - - - - - + + + + + + diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py index 0eb736e..6030d75 100644 --- a/netforce_clinic/models/__init__.py +++ b/netforce_clinic/models/__init__.py @@ -1,14 +1,16 @@ -from . import clinic_patient -from . import clinic_doctor -from . import clinic_nurse -from . import clinic_visit -from . import clinic_hd_case -from . import clinic_hd_case_line -from . import clinic_hd_case_line_detail -from . import clinic_dialyzer -from . import clinic_department -from . import clinic_education -from . import clinic_setting -from . import clinic_graduation -from . import clinic_nation -from . import clinic_race +from . import patient +from . import patient_cause_line +from . import doctor +from . import nurse +from . import visit +from . import hd_case +from . import hd_case_line +from . import hd_case_line_detail +from . import dialyzer +from . import department +from . import education +from . import setting +from . import graduation +from . import nation +from . import race +from . import cause_chronic diff --git a/netforce_clinic/models/cause_chronic.py b/netforce_clinic/models/cause_chronic.py new file mode 100644 index 0000000..788fd0b --- /dev/null +++ b/netforce_clinic/models/cause_chronic.py @@ -0,0 +1,17 @@ +from netforce.model import Model, fields + +class CauseChronic(Model): + _name="clinic.cause.chronic" + _string="Cause Chronic" + + _fields={ + "name": fields.Char("Name",required=True,search=True), + 'default': fields.Boolean("Default"), + 'sequence': fields.Integer("Sequence"), + } + + _defaults={ + 'sequence': 0, + } + +CauseChronic.register() diff --git a/netforce_clinic/models/clinic_department.py b/netforce_clinic/models/department.py similarity index 100% rename from netforce_clinic/models/clinic_department.py rename to netforce_clinic/models/department.py diff --git a/netforce_clinic/models/clinic_dialyzer.py b/netforce_clinic/models/dialyzer.py similarity index 100% rename from netforce_clinic/models/clinic_dialyzer.py rename to netforce_clinic/models/dialyzer.py diff --git a/netforce_clinic/models/clinic_doctor.py b/netforce_clinic/models/doctor.py similarity index 100% rename from netforce_clinic/models/clinic_doctor.py rename to netforce_clinic/models/doctor.py diff --git a/netforce_clinic/models/clinic_education.py b/netforce_clinic/models/education.py similarity index 100% rename from netforce_clinic/models/clinic_education.py rename to netforce_clinic/models/education.py diff --git a/netforce_clinic/models/clinic_graduation.py b/netforce_clinic/models/graduation.py similarity index 100% rename from netforce_clinic/models/clinic_graduation.py rename to netforce_clinic/models/graduation.py diff --git a/netforce_clinic/models/clinic_hd_case.py b/netforce_clinic/models/hd_case.py similarity index 100% rename from netforce_clinic/models/clinic_hd_case.py rename to netforce_clinic/models/hd_case.py diff --git a/netforce_clinic/models/clinic_hd_case_line.py b/netforce_clinic/models/hd_case_line.py similarity index 100% rename from netforce_clinic/models/clinic_hd_case_line.py rename to netforce_clinic/models/hd_case_line.py diff --git a/netforce_clinic/models/clinic_hd_case_line_detail.py b/netforce_clinic/models/hd_case_line_detail.py similarity index 100% rename from netforce_clinic/models/clinic_hd_case_line_detail.py rename to netforce_clinic/models/hd_case_line_detail.py diff --git a/netforce_clinic/models/clinic_nation.py b/netforce_clinic/models/nation.py similarity index 100% rename from netforce_clinic/models/clinic_nation.py rename to netforce_clinic/models/nation.py diff --git a/netforce_clinic/models/clinic_nurse.py b/netforce_clinic/models/nurse.py similarity index 100% rename from netforce_clinic/models/clinic_nurse.py rename to netforce_clinic/models/nurse.py diff --git a/netforce_clinic/models/clinic_patient.py b/netforce_clinic/models/patient.py similarity index 89% rename from netforce_clinic/models/clinic_patient.py rename to netforce_clinic/models/patient.py index 4c23256..e0c121f 100644 --- a/netforce_clinic/models/clinic_patient.py +++ b/netforce_clinic/models/patient.py @@ -59,23 +59,7 @@ class Patient(Model): "waiting_transplantation": fields.Selection([("yes","Yes"),("no","No")],"Kidney Transplantation Waiting ?"), "who_transplantation": fields.Char("Who is Transplantation?"), "reason_of_chronic_renal_failure": fields.Char("Reason chronic renal failure ?"), - "ac_mi": fields.Boolean("Acute MI"), - "co_an": fields.Boolean("Coronary Angioplasty"), - "ce_ac": fields.Boolean("Cerebrovascular Accident"), - "pvd": fields.Boolean("PVD or Amputation"), - "co_he": fields.Boolean("Congestive heart failure"), - "hypertnsion": fields.Boolean("Hypertension"), - "dia": fields.Boolean("Diabetes"), - "copd": fields.Boolean("Copd"), - "asthma": fields.Boolean("Asthma"), - "pul_tub": fields.Boolean("Pulmonary tuberculosis"), - "cancer": fields.Boolean("Cancer"), - "cirrhosis": fields.Boolean("Cirrhosis"), - "dyslip": fields.Boolean("Dyslipidemia"), - "prca": fields.Boolean("PRCA"), - "hyperucemia": fields.Boolean("Hyperurinencemia"), - "cga": fields.Boolean("Chronic gouty arthitis"), - "parathy": fields.Boolean("Parathyroidectomy"), + '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"), diff --git a/netforce_clinic/models/patient_cause_line.py b/netforce_clinic/models/patient_cause_line.py new file mode 100644 index 0000000..1cecb33 --- /dev/null +++ b/netforce_clinic/models/patient_cause_line.py @@ -0,0 +1,18 @@ +import time + +from netforce.model import Model, fields + +class PatientCauseLine(Model): + _name="clinic.patient.cause.line" + _string="Patient Cause Line" + _fields={ + "patient_id": fields.Many2One("clinic.patient","Patient",required=True), + "cause_id": fields.Many2One("clinic.cause.chronic","Cause"), + "date_cause": fields.Date("Date Cause"), + } + + _defaults={ + 'date_cause': lambda *a: time.strftime("%Y-%m-%d"), + } + +PatientCauseLine.register() diff --git a/netforce_clinic/models/clinic_race.py b/netforce_clinic/models/race.py similarity index 100% rename from netforce_clinic/models/clinic_race.py rename to netforce_clinic/models/race.py diff --git a/netforce_clinic/models/clinic_setting.py b/netforce_clinic/models/setting.py similarity index 100% rename from netforce_clinic/models/clinic_setting.py rename to netforce_clinic/models/setting.py diff --git a/netforce_clinic/models/clinic_visit.py b/netforce_clinic/models/visit.py similarity index 100% rename from netforce_clinic/models/clinic_visit.py rename to netforce_clinic/models/visit.py