Переглянути джерело

Merge remote-tracking branch 'origin/Icdsnlms220307' into testNew

zhouna 3 роки тому
батько
коміт
d759ed7bcd

+ 18 - 0
src/css/searchStaticList.less

@@ -136,6 +136,24 @@
             margin-bottom: 10px;
         }
     }
+  .icon{
+    border:1px #4F9FF3 solid;
+    color: #4F9FF3;
+    border-radius: 11px;
+    display: inline-block;
+    width: 58px;
+    height: 20px;
+    text-align: center;
+    margin:0 6px 0 20px;
+    &.gicon{
+      border-color:#1ECEBD;
+      color: #1ECEBD;
+    }
+  }
+  .code{
+    color:#999;
+    word-break: break-all;
+  }
     .type {
         border-radius: 3px;
         color: #fff;

+ 139 - 1
src/css/staticInfo.less

@@ -521,4 +521,142 @@
   .name,.age,.sex,.cards{
     border-left: none;
   }
-}
+}
+
+// 胎儿发育指数评估内容
+.computedgs{
+	margin-left:79px;
+	margin-top:35px;
+	.cgs_top{
+		width:100%;
+		margin:0 auto;
+		text-align:center;
+		.l_content{
+			display:inline-block;
+			height: 85px;
+		}
+		.d_inpt{
+			display: inline-block;
+			position: relative;
+			
+		}
+		.yz{
+			position: absolute;
+			top:35px;
+			left:14px;
+			width: 150px;
+		}
+		
+		.gs_x{
+			color: #F45454;
+			margin-top: 5px;
+			margin-right: 4px;
+		}
+		.gs_wz{
+			display: inline-block;
+			height: 32px;
+			line-height: 32px;
+		}
+		
+		.gs_ipt{
+			width: 160px;
+			height: 32px;
+			background: #FFFFFF;
+			border-radius: 4px;
+			border: 1px solid #D8D8D8;
+			margin-left: 16px;
+			padding: 3px;
+			padding-left: 8px;
+			margin-right: 18px;
+			box-sizing: border-box;
+		}
+		.gs_iptq{
+			border-color: #F45454 !important;
+			color: #F45454 !important;
+		}
+		.r_content{
+			display:inline-block;
+			margin-left: 200px;
+			position: relative;
+			height: 85px;
+		}
+		.clearfix:after {
+		  content: "";
+		  display: block;
+		  height: 0;
+		  overflow: hidden;
+		  clear: both;
+		}
+		.c_end{
+			width: 100%;
+			.c_btn{
+				float:right;
+				display:inline-block;
+				cursor: pointer;
+				width: 94px;
+				height: 34px;
+				background: #FFFFFF;
+				border-radius: 8px;
+				border: 1px solid #2A9BD5;
+				text-align:center;
+				line-height:34px;
+				// box-sizing:border-box;
+				color: #2A9BD5;
+			}
+		}
+		.b_content{
+			width: 100%;
+			background: #EDFAFF;
+			border-radius: 10px;
+			margin-top: 15px;
+			.m_w300{
+				margin: auto;
+				width: 30%;
+				margin-top: 20px;
+				margin-bottom: 20px;
+				padding-top: 20px;
+				padding-bottom: 20px;
+				word-break: break-word;
+			}
+			.m_auto{
+				display: inline-block;
+				width: 100%;
+				margin-bottom: 3px;
+				text-align: start;
+			}
+		}
+	}
+	
+}
+.computedgs{
+	.cgs_tops{
+		.l_content{
+			width: 100%;
+			display: inline-block;
+		}		
+		.d_inpt {
+		    display: inline-block;
+		    position: relative;
+		    width: 30%;
+			
+		}		
+		.gs_wzs{
+			margin-right: 16px;
+		}		
+		.gs_wzl{
+			margin-left: 16px;
+		}		
+		.gs_ipt{
+			margin: 0px;
+			width: 100%;
+		}		
+		.r_content{
+			width: 100%;
+			display: inline-block;
+			margin-left: 0px ;
+		}		
+		.yz{
+			left:0px;
+		}
+	}
+}

