|
@@ -10,106 +10,13 @@ import {MODI_LOADING} from '@store/types/homePage.js';
|
|
|
import { SHOW_TREAT} from '@store/types/treat.js';
|
|
|
import Notify from '@commonComp/Notify';
|
|
|
import {getChronic} from '@store/async-actions/homePage.js';
|
|
|
+import config from "@config/index";
|
|
|
+
|
|
|
const api={
|
|
|
pushTreatment:'/push/pushTreatment',
|
|
|
getConceptDetail:'/conceptDetail/getConceptDetail'
|
|
|
}
|
|
|
|
|
|
-// export const addDiagnostic = (item) => {
|
|
|
-// return (dispatch, getState) => {
|
|
|
-// const state = getState();
|
|
|
-// let url = api.pushTreatment;
|
|
|
-// 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,
|
|
|
-// "diseaseName": item.name,
|
|
|
-// "lis": emrData.lis,
|
|
|
-// "other": emrData.other,
|
|
|
-// "pacs": emrData.pacs,
|
|
|
-// "sex": emrData.sex,
|
|
|
-// "symptom": emrData.current + emrData.main,
|
|
|
-// "vital": emrData.vital,
|
|
|
-// "patientId": emrData.patientId,
|
|
|
-// "hosCode": emrData.hosCode,
|
|
|
-// "adverseReactions": "string",
|
|
|
-// "scaleName": "string",
|
|
|
-// };
|
|
|
-// //判断是否走慢病系统
|
|
|
-// const isChronic = state.diagnosticList.chronicMagItem ||state.mainSuit.chronicDesease;
|
|
|
-// // const isChronic = true
|
|
|
-// if (isChronic) {
|
|
|
-// let chronicList = JSON.parse(storageLocal.get('chronic'));
|
|
|
-// if(!chronicList){
|
|
|
-// getChronic().then(() =>{
|
|
|
-// chronicList = JSON.parse(storageLocal.get('chronic'));
|
|
|
-// for(let i=0; i<chronicList.length; i++){
|
|
|
-// if(chronicList[i].conceptId==item.conceptId&&chronicList[i].name==item.name){ //判断某个病是否为慢病
|
|
|
-// params.disType = 1
|
|
|
-// }
|
|
|
-// }
|
|
|
-// hasTreatment(dispatch, state,item,url,params)
|
|
|
-
|
|
|
-// });
|
|
|
-// } else {
|
|
|
-// for(let i=0; i<chronicList.length; i++){
|
|
|
-// if(chronicList[i].conceptId==item.conceptId&&chronicList[i].name==item.name){
|
|
|
-// params.disType = 1
|
|
|
-// }
|
|
|
-// }
|
|
|
-// hasTreatment(dispatch, state, item,url,params)
|
|
|
-// }
|
|
|
-// } else {
|
|
|
-// hasTreatment(dispatch, state, item,url,params)
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-// }
|
|
|
-
|
|
|
-// }
|
|
|
-
|
|
|
-// //判断是否存在治疗方案
|
|
|
-// function hasTreatment(dispatch, state,item,url, params) {
|
|
|
-// const itemTreat = JSON.parse(JSON.stringify(item))
|
|
|
-// json(url, params).then((data) =>{
|
|
|
-// if (data.data.data) {
|
|
|
-// itemTreat.treat = data.data.data
|
|
|
-// dispatch({
|
|
|
-// type: ADD_TREAT,
|
|
|
-// item: itemTreat
|
|
|
-// })
|
|
|
-// } else {
|
|
|
-// item.treat = null
|
|
|
-// dispatch({
|
|
|
-// type: ADD_TREAT,
|
|
|
-// item: itemTreat
|
|
|
-// })
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-// }).catch((e) =>{
|
|
|
-// console.log(e)
|
|
|
-// })
|
|
|
-// }
|
|
|
-
|
|
|
export const getTreatResult = (item) =>{
|
|
|
return (dispatch, getState) => {
|
|
|
dispatch({
|
|
@@ -136,6 +43,7 @@ export const getTreatResult = (item) =>{
|
|
|
const params = {
|
|
|
"age": emrData.age,
|
|
|
"featureType": "8",
|
|
|
+ "ruleType":config.ruleTypeMap["8"],
|
|
|
"diag": diag,
|
|
|
"diseaseName": item.name,
|
|
|
"lis": emrData.lis,
|