|
@@ -48,7 +48,6 @@ function getAdviceStr(advice) {
|
|
|
} else {
|
|
|
AdviceStr = AdviceStr.substring(1, AdviceStr.length) + ', ' + scheme[i].treatment[j].treatmentStr
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
if(commontreatment) {
|
|
@@ -71,13 +70,16 @@ export const addScheme = (state, action) => {
|
|
|
let RepeatIndex;
|
|
|
|
|
|
for (let i = 0; i < treatment.length; i++) {
|
|
|
- let treatmentStr = '';
|
|
|
+ let treatmentStr = '';
|
|
|
+ let drugList = []
|
|
|
for (let j = 0; j < treatment[i].medicitionsList.length; j++) {
|
|
|
if(treatment[i].medicitionsList[j].selected) {
|
|
|
treatmentStr = treatmentStr + treatment[i].medicitionsList[j].medicitionName + ', '
|
|
|
+ drugList.push({questionId: treatment[i].medicitionsList[j].id, tagName: treatment[i].medicitionsList[j].medicitionName })
|
|
|
}
|
|
|
}
|
|
|
treatment[i].treatmentStr = treatmentStr.substring(0,treatmentStr.length-2)
|
|
|
+ treatment[i].drugList = drugList
|
|
|
}
|
|
|
treatItem.treatment = treatment;
|
|
|
for (let i = 0; i < scheme.length; i++) {
|
|
@@ -85,7 +87,6 @@ export const addScheme = (state, action) => {
|
|
|
isRepeat = true
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
//判断医嘱中是否包含该诊断
|
|
|
scheme.map((item, index) => {
|
|
|
if(item.name === treatItem.name) {
|
|
@@ -105,6 +106,8 @@ export const addScheme = (state, action) => {
|
|
|
} else {
|
|
|
scheme[RepeatIndex].treatment[i].treatmentStr = scheme[RepeatIndex].treatment[i].treatmentStr + '' + treatment[j].medicitionsList[z].medicitionName
|
|
|
}
|
|
|
+ scheme[RepeatIndex].treatment[i].drugList.push({questionId: treatment[j].medicitionsList[z].id, tagName: treatment[j].medicitionsList[z].medicitionName })
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -130,10 +133,24 @@ export const addScheme = (state, action) => {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- res.AdviceStr = getAdviceStr(res.advice)
|
|
|
+ res.AdviceStr = getAdviceStr(res.advice)
|
|
|
+ res.drugList = getDrugList(res.advice.scheme)
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+//获取开单到医嘱的药品列表
|
|
|
+function getDrugList(scheme) {
|
|
|
+ const drugList = [];
|
|
|
+ for(let i = 0 ; i < scheme.length; i++) {
|
|
|
+ for(let j = 0; j <scheme[i].treatment.length; j++ ) {
|
|
|
+ for (let z = 0; z < scheme[i].treatment[j].drugList.length; z++) {
|
|
|
+ drugList.push(scheme[i].treatment[j].drugList[z]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return drugList
|
|
|
+}
|
|
|
+
|
|
|
//设置提示信息
|
|
|
export const setTips = (state, action) => {
|
|
|
const res = Object.assign({}, state)
|
|
@@ -222,7 +239,8 @@ export const clearAllPushMessage = (state, action) => {
|
|
|
res.determine = [];
|
|
|
res.assay = [];
|
|
|
res.check = [];
|
|
|
- res.chronicPushItems = [];//量表
|
|
|
+ res.chronicPushItems = [];//量表
|
|
|
+ res.drugList = []; //开单药品列表
|
|
|
return res;
|
|
|
}
|
|
|
|