Browse Source

解析结果--

zhouna 3 years ago
parent
commit
38a6b3a37c

+ 202 - 0
src/components/AnalysisResult/index.jsx

@@ -0,0 +1,202 @@
+import React,{Component} from 'react';
+import styles from './index.less';
+import ReactDom from "react-dom";
+import close from "@common/images/close1.png";
+
+class AnalysisResult extends Component {
+  constructor(props) {
+	super(props);
+  }
+  render(){
+    const {show,onClose,data} = this.props;
+    const {chiefLabel,presentLabel,pastLabel,vitalLabel,lis,lisOrder,pacs,pacsOrder,pacsLabel,
+	  diag,operation,operationOrder,transfusion,transfusionOrder,drug,drugOrder} = data;
+    const chiefClinicals = (chiefLabel||{}).clinicals||[];
+	const chiefDiags = (chiefLabel||{}).diags||[];
+	const presentDiags = (presentLabel||{}).diags||[];
+	const presentOperations = (presentLabel||{}).operations||[];
+	const presentMedicines = (presentLabel||{}).medicines||[];
+	const clinicals=(presentLabel||{}).clinicals||[];
+	const {medicines,diags,allergyMedicines,operations}=pastLabel||{};
+	const {res,pacsNumList}=pacsLabel||{};
+	const domNode = document.getElementById('root');
+	return ReactDom.createPortal(
+		show?<React.Fragment>
+		  <div className={styles.maskCover} onClick={this.showHistoryBox}></div>
+		  <div className={styles.contentBox}>
+			<h2>CRF解析结果</h2>
+			<img className={styles.close} src={close} alt="" onClick={()=>onClose(false)}/>
+			<div className={styles.content}>
+			<div className="tableItem">
+			  <p className={styles.title}>基础信息/主诉/现病史/既往史</p>
+			  <table>
+				<tr>
+				  <th>来源</th>
+				  <th>原词</th>
+				  <th>类型</th>
+				  <th>转化为标准词</th>
+				  <th>否定属性</th>
+				</tr>
+				<tr>
+				  <td>基础信息</td>
+				  <td>{data.age}</td>
+				  <td>年龄</td>
+				  <td>{data.ageNum}</td>
+				  <td>{data.negative}</td>
+				</tr>
+				{chiefClinicals.map((item)=>{
+				  return <tr>
+					<td>主诉</td>
+					<td>{item.name}</td>
+					<td>临床表现</td>
+					<td>{item.standName}</td>
+					<td>{(item.negative||{}).name}</td>
+				  </tr>;
+				})}
+				{chiefDiags.map((item)=>{
+				  return <tr>
+					<td>主诉</td>
+					<td>{item.name}</td>
+					<td>诊断</td>
+					<td>{item.standName}</td>
+					<td>{(item.negative||{}).name}</td>
+				  </tr>;
+				})}
+				{clinicals.map((item)=>{
+				  return <tr>
+					<td>现病史</td>
+					<td>{item.name}</td>
+					<td>临床表现</td>
+					<td>{item.standName}</td>
+					<td>{(item.negative||{}).name}</td>
+				  </tr>;
+				})}
+				{presentDiags.map((item)=>{
+				  return <tr>
+					<td>现病史</td>
+					<td>{item.name}</td>
+					<td>诊断</td>
+					<td>{item.standName}</td>
+					<td>{(item.negative||{}).name}</td>
+				  </tr>;
+				})}
+				{presentOperations.map((item)=>{
+				  return <tr>
+					<td>现病史</td>
+					<td>{item.name}</td>
+					<td>手术</td>
+					<td>{item.standName}</td>
+					<td>{(item.negative||{}).name}</td>
+				  </tr>;
+				})}
+				{presentMedicines.map((item)=>{
+				  return <tr>
+					<td>现病史</td>
+					<td>{item.name}</td>
+					<td>药品</td>
+					<td>{item.standName}</td>
+					<td>{(item.negative||{}).name}</td>
+				  </tr>;
+				})}
+				<tr>
+				  <td>既往史</td>
+				  <td>{data.age}</td>
+				  <td>年龄</td>
+				  <td>{data.ageNum}</td>
+				</tr>
+			  </table>
+			</div>
+			<div className="tableItem">
+			  <p className={styles.title}>查体</p>
+			  <table>
+				<tr>
+				  <th>原词</th>
+				  <th>转化为标准词</th>
+				  <th>值</th>
+				  <th>单位</th>
+				  <th>否定属性</th>
+				</tr>
+			  </table>
+			</div>
+			<div className="tableItem">
+			  <p className={styles.title}>检验</p>
+			  <table>
+				<tr>
+				  <th>是否开单</th>
+				  <th>套餐名</th>
+				  <th>细项名</th>
+				  <th>转化为标准词</th>
+				  <th>值</th>
+				  <th>单位</th>
+				</tr>
+			  </table>
+			</div>
+			<div className="tableItem">
+			  <p className={styles.title}>检查项目</p>
+			  <table>
+				<tr>
+				  <th>是否开单</th>
+				  <th>原词</th>
+				  <th>转化为标准词</th>
+				</tr>
+			  </table>
+			</div>
+			<div className="tableItem">
+			  <p className={styles.title}>检查结果</p>
+			  <table>
+				<tr>
+				  <th>原词</th>
+				  <th>转化为标准词</th>
+				  <th>值</th>
+				  <th>单位</th>
+				</tr>
+			  </table>
+			</div>
+			<div className="tableItem">
+			  <p className={styles.title}>西医诊断</p>
+			  <table>
+				<tr>
+				  <th>原词</th>
+				  <th>转化为标准词</th>
+				</tr>
+			  </table>
+			</div>
+			<div className="tableItem">
+			  <p className={styles.title}>手术操作</p>
+			  <table>
+				<tr>
+				  <th>是否开单</th>
+				  <th>原词</th>
+				  <th>转化为标准词</th>
+				</tr>
+			  </table>
+			</div>
+			<div className="tableItem">
+			  <p className={styles.title}>输血</p>
+			  <table>
+				<tr>
+				  <th>是否开单</th>
+				  <th>原词</th>
+				  <th>转化为标准词</th>
+				</tr>
+			  </table>
+			</div>
+			<div className="tableItem">
+			  <p className={styles.title}>药品</p>
+			  <table>
+				<tr>
+				  <th>是否开单</th>
+				  <th>原词</th>
+				  <th>转化为标准词</th>
+				  <th>剂型</th>
+				</tr>
+			  </table>
+			</div>
+			</div>
+		  </div>
+		</React.Fragment>:null
+		,domNode)
+  }
+}
+
+export default AnalysisResult;

