|
@@ -1,8 +1,8 @@
|
|
|
(function ($) {
|
|
|
var urls = {
|
|
|
- 'host':"/icss-web",
|
|
|
//His推送接口
|
|
|
- 'get_push':'http://192.168.2.234:5008/push-web/algorithm/neural'
|
|
|
+ 'get_push':'http://192.168.2.236/api/icss/emr/pushEMR',
|
|
|
+ 'get_info':'http://192.168.2.236/api/icss/emr/getIntroduceByEMR'
|
|
|
};
|
|
|
$.support.cors = true;
|
|
|
var config = {
|
|
@@ -28,13 +28,8 @@
|
|
|
};
|
|
|
|
|
|
function handleConfig(){
|
|
|
- $("tr td:last-child,.item-box").css({width:config.width});
|
|
|
+ $("tr td:last-child").css({width:config.width});
|
|
|
$('.'+config.mode).show();
|
|
|
- $('.item-box:visible:first td:first').attr('rowspan',config.models.length);
|
|
|
- //显示对应项目
|
|
|
- config.models.map((it)=>{
|
|
|
- $('.'+config.mode+" .box"+it).show();
|
|
|
- });
|
|
|
}
|
|
|
function getPushData(){
|
|
|
var url = urls.get_push;
|
|
@@ -43,21 +38,25 @@
|
|
|
past: urlSearch.pastJson||"",
|
|
|
other: urlSearch.otherJson||"",
|
|
|
vital: urlSearch.vitalsJson||"",
|
|
|
- lis: urlSearch.labsJson||"",
|
|
|
+ lis: JSON.parse(urlSearch.labsJson||null),
|
|
|
pacs: urlSearch.pacsJson||"",
|
|
|
diag: urlSearch.disJson||"",
|
|
|
- featureType: config.models.join(",")
|
|
|
+ featureType: config.models.join(","),
|
|
|
+ hosCode:'A001',
|
|
|
+ age:urlSearch.age,
|
|
|
+ sex:urlSearch.sexType
|
|
|
};
|
|
|
|
|
|
$.ajax({
|
|
|
url: url,
|
|
|
type:'post',
|
|
|
dataType: "json",
|
|
|
+ cache:false,
|
|
|
contentType:"application/json",
|
|
|
data:JSON.stringify(myParam),
|
|
|
success:function(response){
|
|
|
var data = response.data;
|
|
|
- if(response.ret=='0'){
|
|
|
+ if(response.code=='0'){
|
|
|
fillPushData(data);
|
|
|
}
|
|
|
},
|
|
@@ -70,42 +69,87 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ function getTreatInfo(type,name){
|
|
|
+ var url = urls.get_info;
|
|
|
+ var myParam = {
|
|
|
+ icdCode:urlSearch.icd,
|
|
|
+ type:type,
|
|
|
+ name:name,
|
|
|
+ detailName:'白蛋白(Alb)',
|
|
|
+ hosCode:'A001',
|
|
|
+ age:urlSearch.age,
|
|
|
+ sex:urlSearch.sexType
|
|
|
+ };
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ url: url,
|
|
|
+ type:'post',
|
|
|
+ dataType: "json",
|
|
|
+ cache:false,
|
|
|
+ contentType:"application/json",
|
|
|
+ data:JSON.stringify(myParam),
|
|
|
+ success:function(response){
|
|
|
+ var data = response.data;
|
|
|
+ if(response.code=='0'){
|
|
|
+ fillInfomation(data);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error:function(error){
|
|
|
+ console.log("error:"+error);
|
|
|
+ },
|
|
|
+ complete:function(){
|
|
|
+ console.log("complete")
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ //填入提示信息
|
|
|
+ function fillInfomation(data){
|
|
|
+ var dom='';
|
|
|
+ for(var i=0;i<data.length;i++){
|
|
|
+ dom+='<div class="info-item clearfix"><span class="title">'+data[i].title+':</span><p class="content">'+data[i].text+'</p></div>';
|
|
|
+ }
|
|
|
+ $(".box0 .item-content").html(dom);
|
|
|
+ }
|
|
|
+
|
|
|
//填入推送信息
|
|
|
function fillPushData(data){
|
|
|
- var maps = {1:'symptom',4:'vitals',5:'labs',6:'pacs',7:'dis',};
|
|
|
if(!data||JSON.stringify(data)=='{}'){
|
|
|
console.warn("获取推送数据为空!");
|
|
|
return ;
|
|
|
}
|
|
|
var key='',modeClass='.'+config.mode;
|
|
|
- config.models.map((it)=>{
|
|
|
- key = maps[it];
|
|
|
- var arr = [];
|
|
|
- for(var n = 0;n <data[key].length; n++){
|
|
|
- arr.push(data[key][n].featureName);
|
|
|
- }
|
|
|
- mapItem(modeClass+" .box"+it+' .item-content', arr);
|
|
|
+ mapItem(modeClass+" .box5", data['lisList'],5); //化验
|
|
|
+ mapItem(modeClass+" .box6", data['pacsList'],6); //辅捡
|
|
|
+ data['dis']['可能诊断'].length>0&&mapItem(modeClass+" .box7", data['dis']['可能诊断'],7); //初步诊断
|
|
|
+ data['dis']['确诊'].length>0&&mapItem(modeClass+" .box8", data['dis']['确诊'],7); //疑似诊断
|
|
|
+ data['dis']['警惕'].length>0&&mapItem(modeClass+" .box9", data['dis']['警惕'],7); //警惕
|
|
|
+
|
|
|
+ $("a.info").click(function(e){
|
|
|
+ getTreatInfo($(e.target).attr('type'),$(e.target).attr('name'))
|
|
|
});
|
|
|
+
|
|
|
//$(modeClass+" .box .item-content").html(str); //治疗建议
|
|
|
}
|
|
|
//遍历数据
|
|
|
- function mapItem(dom,item){
|
|
|
+ function mapItem(dom,item,type){
|
|
|
var itemDom = '';
|
|
|
for(var i=0;i<item.length;i++){
|
|
|
if(i>config.num-1){
|
|
|
- itemDom += '<a href="##" class="hide">'+item[i]+'</a>';
|
|
|
+ itemDom += '<span style="white-space:nowrap"><a href="##" class="hide">'+item[i]+'</a><a class="info hide" target="_blank name="'+item[i]+'" type='+type+'>i</a></span>';
|
|
|
}else{
|
|
|
- itemDom += '<a href="##">'+item[i]+'</a>';
|
|
|
+ itemDom += '<span style="white-space:nowrap"><a href="##">'+item[i]+'</a><a class="info" target="_blank" name='+item[i]+' type="'+type+'">i</a></span>';
|
|
|
}
|
|
|
}
|
|
|
- $(dom).html(itemDom||"无");
|
|
|
+ $(dom+" .item-content").html(itemDom||"无");
|
|
|
+ $(dom).show();
|
|
|
var hide = $(dom).find(".hide")[0];
|
|
|
if(hide){
|
|
|
$("<a class='more'>...</a>").insertBefore(hide);
|
|
|
$(".more").click(function(e){
|
|
|
$(e.target).siblings(".hide").removeClass("hide");
|
|
|
$(e.target).hide();
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
})(jQuery);
|