+ 67 - 2
src/css/staticSearch.less

@@ -93,17 +93,82 @@ html{
     border-bottom: 1px #EFEFEF solid;
     line-height: 32px;
     padding-top: 5px;
-    cursor: pointer;
+    .diag-name{
+        color: #333;
+        font-size: 14px;
+        display: inline-block;
+        width: 92%;
+        cursor: pointer;
+    }
+    .code-slide{
+        display: inline-block;
+        cursor: pointer;
+        width: 10px;
+        height: 7px;
+        background: url("../images/icon_arrow_up.png") no-repeat;
+        background-size: cover;
+        margin-bottom: 0;
+    }
+    &.hide-codes{
+        .codeDiv{
+            display: none;
+        }
+        .code-slide{
+            background: url("../images/icon_arrow_down.png") no-repeat;
+            background-size: cover;
+        }
+    }
 }
 .staticSearchB ul li:hover {
-    border-bottom: 2px solid #3B9ED0;
+    border-bottom: 2px solid #3589FF;
 }
 .staticSearchB ul  p{
+    position: relative;
     color: @fontClr;
+    font-weight: bold;
+    img{
+        position: absolute;
+        right: 2px;
+        bottom: 10px;
+    }
+}
+.staticSearchB .codeDiv{
+    background: #EAEDF1;
+    padding: 10px;
+    margin-bottom: 10px;
+    p,span{
+        color: #444;
+        font-size: 14px;
+        font-weight: normal;
+        line-height: 22px;
+    }
+    td{
+        vertical-align: top;
+        line-height: 20px;
+    }
+    .type-icon{
+        border:1px #4F9FF3 solid;
+        color: #4F9FF3;
+        border-radius: 11px;
+        display: inline-block;
+        width: 58px;
+        height: 22px;
+        text-align: center;
+        margin-right: 6px;
+        &.type-l{
+            border-color:#1ECEBD;
+            color: #1ECEBD;
+        }
+    }
+    .type-code{
+        color:#999;
+        word-break: break-all;
+    }
 }
 .staticSearchB ul i {
     font-size: 14px;
     color: @linkColor;
+    font-weight: normal;
 }
 .staticSearchB .tip {
     font-size: 16px;

+ 1 - 0
src/index.js

@@ -3,6 +3,7 @@ require('./css/reset.css');
 require('./css/popup.css');
 require('./js/popup');
 const $ = require("jquery");
+
 const { post,config,getUrlArgObject } = require('./js/promise.js');
 
 const {bqtsFun,ybzlFun,cyywFun,knzdFun,jtFun,tjwzFun,tjtgFun,tjhyFun,tjfjFun,yszdFun} = require('./js/indexDom.js');

+ 15 - 1
src/js/cdss.js

@@ -459,7 +459,21 @@ function renderBillingPush(list, name, code) {
       </div>`
   $("." + code).append(boxStr)
   $('.moduleItem.' + code).addClass("tips").css("display", "block")
-
+  //输血后血常规提醒,传参给his
+  $(".otherremind .billingPushItem:contains('输血完成后,请及时复查血常规')").css("cursor","pointer").click(()=>{
+    window.parent.postMessage({
+	  "mrn": msg.mrn, //病历号  getMr返回-技术服务返回
+	  "series": msg.series, //就诊次数
+	  "orders": [
+		{
+		  "type": 1,
+		  "orders": [
+			'输血(血小板)'
+		  ]
+		}
+	  ]
+	},'*')
+  })
 }
 
 //更新消息个数

+ 1 - 1
src/js/promise.js

@@ -88,7 +88,7 @@ const config = {
   staticSearch:'/kl/conceptInfo/staticIndexPage', //检索静态知识
 }
 const isLocal = window.location.hostname.indexOf('localhost') !=-1;
-const imageUrlPrefix = isLocal ?'http://172.17.14.242:82':'http://223.93.170.82:12282';
+const imageUrlPrefix = isLocal ?'http://172.17.14.242:82':'http://192.168.2.121:82';//'http://223.93.170.82:12282';
 // const getUrlArgObject = function(parm) {  
 //   var query = decodeURI(window.location.search);
 //   var args = qs.parse(qs.parse(query.substr(1)));

+ 4 - 3
src/js/searchStaticList.js

@@ -106,9 +106,10 @@ function renderList(tabList){
                 <div>
                     <span class="type">${item.typeName}</span>
                     <span class="drug">${item.name}</span>
-                    ${item.code ?`<span class="code">${item.code}</span>`:''}
-                </div>
-                ${item.retrievalName?`<div class="same">同义词:<span>${item.retrievalName}</span></div>`:''}
+                    ${item.code ?`<span class="icon">医保版</span><span class="name">${item.name}</span><span class="code">${item.code}</span>`:''}
+                    ${item.guocode ?`<span class="icon gicon">国临版</span><span class="name">${item.guoname}</span><span class="code">${item.guocode}</span>`:''}
+					</div>
+${item.retrievalName?`<div class="same">同义词:<span>${item.retrievalName}</span></div>`:''}
                 <div class="content">
                     <p>${item.abstractContent ? item.abstractContent : ''}</p>
                 </div>

+ 142 - 1
src/js/staticInfo.js

@@ -56,7 +56,8 @@ function getInfomation() {
       return;
     }
     var detailList = data.details
-    var scale = data.scale
+    var isCalculate = data.id===179208;   //是否是写死的计算公式
+    var scale = data.scale||isCalculate;
     var staticKnowList = detailList['静态知识']
     var noticeInfo = detailList['注意事项']
     var clinicalPathwayInfo = detailList['临床路径']
@@ -69,6 +70,7 @@ function getInfomation() {
     noticeInfo && renderContent(noticeInfo, 'notice')
     clinicalPathwayInfo && renderContent(clinicalPathwayInfo, 'clinicalPathway')
     scaleInfo && renderContentscale(scaleInfo, 'scale', name)
+	isCalculate && renderCalculate();
     $('.content img').bind('contextmenu', function () {
       return false
     })
@@ -118,7 +120,146 @@ function renderContent(list, contentWrapClassName) {
   adjustHeight();
   adjustWidth()
 }
+//计算公式写死
+function renderCalculate(){
+	let str;
+	str=`<div class='computedgs'>
+			<div class='cgs_top'>
+				<div class='l_content'>
+					<label class='gs_x'>*</label><label class="gs_wz gs_wzs">宫高</label>
+					<div class='d_inpt'>
+						<input type="text"  name="username" placeholder="请输入" class="gs_ipt" autocomplete="off"  id='ipt1'  maxlength='5'>
+						<label class='yz l_yz' style="color:red;display:none;">格式错误,请输入数字</label>
+					</div>
+					<label class="gs_wz  gs_wzl">cm</label>
+					
+				</div>
+				<div class='r_content'>
+					<label class='gs_x'>*</label><label class="gs_wz gs_wzs">孕月</label>
+					<div class='d_inpt'>
+						<input type="text" name="username" placeholder="请输入" class="gs_ipt" id='ipt2' autocomplete="off" maxlength='3'>
+						<label class='yz r_yz' style="color:red;display:none;">格式错误,请输入数字</label>
+					</div>
+					<label class="gs_wz  gs_wzl">月</label>
+				</div>
+				<div class='c_end clearfix'>
+					<span class="c_btn">结果</span>
+				</div>
+				<div class='b_content'>
+					<div class="m_w300">
+						<p class='b_end m_auto'>结果:<p>
+						<p class='m_auto'>胎儿发育指数=宫高(cm)-3*(孕月+1) <p>
+						<p class='m_auto'>正常值范围:指数在-3与+3之间为正常儿,低于-3则有FGR的可能<p>
+					<div>
+				<div>
+			</div>	
+		</div>`;
+	
+	let gongGao='';   //宫高
+	let pregnant='';  //孕月
+	let flagGongGao=false;  // 判断宫高是否有值
+	let flagPregnant=false; //判断宫高孕月是否有值
+	let endNum='';    //结果
+	$('.infos-box').append(str);
+	// 输入判断是否为数字
+	function numCheck(val,node1,node2,flag){
+		// val=val.trim()
+		val=val.replace(/^\s+|\s+$/g,"");
+		let regs = new RegExp("^[0-9]*$");
+		if(!regs.test(val)|| !val){
+			$(node1).show()
+			$(node1).text('格式错误,请输入数字')
+			$(node1).css({width:'150px'})
+			$(node2).addClass("gs_iptq");
+			flag=false;
+			return flag
+		}else{
+			$(node1).hide()
+			$(node2).removeClass("gs_iptq");
+			flag=true;
+			return flag
+		}
+	}
+	// 宫高输入验证
+	$('#ipt1').blur(function(){
+		let val=this.value
+		gongGao=val
+		flagGongGao=numCheck(val,'.l_yz','#ipt1',flagGongGao)
+	})
+	// 孕月输入验证
+	$('#ipt2').blur(function(){
+		let val=this.value
+		pregnant=val
+		flagPregnant=numCheck(val,'.r_yz','#ipt2',flagPregnant)
+	})
+	// 点击结果
+	$('.c_btn').click(function(){
+		// 宫高没有输入
+		if(!gongGao&&pregnant){
+			$('.l_yz').show()
+			$('.l_yz').text('请输入宫高')
+			$('.l_yz').css({width:'85px'})
+			$('.r_yz').css({width:'150px'})
+		}else if(!pregnant && gongGao){
+			// 孕月没有输入
+			$('.r_yz').text('请输入孕月')
+			$('.r_yz').show()
+			$('.r_yz').css({width:'85px'})
+			$('.l_yz').css({width:'150px'})
+			
+		}else if(!gongGao && !pregnant){
+			// 宫高孕月没有输入
+			$('.r_yz').text('请输入孕月')
+			$('.l_yz').text('请输入宫高')
+			$('.r_yz').show()
+			$('.l_yz').show()
+			$('.l_yz').css({width:'85px'})
+			$('.r_yz').css({width:'85px'})
+		}else{
+			// 改变验证定位的位置
+			$('.l_yz').css({width:'150px'})
+			$('.r_yz').css({width:'150px'})
+		}
+		if(flagPregnant&&flagGongGao){
+			endNum=gongGao-3*(pregnant*1+1); //结果计算
+			// 将值显示在页面上
+			let str1=`<span class="end_child"><span>结果:胎儿发育指数</span><span class='end_ys'>${endNum}</span></span>`
+			$('.b_end').text('')
+			$('.b_end').append(str1)
+			// 颜色区分正常和不正常
+			// if(endNum<-3 ||endNum>3){
+			// 	$('.end_ys').css({
+			// 		color:'#F45454'
+			// 	})
+			// }else{
+			// 	$('.end_ys').css({
+			// 		color:'#333'
+			// 	})
+			// }
+		}else{
+			// 移除
+			if($('.end_child').length>0){
+				$('.end_child').remove()
+				$('.b_end').text('结果:')
+			}
+			
+		}
+	})	
+	// 适配改变样式
+	function Adaptation(){
+		let widths=$(document).width();
+		if(widths<=1025) {
+			$('.cgs_top').addClass('cgs_tops')
+		}else{
+			$('.cgs_top').removeClass('cgs_tops')
+		}
+	}
+	Adaptation()
+	$(window).bind('load resize',Adaptation)		
+	
+}
 
+//量表评估内容
 function renderContentscale(list, contentWrapClassName, name) {
   var pushInfo = []
   var textType = []

+ 36 - 9
src/js/staticSearch.js

@@ -6,6 +6,8 @@ let checkOffImg = require('./../images/check_off.png')
 let checkOnImg = require('./../images/check_on.png')
 require('./../images/empty3.png').replace( /undefined/g, '')
 require('./../images/icon_search.png').replace( /undefined/g, '')
+require('./../images/icon_arrow_down.png').replace( /undefined/g, '')
+require('./../images/icon_arrow_up.png').replace( /undefined/g, '')
 
 let searchType = getUrlArgObject("searchType") || ""
 
@@ -125,10 +127,33 @@ function getKnowledgeData(value) {
             var lisStr = ''
             if(knowledgeLis&&knowledgeLis.length>0){
                 for(var i = 0;i<knowledgeLis.length;i++){
-                    var tmpPart = knowledgeLis[i]
-                    var tmpLi = `<li data-name='${tmpPart.name}' data-uname='${tmpPart.uniqueName}' data-type='${tmpPart.libTypeId}' data-sign='${tmpPart.type}'>
-                        <p>${tmpPart.name}<i>${tmpPart.typeName?(' ( '+tmpPart.typeName+' )'):''}</i> <span>${tmpPart.code||''}</span></p>
+                    var tmpPart = knowledgeLis[i];
+				    var ynameDom = tmpPart.code?`<tr>
+                                                    <td rowspan="2" width="65"><span class="type-icon">医保版</span></td>
+                                                      <td><span title="${tmpPart.name}">${tmpPart.name}</span></td>
+                                                  </tr>
+                                                  <tr>
+                                                    <td>
+                                                    <span title="${tmpPart.code}" class="type-code">${tmpPart.code}</span>
+                                                    </td>
+                                                 </tr>`:'';
+				  var gnameDom = tmpPart.guoname||tmpPart.guocode?`<tr>
+                                                    <td rowspan="2"><span class="type-icon type-l">国临版</span></td>
+                                                      <td><span title="${tmpPart.guoname}">${tmpPart.guoname}</span></td>
+                                                  </tr>
+                                                  <tr>
+                                                    <td>
+                                                    <span title="${tmpPart.guocode}" class="type-code">${tmpPart.guocode}</span>
+                                                    </td>
+                                                 </tr>`:'';
+				  var codeDom = ynameDom+gnameDom?`<div class="codeDiv"><table width="100%"><tbody>${ynameDom}${gnameDom}</tbody></table></div>`:"";
+				  var codeIcon = ynameDom+gnameDom?`<span class="code-slide"></span>`:"";
+				  var tmpLi = `<li class="hide-codes" data-name='${tmpPart.name}' data-uname='${tmpPart.uniqueName}' data-type='${tmpPart.libTypeId}' data-sign='${tmpPart.type}'>
+                        <p><span class="diag-name">${tmpPart.name}<i>${tmpPart.typeName?(' ( '+tmpPart.typeName+' )'):''}</i></span>
+                          ${codeIcon}
+                        </p>
                         ${tmpPart.retrievalName?('<span>• '+tmpPart.retrievalName+'</span>'):''}
+                        ${codeDom}
                     </li>`
                     lisStr += tmpLi
                 }
@@ -156,11 +181,11 @@ $(window).on('resize', function(){
     adjustHeight()
 })
 
-$(".staticSearchB ul").on("click","li",function(){
-    const infoMsgName = $(this).attr('data-name')
-    const infoMsgUName = $(this).attr('data-uname')
-    const type = $(this).attr('data-type')
-    const sign = $(this).attr('data-sign')
+$(".staticSearchB ul").on("click","li .diag-name",function(){
+    const infoMsgName = $(this).parents("li").attr('data-name')
+    const infoMsgUName = $(this).parents("li").attr('data-uname')
+    const type = $(this).parents("li").attr('data-type')
+    const sign = $(this).parents("li").attr('data-sign')
     if(type != 48){
         openNewWin(`staticInfo.html?type=${encodeURIComponent(sign)}&position=0&name=${encodeURIComponent(infoMsgName)}`)
         // openNewWin(`information.html?type=${encodeURIComponent(sign)}&position=0&name=${encodeURIComponent(infoMsgName)}&uname=${encodeURIComponent(infoMsgUName)}`)
@@ -173,7 +198,9 @@ $(".staticSearchB ul").on("click","li",function(){
         openNewWin(`scale.html?msg=${encodeURIComponent(JSON.stringify(msg1))}`)
     }
 })
-
+$(".staticSearchB ul").on("click","li .code-slide",function(){
+  $(this).parents("li").toggleClass("hide-codes");
+});
   
 $(".staticSearchT").on('click','#clearKnowledge',function() {
     $(".staticSearchT input").val("")