Selaa lähdekoodia

病历书写规范提示竖版

zhangxc 4 vuotta sitten
vanhempi
commit
8dbed8eaef
8 muutettua tiedostoa jossa 102 lisäystä ja 20 poistoa
  1. 1 0
      package.json
  2. 4 0
      src/css/cdss.less
  3. 2 2
      src/css/cdssHorizontal.less
  4. 79 11
      src/js/cdss.js
  5. 4 3
      src/js/cdssHorizontal.js
  6. 8 2
      src/js/promise.js
  7. 3 1
      src/js/smartAlert.js
  8. 1 1
      webpack.config.js

+ 1 - 0
package.json

@@ -4,6 +4,7 @@
   "description": "",
   "main": "index.js",
   "dependencies": {
+    "babel-polyfill": "^6.26.0",
     "bluebird": "^3.5.5",
     "es3ify-loader": "^0.2.0",
     "jquery": "^1.12.4",

+ 4 - 0
src/css/cdss.less

@@ -373,4 +373,8 @@ body{
 }
 .new-icon .newIcon{
     display: inline-block;
+}
+.casewritingWrapper{
+    padding: 0 15px;
+    line-height: 31px;
 }

+ 2 - 2
src/css/cdssHorizontal.less

@@ -252,7 +252,7 @@
 .diag .moduleBoxName{
     position: absolute;
     left: 0;
-    font-size: 14px;
+    font-size: 12px;
     color:#1E1E1E;
     background: #E2EAF2;
     border: 0px;
@@ -290,4 +290,4 @@
     width: 13px;
     position: relative;
     top: 2px;
-}
+}

+ 79 - 11
src/js/cdss.js

@@ -89,11 +89,15 @@ function getConf() {
 }
 
 function getPushInfo() {
-  return  post(config.pushInner,Object.assign({},msg,{featureType: '1,4,5,6,7,8,9',hospitalId:hospitalIdUrl||msg.hospitalId,ruleType:config.ruleTypeMap['22']}))
+  return  post(config.pushInner,Object.assign({},msg,{featureType: '1,4,5,6,7,8,9,10',hospitalId:hospitalIdUrl||msg.hospitalId,ruleType:config.ruleTypeMap['22']}))
   
 }
 function getPusgWarning(){
-  return  post(config.indicationPush,Object.assign({},msg,{ruleType: '1,2,3',hospitalId:hospitalIdUrl||msg.hospitalId}))
+  return  post(config.indicationPush,Object.assign({},msg,{ruleType: '1,2,3,4',hospitalId:hospitalIdUrl||msg.hospitalId}))
+}
+
+function getWriteStandardPush(){
+  return  post(config.caseWritingPrompt,Object.assign({},msg,{hospitalId:hospitalIdUrl||msg.hospitalId}))
 }
 
 function getHosptDeptUsal(){
@@ -189,7 +193,9 @@ function getDisclaimer() {
 }
 
 function renderPage(pageSet){
-  console.log("msg",msg)
+  if(!pageSet){
+    return
+  }
     renderTab(pageSet.sysSetInfo)
     const iframeHei = $(".bodyWrap").height()
     const tabHei = $(".tabList").height()
@@ -204,6 +210,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++
@@ -212,6 +219,10 @@ function renderPage(pageSet){
         renderPushWarning()
         allInterface++
       }
+      if(needWriteStandardPush){
+        renderWriteStandard()
+        allInterface++
+      }
     }
 }
 
