<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 v-if="isShow('舒张压')">
          <label for="szy">舒张压 : </label>
          <span id="szy" class="content">{{diastolic_blood_pressure?diastolic_blood_pressure:''}}</span>
          <span class="unit">{{diastolic_blood_pressure?'mmHg':''}}</span>
        </li>
        <li v-if="this.$store.getters.user.template_info.template_id == 6">
          <label for="thtz">透后净体重 : </label>
          <span class="content" id="thtz">{{weight_after?parseFloat(weight_after - this.additional_weight).toFixed(1) : ""}}</span>
          <span class="unit">{{weight_after?'kg':''}}</span>
        </li>
        <li v-if="isShow('衣物重')">
          <label for="thtz">衣物重 : </label>
          <span class="content" id="thtz">{{additional_weight?additional_weight:''}}</span>
          <span class="unit">{{additional_weight?'kg':''}}</span>
        </li>
        <li v-if="isShow('收缩压')">
          <label for="ssy">收缩压 : </label>
          <span class="content" id="ssy">{{systolic_blood_pressure?systolic_blood_pressure:''}}</span>
          <span class="unit">{{systolic_blood_pressure?'mmHg':''}}</span>
        </li>
        <li v-if="isShow('透后称重')">
          <label for="thtz">透后称重 : </label>
          <span class="content" id="thtz">{{weight_after?weight_after:''}}</span>
          <span class="unit">{{weight_after?'kg':''}}</span>
        </li>
        <li v-if="isShow('实际超滤量')">
          <label for="sjcll">实际超滤量: </label>
          <span class="content" id="sjcll">{{actual_ultrafiltration?actual_ultrafiltration:''}}</span>
          <span v-if="(template_id == 6&& $store.getters.user.template_info.org_id !=10447 && $store.getters.user.template_info.org_id !=10471) || template_id == 9 || template_id == 10 || template_id == 11 || template_id == 17 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 28 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 32 || template_id == 34 || template_id == 36 || template_id == 38 || template_id == 40 || template_id == 43 || template_id == 44 || template_id == 60 || this.$store.getters.user.template_info.org_id == 9555 || template_id == 27  || this.$store.getters.user.template_info.org_id == 10340 || this.$store.getters.user.template_info.org_id == 10387 ||  $store.getters.user.template_info.org_id == 10430 ||  $store.getters.user.template_info.org_id == 10432 ||  $store.getters.user.template_info.org_id == 10441  ||  $store.getters.user.template_info.org_id == 10445 ||  $store.getters.user.template_info.org_id == 10410 ||  $store.getters.user.template_info.org_id == 10495 || $store.getters.user.template_info.org_id == 10375 || $store.getters.user.template_info.org_id == 10551 || $store.getters.user.template_info.org_id == 10597 || $store.getters.user.template_info.org_id == 10599 || $store.getters.user.template_info.org_id == 10629 || $store.getters.user.template_info.org_id == 10677 || $store.getters.user.template_info.org_id == 10667 || $store.getters.user.template_info.org_id == 10480 || $store.getters.user.template_info.org_id == 10693 || $store.getters.user.template_info.org_id == 10702  || $store.getters.user.template_info.org_id == 10697 || $store.getters.user.template_info.org_id == 10635 || $store.getters.user.template_info.org_id == 10723 || $store.getters.user.template_info.org_id == 10721  || $store.getters.user.template_info.org_id == 10727 || $store.getters.user.template_info.org_id == 10742 || $store.getters.user.template_info.org_id == 10752|| $store.getters.user.template_info.org_id == 10757" class="unit">{{actual_ultrafiltration?'ml':''}}</span>
          <span v-else class="unit">{{actual_ultrafiltration?'L':''}}</span>
        </li>
        <li v-if="isShow('透析器')">
          <label for="nx">透析器 : </label>
          <span class="content" id="nx">{{cruor}}</span>
        </li>
        <li v-if="isShow('内瘘')">
          <label for="nw">内瘘 : </label>
          <span id="nw" class="content">{{internal_fistula}}</span>
        </li>
        <li v-if="isShow('导管')">
          <label for="dg">导管 : </label>
          <span id="dg" class="content">{{catheter}}</span>
        </li>
        <li v-if="isShow('穿刺处血肿')">
          <label for="jccxz">穿刺处血肿 : </label>
          <span id="jccxz" class="content">{{puncture_point_haematoma_name}}</span>
        </li>
        <li v-if="patient_gose==3&&isShow('科室')">
          <label for="ks">科室 : </label>
          <span id="ks" class="content">{{inpatient_department}}</span>
        </li>
        <li v-if="isShow('体温')">
          <label for="tw">体温 : </label>
          <span class="content" id="tw">{{temperature?temperature:''}}</span>
          <span class="unit">{{temperature?'℃':''}}</span>
        </li>

        <li v-if="isShow('呼吸频率')">
          <label for="ml">呼吸频率 : </label>
          <span id="ml" class="content">{{breathing_rate?breathing_rate:''}}</span>
          <span class="unit">{{breathing_rate?'次/min':''}}</span>
        </li>

        <li v-if="isShow('脉搏')">
          <label for="ml">脉搏 : </label>
          <span id="ml" class="content">{{pulse_frequency?pulse_frequency:''}}</span>
          <span class="unit">{{pulse_frequency?'次/分':''}}</span>
        </li>
        <li v-if="isShow('血管通路部位')">
          <label for="xgtl">血管通路部位 : </label>
          <span id="xgtl" class="content">{{blood_access_part}}</span>
        </li>

        <li v-if="isShow('血管通路操作')">
          <label for="xgtlcz">血管通路操作: </label>
          <span id="xgtlcz" class="content">{{blood_access_opera}}</span>
        </li>

        <!-- </ul>

        <ul> -->
        <li v-if="isShow('体重减少')">
          <label for="tzjs">体重减少 : </label>
          <span class="content" id="tzjs">{{weight_loss?weight_loss:''}}</span>
          <span class="unit">{{weight_loss?'kg':''}}</span>
        </li>

        <li v-if="isShow('实际置换量')">
          <label for="sjzhl">实际置换量 : </label>
          <span id="sjzhl" class="content">{{actual_displacement?actual_displacement:''}}</span>
          <span class="unit" v-if="template_id != 8 && template_id != 13 && template_id != 40 && template_id != 41 && template_id!=38 && $store.getters.user.template_info.org_id!=10445 && $store.getters.user.template_info.org_id!=10629 && $store.getters.user.template_info.org_id!=10702">{{actual_displacement?'ml':''}}</span>
          <span class="unit" v-else>{{actual_displacement?'L':''}}</span>
        </li>
        <li v-if="isShow('透后症状')">
          <label for="thzz">透后症状 : </label>
          <span id="thzz" class="content">{{symptom_after_dialysis}}</span>
        </li>

        <li v-if="isShow('并发症')">
          <label for="bfz">并发症: </label>
          <span id="bfz" class="content">{{complication}}</span>
        </li>
        <li v-if="isShow('压迫后内瘘震颤')">
          <label for="yph">压迫后内瘘震颤: </label>
          <span id="yph" class="content">{{internal_fistula_tremor_ac_name}}</span>
        </li>
        <li v-if="patient_gose==3&&isShow('交待病房护士/患者/陪人观察内容')">
          <label for="jdbf">交待病房护士/患者/陪人观察内容 : </label>
          <span class="content" id="jdbf">{{observation_content}}</span>
        </li>
        <li v-if="isShow('实际治疗时长')">
          <label for="sjzl">实际治疗时长 : </label>
          <span id="sjzl" class="content">{{actual_treatment_hour}}时{{actual_treatment_minute}}分</span>
        </li>
        <li v-if="isShow('透析中入量')">
          <label for="txzrl">透析中入量: </label>
          <span id="txzrl" class="content">{{dialysis_intakes_feed?dialysis_intakes_feed:''}}{{getUnit(this.record.dialysis_intakes_unit)}}</span>
        </li>

        <li v-if="isShow('患者去向')">
          <label for="hzqx">患者去向: </label>
          <span id="hzqx" class="content">{{patient_gose_name}}</span>
        </li>
        <li v-if="patient_gose==3&&isShow('其他观察内容')">
          <label for="qtgcnr">其他观察内容 : </label>
          <span id="qtgcnr" class="content">{{observation_content_other}}</span>
        </li>
        <li v-if="isShow('拔针后穿刺点渗血')">
          <label for="bzh">拔针后穿刺点渗血: </label>
          <span id="bzh" class="content">{{puncture_point_oozing_blood_name}}</span>
        </li>
        <!-- </ul>

        <ul > -->
        <li v-if="isShow('透析过程')">
          <label for="tw">透析过程 : </label>
          <span class="content" id="tw" v-if="this.record.dialysis_process == 1">完成</span>
          <span class="content" id="tw" v-if="this.record.dialysis_process == 2">提前{{in_advance_minute}}min</span>
        </li>
        <li v-if="this.record.dialysis_process == 2&&isShow('透析过程提前原因')">
          <label for="tw">透析过程提前原因 : </label>
          <span class="content" id="tw">{{in_advance_reason}}</span>
        </li>

        <li v-if="isShow('内瘘管拔针后压迫止血时间')">
          <label for="ml">内瘘管拔针后压迫止血时间 : </label>
          <span id="ml" class="content" v-if="hemostasis_minute">{{hemostasis_minute}}min</span>
          <span id="ml" class="content" v-else>-min</span>
        </li>
        <li v-if="isShow('内瘘管拔针后压迫止血操作')">
          <label for="ml">内瘘管拔针后压迫止血操作 : </label>
          <span id="ml" class="content">{{getOpera(this.record.hemostasis_opera)}}</span>
        </li>
        <li v-if="isShow('内瘘震颤和血管杂音')">
          <label for="sjzl">内瘘震颤和血管杂音 : </label>
          <span id="sjzl" class="content">{{getTremorNoise(this.record.tremor_noise)}}</span>
        </li>
        <li v-if="isShow('失衡综合症')">
          <label for="txzrl">失衡综合症: </label>
          <span id="txzrl" class="content">{{getDisequilibriumSyndrome(this.record.disequilibrium_syndrome)}}</span>
        </li>
        <li v-if="this.record.disequilibrium_syndrome == 2&&isShow('失衡综合症症状')">
          <label for="txzrl">失衡综合症症状: </label>
          <span id="txzrl" class="content">{{this.record.disequilibrium_syndrome_option}}</span>
        </li>
        <li v-if="isShow('动脉管道')">
          <label for="xgtlcz">动脉管道: </label>
          <span id="xgtlcz" class="content">{{getArterialTubeName(this.record.arterial_tube)}}</span>
        </li>
        <li v-if="isShow('静脉管道')">
          <label for="bzh">静脉管道: </label>
          <span id="bzh" class="content">{{getIntravenousTubeName(this.record.intravenous_tube)}}</span>
        </li>

