diff --git a/netforce_clinic/actions/clinic_hd_case_dlz.xml b/netforce_clinic/actions/clinic_hd_case_dlz.xml new file mode 100644 index 0000000..1791768 --- /dev/null +++ b/netforce_clinic/actions/clinic_hd_case_dlz.xml @@ -0,0 +1,6 @@ + + New Dialyzer + form_popup + clinic.hd.case.popup.dlz + _popup + diff --git a/netforce_clinic/actions/clinic_patient_cycle.xml b/netforce_clinic/actions/clinic_patient_cycle.xml new file mode 100644 index 0000000..40366c4 --- /dev/null +++ b/netforce_clinic/actions/clinic_patient_cycle.xml @@ -0,0 +1,7 @@ + + Patient Cycles + multi_view + clinic.patient.cycle + clinic_menu + 25 + diff --git a/netforce_clinic/layouts/clinic_hd_case_dlz_form.xml b/netforce_clinic/layouts/clinic_hd_case_dlz_form.xml new file mode 100644 index 0000000..9614809 --- /dev/null +++ b/netforce_clinic/layouts/clinic_hd_case_dlz_form.xml @@ -0,0 +1,7 @@ +
+ + + + diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml index 4c1f796..5f1e2cc 100644 --- a/netforce_clinic/layouts/clinic_menu.xml +++ b/netforce_clinic/layouts/clinic_menu.xml @@ -17,6 +17,7 @@
+ diff --git a/netforce_clinic/layouts/clinic_patient_cycle_form.xml b/netforce_clinic/layouts/clinic_patient_cycle_form.xml new file mode 100644 index 0000000..74705a0 --- /dev/null +++ b/netforce_clinic/layouts/clinic_patient_cycle_form.xml @@ -0,0 +1,5 @@ +
+ + + + diff --git a/netforce_clinic/layouts/clinic_patient_cycle_list.xml b/netforce_clinic/layouts/clinic_patient_cycle_list.xml new file mode 100644 index 0000000..c87580a --- /dev/null +++ b/netforce_clinic/layouts/clinic_patient_cycle_list.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/netforce_clinic/layouts/clinic_patient_form.xml b/netforce_clinic/layouts/clinic_patient_form.xml index 468427c..09b6ecf 100644 --- a/netforce_clinic/layouts/clinic_patient_form.xml +++ b/netforce_clinic/layouts/clinic_patient_form.xml @@ -45,7 +45,12 @@ - + + + + + + diff --git a/netforce_clinic/layouts/clinic_patient_list.xml b/netforce_clinic/layouts/clinic_patient_list.xml index 61bd72e..5cad13f 100644 --- a/netforce_clinic/layouts/clinic_patient_list.xml +++ b/netforce_clinic/layouts/clinic_patient_list.xml @@ -10,6 +10,5 @@ - diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py index 389f9e3..9252a10 100644 --- a/netforce_clinic/models/__init__.py +++ b/netforce_clinic/models/__init__.py @@ -15,6 +15,7 @@ from . import partner from . import patient from . import patient_type from . import patient_categ +from . import patient_cycle from . import patient_cause from . import patient_comorbidity from . import patient_morbidity diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index 450195b..3c156ed 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -71,8 +71,8 @@ class HDCase(Model): "number": fields.Char("Number",required=True,search=True), 'sickbed_id': fields.Many2One("clinic.sickbed",'Sickbed'), "ref": fields.Char("Ref",search=True), - "time_start": fields.DateTime("Start Time",required=True,search=True), - "time_stop": fields.DateTime("Finish Time",required=True,search=True), + "time_start": fields.DateTime("Start Time",required=True), + "time_stop": fields.DateTime("Finish Time",required=True), "date": fields.Date("Date",required=True,search=True), "patient_id": fields.Many2One("clinic.patient","Patient",required=True,search=True), "patient_type_id": fields.Many2One("clinic.patient.type", "Type",function="_get_patient_type"), diff --git a/netforce_clinic/models/hd_case_popup_dlz.py b/netforce_clinic/models/hd_case_popup_dlz.py index e6158d0..2ea1132 100644 --- a/netforce_clinic/models/hd_case_popup_dlz.py +++ b/netforce_clinic/models/hd_case_popup_dlz.py @@ -6,7 +6,11 @@ class HDCasePopupDlz(Model): _fields={ "hd_case_id": fields.Many2One("clinic.hd.case","HdCase",required=True,on_delete="cascade"), - "note": fields.Text("Description"), + 'product_id': fields.Many2One("product", "Product",required=True), + "dialyzer_type": fields.Selection([("low","low flux"),("high","high flux"),("dbl","dbl hifulx")],"Dialyzer Type"), + "max_use_time": fields.Integer("Max Use Time"), + "exp_date": fields.Date("Expiry Date"), + "note": fields.Text("Note"), } def _get_hd_case_id(self,context={}): diff --git a/netforce_clinic/models/patient.py b/netforce_clinic/models/patient.py index 36b2fcf..eea23f7 100644 --- a/netforce_clinic/models/patient.py +++ b/netforce_clinic/models/patient.py @@ -100,7 +100,7 @@ class Patient(Model): 'department_id': fields.Many2One("clinic.department","Department"), 'cycle_id': fields.Many2One("clinic.cycle","Last Cycle",function="_get_last_cycle"), 'branch_id': fields.Many2One("clinic.branch","Branch",search=True), - 'cycles': fields.Many2Many("clinic.cycle","Cycles"), + 'cycles': fields.One2Many("clinic.patient.cycle","patient_id", "Cycles"), } def _get_number(self,context={}): diff --git a/netforce_clinic/models/patient_cycle.py b/netforce_clinic/models/patient_cycle.py new file mode 100644 index 0000000..4a964e9 --- /dev/null +++ b/netforce_clinic/models/patient_cycle.py @@ -0,0 +1,14 @@ +from netforce.model import Model, fields + +class PatientCycle(Model): + _name="clinic.patient.cycle" + _string="Patient Cycle" + _key=['patient_id','cycle_id','day'] + + _fields={ + "patient_id": fields.Many2One('clinic.patient',"Patient",required=True,on_delete="cascade",search=True), + "cycle_id": fields.Many2One('clinic.cycle',"Cycle",search=True), + 'day': fields.Selection([('mon', 'Monday'), ('tue','Tuesday'), ('wed','Wedsday'),('thu','Thursday'),('fri','Friday'),('sat','Satherday'),('sun','Sunday')], 'Days',search=True), + } + +PatientCycle.register()