@@ -227,6 +238,7 @@ function renderPushData(){
       let checkupPush = result.vital ||[]
       let medicinesPush = result.medicines || []
       let operationsPush = result.operations ||[]
+      let generaTreatPush = result.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}]
@@ -236,6 +248,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)
@@ -244,6 +257,7 @@ function renderPushData(){
       renderDiag(diagPush)
       renderMedicinesPush(medicinesPush,medicinesNum,2,true)
       renderOperationPush(operationsPush,operationsNum,6,true)
+      rendergeneraTreatPush(generaTreatPush,generaTreatNum,6,true)
       if(hasCompleteTnterface === allInterface){
         $('.loading').css("display","none")
         if(moduleNum === 0){ 
@@ -257,10 +271,23 @@ function renderPushData(){
 }
 
 function isNeedPush(list){
-  let pushCode = ["diag","lis","pacs","symptom","vital"]
+  let pushCode = ["diag","lis","pacs","symptom","vital","generaTreat","medicines"]
   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
@@ -269,7 +296,9 @@ function isNeedPushWarning(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
@@ -285,11 +314,13 @@ function renderPushWarning(){
       let criticalValList = result.criticalValList || []  //危急值提醒
       let noteList = result.noteList || []  //检查内容注意事项
       let dubugStr = result.dubugStr || []  //注意调试信息
+      let otherList = result.otherList || []  //其他提醒
       $('.moduleItem.tips').append(titleStr('warning'))
       renderBillingPush(billMsgList,'开单合理性提醒')
       renderBillingPush(highRiskList,'高风险提示')
       renderBillingPush(criticalValList,'危急值提醒')
       renderBillingPush(noteList,'检查内容注意事项')
+      renderBillingPush(otherList,'其他提醒')
       moreInfo()
       // renderBillingPush(dubugStr,'注意调试信息')
      
@@ -303,7 +334,36 @@ function renderPushWarning(){
     
   })
 }
-
+function renderWriteStandard(){
+  return getWriteStandardPush().then(res =>{
+    hasCompleteTnterface++
+    if(res.data.code == '0'){
+      const list = res.data.data || {}
+      renderwriteStandardPage(list)
+    }
+    if(hasCompleteTnterface === allInterface){
+      $('.loading').css("display","none")
+      if(moduleNum === 0){
+        empty()
+      }
+    }
+  })
+}
+function  renderwriteStandardPage(list){
+  let arr = Object.keys(list)
+  if(arr.length > 0 &&  $(".moduleItem.casewriting").length > 0){
+    moduleNum++
+    $(".moduleItem.casewriting").append(titleStr("casewritingPush"))
+    let str = ``
+   
+    for(let i = 0; i < arr.length; i++){
+      str += `<p>${arr[i]}</p>`
+    }
+    let allStr = `<div class="casewritingWrapper">${str}</div>`
+    $(".moduleItem.casewriting").append(allStr)
+    $('.moduleItem.casewriting').css("display","block")
+  }
+}
 function renderBillingPush(list,name){
   if(list.length === 0){
     return
@@ -408,6 +468,17 @@ function renderSymptomPush(list,showNum,type,hasInfo){
     $(".moduleItem.symptom").css("display","block")
   }
  
+}
+function rendergeneraTreatPush(list,showNum,type,hasInfo){
+  $(".moduleItem.general").append(titleStr('generaTreatPush'))
+
+  if(list.length > 0 &&  $(".moduleItem.general").length > 0){
+    moduleNum++
+    let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
+    $(".moduleItem.general").append(shortStr).append(longStr)
+    $(".moduleItem.general").css("display","block")
+  }
+ 
 }
 function renderMedicinesPush(list,showNum,type,hasInfo){
   $(".moduleItem.medicine").append(titleStr('drugPush'))
@@ -489,10 +560,7 @@ function renderModuleWrapper(moduleList){
   let moduleStr = ''
   for(let i = 0; i < moduleList.length; i++){
     if(moduleList[i].status !='0'){
-      if(moduleList[i].code == 'treat'){
-        moduleStr += `<div class="moduleItem medicine"  data-num="${moduleList[i].number}" style="display:none"></div>`
-        moduleStr += `<div class="moduleItem operation"  data-num="${moduleList[i].number}" style="display:none"></div>`
-      }else if(moduleList[i].code == 'tips'){
+     if(moduleList[i].code == 'tips'){
         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{

+ 4 - 3
src/js/cdssHorizontal.js

@@ -128,9 +128,8 @@ function renderModuleWrapper(moduleList){
   let moduleStr = '',treatStr=""
   for(let i = 0; i < moduleList.length; i++){
     if(moduleList[i].status !='0'){
-      if(moduleList[i].code == 'treat'){
-        treatStr += `<div class="moduleItem medicine"  data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
-        treatStr += `<div class="moduleItem operation"  data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
+      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>`
       }else if(moduleList[i].code == 'tips'){
         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>`
@@ -362,11 +361,13 @@ function renderPushWarning(){
       let criticalValList = result.criticalValList || []  //危急值提醒
       let noteList = result.noteList || []  //检查内容注意事项
       let dubugStr = result.dubugStr || []  //注意调试信息
+      let otherList = result.otherList || []  //其他提醒
       $('.moduleItem.tips .moduleItemTitBox').append(titleStr('warning'))
       renderBillingPush(billMsgList,'开单合理性')
       renderBillingPush(highRiskList,'高风险提示')
       renderBillingPush(criticalValList,'危急值提醒')
       renderBillingPush(noteList,'检查注意事项')
+      renderBillingPush(otherList,'其他提醒')
       moreInfo()
       if($(".moduleItem.tips")){
         let tipsHei = $(".moduleItem.tips")[0].scrollHeight

+ 8 - 2
src/js/promise.js

@@ -62,6 +62,7 @@ const config = {
   getPushSet:'/sys/plan/getSysPlanInfoDatas', //获取推送配置
   analyse:'/api/data/mrqc/analyse',
   getHosptDeptUsal:'/api/data/concept/getHosptDeptUsal', //获取科室常用标签
+  caseWritingPrompt:'/sys/mrqc/caseWritingPrompt',//病历书写规范提示
   ruleTypeMap:{     //大数据推送参数featureType对应
     '22':'1,2',
     '11':'3',
@@ -205,10 +206,15 @@ const titleConfig = {
     icon: iconOperationPush,
     name:"推荐手术及操作"
   },
-  operationPush2:{
+  generaTreatPush:{
     background: "#E3FEFE",
     icon: iconOperationPush,
-    name:"手术/操作"
+    name:"一般治疗"
+  },
+  casewritingPush:{
+    background: "#E3FEFE",
+    icon: iconOperationPush,
+    name:"病历书写规范提示"
   }
 }
 const titleConfigH = {

+ 3 - 1
src/js/smartAlert.js

@@ -7,11 +7,13 @@ $(function(){
   let billMsgList = tipsMsg.billMsgList || []
   let highRiskList = tipsMsg.highRiskList || []
   let criticalValList = tipsMsg.criticalValList || []
-  let noteList = tipsMsg.noteList || 
+  let noteList = tipsMsg.noteList || []
+  let otherList = tipsMsg.otherList || []  //其他提醒
   renderBillingPush(billMsgList,'开单合理性')
   renderBillingPush(highRiskList,'高风险提示')
   renderBillingPush(criticalValList,'危急值提醒')
   renderBillingPush(noteList,'检查注意事项')
+  renderBillingPush(otherList,'其他提醒')
   function renderBillingPush(list,name){
     if(list.length === 0){
       return

+ 1 - 1
webpack.config.js

@@ -4,7 +4,7 @@ const CleanWebpackPlugin = require('clean-webpack-plugin') // 清空打包目录
 const MiniCssExtractPlugin = require('mini-css-extract-plugin');
 const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
 const webpack = require('webpack');
-const proxyHost = "http://192.168.2.241:6060";
+const proxyHost = "http://192.168.2.236:6060";
 module.exports = {
   entry: {
     index: path.resolve(__dirname, 'src/js', 'index.js'),