|
@@ -9,7 +9,7 @@ import { SAVE_FOLLOW_UP } from "@store/types/pushMessage";
|
|
|
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';
|
|
|
const api={
|
|
|
pushTreatment:'/push/pushTreatment',
|
|
|
getConceptDetail:'/conceptDetail/getConceptDetail'
|
|
@@ -148,17 +148,56 @@ export const getTreatResult = (item) =>{
|
|
|
"hosCode": emrData.hosCode
|
|
|
};
|
|
|
// const params = {
|
|
|
- // "age": 20,
|
|
|
- // "diag": ",糖尿病",
|
|
|
- // "disType": 1,
|
|
|
- // "diseaseId":21773,
|
|
|
- // "featureType": "8",
|
|
|
- // "lis": [
|
|
|
-
|
|
|
- // ],
|
|
|
- // "sex": 3,
|
|
|
- // "symptom": "恶心,呕吐",
|
|
|
- // "vital": ""
|
|
|
+ // "disType":"1",
|
|
|
+ // "age":28,
|
|
|
+ // "diag":"2型糖尿病性肾病,1型糖尿病,糖尿病肾病",
|
|
|
+ // "diseaseName":"2型糖尿病",
|
|
|
+ // "featureType":"8",
|
|
|
+ // "hosCode":"A001",
|
|
|
+ // "lis":[
|
|
|
+ // {
|
|
|
+ // "name":"糖化血红蛋白测定",
|
|
|
+ // "detailName":"糖化血红蛋白(HbA1c)",
|
|
|
+ // "uniqueName":"糖化血红蛋白测定--糖化血红蛋白(HbA1c)",
|
|
|
+ // "source":"0",
|
|
|
+ // "minValue":4,
|
|
|
+ // "otherValue":"",
|
|
|
+ // "maxValue":6,
|
|
|
+ // "units":"%",
|
|
|
+ // "value":"5"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // "name":"空腹葡萄糖测定",
|
|
|
+ // "detailName":"葡萄糖(GLU)",
|
|
|
+ // "uniqueName":"空腹葡萄糖测定--葡萄糖(GLU)",
|
|
|
+ // "source":"0",
|
|
|
+ // "minValue":3.9,
|
|
|
+ // "otherValue":"",
|
|
|
+ // "maxValue":6.1,
|
|
|
+ // "units":"mmol/L",
|
|
|
+ // "value":"5"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // "name":"肝功能测定",
|
|
|
+ // "detailName":"谷丙转氨酶(ALT)",
|
|
|
+ // "uniqueName":"肝功能测定--谷丙转氨酶(ALT)",
|
|
|
+ // "source":"0",
|
|
|
+ // "minValue":5,
|
|
|
+ // "otherValue":"",
|
|
|
+ // "maxValue":40,
|
|
|
+ // "units":"U/L",
|
|
|
+ // "value":"180"
|
|
|
+ // }
|
|
|
+ // ],
|
|
|
+ // "lisOrder":"",
|
|
|
+ // "lisString":"",
|
|
|
+ // "other":"",
|
|
|
+ // "otherOrder":"",
|
|
|
+ // "pacs":"",
|
|
|
+ // "pacsOrder":"",
|
|
|
+ // "sex":1,
|
|
|
+ // "symptom":"患者患有2型糖尿病近来出现泡沫尿",
|
|
|
+ // "vital":"体温40℃"
|
|
|
// }
|
|
|
const isChronic = state.diagnosticList.chronicMagItem ||state.mainSuit.chronicDesease;
|
|
|
// const isChronic = true
|
|
@@ -203,11 +242,11 @@ function getTreatment(item, dispatch, state,url,params, isChronic) {
|
|
|
treat = data.data.data || {}
|
|
|
}
|
|
|
if(treat) {
|
|
|
- let { treatment, commonTreatment, surgeryTreatment, drugHistory, adverseReactions, followUp} = treat
|
|
|
+ let { treatmentPlan, commonTreatment, surgeryTreatment, drugHistory, adverseEvent, followUp} = treat
|
|
|
if(!(commonTreatment || surgeryTreatment ||
|
|
|
- ( treatment &&treatment.length >0 ||
|
|
|
+ ( treatmentPlan &&treatmentPlan.length >0 ||
|
|
|
drugHistory&&drugHistory.length >0 ||
|
|
|
- adverseReactions&&adverseReactions.length >0 ||
|
|
|
+ adverseEvent&&adverseEvent.length >0 ||
|
|
|
!!followUp ||treatment&&treatment.length >0))) {
|
|
|
Notify.info('暂无数据');
|
|
|
return
|
|
@@ -215,23 +254,23 @@ function getTreatment(item, dispatch, state,url,params, isChronic) {
|
|
|
dispatch({type: SHOW_TREAT})
|
|
|
dispatch({
|
|
|
type: SET_TREATMENT,
|
|
|
- treatment: treatment,
|
|
|
+ treatment: treatmentPlan,
|
|
|
generalTreat: commonTreatment,
|
|
|
surgeryTreat: surgeryTreatment,
|
|
|
drugHistory: drugHistory,
|
|
|
})
|
|
|
- if (adverseReactions) { //如何之前存过不良反应,则替换成之前的不良反应
|
|
|
+ if (adverseEvent) { //如何之前存过不良反应,则替换成之前的不良反应
|
|
|
const allAdversReactionList = state.treat.allAdversReactionList
|
|
|
if(allAdversReactionList) {
|
|
|
for(let i = 0; i < allAdversReactionList.length; i++) {
|
|
|
if(item.conceptId == allAdversReactionList[i].conceptId) { //判断是否存过不良反应
|
|
|
- for (let j = 0; j < adverseReactions.length; j++) { //判断不良反应是否有相同的不良反应,如果有,替换
|
|
|
+ for (let j = 0; j < adverseEvent.length; j++) { //判断不良反应是否有相同的不良反应,如果有,替换
|
|
|
for(let z = 0; z < allAdversReactionList[i].adversReactionList.length; z++) {
|
|
|
- if(adverseReactions[j].conceptId == allAdversReactionList[i].adversReactionList[z].conceptId && adverseReactions[j].name == allAdversReactionList[i].adversReactionList[z].name) {
|
|
|
+ if(adverseEvent[j].conceptId == allAdversReactionList[i].adversReactionList[z].conceptId && adverseEvent[j].name == allAdversReactionList[i].adversReactionList[z].name) {
|
|
|
for(let x = 0; x < allAdversReactionList[i].adversReactionList[z].details.length; x++) {
|
|
|
- for(let y = 0; y < adverseReactions[j].details.length; y++) {//判断每一项是否选择过
|
|
|
- if(allAdversReactionList[i].adversReactionList[z].details[x].name == adverseReactions[j].details[y].name && allAdversReactionList[i].adversReactionList[z].details[x].select) {
|
|
|
- adverseReactions[j].details[y].select = allAdversReactionList[i].adversReactionList[z].details[x].select
|
|
|
+ for(let y = 0; y < adverseEvent[j].details.length; y++) {//判断每一项是否选择过
|
|
|
+ if(allAdversReactionList[i].adversReactionList[z].details[x].name == adverseEvent[j].details[y].name && allAdversReactionList[i].adversReactionList[z].details[x].select) {
|
|
|
+ adverseEvent[j].details[y].select = allAdversReactionList[i].adversReactionList[z].details[x].select
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -243,7 +282,7 @@ function getTreatment(item, dispatch, state,url,params, isChronic) {
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
- adverseReactions = []
|
|
|
+ adverseEvent = []
|
|
|
}
|
|
|
if(isChronic) {
|
|
|
let chronicList = JSON.parse(storageLocal.get('chronic'));
|
|
@@ -277,7 +316,7 @@ function getTreatment(item, dispatch, state,url,params, isChronic) {
|
|
|
}
|
|
|
dispatch({
|
|
|
type: SET_ADVERSE_REACTIONS,
|
|
|
- adversReactionList: adverseReactions
|
|
|
+ adversReactionList: adverseEvent
|
|
|
})
|
|
|
} else {
|
|
|
Notify.info('暂无数据');
|