<!--
	临时医嘱
-->

<div class="os-main">
    <div class="lto-con" ms-repeat="data['临时医嘱']">
    	<p style="padding-top: 15px;"></p>
        <p class="lto-info" ms-if="el['下嘱时间'].length>0"><span>下嘱时间：</span>{{el['下嘱时间'] | date('yyyy-MM-dd HH:mm:ss')}}</p>
        <p class="lto-info" ms-if="el['医嘱内容'].length>0"><span>医嘱内容：</span>{{el['医嘱内容']}}</p>
        <p class="lto-info" ms-if="el['下嘱医生'].length>0"><span>下嘱医生：</span>{{el['下嘱医生']}}</p>
        <p class="lto-info" ms-if="el['检验护士'].length>0"><span>检验护士：</span>{{el['检验护士']}}</p>
    </div>
    <p class="p-bottom">详情内容以医院出具纸质病例为准</p>
</div>

<script>
	function dsXmlToJson0215_2(xmlStr) {
		var $xmlDom = $(xmlStr),
			$nodes = {
				"临时医嘱子项" :$xmlDom.find('component section entry order item')
			} ;

		return {
			data:{
				"临时医嘱": (function() {
					var $items = $nodes["临时医嘱子项"];
					if($items.length==0) {
						return [{
										"医嘱内容": "&nbsp;",
										"频次": "&nbsp;",
										"下嘱医生": "&nbsp;",
										"检验护士": "&nbsp;",
										"下嘱时间": "&nbsp;",
										"执行护士": "&nbsp;",
										"执行时间": "&nbsp;"
										}];
					}
					return _.map($items,function(el) {
							var $el = $(el);
							return {
								"医嘱内容": $el.find('orderName').text(),
								"频次": $el.find('freq').text(),
								"下嘱医生": $el.find('orderDoctor').text(),
								"检验护士": $el.find('checkNurse').text(),
								"下嘱时间": $el.find('orderTime').text(),
								"执行护士": $el.find('execNurse').text(),
								"执行时间": $el.find('execTime').text()
							}
					})
				})()
			}
		}
	}

	function dsXmlToJson0215_1(xmlStr) {
		var $xmlDom = $(xmlStr),
			$nodes = {
				"临时医嘱子项" :$xmlDom.find('item')
			} ;

		return {
			data:{
				"临时医嘱": (function() {
					var $items = $nodes["临时医嘱子项"];
					if($items.length==0) {
						return [{
										"医嘱内容": "&nbsp;",
										// "频次": " ",
										"下嘱医生": "&nbsp;",
										"检验护士": "&nbsp;",
										"下嘱时间": "&nbsp;",
										"执行护士": "&nbsp;",
										"执行时间": "&nbsp;"
										}];
					}
					return _.map($items,function(el) {
							var $el = $(el);
							return {
								"医嘱内容": $el.attr('std_code'),
								// "频次": $el.attr('freq').text(),
								"下嘱医生": $el.attr('order_doctor'),
								"检验护士": $el.attr('check_nurse'),
								"下嘱时间": $el.attr('order_time'),
								"执行护士": $el.attr('exec_nurse'),
								"执行时间": $el.attr('exec_time')
							}
					})
				})()
			}
		}
	}
</script>