+ 54 - 0
src/components/AnalysisResult/index.less

@@ -0,0 +1,54 @@
+.maskCover{
+  position: fixed;
+  left: 0;
+  top: 0;
+  z-index: 100;
+  width: 100%;
+  height: 100%;
+  background-color: #000;
+  opacity:0.6;
+  filter:alpha(opacity=60);
+  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+}
+.contentBox{
+  width: 600px;
+  height: 500px;
+  position: absolute;
+  top:50%;
+  left:50%;
+  margin-top: -250px;
+  margin-left: -300px;
+  background: #fff;
+  z-index: 101;
+  .content{
+	padding:0 15px;
+	height: 440px;
+	overflow-y: auto;
+  }
+  h2{
+	text-align: center;
+	font-size: 20px;
+	margin: 10px auto;
+  }
+  .close{
+	float: right;
+	margin-top: -34px;
+	margin-right: 10px;
+	cursor: pointer;
+  }
+  .title{
+	/*text-indent: 20px;*/
+	margin: 15px auto 8px;
+  }
+  th{
+	border:1px solid #CCD2D9;
+	background: #CCD2D9;
+	height: 25px;
+	line-height: 25px;
+  }
+  td{
+	border:1px solid #CCD2D9;
+	text-align: center;
+	line-height: 25px;
+  }
+}

+ 32 - 27
src/components/InfoTitle/index.jsx

@@ -1,43 +1,47 @@
 import React, { Component } from "react";
+import axios from '@utils/ajax';
 import PatInfoContainer from '@containers/PatInfoContainer.js';
 import style from "./index.less";
 import { connect } from 'react-redux';
+import AnalysisResult from '@components/AnalysisResult';
 import historyCase from '@common/images/history.png';
