<!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:120px; height: 50px; 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>

<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>

<div class="pagination">
    <span class="step-links">
        {% if contacts.has_previous %}
            <a href="?page={{ contacts.previous_page_number }}">previous</a>
        {% endif %}

        <span class="current">
            Page {{ contacts.number }} of {{ contacts.paginator.num_pages }}.
        </span>

        {% if contacts.has_next %}
            <a href="?page={{ contacts.next_page_number }}">next</a>
        {% endif %}
    </span>
</div>

</center>

{% with contacts.object_list as lesions %}
<center>

<table name="tbl" id="tbl" border="0" cellpadding="0" cellspacing="0" width="660">
        <tr>
            <td height="20"><font size="3" >姓名：{{treatment.patient.name}}</font></td>
            <td height="20"><font size="3" >病歷號：{{treatment.patient.medical_records}}</font></td>
            <td height="20"><font size="3" >床號：</font></td>
        </tr>
</table>

<!--662-->

<table  width="650" height="740" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" id="outside" name="outside">
<thead align="center">
<tr><th>Lesion No.</th>
{%for lesion in lesions%}
<td>{{contacts.start_index|add:forloop.counter0}}</td>
{%endfor%}<td style="white-space: nowrap">確認</td></tr>
</thead>
<tbody align="center">

<tr><th>CT Calibration table</th>
  {%for lesion in lesions%}
  <td>{{lesion.get_calibration_table_display}}</td>
  {%endfor%}<td></td></tr>

<tr><th>影像密度修正</th>
  {%for lesion in lesions%}
  <td>{{lesion.density_correction}}</td>
  {%endfor%}<td></td></tr>     

<tr><th>Location</th>
{%for lesion in lesions%}
<td>{{lesion.sub_location.target_location}}-{{lesion.sub_location}}</td>
{%endfor%}<td></td></tr>

<tr><th>Tumor dimension (mm)</th>
{%for lesion in lesions%}
<td>{{lesion.dimensions}}</td>
{%endfor%}<td></td></tr>

<tr><th>Tumor volume</th>
{%for lesion in lesions%}
<td>
  {% if lesion.volume_measure %}
  {{ lesion.volume_measure.cubic_centimeter }} cm<sup>3</sup>
  {% else %}
  {{ lesion.volume }} mm<sup>3</sup>
  {% endif %}
</td>
{%endfor%}<td></td></tr>

<tr><th>Volume treated at ref. dose (cm<sup>3</sup>)</th>
{%for lesion in lesions%}
<td>
<script type="text/javascript">
document.write(({{lesion.ci}}*{{lesion.volume}}*{{lesion.coverage}}/100000).toFixed(2));
</script>
</td>
{%endfor%}<td></td></tr>

<tr><th>Plan name</th>
{%for lesion in lesions%}
<td>{{lesion.plan_name|default:"　"}}</td>
{%endfor%}<td></td></tr>

<tr><th>Collimator Type</th>
{%for lesion in lesions%}
<td>{{lesion.get_collimator_type_display}}</td>
{%endfor%}<td></td></tr> 

<tr><th>Collimator size(mm)</th>
{%for lesion in lesions%}
<td>{{lesion.collimator}}</td>
{%endfor%}<td></td></tr>

<tr><th>Path No.</th>
{%for lesion in lesions%}
<td>{{lesion.path_no}}</td>
{%endfor%}<td></td></tr>

<tr><th>Beam No.</th>
{%for lesion in lesions%}
<td>{{lesion.beam_no}}</td>
{%endfor%}<td></td></tr>

<!-- <tr><th>Beam No. per node</th>
{%for lesion in lesions%}
<td>　</td>
{%endfor%}<td></td></tr> -->

<!-- <tr><th>MU limit(Max./Min.)</th>
{%for lesion in lesions%}
<td>{{lesion.mu_max}}/{{lesion.mu_min}}</td>
{%endfor%}</tr> -->

<!-- <tr><th>Constraints No.</th>
{%for lesion in lesions%}
<td>　</td>
{%endfor%}<td></td></tr> -->

<tr><th>Px dose(cGy)</th>
{%for lesion in lesions%}
<td>{{lesion.dose}}</td>
{%endfor%}<td></td></tr>

<tr><th>Fraction No.</th>
{%for lesion in lesions%}
<td>{{lesion.fractions}}</td>
{%endfor%}<td></td></tr>

<tr><th>Px isodose line(%)</th>
{%for lesion in lesions%}
<td>{{lesion.iso_dose_curve}}</td>
{%endfor%}<td></td></tr>

<tr><th>Max. dose(cGy)</th>
{%for lesion in lesions%}
<td>{{lesion.dmax}}</td>
{%endfor%}<td></td></tr>

<tr><th>Min. dose(cGy)</th>
{%for lesion in lesions%}
<td>{{lesion.dmin}}</td>
{%endfor%}<td></td></tr>

<tr><th>Mean. dose(cGy)</th>
{%for lesion in lesions%}
<td>{{lesion.dmean}}</td>
{%endfor%}<td></td></tr>

<tr><th>Coverage % at ref. dose</th>
{%for lesion in lesions%}
<td>{{lesion.coverage}}</td>
{%endfor%}<td></td></tr>

<tr><th>CI: PIV/TIV</th>
{%for lesion in lesions%}
<td>{{lesion.ci}}</td>
{%endfor%}<td></td></tr>

<tr><th>nCI: PIVxTV/TIV<sup>2</sup></th>
{%for lesion in lesions%}
<td>{{lesion.nci}}</td>
{%endfor%}<td></td></tr>

<tr><th>HI: Dmax/RxDose</th>
{%for lesion in lesions%}
<td>
<script type="text/javascript">
document.write((100.0/{{lesion.iso_dose_curve}}).toFixed(2));
</script>
</td>
{%endfor%}<td></td></tr>

<tr><th>Date</th>
{%for lesion in lesions%}
<td>{%ifequal lesion.start_date lesion.end_date%}{{lesion.end_date}}{%else%}{{lesion.start_date}} ~ {{lesion.end_date|date:"m-d"}}{%endifequal%}</td>
{%endfor%}<td></td></tr>

<tr><th>Memo</th>
{%for lesion in lesions%}
<td>{{lesion.memo|default:"　"}}</td>
{%endfor%}<td></td></tr>

<tr><th>物理師 plan</th>
  {%for lesion in lesions%}
  <td> </td>
  {%endfor%}<td></td></tr>

<tr><th>物理師 verify</th>
{%for lesion in lesions%}
<td> </td>
{%endfor%}<td></td></tr>


</tbody>
</table>
</center>
{% endwith %}


<!--
<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>

