// 住院证查询
import React from 'react';
import { Card, Row, Col, Form, DatePicker, Select, Button, Table, Switch, Checkbox, message, Pagination, Input } from 'antd';
import { $http } from 'containers/config/https';
import CommonPagination from 'components/pagination/index';
import ColumnAuthoritysModel from 'pages/columnAuthority/ColumnAuthoritysModel';
import ReadCard from 'components/readcard/ReadCard';
import Moment from 'moment';
import { handleExcel } from 'tools/handleExcel.js';
import store from 'store';
import './style/index.less';
import { Util, dayFormat } from 'tools/index';
import { $loadTemplate } from '../../lodop/Common/Print.js';

const { Option } = Select;
const FormItem = Form.Item;
const formItemLayout = {    // label 和input宽度
    labelCol: { span: 8 },
    wrapperCol: { span: 16 },
};
const formItemSpan = {    // label 和input宽度
    labelCol: { span: 5 },
    wrapperCol: { span: 19 },
};
const formItemLayoutCheck = {
    labelCol: { span: 5 },
    wrapperCol: { span: 19 },
}
let user;
const Inpatient = Form.create()(
    class extends React.Component {
        constructor() {
            user = window.sessionStorage.userData ? JSON.parse(window.sessionStorage.userData) : {};
            super();
            this.state = {
                getDepartmentInformation: [],//科室下拉框
                pageSize: 10,
                page: 1,
                total: 0,
                columns: [],
                columnsWidth: '',
                consultation: {},
                tableData: [],
                data: [],
                ENObj: {},
                CNObj: {},
                languageObj: {},
                locList: [],         //科室
                wardList: [],        //病区
                docList: [],         //医生
                locInfo: [], // 科室名称下拉框
                wardInfo: [],//病区
                wardBedAry: [],//床号
                userInfo: [],//医生
                selectData: [],
                locID: '',
                cardTypeList: [],
                cardTypeDefault: '',
                cardNo: "",
                hospStatus:[],
                adminID: '',
            }

        }

        componentDidMount() {
            // 初始化数据
            this.getTableColumns();
            this.handleBaseData();
            this.getDepartmentInformation();
            this.getLocList("locList", "");
        }
        //加载基础数据
        handleBaseData = () => {
            let data = {
                params: [{
                    hospID: user.hospID,
                }]
            }
            $http.post('urlDeault', this, {
                code: "04080005",
                data: data,
                success: (res) => {
                    if (+res.errorCode === 0) {
                        let defaultCardTypeID = "";
                        res.result.cardTypeList.map((item) => {
                            if (item.defaultFlag === "Y") {
                                defaultCardTypeID = item.id;
                            }
                        })
                        this.setState({
                            cardTypeList: res.result.cardTypeList,
                            cardTypeID: defaultCardTypeID,
                            defaultCardTypeID: defaultCardTypeID,
                            replenishZero: res.result.cardTypeList[0].replenishZero,
                            cardLength: res.result.cardTypeList[0].cardLength,
                            firstCharge: res.result.firstCharge,
                            docList:res.result.doctorArr,
                            hospStatus:res.result.hospStatus,
                        })
                    } else {
                        message.error('获取信息失败：' + res.errorMessage);
                    }
                }
            })
        }
        //获取列表头数据
        getTableColumns = () => {
            let { userInfo } = this.state;
            let data = {
                params: [{
                    reactCode: [],
                    compontName: 'Inpatientcertificateinformatio',
                    type: 'C',
                }]
            }
            $http.post('urlS', this, {
                code: '01040073',
                data: data,
                success: function (res) {
                    if (+res.errorCode === 0) {
                        // let column = res.result.C;
                        // if (userData.language == 'EN') {
                        //     for (let i = 0; i < column.length; i++) {
                        //         column[i].title = column[i].enDescripts
                        //     }
                        // }
                        this.setState({
                            columns: res.result.C,
                            columnsWidth: res.totalWidth,
                            // ENObj: res.result.language.EN,
                            // CNObj: res.result.language.CN,
                        }, () => {
                            this.handleQuery();
                        })
                    }
                }
            });
        };

        componentWillUnmount() {
            // 组件销毁前将静止让setState修改state的状态，防止内存泄漏
            this.setState = (state, callback) => { return; }
        }
        onColumnRef = (ref) => {
            this.columnRef = ref;
        }

        // 获取列表数据
        handleQuery = () => {
            const formData = this.props.form.getFieldsValue();
            let data = {
                params: [{
                    patNo: formData.patNo,
                    locID: formData.locID,
                    patStartDate: formData.patStartDate ? Moment(formData.patStartDate).format('YYYY-MM-DD') : null,
                    patEndDate: formData.patEndDate ? Moment(formData.patEndDate).format('YYYY-MM-DD') : null,
                    patStatusData: this.state.consultation.patStatusData === 'Y' ? 'Y' : 'N',
                    userID: formData.userID,
                    cardTypeID: this.state.cardTypeID,
                    wardID: formData.wardID,
                    cardNo: this.state.cardNo,
                    ordStatus: formData.ordStatus,
                }],
                pagination: [{
                    pageSize: this.state.pageSize,
                    currentPage: this.state.page,
                }]
            };
            $http.post('urlS', this, {
                code: '03055010',
                data: data,
                success: (res) => {
                    if (res.errorCode === "0") {
                        for (let index = 0; index < res.result.length; index++) {
                            res.result.row[index].key = index + 1;
                        }
                        this.setState({
                            total: res.result.total,
                            tableData: res.result.row,
                        });
                    } else {
                        this.setState({
                            total: 0,
                            tableData: []
                        });
                    }
                }
            });
        }
        //患者编号
        patNotEnter = (e) => {
            const formData = this.props.form.getFieldsValue();
            var cardNoNum = ""
            if (formData.patNo != ""){
                
                let No = formData.patNo ? formData.patNo : ''
                // console.log("长度handleLength",this.state.cardLength,parseInt(this.state.cardLength))
                let length = 10;
                cardNoNum = (Array(length).join(0) + No).slice(-length)
                // this.props.form.setFieldsValue({ cardNo: num });
                this.props.form.setFieldsValue({patNo:cardNoNum})
            }
            if (e.keyCode = '13') {
                this.setState({
                    patNo: ''
                }, () => {
                    this.handleQuery();
                })
            }
        }

        handleZero = () => {
            
        }



        // 3.13.23.获取科室信息
        getDepartmentInformation() {
            let data = {
                params: [{

                }]
            }
            $http.post('urlS', this, {
                code: "04090022",
                data: data,
                success: function (res) {
                    if (res.errorCode == '0') {
                        this.setState({
                            // locInfo: res.result.locInfo,  //科室                      
                            userInfo: res.result.userInfo,//医生
                            wardInfo: res.result.wardInfo,//病区
                            wardBedAry: res.result.wardBedAry,//床号
                        })
                    } else {
                        this.setState({ DepartmentInformation: [] })
                    }
                }
            })
        }
        // 重置表单
        resetFields = () => {
            this.props.form.resetFields(); //清空所有

        };
        getLocList = (flag, locID) => {
            let linkFlag = "", docFlag = "";
            if (flag === "locList") {
                linkFlag = "";
            } else {
                linkFlag = "1";
                docFlag = "1";
            }
            let data = {
                params: [{
                    type: "I^OI",
                    hospID: user.hospID,
                    locID: locID,
                    detailFlag: "",
                    linkFlag: linkFlag,
                    docFlag: docFlag,
                    linkType: "W",
                }]
            }
            $http.post('urlDeault', this, {
                code: "04020008", data: data,
                success: (res) => {
                    if (+res.errorCode === 0) {
                        if (flag === "locList") {
                            this.setState({
                                locInfo: res.result.Data,
                            })
                        } else {
                            if (res.result.Data.length > 0) {
                                this.setState({
                                    locInfo: res.result.Data,  //科室 
                                }, () => {
                                    // console.log(this.state.locInfo)
                                    //清空form表单的值
                                    this.props.form.setFieldsValue({
                                        wardID: '',
                                    })
                                })
                            }
                        }
                    }
                }
            })
        }

        loadBedList = (wardID) => {
            let data = {
                params: [{
                    wardID: wardID,
                }]
            }
            $http.post('urlDeault', this, {
                code: "04090022",
                data: data,
                success: (res) => {
                    if (+res.errorCode === 0) {
                        this.setState({
                            wardBedAry: res.result.wardBedAry,//床号
                        }, () => {
                            //清空form表单的值
                            this.props.form.setFieldsValue({
                                admLocBedID: ''
                            })
                        })
                    }
                }
            })
        }
        //科室改变
        onInLocChange = (value, option) => {
            this.props.form.setFieldsValue({
                inWardID: undefined,
            });
            if (value) {
                this.getLocList("wardList", value);
                this.props.form.setFieldsValue({
                    wardID: '',
                })
            } else {
                this.getDepartmentInformation();
                this.props.form.setFieldsValue({
                    wardID: '',
                })
            }
        }


        //查询床位
        BedChange = (locID) => {
            let data = {
                params: [{
                    locID: locID,
                }]
            }
            $http.post('urlS', this, {
                code: "01050021",
                data: data,
                success: function (res) {
                    if (+res.errorCode === 0) {
                        this.setState({ selectData: res.result.Data })
                    } else {
                        message.error('查询失败：' + res.errorMessage);
                    }
                }
            })
        }
        //病区改变
        onInWardChange = (value, option) => {
            if (value) {
                this.loadBedList(value);
                // this.onInLocChange(value);
            } else {
                this.props.form.setFieldsValue({
                    admLocBedID: ''
                })
            }
        }
        //科室获取焦点
        onLocFocus = () => {
            if (this.state.locList.length === 0) {
                this.getLocList("locList", "");
            }
            let tipsFlag = "tips" + this.firstToUp("inLocID");
            this.setState({
                [tipsFlag]: "",
            })
        }
        //病区获取焦点
        onWardFocus = (flag, e) => {
            const locID = this.props.form.getFieldValue('inLocID');
            if ((this.state.wardList.length === 0) && (locID) && (locID !== "")) {
                this.getLocList("wardList", locID);
            }
            let tips = "tips" + this.firstToUp(flag);
            this.setState({
                [tips]: "",
            })
        }
        //首字母大写
        firstToUp = (str) => {
            return str.substring(0, 1).toUpperCase() + str.substring(1);

        }  //床位改变
        onLocBedChange = (value, option) => {
            if (value) {
                this.BedChange(value);
                // this.onInLocChange(value);
            }
        }
        //床位获取焦点
        onLocBedFocus = (flag, e) => {
            const locID = this.props.form.getFieldValue('inLocID');
            if (this.state.wardList.length === 0) {
                this.getLocList("wardList", locID);
            }
            let tips = "tips" + this.firstToUp(flag);
            this.setState({
                [tips]: "",
            })
        }
        // 页码改变的回调，参数是改变后的页码及每页条数 库存单
        onChange = (page, pageSize) => {
            this.setState({ page: page, pageSize: this.state.pageSize }, () => {
                // 重新调用查询方法
                this.handleQuery();
            });
        };

        onShowSizeChange = (current, size) => {
            this.setState({ page: current, pageSize: size }, () => {
                // 重新调用查询方法
                this.onChange(current, size);
            })
        };

        // 显示分页总条数
        showTotal(total) {
            return `共 ${total} 条`;
        }



        //勾选
        handleStatusClick = (e) => {
            let { consultation } = this.state
            consultation.patStatusData = consultation.patStatusData === 'Y' ? 'N' : 'Y'
            this.setState({
                consultation: consultation
            })
        }
        ///卡号回车事件
        onCardEnter = (e) => {
            e.stopPropagation();
            this.setState({
                cardNo: e.target.value,
                patNo: '',
                defaultAdmIndex: '',
            }, () => {
                let cardNo = this.handleZero()
                if (cardNo != '') {
                    this.handleQuery();
                } else {
                    message.error('请输入卡号');
                }
            })
        }
        //进行卡号检测补0操作
        handleZero = () => {
            //补0 Y 长度不为0
            let cardNoNum = ''
            if (this.state.replenishZero == "Y" && parseInt(this.state.cardLength) && parseInt(this.state.cardLength) > 0 && this.state.cardNo && this.state.cardNo.length > 0) {
                let No = this.state.cardNo ? this.state.cardNo : ''
                let length = parseInt(this.state.cardLength)
                cardNoNum = (Array(length).join(0) + No).slice(-length)
                this.setState({
                    cardNo: cardNoNum,
                })
            }
            return cardNoNum
        }
        //卡类型修改
        cardTypeChange = (value, option) => {
            this.setState({
                cardLength: option.props.cardlength,
                cardTypeID: value,
            })
        }
        //卡号修改
        onCardChange = (e) => {
            this.setState({
                cardNo: e.target.value
            })
        }

        handleTableExcel = () =>{
            const formData = this.props.form.getFieldsValue();
            let data = {
                params: [{
                    patNo: formData.patNo,
                    locID: formData.locID,
                    patStartDate: formData.patStartDate ? Moment(formData.patStartDate).format('YYYY-MM-DD') : null,
                    patEndDate: formData.patEndDate ? Moment(formData.patEndDate).format('YYYY-MM-DD') : null,
                    patStatusData: this.state.consultation.patStatusData === 'Y' ? 'Y' : 'N',
                    userID: formData.userID,
                    cardTypeID: this.state.cardTypeID,
                    wardID: formData.wardID,
                    cardNo: this.state.cardNo,
                    ordStatus: formData.ordStatus,
                }],
                pagination: [{
                    pageSize: this.state.pageSize,
                    currentPage: this.state.page,
                }]
            };
            $http.post('urlS', this, {
                code: '03055010',
                data: data,
                success: (res) => {
                    if (res.errorCode === "0") {
                        for (let index = 0; index < res.result.length; index++) {
                            res.result.row[index].key = index + 1;
                        }
                        this.setState({
                            total: res.result.row.total,
                            tableData: res.result.row,
                            cardTypeDefault: res.result.row.cardTypeDefault,
                        });
                        handleExcel.exportExcel(this.state.columns, this.state.tableData, '住院证查询');
                        this.setState({ exportVisible: false, exportLoading: false, exportCheckMainValue: false, exportCheckDetailValue: false }, () => {
                            message.success("导出住院证数据表成功");
                        });
                    } else {
                        this.setState({
                            total: 0,
                            tableData: []
                        });
                    }
                }
            });
        }

        //读卡
        onReadCard = () => {
            const { cardTypeID } = this.state;
            this.readCard.ReadCard(cardTypeID, "R", (json) => {
                if (!Util.isEmpty(json)) { 
                    this.setState({
                        cardInfo: json,
                        cardNo: json.cardNo,
                        patNo: !Util.isEmpty(json.patInfo) ? json.patInfo.patNo : '',
                    }, () => {
                        if (json.hasOwnProperty('patInfo')) {
                            this.handleGetPatInfo(json.patInfo.patNo, '');
                        }
                    })
                }
            })
        }
        // 打印住院证
        print = () => {
            if (Util.isEmpty(this.state.adminID)){

            }else{
                let data = {};
                data = {
                    params: [{
                        adminID: this.state.adminID
                    }]
                }
                let code = '03050224'
                let templateCode = 'Inpatientcard'
                $http.post('urlS', this, {
                    code: code,
                    data: data,
                    success: function (res) {
                        if (res.errorCode === '0') {
                            //加载模板
                            $loadTemplate(templateCode, res.result);
                        }
                    }
                })
            }        
        }
        //点击行
        onRowClick = (record) => {
            if (record.id === this.state.adminID) {
                this.setState({
                    adminID: '',
                })
            } else {
                this.setState({
                    adminID: record.id,
                })
            }
        }
        //选中样式
        setRowClassName = (row) => {
            return row.id === this.state.adminID ? 'clickRowStyle' : '';
        }
        render() {
            var language = user.language
            var languageObj = {}
            if (language == "EN") {
                languageObj = this.state.ENObj
            } else {
                languageObj = this.state.CNObj
            }
            let { columns, columnsWidth } = this.state;
            const consultation = this.state.consultation;
            const { getFieldDecorator } = this.props.form;
            let { locList } = this.state;
            return (
                <div className="Inpatient">
                    <Row>
                        <Card
                            size="small"
                            title={<div className="card-title-left-icon"><div></div>住院证查询</div>}
                        >
                            <Col span={18}>
                                <Form>
                                    <Row>
                                        <Col span={5}>
                                            <FormItem {...formItemLayout} label="卡类型">
                                                {getFieldDecorator('cardTypeID', {
                                                    initialValue: consultation.cardTypeID ? consultation.cardTypeID : this.state.defaultCardTypeID,
                                                    rules: [{ required: false, message: '请输入卡类型' }]
                                                })(
                                                    <Select allowClear  
                                                        showSearch onChange={this.cardTypeChange}
                                                        value={this.state.cardTypeID}
                                                        >
                                                        {this.state.cardTypeList.map(data => (
                                                            <Select.Option role={data.descripts + '^' + data.descriptsSPCode} key={data.id} cardlength={data.cardLength}>{data.descripts}</Select.Option>
                                                        ))}
                                                    </Select>
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={5}>
                                            <FormItem {...formItemLayout} label='科室'>
                                                {getFieldDecorator('locID', {
                                                    initialValue: consultation.locID ? consultation.locID : "",
                                                    rules: [{ required: false, message: '科室不能为空' }]
                                                })(
                                                    <Select
                                                        allowClear
                                                        showSearch
                                                        optionFilterProp='role'
                                                        onFocus={this.onLocFocus}
                                                        onChange={this.onInLocChange}
                                                    >
                                                        {this.state.locInfo.map(data => (
                                                            <Select.Option role={data.descripts + '^' + data.descriptsSPCode} key={data.id}>{data.descripts}</Select.Option>
                                                        ))}
                                                    </Select>
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={4} offset={1} className="time">
                                            <FormItem>
                                                {getFieldDecorator('patStartDate', {
                                                    initialValue: Moment(Moment().format('YYYY-MM-DD')),
                                                    rules: [{ required: false, message: '开始日期不能为空' }]
                                                })(
                                                    <DatePicker format="YYYY-MM-DD" />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={1} style={{ textAlign: 'center', lineHeight: '37px' }}>
                                            <span>至</span>
                                        </Col>
                                        <Col span={4} className="time">
                                            <FormItem>
                                                {getFieldDecorator('patEndDate', {
                                                    initialValue: Moment(Moment().format('YYYY-MM-DD')),
                                                    rules: [{ required: false, message: '结束日期不能为空' }]
                                                })(
                                                    <DatePicker format="YYYY-MM-DD" />
                                                )}
                                            </FormItem>
                                        </Col>

                                        <Col span={1} offset={1}>
                                            <FormItem {...formItemLayoutCheck} label=''>
                                                {getFieldDecorator('patStatusData', {
                                                    initialValue: undefined,
                                                    rules: [{ required: false, message: '' }]
                                                })(
                                                    <Checkbox style={{ marginLeft: '30px' }} checked={consultation.patStatusData === 'Y' ? true : false} onChange={(even) => { this.handleStatusClick(even) }}></Checkbox>
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={2} style={{ marginTop: '10px' }}>
                                            <span>预约(建证)日期</span>
                                        </Col>
                                    </Row>
                                    <Row>
                                        <Col span={5}>
                                            <FormItem {...formItemLayout} label="卡号">
                                                {getFieldDecorator('cardNo', {
                                                    initialValue: consultation.cardNo ? consultation.cardNo : "",
                                                    rules: [{ required: false, message: '请输入卡号' }]
                                                })(
                                                    <Input onChange={this.onCardChange}
                                                        allowClear={true}
                                                        onPressEnter={this.onCardEnter} />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={5}>
                                            <FormItem {...formItemLayout} label='病区'>
                                                {getFieldDecorator('wardID', {
                                                    initialValue: consultation.wardID ? consultation.wardID : "",
                                                    rules: [{ required: false, message: '病区不能为空' }]
                                                })(
                                                    <Select
                                                        allowClear
                                                        showSearch
                                                        optionFilterProp='role'
                                                        onFocus={this.onWardFocus.bind(this, "inWardID")}
                                                        onChange={this.onInWardChange}
                                                    >
                                                        {this.state.wardInfo.map(data => (
                                                            <Select.Option role={data.descripts + '^' + data.descriptsSPCode} key={data.id}>{data.descripts}</Select.Option>
                                                        ))}
                                                    </Select>
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={5}>
                                            <FormItem {...formItemLayout} label="病人编号">
                                                {getFieldDecorator('patNo', {
                                                    initialValue: undefined,
                                                    rules: [{ required: false, message: '请输入病人编号' }]
                                                })(
                                                    <Input  onPressEnter={this.patNotEnter} />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={5}>
                                            <FormItem {...formItemLayout} label='录入人'>
                                                {getFieldDecorator('userID', {
                                                    initialValue: undefined,
                                                    // initialValue: sessionStorage.user? JSON.parse(sessionStorage.user).userID : undefined,
                                                    rules: [{ required: false, message: '录入人不能为空' }]
                                                })(
                                                    <Select allowClear
                                                        showSearch
                                                        optionFilterProp='role'
                        
                                                        onSelect={this.handleQuery}
                                                    >
                                                        {this.state.docList.map(data => (
                                                            <Select.Option role={data.descripts + '^' + data.descriptsSPCode} key={data.id} >{data.descripts}</Select.Option>
                                                        ))}
                                                    </Select>
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={4}>
                                            <FormItem {...formItemLayout} label='当前状态'>
                                                {getFieldDecorator('ordStatus', {
                                                    initialValue: "",
                                                    rules: [{ required: false, message: '当前状态不能为空' }]
                                                })(
                                                    <Select allowClear
                                                        showSearch
                                                        optionFilterProp='role'
                                
                                                        onSelect={this.handleQuery}
                                                    >
                                                         {this.state.hospStatus.map(data => (
                                                            <Select.Option role={data.descripts + '^' + data.descriptsSPCode} key={data.id} >{data.descripts}</Select.Option>
                                                        ))}
                                                    </Select>
                                                )}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Form>
                            </Col>
                            <Col span={4}>
                                <Row style={{ margin: '5px 0 18px 80px' }} className="button">
                                    <Button onClick={this.onReadCard} style={{ marginRight: '15px' }}>读卡</Button>
                                    <Button style={{ marginRight: '30px' }} onClick={this.handleQuery}>查询</Button>
                                </Row>
                                <Row style={{ margin: '5px 0 18px 80px' }} className="button">
                                    <Button style={{ marginRight: '15px' }} onClick={this.handleTableExcel} type="primary">导出</Button>
                                    <Button style={{ marginRight: '30px' }} onClick={this.print} type="primary">打印</Button>
                                </Row>
                            </Col>

                        </Card>
                    </Row>
                    <Row>
                        <Col>
                            <Card
                                size="small"
                                title={<div className="card-title-left-icon">
                                    <div></div>住院证记录</div>

                                }
                            >
                                <div style={{ height: store.getState().tableHeight.y + 45 + 'px' }}>
                                    <Table
                                        columns={columns.length > 0 ? columns : this.columns}
                                        dataSource={this.state.tableData}
                                        pagination={false}
                                        bordered
                                        rowClassName={this.setRowClassName}
                                        onRow={(record, index) => ({ onClick: (e) => { this.onRowClick(record, index, e) } })}
                                        rowKey={(row) => {
                                            return row.ordID
                                        }}
                                        style={{ height: store.getState().tableHeight.y - 20 + 'px' }}
                                        scroll={{ x: columnsWidth ? columnsWidth : 1200, y: store.getState().tableHeight.y - 85 }}
                                        onHeaderRow={column => {
                                            return {
                                                onDoubleClick: () => {
                                                    this.columnRef.onOpenModel();
                                                },
                                            };
                                        }}
                                    />
                                    <CommonPagination size='small' current={this.state.page} total={this.state.total} search='search'
                                        onShowSizeChange={this.onShowSizeChange.bind(this)} complete={true} dataSource={this.state.tableData}
                                        loading={this.state.loading} onChange={this.onChange.bind(this)} />
                                </div>
                            </Card>
                        </Col>
                    </Row>
                    <ColumnAuthoritysModel
                        clientWidth='800px'
                        compontName='Inpatientcertificateinformatio'
                        configType="C"
                        onRef={this.onColumnRef}
                        reloadData={this.getTableColumns}
                    />
                </div>
            )
        }
    }
);
export default Inpatient;