|
@@ -1,8 +1,10 @@
|
|
|
import { json } from "@utils/ajax";
|
|
|
import { SET_TREAT } from '@store/types/diagnosticList';
|
|
|
-import { ADD_DIAGNOSTIC} 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 {storageLocal,getEMRParams} from '@utils/tools';
|
|
|
+import { isAddMainSuit } from '@store/async-actions/diagnosticList';
|
|
|
+
|
|
|
const api={
|
|
|
push:'/api/icss/push/pushInner',
|
|
|
textPush:'/api/icss/push/pushText'
|
|
@@ -25,7 +27,7 @@ export const addDiagnostic = (item) => {
|
|
|
} else {
|
|
|
diag = diag + ',' + diagnosticList[i].name;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
if (item.type === 1) {
|
|
@@ -45,22 +47,25 @@ export const addDiagnostic = (item) => {
|
|
|
"symptom": emrData.current + emrData.main,
|
|
|
"vital": emrData.vital
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
json(url, params).then((data) =>{
|
|
|
- console.log('data', data)
|
|
|
if (data.data.data) {
|
|
|
item.treat = data.data.data.treat
|
|
|
- return dispatch({
|
|
|
+ dispatch({
|
|
|
type: ADD_DIAGNOSTIC,
|
|
|
item: item
|
|
|
})
|
|
|
} else {
|
|
|
item.treat = null
|
|
|
- return dispatch({
|
|
|
+ dispatch({
|
|
|
type: ADD_DIAGNOSTIC,
|
|
|
item: item
|
|
|
})
|
|
|
}
|
|
|
+ dispatch({
|
|
|
+ type: GET_DIAGNOSTIC_STR
|
|
|
+ });
|
|
|
+ dispatch(isAddMainSuit())
|
|
|
|
|
|
}).catch((e) =>{
|
|
|
console.log(e)
|