acceptsAssessment.vue 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. <template>
  2. <div class="plate-box">
  3. <h2 class="DetailsTit">
  4. <span>{{ title }}</span>
  5. </h2>
  6. <div class="plate ">
  7. <ul>
  8. <li v-if="isShow('入室方式')">
  9. <label>入室方式 : </label>
  10. <span class="content">{{ way }}</span>
  11. </li>
  12. <li v-if="isShow('体位')">
  13. <label>体位 : </label>
  14. <span class="content">{{ posture }}</span>
  15. </li>
  16. <li v-if="isShow('其他病情')">
  17. <label>其他病情:</label>
  18. <span class="content">{{ this.record.sick_condition_other }}</span>
  19. </li>
  20. <li v-if="isShow('跌倒风险预防措施')">
  21. <label>跌倒风险预防措施:</label>
  22. <span class="content">{{ precaution }}</span>
  23. </li>
  24. <li v-if="isShow('营养状况')">
  25. <label>营养状况:</label>
  26. <span class="content">{{nutritions}}</span>
  27. </li>
  28. <li v-if="isShow('其他心理评估')">
  29. <label>其他心理评估:</label>
  30. <span class="content">{{this.record.psychological_other}}</span>
  31. </li>
  32. </ul>
  33. <ul>
  34. <li v-if="isShow('病人情况')">
  35. <label>病人情况 : </label>
  36. <span class="content">{{ condition }}</span>
  37. </li>
  38. <li v-if="isShow('病人食欲')">
  39. <label>病人食欲 : </label>
  40. <span class="content">{{ appetite }}</span>
  41. </li>
  42. <li v-if="isShow('跌倒风险评估评分')">
  43. <label>跌倒风险评估评分:</label>
  44. <span class="content">{{ this.record.score }}分</span>
  45. </li>
  46. <li v-if="isShow('其他跌倒风险预防措施')">
  47. <label>其他跌倒风险预防措施:</label>
  48. <span class="content">{{ this.record.precaution_other }}</span>
  49. </li>
  50. <li v-if="isShow('心理评估')">
  51. <label> 心理评估</label>
  52. <span class="content">{{ psychologicalAssessment }}</span>
  53. </li>
  54. </ul>
  55. <ul>
  56. <li v-if="this.record.condition == 1">
  57. <label> 住院号</label>
  58. <span class="content">{{ this.record.admission_number }}</span>
  59. </li>
  60. <li v-if="isShow('病人意识')">
  61. <label>病人意识 :</label>
  62. <span class="content">{{ consciousness }}</span>
  63. </li>
  64. <li v-if="isShow('病情')">
  65. <label>病情 </label>
  66. <span class="content">{{sickCondition}} </span>
  67. </li>
  68. <li v-if="isShow('风险程度')">
  69. <label>风险程度:</label>
  70. <span class="content">{{ dangerLevel }}</span>
  71. </li>
  72. <li v-if="isShow('摄入量')">
  73. <label>摄入量:</label>
  74. <span class="content">{{intakes}}</span>
  75. </li>
  76. <li
  77. v-if="
  78. isShow('心理评估异常原因') &&
  79. this.record.psychological_assessment == 2
  80. "
  81. >
  82. <label>心理评估异常原因:</label>
  83. <span class="content">{{
  84. this.record.psychological_assessment_other
  85. }}</span>
  86. </li>
  87. <li v-if="isShow('是否跌倒')">
  88. <label>是否跌倒:</label>
  89. <span class="content">
  90. <span v-if="this.record.tumble == 1">是</span>
  91. <span v-if="this.record.tumble == 2">否</span>
  92. </span>
  93. </li>
  94. </ul>
  95. </div>
  96. <!-- <div class="note">处方医生 : {{doctor}}</div> -->
  97. <div class="middleLine"></div>
  98. </div>
  99. </template>
  100. <script>
  101. import store from '@/store'
  102. import { getDataConfig } from '@/utils/data'
  103. export default {
  104. name: 'AcceptsAssessment',
  105. data() {
  106. return {
  107. title: '接诊评估 ',
  108. ways: [],
  109. conditions: {
  110. '1': '住院',
  111. '2': '门诊',
  112. '3': '手术期',
  113. '4': '急诊'
  114. },
  115. consciousnesses:[],
  116. appetites: [],
  117. postures: [],
  118. sick_condition:[],
  119. danger_level: {
  120. '1': '无',
  121. '2': '低风险',
  122. '3': '中度风险',
  123. '4': '高风险'
  124. },
  125. intake:[],
  126. nutrition: [],
  127. psychological_assessment: {
  128. '1': '正常',
  129. '2': '异常'
  130. },
  131. precautions:[],
  132. }
  133. },
  134. props: {
  135. record: {
  136. type: Object
  137. }
  138. },
  139. computed: {
  140. way: function() {
  141. if (this.record.id == 0) {
  142. return ''
  143. } else {
  144. // return this.ways[this.record.way] == undefined ? '' : (this.ways[this.record.way] + '')
  145. for (let i = 0; i < this.ways.length; i++){
  146. if (this.record.way == this.ways[i].id){
  147. return this.ways[i].name
  148. }
  149. }
  150. }
  151. },
  152. condition: function() {
  153. if (this.record.id == 0) {
  154. return ''
  155. } else {
  156. return this.conditions[this.record.condition] == undefined ? '' : this.conditions[this.record.condition] + ''
  157. }
  158. },
  159. consciousness: function() {
  160. if (this.record.id == 0) {
  161. return ''
  162. } else {
  163. for (let i = 0; i < this.consciousnesses.length; i++){
  164. if (this.record.consciousness == this.consciousnesses[i].id){
  165. return this.consciousnesses[i].name
  166. }
  167. }
  168. // return this.consciousnesses[this.record.consciousness] == undefined ? '' : this.consciousnesses[this.record.consciousness] + ''
  169. }
  170. },
  171. appetite: function() {
  172. if (this.record.id == 0) {
  173. return ''
  174. } else {
  175. // return this.appetites[this.record.appetite] == undefined ? '' : this.appetites[this.record.appetite] + ''
  176. for (let i = 0; i < this.appetites.length; i++){
  177. if (this.record.appetite == this.appetites[i].id){
  178. return this.appetites[i].name
  179. }
  180. }
  181. }
  182. },
  183. posture: function() {
  184. if (this.record.id == 0) {
  185. return ''
  186. } else {
  187. // return this.postures[this.record.posture] == undefined ? '' : this.postures[this.record.posture] + ''
  188. for (let i = 0; i < this.postures.length; i++){
  189. if (this.record.posture == this.postures[i].id){
  190. return this.postures[i].name
  191. }
  192. }
  193. }
  194. }, sickCondition: function() {
  195. if (this.record == null || this.record.id == '') {
  196. return ''
  197. } else {
  198. for (let i = 0; i < this.sick_condition.length; i++){
  199. if (this.record.sick_condition == this.sick_condition[i].id){
  200. return this.sick_condition[i].name
  201. }
  202. }
  203. // return this.sick_condition[this.record.sick_condition] == undefined ? '' : this.sick_condition[this.record.sick_condition] + ''
  204. }
  205. }, dangerLevel: function() {
  206. if (this.record == null || this.record.id == '') {
  207. return ''
  208. } else {
  209. return this.danger_level[this.record.danger_level] == undefined ? '' : this.danger_level[this.record.danger_level] + ''
  210. }
  211. }, intakes: function() {
  212. if (this.record == null || this.record.id == '') {
  213. return ''
  214. } else {
  215. for (let i = 0; i < this.intake.length; i++){
  216. if (this.record.intake == this.intake[i].id){
  217. return this.intake[i].name
  218. }
  219. }
  220. // return this.intake[this.record.intake] == undefined ? '' : this.intake[this.record.intake] + ''
  221. }
  222. }, nutritions: function() {
  223. if (this.record == null || this.record.id == '') {
  224. return ''
  225. } else {
  226. for (let i = 0; i < this.nutrition.length; i++){
  227. if (this.record.nutrition == this.nutrition[i].id){
  228. return this.nutrition[i].name
  229. }
  230. }
  231. // return this.nutrition[this.record.nutrition] == undefined ? '' : this.nutrition[this.record.nutrition] + ''
  232. }
  233. }, psychologicalAssessment: function() {
  234. if (this.record == null || this.record.id == '') {
  235. return ''
  236. } else {
  237. return this.psychological_assessment[this.record.psychological_assessment] == undefined ? '' : this.psychological_assessment[this.record.psychological_assessment] + ''
  238. }
  239. },
  240. precaution: function() {
  241. if (this.record.id == 0 || this.record == null ) {
  242. return ''
  243. } else {
  244. //console.log("-----",this.record.precaution)
  245. var obj = this.record.precaution
  246. if(obj == null){
  247. return ""
  248. }
  249. if(obj !=null){
  250. var arr = obj.split(",")
  251. // console.log("arr----",arr)
  252. var arrtwo = []
  253. for(let i=0;i<arr.length;i++){
  254. for(let j=0;j<this.precautions.length;j++){
  255. if(parseInt(arr[i]) == this.precautions[j].id){
  256. arrtwo.push(this.precautions[j].name)
  257. }
  258. }
  259. }
  260. // console.log("arrtwo",arrtwo)
  261. var objtwo = arrtwo.join(",")
  262. // console.log("objtwo",objtwo)
  263. return objtwo
  264. }
  265. // for (let i = 0; i < this.precautions.length; i++){
  266. // if (this.record.precaution == this.precautions[i].id){
  267. // return this.precautions[i].name
  268. //
  269. // }
  270. // }
  271. // return this.precautions[this.record.precaution] == undefined ? '' : this.precautions[this.record.precaution] + ''
  272. }
  273. }
  274. },
  275. methods: {
  276. isShow(name) {
  277. var filedList = store.getters.xt_user.fileds
  278. for (let i = 0; i < filedList.length; i++) {
  279. if (filedList[i].module == 2 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
  280. return true
  281. }
  282. }
  283. return false
  284. }
  285. },
  286. created(){
  287. console.log("records",this.record)
  288. this.ways = getDataConfig('hemodialysis', 'way')
  289. this.consciousnesses = getDataConfig('hemodialysis', 'consciousness')
  290. this.appetites = getDataConfig('hemodialysis', 'appetite')
  291. this.postures = getDataConfig('hemodialysis', 'posture')
  292. this.sick_condition = getDataConfig('hemodialysis', 'sick_condition')
  293. this.precautions = getDataConfig('hemodialysis', 'precaution')
  294. //console.log("跌倒预防措施",this.precautions)
  295. this.intake = getDataConfig('hemodialysis', 'intake')
  296. this.nutrition = getDataConfig('hemodialysis', 'nutrition')
  297. console.log(this.ways)
  298. },
  299. }
  300. </script>
  301. <style rel="stylesheet/scss" lang="scss" scoped></style>