Переглянути джерело

病历分析触发时机修改(2968,2969,2972,2974,2975)

zhangxc 5 роки тому
батько
коміт
3213fe543d

+ 4 - 2
src/common/components/ItemBox/index.jsx

@@ -39,15 +39,17 @@ class ItemBox extends Component {
     const {handleClick,hideAllDrop,title} = this.props;
     const state = store.getState()
     const moduleName = state.homePage.moduleName
+    const currentIllIsNull = state.currentIll.saveText.length === 0
+    const checkBodyIsNull = state.checkBody.saveText.length.length === 0
     handleClick && handleClick(e);//为了获取鼠标位置,显示搜索结果框;
-    if((title=='化验'|| title=='辅检'|| title=='诊断' || title=='医嘱')&& moduleName != title) {
+    hideAllDrop&&hideAllDrop();
+    if((title=='化验'|| title=='辅检'|| title=='诊断' || title=='医嘱'||title == '现病史' &&  currentIllIsNull || title == '现病史' &&  checkBodyIsNull)&& moduleName != title) {
       store.dispatch({
         type: SET_CURRENT_MODULE,
         moduleName:title
       })
       store.dispatch(getMRAnalyse())
     }
-    hideAllDrop&&hideAllDrop();
   }
   handleInput(e){
     const {handleChange,data} = this.props;

+ 4 - 3
src/components/PushItems/index.jsx

@@ -63,9 +63,7 @@ class PushItems extends Component {
     const checkedAssay = assay.filter(item => item.checked);
     const checkedCheck = check.filter(item => item.checked);
     this.props.billing(checkedAssay, checkedCheck);
-    if(checkedAssay.length > 0 ||checkedCheck.length > 0) {
-      store.dispatch(getMRAnalyse())
-    }
+    
     let obj = {   //添加化验
       details: [],
       name: '',
@@ -106,6 +104,9 @@ class PushItems extends Component {
         checkArr.push(tmpObj)
       }
       store.dispatch(addAssistLabel(checkArr))
+      if(checkedAssay.length > 0 ||checkedCheck.length > 0) {
+        store.dispatch(getMRAnalyse())
+      }
     }
     //滚动到底部
     setTimeout(function(){

+ 3 - 1
src/containers/AssistCheck.js

@@ -6,7 +6,7 @@ import AssistCheck from '@components/AssistCheck';
 import { assistLable,delAssistLabel,changeAssistVal,changeDate,allCheckImports,selectOneChecks,showInIcsss } from '@store/actions/assistCheck';
 import { getSearchList,getInstroduce ,getImportLists,getSonDetailList} from '@store/async-actions/assistCheck';
 import {ISREAD,HIDEDROP} from '@store/types/homePage.js';
-import {billing, getConceptDetail} from '@store/async-actions/pushMessage';
+import {billing, getConceptDetail,getMRAnalyse} from '@store/async-actions/pushMessage';
 import { getCalendarDate} from '@utils/tools';
 
 function mapStateToProps(state) {//console.log(state.typeConfig)
@@ -58,9 +58,11 @@ function mapDispatchToProps(dispatch, store) {
         },
         handleSign(id,idx,type){
             dispatch(assistLable(id,idx,type))
+            dispatch(getMRAnalyse())
         },
         handleDelAssist(idx,name,type){
             dispatch(delAssistLabel(idx,name,type))
+            dispatch(getMRAnalyse())
             dispatch({
               type:ISREAD
             })

+ 2 - 1
src/containers/DiagnosticList.js

@@ -4,7 +4,7 @@ import DiagnosticList from '@components/DiagnosticList';
 import { DEL_DIAGNOSTIC, UP_DIAGNOSTIC, DOWN_DIAGNOSTIC, GET_DIAGNOSTIC_STR, HIDE_REFER_RECORD, SHOW_HISTORY_CASE,HIDE_HISTORY_CASE ,SHOW_LOADING} from '@store/types/diagnosticList'; 
 import { getTreatResult } from '@store/async-actions/treat';
 import { SHOW_TREAT, DEL_REACT, DEL_FOLLOW_UP } from '@store/types/treat.js';
-import {billing, getConceptDetail} from '../store/async-actions/pushMessage';
+import {billing, getConceptDetail,getMRAnalyse} from '../store/async-actions/pushMessage';
 import {keepPushData} from '@store/actions/tabTemplate';
 import { visibleHistory } from '@store/actions/historyTemplates'
 import {autoFillModules} from '@store/async-actions/fetchModules';
@@ -49,6 +49,7 @@ function mapDispatchToProps(dispatch) {
             dispatch({
                 type: GET_DIAGNOSTIC_STR
             });
+            dispatch(getMRAnalyse())
         },
         delReact: (item) => {
             dispatch({

+ 3 - 0
src/containers/Inspect.js

@@ -21,6 +21,7 @@ import {
 import {
   billing,
   getConceptDetail,
+  getMRAnalyse
 } from '@store/async-actions/pushMessage';
 import {HIDEDROP} from '@types/homePage';
 
@@ -55,6 +56,7 @@ function mapDispatchToProps(dispatch, store) {
     handleSign(id, idx, type) {
       dispatch(setLabel(idx, type))
       dispatch(getSublableList(id))
+      dispatch(getMRAnalyse())
     },
     handleLabelSub(e, id, idx) {
       dispatch(fillActived(id, idx))
@@ -76,6 +78,7 @@ function mapDispatchToProps(dispatch, store) {
     },
     delPartItem(idx) {
       dispatch(delPartItem(idx))
+      dispatch(getMRAnalyse())
     },
     setTipValue(idx,value) {
       dispatch(setTip(idx,value))

+ 3 - 2
src/containers/MainSuit.js

@@ -46,8 +46,7 @@ function mapStateToProps(state) {
 }
 
 function mapDispatchToProps(dispatch) {
-  const storeState = store.getState()
-  const {moduleName, moduleObj} = storeState.homePage
+  
     return {
         reTotalHide:()=>{//重置隐藏
           dispatch({
@@ -221,6 +220,8 @@ function mapDispatchToProps(dispatch) {
         dispatch(autoFillModules())
       },
       handleShow(obj) {
+        const storeState = store.getState()
+        const {moduleName, moduleObj} = storeState.homePage
         dispatch({
           type:SETDROPSHOW,
           data:obj

+ 2 - 1
src/store/reducers/homePage.js

@@ -24,9 +24,10 @@ const initState = {
   preData:{},
   item:{},
   admin:false,
-  moduleName:'a',
+  moduleName:'',
   moduleObj: {
     "common": "主诉",
+    "1": "主诉",
     "2": "现病史",
     "3": "其他史",
     "4": "查体"