0214.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <!--
  2. 长期医嘱
  3. -->
  4. <div class="os-main">
  5. <div class="lto-con" ms-repeat="data['长期医嘱']">
  6. <h3 class="lto-tit"><span ms-text="el['下嘱时间'] | date('yyyy-MM-dd HH:mm:ss')"></span>~<span ms-text="el['停嘱时间'] | date('yyyy-MM-dd HH:mm:ss')"></span></h3>
  7. <p class="lto-info" ms-if="el['医嘱内容'].length>0"><span>医嘱内容:</span>{{el['医嘱内容']}}</p>
  8. <p class="lto-info"><span>频&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;次:</span>{{el['频次']}}</p>
  9. <p class="lto-info" ms-if="el['下嘱医生'].length>0"><span>下嘱医生:</span>{{el['下嘱医生']}}</p>
  10. </div>
  11. <p class="p-bottom">详情内容以医院出具纸质病例为准</p>
  12. </div>
  13. <script>
  14. function dsXmlToJson0214_2(xmlStr) {
  15. var $xmlDom = $(xmlStr),
  16. $nodes = {
  17. "长期医嘱子项" :$xmlDom.find('component section entry order item')
  18. } ;
  19. return {
  20. data:{
  21. "长期医嘱": (function() {
  22. var $items = $nodes["长期医嘱子项"];
  23. if($items.length==0) {
  24. return [{
  25. "医嘱内容": "",
  26. "频次": " ",
  27. "下嘱医生": " ",
  28. "检验护士": " ",
  29. "下嘱时间": " ",
  30. "停嘱时间": " ",
  31. "停嘱医生": " ",
  32. "停嘱护士": " "}];
  33. }
  34. return _.map($items,function(el) {
  35. var $el = $(el);
  36. return {
  37. "医嘱内容": $el.find('orderName').text(),
  38. "频次": $el.find('freq').text(),
  39. "下嘱医生": $el.find('orderDoctor').text(),
  40. "检验护士": $el.find('checkNurse').text(),
  41. "下嘱时间": $el.find('orderTime').text(),
  42. "停嘱时间": $el.find('stopTime').text(),
  43. "停嘱医生": $el.find('stopDoctor').text(),
  44. "停嘱护士": $el.find('stopNurse').text()
  45. }
  46. })
  47. })()
  48. }
  49. }
  50. }
  51. function dsXmlToJson0214_1(xmlStr) {
  52. var $xmlDom = $(xmlStr),
  53. $nodes = {
  54. "长期医嘱子项" :$xmlDom
  55. } ;
  56. return {
  57. data:{
  58. "长期医嘱": (function() {
  59. var $items = $nodes["长期医嘱子项"].find('item');
  60. if($items.length==0) {
  61. return [{
  62. "医嘱内容": "",
  63. "频次": " ",
  64. "下嘱医生": " ",
  65. "检验护士": " ",
  66. "下嘱时间": " ",
  67. "停嘱时间": " ",
  68. "停嘱医生": " ",
  69. "停嘱护士": " "}];
  70. }
  71. return _.map($items,function(el) {
  72. var $el = $(el);
  73. return {
  74. "医嘱内容": $el.attr('order_name'),
  75. "频次": $el.attr('freq'),
  76. "下嘱医生": $el.attr('order_doctor'),
  77. "检验护士": $el.attr('check_nurse'),
  78. "下嘱时间": $el.attr('order_time'),
  79. "停嘱时间": $el.attr('stop_time'),
  80. "停嘱医生": $el.attr('stop_doctor'),
  81. "停嘱护士": $el.attr('stop_nurse')
  82. }
  83. })
  84. })()
  85. }
  86. }
  87. }
  88. </script>