<template>
  <div class="plate-box">
    <h2 class="title"><span class="line"></span><p>{{title}}</p><span class="line"></span> </h2>
    <div class="plate " >
      <ul>
        <li style="height: 0.6rem;">
          <label>入室方式 : </label>
          <span class="content">{{way}}</span>
        </li>
        <li style="height: 0.6rem;">
          <label>病人情况 : </label>
          <span class="content">{{condition}}</span>
        </li>
        <li style="height: 0.6rem;">
          <label>病人意识 : </label>
          <span class="content">{{consciousness}}</span>
        </li>
        <li style="height: 0.6rem;">
          <label>体位 : </label>
          <span class="content">{{posture}}</span>
        </li>
      </ul>

      <ul>
        <li style="height: 0.6rem;">
          <label>病人食欲 : </label>
          <span class="content">{{appetite}}</span>
        </li>
        <li style="height: 0.6rem;" v-if="this.$store.getters.user.template_info.template_id == 2">
          <label>病情 </label>
          <span class="content">{{sickCondition}} </span>
        </li>
        <li style="height: 0.6rem;" v-if="this.$store.getters.user.template_info.template_id == 2">
          <label>风险程度:</label>
          <span class="content">{{dangerLevel}}</span>
        </li>
        <li style="height: 0.6rem;" v-if="this.$store.getters.user.template_info.template_id == 2">
          <label>摄入量:</label>
          <span class="content">{{intakes}}</span>
        </li>

      </ul>



      <ul v-if="this.$store.getters.user.template_info.template_id == 2">
        <li style="height: 0.6rem;">
          <label>营养状况:</label>
          <span class="content">{{nutritions}}</span>
        </li>
        <li style="height: 0.6rem;">
          <label> 心理评估</label>
          <span class="content">{{psychologicalAssessment}}</span>
        </li>
        <li style="height: 0.6rem;" v-if="this.$store.getters.user.template_info.template_id == 2 &&this.record.psychological_assessment == 2 ">
          <label>心理评估异常原因:</label>
          <span class="content">{{this.record.psychological_assessment_other}}</span>
        </li>
      </ul>


    </div>
  </div>
</template>

<script>
export default {
  name: "AcceptsAssessment",
  data() {
    return {
      title: "接诊评估 ",

      ways: {
        "1": "步行",
        "2": "扶行",
        "3": "轮椅",
        "4": "平车",
      },
      conditions: {
        "1": "住院",
        "2": "门诊",
        "3": "手术期",
      },
      consciousnesses: {
        "1": "清醒",
        "2": "嗜睡",
        "3": "昏迷",
      },
      appetites: {
        "1": "正常",
        "2": "减退",
        "3": "恶心",
        "4": "呕吐",
        "5": "腹泻",
      },
      postures: {
        "1": "自动体位",
        "2": "平卧位",
        "3": "半卧位",
        "4": "端坐位",
        "5": "躁动不安",
      }, sick_condition: {
        "1": "一般",
        "2": "重",
        "3": "危",
      }, danger_level: {
        "1": "无",
        "2": "低风险",
        "3": "中度风险",
        "4": "高风险",

      }, intake: {
        "1": "正常",
        "2": "减少",
      },nutrition: {
        "1": "正常",
        "2": "营养不良",
      },psychological_assessment: {
        "1": "正常",
        "2": "异常",
      }
    };
  },
  props: {
    record: {
      type: Object
    }
  },
  computed: {
    way: function() {
      if (this.record == null || this.record.id == "") {
        return ""
      } else {
        return this.ways[this.record.way] == undefined ? "" : (this.ways[this.record.way] + "")
      }
    },
    condition: function() {
      if (this.record == null || this.record.id == "") {
        return ""
      } else {
        return this.conditions[this.record.condition] == undefined ? "" : this.conditions[this.record.condition] + ""
      }
    },
    consciousness: function() {
      if (this.record == null || this.record.id == "") {
        return ""
      } else {
        return this.consciousnesses[this.record.consciousness] == undefined ? "" : this.consciousnesses[this.record.consciousness] + ""
      }
    },
    appetite: function() {
      if (this.record == null || this.record.id == "") {
        return ""
      } else {
        return this.appetites[this.record.appetite] == undefined ? "" : this.appetites[this.record.appetite] + ""
      }
    },
    posture: function() {
      if (this.record == null || this.record.id == "") {
        return ""
      } else {
        return this.postures[this.record.posture] == undefined ? "" : this.postures[this.record.posture] + ""
      }
    },sickCondition: function() {
      if (this.record == null || this.record.id == "") {
        return ""
      } else {
        return this.sick_condition[this.record.sick_condition] == undefined ? "" : this.sick_condition[this.record.sick_condition] + ""
      }
    },dangerLevel: function() {
      if (this.record == null || this.record.id == "") {
        return ""
      } else {
        return this.danger_level[this.record.danger_level] == undefined ? "" : this.danger_level[this.record.danger_level] + ""
      }
    },intakes: function() {
      if (this.record == null || this.record.id == "") {
        return ""
      } else {
        return this.intake[this.record.intake] == undefined ? "" : this.intake[this.record.intake] + ""
      }
    },nutritions: function() {
      if (this.record == null || this.record.id == "") {
        return ""
      } else {
        return this.nutrition[this.record.nutrition] == undefined ? "" : this.nutrition[this.record.nutrition] + ""
      }
    },psychologicalAssessment: function() {
      if (this.record == null || this.record.id == "") {
        return ""
      } else {
        return this.psychological_assessment[this.record.psychological_assessment] == undefined ? "" : this.psychological_assessment[this.record.psychological_assessment] + ""
      }
    }
  },
  methods: {

  }
};
</script>

<style rel="stylesheet/scss" lang="scss" scoped>

</style>