<!--        <li v-if="isShow('透析器')">-->
<!--          <label for="hzqx">透析器: </label>-->
<!--          <span id="hzqx" class="content">{{getDialyzer(this.record.dialyzer)}}</span>-->
<!--        </li>-->

        <li v-if="isShow('透析期间进食')">
          <label for="bzh">透析期间进食: </label>
          <span id="bzh" class="content">{{eat_name}}</span>
        </li>

        <li v-if="isShow('中心静脉封管(肝素-A端)')">
          <label for="bzh">中心静脉封管(肝素-A端): </label>
          <span class="content" id="tzjs">{{this.record.cvc_a?this.record.cvc_a:''}}</span>
          <span class="unit">{{this.record.cvc_a?'ml':''}}</span>
        </li>
        <li v-if="isShow('中心静脉封管(肝素-V端)')">
          <label for="bzh">中心静脉封管(肝素-V端): </label>
          <span class="content" id="tzjs">{{this.record.cvc_v?this.record.cvc_v:''}}</span>
          <span class="unit">{{this.record.cvc_v?'ml':''}}</span>
        </li>

        <li v-if="isShow('管路')">
          <label for="bzh">管路: </label>
          <span class="content" id="tzjs">{{getChannelName(this.record.channel)}}</span>
        </li>

        <li v-if="isShow('回血')">
          <label for="hx">回血: </label>
          <span class="content" id="hx">{{this.record.return_blood?this.record.return_blood:''}}</span>
          <span class="unit">{{this.record.return_blood?'ml':''}}</span>
        </li>

        <li v-if="isShow('补液量')">
          <label for="byl">补液量: </label>
          <span class="content" id="hx">{{this.record.rehydration_volume?this.record.rehydration_volume:''}}</span>
          <span class="unit">{{this.record.rehydration_volume?'ml':''}}</span>
        </li>

        <li v-if="isShow('透析中进食')">
          <label for="byl">透析中进食: </label>
          <span class="content" id="hx">{{this.record.dialysis_during?this.record.dialysis_during:''}}</span>
          <span class="unit" v-if="template_id != 36&& template_id != 6">{{this.record.dialysis_during?'ml':''}}</span>
          <span class="unit" v-else>{{this.record.dialysis_during?'kg':''}}</span>
        </li>

        <li v-if="isShow('出量')">
          <label for="byl">出量: </label>
          <span class="content" id="hx">{{this.record.stroke_volume?this.record.stroke_volume:''}}</span>
          <span class="unit">{{this.record.stroke_volume?'ml':''}}</span>
        </li>

        <li v-if="isShow('血流量')">
          <label for="xll">血流量: </label>
          <span class="content" id="xll">{{getBloodFlowName(this.record.blood_flow)}}</span>
        </li>

        <li v-if="isShow('封管液配置')">
          <label for="fgypz">封管液配置: </label>
          <!-- <span class="content" id="fgypz">{{getSealingFluidDisposeName(this.record.sealing_fluid_dispose)}}</span> -->
          <span class="content" id="fgypz">{{this.record.sealing_fluid_dispose}}</span>
        </li>

        <li v-if="isShow('封管液特殊') && this.record.sealing_fluid_dispose ? this.record.sealing_fluid_dispose.indexOf('特殊')>-1 : false">
          <label for="fgypzts">封管液配置(特殊): </label>
          <span class="content" id="fgypzts">{{this.record.sealing_fluid_special}}</span>
        </li>

         <li v-if="isShow('并发症其他')">
          <label for="fgypzts">并发症其他: </label>
          <span class="content" id="fgypzts">{{this.record.other_complication}}</span>
        </li>

       <li v-if="isShow('透析器凝血')">
          <label for="fgypzts">透析器凝血: </label>
          <span class="content" id="fgypzts">{{this.record.cruor}}</span>
        </li>

        <li v-if="isShow('机器运行')">
          <label for="fgypzts">机器运行: </label>
          <span class="content" id="fgypzts">{{this.record.machine_run}}</span>
        </li>

        <li v-if="isShow('透后尿素')">
          <label for="fgypzts">透后尿素: </label>
          <span class="content" id="fgypzts">{{this.record.after_urea}}</span>
          <span class="unit">mmol/L</span>
        </li>

        <li v-if="isShow('管路凝血')">
          <label for="fgypzts">管路凝血: </label>
          <span class="content" id="fgypzts">{{this.record.pip_coagulation}}</span>
        </li>

        <li v-if="isShow('输液量')">
          <label for="fgypzts">输液量(ml): </label>
          <span class="content" id="fgypzts">{{this.record.transfusion_volume}}</span>
        </li>

        <li v-if="isShow('上次透后体重')">
          <label for="fgypzts">上次透后体重: </label>
          <span class="content" id="fgypzts">{{this.record.last_after_weight}}</span>
        </li>

         <li v-if="isShow('累计血容量')">
            <label for="fgypzts">累计血容量: </label>
            <span class="content" id="fgypzts">{{this.record.accumulated_blood_volume}}</span>
         </li>

         <li v-if="isShow('置换液总量')">
            <label for="fgypzts">置换液总量: </label>
            <span class="content" id="fgypzts">{{this.record.displace_liqui_value}}</span>
         </li>

      </ul>
    </div>
    <div class="note">备注 : <span>{{remark}}</span></div>
  </div>
