12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499 |
- 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
- })
- }
- const $ = require("jquery");
- require('./util.js');
- require('./../css/reset.css');
- require('./../css/cdssHorizontal.less');
- require('./../css/popup.css');
- require('../css/staticSearch.less')
- require('./../js/staticSearch.js');//静态知识搜索
- require('./../images/empty2.png').replace(/^undefined/g, '')
- require('./../images/dn.png').replace(/^undefined/g, '')
- require('./../images/loading.gif').replace(/^undefined/g, '')
- let emptyImg = require('./../images/empty3.png').replace(/^undefined/g, '')
- require('./../images/new2.png').replace(/^undefined/g, '')
- require('./../images/dots.png').replace(/^undefined/g, '')
- require('./../images/dot.png').replace(/^undefined/g, '')
- const { post, config, getUrlArgObject, openNewWin, titleConfigH, throttle, } = require('./promise.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 showImg = require('./../images/show2.png').replace(/^undefined/g, '')
- let collapseImg = require('./../images/collapse2.png').replace(/^undefined/g, '')
- let go = require('./../images/g1.png').replace(/^undefined/g, '')
- let treatDisName, treatUniqueName
- let maydiagnoseList = [], hasdiagnoseList = []
- let maydiagnoseType = false, hasdiagnoseType = false, rightList = [];
- let generalTreatInfo
- const { renderFollowUp } = require('./followUp.js');
- const { getTcmMr } = require('./tcmiss.js');
- 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 pushMrId = getUrlArgObject('pushMrId')
- const tipsMode = getUrlArgObject('tipsMode') || 1
- let planCode = getUrlArgObject('planCode') || 'all'
- let hospitalIdUrl = getUrlArgObject('hospitalId') || ''
- let msg;
- let tipsMsg;
- let caseWriteStandradList;
- function getMRInfo() {
- return post(config.getMr2, { mrId: mrId })
- }
- 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 pushByDisease(name, i) {
- return post(config.pushByDisease, Object.assign({}, msg, {
- featureType: '1,4,5,6,7,8,9,10,12,13',
- hospitalId: hospitalIdUrl || msg.hospitalId,
- ruleType: config.ruleTypeMap['22'],
- diseaseName: {
- name: name,
- uniqueName: name
- }
- }))
- }
- 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 }))
- }
- 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 = null
- }
- 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)
- }
- })
- }
- function renderPage(pageSet) {
- if (!pageSet || !pageSet.sysSetInfo) {
- return
- }
- renderTab(pageSet.sysSetInfo)
- const iframeHei = $(".bodyWrap").height()
- const tabHei = $(".tabList").height()
- $(".contentWrapper").css("height", iframeHei - tabHei - 10 - 20 - 30 + 'px')
- const hasAuxiliary = hasTab("辅助信息", pageSet.sysSetInfo)
- const hasMedical = hasTab("医学知识", pageSet.sysSetInfo)
- const hasFollowUp = hasTab("随访计划", pageSet.sysSetInfo)
- const hasTcm = hasTab("中医辅助", pageSet.sysSetInfo)
- //所有模块都未开启配置,显示功能未开启(无tab)
- if (hasAuxiliary.status === 0 && hasMedical.status === 0 && hasFollowUp.status === 0 && hasTcm.status === 0) {
- const nullTxt = `<div class="empty-box" style="left: -20px;display: block;">
- <img class="emptyImg" src="../images/icon_admin.png" alt="空">
- <p class="emptyTxt">功能未开启</p>
- </div>`
- $(".recommendWrap").html(nullTxt).show();
- return;
- }
- if (hasTcm) {
- getTcmMr(mrId, hasTcm);
- }
- if (hasFollowUp) {
- renderFollowUp(msg, 1)
- }
- const planDetail = hasAuxiliary.planDetails;
- const configs = planDetail.filter((it) => it.status !== 0) || [];
- if (!configs[0]) { //没有开启辅助信息各项配置
- $('.empty-box,.leftWrapper').hide();
- $('.recommendWrap .empty-right').show();
- return;
- }
- //有数据再设置宽度
- //setWidth()
- 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) {
- renderCaseWrite()
- allInterface++
- }
- }
- }
- function renderTab(tabList) {
- if (!tabList) {
- return
- }
- let tabStr = ''
- let TabNum = 0
- for (let i = 0; i < tabList.length; i++) {
- if (tabList[i].status == '1') {
- TabNum++
- tabStr += `<div class="tab" data-name="${tabList[i].code}" ><span class="tabName">${tabList[i].name}</span></div>`
- }
- if (tabList[i].code == 'maydiagnose') {
- maydiagnoseList = moduleList[i].planDetails
- } else if (tabList[i].code == 'hasdiagnose') {
- hasdiagnoseList = tabList[i].planDetails
- }
- }
- $(".tabList").append(tabStr)
- $(".tabList .tab").eq(0).addClass("activeTab")
- $(".tabList .tab").eq(0).addClass("activeTab")
- // $(".tabList .tab").css("height", 1 / TabNum * 100 + '%')
- let showModuleName = $(".tabList .tab").eq(0).attr("data-name")
- getModuleShow(moduleConfig[showModuleName])
- bindTabClick()
- //setTabNameTop()
- }
- function hasTab(tabName, tabList) {
- for (let i = 0; i < tabList.length; i++) {
- if (tabList[i].name == tabName) {
- return tabList[i]
- }
- }
- return false
- }
- function renderModuleWrapper(moduleList) {
- if (!moduleList) {
- return
- }
- console.log(445, 663);
- let moduleStr = '', treatStr = ""
- for (let i = 0; i < moduleList.length; i++) {
- if (moduleList[i].code == 'general' || moduleList[i].code == 'medicine' || moduleList[i].code == 'operation') {
- rightList.push(moduleList[i].status)
- }
- if (moduleList[i].status != '0') {
- if (moduleList[i].code == 'general' || moduleList[i].code == 'medicine' || moduleList[i].code == 'operation') {
- treatStr += `<div class="moduleItem ${moduleList[i].code}" data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
- rightList.push(moduleList[i].status)
- } else if (moduleList[i].code == 'nurse') {
- moduleStr += `<div class="moduleItem ${moduleList[i].code}" data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
- } else if (moduleList[i].code == 'critical') {
- moduleStr += `<div class="moduleItem warning" data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
- // moduleStr += `<div class="moduleItem tips" data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
- } else if (moduleList[i].code == 'maydiagnose') {
- maydiagnoseList = moduleList[i].planDetails
- moduleStr += `<div class="moduleItem ${moduleList[i].code}" data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
- let arr = []
- for (let j = 0; j < moduleList[i].planDetails.length; j++) {
- let item = moduleList[i].planDetails[j]
- arr.push(item.status)
- }
- if (arr.indexOf(1) == -1) {
- maydiagnoseType = true
- }
- } else if (moduleList[i].code == 'hasdiagnose') {
- hasdiagnoseList = moduleList[i].planDetails
- moduleStr += `<div class="moduleItem ${moduleList[i].code}" data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
- let arr = []
- for (let j = 0; j < moduleList[i].planDetails.length; j++) {
- let item = moduleList[i].planDetails[j]
- arr.push(item.status)
- }
- if (arr.indexOf(1) == -1) {
- hasdiagnoseType = true
- }
- } else {
- moduleStr += `<div class="moduleItem ${moduleList[i].code}" data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
- }
- }
- }
- $(".recommendWrap .leftBox").append(moduleStr)
- $(".recommendWrap .rightBox").append(treatStr)
- /*if($(".moduleItem:visible").length===0){
- $(".empty-null").show();
- }*/
- }
- function isNeedPush(list) {
- let pushCode = ['critical', "diag", "lis", "pacs", "symptom", "vital", "treat", "medicines", 'evaluation', 'general', 'medicine', 'operation', 'nurse', 'maydiagnose', 'hasdiagnose']
- 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", "nurse"]
- for (let i = 0; i < list.length; i++) {
- if (pushCode.indexOf(list[i].code.trim()) > -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 bindTabClick() {
- $(".tabList .tab").on("click", function () {
- $(".activeTab").removeClass("activeTab")
- $(this).addClass("activeTab")
- const moduleName = $(this).attr("data-name")
- getModuleShow(moduleConfig[moduleName])
- })
- }
- function getModuleShow(moduleClassName) {
- if ($(`.${moduleClassName}`).css("display") == "none") {
- $(".moduleWrapper").css("display", "none")
- $(`.${moduleClassName}`).css("display", "block")
- //empty();
- }
- }
- function setTabNameTop() {
- const tabNameList = $(".tabList .tab .tabName")
- for (let i = 0; i < tabNameList.length; i++) {
- let tabNameHei = $(".tabList .tab .tabName").eq(i).height()
- // $(".tabList .tab .tabName").eq(i).css("marginTop", -tabNameHei / 2 + "px")
- }
- }
- function renderCaseWrite() {
- getWriteStandardPush().then(res => {
- hasCompleteTnterface++
- if (res.data.code == '0') {
- const caseWriteList = res.data.data || {}
- let caseWritePush = Object.keys(caseWriteList) || []
- renderwriteStandardPage(caseWritePush)
- if ($(".moduleItem.casewriting")) {
- let casewritingHei = $(".moduleItem.casewriting")[0].scrollHeight
- if (casewritingHei > 63) {
- $(".casewriting").append(`<span class="showMoreCaseWrite">更多</span>`)
- caseWriteStandradList = caseWritePush
- showMoreCaseWrite()
- }
- }
- }
- }).catch(() => {
- $(".loading").hide()
- })
- }
- function renderPushData() {
- $(".loading").show()
- return getPushInfo().then(res => {
- hasCompleteTnterface++
- if (res.data.code == "0") {
- 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 nursePush = result.nurse || []
- let treatPush = result.treat && result.treat[0] || {}
- treatDisName = treatPush && treatPush["name"]
- treatUniqueName = treatPush && treatPush["uniqueName"]
- let generaTreatPush = treatPush && treatPush["generaTreat"]
- generalTreatInfo = generaTreatPush
- // 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
- let diagList = result.clickPosDis || [] //可能诊断
- let AffList = result.clickAffDis || [] //已诊断疾病
- renderLis(lisPush, lisNum)
- renderScale(scalePush, scaleNum)
- renderPacs(pacsPush, pacsNum)
- renderCheckup(checkupPush, checkupNum)
- renderSymptomPush(symptomPush, symptomNum)
- renderDiag(diagPush)
- renderDiagList(diagList)
- renderAffListList(AffList)
- let onShow = false
- if (rightList.indexOf(1) >= 0) {
- onShow = true
- }
- if ((medicinesPush.length > 0 || operationsPush.length > 0 || generaTreatPush) && onShow) {
- let str = `<img class="treatIcon" src = ${titleConfigH["treat"].icon} /><span>${titleConfigH["treat"].name}</span>`
- $(".rightBoxTitle").append(str)
- // renderDisName()
- $(".empty-box").hide();
- $(".rightWrapper").css("display", "block")
- if ($(".leftBox .moduleItem:visible").length === 0) { //左侧没有数据,右侧有数据时,右侧往左移
- $(".leftWrapper").css({ "width": '0', 'padding': '0' });
- $(".rightWrapper").css("width", '100%');
- }
- } else if ($(".leftWrapper .moduleItem:visible").length !== 0) {
- $(".empty-box").hide();
- $(".leftWrapper").css({
- borderRight: "0px",
- width: "100%"
- })
- }
- if ($(".moduleItem.general,.moduleItem.medicine,.moduleItem.operation,.moduleItem.nurse").length === 0 && $(".leftWrapper .moduleItem:visible").length !== 0) {
- $(".rightWrapper").css("display", "none")
- $(".empty-box").hide();
- $(".leftWrapper").css({
- borderRight: "0px",
- width: "100%"
- })
- }
- rendergeneraTreatPush(generaTreatPush)
- renderMedicinesPush(medicinesPush, medicinesNum)
- renderOperationPush(operationsPush, operationsNum)
- // renderNurse(nursePush, nurseNum)
- bindOpenInfo()
- bindSlide()
- moreInfo()
- empty()
- }
- }).catch(() => {
- $(".loading").hide()
- })
- }
- function renderpushByMayDisease(name, i, inx,e) {
- return pushByDisease(name, i).then(res => {
- // $(".loading").hide();
- hasCompleteTnterface++
- if (res.data.code == "0") {
- const result = res.data.data
- let symptomPush = result.symptom || []
- let vitalPush = result.vital || []
- let lisPush = result.lis || []
- let pacsPush = result.pacs || []
- let scalePush = result.scale || []
- let disPush = result.dis['鉴别诊断'] || []
- let treatPush = result.treat || []
- let medicinesPush = result.medicines || []
- let operationsPush = result.operations || []
- let nursePush = result.nurse || []
- let isShow = false
- for (let i = 0; i < treatPush.length; i++) {
- const it = treatPush[i];
- if (it.generaTreat) {
- isShow = true
- }
- }
- if (symptomPush.length == 0 && vitalPush.length == 0 && lisPush.length == 0 && pacsPush.length == 0 && scalePush.length == 0 && disPush.length == 0 && medicinesPush.length == 0 && operationsPush.length == 0 && nursePush.length == 0 && !isShow) {
- $.toast('toast3', '', 3000, '.maydiagnose', i);
- $(".maydiagnose .item").css("display", "none")
- $(e.target).parents('.pushItemBox').addClass('disable');
- $(e.target).parents('.pushItemBox').removeClass('active');
- } else if (maydiagnoseType) {
- $.toast('toast3', '', 3000, '.maydiagnose', i);
- $(".maydiagnose .item").css("display", "none")
- } else {
- renderMaySymptomPush(symptomPush, inx)
- renderMayVitalPush(vitalPush, inx)
- renderMayLisPush(lisPush, inx)
- renderMayPacsPush(pacsPush, inx)
- renderMayScalePush(scalePush, inx)
- renderMayDisPush(disPush, inx)
- renderMayPush(treatPush, medicinesPush, operationsPush, nursePush, inx)
- bindOpenInfo()
- moreInfo()
- bindSlide();
- if ($(".maydiagnose .item").children('div').length == 0) {
- $.toast('toast3', '', 3000, '.maydiagnose', i);
- $(".maydiagnose .item").css("display", "none")
- $(".maydiagnose .item").css("display", "none")
- }
- }
- }
- empty(); //判断是否显示空状态
- })
- }
- function renderpushByHasDisease(name, i, inx,e) {
- return pushByDisease(name, i).then(res => {
- // $(".loading").hide();
- hasCompleteTnterface++
- if (res.data.code == "0") {
- const result = res.data.data
- let symptomPush = result.symptom || []
- let vitalPush = result.vital || []
- let lisPush = result.lis || []
- let pacsPush = result.pacs || []
- let scalePush = result.scale || []
- let disPush = result.dis['鉴别诊断'] || []
- let treatPush = result.treat || []
- let medicinesPush = result.medicines || []
- let operationsPush = result.operations || []
- let nursePush = result.nurse || []
- let isShow = false
- for (let i = 0; i < treatPush.length; i++) {
- const it = treatPush[i];
- if (it.generaTreat) {
- isShow = true
- }
- }
- if (symptomPush.length == 0 && vitalPush.length == 0 && lisPush.length == 0 && pacsPush.length == 0 && scalePush.length == 0 && disPush.length == 0 && medicinesPush.length == 0 && operationsPush.length == 0 && nursePush.length == 0 && !isShow) {
- $.toast('toast3', '', 3000, '.hasdiagnose', i);
- $(".hasdiagnose .item").css("display", "none")
- $(e.target).parents('.pushItemBox').addClass('disable');
- $(e.target).parents('.pushItemBox').removeClass('active');
- } else if (hasdiagnoseType) {
- $.toast('toast4', '', 3000, '.hasdiagnose', i);
- $(".hasdiagnose .item").css("display", "none")
- } else {
- renderHasSymptomPush(symptomPush, inx)
- renderHasVitalPush(vitalPush, inx)
- renderHasLisPush(lisPush, inx)
- renderHasPacsPush(pacsPush, inx)
- renderHasScalePush(scalePush, inx)
- renderHasDisPush(disPush, inx)
- renderHasPush(treatPush, medicinesPush, operationsPush, nursePush, inx)
- bindOpenInfo()
- moreInfo()
- bindSlide();
- if ($(".hasdiagnose .item").children('div').length == 0) {
- $.toast('toast3', '', 3000, '.hasdiagnose', i);
- $(".hasdiagnose .item").css("display", "none")
- $(".hasdiagnose .item").css("display", "none")
- }
- }
- }
- empty(); //判断是否显示空状态
- })
- }
- function empty() { //显示空状态
- setTimeout(function () {
- if ((!$(".rightWrapper .rightBoxTitle").html()) && $(".leftWrapper .moduleItem:visible").length !== 0) {
- $(".leftWrapper").css({
- borderRight: "0px",
- width: "100%"
- })
- }
- if ($(".tabList .tab:first-child").is(".activeTab") && $(".empty-right:visible").length === 0 && $(".moduleItem:visible").length === 0) {
- $(".empty-box,.leftWrapper").hide();
- $(".empty-null").show();
- }
- }, 500);
- }
- function renderDiagList(list) {
- if (list.length === 0) {
- return
- }
- $('.moduleItem.maydiagnose .moduleItemTitBox').append(titleStr("maydiagnosePush"))
- let str = ``
- let { shortStr, longStr } = renderItemWrapper(list, 99, '', 1)
- let boxStr = `<div class="moduleBox">
- ${str}
- ${shortStr}
- </div>`
- $(".moduleItem.maydiagnose").append(boxStr)
- $(".moduleItem.maydiagnose").append("<div class='item' data-index='1'></div>")
- $(".moduleItem.maydiagnose.moduleItemTitBox").append(renderLongStr(name, longStr, "left"))
- $('.moduleItem.maydiagnose').css("display", "block")
- $('.maydiagnose .pushItemBox').on("click", function (e) {
- e.preventDefault()
- const name = $(this).attr('data-name');
- const i = $(this).attr('data-index');
- if ($(this).hasClass('disable')) {
- $.toast('toast3', '', 3000, '.maydiagnose', i);
- $(".maydiagnose .item").css("display", "none")
- $(this).siblings().removeClass('active');
- return
- }
- if ($(this).hasClass('active')) {
- $(this).removeClass('active');
- } else {
- $(this).addClass('active').siblings().removeClass('active');
- }
- const index = $(this).parent().parent().next().attr('data-i')
- const showList = $(".maydiagnose .item").css("display")
- if (showList == "none" || index != i) {
- // $(".loading").show();
- $(".maydiagnose .item").html('')
- $(".maydiagnose .item").css("display", "none")
- $(this).parent().parent().next().css("display", "block")
- $(this).parent().parent().next().attr('data-i', i)
- renderpushByMayDisease(name, i, 1,e)
- } else {
- $(".maydiagnose .item").css("display", "none")
- }
- });
- }
- function renderAffListList(list) {
- if (list.length === 0) {
- return
- }
- $('.moduleItem.hasdiagnose .moduleItemTitBox').append(titleStr("hasdiagnosePush"))
- let str = ``
- let { shortStr, longStr } = renderItemWrapper(list, 99, '', 1)
- let boxStr = `<div class="moduleBox">
- ${str}
- ${shortStr}
- </div>`
- $(".moduleItem.hasdiagnose").append(boxStr)
- $(".moduleItem.hasdiagnose").append("<div class='item' data-index='2'></div>")
- $(".moduleItem.hasdiagnose.moduleItemTitBox").append(renderLongStr(name, longStr, "left"))
- $('.moduleItem.hasdiagnose').css("display", "block")
- $('.hasdiagnose .pushItemBox').on("click", function (e) {
- e.preventDefault()
- const name = $(this).attr('data-name');
- const i = $(this).attr('data-index');
- if ($(this).hasClass('disable')) {
- $.toast('toast3', '', 3000, '.hasdiagnose', i);
- $(".hasdiagnose .item").css("display", "none")
- $(this).siblings().removeClass('active');
- return
- }
- if ($(this).hasClass('active')) {
- $(this).removeClass('active');
- } else {
- $(this).addClass('active').siblings().removeClass('active');
- }
- const index = $(this).parent().parent().next().attr('data-i')
- const showList = $(".hasdiagnose .item").css("display")
- if (showList == "none" || index != i) {
- // $(".loading").show();
- $(".hasdiagnose .item").html('')
- $(".hasdiagnose .item").css("display", "none")
- $(this).parent().parent().next().css("display", "block")
- $(this).parent().parent().next().attr('data-i', i)
- renderpushByHasDisease(name, i, 2,e)
- } else {
- $(".hasdiagnose .item").css("display", "none")
- }
- });
- }
- function renderMayVitalPush(list, inx) {
- let num, state
- for (let i = 0; i < maydiagnoseList.length; i++) {
- const item = maydiagnoseList[i];
- if (item.code == 'mayvital') {
- num = item.number
- state = item.status
- }
- }
- if (list.length > 0 && state != 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, num, '体征')
- $(".moduleItem .item[data-index=" + inx + "]").append("<div class='mayvital'></div>")
- $(".moduleItem .item[data-index=" + inx + "] .mayvital").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .mayvital").append(renderLongStr(titleConfigH["mayvitalPush"].name, longStr, titleConfigH["mayvitalPush"].location))
- $(".moduleItem .item[data-index=" + inx + "] .mayvital").css("display", "block")
- }
- }
- function renderHasVitalPush(list, inx) {
- let num, state
- for (let i = 0; i < hasdiagnoseList.length; i++) {
- const item = hasdiagnoseList[i];
- if (item.code == 'hasvital') {
- num = item.number
- state = item.status
- }
- }
- if (list.length > 0 && state != 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, num, '体征')
- $(".moduleItem .item[data-index=" + inx + "]").append("<div class='hasvital'></div>")
- $(".moduleItem .item[data-index=" + inx + "] .hasvital").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .hasvital").append(renderLongStr(titleConfigH["mayvitalPush"].name, longStr, titleConfigH["mayvitalPush"].location))
- $(".moduleItem .item[data-index=" + inx + "] .hasvital").css("display", "block")
- }
- }
- function renderMaySymptomPush(list, inx) {
- let num, state
- for (let i = 0; i < maydiagnoseList.length; i++) {
- const item = maydiagnoseList[i];
- if (item.code == 'maysymptom') {
- num = item.number
- state = item.status
- }
- }
- if (list.length > 0 && state != 0) {
- let { shortStr, longStr } = renderItemWrapper(list, num, '症状')
- $(".moduleItem .item[data-index=" + inx + "]").append("<div class='maysymptom'></div>")
- $(".moduleItem .item[data-index=" + inx + "] .maysymptom").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .maysymptom").append(renderLongStr(titleConfigH["symptomPush2"].name, longStr, titleConfigH["symptomPush2"].location))
- $(".moduleItem .item[data-index=" + inx + "] .maysymptom").css("display", "block")
- }
- }
- function renderHasSymptomPush(list, inx) {
- let num, state
- for (let i = 0; i < hasdiagnoseList.length; i++) {
- const item = hasdiagnoseList[i];
- if (item.code == 'hassymptom') {
- num = item.number
- state = item.status
- }
- }
- if (list.length > 0 && state != 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, num, '症状')
- $(".moduleItem .item[data-index=" + inx + "]").append("<div class='hassymptom'></div>")
- $(".moduleItem .item[data-index=" + inx + "] .hassymptom").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .hassymptom").append(renderLongStr(titleConfigH["symptomPush2"].name, longStr, titleConfigH["symptomPush2"].location))
- $(".moduleItem .item[data-index=" + inx + "] .hassymptom").css("display", "block")
- }
- }
- function renderMayLisPush(list, inx) {
- let num, state
- for (let i = 0; i < maydiagnoseList.length; i++) {
- const item = maydiagnoseList[i];
- if (item.code == 'maylis') {
- num = item.number
- state = item.status
- }
- }
- if (list.length > 0 && state != 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, num, '推荐检验')
- $(".moduleItem .item[data-index=" + inx + "]").append("<div class='maylis'></div>")
- $(".moduleItem .item[data-index=" + inx + "] .maylis").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .maylis").append(renderLongStr(titleConfigH["lisPush"].name, longStr, titleConfigH["lisPush"].location))
- $(".moduleItem .item[data-index=" + inx + "] .maylis").css("display", "block")
- }
- }
- function renderHasLisPush(list, inx) {
- let num, state
- for (let i = 0; i < hasdiagnoseList.length; i++) {
- const item = hasdiagnoseList[i];
- if (item.code == 'haslis') {
- num = item.number
- state = item.status
- }
- }
- if (list.length > 0 && state != 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, num, '推荐检验')
- $(".moduleItem .item[data-index=" + inx + "]").append("<div class='haslis'></div>")
- $(".moduleItem .item[data-index=" + inx + "] .haslis").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .haslis").append(renderLongStr(titleConfigH["lisPush"].name, longStr, titleConfigH["lisPush"].location))
- $(".moduleItem .item[data-index=" + inx + "] .haslis").css("display", "block")
- }
- }
- function renderMayPacsPush(list, inx) {
- let num, state
- for (let i = 0; i < maydiagnoseList.length; i++) {
- const item = maydiagnoseList[i];
- if (item.code == 'maypacs') {
- num = item.number
- state = item.status
- }
- }
- if (list.length > 0 && state != 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, num, '推荐检查')
- $(".moduleItem .item[data-index=" + inx + "]").append("<div class='maypacs'></div>")
- $(".moduleItem .item[data-index=" + inx + "] .maypacs").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .maypacs").append(renderLongStr(titleConfigH["pacsPush"].name, longStr, titleConfigH["pacsPush"].location))
- $(".moduleItem .item[data-index=" + inx + "] .maypacs").css("display", "block")
- }
- }
- function renderHasPacsPush(list, inx) {
- let num, state
- for (let i = 0; i < hasdiagnoseList.length; i++) {
- const item = hasdiagnoseList[i];
- if (item.code == 'haspacs') {
- num = item.number
- state = item.status
- }
- }
- if (list.length > 0 && state != 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, num, '推荐检查')
- $(".moduleItem .item[data-index=" + inx + "]").append("<div class='haspacs'></div>")
- $(".moduleItem .item[data-index=" + inx + "] .haspacs").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .haspacs").append(renderLongStr(titleConfigH["pacsPush"].name, longStr, titleConfigH["pacsPush"].location))
- $(".moduleItem .item[data-index=" + inx + "] .haspacs").css("display", "block")
- }
- }
- function renderMayScalePush(list, inx) {
- let num, state
- for (let i = 0; i < maydiagnoseList.length; i++) {
- const item = maydiagnoseList[i];
- if (item.code == 'mayevaluation') {
- num = item.number
- state = item.status
- }
- }
- if (list.length > 0 && state != 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, num, '推荐量表')
- $(".moduleItem .item[data-index=" + inx + "]").append("<div class='mayevaluation'></div>")
- $(".moduleItem .item[data-index=" + inx + "] .mayevaluation").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .mayevaluation").append(renderLongStr(titleConfigH["scalePush"].name, longStr, titleConfigH["scalePush"].location))
- $(".moduleItem .item[data-index=" + inx + "] .mayevaluation").css("display", "block")
- }
- }
- function renderHasScalePush(list, inx) {
- let num, state
- for (let i = 0; i < hasdiagnoseList.length; i++) {
- const item = hasdiagnoseList[i];
- if (item.code == 'hasevaluation') {
- num = item.number
- state = item.status
- }
- }
- if (list.length > 0 && state != 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, num, '推荐量表')
- $(".moduleItem .item[data-index=" + inx + "]").append("<div class='hasevaluation'></div>")
- $(".moduleItem .item[data-index=" + inx + "] .hasevaluation").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .hasevaluation").append(renderLongStr(titleConfigH["scalePush"].name, longStr, titleConfigH["scalePush"].location))
- $(".moduleItem .item[data-index=" + inx + "] .hasevaluation").css("display", "block")
- }
- }
- function renderMayDisPush(list, inx) {
- let num, state
- for (let i = 0; i < maydiagnoseList.length; i++) {
- const item = maydiagnoseList[i];
- if (item.code == 'mayantidias') {
- num = item.number
- state = item.status
- }
- }
- if (list.length > 0 && state != 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, num, '鉴别诊断')
- $(".moduleItem .item[data-index=" + inx + "]").append("<div class='mayantidias'></div>")
- $(".moduleItem .item[data-index=" + inx + "] .mayantidias").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .mayantidias").append(renderLongStr(titleConfigH["diasPush"].name, longStr, titleConfigH["diasPush"].location))
- $(".moduleItem .item[data-index=" + inx + "] .mayantidias").css("display", "block")
- }
- }
- function renderHasDisPush(list, inx) {
- let num, state
- for (let i = 0; i < hasdiagnoseList.length; i++) {
- const item = hasdiagnoseList[i];
- if (item.code == 'hasantidias') {
- num = item.number
- state = item.status
- }
- }
- if (list.length > 0 && state != 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, num, '鉴别诊断')
- $(".moduleItem .item[data-index=" + inx + "]").append("<div class='hasantidias'></div>")
- $(".moduleItem .item[data-index=" + inx + "] .hasantidias").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .hasantidias").append(renderLongStr(titleConfigH["diasPush"].name, longStr, titleConfigH["diasPush"].location))
- $(".moduleItem .item[data-index=" + inx + "] .hasantidias").css("display", "block")
- }
- }
- function renderMayPush(treatPush, medicinesPush, operationsPush, nursePush, inx) {
- let generalstate, medicinestate, operationstate, nursestate, isShow = false
- for (let i = 0; i < maydiagnoseList.length; i++) {
- const item = maydiagnoseList[i];
- if (item.code == 'maygeneral') {
- generalstate = item.status
- } else if (item.code == 'maymedicine') {
- medicinestate = item.status
- } else if (item.code == 'mayoperation') {
- operationstate = item.status
- } else if (item.code == 'maynurse') {
- nursestate = item.status
- }
- }
- for (let i = 0; i < treatPush.length; i++) {
- const it = treatPush[i];
- if (it.generaTreat) {
- isShow = true
- }
- }
- if ((treatPush.length > 0 && isShow && generalstate != 0) || (medicinesPush.length > 0 && medicinestate != 0) || (operationsPush.length > 0 && operationstate != 0) || (nursePush.length > 0 && nursestate != 0)) {
- $(".maydiagnose .item[data-index=" + inx + "]").append("<div class='centerBox'></div>")
- let str = `<ul>
- ${treatPush.length > 0 && isShow && generalstate != 0 ? `<li class="general" data-index="0">一般治疗</li>` : ''}
- ${medicinesPush.length > 0 && medicinestate != 0 ? `<li class="medicine" data-index="1">推荐用药</li>` : ''}
- ${operationsPush.length > 0 && operationstate != 0 ? `<li class="operation" data-index="2">推荐手术/操作</li>` : ''}
- ${nursePush.length > 0 && nursestate != 0 ? `<li class="nurse" data-index="3">推荐护理</li>` : ''}
- </ul>
- <div class="centerBoxItem">
- ${treatPush.length > 0 && isShow && generalstate != 0 ? `<div class="checkBox generalItem maygeneral" data-index="0"></div>` : ''}
- ${medicinesPush.length > 0 && medicinestate != 0 ? `<div class="checkBox medicineItem maymedicine" data-index="1"></div>` : ''}
- ${operationsPush.length > 0 && operationstate != 0 ? `<div class="checkBox operationItem mayoperation" data-index="2"></div>` : ''}
- ${nursePush.length > 0 && nursestate != 0 ? `<div class="checkBox nurseItem maynurse" data-index="3"></div>` : ''}
- </div>`
- $(".maydiagnose .item[data-index=" + inx + "] .centerBox").append(str)
- }
- if ($(".maydiagnose .centerBox ul li").length == 0) {
- $(".maydiagnose .centerBox").hide()
- } else {
- $(".maydiagnose .centerBox").show()
- }
- renderMayTreatPush(treatPush, inx)
- renderMayMedicinesPush(medicinesPush, inx)
- renderMayOperationsPush(operationsPush, inx)
- renderMayNursePush(nursePush, inx)
- $(".maydiagnose .item[data-index=" + inx + "] .centerBox ul li").click(function () {
- var i = $(this).attr('data-index');
- if ($(this).hasClass('actives')) {
- $(this).removeClass('actives');
- $(".maydiagnose .item[data-index=" + inx + "] .checkBox[data-index=" + i + "]").removeClass('onshow');
- } else {
- $(this).addClass('actives').siblings().removeClass('actives');
- $(".maydiagnose .item[data-index=" + inx + "] .checkBox[data-index=" + i + "]").addClass('onshow').siblings().removeClass('onshow');
- }
- });
- }
- function renderHasPush(treatPush, medicinesPush, operationsPush, nursePush, inx) {
- let generalstate, medicinestate, operationstate, nursestate, isShow = false
- for (let i = 0; i < hasdiagnoseList.length; i++) {
- const item = hasdiagnoseList[i];
- if (item.code == 'hasgeneral') {
- generalstate = item.status
- } else if (item.code == 'hasmedicine') {
- medicinestate = item.status
- } else if (item.code == 'hasoperation') {
- operationstate = item.status
- } else if (item.code == 'hasnurse') {
- nursestate = item.status
- }
- }
- for (let i = 0; i < treatPush.length; i++) {
- const it = treatPush[i];
- if (it.generaTreat) {
- isShow = true
- }
- }
- if ((treatPush.length > 0 && isShow && generalstate != 0) || (medicinesPush.length > 0 && medicinestate != 0) || (operationsPush.length > 0 && operationstate != 0) || (nursePush.length > 0 && nursestate != 0)) {
- $(".hasdiagnose .item[data-index=" + inx + "]").append("<div class='centerBox'></div>")
- let str = `<ul>
- ${treatPush.length > 0 && isShow && generalstate != 0 ? `<li class="general" data-index="0">一般治疗</li>` : ''}
- ${medicinesPush.length > 0 && medicinestate != 0 ? `<li class="medicine" data-index="1">推荐用药</li>` : ''}
- ${operationsPush.length > 0 && operationstate != 0 ? `<li class="operation" data-index="2">推荐手术/操作</li>` : ''}
- ${nursePush.length > 0 && nursestate != 0 ? `<li class="nurse" data-index="3">推荐护理</li>` : ''}
- </ul>
- <div class="centerBoxItem">
- ${treatPush.length > 0 && isShow && generalstate != 0 ? `<div class="checkBox generalItem hasgeneral" data-index="0"></div>` : ''}
- ${medicinesPush.length > 0 && medicinestate != 0 ? `<div class="checkBox medicineItem hasmedicine" data-index="1"></div>` : ''}
- ${operationsPush.length > 0 && operationstate != 0 ? `<div class="checkBox operationItem hasoperation" data-index="2"></div>` : ''}
- ${nursePush.length > 0 && nursestate != 0 ? `<div class="checkBox nurseItem hasnurse" data-index="3"></div>` : ''}
- </div>`
- $(".hasdiagnose .item[data-index=" + inx + "] .centerBox").append(str)
- }
- if ($(".hasdiagnose .centerBox ul li").length == 0) {
- $(".hasdiagnose .centerBox").hide()
- } else {
- $(".hasdiagnose .centerBox").show()
- }
- renderHasTreatPush(treatPush, inx)
- renderHasMedicinesPush(medicinesPush, inx)
- renderHasOperationsPush(operationsPush, inx)
- renderHasNursePush(nursePush, inx)
- $(".hasdiagnose .item[data-index=" + inx + "] .centerBox ul li").click(function () {
- var i = $(this).attr('data-index');
- if ($(this).hasClass('actives')) {
- $(this).removeClass('actives');
- $(".hasdiagnose .item[data-index=" + inx + "] .checkBox[data-index=" + i + "]").removeClass('onshow');
- } else {
- $(this).addClass('actives').siblings().removeClass('actives');
- $(".hasdiagnose .item[data-index=" + inx + "] .checkBox[data-index=" + i + "]").addClass('onshow').siblings().removeClass('onshow');
- }
- });
- }
- function renderMayTreatPush(list, inx) {
- let num, state
- for (let i = 0; i < maydiagnoseList.length; i++) {
- const item = maydiagnoseList[i];
- if (item.code == 'maygeneral') {
- num = item.number
- state = item.status
- }
- }
- if (list.length > 0 && state != 0) {
- let str = ''
- for (let i = 0; i < list.length; i++) {
- const item = list[i];
- str = `${item.generaTreat || ''}`
- }
- $(".moduleItem .item[data-index=" + inx + "] .maygeneral").append(str)
- }
- }
- function renderHasTreatPush(list, inx) {
- let num, state
- for (let i = 0; i < hasdiagnoseList.length; i++) {
- const item = hasdiagnoseList[i];
- if (item.code == 'hasgeneral') {
- num = item.number
- state = item.status
- }
- }
- let str = ''
- if (list.length > 0 && state != 0) {
- for (let i = 0; i < list.length; i++) {
- const item = list[i];
- str = `${item.generaTreat || ''}`
- }
- $(".moduleItem .item[data-index=" + inx + "] .hasgeneral").append(str)
- }
- }
- function renderMayMedicinesPush(list, inx) {
- if (list.length > 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, 10)
- $(".moduleItem .item[data-index=" + inx + "] .maymedicine").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .maymedicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
- }
- }
- function renderHasMedicinesPush(list, inx) {
- if (list.length > 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, 10)
- $(".moduleItem .item[data-index=" + inx + "] .hasmedicine").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .hasmedicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
- }
- }
- function renderMayOperationsPush(list, inx) {
- console.log(list, 112);
- if (list.length > 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, 10)
- $(".moduleItem .item[data-index=" + inx + "] .mayoperation").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .mayoperation").append(renderLongStr(titleConfigH["operationPush"].name, longStr, titleConfigH["operationPush"].location))
- }
- }
- function renderHasOperationsPush(list, inx) {
- if (list.length > 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, 10)
- $(".moduleItem .item[data-index=" + inx + "] .hasoperation").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .hasoperation").append(renderLongStr(titleConfigH["operationPush"].name, longStr, titleConfigH["operationPush"].location))
- }
- }
- function renderMayNursePush(list, inx) {
- if (list.length > 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, 10)
- $(".moduleItem .item[data-index=" + inx + "] .maynurse").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .maynurse").append(renderLongStr(titleConfigH["nursePush"].name, longStr, titleConfigH["nursePush"].location))
- }
- }
- function renderHasNursePush(list, inx) {
- if (list.length > 0) {
- moduleNum++
- let { shortStr, longStr } = renderItemWrapper(list, 10)
- $(".moduleItem .item[data-index=" + inx + "] .hasnurse").append(shortStr)
- $(".moduleItem .item[data-index=" + inx + "] .hasnurse").append(renderLongStr(titleConfigH["nursePush"].name, longStr, titleConfigH["nursePush"].location))
- }
- }
- function renderLis(list, showNum) {
- if (list.length > 0 && $(".moduleItem.lis").length > 0) {
- moduleNum++
- $('.moduleItem.lis .moduleItemTitBox').append(titleStr("lisPush"))
- let { shortStr, longStr } = renderItemWrapper(list, showNum)
- $('.moduleItem.lis').append(shortStr)
- $('.moduleItem.lis').append(renderLongStr(titleConfigH["lisPush"].name, longStr, titleConfigH["lisPush"].location))
- $('.moduleItem.lis').css("display", "block")
- }
- }
- function renderScale(list, showNum) {
- if (list.length > 0 && $(".moduleItem.evaluation").length > 0) {
- moduleNum++
- $('.moduleItem.evaluation .moduleItemTitBox').append(titleStr("scalePush"))
- let { shortStr, longStr } = renderItemWrapper(list, showNum)
- $('.moduleItem.evaluation').append(shortStr)
- $('.moduleItem.evaluation').append(renderLongStr(titleConfigH["scalePush"].name, longStr, titleConfigH["scalePush"].location))
- $('.moduleItem.evaluation').css("display", "block")
- // $('.moduleItem.evaluation').children(".shortBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
- // $('.moduleItem.evaluation').children(".longStrBox").children(".longBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
- }
- }
- function renderNurse(list, showNum) {
- if (list.length > 0 && $(".moduleItem.nurse").length > 0) {
- moduleNum++
- $('.moduleItem.nurse .moduleItemTitBox').append(titleStr("nursePush"))
- let { shortStr, longStr } = renderItemWrapper(list, showNum)
- $(".moduleItem.nurse").append(shortStr)
- $(".moduleItem.nurse").append(renderLongStr(titleConfigH["nursePush"].name, longStr, titleConfigH["nursePush"].location))
- $(".moduleItem.nurse").css("display", "block")
- }
- }
- function renderPacs(list, showNum) {
- if (list.length > 0 && $(".moduleItem.pacs").length > 0) {
- moduleNum++
- $('.moduleItem.pacs .moduleItemTitBox').append(titleStr("pacsPush"))
- let { shortStr, longStr } = renderItemWrapper(list, showNum)
- $(".moduleItem.pacs").append(shortStr)
- $(".moduleItem.pacs").append(renderLongStr(titleConfigH["pacsPush"].name, longStr, titleConfigH["pacsPush"].location))
- $('.moduleItem.pacs').css("display", "block")
- }
- }
- function renderSymptomPush(list, showNum) {
- if (list.length > 0 && $(".moduleItem.symptom").length > 0) {
- moduleNum++
- $('.moduleItem.symptom .moduleItemTitBox').append(titleStr("symptomPush"))
- let { shortStr, longStr } = renderItemWrapper(list, showNum)
- $(".moduleItem.symptom").append(shortStr)
- $(".moduleItem.symptom").append(renderLongStr(titleConfigH["symptomPush"].name, longStr, titleConfigH["symptomPush"].location))
- $('.moduleItem.symptom').css("display", "block")
- }
- }
- function renderMedicinesPush(list, showNum) {
- if (list.length > 0 && $(".moduleItem.medicine").length > 0) {
- moduleNum++
- $('.moduleItem.medicine .moduleItemTitBox').append(titleStr("drugPush"))
- let { shortStr, longStr } = renderItemWrapper(list, showNum)
- $(".moduleItem.medicine").append(shortStr)
- $(".moduleItem.medicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
- $(".moduleItem.medicine").css("display", "block")
- }
- }
- function renderOperationPush(list, showNum) {
- if (list.length > 0 && $(".moduleItem.operation").length > 0) {
- moduleNum++
- $('.moduleItem.operation .moduleItemTitBox').append(titleStr("operationPush"))
- let { shortStr, longStr } = renderItemWrapper(list, showNum)
- $(".moduleItem.operation").append(shortStr)
- $(".moduleItem.operation").append(renderLongStr(titleConfigH["operationPush"].name, longStr, titleConfigH["operationPush"].location))
- $(".moduleItem.operation").css("display", "block")
- }
- }
- function renderDisName() {
- $(".disName").append(`${treatDisName || ''}`)
- }
- function rendergeneraTreatPush(list) {
- if (list && list.length > 0 && $(".moduleItem.general").length > 0) {
- moduleNum++
- $('.moduleItem.general .moduleItemTitBox').append(titleStr("generaTreatPush"))
- let str = `<div class="generalTreatInfo clearfix isOverFlow">${list}</div>`
- $(".moduleItem.general").append(str)
- setTimeout(function () {
- let generaTreatHei = $(".moduleItem .generalTreatInfo")[0].scrollHeight
- if (generaTreatHei > 60) {
- $(".moduleItem .generalTreatInfo").append(`<span class="showMoreGeneralTreat">更多</span>`)
- bindGeneralSlide()
- }
- })
- console.log($(".generalTreatInfo").text())
- $(".moduleItem.general").css("display", "block")
- }
- }
- function renderCheckup(list, showNum) {
- if (list.length > 0 && $(".moduleItem.vital").length > 0) {
- moduleNum++
- $(".moduleItem.vital .moduleItemTitBox").append(titleStr("checkupPush"))
- let { shortStr, longStr } = renderItemWrapper(list, showNum)
- $(".moduleItem.vital").append(shortStr)
- $(".moduleItem.vital").append(renderLongStr(titleConfigH["checkupPush"].name, longStr, titleConfigH["checkupPush"].location))
- $('.moduleItem.vital').css("display", "block")
- }
- }
- function renderDiag(diagPush) {
- let possibleDiagPush = 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 .moduleItemTitBox').append(titleStr("diagPush"))
- renderDiagItem(possibleDiagPush, "可能诊断", number)
- renderDiagItem(firstDiagPush, "既往诊断", number)
- renderDiagItem(identifyDiagPush, "鉴别诊断", number)
- renderWarningDiag(warningDiagPush, "警惕", 1000)
- moreInfo()
- }
- function renderDiagItem(list, name, number) {
- if (list.length === 0) {
- return
- }
- let titleStr = `<span class="moduleBoxName">${name}</span>`
- let { shortStr, longStr } = renderItemWrapper(list, number)
- let boxStr = `<div class="moduleBox">
- ${titleStr}
- ${shortStr}
- </div>`
- $(".diag").append(boxStr)
- $(".diag").append(renderLongStr(name, longStr, "left"))
- $('.moduleItem.diag').css("display", "block")
- }
- function renderWarningDiag(list, name, showNum) {
- if (list.length > 0 && $(".moduleItem.warning").length > 0) {
- moduleNum++
- $('.moduleItem.warning .moduleItemTitBox').append(titleStr("vigilancePush"))
- let { shortStr, longStr } = renderItemWrapper(list, showNum)
- $('.moduleItem.warning').append(shortStr)
- $('.moduleItem.warning').css("display", "block")
- }
- }
- function renderwriteStandardPage(list) {
- if (list.length > 0 && $(".moduleItem.casewriting").length > 0) {
- moduleNum++
- $(".moduleItem.casewriting .moduleItemTitBox").append(titleStr("casewritingPush"))
- let str = ``
- for (let i = 0; i < list.length; i++) {
- str += `<p>${list[i]}</p>`
- }
- $(".moduleItem.casewriting").append(str)
- $('.moduleItem.casewriting').css("display", "block")
- }
- empty()
- }
- 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 || [] //其他提醒
- let nurseList = result.nurseList || [] //推荐护理
- localStorage.setItem('nurseList', JSON.stringify(nurseList))
- renderBillingPush(billMsgList, '开单合理性', 'rationali')
- renderBillingPush(highRiskList, '高风险提示', 'highrisk')
- renderBillingPush(criticalValList, '危急值提醒', 'crivalue')
- renderBillingPush(noteList, '检查注意事项')
- renderBillingPush(otherList, '其他提醒', 'otherremind')
- renderBillingNursePush(nurseList, '推荐护理', 'nurse')
- const codes = ($(".rationali.tips").length ? 'rationali,' : "") + ($(".highrisk.tips").length ? 'highrisk,' : "") + ($(".crivalue.tips").length ? 'crivalue,' : "") + ($(".otherremind.tips").length ? 'otherremind' : "");
- $(".moduleItem.tips").wrapAll("<div class='tips-cont' codes=" + codes + "></div>");
- $('.tips-cont').append(titleStr('warning'))
- moreInfo()
- const hasTipsNum = $(".moduleItem.tips").length;
- if (hasTipsNum) {
- let tipNum = $(".tips-cont .billingPushItem").length;
- if (tipNum > 3) {
- $(".tips-cont").append(`<span class="showMoreNewPage">更多</span>`)
- tipsMsg = result
- showMoreNewPage()
- }
- }
- // renderBillingPush(dubugStr,'注意调试信息')
- }
- if (hasCompleteTnterface === allInterface) {
- $('.loading').css("display", "none")
- /*if (moduleNum === 0) {//console.log(999)
- empty()
- }*/
- }
- empty()
- }).catch(() => {
- $(".loading").hide()
- })
- }
- function renderBillingPush(list, name, code) {
- if (list.length === 0) {
- return
- }
- let str = ``
- for (let i = 0; i < list.length; i++) {
- str += `<div class="billingPushItem">${list[i].msg}</div>`
- }
- let titleStr = `<span class="moduleBoxName">${name}</span>`
- let boxStr = `<div class="moduleBox">
- ${titleStr}
- ${str}
- </div>`
- $("." + code).append(boxStr)
- $('.moduleItem.' + code).addClass("tips").attr("code", code).css("display", "block")
- }
- function renderNursePush(list) {
- let str = ``
- for (let i = 0; i < list.length; i++) {
- const item = list[i];
- str += `<span class="nurseDetail" data-name="${item}">${item}<img class="nurseImg" src="${go}"></span>`
- }
- return str
- }
- function renderBillingNursePush(list) {
- if (list.length > 0 && $(".moduleItem.nurse").length > 0) {
- moduleNum++
- $('.moduleItem.nurse .moduleItemTitBox').append(titleStr("nursePush"))
- let str = ``
- for (let i = 0; i < list.length; i++) {
- str += `<div class="billingPushItem">${list[i].msg}${renderNursePush(list[i].staticList)}</div>`
- }
- let boxStr = `<div class="moduleBox">
- ${str}
- </div>`
- $(".moduleItem.nurse").append(boxStr)
- $(".moduleItem.nurse").css("display", "block")
- let tipNum = $(".nurse .moduleBox").height();
- console.log(tipNum);
- if (tipNum > 63) {
- $(".nurse").append(`<span class="showMoreNewPage">更多</span>`)
- showMoreNewNurse()
- }
- $('.nurseDetail').off("click").click(function () {
- const name = $(this).attr('data-name')
- const type = 9
- openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}&page=1&mrId=${encodeURIComponent(mrId)}&gauge=gauge`)
- })
- }
- }
- function showMoreNewNurse() {
- $(".showMoreNewPage").on("click", function () {
- openNewWin(`nurseAlert.html?mrId=${mrId}&hospitalId=${hospitalIdUrl}`);
- })
- }
- function renderLongStr(name, longStr, location) {
- if (!longStr) {
- return
- }
- let str = `
- <div class="longStrBox" data-location="${location}">
- <span class="longStrBoxTitle">${name}:</span>
- ${longStr}
- </div>
- `
- return str
- }
- function renderItemWrapper(list, showNum, name, type) {
- let showNum1 = showNum || 5
- let shortStr = '', longStr = ''
- for (let i = 0; i < list.length; i++) {
- if (i <= showNum1 - 1) {
- shortStr += type == 1 || type == 2 ? renderPushItem2(list[i], i) : renderPushItem(list[i], i)
- }
- longStr += type || type == 2 ? renderPushItem2(list[i], i) : renderPushItem(list[i], i)
- }
- if (showNum1 >= list.length) {
- return {
- shortStr: `<div class="shortBox"><span>${name ? name + ':' : ''}</span>${shortStr}</div>`,
- longStr: ''
- }
- } else {
- shortStr += `<span class="showMore"> <img class="iconArrowImg" src="${showImg}"></span>`
- longStr += `<span class="showLess"><img class="iconArrowImg" src="${collapseImg}"></span>`
- return {
- shortStr: `<div class="shortBox clearfix"><span>${name ? name + ':' : ''}</span>${shortStr}</div>`,
- longStr: `<div class="longBox clearfix"<span></span>${longStr}</div>`
- }
- }
- }
- function renderPushItem(item, i) {
- str = `<span class="pushItemBox" data-name="${item.name}" data-type="${item.type}" data-index="${i}">`
- str += `${item.hasScale == "0" ? `<span class="pushItemName">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>` : item.hasScale == "1" ? `<span class="pushItemName evaluationtitle">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>` : `<span class="pushItemName">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>`}`
- str += `${item.hasInfo == "1" ? `<img class="infoImg" src="${infoImg}">` : ""}`
- str += '</span >'
- return str
- }
- function renderPushItem2(item, i) {
- str = `<span class="pushItemBox" data-name="${item.name}" data-type="${item.type}" data-index="${i}">`
- str += `${item.hasScale == "0" ? `<span class="pushItemName" style="word-break:break-all" title="${item.name}">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>` : item.hasScale == "1" ? `<span class="pushItemName evaluationtitle" title="${item.name}">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>` : `<span class="pushItemName" title="${item.name}">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>`}`
- str += `${item.hasInfo == "1" ? `<img class="infoImg" src="${infoImg}">` : ""}`
- str += '</span >'
- return str
- }
- function bindOpenInfo() {
- $(".infoImg").on("mouseenter", function () {
- $(this).attr("src", infoImgOn)
- }).on("mouseleave", function () {
- $(this).attr("src", infoImg)
- })
- }
- function titleStr(type) {
- let titleStr = ''
- titleStr += `<div class="moduleTitle"><img class="titleIcon" src=${titleConfigH[type].icon}>${titleConfigH[type].name}:</div>`
- return titleStr
- }
- function bindSlide() {
- $(".showMore").off("click").on("click", function () {
- const longBox = $(this).parent().next().length ? $(this).parent().next() : $(this).parent().parent().next();
- $(".longStrBox").css("display", "none")
- longBox.css("display", "block")
- let location = longBox.attr("data-location")
- let scrollTop = getLongTop(location)
- const n = Number(scrollTop) - 2 > -1 ? Number(scrollTop) - 2 : 0;
- longBox.css("top", n + "px")
- })
- $(".showLess").off("click").on("click", function () {
- $(this).parent().parent().css("display", "none")
- })
- addScrollEvent()
- }
- function showMoreNewPage() {
- const codes = $(".tips-cont").attr("codes");
- $(".showMoreNewPage").on("click", function () {
- // openNewWin(`smartAlert.html?billMsgList=${encodeURIComponent(billMsgList)}&highRiskList=${encodeURIComponent(highRiskList)}&criticalValList=${encodeURIComponent(criticalValList)}¬eList=${encodeURIComponent(noteList)}`)
- openNewWin(`smartAlert.html?mrId=${mrId}&hospitalId=${hospitalIdUrl}&codes=` + codes);
- })
- }
- function showMoreCaseWrite() {
- $(".showMoreCaseWrite").on("click", function () {
- // openNewWin(`smartAlert.html?billMsgList=${encodeURIComponent(billMsgList)}&highRiskList=${encodeURIComponent(highRiskList)}&criticalValList=${encodeURIComponent(criticalValList)}¬eList=${encodeURIComponent(noteList)}`)
- openNewWin(`caseWriteStandard.html?caseWriteStandradList=${encodeURIComponent(JSON.stringify(caseWriteStandradList))}`)
- })
- }
- function bindGeneralSlide() {
- $(".showMoreGeneralTreat").on("click", function () {
- openNewWin(`generalTreat.html?disName=${treatDisName}&name=${treatUniqueName}`)
- })
- }
- /*function setWidth() {
- let winWidth = $(".bodyWrap").css("width")
- $(".contentBox").css("width", winWidth)
- }*/
- //医学知识搜索
- searchMedical()
- function searchMedical() {
- $(".medicalKonwledgeWrap .search").on("click", function () {
- openNewWin(`homeStatic.html?mrId=${mrId}&hospitalId=${hospitalIdUrl}&planCode=${planCode}`)
- })
- }
- 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)}`)
- })
- $('.evaluationtitle').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)}&page=1&gauge=gauge`)
- })
- }
- function pushItemName() {
- $('.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)}`)
- })
- }
- 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")) { //判断版本是否更新
- $(".versionWrapper").append('<span class="versionNew"></span>');
- localStorage.setItem('versionTime', time + "=new"); //保存版本更新时间
- } else {
- $(".versionNew").remove();
- }
- })
- }
- function getLongTop(type) {
- let scrollTop = 0
- if (type === "left") {
- scrollTop = $(".leftWrapper").scrollTop() || 0
- } else if (type === "right") {
- scrollTop = $(".rightWrapper").scrollTop() || 0
- }
- return scrollTop
- }
- function addScrollEvent() {
- $(`.leftWrapper`).off("scroll").scroll(throttle(function () {
- if ($(".leftWrapper .longStrBox:visible").length) {
- const n = Number(getLongTop("left")) - 10 > -1 ? (Number(getLongTop("left")) - 10) : 0;
- $(".leftWrapper .longStrBox:visible").css("top", Number(getLongTop("left")) - 2 + "px")
- }
- }, 100));
- $(`.rightWrapper`).off("scroll").scroll(throttle(function () {
- if ($(".rightWrapper .longStrBox:visible").css("display") === "block") {
- const n = Number(getLongTop("right")) > -1 ? (Number(getLongTop("right"))) : 0;
- $(".rightWrapper .longStrBox:visible").css("top", n + "px")
- }
- }, 100));
- }
- $(function () {//隐藏logo
- if (getUrlArgObject("hideLg")) {
- $(".versionTop .logoTxt").hide();
- }
- getVersion()
- $(".versionTop").on("click", function () {
- openNewWin("disclaimer.html")
- });
- $(".versionBottom").on("click", function () {
- const ver = localStorage.getItem('versionTime');
- $(".versionBottom").removeClass('new-icon');
- localStorage.setItem('versionTime', ver.replace("=new", ""));
- openNewWin("version.html");
- });
- })
- // function empty(){
- // $(".responsibility").css("display","none")
- // $('.recommendWrap .empty').css("display","block")
- // }
|