import React, { Component } from 'react';

import MainSuit from '@containers/MainSuit';
import CurrentIll from '@containers/CurrentIll';
import OtherHistory from '@containers/OtherHistory';
import CheckBody from '@containers/CheckBody';
import Diagnosis from '@containers/Diagnosis';
import Inspect from '@containers/Inspect';
import AssistCheck from '@containers/AssistCheck';
import OperationContainer from '../../containers/OperationContainer'
import style from './index.less';
import AdviceContainer from '../../containers/AdviceContainer';
import InfoTitle from '@components/InfoTitle'
import {getWindowInnerHeight} from '@common/js/func';

class EMRContainer extends Component {
    constructor(props){
        super(props);
        this.$cont = React.createRef();
    }
    componentDidMount(){
        // const {initHospital} = this.props;
        // initHospital()
        // const height = getWindowInnerHeight()-115;
        // this.$cont.current.style.height = height+"px";
        // const {initHistoryLastest} = this.props;
        // let timer = setInterval(()=>{
        //     let baseDate = store.getState().patInfo.message;
        //     if(JSON.stringify(baseDate) != '{}') {
        //         initHistoryLastest();
        //         clearInterval(timer)
        //     }
        // },500)

    }
    render() {
        return <div className={style['EMR-container']}>
            <div className={style['inner']} ref={this.$cont}>
                <InfoTitle></InfoTitle>
                <MainSuit></MainSuit>
                <CurrentIll></CurrentIll>
                <OtherHistory></OtherHistory>
                <CheckBody></CheckBody>
                <Inspect></Inspect>
                <AssistCheck></AssistCheck>
                <Diagnosis></Diagnosis>
                <AdviceContainer></AdviceContainer>
            </div>
            <OperationContainer></OperationContainer>
        </div>
    }
}

export default EMRContainer;