0201.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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['住院科室'].trim()">
  9. <li><label>住院科室:</label><span ms-text="data['住院科室']"></span></li>
  10. </ul>
  11. <ul class="os-base-info" ms-if="data['住院次数'].trim()">
  12. <li><label>住院次数:</label><span ms-text="data['住院次数']"></span></li>
  13. </ul>
  14. </li>
  15. </ul>
  16. <ul class="info-list-t" ms-if="(data['症状'] && data['症状'].length > 0) && (!!data['症状'][0]['症状名称'].trim() || !!data['症状'][0]['发病日期'].trim())">
  17. <li style="padding-left: 10px;">
  18. <h3 class="os-tit-o"><i class="icon i-dia-basis"></i><span class="os-t-o-name">症状</span></h3>
  19. </li>
  20. <li class="il-t-item" ms-repeat="data['症状']">
  21. <span ms-if="el['症状名称'].trim()">
  22. <h4 class="os-tit-th">症状名称:</h4>
  23. <p ms-html="el['症状名称']"></p>
  24. </span>
  25. <span ms-if="el['发病日期'].trim()">
  26. <h4 class="os-tit-th">发病日期:</h4>
  27. <p ms-html="el['发病日期']"></p>
  28. </span>
  29. </li>
  30. </ul>
  31. <ul class="info-list-t" ms-if="(data['入院诊断'] && data['入院诊断'].length > 0) && (!!data['入院诊断'][0]['入院诊断名称'].trim() || !!data['入院诊断'][0]['确诊日期'].trim())">
  32. <li style="padding-left: 10px;">
  33. <h3 class="os-tit-o"><i class="icon i-dia-basis"></i><span class="os-t-o-name">入院诊断</span></h3>
  34. </li>
  35. <li class="il-t-item" ms-repeat="data['入院诊断']">
  36. <span ms-if="el['入院诊断名称'] && el['入院诊断名称'].length > 0">
  37. <h4 class="os-tit-th">入院诊断名称:</h4>
  38. <p ms-html="el['入院诊断名称']"></p>
  39. </span>
  40. <span ms-if="el['确诊日期'] && el['确诊日期'].length > 0">
  41. <h4 class="os-tit-th">确诊日期:</h4>
  42. <p ms-html="el['确诊日期']"></p>
  43. </span>
  44. </li>
  45. </ul>
  46. <p class="p-bottom">详情内容以医院出具纸质病例为准</p>
  47. </div>
  48. <script>
  49. function dsXmlToJson0201_2(xmlStr) {
  50. var $xmlDom = $(xmlStr),
  51. $nodes = {
  52. "住院基本诊疗信息" :$xmlDom.find('component section')
  53. } ;
  54. return {
  55. data:{
  56. "住院科室": $nodes["住院基本诊疗信息"].find('entry in dept').text() || " ",
  57. "住院次数": $nodes["住院基本诊疗信息"].find('entry residence serial').text() || " ",
  58. "症状": (function() {
  59. var $items = $nodes["住院基本诊疗信息"].find('entry symptom item');
  60. if($items.length==0) {
  61. return [{"症状名称": "", "发病日期": ""}];
  62. }
  63. return _.map($items,function(el) {
  64. var $el = $(el);
  65. return {
  66. "症状名称": $el.text(),
  67. "发病日期": $nodes["住院基本诊疗信息"].find('entry onsettime').text()
  68. }
  69. })
  70. })(),
  71. "入院诊断":
  72. (function() {
  73. var $items = $nodes["住院基本诊疗信息"].find('entry indiagnosis item');
  74. if($items.length == 0) {
  75. return [{"入院诊断名称": "", "确诊日期":""}]
  76. }
  77. return _.map($items,function(el) {
  78. var $el = $(el);
  79. return {
  80. "入院诊断名称": $el.find('icd').text(),
  81. "确诊日期": ""
  82. }
  83. });
  84. })()
  85. }
  86. }
  87. }
  88. function dsXmlToJson0201_1(xmlStr) {
  89. var $xmlDom = $(xmlStr),
  90. $nodes = {
  91. "住院基本诊疗信息" :$xmlDom
  92. } ;
  93. return {
  94. data:{
  95. "住院科室": $nodes["住院基本诊疗信息"].find('indept').text() || " ",
  96. "住院次数": $nodes["住院基本诊疗信息"].find('residence').attr('serial') || " ",
  97. "症状": (function() {
  98. return [{"症状名称": "", "发病日期": ""}];
  99. })(),
  100. "入院诊断": (function() {
  101. var $items = $nodes["住院基本诊疗信息"].find('indiagnosis item');
  102. if($items.length == 0) {
  103. return [{"入院诊断名称": "", "确诊日期":""}]
  104. }
  105. return _.map($items,function(el) {
  106. var $el = $(el);
  107. return {
  108. "入院诊断名称": $el.find('icd').text(),
  109. "确诊日期": ""
  110. }
  111. });
  112. })()
  113. }
  114. }
  115. }
  116. </script>