|
@@ -1,7 +1,7 @@
|
|
import { json } from "@utils/ajax";
|
|
import { json } from "@utils/ajax";
|
|
import { SET_TREAT } from '@store/types/diagnosticList';
|
|
import { SET_TREAT } from '@store/types/diagnosticList';
|
|
import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR} 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 { SET_DRUG_INFO, SET_TREATMENT, SET_TREAT_INFO, SET_RECOMMEND_BASIC } from '@store/types/treat';
|
|
import {storageLocal,getEMRParams} from '@utils/tools';
|
|
import {storageLocal,getEMRParams} from '@utils/tools';
|
|
import { isAddMainSuit } from '@store/async-actions/diagnosticList';
|
|
import { isAddMainSuit } from '@store/async-actions/diagnosticList';
|
|
|
|
|
|
@@ -76,6 +76,10 @@ export const addDiagnostic = (item) => {
|
|
|
|
|
|
export const getTreatResult = (item) =>{
|
|
export const getTreatResult = (item) =>{
|
|
return (dispatch, getState) => {
|
|
return (dispatch, getState) => {
|
|
|
|
+ dispatch({
|
|
|
|
+ type: SET_TREAT_INFO,
|
|
|
|
+ treatItem: item
|
|
|
|
+ })
|
|
const state = getState();
|
|
const state = getState();
|
|
let url = api.push;
|
|
let url = api.push;
|
|
if(+state.typeConfig.confirmType===1){
|
|
if(+state.typeConfig.confirmType===1){
|
|
@@ -126,7 +130,7 @@ export const getTreatResult = (item) =>{
|
|
treat = data.data.data.treat || {}
|
|
treat = data.data.data.treat || {}
|
|
}
|
|
}
|
|
if(treat) {
|
|
if(treat) {
|
|
- return dispatch({
|
|
|
|
|
|
+ dispatch({
|
|
type: SET_TREATMENT,
|
|
type: SET_TREATMENT,
|
|
treatment: treat.treatment,
|
|
treatment: treat.treatment,
|
|
generalTreat: treat.commonTreatment,
|
|
generalTreat: treat.commonTreatment,
|
|
@@ -134,7 +138,6 @@ export const getTreatResult = (item) =>{
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
- return
|
|
|
|
}).catch((e) =>{
|
|
}).catch((e) =>{
|
|
console.log(e)
|
|
console.log(e)
|
|
})
|
|
})
|