diff --git a/clinic.egg-info/SOURCES.txt b/clinic.egg-info/SOURCES.txt index ae6f6a2..0790ecb 100644 --- a/clinic.egg-info/SOURCES.txt +++ b/clinic.egg-info/SOURCES.txt @@ -7,6 +7,7 @@ clinic.egg-info/dependency_links.txt clinic.egg-info/top_level.txt clinic/controllers/__init__.py clinic/models/__init__.py +clinic/models/clinic_dialyzer.py clinic/models/clinic_doctor.py clinic/models/clinic_hd_case.py clinic/models/clinic_hd_case_line.py diff --git a/clinic/layouts/clinic_dialyzer_form.xml b/clinic/layouts/clinic_dialyzer_form.xml index 2219db9..e9e78af 100644 --- a/clinic/layouts/clinic_dialyzer_form.xml +++ b/clinic/layouts/clinic_dialyzer_form.xml @@ -11,6 +11,10 @@ + + + + diff --git a/clinic/layouts/clinic_hd_case_form.xml b/clinic/layouts/clinic_hd_case_form.xml index 897829a..e215b9f 100644 --- a/clinic/layouts/clinic_hd_case_form.xml +++ b/clinic/layouts/clinic_hd_case_form.xml @@ -7,20 +7,41 @@ - + + + + + + + + + - + + + + + + + + + + + + + + diff --git a/clinic/layouts/clinic_hd_case_list.xml b/clinic/layouts/clinic_hd_case_list.xml index 9a65cb9..95ccdf2 100644 --- a/clinic/layouts/clinic_hd_case_list.xml +++ b/clinic/layouts/clinic_hd_case_list.xml @@ -1,7 +1,9 @@ - + + + diff --git a/clinic/layouts/clinic_patient_form.xml b/clinic/layouts/clinic_patient_form.xml index 2591afe..b4468be 100644 --- a/clinic/layouts/clinic_patient_form.xml +++ b/clinic/layouts/clinic_patient_form.xml @@ -9,6 +9,7 @@ + diff --git a/clinic/models/__init__.py b/clinic/models/__init__.py index 487c30a..27cbf6e 100644 --- a/clinic/models/__init__.py +++ b/clinic/models/__init__.py @@ -4,4 +4,5 @@ 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 diff --git a/clinic/models/__pycache__/__init__.cpython-32.pyc b/clinic/models/__pycache__/__init__.cpython-32.pyc index db91871..dc1600b 100644 Binary files a/clinic/models/__pycache__/__init__.cpython-32.pyc and b/clinic/models/__pycache__/__init__.cpython-32.pyc differ diff --git a/clinic/models/__pycache__/clinic_patient.cpython-32.pyc b/clinic/models/__pycache__/clinic_patient.cpython-32.pyc index 4ca1f42..53b3103 100644 Binary files a/clinic/models/__pycache__/clinic_patient.cpython-32.pyc and b/clinic/models/__pycache__/clinic_patient.cpython-32.pyc differ diff --git a/clinic/models/clinic_dialyzer.py b/clinic/models/clinic_dialyzer.py index a6ce913..a557e7c 100644 --- a/clinic/models/clinic_dialyzer.py +++ b/clinic/models/clinic_dialyzer.py @@ -18,7 +18,11 @@ class Dialyzer(Model): "max_use_time": fields.Integer("Max Use Time"), "exp_date": fields.Date("Expire Date",search=True), "patient_id": fields.Many2One("clinic.patient","Patient"), - "state": fields.Selection([("draft","Draft"),("active","Active"),("drop","Drop")],"Status",required=True), + "member_type": fields.Selection([("unsub","Unsub cellul"),("sub","Sub cellul"),("synthetic","Synthetic")],"Member Type",required=True), + "dialyzer_type": fields.Selection([("low","low flux"),("high","high flux"),("dbl","dbl hifulx")],"Member Type",required=True), + "bid_flow_rate": fields.Integer("Bid Flow Rate (ml/min)",required=True,search=True), + "ultrafittration": fields.Float("Ultrafittration Kg.",required=True,search=True), + "state": fields.Selection([("draft","New"),("active","Active"),("drop","Drop")],"Status",required=True), "comments": fields.One2Many("message","related_id","Comments"), "company_id": fields.Many2One("company","Company"), } diff --git a/clinic/models/clinic_hd_case.py b/clinic/models/clinic_hd_case.py index 3d2567f..9b71dff 100644 --- a/clinic/models/clinic_hd_case.py +++ b/clinic/models/clinic_hd_case.py @@ -15,10 +15,19 @@ class Hdcase(Model): "patient_id": fields.Many2One("clinic.patient","Patients",required=True,search=True), "doctor_id": fields.Many2One("clinic.doctor","Doctor",search=True), "nurse_id": fields.Many2One("clinic.nurse","Nurse",search=True), - "date": fields.Date("Create Date",required=True,search=True), - "department": fields.Char("Department",required=True,search=True), + "date_start": fields.DateTime("Date start",required=True,search=True), + "date_stop": fields.DateTime("Date stop",required=True,search=True), + "department": fields.Char("Department",required=False,search=True), + "wh_start": fields.Float("Wt.Kg start",required=True,search=True), + "wh_stop": fields.Float("Wt.Kg stop",required=True,search=True), + "bp_start": fields.Integer("BP mmHG start",required=True,search=True), + "per_bp_start": fields.Integer("/Per start",required=True,search=True), + "bp_stop": fields.Integer("BP mmHG stop",required=True,search=True), + "per_bp_stop": fields.Integer("/Per stop",required=True,search=True), + "hct": fields.Integer("HCT %",required=True,search=True), "state": fields.Selection([("draft","Draft"),("pending","Pending"),("confirmed","Confirmed"),("canceled","Canceled")],"Status",required=True), "lines": fields.One2Many("clinic.hd.case.line","hd_case_id","Details"), + "lines_detail": fields.One2Many("clinic.hd.case.line.detail","hd_case_id","Detail"), "comments": fields.One2Many("message","related_id","Comments"), "company_id": fields.Many2One("company","Company"), } @@ -33,10 +42,28 @@ class Hdcase(Model): return num get_model("sequence").increment("sale_order") + def onchange_dialyzer(self,context={}): + data=context["data"] + path=context["path"] + line=get_data_path(data,path,parent=True) + dialyzer_id=line.get("dialzer_id") + if not dialyzer_id: + return {} + dialyzer=get_model("clinic.dialyzer").browse(dialyzer_id) + line["detail"]=dialyzer.detail + line["use_time"]=dialyzer.use_time + line["max_use_time"]=dialyzer.max_use_time + line["member_type"]=dialyzer.member_type + line["dialyzer_type"]=dialyzer.dialyzer_type + line["bid_flow_rate"]=dialyzer.bid_flow_rate + line["ultrafittration"]=dialyzer.ultrafittration + line["state"]=dialyzer.state + return data _defaults={ "state": "draft", - "date": lambda *a: time.strftime("%Y-%m-%d"), + "date_start": lambda *a: time.strftime("%Y-%m-%d %H:%M:%S"), + "date_stop": lambda *a: time.strftime("%Y-%m-%d %H:%M:%S"), "number": _get_number, "company_id": lambda *a: get_active_company(), } diff --git a/clinic/models/clinic_hd_case_line.py b/clinic/models/clinic_hd_case_line.py index f71d03c..d731752 100644 --- a/clinic/models/clinic_hd_case_line.py +++ b/clinic/models/clinic_hd_case_line.py @@ -12,7 +12,11 @@ class Hdcaseline(Model): "detail": fields.Char("description",search=True), "use_time":fields.Integer("Use time"), "max_use_time":fields.Integer("Max use time"), - "state":fields.Selection([("active","Active"),("drop","Drop")],"Status DZ"), + "member_type": fields.Selection([("unsub","Unsub cellul"),("sub","Sub cellul"),("synthetic","Synthetic")],"Member Type",required=True), + "dialyzer_type": fields.Selection([("low","low flux"),("high","high flux"),("dbl","dbl hifulx")],"Member Type",required=True), + "bid_flow_rate": fields.Integer("Bid Flow Rate (ml/min)",required=True,search=True), + "ultrafittration": fields.Float("Ultrafittration Kg.",required=True,search=True), + "state":fields.Selection([("draft","New"),("active","Active"),("drop","Drop")],"Status DZ"), } Hdcaseline.register() diff --git a/clinic/models/clinic_patient.py b/clinic/models/clinic_patient.py index 9bbef99..2e9dd66 100644 --- a/clinic/models/clinic_patient.py +++ b/clinic/models/clinic_patient.py @@ -21,6 +21,7 @@ class Patient(Model): "age": fields.Integer("Age"), "weight": fields.Integer("Weight (cm)"), "height": fields.Integer("Height (Kg)"), + "type": fields.Selection([("mg","Medical Govement"),("sc","Social Security"),("nhso","NHSO (30฿)"),("personal","Personal"),("other","Other")],"Type",required=True), "card_type": fields.Selection([("iden_id","Identity Card"),("passport","Passport")],"ID From",required=True), 'iden_id' : fields.Char("Identity ID"), "app_no": fields.Char("Application No."),