From 5b16de7e4e10bc116cbb99215303cf6d51a1171d Mon Sep 17 00:00:00 2001 From: Test server Date: Wed, 1 Oct 2014 18:13:54 +0700 Subject: [PATCH] clean --- .../layouts/clinic_patient_form.xml | 12 ++++-------- netforce_clinic/models/clinic_patient.py | 19 +++++++++---------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/netforce_clinic/layouts/clinic_patient_form.xml b/netforce_clinic/layouts/clinic_patient_form.xml index bf3e582..5b49c06 100644 --- a/netforce_clinic/layouts/clinic_patient_form.xml +++ b/netforce_clinic/layouts/clinic_patient_form.xml @@ -6,17 +6,17 @@ - + + - - + @@ -27,7 +27,7 @@ - + @@ -92,10 +92,6 @@ - - - - diff --git a/netforce_clinic/models/clinic_patient.py b/netforce_clinic/models/clinic_patient.py index b1cf9e4..d686ac4 100644 --- a/netforce_clinic/models/clinic_patient.py +++ b/netforce_clinic/models/clinic_patient.py @@ -21,18 +21,18 @@ class Patient(Model): return res # -> {1: 30, 2: 45,.....} _fields={ - "number": fields.Char("Patient ID",required=True,search=True), + "number": fields.Char("Patient No.",required=True,search=True), "name": fields.Char("Name",required=True,search=True), - "reg_date": fields.Date("Reg.Date",required=False,search=True), - "birthday": fields.Date("Date of birth",required=False,search=True), - "telephone": fields.Char("Telephone",required=False,search=True), + "reg_date": fields.Date("Register Date",required=False,search=True), + "birthday": fields.Date("Date of Birth",required=False,search=True), + "tel": fields.Char("Tel.",required=False,search=True), "mobile": fields.Char("Mobile",required=False,search=True), - "job": fields.Char("Job"), + "job": fields.Char("Job/Position"), "graduation": fields.Selection([("junior_high_school", "Junior High School"),("senior_hish_school","Senior High School"),("vocational_certificate", "Vocational Certificate"),("High_vocational_certificate", "High Vocational Certificate"),("ba", "B.A.(Bachelor of Arts)"),("ma","M.A.(Master of Arts)"),("phd","Ph.D.(Doctor of Philosophy)")],"Graduation"), "age": fields.Integer("Age", function="_get_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 of treatment",required=False), + "weight": fields.Float("Weight (cm)"), + "height": fields.Float("Height (Kg)"), + "type": fields.Selection([("mg","Medical Govement"),("sc","Social Security"),("nhso","NHSO (30฿)"),("personal","Personal"),("other","Other")],"Type of Treatment",required=False), "card_type": fields.Selection([("iden_id","Identity Card"),("passport","Passport")],"Card Type",required=True), 'card_no' : fields.Char("Card No."), "app_no": fields.Char("Application No."), @@ -133,8 +133,7 @@ class Patient(Model): _defaults={ - "state": "draft", - "date": lambda *a: time.strftime("%Y-%m-%d"), + "reg_date": lambda *a: time.strftime("%Y-%m-%d"), "number": _get_number, "company_id": lambda *a: get_active_company(), }