<template>
  <el-descriptions :column="8" border style="width:100%;" title="基本信息" >
  <el-descriptions-item label="床号">
    {{ props.patientInfo.bedNo }}
  </el-descriptions-item>
  <el-descriptions-item label="姓名">
    {{ props.patientInfo.name }}
  </el-descriptions-item>
  <el-descriptions-item label="出生日期">
    {{ props.patientInfo.birthDate }} {{ companyFunc(props.patientInfo.age, '岁') }}
  </el-descriptions-item>
  <el-descriptions-item label="性别">
    {{ props.patientInfo.sexName }}
  </el-descriptions-item>
  <el-descriptions-item label="入院日期">
    {{ props.patientInfo.admissDate }}
  </el-descriptions-item>
  <el-descriptions-item label="住院天数">
    {{ companyFunc(props.patientInfo.actIptDays,'天') }}
  </el-descriptions-item>
  <el-descriptions-item label="管床医生">
    {{ props.patientInfo.referPhysicianName }}
  </el-descriptions-item>
  <el-descriptions-item label="病区">
    {{ props.patientInfo.admissWardName }}
  </el-descriptions-item>
  <el-descriptions-item label="小科室">
    {{ props.patientInfo.zkWardName }}
  </el-descriptions-item>
  <el-descriptions-item label="身份">
    {{ props.patientInfo.medTypeName }}
  </el-descriptions-item>
  <el-descriptions-item label="总费用">
    {{ props.patientInfo.totalCharge }}
    <span style="color: red"> {{ props.patientInfo.balance }}</span>
  </el-descriptions-item>
  <el-descriptions-item label="药占比">
    {{ props.patientInfo.yp }}
  </el-descriptions-item>
    <el-descriptions-item v-if="stringNotBlank(props.patientInfo.criticallyIllStatus) " label="病危状态">
      <el-tag  effect="dark" type="danger">
        {{ props.patientInfo.criticallyIllStatus }}
      </el-tag>
    </el-descriptions-item>
    <el-descriptions-item v-if="!stringNotBlank(props.patientInfo.criticallyIllStatus) " label="病危状态">
        {{ props.patientInfo.criticallyIllStatus }}
    </el-descriptions-item>
    <el-descriptions-item  v-if="stringNotBlank(props.patientInfo.nursingLevel) "  label="护理级别">
      <el-tag  effect="dark" type="success">
      {{ props.patientInfo.nursingLevel }}
      </el-tag>
    </el-descriptions-item>
    <el-descriptions-item  v-else  label="护理级别">
      {{ props.patientInfo.nursingLevel }}
    </el-descriptions-item>
    <el-descriptions-item  label="手术状态">
      <el-tag  effect="dark" type="warning">
        {{ props.patientInfo.oprtStatus }}
      </el-tag>
    </el-descriptions-item>
  </el-descriptions>
</template>

<script setup name="PatientInfo">
import store from '@/store'
import {stringNotBlank} from "@/utils/blank-utils";
import { computed, onMounted, ref } from 'vue'
const props = defineProps({
  patientInfo: {}
})


const companyFunc = (val, company) => {
  if (stringNotBlank(val)) {
    return val + company
  } else {
    return ''
  }
}


onMounted(() => {
})

</script>

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