conv_bal
watcha.h 2014-11-13 11:16:25 +07:00
parent 3faeca4977
commit 8d9a6a44f3
10 changed files with 19 additions and 19 deletions

View File

@ -1,8 +0,0 @@
<action>
<field name="string">Report New Patient</field>
<field name="view_cls">report</field>
<field name="model">clinic.report.new.patient</field>
<field name="report_template">report_new_patient</field>
<field name="report_template_xls">report_new_patient</field>
<field name="menu">clinic_menu</field>
</action>

View File

@ -0,0 +1,8 @@
<action>
<field name="string">Report Recent Patient</field>
<field name="view_cls">report</field>
<field name="model">clinic.report.recent.patient</field>
<field name="report_template">report_recent_patient</field>
<field name="report_template_xls">report_recent_patient</field>
<field name="menu">clinic_menu</field>
</action>

View File

@ -39,7 +39,7 @@
<item string="Reports">
<item string="HD Case Summary" action="clinic_report_hd_case_summary"/>
<item string="Medical Summary" action="clinic_report_medical_summary"/>
<item string="New Patient" action="clinic_report_new_patient"/>
<item string="Recent Patient" action="clinic_report_recent_patient"/>
<item string="Discontinue Patient" action="clinic_report_discontinue_patient"/>
</item>
<item string="Settings">

View File

@ -1,4 +1,4 @@
<form model="clinic.report.new.patient">
<form model="clinic.report.recent.patient">
<field name="date" span="3" mode="month" onchange="onchange_date"/>
<field name="date_from" span="3"/>
<field name="date_to" span="3"/>

View File

@ -34,7 +34,7 @@ from . import gen_visit_line
from . import report_clinic
from . import report_hd_case_summary
from . import report_medical_summary
from . import report_new_patient
from . import report_recent_patient
from . import report_discontinue_patient
from . import fin_setting
from . import import_data_mg

View File

@ -207,7 +207,7 @@ class ReportHDCaseSummary(Model):
'month': month_str,
'year': year,
'lines': lines,
'new_patients': get_model("clinic.report.new.patient").get_report_data(ids=[],context=context)['lines'],
'recent_patients': get_model("clinic.report.recent.patient").get_report_data(ids=[],context=context)['lines'],
'resign_patients': get_model("clinic.report.discontinue.patient").get_report_data(ids=[],context=context)['lines'],
'medicals': medicals,
'company_name': company.name or "",

View File

@ -6,9 +6,9 @@ from netforce.access import get_active_company
from . import utils
class ReportNewPatient(Model):
_name="clinic.report.new.patient"
_string="Report New Patient"
class ReportRecentPatient(Model):
_name="clinic.report.recent.patient"
_string="Report Recent Patient"
_transient=True
_fields={
@ -92,4 +92,4 @@ class ReportNewPatient(Model):
data['date_to']="%s-%s-%s"%(year,month,total_day)
return data
ReportNewPatient.register()
ReportRecentPatient.register()

View File

@ -42,7 +42,7 @@
<thead>
<th>
<center>
<a href="/ui#name=clinic_report_new_patient&defaults.date={{date}}">
<a href="/ui#name=clinic_report_recent_patient&defaults.date={{date}}">
รายชื่อผู้ป่วยรับใหม่
</a>
</center>
@ -65,8 +65,8 @@
<th>หมายเหตุ</th>
</thead>
<tbody>
{{#if new_patients}}
{{#each new_patients}}
{{#if recent_patients}}
{{#each recent_patients}}
<tr>
<td>{{no}}</td>
<td>{{reg_date}}</td>