<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<script Language="JavaScript"><!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.ChartNo.value == "")
  {
    alert("請在 \"ChartNo\" 欄位輸入一數值。");
    theForm.ChartNo.focus();
    return (false);
  }

  if (theForm.ChartNo.value.length < 6)
  {
    alert("在 \"ChartNo\" 欄位，至少請輸入 6 的字元。");
    theForm.ChartNo.focus();
    return (false);
  }

  if (theForm.ChartNo.value.length > 7)
  {
    alert("在 \"ChartNo\" 欄位，最多請輸入 7 的字元。");
    theForm.ChartNo.focus();
    return (false);
  }
  return (true);
}
//--></script>
<html>
<head>
<title>每週病人數紀錄</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" fprolloverstyle="">		A:hover {
			color: red;
		}
</style>
</head>

<body>
<div id="PrintButton"  style="position: absolute; left:0in; top:0in; width:120; height: 50; z-index: 20">
    <button id=BUTTON1 language=JavaScript name="b_print" onclick="doprint();" style="HEIGHT:25px; WIDTH:140px; background-color:#D0E8FF;">
        <font size="2" color="#ff0000">列 印 記 錄 摘 要</font>
    </button>
</div>

<div id="changeweek">
<table width="100%">
<thead align="center">
    <th><a href='/record/weekly/{{prevweek}}/'>上一週</a></th>
    <th><a href='/record/weekly/{{nextweek}}/'>下一週</a></th>
</thead>
</table>
</div>

<center>
  <table width="563" height="0" border="0" cellpadding="0" cellspacing="0" id="tbl" name="tbl">
  <tr>
  <td width="563" height="0" align="center"><font size="4" face="標楷體" color="#003366">
      國 立 台 灣 大 學 醫 學 院 附 設 醫 院</font></td>
  </tr>
  <tr>
  <td width="563" height="0" align="center"><font size="3" face="標楷體" color="#003366">National Taiwan University Hospital</font></td>
  </tr>
  <td width="563" height="40" align="center">
  <font size="5" face="標楷體" color="#003366">每週病人數紀錄</font></td>
  </tr>
  </table>
</center>

<center>

<!--662-->

<p>
<table  width="650" height="100" border="0" cellpadding="0" cellspacing="0" bordercolor="#000000" id="outside" name="outside">
<th>{{weeknumber}}</th>
<th>日期：{{weekdate.mon}}~{{weekdate.fri}}</th>
<th>人數統計：{{treatments|length}}人</th>
<th>{{events|length}} sessions</th>
</table>
</p>

<table  width="650" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" id="outside" name="outside">
<thead align="center">
    <th>　</th>
    <th>診斷部位</th>
    <th>其他診斷</th>
    <th>健保 自費</th>
    <th>治療日期</th>
    <th>外科醫師</th>
    <th>放腫醫師</th>
    <th>轉介醫師</th>
</thead>
<tbody align="center">
    {%for treatment in treatments%}
    <tr>
    <th><a href="/treatment/detail/{{treatment.id}}">{{forloop.counter}}</a></th>
    <td>{{treatment.icd9}}</td>
    <td>{{treatment.other_diagnosis}}</td>
    <td>{{treatment.accounting}}</td>
    <td style='white-space:nowrap'>
    {%for date in treatment.dates%}
    {{date}}
    <br/>
    {%endfor%}
    <td>{{treatment.surgeon}}</td>
    <td>{{treatment.oncologist}}</td>
    <td>{{treatment.referral}}</td>
    </td>
    </tr>
    {%endfor%}
</tbody>
</table>
</center>

<!--
<div id="Foot">
<br>
<center>
<hr><br><br>
<font size="1">系統分析設計：資訊室    吳立婷    分機：1096<br>最後更新日期：2006/2/10</font><br>
</center>
</div>
-->
</body>

</html>
<script language="JavaScript">
function doprint() {
	// 列印前先將 "列印"按鈕 hide 起來
	//PrintButton.style.display='none';
	//QueryChartNo.style.display='none';
	//RTInsert.style.display='none';
	//Foot.style.display='none';
	var odiv = document.getElementsByTagName("div")
	for(i=0; i < odiv.length; i++){
		//alert(odiv.length);
		//alert(odiv[i].id);
		if( odiv[i].id != "" )
		odiv[i].style.display='none';
	}
	window.print();
	// 列印完之後再將 "列印"按鈕 show 出來
//	QueryChartNo.style.display='inline';
//	PrintButton.style.display='inline';
//	RTInsert.style.display='inline';
//	Foot.style.display='inline';
//	for(i=0; i < odiv.length; i++)
//		odiv[i].style.display='inline';
}
</script>

