|
@@ -404,6 +404,7 @@ const emrEvent = {
|
|
|
if (!isCourse()) {
|
|
|
openTheTraceByUser(createId);
|
|
|
}
|
|
|
+ courseJump();
|
|
|
// 可以编辑的才能触发
|
|
|
if (emrConfig.value.editor) {
|
|
|
// 只有是空的才触发
|
|
@@ -598,11 +599,11 @@ const sendEmrSocketMessageAndHighlight = (message, flag, userInfo) => {
|
|
|
const oldHighlightConfig = {
|
|
|
icon: "",
|
|
|
title: "",
|
|
|
- interval: 0,
|
|
|
+ interval: null as NodeJS.Timeout,
|
|
|
toggleTitle: true,
|
|
|
};
|
|
|
|
|
|
-const highlightIcon = message => {
|
|
|
+const highlightIcon = (message: string) => {
|
|
|
const link = document.querySelector("link[rel~='icon']") as HTMLLinkElement;
|
|
|
oldHighlightConfig.title = document.title;
|
|
|
oldHighlightConfig.icon = link.href;
|
|
@@ -1132,27 +1133,20 @@ const courseSegmentLocking = async () => {
|
|
|
const courseTitles = [];
|
|
|
|
|
|
循环病程返回数据元((value, node) => {
|
|
|
- let fragment = node.getAttribute("fragment");
|
|
|
const tmpInfo = getBcjlUserInfo(value);
|
|
|
- let pushData = {
|
|
|
- code: "查房时间",
|
|
|
+ const pushData = {
|
|
|
name: value["查房标题"]?.value,
|
|
|
- value: value["查房时间"]?.value,
|
|
|
emrDocumentId: getId(),
|
|
|
emrCategoryCode: categoryCode.value,
|
|
|
- jump: true,
|
|
|
createName: tmpInfo.name,
|
|
|
createDate: value["查房时间"]?.value,
|
|
|
createId: tmpInfo.code,
|
|
|
type: "category",
|
|
|
- trueCreationTime: "",
|
|
|
+ jump: true,
|
|
|
+ courseJumpId: value["查房时间"].id,
|
|
|
};
|
|
|
- if (fragment != null) {
|
|
|
- pushData.trueCreationTime = fragment?.creationTime;
|
|
|
- }
|
|
|
courseTitles.push(pushData);
|
|
|
if (emrConfig.value.editor) {
|
|
|
- // lockNode(node, pushData)
|
|
|
node.view.setReadonly(false);
|
|
|
node.view.setDeletable(true);
|
|
|
} else {
|
|
@@ -1163,6 +1157,27 @@ const courseSegmentLocking = async () => {
|
|
|
emrSidebarRef.value!.diseaseDurationRecordTime(getId(), courseTitles);
|
|
|
};
|
|
|
|
|
|
+function courseJump() {
|
|
|
+ if (emrStore.store.courseJumpId) {
|
|
|
+ jumpById(emrStore.store.courseJumpId);
|
|
|
+ emrStore.store.courseJumpId = null;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function jumpById(id: string) {
|
|
|
+ const find = emrStore.store.editor?.view?.container?.find(`#${id}`);
|
|
|
+ if (XEUtils.isEmpty(find)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const element = find[0];
|
|
|
+ if (element) {
|
|
|
+ element.view.focusEnter();
|
|
|
+ emrStore.store.editor.scrollToCursor();
|
|
|
+ emrStore.store.editor.highlight(element.view, 1500);
|
|
|
+ emrStore.store.editor.scrollToCursor(true);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* 重新设置提取的数据, 这里是强制替换
|
|
|
*/
|
|
@@ -1200,30 +1215,6 @@ function syncDisabled() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function lockNode(node, nodeInfo) {
|
|
|
- const editorCode = nodeInfo.createId;
|
|
|
- // 如果这个为空的话,就让她删了重新写,只能删除不能写
|
|
|
- if (stringIsBlank(editorCode)) {
|
|
|
- node.view.setReadonly(false);
|
|
|
- node.view.setDeletable(true);
|
|
|
- } else {
|
|
|
- const isEdit = emrEditCreateLimit.isEdit(editorCode);
|
|
|
- if (isEdit) {
|
|
|
- node.view.setReadonly(false);
|
|
|
- // 自己创建的病历片段才可以删除
|
|
|
- node.view.setDeletable(editorCode === userInfo.code);
|
|
|
- } else {
|
|
|
- node.view.setReadonly(true);
|
|
|
- node.view.setDeletable(false);
|
|
|
- }
|
|
|
- }
|
|
|
- // 测试环境下面随便删除
|
|
|
- if (isDev) {
|
|
|
- node.view.setReadonly(false);
|
|
|
- node.view.setDeletable(true);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* 单击“提交病历”
|
|
|
*/
|
|
@@ -1268,7 +1259,7 @@ const readonlyPattern = () => {
|
|
|
};
|
|
|
|
|
|
// 判断 一级 二级 三级医生
|
|
|
-let doctorLevel = ref(1);
|
|
|
+const doctorLevel = ref(1);
|
|
|
const doctorLevelFunc = () => {
|
|
|
doctorLevel.value = emrEditCreateLimit.getDoctorLevelById(userInfo.code);
|
|
|
createLevel.value = emrEditCreateLimit.getDoctorLevelById(createId);
|
|
@@ -1506,6 +1497,8 @@ const loadDocument = (param: EmrParam): Promise<void> => {
|
|
|
return;
|
|
|
}
|
|
|
if (param.documentId && getId() === param.documentId) {
|
|
|
+ emrStore.store.courseJumpId = param.courseJumpId;
|
|
|
+ courseJump();
|
|
|
resolve();
|
|
|
return;
|
|
|
}
|
|
@@ -1517,10 +1510,18 @@ const loadDocument = (param: EmrParam): Promise<void> => {
|
|
|
createId = param.createId;
|
|
|
parent = param.parent;
|
|
|
createName.value = param.createName as string;
|
|
|
+ emrStore.store.courseJumpId = param.courseJumpId;
|
|
|
emrMitt.emit(
|
|
|
"changeRightTabs",
|
|
|
isCourse() ? EmrRightTabs.fragment : EmrRightTabs.outline
|
|
|
);
|
|
|
+ emrMitt.emit("auditV2", {
|
|
|
+ patNo: patientInfo.value.inpatientNo,
|
|
|
+ times: patientInfo.value.admissTimes,
|
|
|
+ emrId: param?.id,
|
|
|
+ finalControl: patientInfo.value.finalControl,
|
|
|
+ emrCategoryCode: param.categoryCode,
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
await checkEmrChange();
|
|
@@ -1573,8 +1574,6 @@ const emrMittInit = () => {
|
|
|
return editMain!.iframe;
|
|
|
});
|
|
|
|
|
|
- emrMitt.on("fragmentJump", fragmentJump);
|
|
|
-
|
|
|
emrMitt.on("setShowIframe", val => {
|
|
|
showIframe.value = val;
|
|
|
});
|
|
@@ -1678,122 +1677,7 @@ const initEdit = () => {
|
|
|
emrStore.cache.open();
|
|
|
setRevisionShowMode(userConfig.emr_review_mode);
|
|
|
if (isDev) {
|
|
|
- editor.execute("insertContents", {
|
|
|
- value: [
|
|
|
- {
|
|
|
- required: false,
|
|
|
- readonly: false,
|
|
|
- deletable: true,
|
|
|
- privacy: false,
|
|
|
- script: {
|
|
|
- content: null,
|
|
|
- dynamicScript: "2154eae0167611ef8717efceee160e36",
|
|
|
- },
|
|
|
- format: {
|
|
|
- dataType: null,
|
|
|
- showType: null,
|
|
|
- minLength: null,
|
|
|
- maxLength: null,
|
|
|
- minRows: null,
|
|
|
- maxRows: null,
|
|
|
- scale: null,
|
|
|
- enums: null,
|
|
|
- dictionary: null,
|
|
|
- },
|
|
|
- element: {
|
|
|
- type: "element",
|
|
|
- name: "编辑者签名",
|
|
|
- code: {
|
|
|
- business: "",
|
|
|
- internal: "编辑者签名",
|
|
|
- dataElement: "",
|
|
|
- },
|
|
|
- labels: "",
|
|
|
- },
|
|
|
- tips: "编辑者签名",
|
|
|
- borderStyle: "none",
|
|
|
- style: {
|
|
|
- id: "dcTzLm3tAs",
|
|
|
- },
|
|
|
- picker: {
|
|
|
- type: null,
|
|
|
- propertiesConfig: {
|
|
|
- signCount: {
|
|
|
- name: "签名数量",
|
|
|
- code: "signCount",
|
|
|
- category: "extend",
|
|
|
- categoryName: "扩展",
|
|
|
- value: 1,
|
|
|
- editor: {
|
|
|
- type: "numberfield",
|
|
|
- minvalue: 1,
|
|
|
- },
|
|
|
- },
|
|
|
- maxHeight: {
|
|
|
- name: "最大高度",
|
|
|
- code: "maxHeight",
|
|
|
- category: "extend",
|
|
|
- categoryName: "扩展",
|
|
|
- editor: {
|
|
|
- type: "numberfield",
|
|
|
- },
|
|
|
- },
|
|
|
- valign: {
|
|
|
- name: "对齐方式",
|
|
|
- code: "valign",
|
|
|
- category: "extend",
|
|
|
- categoryName: "扩展",
|
|
|
- editor: {
|
|
|
- type: "select",
|
|
|
- valueField: "code",
|
|
|
- displayField: "name",
|
|
|
- store: {
|
|
|
- type: "store",
|
|
|
- fields: ["code", "name"],
|
|
|
- data: [
|
|
|
- {
|
|
|
- code: "top",
|
|
|
- name: "上对齐",
|
|
|
- },
|
|
|
- {
|
|
|
- code: "middle",
|
|
|
- name: "中对齐",
|
|
|
- },
|
|
|
- {
|
|
|
- code: "bottom",
|
|
|
- name: "下对齐",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- editable: false,
|
|
|
- contentWrap: true,
|
|
|
- signCount: 1,
|
|
|
- type: "smarttext",
|
|
|
- },
|
|
|
- ],
|
|
|
- isPuzzlepiece: true,
|
|
|
- defaultValue: [
|
|
|
- {
|
|
|
- signature: "asdsad",
|
|
|
- name: "我去",
|
|
|
- },
|
|
|
- ],
|
|
|
- });
|
|
|
// emrStore.mutation.installPlugins(res);
|
|
|
- // sleep(500).then(() => {
|
|
|
- // emrMitt.emit("loadTemplate", {
|
|
|
- // parent: "fb4c44f057ff11eda93f1fd7ab32baa6",
|
|
|
- // code: "ffc98fb057ff11eda93f1fd7ab32baa6",
|
|
|
- // name: "化验结果粘贴单",
|
|
|
- // description: "",
|
|
|
- // _id: "03cd3da0580011eda93f1fd7ab32baa6",
|
|
|
- // type: "category",
|
|
|
- // });
|
|
|
- // });
|
|
|
}
|
|
|
});
|
|
|
};
|
|
@@ -1876,7 +1760,7 @@ const openOrClosePage = val => {
|
|
|
* 解析病程记录,改变val病程记录只要首次的下面的片段不管
|
|
|
* @param val 传入的值
|
|
|
*/
|
|
|
-const 解析病程记录 = val => {
|
|
|
+const 解析病程记录: any[] = val => {
|
|
|
if (!isCourse()) {
|
|
|
return [];
|
|
|
}
|