164 lines
6.0 KiB
Handlebars
164 lines
6.0 KiB
Handlebars
<style>
|
|
.text-right{
|
|
text-align: right,
|
|
}
|
|
.text-center{
|
|
text-align: center,
|
|
}
|
|
|
|
</style>
|
|
<script>
|
|
function delete_patient_move(id){
|
|
var res=confirm("Are you sure?");
|
|
if(res){
|
|
ids=[[id]];
|
|
rpc_execute("clinic.patient.move","delete",ids,{},function(err, data){
|
|
if(err){
|
|
alert("ERROR "+err.message);
|
|
}else{
|
|
window.location.reload();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
</script>
|
|
<center>
|
|
<h2>
|
|
HDCase Summary
|
|
</h2>
|
|
<h3>
|
|
{{company_name}}
|
|
<span> {{department_name}} </span>
|
|
</h3>
|
|
<h4>
|
|
ประจำเดือน {{month_thai}} {{year_thai}}
|
|
</h4>
|
|
</center>
|
|
|
|
<table class="table table-hover">
|
|
<thead>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>จำนวนครั้งการทำ Hemodialysis</td><td>{{month_thai}}</td><td>เท่ากับ</td><td class="text-right">{{total_hdcase}}</td><td class="text-center">ครั้ง</td>
|
|
</tr>
|
|
<tr>
|
|
<td>จำนวนผู้ป่วยยกมาจากเดือน</td><td>{{prev_month_thai}}</td><td>เท่ากับ</td><td class="text-right">{{prev_month}}</td><td class="text-center">คน</td>
|
|
</tr>
|
|
<tr>
|
|
<td>จำนวนผู้ป่วยรับใหม่เดือน</td><td>{{current_month_thai}}</td><td>เท่ากับ</td><td class="text-right">{{current_month}}</td><td class="text-center">คน</td>
|
|
</tr>
|
|
<tr>
|
|
<td>จำนวนผู้ป่วยจำหน่ายเดือน</td><td>{{dispose_month_thai}}</td><td>เท่ากับ</td><td class="text-right">{{dispose_month}}</td><td class="text-center">คน</td>
|
|
</tr>
|
|
<tr>
|
|
<td>จำนวนผู้ป่วยยกไปเดือน</td><td>{{next_month_thai}}</td><td>เท่ากับ</td><td class="text-right">{{next_month}}</td><td class="text-center">คน</td>
|
|
</tr>
|
|
{{#each type_lines}}
|
|
<tr>
|
|
<td>{{name}}</td><td></td><td>เท่ากับ</td><td class="text-right">{{qty}}</td><td class="text-center">คน</td>
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
<tfoot>
|
|
</tfoot>
|
|
</table>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<h4 style="text-align:center;text-decoration: underline">รายชื่อผู้ป่วยรับใหม่</h4>
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<th>No.</th>
|
|
<th>วันที่</th>
|
|
<th>ชื่อ</th>
|
|
<th></th>
|
|
</thead>
|
|
<tbody>
|
|
{{#each current_items}}
|
|
<tr>
|
|
<td>{{no}}</td>
|
|
<td>{{date}}</td>
|
|
<td>{{patient_id.1.}}</td>
|
|
{{#if ../can_edit}}
|
|
<td>
|
|
<a onclick="delete_patient_move({{id}})" style="cursor:pointer" class="text-danger">
|
|
<span class="glyphicon glyphicon-remove-sign"></span>
|
|
</a>
|
|
</td>
|
|
{{/if}}
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
{{#if can_edit}}
|
|
<a class="btn btn-default btn-sm" href="/ui#name=new_patient&defaults.date={{date}}">
|
|
<span class="glyphicon glyphicon-plus"></span>
|
|
New item
|
|
</a>
|
|
{{/if}}
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<h4 style="text-align:center;text-decoration: underline">รายชื่อผู้ป่วยจำหน่าย</h4>
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<th>No.</th>
|
|
<th>วันที่</th>
|
|
<th>ชื่อ</th>
|
|
<th></th>
|
|
</thead>
|
|
<tbody>
|
|
{{#each dispose_items}}
|
|
<tr>
|
|
<td>{{no}}</td>
|
|
<td>{{date}}</td>
|
|
<td>{{patient_id.1.}}</td>
|
|
{{#if ../can_edit}}
|
|
<td>
|
|
<a onclick="delete_patient_move({{id}})" style="cursor:pointer" class="text-danger">
|
|
<span class="glyphicon glyphicon-remove-sign"></span>
|
|
</a>
|
|
</td>
|
|
{{/if}}
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{#if can_edit}}
|
|
<a class="btn btn-default btn-sm" href="/ui#name=clinic_patient_move&mode=form&defaults.state=dispose&defaults.date={{date}}">
|
|
<span class="glyphicon glyphicon-plus"></span>
|
|
New item
|
|
</a>
|
|
{{/if}}
|
|
</div>
|
|
|
|
<div class="row">
|
|
<center>
|
|
<h3>
|
|
รวมจำนวนยาที่ใช้ประจำเดือน
|
|
</h3>
|
|
</center>
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
{{#each titles}}
|
|
<th>{{name}}</th>
|
|
{{/each}}
|
|
</thead>
|
|
<tbody>
|
|
{{#each medicals}}
|
|
<tr>
|
|
<td style="width:20%;">
|
|
<a href="/ui#name=product&active_id={{prod_id}}&mode=form"> {{prod_name}} </a>
|
|
</td>
|
|
{{#each sub_lines}}
|
|
<td style="text-align:center">
|
|
<a href="/ui#name=clinic_report_medical_detail&defaults.date_from={{time_start}}&defaults.date_to={{time_stop}}&defaults.types={{types}}&defaults.product_id={{product_id}}&defaults.product_categ_id={{product_categ_id}}&defaults.report_type={{../../report_type}}">{{qty}} </a>
|
|
</td>
|
|
{{/each}}
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|