develop/xl_20241105_tbfwqhc

同步为生产服务器hcmer脚本
develop/lyx_20241116_yzzf
Xiao Ye 3 months ago
parent fbe3414bee
commit 15b6371dcb
  1. 334
      hcemr/WatEvent.js
  2. 48
      hcemr/emrBasePage.html
  3. 110
      hcemr/emrEditPage.html
  4. 4
      hcemr/emrLitePage.html
  5. 3
      hcemr/emrMZBasePage.html
  6. 3
      hcemr/emrMZEditPage.html
  7. 10
      hcemr/emrShowPage.html
  8. 2
      release/20241103_1635.text

@ -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);
}

@ -4,8 +4,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>HCEmrViewLib Demo</title>
<script type="text/javascript" src="./HCEmrViewLib.min.js?v=5"></script>
<script type="text/javascript" src="./WatEvent.js?v=2"></script>
<script type="text/javascript" src="./HCEmrViewLib.min.js?v=17"></script>
<script type="text/javascript" src="./WatEvent.js?v=92"></script>
<script src="./select/js/jquery_3.3.1.min.js"></script>
<script language="javascript" type="text/javascript" src="./layer/layer.js"></script>
<script type="text/javascript">
@ -122,9 +122,9 @@
function load() {
emrView = new THCEmrViewLib({
hcServer: "http://127.0.0.1:12880/", // HC服务端IP
//hcServer: "http://139.9.152.193:12880/", // HC服务端IP
//hcServer: "http://123.206.99.69:12880/", // HC服务端IP
//hcServer: "http://127.0.0.1:12880/", // HC服务端IP
//hcServer: "http://124.71.81.19:12880/", // HC服务端IP
hcServer: "http://192.168.2.111:12880/", // HC服务端IP
//hcServer: "http://192.168.1.122:12880/",
//hcServer: "http://192.168.5.104:12880/",
//hcServer: "http://192.168.20.100:12880/",
@ -218,12 +218,42 @@
},
onCaretItemChanged: function() {
onCaretItemChanged: function() {//用于DeEdit元素的属性值设置
let viewData = emrView.InnerView.ActiveSectionTopLevelData();  // 当前光标处的Data
if (viewData) {
    let item = viewData.GetActiveItem();  // 当前光标处的Item
    if (item.Index != "") {  // 光标处是数据元
        if (item.StyleNo > TItemStyle.Null) {  // 是纯文本数据元
        } else if (item.StyleNo === TItemStyle.Edit) {  // 是Edit数据元
watEvents.DeEditData = item;
var param={
Index:item.Index,
Code:item.GetValue("Code"),
Name:item.GetValue("Name"),
AutoSize:item.AutoSize,
Width:item.Width,
Height:item.Height,
Text:item.Text,
BorderLeft:item.BorderSides.has(1),
BorderTop:item.BorderSides.has(1 << 1),
BorderRight:item.BorderSides.has(1 << 2),
BorderBottom:item.BorderSides.has(1 << 3),
};
var data = new EmrToWatData("S","DeEditInfo",param);
watEvents.emrToWatEvent(data);
//item.SetValue("Name","测试");
        }
        console.log(item.Index);
    } else
        console.log("当前不是数据元");
}
},
// 点击了编辑器工具栏上的保存按钮时触发
onSave: function() {
emrView.InnerView.DeleteAllProcMark();//把病程标识清除掉
feedbackEmrStreamToWat();
},
@ -810,13 +840,13 @@
case TStyleExtra.Del: {
if (vDeItem.GetValue(TDeProp.Trace) == "") // 新的删除痕迹
vDeItem.SetValue(TDeProp.Trace, "荆通(jt " + vDateTime + ")删除");
vDeItem.SetValue(TDeProp.Trace, "(jt " + vDateTime + ")删除");
}
break;
case TStyleExtra.Add: {
if (vDeItem.GetValue(TDeProp.Trace) == "") // 新的添加痕迹
vDeItem.SetValue(TDeProp.Trace, "荆通(jt " + vDateTime + ")添加");
vDeItem.SetValue(TDeProp.Trace, "(jt " + vDateTime + ")添加");
}
break;
}

@ -15,8 +15,8 @@
line-height: 32px!important;
}
</style>
<script type="text/javascript" src="./HCEmrViewLib.min.js?v=5"></script>
<script type="text/javascript" src="./WatEvent.js?v=22"></script>
<script type="text/javascript" src="./HCEmrViewLib.min.js?v=18"></script>
<script type="text/javascript" src="./WatEvent.js?v=111"></script>
<script src="./select/js/jquery_3.3.1.min.js"></script>
<script language="javascript" type="text/javascript" src="./layer/layer.js"></script>
<script type="text/javascript">
@ -187,24 +187,25 @@
function load() {
emrView = new THCEmrViewLib({
debug: false,
// hcServer: "http://139.9.152.193:12880/", // HC服务端IP
hcServer: "http://192.168.2.111:12880/", // HC服务端IP
//hcServer: "http://192.168.1.122:12880/",
//hcServer: "http://192.168.5.104:12880/",
//hcServer: "http://192.168.20.100:12880/",
hcServer: "http://127.0.0.1:12880/",
//hcServer: "http://192.168.20.100:12880/", // HC服务端IP
//hcServer: "http://123.206.99.69:12880/",
//hcServer: "http://127.0.0.1:12880/",
baseUrl: "./", // 编辑器需要的资源路径
el: "divHCEmrView", // 编辑器父容器的ID
defaultFontSize: "小四", // 编辑器默认字号,默认小四
defaultFontFamily: "宋体", // 编辑器默认字体,默认宋体
paperSize: "A4", // 纸张大小
paperOrientation: 0, // 纸张方向 0纵向 1横向,默认0
designMode: false, // 是否设计模式,也可以使用emrView.designMode = true;
designMode: true, // 是否设计模式,也可以使用emrView.designMode = true;
multItemEditValue: true, // 多选数据元选项上屏后,再次点击直接编辑内容,使用右键菜单重新选择
//deUnDoneColor: "#FF8C00", // 没选过选项或没写过内容时数据元背景色
//deDoneColor: "#AFEEEE", // 填写或选择过选项的数据元背景色
//deHotColor: "#87CEFA", // 鼠标移动上去时的颜色
traceInfoAnnotate: true, // 痕迹以批注形式显示
printAsImage: true,
traceInfoAnnotate: false, // 痕迹以批注形式显示
useScript: false, // 开启解析执行脚本(对运行效率有影响)
// 工具条
toolBar: {
@ -267,7 +268,17 @@
},
onCaretItemChanged: function() {
//病程块切换的时候,处理病程块的留痕状态,并保存之前的留痕信息
if (emrView.CaretProcInfo.Index != emrView.EditProcIndex) {
setTraceInfo();//这个必须写在上面,处理之前病程块的留痕信息
emrView.EditProcIndex = emrView.CaretProcInfo.Index;
let tracesData = watEvents.getTracesData();
emrView.Trace = tracesData[emrView.EditProcIndex];//设置当前病程块的留痕信息
var emrData = new EmrToWatData("S","localProcIndexToServer",emrView.EditProcIndex);
watEvents.emrToWatEvent(emrData,true);
}
},
// 点击了编辑器工具栏上的保存按钮时触发
@ -321,20 +332,20 @@
// 当编辑器在加载文档或插入了新的Item时触发,便于外部替换数据元的值
onInserItemSync: function(sender, data, item) {
//debugger;
console.log(item.Code+","+item.StyleNo,+","+item.Index);
//console.log(item.Code+","+item.StyleNo,+","+item.Index);
if(item.Index!=""){
var hcdata =watEvents.getHcData();
for(prop in hcdata){
if(undefined!=item.Code&&""!=item.Code){
if(item.Code.toUpperCase()==prop){
if(item.GetValue(TDeProp.HideUnit)){
item.Text = hcdata[prop] ;
}else{
item.Text = hcdata[prop] +item.GetValue(TDeProp.Unit);
if(item.GetValue(TDeProp.HideUnit)){
item.Text = hcdata[prop] ;
}else{
item.Text = hcdata[prop] +item.GetValue(TDeProp.Unit);
}
item.AllocValue = true; // 该元素填写过值了
}
item.AllocValue = true; // 该元素填写过值了
}
}
}
@ -408,9 +419,9 @@
}else{
if(menus[i].text == "插入病程"){
menus[i].visible=true;
menus[i].visible=false;
}else if(menus[i].text == "删除病程"){
menus[i].visible=true;
menus[i].visible=false;
}
var operatorsign = emrView.GetProcProperty(emrView.CaretProcInfo.Index, EmrProp.OPERATORSIGN);
var qcr = emrView.GetProcProperty(emrView.CaretProcInfo.Index, EmrProp.QCR);
@ -572,7 +583,9 @@
// 编辑器双击事件
onDblClick: function() {
//debugger;
var deGroupCode = emrView.GetCaretDeGroupProperty(TDeProp.Code);
var deGroupName = emrView.GetCaretDeGroupProperty(TDeProp.Name);
var deGroupIndex = emrView.GetCaretDeGroupProperty(TDeProp.Index);
var propertys = emrView.GetCaretDeGroupProperty("Propertys","json");//json对象
console.log(propertys.isSave);
@ -595,24 +608,37 @@
//右键直接签名,
console.log("当前病程id:"+emrView.CaretProcInfo.Index);
console.log("获得病程属性:"+emrView.GetProcProperty(emrView.CaretProcInfo.Index,"Propertys"));
/*
var qcr=emrView.GetProcProperty(emrView.CaretProcInfo.Index, EmrProp.QCR);
var choscode=emrView.GetProcProperty(emrView.CaretProcInfo.Index, EmrProp.Choscode);
var operatorsign = emrView.GetProcProperty(emrView.CaretProcInfo.Index, EmrProp.OPERATORSIGN);
//emrView.SetProcProperty(emrView.CaretProcInfo.Index, EmrProp.OPERATORSIGN, "0");//容错用
if((qcr==curUser||curUser==operator)){//有权限的医生才能签名
if("1"!=operatorsign){//未签名
var param={
var param={EmrToWatData("S"
emrId:emrView.CaretProcInfo.Index,
operator:curUser,
choscode:choscode
};
var data = new EmrToWatData("JSON","setSignatureGraphic",param);
watEvents.getOperatorSignPic(data,watEvents.url);
}
*/
var param={
emrId:emrView.CaretProcInfo.Index,
deGroupName:deGroupName,
deGroupCode:deGroupCode,
proc:true
};
var emrData = new EmrToWatData("S","setSignatureGraphic",param);
watEvents.emrToWatEvent(emrData,false);
/*
}
}else{
alert("当前用户没有权限签名!");
}
*/
}else{//病历
/*
var operator = emrView. _EmrEditor[EmrEditor.OPERATOR];
var director = emrView. _EmrEditor[EmrEditor.DIRECTOR];
var leader = emrView. _EmrEditor[EmrEditor.LEADER];
@ -623,15 +649,25 @@
var choscode = emrView.InnerView.GetValue(EmrProp.Choscode);
if((qcr==curUser||curUser==operator)){//有权限的医生才能签名
if("1"!=operatorsign){//经治医师未签名
var data = new EmrToWatData("JSON","setSignatureGraphic",param);
watEvents.getOperatorSignPic(data,watEvents.url);
*/
var emrId = emrView.InnerView.GetValue(EmrProp.EmrId);
var param={
emrId:emrId,
deGroupName:deGroupName,
deGroupCode:deGroupCode,
proc:false
};
var emrData = new EmrToWatData("S","setSignatureGraphic",param);
watEvents.emrToWatEvent(emrData,false);
/*
}else{
alert("当前病历已签名!");
}
}else{
alert("当前用户没有权限签名!");
}
*/
}
@ -1327,7 +1363,6 @@
}
return null;
}
//保存数据返回给平台[add by xgf 2020年7月23日 10:13:13]
function feedbackDataToWat(data){
//console.log("二进制数据:"+data,"strwinid:"+GetQueryString('strwinid'),+"strctrid:"+GetQueryString('strctrid'));
return window.parent.top.DxURLPage.action(GetQueryString('strwinid'),GetQueryString('strctrid'),data);
@ -1405,6 +1440,29 @@
}
//病历二进制数据返回给平台,以及解析数据到平台,并且进行刷新数据。
function feedbackEmrStreamToWatAndRefresh(asyn){
console.log(emrView.InnerView.FPropertys);
try {
watEvents.traverseElement_wat();
} catch (error) {
console.log("解析出错了:"+error);
}finally{
let saveData = emrView._saveEmrData;
let deElements = emrView._emrDataElement_wat;
let steamData = SaveToBytes();
let data = {
saveData:saveData,
deElements:deElements,
steamData:steamData
}
var emrData = new EmrToWatData("B","saveDataEMRByteRefresh",data);
watEvents.emrToWatEvent(emrData,asyn);
}
}
/**------------------------------------------------------------xgf 2020年7月23日 10:18:45 end -------------------------------------------------**/
</script>

@ -99,10 +99,10 @@
console.log("load........");
emrView = new THCEmrViewLib({
//hcServer: "http://139.9.152.193:12880/", // HC服务端IP-->
hcServer: "http://127.0.0.1:12880/", // HC服务端IP-->
//hcServer: "http://127.0.0.1:12880/", // HC服务端IP-->
//hcServer: "http://192.168.1.122:12880/",
//hcServer: "http://192.168.5.104:12880/",
// hcServer: "http://192.168.20.100:12880/",
hcServer: "http://11.21.6.225:12880/",
baseUrl: "./", // 编辑器需要的资源路径
el: "divHCEmrView", // 编辑器父容器的ID
defaultFontSize: "小四", // 编辑器默认字号,默认小四

@ -157,7 +157,8 @@ var TItemStyle = {
function load() {
emrView = new THCEmrViewLib({
debug: true,
hcServer: "http://127.0.0.1:12880/", // HC服务端IP
//hcServer: "http://11.21.6.225:12880/", // HC服务端IP
hcServer: "http://192.168.2.111:12880/",
baseUrl: "./", // 编辑器需要的资源路径
el: "divHCEmrView", // 编辑器父容器的ID
defaultFontSize: "小四", // 编辑器默认字号,默认小四

@ -153,7 +153,8 @@ var TItemStyle = {
function load() {
emrView = new THCEmrViewLib({
debug: true,
hcServer: "http://127.0.0.1:12880/", // HC服务端IP
//hcServer: "http://11.21.6.225:12880/", // HC服务端IP
hcServer: "http://192.168.2.111:12880/",
baseUrl: "./", // 编辑器需要的资源路径
el: "divHCEmrView", // 编辑器父容器的ID
defaultFontSize: "小四", // 编辑器默认字号,默认小四

@ -4,8 +4,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>HCEmrViewLib Demo</title>
<script type="text/javascript" src="./HCEmrViewLib.min.js?v=1"></script>
<script type="text/javascript" src="./WatEvent.js?v=1"></script>
<script type="text/javascript" src="./HCEmrViewLib.min.js?v=6"></script>
<script type="text/javascript" src="./WatEvent.js?v=48"></script>
<script type="text/javascript">
var TItemStyle = {
@ -158,8 +158,8 @@ var TItemStyle = {
function load() {
emrView = new THCEmrViewLib({
debug: true,
hcServer: "http://139.9.152.193:12880/", // HC服务端IP
debug: false,
hcServer: "http://192.168.2.111:12880/", // HC服务端IP
baseUrl: "./", // 编辑器需要的资源路径
el: "divHCEmrView", // 编辑器父容器的ID
defaultFontSize: "小四", // 编辑器默认字号,默认小四
@ -178,7 +178,7 @@ var TItemStyle = {
//height: 35, // 设置工具栏高度
// 文件按钮
btnFile: {
visible: false
visible: true
},
// 打印按钮

@ -28,7 +28,9 @@ develop/xl_20241104_blws
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
develop/xl_20241105_tbfwqhc
===================
同步为生产服务器hcmer脚本
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Loading…
Cancel
Save