diff --git a/netforce_clinic/actions/clinic_print_visit.xml.old b/netforce_clinic/actions/clinic_print_visit.xml.old new file mode 100644 index 0000000..8c205b0 --- /dev/null +++ b/netforce_clinic/actions/clinic_print_visit.xml.old @@ -0,0 +1,6 @@ + + report_odt + clinic.visit + get_visit_demo + visit_demo + diff --git a/netforce_clinic/actions/clinic_round.xml b/netforce_clinic/actions/clinic_round.xml new file mode 100644 index 0000000..d0f1103 --- /dev/null +++ b/netforce_clinic/actions/clinic_round.xml @@ -0,0 +1,6 @@ + + Nationalities + multi_view + clinic.round + clinic_menu + diff --git a/netforce_clinic/actions/report_clinic_round.xml b/netforce_clinic/actions/report_clinic_round.xml new file mode 100644 index 0000000..23d58f7 --- /dev/null +++ b/netforce_clinic/actions/report_clinic_round.xml @@ -0,0 +1,6 @@ + + report_odt + clinic.round + get_data + round + diff --git a/netforce_clinic/actions/report_visit_form.xml b/netforce_clinic/actions/report_visit_form.xml new file mode 100644 index 0000000..b4d0107 --- /dev/null +++ b/netforce_clinic/actions/report_visit_form.xml @@ -0,0 +1,5 @@ + + report_odt2 + clinic.visit + visit_form + diff --git a/netforce_clinic/layouts/clinic_hd_case_form.xml b/netforce_clinic/layouts/clinic_hd_case_form.xml index c8cc40b..623dedf 100644 --- a/netforce_clinic/layouts/clinic_hd_case_form.xml +++ b/netforce_clinic/layouts/clinic_hd_case_form.xml @@ -5,43 +5,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -53,13 +41,22 @@ - - - - - + + + + + + + + + + + + + + diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml index ea97292..bcbd254 100644 --- a/netforce_clinic/layouts/clinic_menu.xml +++ b/netforce_clinic/layouts/clinic_menu.xml @@ -9,7 +9,7 @@ - + diff --git a/netforce_clinic/layouts/clinic_visit_form.xml b/netforce_clinic/layouts/clinic_visit_form.xml index dd03a20..e11120f 100644 --- a/netforce_clinic/layouts/clinic_visit_form.xml +++ b/netforce_clinic/layouts/clinic_visit_form.xml @@ -1,7 +1,7 @@
- diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py index 07648b8..09f9fb8 100644 --- a/netforce_clinic/models/__init__.py +++ b/netforce_clinic/models/__init__.py @@ -18,3 +18,4 @@ from . import graduation from . import nation from . import race from . import cause_chronic +from . import clinic_round diff --git a/netforce_clinic/models/clinic_round.py b/netforce_clinic/models/clinic_round.py new file mode 100644 index 0000000..40854ec --- /dev/null +++ b/netforce_clinic/models/clinic_round.py @@ -0,0 +1,27 @@ +from netforce.model import Model, fields + +class ClinicRound(Model): + _name="clinic.round" + _string="Round" + + _fields={ + "name": fields.Char("Name",required=True,search=True), + } + + def get_data(self,context={}): + lines=[] + for i in range(10): + line={ + 'no': i, + 'doctor': 'Doctor %s'%i, + #...... + } + lines.append(line) + + data={ + 'lines': lines, + } + print('data ', data) + return data + +ClinicRound.register() diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index 9485b0b..29201b4 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -28,7 +28,7 @@ class HDcase(Model): "doctor_id": fields.Many2One("clinic.doctor","Doctor", required=True,search=True), "nurse_id": fields.Many2One("clinic.nurse","Nurse", required=True,search=True), "date_start": fields.DateTime("Time start",required=True,search=True), - "date_stop": fields.DateTime("Time stop",required=True,search=True), + "date_stop": fields.DateTime("Time stop",required=True,search=True), "department_id": fields.Many2One("clinic.department", "Department",search=True), "wh_start": fields.Float("Wt.Kg start"), "wh_stop": fields.Float("Wt.Kg stop"), @@ -36,7 +36,11 @@ class HDcase(Model): "per_bp_start": fields.Integer("/Per start"), "bp_stop": fields.Integer("BP mmHG stop"), "per_bp_stop": fields.Integer("/Per stop"), - "hct": fields.Integer("HCT %"), + "epo_tn" : fields.Char("EpoTn (Drug name)"), + "epo_unit" : fields.Integer("EpoUnit (Unit of Used drug)"), + "hct": fields.Integer("HCT %", required=True), + "check_goverment_pay" : fields.Boolean("The Government Pay"), + "check_personal_pay" : fields.Boolean("Pay yourself"), "state": fields.Selection([("draft","Draft"),("confirmed","Confirmed"),("approved","Approved"),("cancelled","Cancelled"),("paid","Paid")],"Status",required=True), "dialyzers": fields.One2Many("clinic.hd.case.dialyzer","hd_case_id","Dializers"), "lines": fields.One2Many("clinic.hd.case.line","hd_case_id","Lines"), @@ -150,6 +154,13 @@ class HDcase(Model): data['total']=total return data + def onchange_htc(self,context={}): + data=context['htc'] + total=0.0 + if (htc > 39): + data['htc']=total + return data + def cancelled(self,ids,context={}): obj=self.browse(ids)[0] obj.write({"state":"cancelled"}) diff --git a/netforce_clinic/models/visit.py b/netforce_clinic/models/visit.py index f3a54c6..a38c367 100644 --- a/netforce_clinic/models/visit.py +++ b/netforce_clinic/models/visit.py @@ -169,6 +169,17 @@ class Visit(Model): }, 'flash': 'Visit %s is copy to %s'%(obj.number,new_obj.number), } + + + def get_visit_demo(self,context={}): + if not context.get('number'): + return {} + visit_id=int(context['number']) + visit=self.browse(visit_id) + data={ + 'number' : visit.number + } + return data Visit.register() diff --git a/netforce_clinic/reports/round.odt b/netforce_clinic/reports/round.odt new file mode 100644 index 0000000..1aee725 Binary files /dev/null and b/netforce_clinic/reports/round.odt differ diff --git a/netforce_clinic/reports/visit_form.odt b/netforce_clinic/reports/visit_form.odt new file mode 100644 index 0000000..7159b61 Binary files /dev/null and b/netforce_clinic/reports/visit_form.odt differ diff --git a/netforce_clinic/templates/round.hbs b/netforce_clinic/templates/round.hbs new file mode 100644 index 0000000..8813e52 --- /dev/null +++ b/netforce_clinic/templates/round.hbs @@ -0,0 +1 @@ +

Hello HBS