-import health from '@common/images/health.png'
+import sysResult from '@common/images/result.png';
 import store from '@store';
+import { getEMRParams } from '@utils/tools';
 import { showHistory } from '@store/actions/historyTemplates';
 import { initItemList, setInitHistory, getHospitalInfo } from '@store/async-actions/historyTemplates';
 import HistoryCases from '@containers/HistoryCases';
-import $ from 'jquery';
 import {Notify,Loading} from '@commonComp';
-// import {MODI_LOADING} from '@store/types/homePage.js';
 import {SHOW_LOADING} from '@store/types/copyRight.js';
 class InfoTitle extends Component {
     constructor(props){
         super(props);
-        this.state={
-            le:''
-        }
+        this.state = {
+		  resShow:false,
+          analysisRes:{},       //解析结果数据
+        };
         this.showHistoryBox = this.showHistoryBox.bind(this)
+        this.showSysBox = this.showSysBox.bind(this);
+    }
+    showSysBox(flg){
+      this.setState({resShow:flg});
+	  const param = getEMRParams();   // 获取推送参数
+	  param.dept = [{name:param.deptName,uniqueName:param.hospitalId==-1?param.deptName:''}]
+	  param.deptName = undefined;
+	  param.ruleType="1,2,3,4";
+	  axios.json('/sys/push/indicationPush',param).then((res)=>{
+		const data =res.data;
+		if(data.code == 0){
+		    this.setState({analysisRes:data.data.debug["数据"]})
+		  //this.structAnalysisData(data.data.debug["数据"])
+		}else{
+		  Notify.error(data.msg);
+		}
+	  })
     }
     showHistoryBox(){
         const {showLoading,hideLoading}=this.props;
         showLoading();
-        // 底部页面禁止滚动
-
-        // store.dispatch(initItemList());
-        // store.dispatch(showHistory(true))
-        // initItemList().then((res)=>{
-        //     const result = res.data;
-        //     if(result.code==0 && result.data){
-        //         hideLoading();
-        //         store.dispatch(setInitHistory(result.data));
-        //         store.dispatch(showHistory(true));
-        //     }else{
-        //         hideLoading();
-        //         Notify.info("暂无历史病历");
-        //     }
-        // })
         initItemList().then(res=>{           
             const result = res.data
             if (result.code === '0' && result.data.records.length !== 0) {
@@ -50,10 +54,9 @@ class InfoTitle extends Component {
                 Notify.info("暂无历史病历");
             }
         })
-        // store.dispatch(getHospitalInfo())
     }
     componentWillReceiveProps(next){
-        const that = this;
+        /*const that = this;
         if(next.winWidth <= 1024){
           $(window).scroll(function(){
             let scrollLeft = document.body.scrollLeft || document.documentElement.scrollLeft;
@@ -62,21 +65,23 @@ class InfoTitle extends Component {
               le:left
             })
           })
-        }
+        }*/
     }
     render() {
         const {loading,loadingText,loadingType} = this.props;
-        const {le} = this.state;
+        const {resShow,analysisRes}=this.state;
         return <div className={style['title-wrapper']}  style={{paddingRight:'198px'}}>
             <PatInfoContainer />
              {
                 <div className={style['activeWrap']}>
-                    <div className={style["operations"]} onClick={this.showHistoryBox}>
-                        <span><img src={historyCase} />&nbsp;历史病历</span>
+                    <div className={style["operations"]}>
+                        <span onClick={this.showHistoryBox}><img src={historyCase} />&nbsp;历史病历</span>
+					    <span onClick={()=>this.showSysBox(true)}><img src={sysResult} />&nbsp;解析结果</span>
                     </div>
                 </div>
              }
             <HistoryCases></HistoryCases>
+            <AnalysisResult show={resShow} data={analysisRes} onClose={this.showSysBox}></AnalysisResult>
             <Loading show={loading} text={loadingText} type={loadingType}/>
         </div>;
     }

+ 1 - 1
src/utils/config.js

@@ -7,7 +7,7 @@ const { func } = require("prop-types");
 
 
 
-const host='http://192.168.2.236:6060';//后端接口访问地址
+const host='http://192.168.2.241:6060';//后端接口访问地址
 // const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';