import React, { Component } from "react";
import style from "./index.less";

class PatInfo extends Component {
  constructor(props){
    super(props)
  }
  componentWillMount() {
    const { getMessage } = this.props;
    getMessage && getMessage()
  }

  render(){
    const {message} = this.props.patInfo;
     return <table className={style["table"]}>
      <tr>
        <td key='1' className={`${style.tdBorderB} ${style.tdBorderR}`}>卡号：{message.patientIdNo && message.patientIdNo}</td>
        <td key='2' className={`${style.tdBorderB} ${style.tdBorderR}`}>姓名：{message.patientName && message.patientName}</td>
        <td key='3' className={`${style.tdBorderB} ${style.tdBorderR}`}>年龄：{message.patientAge && message.patientAge}</td>
        <td key='4' className={`${style.tdBorderB} ${style.tdBorderR}`}>性别：{message.patientSex && message.patientSex}</td>
      </tr>
      <tr>
        <td key='5' className={`${style.tdBorderR}`} style={{whiteSpace: 'nowrap'}}>就诊时间：{message.systemTime&&message.systemTime.substring(0, 10)}</td>
        <td key='6' className={`${style.tdBorderR}`}>科室：{message.hospitalDeptName && message.hospitalDeptName}</td>
        <td key='7' className={`${style.tdBorderR}`}>医生：{message.doctorName && message.doctorName}</td>
        <td key='8' className={`${style.tdBorderR}`}>门诊号：{message.recordId && message.recordId}</td>
      </tr>
    </table>;
  }
}

export default PatInfo;
