|
@@ -36,7 +36,6 @@ if(mrId) {
|
|
|
if(data.code == 0) {
|
|
|
msg = Object.assign(data.data, {hosCode:getUrlArgObject('hospitalCode') || '',plan:getUrlArgObject('plan') || '0',})
|
|
|
window.msg = msg
|
|
|
- window.pushMessage = {}
|
|
|
getPageInfo();
|
|
|
}
|
|
|
})
|
|
@@ -55,7 +54,6 @@ if(mrId) {
|
|
|
plan:getUrlArgObject('plan') || '0',
|
|
|
}
|
|
|
window.msg = msg
|
|
|
- window.pushMessage = {}
|
|
|
getPageInfo();
|
|
|
}
|
|
|
|
|
@@ -77,96 +75,33 @@ if(mrId) {
|
|
|
// window.msg = msg
|
|
|
// window.pushMessage = {}
|
|
|
function getConf() {
|
|
|
- return post(config.getSysSetInfoDatas,{hospitalCode: msg.hosCode,plan:msg.plan}).then((res)=>{
|
|
|
- const data = res.data
|
|
|
- if(data.code == 0){
|
|
|
- let confArr = transConf(data.data)
|
|
|
- window.confArr = confArr;
|
|
|
- }
|
|
|
- }).catch(function (err) {
|
|
|
- console.log(err);
|
|
|
- })
|
|
|
+ return post(config.getSysSetInfoDatas,{hospitalCode: msg.hosCode,plan:msg.plan})
|
|
|
}
|
|
|
|
|
|
function getPushInfo() {
|
|
|
- return post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg)).then((res)=>{
|
|
|
- var data = res.data
|
|
|
- if(data.code == 0){
|
|
|
- window.pushInfo = data
|
|
|
- } else {
|
|
|
- window.pushInfo = {}
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- }).catch(function (err) {
|
|
|
- console.log(err);
|
|
|
- })
|
|
|
+ return post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg))
|
|
|
}
|
|
|
|
|
|
function getTreatment() {
|
|
|
- post(config.pushTreatment,Object.assign({featureType: '8'},msg)).then((res)=>{
|
|
|
- var data = res.data
|
|
|
- if(data.code == 0){
|
|
|
- window.treatInfo = data
|
|
|
- } else {
|
|
|
- window.treatInfo = {}
|
|
|
- }
|
|
|
- // if(data.code == 0){
|
|
|
- // var result = data.data;
|
|
|
- // renderTreat(treatImg, 'treatRecommend','治疗方案',result)
|
|
|
- // // var num = 0;
|
|
|
- // // if(result.commonTreatment && result.commonTreatment.content){
|
|
|
- // // ++num
|
|
|
- // // ybzlFun(result.commonTreatment.content)//一般治疗
|
|
|
- // // }
|
|
|
- // // if(result.treatment && result.treatment.length>0){
|
|
|
- // // ++num
|
|
|
- // // cyywFun(result.treatment)//常用药物
|
|
|
- // // }
|
|
|
- // // if(num == 0){
|
|
|
- // // $(".conditionHintZhiliaoNull").css("display","block")
|
|
|
- // // }
|
|
|
- // } else {
|
|
|
- // renderTreat(treatImg,'treatRecommend','治疗方案',{})
|
|
|
- // }
|
|
|
- }).catch(function (err) {
|
|
|
- console.log(err);
|
|
|
- })
|
|
|
+ return post(config.pushTreatment,Object.assign({featureType: '8'},msg))
|
|
|
}
|
|
|
|
|
|
|
|
|
function getTipsInfo() {
|
|
|
- post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1}).then((res)=>{
|
|
|
- var data = res.data
|
|
|
- if(data.code == 0) {
|
|
|
- window.tipsInfo = data
|
|
|
- }else {
|
|
|
- window.tipsInfo = {}
|
|
|
- }
|
|
|
- }).catch(function (err) {
|
|
|
- console.log(err);
|
|
|
- })
|
|
|
+ return post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1})
|
|
|
}
|
|
|
|
|
|
function getPageInfo() {
|
|
|
Promise.all([getConf(),getPushInfo(),getTreatment(),getTipsInfo()]).then(([res1, res2, res3,res4]) =>{
|
|
|
- const {pushInfo, treatInfo, tipsInfo} = window
|
|
|
- if(pushInfo&&pushInfo.code&&pushInfo.code == 0) {
|
|
|
- pushResult = pushInfo.data;
|
|
|
- } else {
|
|
|
- pushResult = {};
|
|
|
- }
|
|
|
- if(treatInfo&&treatInfo.code&&treatInfo.code == 0) {
|
|
|
- treatResult = treatInfo.data
|
|
|
- } else {
|
|
|
- treatResult = {}
|
|
|
- }
|
|
|
- if(tipsInfo&&tipsInfo.code&&tipsInfo.code == 0) {
|
|
|
- tipsResult = tipsInfo.data
|
|
|
- } else {
|
|
|
- tipsResult = {}
|
|
|
- }
|
|
|
+ const configArr = res1&&res1.data&&res1.data.data || []
|
|
|
+ const pushInfo = res2.data || {}
|
|
|
+ const treatInfo = res3.data || {}
|
|
|
+ const tipsInfo = res4.data || {}
|
|
|
+ const confArr = transConf(configArr)
|
|
|
+ pushResult = pushInfo.data || {};
|
|
|
+ treatResult = treatInfo.data || {}
|
|
|
+ tipsResult = tipsInfo.data || {}
|
|
|
+
|
|
|
const diagPossible = pushResult.dis&&pushResult.dis['可能诊断'] || []//可能
|
|
|
const diagDoubt = pushResult.dis&&pushResult.dis['疑似诊断'] || [] // 疑似
|
|
|
const diagDeter = pushResult.dis&&pushResult.dis['确诊'] || []//确诊
|
|
@@ -192,7 +127,6 @@ function getPageInfo() {
|
|
|
window.pushMessage = medicalIndications;//计算的需要的相关数据
|
|
|
let tipsNum = 0;
|
|
|
for(let i = 0; i < confArr.length; i++) {
|
|
|
-
|
|
|
switch(confArr[i].code) {
|
|
|
case "inquiry_show": //问诊症状
|
|
|
renderRecommendInfo(symptomImg, 'symptomRecommend', '问诊症状', symptomRecommend, false)
|
|
@@ -243,7 +177,6 @@ function getPageInfo() {
|
|
|
})
|
|
|
|
|
|
}
|
|
|
- // bindTab();
|
|
|
if(tipsNum === 2) {
|
|
|
bindTab();
|
|
|
}
|
|
@@ -259,14 +192,7 @@ function getPageInfo() {
|
|
|
if(pushHei == 0) {
|
|
|
$('.infomationBox').css({"width":"90%"})
|
|
|
}
|
|
|
- // renderRecommendInfo(warningImg, 'warning', '警惕诊断', diagWaring, true,7,2)
|
|
|
- // renderRecommendInfo(diagImg, 'diagRecommend', '推荐诊断', diagRecommend, true,7,2)
|
|
|
- // renderRecommendInfo(symptomImg, 'symptomRecommend', '问诊症状', symptomRecommend, false)
|
|
|
- // renderRecommendInfo(physiExamImg, 'physiExamRecommend', '体格检查', physiExamRecommend, false)
|
|
|
- // renderMultRecommendInfo('labAndPacsRecommend', '检验检查', labAndPacsRecommend, false)
|
|
|
- // renderTreat(treatImg, 'treatRecommend','治疗方案',treatResult)
|
|
|
-
|
|
|
- // renderRecommendConditTips(conditTipsImg, 'conditTips','病情提示', medicalIndications || [])
|
|
|
+
|
|
|
|
|
|
}).catch(function (err) {
|
|
|
console.log(err);
|