0141.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <!--
  2. 门诊处方
  3. -->
  4. <div class="os-main">
  5. <ul class="info-list">
  6. <li class="il-item">
  7. <h3 class="os-tit-o"><i class="icon i-ess-info"></i><span class="os-t-o-name">基本信息</span></h3>
  8. <ul class="os-base-info" ms-if="data['就诊日期']">
  9. <li ms-if="data['就诊日期']"><label>开方时间:</label><span ms-text="data['就诊日期']"></span></li>
  10. </ul>
  11. <ul class="os-base-info" ms-if="data['主治医生']">
  12. <li ms-if="data['主治医生']"><label>开方医生:</label><span ms-text="data['主治医生']"></span></li>
  13. </ul>
  14. <ul class="os-base-info" ms-if="data['科室'] || data['医院']">
  15. <li><label>科室/医院:</label>
  16. <span ms-if="data['科室'] && data['医院']"><span ms-text="data['科室']"></span> <span ms-text="data['斜杠']"></span> <span ms-text="data['医院']"></span></span>
  17. <span ms-if="data['科室'] && !(data['医院'])" ms-text="data['科室']"></span>
  18. <span ms-if="!(data['科室']) && data['医院']" ms-text="data['医院']"></span>
  19. </li>
  20. </ul>
  21. </li>
  22. </ul>
  23. <ul class="info-list-t" ms-if="data['诊断'].length >0">
  24. <h3 class="os-tit-o"><i class="icon i-visiting-result"></i><span class="os-t-o-name">临床诊断</span></h3>
  25. <li class="il-t-item">
  26. <p><span ms-repeat="data['诊断']"><span ms-text="el['诊断名称']"></span>&#x3000;</span></p>
  27. </li>
  28. </ul>
  29. <ul class="info-list-t">
  30. <h3 class="os-tit-o o-t-o-nb"><i class="icon Rp"></i><span class="os-t-o-name">Rp</span></h3>
  31. <li class="il-t-item list-mt" ms-repeat="data['门诊用药记录']" ms-repeat-item="el['用药子项']">
  32. <h4 class="os-tit-f" ms-if="item['药品名称']" ms-text="item['药品名称']"></h4>
  33. <ul class="os-base-info pl0" ms-if="el['用药方法'] || item['次剂量'] || el['频率']">
  34. <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>
  35. </ul>
  36. <ul class="os-base-info pl0" ms-if="item['药品规格'] || item['总剂量']">
  37. <li ms-if="item['总剂量']" class="flex1"><label>总量:</label><span ms-text="item['总剂量']"></span></li>
  38. <li ms-if="item['药品规格']" class="flex2"><label>规格:</label><span ms-text="item['药品规格']"></span></li>
  39. </ul>
  40. </li>
  41. </ul>
  42. <p class="p-bottom">详情内容以医院出具纸质病例为准</p>
  43. </div>
  44. <script>
  45. dataCode = ['0101'];//新增数据请求
  46. function dsXmlToJson0141_2(xmlStr) {
  47. var $xmlDom = $(xmlStr),
  48. $nodes = {
  49. "用药记录" :$xmlDom.find('component section entry')
  50. } ;
  51. var resultData = [];
  52. return {
  53. data:{
  54. "门诊用药记录": _.map($nodes["用药记录"].find('group'),function(el) {
  55. var $ele = $(el);
  56. var $freq = $ele.find("freq");//频率
  57. var $method = $ele.find("method");//方法
  58. var $medicineArr = $ele.find("medicine");//用药子项
  59. return {
  60. "频率": $freq.text(),
  61. "用药方法":$method.text(),
  62. "用药子项": (function() {
  63. return _.map($medicineArr, function(secEl){
  64. var $eleItem = $(secEl);
  65. return {
  66. "药品名称": $eleItem.find('value').text().trim() ? $eleItem.find('value').text().trim(): $eleItem.find('custome').text().trim(),
  67. "药品规格": $eleItem.find('spec').text().trim(),
  68. "总剂量":$eleItem.find('totalQuantity').text()? parseFloat($eleItem.find('totalQuantity').text()).toFixed(0)+ $eleItem.find('totalUnit').text():'' ,
  69. "次剂量":$eleItem.find('doseQuantity').text()? parseFloat($eleItem.find('doseQuantity').text()).toFixed(2)+ $eleItem.find('doseUnit').text():''
  70. }
  71. })
  72. })()
  73. }
  74. })
  75. }
  76. }
  77. }
  78. function dsXmlToJson0141_1(xmlStr) {
  79. var $xmlDom = $(xmlStr),
  80. $nodes = {
  81. "用药记录" :$xmlDom
  82. } ;
  83. var resultData = [];
  84. return {
  85. data:{
  86. "门诊用药记录": _.map($nodes["用药记录"].find('group'),function(el) {
  87. var $ele = $(el);
  88. var $freq = $ele.attr("freq");//频率
  89. var $method = $ele.attr("method");//方法
  90. var $medicineArr = $ele.find("medicine");//用药子项
  91. return {
  92. "频率": $freq,
  93. "用药方法":$method,
  94. "用药子项": (function() {
  95. return _.map($medicineArr, function(secEl){
  96. var $eleItem = $(secEl);
  97. return {
  98. "药品名称": $eleItem.text().trim(),
  99. "药品规格": $eleItem.attr('spec').trim(),
  100. "总剂量":$eleItem.attr('total_quantity')? parseFloat($eleItem.attr('total_quantity')).toFixed(0)+ $eleItem.attr('total_unit'):'' ,
  101. "次剂量":$eleItem.attr('dose_quantity')? parseFloat($eleItem.attr('dose_quantity')).toFixed(2)+ $eleItem.attr('dose_unit'):''
  102. }
  103. })
  104. })()
  105. }
  106. })
  107. }
  108. }
  109. }
  110. function dsXmlToJson0101_2(xmlStr) {
  111. var $xmlDom = $(xmlStr),
  112. $nodes = {
  113. "基本诊疗信息" :$xmlDom.find('component section'),
  114. "病人基本信息":$xmlDom.find('recordTarget patient')
  115. } ;
  116. return {
  117. data:{
  118. "斜杠":'/',
  119. "就诊日期": $nodes["基本诊疗信息"].find('entry treatTime').text(),
  120. "主治医生": $nodes["基本诊疗信息"].find('entry doctor name').text(),
  121. "科室": $nodes["基本诊疗信息"].find('entry dept').text(),
  122. "医院": $xmlDom.find('org').text(),
  123. "诊断": (function() {
  124. var arr = _.map($nodes["基本诊疗信息"].find('diagnosis item'),function(el) {
  125. var $ele = $(el);
  126. return {
  127. "诊断名称": $ele.find('icd').text(),
  128. }
  129. });
  130. return arr;
  131. })()
  132. }
  133. }
  134. }
  135. function dsXmlToJson0101_1(xmlStr) {
  136. var $xmlDom = $(xmlStr),
  137. $nodes = {
  138. "基本诊疗信息" :$xmlDom
  139. } ;
  140. return {
  141. data:{
  142. "科室": $nodes["基本诊疗信息"].find('dept').text(),
  143. "主治医生": $nodes["基本诊疗信息"].find('doctor').text(),
  144. "诊断": (function() {
  145. var arr = [];
  146. arr = _.map($nodes["基本诊疗信息"].find('diagnosis item'),function(el) {
  147. var $ele = $(el);
  148. return {
  149. "诊断名称": $ele.text(),
  150. }
  151. })
  152. return arr;
  153. })()
  154. }
  155. }
  156. }
  157. </script>