</template>

<script>
import { getDataConfig } from '@/utils/data'
export default {
  name: 'DialysisPrescription',
  data () {
    return {
      title: '透后评估 ',
      template_id: 0
    }
  },
  props: {
    record: {
      type: Object
    },
    predialysis: {
      type: Object
    },
   
  },
  created () {
    this.template_id = this.$store.getters.user.template_info.template_id
  },
  computed: {
    weight_after: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.weight_after
    },
    additional_weight: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.additional_weight
    },
    systolic_blood_pressure: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.systolic_blood_pressure
    },
    actual_ultrafiltration: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.actual_ultrafiltration
    },
    cruor: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.cruor
    },
    internal_fistula: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.internal_fistula
    },
    weight_loss: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.weight_loss
    },
    inpatient_department: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.inpatient_department
    },
    patient_gose: function () {
      if (this.record == null || this.record.id == '') {
        return 0
      }
      return this.record.patient_gose
    },
    diastolic_blood_pressure: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.diastolic_blood_pressure
    },
    actual_displacement: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.actual_displacement
    },
    symptom_after_dialysis: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.symptom_after_dialysis
    },
    blood_access_part: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      let vascular_access = this.$store.getters.vascular_access
      let valen = vascular_access.length
      let name = '-'
      for (let index = 0; index < valen; index++) {
        if (vascular_access[index].id == this.record.blood_access_part_id) {
          name = vascular_access[index].name
          break
        }
      }
      return name
    },
    puncture_point_oozing_blood_name: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      switch (this.record.puncture_point_oozing_blood) {
        case 1:
          return '有'
          break
        case 2:
          return '无'
          break

        default:
          return '-'
          break
      }
    },

    eat_name: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      switch (this.record.is_eat) {
        case 1:
          return '有'
          break
        case 2:
          return '无'
          break

        default:
          return '-'
          break
      }
    },
    patient_gose_name: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      switch (this.record.patient_gose) {
        case 1:
          return '离院'
          break
        case 2:
          return '留观'
          break
        case 3:
          return '住院'
          break
        case 4:
          return '门诊'
          break
        default:
          return '-'
          break
      }
    },
    blood_access_opera: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      let vascular_access = this.$store.getters.vascular_access_desc
      let valen = vascular_access.length
      let name = '-'
      for (let index = 0; index < valen; index++) {
        if (vascular_access[index].id == this.record.blood_access_part_opera_id) {
          name = vascular_access[index].name
          break
        }
      }
      return name
    },
    catheter: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.catheter
    },
    puncture_point_haematoma_name: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      switch (this.record.puncture_point_haematoma) {
        case 1:
          return '有'
          break
        case 2:
          return '无'
          break
        default:
          return '-'
          break
      }
    },
    breathing_rate: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.breathing_rate
    },
    temperature: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.temperature
    },
    pulse_frequency: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.pulse_frequency
    },
    actual_treatment_hour: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.actual_treatment_hour
    },
    actual_treatment_minute: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.actual_treatment_minute
    },
    dialysis_intakes_feed: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.dialysis_intakes
    },
    observation_content_other: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.observation_content_other
    },
    observation_content: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.observation_content
    },
    complication: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      return this.record.complication
    },
    internal_fistula_tremor_ac_name: function () {
      if (this.record == null || this.record.id == '') {
        return '-'
      }
      switch (this.record.internal_fistula_tremor_ac) {
        case 1:
          return '存在'
          break
        case 2:
          return '减弱'
          break
        case 3:
          return '无'
          break
        default:
          return '-'
          break
      }
    },

    remark: function () {
      if (this.record == null || this.record.id == '') {
        return ''
      }
      return this.record.remark
    },
    in_advance_minute: function () {
      if (this.record == null || this.record.id == '') {
        return ''
      }
      return this.record.in_advance_minute
    },
    in_advance_reason: function () {
      if (this.record == null || this.record.id == '') {
        return ''
      }
      return this.record.in_advance_reason + ',' + this.record.in_advance_reason_other
    },
    hemostasis_minute: function () {
      if (this.record == null || this.record.id == '') {
        return ''
      }

      return this.record.hemostasis_minute
    },
    in_advance_reason_other: function () {
      if (this.record == null || this.record.id == '') {
        return ''
      }
      return this.record.in_advance_reason_other
    }
  },
  methods: {
    isShow (name) {
      var filedList = this.$store.getters.user.fileds

      for (let i = 0; i < filedList.length; i++) {
        if (filedList[i].module == 5 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
          return true
        }
      }
      return false
    },
    getOpera: function (id) {
      var hemostasis_opera = this.$store.getters.hemostasis_opera
      var hemostasisOperaName = ''
      for (let i = 0; i < hemostasis_opera.length; i++) {
        if (hemostasis_opera[i].id == id) {
          hemostasisOperaName = hemostasis_opera[i].name
        }
      }
      return hemostasisOperaName
    },
    getTremorNoise: function (id) {
      var tremor_noise = this.$store.getters.tremor_noise
      var tremorNoiseName = ''
      for (let i = 0; i < tremor_noise.length; i++) {
        if (tremor_noise[i].id == id) {
          tremorNoiseName = tremor_noise[i].name
        }
      }
      return tremorNoiseName
    },
    getDisequilibriumSyndrome: function (id) {
      var disequilibrium_syndrome = this.$store.getters.disequilibrium_syndrome
      var disequilibriumSyndromeName = ''
      for (let i = 0; i < disequilibrium_syndrome.length; i++) {
        if (disequilibrium_syndrome[i].id == id) {
          disequilibriumSyndromeName = disequilibrium_syndrome[i].name
        }
      }
      return disequilibriumSyndromeName
    },
    getDisequilibriumSyndromeOptionName: function (id) {
      var disequilibrium_syndrome_option = this.$store.getters.disequilibrium_syndrome_option
      var disequilibriumSyndromeOptionName = ''
      for (let i = 0; i < disequilibrium_syndrome_option.length; i++) {
        if (disequilibrium_syndrome_option[i].id == id) {
          disequilibriumSyndromeOptionName = disequilibrium_syndrome_option[i].name
        }
      }
      return disequilibriumSyndromeOptionName
    },
    getArterialTubeName: function (id) {
      var arterial_tube = this.$store.getters.arterial_tube
      var arterialTubeName = ''
      for (let i = 0; i < arterial_tube.length; i++) {
        if (arterial_tube[i].id == id) {
          arterialTubeName = arterial_tube[i].name
        }
      }
      return arterialTubeName
    },
    getIntravenousTubeName: function (id) {
      var intravenous_tube = this.$store.getters.intravenous_tube
      var intravenousTubeName = ''
      for (let i = 0; i < intravenous_tube.length; i++) {
        if (intravenous_tube[i].id == id) {
          intravenousTubeName = intravenous_tube[i].name
        }
      }
      return intravenousTubeName
    },
    getChannelName: function (id) {
      var channel = this.$store.getters.channel
      var channelName = ''
      for (let i = 0; i < channel.length; i++) {
        if (channel[i].id == id) {
          channelName = channel[i].name
        }
      }
      return channelName
    },
    getDialyzer: function (id) {
      var dialyzer = this.$store.getters.dialyzer
      var dialyzerName = ''
      for (let i = 0; i < dialyzer.length; i++) {
        if (dialyzer[i].id == id) {
          dialyzerName = dialyzer[i].name
        }
      }
      return dialyzerName
    },
    getBloodFlowName: function (id) {
      var blood_flow_arr = getDataConfig('hemodialysis', 'blood_flow')
      var blood_flow_name = ''
      for (let i = 0; i < blood_flow_arr.length; i++) {
        if (blood_flow_arr[i].id == id) {
          blood_flow_name = blood_flow_arr[i].name
        }
      }
      return blood_flow_name
    },
    getSealingFluidDisposeName: function (id) {
      var sealing_fluid_dispose_arr = getDataConfig('hemodialysis', 'sealing_fluid_dispose')
      var sealing_fluid_dispose_name = ''
      for (let i = 0; i < sealing_fluid_dispose_arr.length; i++) {
        if (sealing_fluid_dispose_arr[i].id == id) {
          sealing_fluid_dispose_name = sealing_fluid_dispose_arr[i].name
        }
      }
      return sealing_fluid_dispose_name
    },
    getUnit: function (val) {
      switch (this.record.dialysis_intakes_unit) {
        case 1:
          return 'g'
          break
        case 2:
          return 'ml'
          break
        case 3:
          return 'kg'
          break
        default:
          return '-'
          break
      }
    }
    // setRecord(record) {
    //   if (record == null) {
    //     this.info1[0].content = ""
    //     this.info1[1].content = ""
    //     this.info1[2].content = ""
    //     this.info1[3].content = ""
    //     this.info1[4].content = ""

    //     this.info2[0].content = ""
    //     this.info2[1].content = ""
    //     this.info2[2].content = ""
    //     this.info2[3].content = ""
    //     this.info2[4].content = ""

    //     this.info3[0].content = ""
    //     this.info3[1].content = ""
    //     this.info3[2].content = ""
    //     this.info3[3].content = ""
    //     this.info3[4].content = ""

    //     this.note = ""

    //   } else {
    //     this.info1[0].content = record.weight_after
    //     this.info1[1].content = record.systolic_blood_pressure
    //     this.info1[2].content = record.actual_ultrafiltration
    //     this.info1[3].content = record.cruor
    //     // this.info1[4].content = record.systolic_blood_pressure

    //     this.info2[0].content = record.weight_loss
    //     this.info2[1].content = record.diastolic_blood_pressure
    //     this.info2[2].content = record.actual_displacement
    //     this.info2[3].content = record.symptom_after_dialysis
    //     this.info2[4].content = record.catheter

    //     this.info3[0].content = record.temperature
    //     this.info3[1].content = record.pulse_frequency
    //     this.info3[2].content = record.actual_treatment_hour
    //     this.info3[3].content = record.dialysis_intakes_feed
    //     this.info3[4].content = record.complication

    //     this.note = record.remark
    //   }
    // }
  }

}
</script>

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