|
@@ -0,0 +1,807 @@
|
|
|
|
+if(!Promise){
|
|
|
|
+ var Promise = require("bluebird");
|
|
|
|
+// Configure
|
|
|
|
+ Promise.config({
|
|
|
|
+ longStackTraces: true,
|
|
|
|
+ warnings: true // note, run node with --trace-warnings to see full stack traces for warnings
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+require('./../css/reset.css');
|
|
|
|
+require('./../css/cdss.less');
|
|
|
|
+require('./../css/popup.css');
|
|
|
|
+require('./../css/followUpV.less');
|
|
|
|
+require('./../css/staticSearch.css')
|
|
|
|
+require('./../js/staticSearch.js')
|
|
|
|
+require('./../images/empty.png').replace(/^undefined/g, '')
|
|
|
|
+require('./../images/empty2.png').replace(/^undefined/g, '')
|
|
|
|
+require('./../images/empty3.png').replace(/^undefined/g, '')
|
|
|
|
+require('./../images/loading.gif').replace(/^undefined/g, '')
|
|
|
|
+require('./../images/right.png').replace(/^undefined/g, '')
|
|
|
|
+require('./../images/new.png').replace(/^undefined/g, '')
|
|
|
|
+require('./../images/t1.png').replace(/^undefined/g, '')
|
|
|
|
+require('./../images/t2.png').replace(/^undefined/g, '')
|
|
|
|
+require('./../images/t3.png').replace(/^undefined/g, '')
|
|
|
|
+require('./../images/go.png').replace(/^undefined/g, '')
|
|
|
|
+require('./../images/g1.png').replace(/^undefined/g, '')
|
|
|
|
+// require('./popupEdit.js');
|
|
|
|
+
|
|
|
|
+let infoImg = require('./../images/icon_info.png').replace(/^undefined/g, '')
|
|
|
|
+let infoImgOn = require('./../images/icon_info_on.png').replace(/^undefined/g, '')
|
|
|
|
+let iconArrowUp = require('./../images/icon_arrow_up.png').replace(/^undefined/g, '')
|
|
|
|
+let iconArrowDown = require('./../images/icon_arrow_down.png').replace(/^undefined/g, '')
|
|
|
|
+let iconMark = require('./../images/icon_mark.png').replace(/^undefined/g, '')
|
|
|
|
+let warnImg = require('./../images/icon_warning.png').replace(/^undefined/g, '')
|
|
|
|
+let warnImgWhite = require('./../images/icon_waring_white.png').replace(/^undefined/g, '')
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+const $ = require("jquery");
|
|
|
|
+const { post,config,getUrlArgObject,openNewWin,titleConfig } = require('./promise.js');
|
|
|
|
+const { renderFollowUp, followEmpty } = require('./followUp.js');
|
|
|
|
+const {getTcmMr} = require('./tcmiss.js');
|
|
|
|
+
|
|
|
|
+const { transConf } = require('./util.js');
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+//静态知识类型: 1:诊断 2.药品 3.化验套餐 4.化验明细 5.辅检 6.手术和操作
|
|
|
|
+
|
|
|
|
+let moduleConfig={
|
|
|
|
+ auxiliary:"recommendWrap",
|
|
|
|
+ qc:"qcWrap",
|
|
|
|
+ medical:"medicalKonwledgeWrap",
|
|
|
|
+ followup: "followUpWrap",
|
|
|
|
+ tcmiss: 'tcmWarp',
|
|
|
|
+}
|
|
|
|
+let allInterface = 0
|
|
|
|
+let hasCompleteTnterface = 0
|
|
|
|
+let moduleNum = 0
|
|
|
|
+let mrId = getUrlArgObject('mrId')
|
|
|
|
+let isTcm = getUrlArgObject('isTcm')
|
|
|
|
+let pushMrId = getUrlArgObject('pushMrId')
|
|
|
|
+const tipsMode = getUrlArgObject('tipsMode') || 1
|
|
|
|
+let planCode = getUrlArgObject('planCode') || 'all'
|
|
|
|
+let hospitalIdUrl = getUrlArgObject('hospitalId') || ''
|
|
|
|
+let msg;
|
|
|
|
+let treatDisName;
|
|
|
|
+
|
|
|
|
+function getMRInfo() {
|
|
|
|
+ return post(config.getMr2,{mrId:mrId})
|
|
|
|
+}
|
|
|
|
+$('.empty').css("display","none")
|
|
|
|
+if(mrId){
|
|
|
|
+ Promise.all([getConf(),getMRInfo()]).then(([res1,res2])=>{
|
|
|
|
+ const data = res1.data.data&&res1.data.data[0]
|
|
|
|
+ msg = res2.data.data ||{}
|
|
|
|
+ if(!(msg&&msg.diseaseName&&msg.diseaseName.name)){
|
|
|
|
+ msg.diseaseName={}
|
|
|
|
+ }
|
|
|
|
+ window.msg = msg;
|
|
|
|
+ renderPage(data)
|
|
|
|
+ })
|
|
|
|
+} else{
|
|
|
|
+ getConf().then(res =>{
|
|
|
|
+ if(res.data.code == '0'){
|
|
|
|
+ // const configArr = res.data.data.pushSetList || []
|
|
|
|
+ // getPageInfo(configArr)
|
|
|
|
+ const data = res.data.data&&res.data.data[0]
|
|
|
|
+ renderPage(data)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ followEmpty()
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+function getConf() {
|
|
|
|
+ var msg = window.msg
|
|
|
|
+ return post(config.getPushSet,{hospitalId:hospitalIdUrl||msg.hospitalId||1,planCode: planCode})
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function getPushInfo() {
|
|
|
|
+ return post(config.pushInner, Object.assign({}, msg, {
|
|
|
|
+ featureType: '1,4,5,6,7,8,9,10,12,13',
|
|
|
|
+ hospitalId: hospitalIdUrl || msg.hospitalId,
|
|
|
|
+ ruleType: config.ruleTypeMap['22']
|
|
|
|
+ }))
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+function getPusgWarning(){
|
|
|
|
+ const indPush = pushMrId ? config.indicationPushCache : config.indicationPush;
|
|
|
|
+ return post(indPush, Object.assign({}, msg, {ruleType: '1,2,3,4', mrId: pushMrId || mrId}))
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function getWriteStandardPush(){
|
|
|
|
+ return post(config.caseWritingPrompt,Object.assign({},msg,{hospitalId:2||msg.hospitalId}))
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function getHosptDeptUsal(){
|
|
|
|
+ var msg = window.msg
|
|
|
|
+ const param ={
|
|
|
|
+ age: msg.age,
|
|
|
|
+ deptName: msg.deptName,
|
|
|
|
+ hospitalCode: msg.hosCode,
|
|
|
|
+ sexType: msg.sex,
|
|
|
|
+ type: 1,
|
|
|
|
+ }
|
|
|
|
+ return post(config.getHosptDeptUsal,param)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+function getPushData(res){
|
|
|
|
+ if(res&&res.data&&res.data.data&&res.data.data.dis&&res.data.data.dis){
|
|
|
|
+ let dis = res.data.data.dis;
|
|
|
|
+ //急诊显示规则,主诊断有急诊优先显示,没有则显示推送的,推送也没有就不显示
|
|
|
|
+ if(dis&&dis['页面急诊']&&(dis['页面急诊'].length>0)){
|
|
|
|
+ let name = dis['页面急诊'][0].name || ''
|
|
|
|
+ $(".allDis .disName").html(name)
|
|
|
|
+ disName = name
|
|
|
|
+ if(name){
|
|
|
|
+ $(".singleDis").css("display","block")
|
|
|
|
+ }
|
|
|
|
+ }else if(dis&&dis['急诊']&&dis['急诊'].length>0){
|
|
|
|
+ let name = dis['急诊'][0].name || ''
|
|
|
|
+ $(".allDis .disName").html(name)
|
|
|
|
+ disName = name
|
|
|
|
+ if(name){
|
|
|
|
+ $(".singleDis").css("display","block")
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+let disName=""
|
|
|
|
+function handleShow(){
|
|
|
|
+ const newinConf = {
|
|
|
|
+ width: '600', //窗口的文档显示区的宽度。以像素计。
|
|
|
|
+ height: '826', //窗口文档显示区的高度。以像素计。
|
|
|
|
+ left: '0', //窗口的 x 坐标。以像素计。
|
|
|
|
+ top: '0', //窗口的 y 坐标。以像素计。
|
|
|
|
+ openMode: "_blank" //每次都是新窗口打开为_blank,打开同一窗口填写任意字符串
|
|
|
|
+ }
|
|
|
|
+ const newWindowLocation = `width=${newinConf.width}, height=${newinConf.height}, left=${newinConf.left}, top=${newinConf.top} scrollbars=yes`
|
|
|
|
+ window.open('./emergency.html?disName='+disName, newinConf.openMode, newWindowLocation)
|
|
|
|
+}
|
|
|
|
+$(document).on('click',".allDis .allName",function(){
|
|
|
|
+ handleShow()
|
|
|
|
+})
|
|
|
|
+$(document).on('click',".singleDis",function(){
|
|
|
|
+ $(this).next().css("display","block")
|
|
|
|
+ $(this).css("display","none")
|
|
|
|
+})
|
|
|
|
+$(document).on('click',".allDis .right,.allDis .secDis",function(){
|
|
|
|
+ $(".allDis").css("display","none")
|
|
|
|
+ $(".singleDis").css("display","block")
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+function moreInfo() {
|
|
|
|
+ $('.infoImg').off("click").click(function(){
|
|
|
|
+ const name = $(this).parent().attr('data-name')
|
|
|
|
+ const type = $(this).parent().attr('data-type')
|
|
|
|
+ openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}`)
|
|
|
|
+ })
|
|
|
|
+ $('.pushItemName').off("click").click(function () {
|
|
|
|
+ console.log(11)
|
|
|
|
+ const name = $(this).parent().attr('data-name')
|
|
|
|
+ const type = $(this).parent().attr('data-type')
|
|
|
|
+ console.log(name)
|
|
|
|
+ openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}&page=1`)
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function getVersion() {
|
|
|
|
+ return post(config.getVersion, 'confArr').then((res) => {
|
|
|
|
+ const data = res.data.data;
|
|
|
|
+ const ver = localStorage.getItem('versionTime');
|
|
|
|
+ const time = data.refreshTime;
|
|
|
|
+ if(!ver||ver===time+"=new"||time!==ver.replace("=new","")){ //判断版本是否更新
|
|
|
|
+ $(".version-tip").addClass('new-icon');
|
|
|
|
+ localStorage.setItem('versionTime',time+"=new"); //保存版本更新时间
|
|
|
|
+ }else{
|
|
|
|
+ $(".version-tip").removeClass("new-icon");
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+function getDisclaimer() {
|
|
|
|
+ return post(config.disclaimer, {}).then((res) => {
|
|
|
|
+ const data = res.data.data.filter(item => item.disclaimerCode == "2");
|
|
|
|
+ $(".responsibility").html((data[0] || {}).description);
|
|
|
|
+ // $(".iframeWrap").css({height: $(window).height()-115-$(".responsibility").height()+"px"})
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function renderPage(pageSet){
|
|
|
|
+ if(!pageSet || !pageSet.sysSetInfo){
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ renderTab(pageSet.sysSetInfo)
|
|
|
|
+ adjustHei()
|
|
|
|
+ const hasAuxiliary = hasTab("辅助信息",pageSet.sysSetInfo)
|
|
|
|
+ const hasMedical = hasTab("医学知识",pageSet.sysSetInfo)
|
|
|
|
+ const hasFollowUp = hasTab("随访计划",pageSet.sysSetInfo)
|
|
|
|
+ const hasTcm = hasTab("中医辅助", pageSet.sysSetInfo);
|
|
|
|
+
|
|
|
|
+ if (hasTcm) {
|
|
|
|
+ getTcmMr(mrId, hasTcm);
|
|
|
|
+ }
|
|
|
|
+ if(!mrId){
|
|
|
|
+ empty()
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(hasAuxiliary){
|
|
|
|
+ renderModuleWrapper(hasAuxiliary.planDetails)
|
|
|
|
+ let needPush = isNeedPush(hasAuxiliary.planDetails)
|
|
|
|
+ let needPushWarning = isNeedPushWarning(hasAuxiliary.planDetails)
|
|
|
|
+ let needWriteStandardPush = isNeedwriteStandardPush(hasAuxiliary.planDetails)
|
|
|
|
+ if(needPush || needPushWarning){
|
|
|
|
+ renderPushData()
|
|
|
|
+ allInterface++
|
|
|
|
+ }
|
|
|
|
+ if(needPushWarning){
|
|
|
|
+ renderPushWarning()
|
|
|
|
+ allInterface++
|
|
|
|
+ }
|
|
|
|
+ if(needWriteStandardPush){
|
|
|
|
+ renderWriteStandard()
|
|
|
|
+ allInterface++
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(hasFollowUp){
|
|
|
|
+ renderFollowUp(msg)
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function renderPushData(){
|
|
|
|
+ return getPushInfo().then(res =>{
|
|
|
|
+ hasCompleteTnterface++
|
|
|
|
+ if(res.data.code == "0"){
|
|
|
|
+ console.log(1)
|
|
|
|
+ const result = res.data.data
|
|
|
|
+ let diagPush = result.dis ||{}
|
|
|
|
+ let lisPush = result.lis || []
|
|
|
|
+ let scalePush = result.scale || []
|
|
|
|
+ let pacsPush = result.pacs || []
|
|
|
|
+ let symptomPush = result.symptom ||[]
|
|
|
|
+ let checkupPush = result.vital ||[]
|
|
|
|
+ let medicinesPush = result.medicines || []
|
|
|
|
+ let operationsPush = result.operations ||[]
|
|
|
|
+ let treatPush = result.treat&&result.treat[0] ||{}
|
|
|
|
+ let nursePush = result.nurse || []
|
|
|
|
+ treatDisName = treatPush&&treatPush["name"]
|
|
|
|
+ let generaTreatPush = treatPush&&treatPush["generaTreat"]
|
|
|
|
+ // let lisPush =[{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
|
|
|
|
+ // let pacsPush = [{name:"胸部x射线",hisNameList:null},{name:"心电图",hisNameList:null}]
|
|
|
|
+ // let checkupPush = [{name:"神志表情",hisNameList:null},{name:"面部表情",hisNameList:null}]
|
|
|
|
+ let lisNum = $(".moduleItem.lis").attr("data-num") || 5
|
|
|
|
+ let scaleNum = $(".moduleItem.evaluation").attr("data-num") || 5
|
|
|
|
+ let pacsNum = $(".moduleItem.pacs").attr("data-num") || 5
|
|
|
|
+ let checkupNum = $(".moduleItem.vital").attr("data-num") || 5
|
|
|
|
+ let symptomNum = $(".moduleItem.symptom").attr("data-num") || 5
|
|
|
|
+ let medicinesNum = $(".moduleItem.medicine").attr("data-num") || 5
|
|
|
|
+ let operationsNum = $(".moduleItem.operation").attr("data-num") || 5
|
|
|
|
+ let nurseNum = $(".moduleItem.nurse").attr("data-num") || 5
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ renderLis(lisPush,lisNum,3,true)
|
|
|
|
+ renderScale(scalePush,scaleNum,8,true)
|
|
|
|
+ renderPacs(pacsPush,pacsNum,5,true)
|
|
|
|
+ renderCheckup(checkupPush,checkupNum,null,true)
|
|
|
|
+ renderSymptomPush(symptomPush,symptomNum,null,true)
|
|
|
|
+ renderDiag(diagPush)
|
|
|
|
+ renderMedicinesPush(medicinesPush,medicinesNum,2,true)
|
|
|
|
+ renderOperationPush(operationsPush,operationsNum,6,true)
|
|
|
|
+ rendergeneraTreatPush(generaTreatPush)
|
|
|
|
+ renderNurse(nursePush, nurseNum, 9, true)
|
|
|
|
+ if(hasCompleteTnterface === allInterface){
|
|
|
|
+ $('.loading').css("display","none")
|
|
|
|
+ if(moduleNum === 0){
|
|
|
|
+ empty()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ bindOpenInfo()
|
|
|
|
+ moreInfo()
|
|
|
|
+ bindSlide()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+function adjustHei(){
|
|
|
|
+ const iframeHei = $(".bodyWrap").height()
|
|
|
|
+ const tabHei = $(".tabList").height()
|
|
|
|
+ $(".contentWrapper").css("height",iframeHei-tabHei-20-30+3+19+'px')
|
|
|
|
+}
|
|
|
|
+function isNeedPush(list){
|
|
|
|
+ let pushCode = ["diag","lis","pacs","symptom","vital","treat","medicines"]
|
|
|
|
+ for(let i = 0; i < list.length; i++){
|
|
|
|
+ if(pushCode.indexOf(list[i].code)>-1){
|
|
|
|
+ if(list[i].status == "1"){
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return false
|
|
|
|
+}
|
|
|
|
+function isNeedwriteStandardPush(list){
|
|
|
|
+ let pushCode = ["casewriting"]
|
|
|
|
+ for(let i = 0; i < list.length; i++){
|
|
|
|
+ if(pushCode.indexOf(list[i].code)>-1){
|
|
|
|
+ if(list[i].status == "1"){
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return false
|
|
|
|
+}
|
|
|
|
+function isNeedPushWarning(list){
|
|
|
|
+ let pushCode = ["crivalue", "rationali", "highrisk", "otherremind"]
|
|
|
|
+ for(let i = 0; i < list.length; i++){
|
|
|
|
+ if(pushCode.indexOf(list[i].code)>-1){
|
|
|
|
+ if(list[i].status == "1"){
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return false
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function renderPushWarning(){
|
|
|
|
+ return getPusgWarning().then(res =>{
|
|
|
|
+ hasCompleteTnterface++
|
|
|
|
+ if(res.data.code == '0'){
|
|
|
|
+ const result = res.data.data
|
|
|
|
+ let billMsgList = result.billMsgList || [] //开单合理性提醒
|
|
|
|
+ let highRiskList = result.highRiskList || [] //高危药品、手术
|
|
|
|
+ let criticalValList = result.criticalValList || [] //危急值提醒
|
|
|
|
+ let noteList = result.noteList || [] //检查内容注意事项
|
|
|
|
+ let dubugStr = result.dubugStr || [] //注意调试信息
|
|
|
|
+ let otherList = result.otherList || [] //其他提醒
|
|
|
|
+ //$('.moduleItem.crivalue').append(titleStr('warning'))
|
|
|
|
+ renderBillingPush(billMsgList,'开单合理性提醒','rationali')
|
|
|
|
+ renderBillingPush(highRiskList,'高风险提示','highrisk')
|
|
|
|
+ renderBillingPush(criticalValList,'危急值提醒','crivalue')
|
|
|
|
+ //renderBillingPush(noteList,'检查内容注意事项')
|
|
|
|
+ renderBillingPush(otherList,'其他提醒','otherremind')
|
|
|
|
+ //moreInfo()
|
|
|
|
+ $(".moduleItem.tips").wrapAll("<div class='tips-cont'></div>");
|
|
|
|
+ $(titleStr('warning')).insertBefore('.tips-cont .moduleItem:first-child')
|
|
|
|
+ // renderBillingPush(dubugStr,'注意调试信息')
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(hasCompleteTnterface === allInterface){
|
|
|
|
+ $('.loading').css("display","none")
|
|
|
|
+ if(moduleNum === 0){
|
|
|
|
+ empty()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+function renderWriteStandard(){
|
|
|
|
+ return getWriteStandardPush().then(res =>{
|
|
|
|
+ hasCompleteTnterface++
|
|
|
|
+ if(res.data.code == '0'){
|
|
|
|
+ const list = res.data.data || {}
|
|
|
|
+ let casewritingNum = $(".moduleItem.casewriting").attr("data-num") || 5
|
|
|
|
+ renderwriteStandardPage(list,casewritingNum)
|
|
|
|
+ }
|
|
|
|
+ if(hasCompleteTnterface === allInterface){
|
|
|
|
+ $('.loading').css("display","none")
|
|
|
|
+ if(moduleNum === 0){
|
|
|
|
+ empty()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+function renderwriteStandardPage(list,casewritingNum){
|
|
|
|
+ let arr = Object.keys(list)
|
|
|
|
+ if(arr.length > 0 && $(".moduleItem.casewriting").length > 0){
|
|
|
|
+ moduleNum++
|
|
|
|
+ $(".moduleItem.casewriting").append(titleStr("casewritingPush"))
|
|
|
|
+ let longStr = ``
|
|
|
|
+ let shortStr = ``
|
|
|
|
+ for(let i = 0; i < arr.length; i++){
|
|
|
|
+ if( i < casewritingNum){
|
|
|
|
+ shortStr += `<div class="billingPushItem"><img class="iconMark" src=${iconMark}>${arr[i]}</div>`
|
|
|
|
+ }
|
|
|
|
+ longStr += `<div class="billingPushItem"><img class="iconMark" src=${iconMark}>${arr[i]}</div>`
|
|
|
|
+ }
|
|
|
|
+ let shortStrBox = `<div class="shortStrBox">${shortStr}</div>`
|
|
|
|
+ let longStrBox = `<div class="longStrBox">${longStr}</div>`
|
|
|
|
+ let allStr = `<div class="casewritingWrapper"></div>`
|
|
|
|
+ $(".moduleItem.casewriting").append(allStr)
|
|
|
|
+ $(".casewritingWrapper").append(shortStrBox)
|
|
|
|
+ if( arr.length>casewritingNum){
|
|
|
|
+ $(".shortStrBox .billingPushItem").eq( $(".shortStrBox .billingPushItem").length -1).append(`<span class="showMoreCaseWriting">更多<img class="iconArrowImg" src="${iconArrowDown}"></span>`)
|
|
|
|
+
|
|
|
|
+ // $(".moduleItem .generalTreatInfo").append(`<span class="showLessGeneralTreat">收起<img class="iconArrowImg" src="${iconArrowUp}"></span>`)
|
|
|
|
+ $(".casewritingWrapper").append(longStrBox)
|
|
|
|
+ $(".longStrBox .billingPushItem").eq( $(".longStrBox .billingPushItem").length -1).append(`<span class="showLessCaseWriting">收起<img class="iconArrowImg" src="${iconArrowUp}"></span>`)
|
|
|
|
+ }
|
|
|
|
+ $('.moduleItem.casewriting').css("display","block")
|
|
|
|
+ bindSlideCaseWriting()
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+function renderBillingPush(list,name,code){
|
|
|
|
+ if(list.length === 0){
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ moduleNum++
|
|
|
|
+ let str = ``
|
|
|
|
+ for(let i = 0; i < list.length; i++){
|
|
|
|
+ str += `<div class="billingPushItem"><img class="iconMark" src=${iconMark}>${list[i].msg}</div>`
|
|
|
|
+ }
|
|
|
|
+ let titleStr = titleStr2(name)
|
|
|
|
+ let boxStr = `<div class="moduleBox">
|
|
|
|
+ ${titleStr}
|
|
|
|
+ ${str}
|
|
|
|
+ </div>`
|
|
|
|
+ $("."+code).append(boxStr)
|
|
|
|
+ $('.moduleItem.'+code).addClass("tips").css("display", "block")
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+function renderDiag(diagPush){
|
|
|
|
+ let possibleDiagPush = diagPush["可能诊断"] || []
|
|
|
|
+ let previousDiagPush = diagPush["既往诊断"] || []
|
|
|
|
+ let firstDiagPush = diagPush["初步诊断"] || []
|
|
|
|
+ let identifyDiagPush = diagPush["鉴别诊断"] || []
|
|
|
|
+ let warningDiagPush = diagPush["警惕"] || []
|
|
|
|
+ let number = $('.moduleItem.diag').attr("data-num") || 5
|
|
|
|
+ let warnNumber = $('.moduleItem.warning').attr("data-num") || 5
|
|
|
|
+
|
|
|
|
+ $('.moduleItem.diag').append(titleStr("diagPush"))
|
|
|
|
+ // let warningDiagPush = [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
|
|
|
|
+ // let firstDiagPush = [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
|
|
|
|
+ // let identifyDiagPush = diagPush["鉴别诊断"] || [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
|
|
|
|
+ renderDiagItem(possibleDiagPush,"可能诊断",number)
|
|
|
|
+ renderDiagItem(previousDiagPush, "既往诊断", number)
|
|
|
|
+ renderDiagItem(firstDiagPush,"初步诊断",number)
|
|
|
|
+ renderDiagItem(identifyDiagPush,"鉴别诊断",number)
|
|
|
|
+ renderWarningDiag(warningDiagPush,"警惕",warnNumber)
|
|
|
|
+ moreInfo()
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function renderDiagItem(list,name,number){
|
|
|
|
+ if(list.length === 0){
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ moduleNum++
|
|
|
|
+ let titleStr = titleStr2(name)
|
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list,number,1,true)
|
|
|
|
+ let boxStr = `<div class="moduleBox">
|
|
|
|
+ ${titleStr}
|
|
|
|
+ ${shortStr}
|
|
|
|
+ ${longStr}
|
|
|
|
+ </div>`
|
|
|
|
+ $(".diag").append(boxStr)
|
|
|
|
+ $('.moduleItem.diag').css("display","block")
|
|
|
|
+}
|
|
|
|
+function renderWarningDiag(list,name,number){
|
|
|
|
+ if(list.length > 0 && $(".moduleItem.warning").length > 0){
|
|
|
|
+ moduleNum++
|
|
|
|
+ $('.moduleItem.warning').append()
|
|
|
|
+ let str = `<span class="warningTitle"><img class="warningTitImg" src=${warnImgWhite}>警惕</span>`
|
|
|
|
+ for(let i = 0; i < list.length; i++){
|
|
|
|
+ str+= renderPushItem(list[i],1)
|
|
|
|
+ }
|
|
|
|
+ $('.moduleItem.warning').append(str)
|
|
|
|
+ $('.moduleItem.warning').css("display","block")
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function renderLis(list,showNum,type,hasInfo){
|
|
|
|
+ if(list.length > 0 && $(".moduleItem.lis").length > 0){
|
|
|
|
+ moduleNum++
|
|
|
|
+ $('.moduleItem.lis').append(titleStr("lisPush"))
|
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
|
|
|
|
+ $('.moduleItem.lis').append(shortStr).append(longStr)
|
|
|
|
+ $('.moduleItem.lis').css("display","block")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+function renderScale(list,showNum,type,hasInfo){
|
|
|
|
+ if(list.length > 0 && $(".moduleItem.evaluation").length > 0){
|
|
|
|
+ moduleNum++
|
|
|
|
+ $('.moduleItem.evaluation').append(titleStr("scalePush"))
|
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
|
|
|
|
+ $('.moduleItem.evaluation').append(shortStr).append(longStr)
|
|
|
|
+ $('.moduleItem.evaluation').css("display","block")
|
|
|
|
+ $('.moduleItem.evaluation').children(".shortBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function renderNurse(list, showNum, type, hasInfo) {
|
|
|
|
+ if (list.length > 0 && $(".moduleItem.nurse").length > 0) {
|
|
|
|
+ moduleNum++
|
|
|
|
+ $('.moduleItem.nurse').append(titleStr("nursePush"))
|
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list, showNum, type, hasInfo)
|
|
|
|
+ $('.moduleItem.nurse').append(shortStr).append(longStr);
|
|
|
|
+ $('.moduleItem.nurse').css("display", "block")
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+function renderPacs(list,showNum,type,hasInfo){
|
|
|
|
+ if(list.length > 0 && $(".moduleItem.pacs").length > 0){
|
|
|
|
+ moduleNum++
|
|
|
|
+ $(".moduleItem.pacs").append(titleStr("pacsPush"))
|
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
|
|
|
|
+ $(".moduleItem.pacs").append(shortStr).append(longStr)
|
|
|
|
+ $('.moduleItem.pacs').css("display","block")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+function renderCheckup(list,showNum,type,hasInfo){
|
|
|
|
+ if(list.length > 0 && $(".moduleItem.vital").length > 0){
|
|
|
|
+ moduleNum++
|
|
|
|
+ $(".moduleItem.vital").append(titleStr("checkupPush"))
|
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
|
|
|
|
+ $(".moduleItem.vital").append(shortStr).append(longStr)
|
|
|
|
+ $('.moduleItem.vital').css("display","block")
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+function renderSymptomPush(list,showNum,type,hasInfo){
|
|
|
|
+ $(".moduleItem.symptom").append(titleStr('symptomPush'))
|
|
|
|
+
|
|
|
|
+ if(list.length > 0 && $(".moduleItem.symptom").length > 0){
|
|
|
|
+ moduleNum++
|
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
|
|
|
|
+ $(".moduleItem.symptom").append(shortStr).append(longStr)
|
|
|
|
+ $(".moduleItem.symptom").css("display","block")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+function rendergeneraTreatPush(list){
|
|
|
|
+ if(list&& $(".moduleItem.general").length > 0){
|
|
|
|
+ $(".moduleItem.general").append(titleStr('generaTreatPush'))
|
|
|
|
+ moduleNum++
|
|
|
|
+ let str = `<div class="generalTreatInfo clearfix isOverFlow">${list}</div>`
|
|
|
|
+ $(".moduleItem.general").append(str)
|
|
|
|
+ $(".moduleItem.general").css("display","block")
|
|
|
|
+ let generaTreatHei = $(".moduleItem .generalTreatInfo")[0].scrollHeight
|
|
|
|
+ if(generaTreatHei > 50){
|
|
|
|
+ $(".moduleItem .generalTreatInfo").append(`<span class="showMoreGeneralTreat">更多<img class="iconArrowImg more" src="${iconArrowDown}"></span>`)
|
|
|
|
+ $(".moduleItem .generalTreatInfo").append(`<span class="showLessGeneralTreat">收起<img class="iconArrowImg" src="${iconArrowUp}"></span>`)
|
|
|
|
+ bindGeneralSlide()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+function renderMedicinesPush(list,showNum,type,hasInfo){
|
|
|
|
+ $(".moduleItem.medicine").append(titleStr('drugPush'))
|
|
|
|
+
|
|
|
|
+ if(list.length > 0 && $(".moduleItem.medicine").length > 0){
|
|
|
|
+ moduleNum++
|
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
|
|
|
|
+ $(".moduleItem.medicine").append(shortStr).append(longStr)
|
|
|
|
+ $(".moduleItem.medicine").css("display","block")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+function renderOperationPush(list,showNum,type,hasInfo){
|
|
|
|
+ $(".moduleItem.operation").append(titleStr('operationPush'))
|
|
|
|
+
|
|
|
|
+ if(list.length > 0 && $(".moduleItem.operation").length > 0){
|
|
|
|
+ moduleNum++
|
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
|
|
|
|
+ $(".moduleItem.operation").append(shortStr).append(longStr)
|
|
|
|
+ $(".moduleItem.operation").css("display","block")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+function renderItemWrapper(list, showNum, type, hasInfo) {
|
|
|
|
+ //console.log(33, type)
|
|
|
|
+ let showNum1 = showNum || 5
|
|
|
|
+ let shortStr = '', longStr = ''
|
|
|
|
+
|
|
|
|
+ for(let i = 0; i < list.length; i++){
|
|
|
|
+ if(i <= showNum1-1){
|
|
|
|
+ shortStr += renderPushItem(list[i],type)
|
|
|
|
+ }
|
|
|
|
+ longStr += renderPushItem(list[i],type)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(showNum1 >= list.length){
|
|
|
|
+ return {
|
|
|
|
+ shortStr:`<div class="shortBox">${shortStr}</div>`,
|
|
|
|
+ longStr:''
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ shortStr += `<span class="showMore">更多 <img class="iconArrowImg" src="${iconArrowDown}"></span>`
|
|
|
|
+ longStr += `<span class="showLess">收起 <img class="iconArrowImg" src="${iconArrowUp}"></span>`
|
|
|
|
+ return {
|
|
|
|
+ shortStr:`<div class="shortBox clearfix">${shortStr}</div>`,
|
|
|
|
+ longStr:`<div class="longBox clearfix">${longStr}</div>`
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function renderPushItem(item,type){
|
|
|
|
+ str= `<span class="pushItemBox" data-name="${item.name}" data-type="${type}"><span class="pushItemName">${type==8?('【'+item.name+'】'):item.name}</span>${item.hasInfo=="1"?`<img class="infoImg" src="${infoImg}">`:""}</span>`
|
|
|
|
+ return str
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function bindOpenInfo(){
|
|
|
|
+ $(".infoImg").on("mouseenter", function(){
|
|
|
|
+ $(this).attr("src", infoImgOn)
|
|
|
|
+ }).on("mouseleave", function(){
|
|
|
|
+ $(this).attr("src", infoImg)
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function bindSlide(){
|
|
|
|
+ $(".showMore").on("click", function(){
|
|
|
|
+ $(this).parent().parent().find(".longBox").css("display","block")
|
|
|
|
+ $(this).parent().parent().find(".shortBox").css("display","none")
|
|
|
|
+ })
|
|
|
|
+ $(".showLess").on("click", function(){
|
|
|
|
+ $(this).parent().parent().find(".longBox").css("display","none")
|
|
|
|
+ $(this).parent().parent().find(".shortBox").css("display","block")
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function renderModuleWrapper(moduleList){
|
|
|
|
+ if(!moduleList){
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ let moduleStr = ''
|
|
|
|
+ for(let i = 0; i < moduleList.length; i++){
|
|
|
|
+ if(moduleList[i].status !='0'){
|
|
|
|
+ if(moduleList[i].code == 'critical'){
|
|
|
|
+ moduleStr += `<div class="moduleItem warning" data-num="${moduleList[i].number}" style="display:none"></div>`
|
|
|
|
+ // moduleStr += `<div class="moduleItem tips" data-num="${moduleList[i].number}" style="display:none"></div>`
|
|
|
|
+ }else{
|
|
|
|
+ moduleStr += `<div class="moduleItem ${moduleList[i].code }" data-num="${moduleList[i].number}" style="display:none"></div>`
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ // console.log(moduleList,moduleStr)
|
|
|
|
+
|
|
|
|
+ $(".recommendWrap").append(moduleStr)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function hasTab(tabName,tabList){
|
|
|
|
+ if(!tabList){
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ for(let i = 0; i < tabList.length; i++){
|
|
|
|
+ if(tabList[i].name == tabName){
|
|
|
|
+ return tabList[i]
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return false
|
|
|
|
+}
|
|
|
|
+function renderTab(tabList){
|
|
|
|
+ let tabStr = ''
|
|
|
|
+ for(let i = 0; i < tabList.length; i++){
|
|
|
|
+ if(tabList[i].status == '1'){
|
|
|
|
+ tabStr += `<span class="tab" data-name="${tabList[i].code}" >${tabList[i].name}<span class="activeLine"></span></span>`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ $(".tabList").append(tabStr)
|
|
|
|
+ let tabNum = 0;
|
|
|
|
+ if(isTcm=='true'){
|
|
|
|
+ tabNum = $(".tabList .tab").length-1;
|
|
|
|
+ }
|
|
|
|
+ $(".tabList .tab").eq(tabNum).addClass("activeTab")
|
|
|
|
+ let showModuleName = $(".tabList .tab").eq(tabNum).attr("data-name")
|
|
|
|
+ getModuleShow(moduleConfig[showModuleName])
|
|
|
|
+ bindTabClick()
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function titleStr(type){
|
|
|
|
+ let titleStr = ''
|
|
|
|
+ titleStr += `<h4 class="moduleTitle" style="background:${titleConfig[type].background}"><img class="titleIcon" src=${titleConfig[type].icon}>${titleConfig[type].name}</h4>`
|
|
|
|
+ return titleStr
|
|
|
|
+}
|
|
|
|
+function titleStr2(name){
|
|
|
|
+ let titleStr = ''
|
|
|
|
+ titleStr += `<p class="moduleBoxTitle">${name}:</p>`
|
|
|
|
+ return titleStr
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function bindTabClick(){
|
|
|
|
+ $(".tabList .tab").on("click", function(){
|
|
|
|
+ $(".activeTab").removeClass("activeTab")
|
|
|
|
+ $(this).addClass("activeTab")
|
|
|
|
+ const moduleName = $(this).attr("data-name")
|
|
|
|
+ getModuleShow(moduleConfig[moduleName])
|
|
|
|
+ if(moduleName == "medical"){
|
|
|
|
+ $(".staticSearchT .ipt").find("input").focus()
|
|
|
|
+ $(".contentWrapper").css("overflowY","hidden")
|
|
|
|
+ }else if(moduleName == 'followup'){
|
|
|
|
+
|
|
|
|
+ // $(".contentWrapper").css("overflowY","auto")
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function getModuleShow(moduleClassName){
|
|
|
|
+ if( $(`.${moduleClassName}`).css("display") =="none"){
|
|
|
|
+ $(".moduleWrapper").css("display","none")
|
|
|
|
+ $(`.${moduleClassName}`).css("display","block")
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+function bindGeneralSlide(){
|
|
|
|
+ $(".showMoreGeneralTreat").on("click",function(){
|
|
|
|
+ $(".generalTreatInfo").toggleClass("isOverFlow")
|
|
|
|
+ $(".showMoreGeneralTreat").toggle()
|
|
|
|
+ })
|
|
|
|
+ $(".showLessGeneralTreat").on("click",function(){
|
|
|
|
+ $(".generalTreatInfo").toggleClass("isOverFlow")
|
|
|
|
+ $(".showMoreGeneralTreat").toggle()
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+ function bindSlideCaseWriting(){
|
|
|
|
+ $(".showMoreCaseWriting").on("click",function(){
|
|
|
|
+ $(this).parents(".casewritingWrapper ").find(".shortStrBox").css("display","none")
|
|
|
|
+ $(this).parents(".casewritingWrapper ").find(".longStrBox").css("display","block")
|
|
|
|
+ })
|
|
|
|
+ $(".showLessCaseWriting").on("click",function(){
|
|
|
|
+ $(this).parents(".casewritingWrapper ").find(".shortStrBox").css("display","block")
|
|
|
|
+ $(this).parents(".casewritingWrapper ").find(".longStrBox").css("display","none")
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+function empty(){
|
|
|
|
+ // $(".responsibility").css("display","none")
|
|
|
|
+ $('.recommendWrap .empty').css("display","block")
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+$(function(){
|
|
|
|
+ getDisclaimer(); //获取免责声明
|
|
|
|
+ getVersion(); //获取版本信息
|
|
|
|
+ $(".disclaimerInfo").on("click", function(){
|
|
|
|
+ openNewWin("disclaimer.html")
|
|
|
|
+ });
|
|
|
|
+ $(".version-tip").on("click", function(){
|
|
|
|
+ const ver = localStorage.getItem('versionTime');
|
|
|
|
+ $(".version-tip").removeClass('new-icon');
|
|
|
|
+ localStorage.setItem('versionTime',ver.replace("=new",""));
|
|
|
|
+ openNewWin("version.html");
|
|
|
|
+ });
|
|
|
|
+ $.fn.extend({
|
|
|
|
+ "preventScroll":function(){
|
|
|
|
+ $(this).each(function(){
|
|
|
|
+ var _this = this;
|
|
|
|
+ if(navigator.userAgent.indexOf('Firefox') >= 0){ //firefox
|
|
|
|
+ _this.addEventListener('DOMMouseScroll',function(e){
|
|
|
|
+ _this.scrollTop += e.detail > 0 ? 60 : -60;
|
|
|
|
+ e.preventDefault();
|
|
|
|
+ },false);
|
|
|
|
+ }else{
|
|
|
|
+ _this.onmousewheel = function(e){
|
|
|
|
+ e = e || window.event;
|
|
|
|
+ _this.scrollTop += e.wheelDelta > 0 ? -60 : 60;
|
|
|
|
+ return false;
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ // $(".iframeWrap").preventScroll();
|
|
|
|
+ $(".iframeWrap").preventScroll();
|
|
|
|
+ $(".recommendWrap").preventScroll();
|
|
|
|
+ $(".tcmWarp").preventScroll();
|
|
|
|
+ $(".infoWrap").preventScroll();
|
|
|
|
+ $(".medicalKonwledgeWrap .staticSearchB ul").preventScroll();
|
|
|
|
+ $(window).on("resize", function(){
|
|
|
|
+ $(".iframeWrap").preventScroll();
|
|
|
|
+ $(".recommendWrap").preventScroll();
|
|
|
|
+ $(".tcmWarp").preventScroll();
|
|
|
|
+
|
|
|
|
+ $(".medicalKonwledgeWrap .staticSearchB ul").preventScroll();
|
|
|
|
+ adjustHei()
|
|
|
|
+ })
|
|
|
|
+});
|