zhangxc 4 роки тому
батько
коміт
ebd456c055

+ 24 - 2
src/css/cdss.less

@@ -284,12 +284,11 @@ body{
     width: 4px;
     position: absolute;
     left: 20px;
-    top: 8px;
+    top: 3px;
 }
 .billingPushItem{
     padding: 0 15px 0 30px;
     position: relative;
-    line-height: 31px;
 }
 .moduleItem{
     border-radius: 4px;
@@ -376,4 +375,27 @@ body{
 
 .casewritingWrapper p{
     padding: 4px 15px;
+}
+.generalTreatInfo{
+    padding: 4px 15px;
+    box-sizing: border-box;
+    position: relative;
+}
+.isOverFlow{
+    overflow: hidden;
+    max-height: 65px;
+}
+.showMoreGeneralTreat{
+    position: absolute;
+    cursor: pointer;
+    color: #3B9ED0;
+    right: 10px;
+    bottom: 5px;
+    background: #fff;
+}
+.showLessGeneralTreat{
+    display: inline-block;
+    cursor: pointer;
+    float: right;
+    color: #3B9ED0;
 }

+ 24 - 2
src/css/cdssHorizontal.less

@@ -83,11 +83,12 @@
 .contentBox{
     position: absolute;
     height: 100%;
+    overflow-y: auto;
 }
 .moduleWrapper{
     position: absolute;
     width: 100%;
-    height: 100%;
+    // height: 100%;
 }
 .leftWrapper,.rightWrapper{
     position: relative;
@@ -200,7 +201,7 @@
     position: relative;
     right: 5px;
 }
-.showMoreNewPage{
+.showMoreNewPage,.showMoreCaseWrite{
     display: inline-block;
     cursor: pointer;
     position: absolute;
@@ -291,3 +292,24 @@
     position: relative;
     top: 2px;
 }
+.moduleItem.casewriting{
+    padding: 0 0 0 160px;
+    background: rgba(60,172,228,.17);
+    margin-top: 5px;
+    max-height: 81px;
+    overflow-y: hidden;
+    position: relative;
+   
+} 
+.casewriting .moduleItemTitBox{
+    width: 160px;
+}
+.casewriting .moduleTitle{
+    color: #3B9ED0;
+}   
+.casewriting{
+    position: relative;
+    box-sizing: border-box;
+    max-height: 65px;
+    overflow: hidden;
+}

Різницю між файлами не показано, бо вона завелика
+ 58 - 0
src/html/caseWriteStandard.html


+ 14 - 0
src/js/caseWriteStandard.js

@@ -0,0 +1,14 @@
+const $ = require("jquery");
+const {getUrlArgObject} = require('./promise.js');
+
+$(function(){
+  let caseWriteStandradList = JSON.parse(getUrlArgObject("caseWriteStandradList")) || {}
+  renderCaseWriteStandrad(caseWriteStandradList)
+  function renderCaseWriteStandrad(list){
+    let str = ``
+    for(let i = 0; i < list.length; i++){
+        str+= `<div>${list[i]}</div>`
+      }
+      $(".content").append(str)
+  }
+})

+ 58 - 36
src/js/cdss.js

@@ -48,6 +48,7 @@ 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})
@@ -193,37 +194,37 @@ function getDisclaimer() {
 }
 
 function renderPage(pageSet){
-  if(!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)
-    if(!mrId){
-      empty()
-      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)
+  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(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(needPushWarning){
+      renderPushWarning()
+      allInterface++
+    }
+    if(needWriteStandardPush){
+      renderWriteStandard()
+      allInterface++
     }
+  }
 }
 
 function renderPushData(){
@@ -238,7 +239,9 @@ function renderPushData(){
       let checkupPush = result.vital ||[]
       let medicinesPush = result.medicines || []
       let operationsPush = result.operations ||[]
-      let generaTreatPush = result.generaTreat ||[]
+      let treatPush = result.treat&&result.treat[0] ||{}
+      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}]
@@ -248,7 +251,7 @@ function renderPushData(){
       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 generaTreatNum = $(".moduleItem.generaTreat").attr("data-num") || 5
+     
 
       renderLis(lisPush,lisNum,3,true)
       renderPacs(pacsPush,pacsNum,5,true)
@@ -257,7 +260,7 @@ function renderPushData(){
       renderDiag(diagPush)
       renderMedicinesPush(medicinesPush,medicinesNum,2,true)
       renderOperationPush(operationsPush,operationsNum,6,true)
-      rendergeneraTreatPush(generaTreatPush,generaTreatNum,6,true)
+      rendergeneraTreatPush(generaTreatPush)
       if(hasCompleteTnterface === allInterface){
         $('.loading').css("display","none")
         if(moduleNum === 0){ 
@@ -271,7 +274,7 @@ function renderPushData(){
 }
 
 function isNeedPush(list){
-  let pushCode = ["diag","lis","pacs","symptom","vital","generaTreat","medicines"]
+  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"){
@@ -469,14 +472,22 @@ function renderSymptomPush(list,showNum,type,hasInfo){
   }
  
 }
-function rendergeneraTreatPush(list,showNum,type,hasInfo){
-  $(".moduleItem.general").append(titleStr('generaTreatPush'))
+function rendergeneraTreatPush(list){
 
-  if(list.length > 0 &&  $(".moduleItem.general").length > 0){
+
+  if(list&&  $(".moduleItem.general").length > 0){
+    $(".moduleItem.general").append(titleStr('generaTreatPush'))
     moduleNum++
-    let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
-    $(".moduleItem.general").append(shortStr).append(longStr)
+    let str = `<div class="generalTreatInfo clearfix isOverFlow">"一般治一般治疗测试一般治疗测试一般治疗测试一般治疗测试一般治疗测试一般治疗测试一般治疗测试一般治疗测试一般治疗测试一般治"${list}</div>`
+    $(".moduleItem.general").append(str)
     $(".moduleItem.general").css("display","block")
+    let generaTreatHei = $(".moduleItem .generalTreatInfo")[0].scrollHeight
+    console.log("generaTreatHei",generaTreatHei)
+    if(generaTreatHei > 65){
+      $(".moduleItem .generalTreatInfo").append(`<span class="showMoreGeneralTreat">更多<img class="iconArrowImg" src="${iconArrowDown}"></span>`)
+      $(".moduleItem .generalTreatInfo").append(`<span class="showLessGeneralTreat">收起<img class="iconArrowImg" src="${iconArrowUp}"></span>`)
+      bindGeneralSlide()
+    }
   }
  
 }
@@ -627,6 +638,17 @@ function getModuleShow(moduleClassName){
     $(`.${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 empty(){
   $(".responsibility").css("display","none")

+ 71 - 6
src/js/cdssHorizontal.js

@@ -40,6 +40,7 @@ let planCode = getUrlArgObject('planCode') || 'all'
 let hospitalIdUrl = getUrlArgObject('hospitalId') || ''
 let msg;
 let tipsMsg;
+let caseWriteStandradList;
 
 function getMRInfo() {
   return post(config.getMr2,{mrId:mrId})
@@ -55,6 +56,9 @@ function getPushInfo() {
 function getPusgWarning(){
   return  post(config.indicationPush,Object.assign({},msg,{ruleType: '1,2,3',hospitalId:hospitalIdUrl||msg.hospitalId}))
 }
+function getWriteStandardPush(){
+  return  post(config.caseWritingPrompt,Object.assign({},msg,{hospitalId:hospitalIdUrl||msg.hospitalId}))
+}
 
 if(mrId){
   Promise.all([getConf(),getMRInfo()]).then(([res1,res2])=>{
@@ -75,6 +79,9 @@ if(mrId){
 }
 
 function renderPage(pageSet){
+  if(!pageSet || !pageSet.sysSetInfo){
+    return
+  }
   renderTab(pageSet.sysSetInfo)
   const iframeHei = $(".bodyWrap").height()
   const tabHei = $(".tabList").height()
@@ -86,6 +93,7 @@ function renderPage(pageSet){
     renderModuleWrapper(hasAuxiliary.planDetails)
     let needPush = isNeedPush(hasAuxiliary.planDetails)
     let needPushWarning = isNeedPushWarning(hasAuxiliary.planDetails)
+    let needWriteStandardPush = isNeedwriteStandardPush(hasAuxiliary.planDetails)
     if(needPush || needPushWarning){
       renderPushData()
       allInterface++
@@ -94,6 +102,10 @@ function renderPage(pageSet){
       renderPushWarning()
       allInterface++
     }
+    if(needWriteStandardPush){
+      renderCaseWrite()
+      allInterface++
+    }
   }
  }
  function renderTab(tabList){
@@ -146,7 +158,9 @@ function isNeedPush(list){
   let pushCode = ["diag","lis","pacs","symptom","vital"]
   for(let i = 0; i < list.length; i++){
     if(pushCode.indexOf(list[i].code)>-1){
-      return true
+      if(list[i].status == "1"){
+        return true
+      }
     }
   }
   return false
@@ -155,11 +169,24 @@ function isNeedPush(list){
   let pushCode = ["tips"]
   for(let i = 0; i < list.length; i++){
     if(pushCode.indexOf(list[i].code)>-1){
-      return true
+      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")
@@ -183,8 +210,27 @@ function isNeedPush(list){
     $(".tabList .tab .tabName").eq(i).css("marginTop",-tabNameHei/2+"px")
    }
  }
-
- function renderPushData(){
+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
+        console.log('casewritingHei',casewritingHei)
+        if(casewritingHei > 81){
+          $(".casewriting").append(`<span class="showMoreCaseWrite">更多</span>`)
+          caseWriteStandradList = caseWritePush
+          showMoreCaseWrite()
+        }
+      }
+    }
+  })
+}
+function renderPushData(){
   return getPushInfo().then(res =>{
     hasCompleteTnterface++
     if(res.data.code == "0"){
@@ -196,6 +242,7 @@ function isNeedPush(list){
       let checkupPush = result.vital ||[]
       let medicinesPush = result.medicines || []
       let operationsPush = result.operations ||[]
+   
       // 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}]
@@ -351,6 +398,19 @@ function renderWarningDiag(list,name,showNum){
     $('.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")
+  }
+}
+
 function renderPushWarning(){
   return getPusgWarning().then(res =>{
     hasCompleteTnterface++
@@ -474,10 +534,15 @@ function bindSlide(){
   })
 }
 function showMoreNewPage(){
-[]
   $(".showMoreNewPage").on("click", function(){
     // openNewWin(`smartAlert.html?billMsgList=${encodeURIComponent(billMsgList)}&highRiskList=${encodeURIComponent(highRiskList)}&criticalValList=${encodeURIComponent(criticalValList)}&noteList=${encodeURIComponent(noteList)}`)
-    openNewWin(`smartAlert.html?tipsMsg=${encodeURIComponent(JSON.stringify(tipsMsg ))}`)
+    openNewWin(`smartAlert.html?tipsMsg=${encodeURIComponent(JSON.stringify(tipsMsg))}`)
+  })
+}
+function showMoreCaseWrite(){
+  $(".showMoreCaseWrite").on("click", function(){
+    // openNewWin(`smartAlert.html?billMsgList=${encodeURIComponent(billMsgList)}&highRiskList=${encodeURIComponent(highRiskList)}&criticalValList=${encodeURIComponent(criticalValList)}&noteList=${encodeURIComponent(noteList)}`)
+    openNewWin(`caseWriteStandard.html?caseWriteStandradList=${encodeURIComponent(JSON.stringify(caseWriteStandradList))}`)
   })
 }
 

+ 6 - 1
src/js/promise.js

@@ -208,7 +208,7 @@ const titleConfig = {
   },
   generaTreatPush:{
     background: "#E3FEFE",
-    icon: iconOperationPush,
+    icon: iconTreat,
     name:"一般治疗"
   },
   casewritingPush:{
@@ -272,6 +272,11 @@ const titleConfigH = {
     background: "#FFE8DD",
     icon: iconTreat,
     name:"治疗方案"
+  },
+  casewritingPush:{
+    background: "#E3FEFE",
+    icon: iconTreat,
+    name:"病历书写规范提示"
   }
 }
 module.exports = {

+ 14 - 0
webpack.config.js

@@ -23,6 +23,7 @@ module.exports = {
     cdss: path.resolve(__dirname, 'src/js', 'cdss.js'),
     cdssHorizontal: path.resolve(__dirname, 'src/js', 'cdssHorizontal.js'),
     smartAlert: path.resolve(__dirname, 'src/js', 'smartAlert.js'),
+    caseWriteStandard: path.resolve(__dirname, 'src/js', 'caseWriteStandard.js'),
     vendor: 'lodash'// 多个页面所需的公共库文件,防止重复打包带入
   },
   output: {
@@ -61,6 +62,19 @@ module.exports = {
         collapseWhitespace: true //删除空白符与换行符
       }
     }),
+    new HtmlWebpackPlugin({
+      title: '病历书写规范提示',
+      template: path.resolve(__dirname, 'src/html', 'caseWriteStandard.html'),
+      filename: 'caseWriteStandard.html',
+      chunks: ['caseWriteStandard', 'vendor', 'common'],
+      inject: true,
+      hash: true, //防止缓存
+      minify: {
+        removeAttributeQuotes: true, //压缩 去掉引号
+        removeComments: true, //移除HTML中的注释
+        collapseWhitespace: true //删除空白符与换行符
+      }
+    }),
     new HtmlWebpackPlugin({
       title: '病情提示',
       template: path.resolve(__dirname, 'src/html', 'illness.html'),