|
|
|
@ -7,6 +7,8 @@ |
|
|
|
|
var realPath = localhostPaht+projectName; |
|
|
|
|
|
|
|
|
|
var hcData ={};//宏定义
|
|
|
|
|
var tracesData ={};//留痕信息
|
|
|
|
|
var DeEditData;//用于设计时候临时保存DeEdit的变量
|
|
|
|
|
var proceData={ |
|
|
|
|
get : function(x){ |
|
|
|
|
return this.x; |
|
|
|
@ -324,6 +326,9 @@ |
|
|
|
|
emrView._Emr=_Emr; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//emrView.InnerView.ApplyParaLineSpace(3); // 2倍
|
|
|
|
|
|
|
|
|
|
tracesData = data.tracesData; |
|
|
|
|
hcData =data.hcData; |
|
|
|
|
eventData = data.eventDataElement; |
|
|
|
|
var dataByte = new Uint8Array(data.emrContent); |
|
|
|
@ -341,8 +346,13 @@ |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
let evData =data.eventData; |
|
|
|
|
|
|
|
|
|
if(tracesData != undefined) { |
|
|
|
|
emrView.Trace = tracesData[data.emrId]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
emrView.InnerView.SetValue(EmrProp.EmrId, data.emrId);//病历附加属性[病历id]
|
|
|
|
|
if(type=="new"){ |
|
|
|
|
emrView.InnerView.SetValue(EmrProp.EmrId, data.emrId);//病历附加属性[病历id]
|
|
|
|
|
emrView.InnerView.SetValue(EmrProp.QCR, data.qcr);//新建病历的人【起草人】
|
|
|
|
|
emrView.InnerView.SetValue(EmrProp.Choscode, data.choscode);//医院编码
|
|
|
|
|
emrView.InnerView.SetValue(EmrProp.EditorType, data.editortype);//护士还是医生写的。
|
|
|
|
@ -362,8 +372,15 @@ |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var sectionData =data.sectionData; |
|
|
|
|
for(prop in sectionData){ |
|
|
|
|
emrView.SetDeGroupByText(prop, sectionData[prop]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}finally{ |
|
|
|
|
//alert('ddd');
|
|
|
|
|
emrView.InnerView.DeleteAllProcMark();//把病程标识清除掉
|
|
|
|
|
if(data.type=="newrecord"){ |
|
|
|
|
//save病历
|
|
|
|
|
var sectionData =data.sectionData; |
|
|
|
@ -506,7 +523,7 @@ |
|
|
|
|
//save病历
|
|
|
|
|
var steamData = emrView.SaveToBytes(); |
|
|
|
|
var emrData = new EmrToWatData("B","saveEMRByte",steamData); |
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),false); |
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),true); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -515,6 +532,10 @@ |
|
|
|
|
"emrShowInit": function(data){ |
|
|
|
|
// emrView.Clear();
|
|
|
|
|
emrView.ReadOnly=false; |
|
|
|
|
var zoom = data.zoom; |
|
|
|
|
if(zoom != null) { |
|
|
|
|
emrView.InnerView.Zoom = parseFloat(zoom); |
|
|
|
|
} |
|
|
|
|
if(data.emrContent&&data.emrContent.length>0){ |
|
|
|
|
var dataByte = new Uint8Array(data.emrContent); |
|
|
|
|
emrView.LoadFromBytes(dataByte); |
|
|
|
@ -528,16 +549,27 @@ |
|
|
|
|
// console.log("emrInit:"+JSON.stringify(data));
|
|
|
|
|
// console.log(data.emrContent);
|
|
|
|
|
try{ |
|
|
|
|
|
|
|
|
|
// debugger;
|
|
|
|
|
var _EmrEditor={}; |
|
|
|
|
|
|
|
|
|
var _Emr ={}; |
|
|
|
|
|
|
|
|
|
var zoom = data.zoom; |
|
|
|
|
if(zoom != null) { |
|
|
|
|
emrView.InnerView.Zoom = parseFloat(zoom); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
emrView._EmrEditor=_EmrEditor; |
|
|
|
|
emrView._Emr=_Emr; |
|
|
|
|
|
|
|
|
|
_EmrEditor[EmrEditor.USER]=data._user;//非序列化属性【当前医生id】
|
|
|
|
|
_EmrEditor[EmrEditor.USERNAME]=data._username; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var dataByte = new Uint8Array(data.emrContent); |
|
|
|
|
hcData =data.hcData; |
|
|
|
|
|
|
|
|
|
tracesData = data.tracesData; |
|
|
|
|
|
|
|
|
|
if (dataByte.length > 0) { // 模板有内容,创建病历
|
|
|
|
|
emrView.BeginUpdate(); // 开启批量更新,提高效率
|
|
|
|
|
try { |
|
|
|
@ -547,7 +579,7 @@ |
|
|
|
|
var vPropertys = ""; //
|
|
|
|
|
emrView.InsertProc(data.emrId, vPropertys, ""); // 插入病程标识
|
|
|
|
|
emrView.EditProcIndex = data.emrId; // 当前可编辑病程为新病程的唯一ID(字符型)
|
|
|
|
|
proceData.set("DE09.00.053.00",data.operatortime); |
|
|
|
|
// proceData.set("DE09.00.053.00",data.operatortime);
|
|
|
|
|
if (vFirstProc) { // 是病历首次新建内容,需要加载页眉页脚
|
|
|
|
|
emrView.LoadHeaderFromBytes(dataByte, true); // true加载纸张大小和页边距
|
|
|
|
|
emrView.LoadFooterFromBytes(dataByte, false); |
|
|
|
@ -559,8 +591,9 @@ |
|
|
|
|
} finally { |
|
|
|
|
emrView.EndUpdate(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
emrView.EditProcIndex = data.EditProcIndex;//
|
|
|
|
|
emrView.ScrollToProc(emrView.EditProcIndex); // 滚动到新建的病程位置,便于书写
|
|
|
|
|
emrView.Trace = tracesData[data.EditProcIndex];//设置当前病程块的留痕信息
|
|
|
|
|
} |
|
|
|
|
//save病历
|
|
|
|
|
var sectionData =data.sectionData; |
|
|
|
@ -573,10 +606,15 @@ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var InsertProc = data.InsertProc; |
|
|
|
|
if(InsertProc != null && InsertProc != '') { |
|
|
|
|
var emrData = new EmrToWatData("S","insertProc2",null); |
|
|
|
|
watEvents.emrToWatEvent(emrData); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}finally{ |
|
|
|
|
//save病历
|
|
|
|
|
|
|
|
|
|
// var steamData = emrView.SaveToBytes();
|
|
|
|
|
// var emrData = new EmrToWatData("B","saveEMRByte",steamData);
|
|
|
|
|
// return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),false);
|
|
|
|
@ -613,6 +651,12 @@ |
|
|
|
|
console.log("insertDeDateTime:"+JSON.stringify(data)); |
|
|
|
|
emrView.InsertDeItem(data); |
|
|
|
|
}, |
|
|
|
|
"insertDeEdit":function(data){//插入Edit
|
|
|
|
|
console.log("InsertDeEdit:"+JSON.stringify(data)); |
|
|
|
|
emrView.InsertDeEdit(data); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"insertText":function(data){ |
|
|
|
|
console.log("insertText:"+JSON.stringify(data)); |
|
|
|
|
console.log("insertText:"+data.text); |
|
|
|
@ -650,7 +694,96 @@ |
|
|
|
|
}, |
|
|
|
|
"insertDeImage":function(data){//插入签名图片
|
|
|
|
|
console.log("insertDeImage:"+JSON.stringify(data)); |
|
|
|
|
emrView.InsertDeImage(data); |
|
|
|
|
|
|
|
|
|
// var pic = data.Base64;//字节流
|
|
|
|
|
//
|
|
|
|
|
// var uInt8Array = new Uint8Array(pic);
|
|
|
|
|
// var i = uInt8Array.length;
|
|
|
|
|
// var binaryString = new Array(i);
|
|
|
|
|
// while (i--){
|
|
|
|
|
// binaryString[i] = String.fromCharCode(uInt8Array[i]);
|
|
|
|
|
// }
|
|
|
|
|
// var bs = binaryString.join('');
|
|
|
|
|
//
|
|
|
|
|
// var base64 = window.btoa(bs);
|
|
|
|
|
//
|
|
|
|
|
// data.Base64 = base64;
|
|
|
|
|
|
|
|
|
|
let vDeImage = emrView.InsertDeImage(data);//385213604108832768
|
|
|
|
|
//.DeleteAllow = true;
|
|
|
|
|
// emrView.InsertDeImage({
|
|
|
|
|
// Index: data.Index,
|
|
|
|
|
// Base64: data.Base64,
|
|
|
|
|
// Width:parseInt(data.Width),
|
|
|
|
|
// Height:parseInt(data.Height),
|
|
|
|
|
// ImageType: data.ImageType,
|
|
|
|
|
// CanResize: data.CanResize=='true'?true:false // 不允许手动缩放改变大小
|
|
|
|
|
//
|
|
|
|
|
// });
|
|
|
|
|
}, |
|
|
|
|
"SignatureGraphic":function(data){//插入签名图片
|
|
|
|
|
console.log("sign:"+JSON.stringify(data)); |
|
|
|
|
let operateType = data.operateType; |
|
|
|
|
if(operateType == '1') {//新增签名
|
|
|
|
|
emrView.InsertDeImage({ |
|
|
|
|
Index: data.Index, |
|
|
|
|
Base64: data.Base64, |
|
|
|
|
Width: data.Width, |
|
|
|
|
Height: data.Height, |
|
|
|
|
CanResize:data.CanResize, |
|
|
|
|
DeleteAllow:data.DeleteAllow, |
|
|
|
|
// AutoSize: false, // 自动适应图片的大小
|
|
|
|
|
LoadedEvent: function () { |
|
|
|
|
emrView.Trace = data.trace; |
|
|
|
|
try{ |
|
|
|
|
tracesData[data.recordpkey]=data.trace; |
|
|
|
|
}catch(e){ |
|
|
|
|
} |
|
|
|
|
var steamData = emrView.SaveToBytes(); |
|
|
|
|
var emrData = new EmrToWatData("B","saveEMRByteBySign",steamData); |
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),false); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}else{//替换签名
|
|
|
|
|
emrView.setDeImage({ |
|
|
|
|
Index: data.Index, |
|
|
|
|
Base64: data.Base64, |
|
|
|
|
Width: data.Width, |
|
|
|
|
Height: data.Height, |
|
|
|
|
CanResize:data.CanResize, |
|
|
|
|
DeleteAllow:data.DeleteAllow, |
|
|
|
|
// AutoSize: false, // 自动适应图片的大小
|
|
|
|
|
LoadedEvent: function () { |
|
|
|
|
emrView.Trace = data.trace; |
|
|
|
|
try{ |
|
|
|
|
tracesData[data.recordpkey]=data.trace; |
|
|
|
|
}catch(e) { |
|
|
|
|
} |
|
|
|
|
var steamData = emrView.SaveToBytes(); |
|
|
|
|
var emrData = new EmrToWatData("B","saveEMRByteBySign",steamData); |
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),true); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"DeleteSignatureGraphic":function(data){//删除签名图片
|
|
|
|
|
console.log("DeleteSignatureGraphic:"+JSON.stringify(data)); |
|
|
|
|
try{ |
|
|
|
|
emrView.InnerView.DeleteDeObject(data.Index,-1);//第一个参数是index,第二个参数which:0第1个,1最后一个,其他值全部
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//emrView.Trace = tracesData[emrView.EditProcIndex];//设置当前病程块的留痕信息
|
|
|
|
|
emrView.Trace = data.trace; |
|
|
|
|
///这里需要根据emrid覆写留痕状态
|
|
|
|
|
tracesData[data.recordpkey]=data.trace; |
|
|
|
|
}catch(e){ |
|
|
|
|
} |
|
|
|
|
var steamData = emrView.SaveToBytes(); |
|
|
|
|
var emrData = new EmrToWatData("B","saveEMRByteByDeleteSign",steamData); |
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),true); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
"insertProc":function(data){//插入病程
|
|
|
|
|
try{ |
|
|
|
@ -671,33 +804,50 @@ |
|
|
|
|
proceData.set("DE09.00.053.00",vDateTime); |
|
|
|
|
// 病程唯一ID,这里使用了当前时间,实际业务使用时可换为业务里的病程唯一ID生成规则
|
|
|
|
|
var vProcIndex = data.emrId; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tracesData[vProcIndex] = false; |
|
|
|
|
emrView.Trace = false;//设置当前病程块的留痕信息,插入新病程都为非留痕
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 在指定的病程(ID为vBeforProcIndex)前面插入新病程,如为""表示在最后插入病程
|
|
|
|
|
var vBeforProcIndex = data.preEmrProcessId;//通过后台计算得到的preEmrProcessId
|
|
|
|
|
|
|
|
|
|
if(!vBeforProcIndex) { |
|
|
|
|
vBeforProcIndex=''; |
|
|
|
|
} |
|
|
|
|
// 当前病历是否没有病程,即要插入的病程是否为整个病历的第一个病程
|
|
|
|
|
var vFirstProc = emrView.ProcCount == 0; |
|
|
|
|
|
|
|
|
|
emrView.ReadOnly = false; // 病历切换为非只读
|
|
|
|
|
emrView.InsertProcing = true; // 插入病程正在进行中
|
|
|
|
|
//emrView.InsertProcing = true; // 插入病程正在进行中
|
|
|
|
|
try { |
|
|
|
|
emrView.BeginUpdate(); // 开启批量更新,提高效率
|
|
|
|
|
|
|
|
|
|
emrView.UndoDisenable(); |
|
|
|
|
|
|
|
|
|
// 插入病程标识
|
|
|
|
|
if (emrView.InsertProc(vProcIndex, vPropertys, vBeforProcIndex)) { // 插入病程标识成功
|
|
|
|
|
console.log("插入病程,标识为:" + vProcIndex); |
|
|
|
|
emrView.EditProcIndex = vProcIndex; // 当前编辑的病程为新插入的病程
|
|
|
|
|
emrView.SetProcBytes(vProcIndex, bytes); // 设置当前病程的内容s
|
|
|
|
|
if (vFirstProc) { // 是整个病历的第一个病程
|
|
|
|
|
emrView.BeginUpdate(); // 开启批量更新,提高效率
|
|
|
|
|
try { |
|
|
|
|
emrView.LoadHeaderFromBytes(bytes); // 加载页眉
|
|
|
|
|
emrView.LoadFooterFromBytes(bytes); // 加载页脚
|
|
|
|
|
} finally { |
|
|
|
|
emrView.EndUpdate(); |
|
|
|
|
} |
|
|
|
|
//emrView.BeginUpdate(); // 开启批量更新,提高效率
|
|
|
|
|
emrView.LoadHeaderFromBytes(bytes); // 加载页眉
|
|
|
|
|
emrView.LoadFooterFromBytes(bytes); // 加载页脚
|
|
|
|
|
// try {
|
|
|
|
|
//
|
|
|
|
|
// } finally {
|
|
|
|
|
// emrView.EndUpdate();
|
|
|
|
|
// }
|
|
|
|
|
} |
|
|
|
|
emrView.SetProcBytes(vProcIndex, bytes); // 设置当前病程的内容s
|
|
|
|
|
} |
|
|
|
|
} finally { |
|
|
|
|
emrView.InsertProcing = false; // 病程插入完成了
|
|
|
|
|
emrView.UndoEnable(); |
|
|
|
|
emrView.EndUpdate(); |
|
|
|
|
//emrView.InsertProcing = false; // 病程插入完成了
|
|
|
|
|
|
|
|
|
|
emrView.ClearUndo(); // 清空撤销记录,防止用户把新插入的病程撤销了
|
|
|
|
|
emrView.ScrollToProc(emrView.EditProcIndex); // 滚动到合适位置
|
|
|
|
|
|
|
|
|
|
//插入病程完成后,初始化会诊意见相关的数据组。
|
|
|
|
|
var consultationOpinionsData = data.consultationOpinionsData; |
|
|
|
|
for(prop in consultationOpinionsData){ |
|
|
|
@ -710,7 +860,7 @@ |
|
|
|
|
//save病历
|
|
|
|
|
var steamData = emrView.SaveToBytes(); |
|
|
|
|
var emrData = new EmrToWatData("B","saveEMRByte",steamData); |
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),false); |
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -720,19 +870,26 @@ |
|
|
|
|
console.log("删除病程记录id:"+data.emrId); |
|
|
|
|
try{ |
|
|
|
|
// emrView.DeleteProc(data.emrId);
|
|
|
|
|
if(data.emrId != emrView.CaretProcInfo.Index) { |
|
|
|
|
alert('当前删除病程和病历中定位的病程块不一致,请重新点击需要删除的病程块'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
emrView.ScrollToProc(data.emrId); |
|
|
|
|
emrView.ReadOnly=false; |
|
|
|
|
emrView.EditProcIndex = emrView.CaretProcInfo.Index; |
|
|
|
|
emrView.DeleteProc(emrView.CaretProcInfo.Index); |
|
|
|
|
}finally{ |
|
|
|
|
//删除病程之后需要调保存病历
|
|
|
|
|
var steamData = emrView.SaveToBytes(); |
|
|
|
|
var emrData = new EmrToWatData("B","saveEMRByte",steamData); |
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),false); |
|
|
|
|
var emrData = new EmrToWatData("B","saveEMRByteByDeleteProc",steamData); |
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),true); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
"locationEmrId":function(data){ |
|
|
|
|
console.log("定位病程记录Id:"+data.emrId); |
|
|
|
|
emrView.ScrollToProc(data.emrId); |
|
|
|
|
emrView.ScrollToProc(data.emrId); |
|
|
|
|
emrView.EditProcIndex=data.emrId; |
|
|
|
|
}, |
|
|
|
|
"cancelSignatureGraphic":function(data){ |
|
|
|
|
try{ |
|
|
|
@ -747,7 +904,7 @@ |
|
|
|
|
}finally{ |
|
|
|
|
var steamData = emrView.SaveToBytes(); |
|
|
|
|
var emrData = new EmrToWatData("B","saveEMRByte",steamData); |
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),false); |
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
@ -780,7 +937,7 @@ |
|
|
|
|
}finally{ |
|
|
|
|
var steamData = emrView.SaveToBytes(); |
|
|
|
|
var emrData = new EmrToWatData("B","saveEMRByte",steamData); |
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),false);
|
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),true);
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -790,7 +947,7 @@ |
|
|
|
|
}, |
|
|
|
|
"getCopyText": function(){//获取复制的内容
|
|
|
|
|
var emrData = new EmrToWatData("S","getCopyText",emrView.InnerView.SaveSelectToText()); |
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),false);
|
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),true);
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -819,14 +976,59 @@ |
|
|
|
|
emrView.SetDeItemProperty(index, "MutexNo", data.MutexNo==undefined?"":data.MutexNo); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"editDeEdit": function(data){//设置数据元属性
|
|
|
|
|
let obj = watEvents.DeEditData; |
|
|
|
|
if(obj && obj.Index==data.Index) { |
|
|
|
|
obj.SetValue("Code", data.Code==undefined?"":data.Code); |
|
|
|
|
obj.SetValue("Name", data.Name==undefined?"":data.Name); |
|
|
|
|
obj.AutoSize=data.AutoSize; |
|
|
|
|
obj.Width=parseInt(data.Width); |
|
|
|
|
obj.Height=parseInt(data.Height); |
|
|
|
|
obj.Text=data.Text; |
|
|
|
|
|
|
|
|
|
if (data.BorderLeft){ |
|
|
|
|
obj.BorderSides.add(1); |
|
|
|
|
}else{ |
|
|
|
|
obj.BorderSides.remove(1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (data.BorderTop){ |
|
|
|
|
obj.BorderSides.add(1 << 1); |
|
|
|
|
}else{ |
|
|
|
|
obj.BorderSides.remove(1 << 1); |
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (data.BorderRight){ |
|
|
|
|
obj.BorderSides.add(1 << 2); |
|
|
|
|
}else{ |
|
|
|
|
obj.BorderSides.remove(1 << 2); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (data.BorderBottom){ |
|
|
|
|
obj.BorderSides.add(1 << 3); |
|
|
|
|
}else{ |
|
|
|
|
obj.BorderSides.remove(1 << 3); |
|
|
|
|
} |
|
|
|
|
emrView.InnerView.ActiveSection.ReFormatActiveItem(); |
|
|
|
|
// emrView.BeginUpdate();
|
|
|
|
|
// try {
|
|
|
|
|
// emrView.ActiveSection.ReFormatActiveItem();
|
|
|
|
|
// } finally {
|
|
|
|
|
// emrView.EndUpdate();
|
|
|
|
|
// }
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"editDeGroup": function(data){//设置数据元属性
|
|
|
|
|
var index = data.Index; |
|
|
|
|
console.log("数据元id====:"+data.Code); |
|
|
|
|
emrView.setDeGroupText("S0025", "Code"); |
|
|
|
|
// emrView.setDeGroupText("S0025", "Code");
|
|
|
|
|
//console.log("数据元id:"+index+","+data.Code+","+data.Name+","+data.Unit+","+data.HideUnit+","+data.PreFormat);
|
|
|
|
|
emrView.SetDeGroupProperty(index, "Code", data.Code==undefined?"":data.Code); |
|
|
|
|
emrView.SetDeGroupProperty(index, "Name", data.Name==undefined?"":data.Name); |
|
|
|
|
|
|
|
|
|
alert('成功修改数据组属性'); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"setDeGroupText": function(data){//设置数据元属性
|
|
|
|
@ -838,6 +1040,7 @@ |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"saveEmrContent": function(){//设置数据元属性
|
|
|
|
|
setTraceInfo();//这个必须写在上面
|
|
|
|
|
feedbackEmrStreamToWat(true);
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -847,13 +1050,68 @@ |
|
|
|
|
vAreas.add(2); |
|
|
|
|
// vAreas.add(4);
|
|
|
|
|
emrView._emrDataElement = new Array(); |
|
|
|
|
emrView.TraverseElement(traverseFun, vAreas, 0); |
|
|
|
|
emrView.TraverseElement(traverseFun_wat, vAreas, 0); |
|
|
|
|
var emrData = new EmrToWatData("json","traverseElement",emrView._emrDataElement); |
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),false);
|
|
|
|
|
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),true);
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
"saveProcTemplet":function(data){ |
|
|
|
|
console.log("定位病程记录Id:"+data.emrId); |
|
|
|
|
// emrView.ScrollToProc(data.emrId);
|
|
|
|
|
var steamData =""; |
|
|
|
|
try{ |
|
|
|
|
// emrView.InnerView.DeleteAllProcMark();//把病程标识清除掉
|
|
|
|
|
steamData = emrView.SaveProcToBytes(data.emrId, true); |
|
|
|
|
// steamData = emrView.GetProcAsText(data.emrId);
|
|
|
|
|
var emrData = new EmrToWatData("B","saveProcTemplet",steamData); |
|
|
|
|
|
|
|
|
|
watEvents.emrToWatEvent(emrData,true); |
|
|
|
|
}catch(e){ |
|
|
|
|
alert(e.message); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"insertTableRows": function(data){ |
|
|
|
|
var rows = data.rows; |
|
|
|
|
emrView.InnerView.ActiveTableInsertRowContentAfter(rows); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"SetDeGroupByText": function(data){ |
|
|
|
|
var sectionData =data.sectionData; |
|
|
|
|
for(prop in sectionData){ |
|
|
|
|
emrView.SetDeGroupByText(prop, sectionData[prop]); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"printAll": function(data){ |
|
|
|
|
try{ |
|
|
|
|
emrView.FrmRecord.PrintCurPage(); |
|
|
|
|
}catch(e){ |
|
|
|
|
alert(e.message); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"SetDeItemText": function(data){ |
|
|
|
|
var hcdata =data.hcdata; |
|
|
|
|
for(prop in hcdata){ |
|
|
|
|
emrView.SetDeItemText(prop, hcdata[prop]); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"refreshdata": function(data){ |
|
|
|
|
// var hcdata =data.hcdata;
|
|
|
|
|
// for(prop in hcdata){
|
|
|
|
|
// emrView.SetDeItemText(prop, hcdata[prop]);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// var sectionData =data.sectionData;
|
|
|
|
|
// for(prop in sectionData){
|
|
|
|
|
// emrView.SetDeGroupByText(prop, sectionData[prop]);
|
|
|
|
|
// }
|
|
|
|
|
setTraceInfo();//这个必须写在上面
|
|
|
|
|
feedbackEmrStreamToWatAndRefresh(true);
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -934,7 +1192,7 @@ |
|
|
|
|
} |
|
|
|
|
var steamData = emrView.SaveToBytes(); |
|
|
|
|
var emrData = new EmrToWatData("B","saveEMRByte",steamData); |
|
|
|
|
window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),false); |
|
|
|
|
window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),true); |
|
|
|
|
}else{ |
|
|
|
|
var base64 = window.btoa(data); |
|
|
|
|
// var dataUrl = "data:" + (outputFormat || "image/png") + ";base64," + base64;
|
|
|
|
@ -959,7 +1217,7 @@ |
|
|
|
|
//加载完成后保存文件
|
|
|
|
|
var steamData = emrView.SaveToBytes(); |
|
|
|
|
var emrData = new EmrToWatData("B","saveEMRByte",steamData); |
|
|
|
|
window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),false); |
|
|
|
|
window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),true); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
@ -1003,6 +1261,14 @@ |
|
|
|
|
exports.getHcData=function(){ |
|
|
|
|
return hcData; |
|
|
|
|
} |
|
|
|
|
exports.getTracesData=function(){ |
|
|
|
|
return tracesData; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
exports.getDeEditData=function(){ |
|
|
|
|
return DeEditData; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
exports.getProceData = function(){ |
|
|
|
|
return proceData; |
|
|
|
|
} |
|
|
|
@ -1014,7 +1280,7 @@ |
|
|
|
|
setTimeout(function(){ |
|
|
|
|
var steamData = emrView.SaveToBytes(); |
|
|
|
|
var emrData = new EmrToWatData("B","saveEMRByte",steamData); |
|
|
|
|
window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),false);
|
|
|
|
|
window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),JSON.stringify(emrData),true);
|
|
|
|
|
setTimeout(arguments.callee,5000) |
|
|
|
|
},5000); |
|
|
|
|
} |
|
|
|
|