diff --git a/netforce_clinic/actions/clinic_report_discontinue_patient.xml b/netforce_clinic/actions/clinic_report_discontinue_patient.xml
new file mode 100644
index 0000000..c78bf61
--- /dev/null
+++ b/netforce_clinic/actions/clinic_report_discontinue_patient.xml
@@ -0,0 +1,8 @@
+
+ Report Discontinue Patient
+ report
+ clinic.report.discontinue.patient
+ report_discontinue_patient
+ report_discontinue_patient
+ clinic_menu
+
diff --git a/netforce_clinic/actions/clinic_report_medical_summary.xml b/netforce_clinic/actions/clinic_report_medical_summary.xml
new file mode 100644
index 0000000..bcbec3b
--- /dev/null
+++ b/netforce_clinic/actions/clinic_report_medical_summary.xml
@@ -0,0 +1,8 @@
+
+ Report Medical Summary
+ report
+ clinic.report.medical.summary
+ report_medical_summary
+ report_medical_summary
+ clinic_menu
+
diff --git a/netforce_clinic/actions/clinic_report_new_patient.xml b/netforce_clinic/actions/clinic_report_new_patient.xml
new file mode 100644
index 0000000..325413a
--- /dev/null
+++ b/netforce_clinic/actions/clinic_report_new_patient.xml
@@ -0,0 +1,8 @@
+
+ Report New Patient
+ report
+ clinic.report.new.patient
+ report_new_patient
+ report_new_patient
+ clinic_menu
+
diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml
index 6710fdd..6e06776 100644
--- a/netforce_clinic/layouts/clinic_menu.xml
+++ b/netforce_clinic/layouts/clinic_menu.xml
@@ -37,9 +37,10 @@
-
+
+
-
-
+
-
diff --git a/netforce_clinic/layouts/clinic_report_discontinue_patient.xml b/netforce_clinic/layouts/clinic_report_discontinue_patient.xml
new file mode 100644
index 0000000..95478a3
--- /dev/null
+++ b/netforce_clinic/layouts/clinic_report_discontinue_patient.xml
@@ -0,0 +1,5 @@
+
diff --git a/netforce_clinic/layouts/clinic_report_hd_case_medical.xml b/netforce_clinic/layouts/clinic_report_hd_case_medical.xml
deleted file mode 100644
index 3acd7f0..0000000
--- a/netforce_clinic/layouts/clinic_report_hd_case_medical.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/netforce_clinic/layouts/clinic_report_hd_case_payment.xml b/netforce_clinic/layouts/clinic_report_hd_case_payment.xml
deleted file mode 100644
index cf0b891..0000000
--- a/netforce_clinic/layouts/clinic_report_hd_case_payment.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/netforce_clinic/layouts/clinic_report_medical_summary.xml b/netforce_clinic/layouts/clinic_report_medical_summary.xml
new file mode 100644
index 0000000..3486eac
--- /dev/null
+++ b/netforce_clinic/layouts/clinic_report_medical_summary.xml
@@ -0,0 +1,5 @@
+
diff --git a/netforce_clinic/layouts/clinic_report_new_patient.xml b/netforce_clinic/layouts/clinic_report_new_patient.xml
new file mode 100644
index 0000000..eda9518
--- /dev/null
+++ b/netforce_clinic/layouts/clinic_report_new_patient.xml
@@ -0,0 +1,5 @@
+
diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py
index eb58b03..07b3a18 100644
--- a/netforce_clinic/models/__init__.py
+++ b/netforce_clinic/models/__init__.py
@@ -34,6 +34,9 @@ from . import gen_visit_line
from . import report_clinic
from . import report_hd_case_detail
from . import report_hd_case_summary
+from . import report_medical_summary
+from . import report_new_patient
+from . import report_discontinue_patient
from . import fin_setting
from . import import_data_mg
from . import import_data_nhso
diff --git a/netforce_clinic/models/report_discontinue_patient.py b/netforce_clinic/models/report_discontinue_patient.py
new file mode 100644
index 0000000..37d6f6c
--- /dev/null
+++ b/netforce_clinic/models/report_discontinue_patient.py
@@ -0,0 +1,22 @@
+import time
+
+from netforce.model import Model,fields,get_model
+
+class ReportDiscontinuePatient(Model):
+ _name="clinic.report.discontinue.patient"
+ _string="Report Discontinue Patient"
+ _transient=True
+
+ _fields={
+ "date": fields.Date("Month", required=True),
+ }
+
+ _defaults={
+ 'date': lambda *a: time.strftime("%Y-%m-%d"),
+ }
+
+ def get_report_data(self,ids,context={}):
+ data={}
+ return data
+
+ReportDiscontinuePatient.register()
diff --git a/netforce_clinic/models/report_hd_case_medical.py b/netforce_clinic/models/report_hd_case_medical.py
deleted file mode 100644
index 79cc2da..0000000
--- a/netforce_clinic/models/report_hd_case_medical.py
+++ /dev/null
@@ -1,75 +0,0 @@
-import time
-
-from datetime import datetime
-from calendar import monthrange
-from netforce.model import Model,fields,get_model
-
-class ReportHDMedical(Model):
- _name="clinic.report.hd.medical"
- _string="Hemodialysis Report Medical Summary"
- _transient=True
-
- _fields={
- "date": fields.Date("Month", required=True),
- }
-
- _defaults={
- 'date': lambda *a: time.strftime("%Y-%m-%d"),
- }
-
- def get_report_data(self,ids,context={}):
-
- for item in get_model("company").search_browse([]):
- company_name=item.name
-
- date=datetime.now().strftime("%Y-%m-%d")
- #datemonth=datetime.now().strftime("%m")
- if ids:
- obj=self.browse(ids)[0]
- date=obj.date
- year=int(date[0:4])
- month=int(date[5:7])
- month_str=datetime.strptime(date,'%Y-%m-%d').strftime("%B")
-
- #dom=[]
- #dom.append(['fee_type','=','mg'])
-
- weekday, total_day=monthrange(year, month)
- time_start='2014-%s-01 00:00:00'%(month)
- time_stop='2014-%s-%s 23:59:59'%(month,total_day)
-
- dom=[]
- dom.append(['state','=','completed'])
- dom.append(['time_start','>=',time_start])
- dom.append(['time_stop','<=',time_stop])
-
- lines=[]
- index=0
- for product in get_model("product").search_browse(['type','=','stock']):
- product_id=product.id or ""
- product_code=product.code or ""
- product_name=product.name or ""
- product_amount=len(str(product_code))
- #total=len(str(product_amount))
-
- index+=1
- vals={
- 'product_code' : product_code,
- 'medical' : product_name,
- 'uc' : '-',
- 'buy' : '-',
- 'amount' : product_amount,
- 'product_id': product_id,
- }
- lines.append(vals)
-
-
- data={
- 'month': month_str,
- 'year': year,
- 'lines': lines,
- 'company_name': company_name,
- }
- return data
-
-ReportHDMedical.register()
diff --git a/netforce_clinic/models/report_medical_summary.py b/netforce_clinic/models/report_medical_summary.py
new file mode 100644
index 0000000..6af0f08
--- /dev/null
+++ b/netforce_clinic/models/report_medical_summary.py
@@ -0,0 +1,22 @@
+import time
+
+from netforce.model import Model,fields,get_model
+
+class ReportMedicalSummary(Model):
+ _name="clinic.report.medical.summary"
+ _string="Report Medical Summary"
+ _transient=True
+
+ _fields={
+ "date": fields.Date("Month", required=True),
+ }
+
+ _defaults={
+ 'date': lambda *a: time.strftime("%Y-%m-%d"),
+ }
+
+ def get_report_data(self,ids,context={}):
+ data={}
+ return data
+
+ReportMedicalSummary.register()
diff --git a/netforce_clinic/models/report_new_patient.py b/netforce_clinic/models/report_new_patient.py
new file mode 100644
index 0000000..a670eb6
--- /dev/null
+++ b/netforce_clinic/models/report_new_patient.py
@@ -0,0 +1,22 @@
+import time
+
+from netforce.model import Model,fields,get_model
+
+class ReportNewPatient(Model):
+ _name="clinic.report.new.patient"
+ _string="Report New Patient"
+ _transient=True
+
+ _fields={
+ "date": fields.Date("Month", required=True),
+ }
+
+ _defaults={
+ 'date': lambda *a: time.strftime("%Y-%m-%d"),
+ }
+
+ def get_report_data(self,ids,context={}):
+ data={}
+ return data
+
+ReportNewPatient.register()
diff --git a/netforce_clinic/reports/report_discontinue_patient.xlsx b/netforce_clinic/reports/report_discontinue_patient.xlsx
new file mode 100644
index 0000000..5b873e2
Binary files /dev/null and b/netforce_clinic/reports/report_discontinue_patient.xlsx differ
diff --git a/netforce_clinic/reports/report_hd_case_medical.xlsx b/netforce_clinic/reports/report_hd_case_medical.xlsx
deleted file mode 100644
index 7e3b942..0000000
Binary files a/netforce_clinic/reports/report_hd_case_medical.xlsx and /dev/null differ
diff --git a/netforce_clinic/reports/report_hd_case_payment.xlsx b/netforce_clinic/reports/report_hd_case_payment.xlsx
deleted file mode 100644
index 65c30fd..0000000
Binary files a/netforce_clinic/reports/report_hd_case_payment.xlsx and /dev/null differ
diff --git a/netforce_clinic/reports/report_hd_dialy.xlsx b/netforce_clinic/reports/report_hd_dialy.xlsx
deleted file mode 100644
index afd6365..0000000
Binary files a/netforce_clinic/reports/report_hd_dialy.xlsx and /dev/null differ
diff --git a/netforce_clinic/reports/report_hd_monthly.xlsx b/netforce_clinic/reports/report_hd_monthly.xlsx
deleted file mode 100644
index 117d38d..0000000
Binary files a/netforce_clinic/reports/report_hd_monthly.xlsx and /dev/null differ
diff --git a/netforce_clinic/reports/report_medical_summary.xlsx b/netforce_clinic/reports/report_medical_summary.xlsx
new file mode 100644
index 0000000..2b29fc1
Binary files /dev/null and b/netforce_clinic/reports/report_medical_summary.xlsx differ
diff --git a/netforce_clinic/reports/report_new_patient.xlsx b/netforce_clinic/reports/report_new_patient.xlsx
new file mode 100644
index 0000000..b98a2e0
Binary files /dev/null and b/netforce_clinic/reports/report_new_patient.xlsx differ
diff --git a/netforce_clinic/templates/report_discontinue_patient.hbs b/netforce_clinic/templates/report_discontinue_patient.hbs
new file mode 100644
index 0000000..f4640f1
--- /dev/null
+++ b/netforce_clinic/templates/report_discontinue_patient.hbs
@@ -0,0 +1 @@
+Discontinue Patient
diff --git a/netforce_clinic/templates/report_hd_case_medical.hbs b/netforce_clinic/templates/report_hd_case_medical.hbs
deleted file mode 100644
index 99b8800..0000000
--- a/netforce_clinic/templates/report_hd_case_medical.hbs
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
- Summary of the Medical
-
-
- [{{company_name}}]
-
-
- As at {{month}} {{year}}
-
-
-
-
-
- Product ID |
- Product Name |
- UC |
- Pay |
- Total |
-
-
-
- {{#each lines}}
-
- {{product_code}} |
- {{medical}} |
- {{uc}} |
- {{buy}} |
- {{amount}} |
-
- {{/each}}
-
-
-
- |
- |
- - |
- - |
- 32 |
-
-
-
diff --git a/netforce_clinic/templates/report_hd_case_payment.hbs b/netforce_clinic/templates/report_hd_case_payment.hbs
deleted file mode 100644
index aaabe16..0000000
--- a/netforce_clinic/templates/report_hd_case_payment.hbs
+++ /dev/null
@@ -1,61 +0,0 @@
-
- Detail of the Hemodialysis
- Payment
- [{{company_name}}]
-
- {{#if same_date}}
- As at {{fmt_date date_from}}
- {{else}}
- From {{fmt_date date_from}} to {{fmt_date date_to}}
- {{/if}}
-
-
-
-
-
- {{#each lines context=context}}
- {{#if show_cycle}}
-
-
- {{cycle}}
- |
-
- {{/if}}
-
- |
- {{rc_no}} |
- {{doctor_name}} |
- {{nurse_name}} |
- {{#if total}}
- Total |
- {{total}} |
- {{else}}
- {{total}} |
- {{/if}}
-
- {{/each}}
-
-
-
-
-
-
-
diff --git a/netforce_clinic/templates/report_hd_monthly.hbs b/netforce_clinic/templates/report_hd_monthly.hbs
deleted file mode 100644
index 4862c78..0000000
--- a/netforce_clinic/templates/report_hd_monthly.hbs
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
- Summary of the Hemodialysis
-
-
- [Ratchawat : Saamsan4]
- As at {{month}} {{year}}
-
-
-
-
-
- {{#each lines}}
-
- {{topic}} |
- {{month}} |
- {{amount}} |
-
- {{/each}}
-
-
diff --git a/netforce_clinic/templates/report_medical_summary.hbs b/netforce_clinic/templates/report_medical_summary.hbs
new file mode 100644
index 0000000..e486fbd
--- /dev/null
+++ b/netforce_clinic/templates/report_medical_summary.hbs
@@ -0,0 +1 @@
+Medical Summary
diff --git a/netforce_clinic/templates/report_new_patient.hbs b/netforce_clinic/templates/report_new_patient.hbs
new file mode 100644
index 0000000..dd3bf3b
--- /dev/null
+++ b/netforce_clinic/templates/report_new_patient.hbs
@@ -0,0 +1 @@
+New Patient