import React from 'react'; import { Grid, Row, Col } from 'react-bootstrap'; import { Profile, Fluidbar } from '../../components/index'; import { app } from '../../core/app'; import SessionUtils from '../session-utils'; import './patient-panel.less'; export default class PatientPanel extends React.Component { stateClass() { switch (this.props.tbcase.state) { case 'NOT_ONTREATMENT': return 'cs-NOT_ONTREATMENT'; case 'ONTREATMENT': return 'cs-ONTREATMENT'; default: return 'cs-CLOSED'; } } render() { const tbcase = this.props.tbcase; const patient = this.props.tbcase.patient; if (!patient) { return null; } const type = patient.gender === 'MALE' ? 'male' : 'female'; const lists = app.getState().app.lists; const claName = lists['CaseClassification' + tbcase.classification][tbcase.diagnosisType]; const stateName = lists.CaseState[tbcase.state]; const validationName = tbcase.validated ? __('TbCase.validated') : __('TbCase.waitingValidation'); const ownerUnit = tbcase.ownerUnit; const subtitle = (