nurse report
parent
436dc8f5db
commit
4f79d3ced7
|
@ -0,0 +1,8 @@
|
|||
<action>
|
||||
<field name="string">Report Discontinue Patient</field>
|
||||
<field name="view_cls">report</field>
|
||||
<field name="model">clinic.report.discontinue.patient</field>
|
||||
<field name="report_template">report_discontinue_patient</field>
|
||||
<field name="report_template_xls">report_discontinue_patient</field>
|
||||
<field name="menu">clinic_menu</field>
|
||||
</action>
|
|
@ -0,0 +1,8 @@
|
|||
<action>
|
||||
<field name="string">Report Medical Summary</field>
|
||||
<field name="view_cls">report</field>
|
||||
<field name="model">clinic.report.medical.summary</field>
|
||||
<field name="report_template">report_medical_summary</field>
|
||||
<field name="report_template_xls">report_medical_summary</field>
|
||||
<field name="menu">clinic_menu</field>
|
||||
</action>
|
|
@ -0,0 +1,8 @@
|
|||
<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>
|
|
@ -37,9 +37,10 @@
|
|||
</item>
|
||||
<item string="HD Cases" action="clinic_hd_case"/>
|
||||
<item string="Reports">
|
||||
<item string="New Patient" action="clinic_report_new_patient"/>
|
||||
<item string="Discontinue Patient" action="clinic_report_discontinue_patient"/>
|
||||
<item string="HD Case Summary" action="clinic_report_hd_case_summary"/>
|
||||
<item string="HD Case Detail" action="clinic_report_hd_case_detail"/>
|
||||
<item string="Report Patient" action="clinic_report_new_patient"/>
|
||||
<item string="Medical Summary" action="clinic_report_medical_summary"/>
|
||||
</item>
|
||||
<item string="Settings">
|
||||
<item string="Departments" action="clinic_department"/>
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<form model="clinic.report.discontinue.patient">
|
||||
<group>
|
||||
<field name="date" span="3"/>
|
||||
</group>
|
||||
</form>
|
|
@ -1,3 +0,0 @@
|
|||
<form model="clinic.report.hd.case.medical">
|
||||
<field name="date" mode="month" span="2"/>
|
||||
</form>
|
|
@ -1,12 +0,0 @@
|
|||
<form model="clinic.report.hd.case.payment">
|
||||
<group>
|
||||
<field name="patient_id" span="3"/>
|
||||
<field name="type" span="3"/>
|
||||
<field name="doctor_id" span="3"/>
|
||||
<field name="nurse_id" span="3"/>
|
||||
<newline/>
|
||||
<field name="date_from" span="3"/>
|
||||
<field name="date_to" span="3"/>
|
||||
<field name="cycle_id" span="3"/>
|
||||
</group>
|
||||
</form>
|
|
@ -0,0 +1,5 @@
|
|||
<form model="clinic.report.medical.summary">
|
||||
<group>
|
||||
<field name="date" span="3"/>
|
||||
</group>
|
||||
</form>
|
|
@ -0,0 +1,5 @@
|
|||
<form model="clinic.report.new.patient">
|
||||
<group>
|
||||
<field name="date" span="3"/>
|
||||
</group>
|
||||
</form>
|
|
@ -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
|
||||
|
|
|
@ -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()
|
|
@ -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()
|
|
@ -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()
|
|
@ -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()
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
<h1>Discontinue Patient</h1>
|
|
@ -1,42 +0,0 @@
|
|||
<center>
|
||||
<h2>
|
||||
Summary of the Medical
|
||||
</h2>
|
||||
<h3>
|
||||
[{{company_name}}]<br/>
|
||||
</h3>
|
||||
<h4>
|
||||
As at {{month}} {{year}}
|
||||
</h4>
|
||||
</center>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Product ID</th>
|
||||
<th>Product Name</th>
|
||||
<th>UC</th>
|
||||
<th>Pay</th>
|
||||
<th>Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each lines}}
|
||||
<tr>
|
||||
<td>{{product_code}}</td>
|
||||
<td><a style="text-decoration: underline" href=ui#name=product&mode=form&active_id={{product_id}}>{{medical}}</a></td>
|
||||
<td>{{uc}}</td>
|
||||
<td style color="red"></style>{{buy}}</td>
|
||||
<td style color="blue"></style>{{amount}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td><b>32</b></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
|
@ -1,61 +0,0 @@
|
|||
<center>
|
||||
<h2>Detail of the Hemodialysis</h2>
|
||||
<h2>Payment</h2>
|
||||
<h3>[{{company_name}}]</h3>
|
||||
<h4>
|
||||
{{#if same_date}}
|
||||
As at {{fmt_date date_from}}
|
||||
{{else}}
|
||||
From {{fmt_date date_from}} to {{fmt_date date_to}}
|
||||
{{/if}}
|
||||
</h4>
|
||||
</center>
|
||||
<table class="table table-bordered">
|
||||
<thead class="scroll-header">
|
||||
<tr>
|
||||
<th>
|
||||
Cycle
|
||||
</th>
|
||||
<th>
|
||||
RC.No
|
||||
</th>
|
||||
<th>
|
||||
Doctor
|
||||
</th>
|
||||
<th>
|
||||
Nurce
|
||||
</th>
|
||||
<th>
|
||||
HD Fee
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each lines context=context}}
|
||||
{{#if show_cycle}}
|
||||
<tr>
|
||||
<td colspan="10" style="font-weight:bold">
|
||||
{{cycle}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
<tr class="{{color}}"/>
|
||||
<td></td>
|
||||
<td><a style="text-decoration: underline" href="ui#name=clinic_hd_case&mode=page&active_id={{hd_case_id}}">{{rc_no}}</a></td>
|
||||
<td><a style="text-decoration: underline" href="ui#name=clinic_doctor&mode=page&active_id={{doctor_id}}">{{doctor_name}}</a></td>
|
||||
<td><a style="text-decoration: underline" href="ui#name=clinic_nurse&mode=page&active_id={{nurse_id}}">{{nurse_name}}</a></td>
|
||||
{{#if total}}
|
||||
<td><b>Total</b></td>
|
||||
<td>{{total}}</td>
|
||||
{{else}}
|
||||
<td><a style="text-decoration: underline">{{total}}</a></td>
|
||||
{{/if}}
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="font-weight:bold">
|
||||
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
|
@ -1,25 +0,0 @@
|
|||
<center>
|
||||
<h2>
|
||||
Summary of the Hemodialysis
|
||||
</h2>
|
||||
<h3>
|
||||
[Ratchawat : Saamsan4]<br/>
|
||||
As at {{month}} {{year}}
|
||||
</h3>
|
||||
</center>
|
||||
<table class="table table-striped">
|
||||
<thead class="scroll-header">
|
||||
<th>Topic</th>
|
||||
<th>Month</th>
|
||||
<th>Amount</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each lines}}
|
||||
<tr>
|
||||
<td>{{topic}}</td>
|
||||
<td>{{month}}</td>
|
||||
<td><a style="text-decoration: underline" href="ui#name=clinic_report_hd_dialy&defaults.date_from='2014-10-17'&defaults.date_to='2014-10-18'">{{amount}}</a></td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
|
@ -0,0 +1 @@
|
|||
<h1>Medical Summary</h1>
|
|
@ -0,0 +1 @@
|
|||
<h1>New Patient </h1>
|
Loading…
Reference in New Issue