12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <!--
- 住院用药
- -->
- <div class="os-main">
- <ul class="info-list-t">
- <h3 class="os-tit-o o-t-o-nb"><i class="icon Rp"></i><span class="os-t-o-name">Rp</span></h3>
- <li class="il-t-item list-mt" ms-repeat="data['门诊用药记录']" ms-repeat-item="el['用药子项']">
- <h4 class="os-tit-f" ms-if="item['药品名称']" ms-text="item['药品名称']"></h4>
- <ul class="os-base-info pl0" ms-if="el['用药方法'] || item['次剂量'] || el['频率']">
- <li><label>用法:</label><span class="pd-r" ms-if="el['用药方法']" ms-text="el['用药方法']"></span><span ms-if="item['次剂量']" class="pd-r"><span ms-if="item['次剂量']">每次</span><span ms-text="item['次剂量']"></span></span><span class="pd-r" ms-if="el['频率']" ms-text="el['频率']"></span></li>
- </ul>
- <ul class="os-base-info pl0" ms-if="item['药品规格'] || item['总剂量']">
- <li ms-if="item['总剂量']" class="flex1"><label>总量:</label><span ms-text="item['总剂量']"></span></li>
- <li ms-if="item['药品规格']" class="flex2"><label>规格:</label><span ms-text="item['药品规格']"></span></li>
- </ul>
- </li>
- </ul>
- <p class="p-bottom">详情内容以医院出具纸质病例为准</p>
- </div>
- <script>
- function dsXmlToJson0241_2(xmlStr) {
- var $xmlDom = $(xmlStr),
- $nodes = {
- "用药记录" :$xmlDom.find('component section entry')
- } ;
- var resultData = [];
- return {
- data:{
- "门诊用药记录": _.map($nodes["用药记录"].find('group'),function(el) {
- var $ele = $(el);
- var $freq = $ele.find("freq");//频率
- var $method = $ele.find("method");//方法
- var $medicineArr = $ele.find("medicine");//用药子项
- return {
- "频率": $freq.text(),
- "用药方法":$method.text(),
- "用药子项": (function() {
- return _.map($medicineArr, function(secEl){
- var $eleItem = $(secEl);
- return {
- "药品名称": $eleItem.find('value').text().trim() ? $eleItem.find('value').text().trim(): $eleItem.find('custome').text().trim(),
- "药品规格": $eleItem.find('spec').text().trim(),
- "总剂量":$eleItem.find('totalQuantity').text()? parseFloat($eleItem.find('totalQuantity').text()).toFixed(0)+ $eleItem.find('totalUnit').text():'',
- "次剂量":$eleItem.find('doseQuantity').text()? parseFloat($eleItem.find('doseQuantity').text()).toFixed(2)+ $eleItem.find('doseUnit').text():''
- }
- })
- })()
- }
- })
- }
- }
- }
- function dsXmlToJson0241_1(xmlStr) {
- var $xmlDom = $(xmlStr),
- $nodes = {
- "用药记录" :$xmlDom
- } ;
- var resultData = [];
- return {
- data:{
- "门诊用药记录": _.map($nodes["用药记录"].find('group'),function(el) {
- var $ele = $(el);
- var $freq = $ele.attr("freq");//频率
- var $method = $ele.attr("method");//方法
- var $medicineArr = $ele.find("medicine");//用药子项
- return {
- "频率": $freq,
- "用药方法":$method,
- "用药子项": (function() {
- return _.map($medicineArr, function(secEl){
- var $eleItem = $(secEl);
- return {
- "药品名称": $eleItem.text().trim(),
- "药品规格": $eleItem.attr('spec').trim(),
- "总剂量":$eleItem.attr('total_quantity')? parseFloat($eleItem.attr('total_quantity')).toFixed(0)+ $eleItem.attr('total_unit'):'',
- "次剂量":$eleItem.attr('dose_quantity')? parseFloat($eleItem.attr('dose_quantity')).toFixed(2)+ $eleItem.attr('dose_unit'):''
- }
- })
- })()
- }
- })
- }
- }
- }
- </script>
|