|
@@ -35,9 +35,11 @@ export const setAdvice=(state,action)=>{
|
|
|
|
|
|
//获取医嘱信息字符串
|
|
|
function getAdviceStr(advice) {
|
|
|
+ const commontreatment = advice.commontreatment
|
|
|
const scheme = advice.scheme || '';
|
|
|
- const assay = advice.assay || '';
|
|
|
- const check = advice.check || '';
|
|
|
+ const adviceInput = advice.adviceInput || '';
|
|
|
+ // const assay = advice.assay || '';
|
|
|
+ // const check = advice.check || '';
|
|
|
let AdviceStr = advice.AdviceStr || '';
|
|
|
for (let i = 0; i < scheme.length; i++) {
|
|
|
for (let j = 0; j < scheme[i].treatment.length; j++) {
|
|
@@ -49,8 +51,11 @@ function getAdviceStr(advice) {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- if(assay || check) {
|
|
|
- AdviceStr = assay + check +'; ' + AdviceStr;
|
|
|
+ if(commontreatment) {
|
|
|
+ AdviceStr = commontreatment +'; ' + AdviceStr;
|
|
|
+ }
|
|
|
+ if(adviceInput) {
|
|
|
+ AdviceStr = AdviceStr +'; ' + adviceInput;
|
|
|
}
|
|
|
return AdviceStr;
|
|
|
}
|
|
@@ -235,11 +240,13 @@ export const hideTipsDetails = (state, action) => {
|
|
|
export const setCommontreatment = (state, action) => {
|
|
|
const res = JSON.parse(JSON.stringify(state));
|
|
|
res.advice.commontreatment = action.commontreatment;
|
|
|
+ res.AdviceStr = getAdviceStr(res.advice)
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
export const setAdviceInput = (state, action) => {
|
|
|
const res = JSON.parse(JSON.stringify(state));
|
|
|
res.advice.adviceInput = action.adviceInput;
|
|
|
+ res.AdviceStr = getAdviceStr(res.advice)
|
|
|
return res;
|
|
|
}
|