浏览代码

merge from 'dev/zxc'

zhangxc 6 年之前
父节点
当前提交
f617e5c267

二进制
src/common/images/Printing.png


二进制
src/common/images/printing.png


+ 1 - 0
src/components/DiagnosticList/index.jsx

@@ -80,6 +80,7 @@ class DiagnosticList extends Component {
         return(
                 <div className={style['diaglist-wrap']}>
                     {list && (list.length > 0) && list.map((item, index) => {
+                        const hasTreat = item.treat && (item.treat.commonTreatment || item.treat.surgeryTreatment || item.treat.treatment.length>0)
                         return (<div draggable={true} className={style['diag-box'] + ' clearfix'}  key={item.id} >
                                     {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img src={diagUp}/></span>}
                                     {list.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img src={diagDown}/></span>}

+ 3 - 1
src/components/PushItems/index.less

@@ -337,4 +337,6 @@
   display: inline-block;
   padding: 0px 10px 0px 0px;
 }
-
+.billing {
+  color: #3B9ED0;
+}

+ 8 - 9
src/containers/DiagnosticItem.js

@@ -4,7 +4,6 @@ import DiagnosticItem from '@components/DiagnosticItem';
 import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR } from '@store/types/diagnosticList'; 
 import {  SHOW_SEARCH,  HIDE_SEARCH, SET_SEARCH_VALUE } from '@store/types/diagnosticSearch';
 import { getSearchResult } from '@store/async-actions/diagnosticSearch';
-import { isAddMainSuit } from '@store/async-actions/diagnosticList';
 import {billing, getTips} from '../store/async-actions/pushMessage';
 
 
@@ -17,14 +16,14 @@ function mapStateToProps(state) {
 function mapDispatchToProps(dispatch) {
     return{
         addDiagnostic: (item) => {
-            dispatch({
-                type: ADD_DIAGNOSTIC,
-                item: item
-            });
-            dispatch({
-                type: GET_DIAGNOSTIC_STR
-            });
-            dispatch(isAddMainSuit())
+            dispatch(addDiagnostic(item))
+            // dispatch({
+            //     type: ADD_DIAGNOSTIC,
+            //     item: item
+            // });
+            // dispatch({
+            //     type: GET_DIAGNOSTIC_STR
+            // });
         },
         showSearch:()=>{
             dispatch({

+ 3 - 0
src/containers/SpreadDrop.js

@@ -154,6 +154,9 @@ function otherHisConfirm(dispatch,store,params){
       dispatch({
         type:ISREAD
       });
+      dispatch({
+        type:ISREAD
+      });
     }
   });
 }

+ 1 - 1
src/store/actions/checkBody.js

@@ -35,7 +35,7 @@ export function setNumberValue(state,action){
 }
 
 //查体单选下拉选中
-export function setRadioValue(state,action){
+export function setRadioValue(state,action){console.log(221)
   let res = Object.assign({},state);
   const {ikey,id,text} = action;
   let labelInx = getLabelIndex(ikey);

+ 68 - 1
src/store/async-actions/treat.js

@@ -1,12 +1,79 @@
 import { json } from "@utils/ajax";
 import { SET_TREAT } from '@store/types/diagnosticList';
+import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR} from '@store/types/diagnosticList'; 
 import { SET_DRUG_INFO, SET_TREATMENT, SET_RECOMMEND_BASIC } from '@store/types/treat';
-import {getEMRParams} from  '@utils/tools';
+import {getEMRParams} from '@store/async-actions/fetchModules';
+import { isAddMainSuit } from '@store/async-actions/diagnosticList';
+
 const api={
     push:'/api/icss/push/pushInner',
     textPush:'/api/icss/push/pushText'
 }
 
+export const addDiagnostic = (item) => {
+        return (dispatch, getState) => {
+            const state = getState();
+            let url = api.push;
+            if(+state.typeConfig.confirmType===1){
+                url=api.textPush;
+            }
+            const emrData = getEMRParams();
+            const diagnosticList = state.diagnosticList.diagnosticList;
+            let diag = '';
+            if(diagnosticList) {
+                for (let i = 0; i < diagnosticList.length; i++ ) {
+                    if(i ===0 ) {
+                        diag = diag + diagnosticList[i].name;
+                    } else {
+                        diag = diag + ',' + diagnosticList[i].name;
+                    }
+                    
+                }
+            }
+            if (item.type === 1) {
+                diag = diag + ',' + item.name
+            } else {
+                diag = diag + ',' + item.name
+            }
+            const params = {
+                "age": emrData.age,
+                "featureType": "8",
+                "diag": diag,
+                "diseaseId":  item.id,
+                "lis": emrData.lis,
+                "other": emrData.other,
+                "pacs": emrData.pacs,
+                "sex": emrData.sex,
+                "symptom": emrData.current + emrData.main,
+                "vital": emrData.vital
+            };
+            
+            json(url, params).then((data) =>{
+                if (data.data.data) {
+                    item.treat = data.data.data.treat
+                    dispatch({
+                        type: ADD_DIAGNOSTIC,
+                        item: item
+                    })
+                } else {
+                    item.treat = null
+                    dispatch({
+                        type: ADD_DIAGNOSTIC,
+                        item: item
+                    })
+                }
+                dispatch({
+                    type: GET_DIAGNOSTIC_STR
+                });
+                dispatch(isAddMainSuit())
+
+            }).catch((e) =>{
+                console.log(e)
+            })
+        }
+
+}
+
 export const getTreatResult = (item) =>{
     return (dispatch, getState) => {
         const state = getState();