|
@@ -453,6 +453,7 @@ import EmrAudit
|
|
|
from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/EmrAudit.vue";
|
|
|
import EmrConnotation
|
|
|
from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/EmrConnotation.vue";
|
|
|
+import {save} from "@/api/zhu-yuan-yi-sheng/connotation-quality-control";
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
@@ -782,12 +783,23 @@ const clickSaveData = async () => {
|
|
|
fragment: [],
|
|
|
parent: parent
|
|
|
}
|
|
|
- objectValuesCannotBeNull(data)
|
|
|
+
|
|
|
+ objectValuesCannotBeNull(data);
|
|
|
data.emrDataElement = editor.getDataElements('business')
|
|
|
if (categoryCode === emrCodeEnum.courseRecord) {
|
|
|
templateName = '病程记录'
|
|
|
}
|
|
|
+
|
|
|
+ if (isDev) {
|
|
|
+ save(data).then(res => {
|
|
|
+ console.log(res.data.data)
|
|
|
+ ElMessage.warning(res.data.data)
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
saveDialog.dialog = true
|
|
|
+
|
|
|
data.fragment = 解析病程记录()
|
|
|
saveDialog.prompt(templateName, async (value) => {
|
|
|
data.name = value
|
|
@@ -1069,7 +1081,7 @@ const getCurrentPersonnelInformation = (data) => {
|
|
|
patientData.user_token = userData.token
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+const 入院病历 = 'ruyuanjiluzhuanyong'
|
|
|
// 设置编辑器的模式
|
|
|
const setEditorModeFun = () => {
|
|
|
// 判断是不是编辑模式
|
|
@@ -1078,31 +1090,39 @@ const setEditorModeFun = () => {
|
|
|
currentEmr.value.callMethod('setEditorMode', 'free')
|
|
|
// 如果不是首次病程记录就需要执行下面的代码
|
|
|
if (!isCourse()) {
|
|
|
- // 如果创建人是空的就说明是第一次创建
|
|
|
- if (createId === null) {
|
|
|
- return currentEmr.value.callMethod('setEditorMode', 'free');
|
|
|
- }
|
|
|
- if (createId == userData.code) {
|
|
|
- return currentEmr.value.callMethod('setEditorMode', 'free');
|
|
|
- }
|
|
|
- // 创建人不是自己就只能看
|
|
|
- if (doctorLevel === 1 && createId !== userData.code) {
|
|
|
- currentEmr.value.callMethod('setEditorMode', 'readonly');
|
|
|
- }
|
|
|
- if (doctorLevel === 2) {
|
|
|
- // 不能修改三级医生写的病历
|
|
|
- if (createId === extractFields('主任医生编码')) {
|
|
|
+ // 入院病历有点特殊,任何人都可以写补充诊断
|
|
|
+ if (categoryCode === 入院病历 && isDev) {
|
|
|
+ let EMR = editor.getScriptRuntime().EMR
|
|
|
+ let emrDoc = EMR.getDocument()
|
|
|
+ let areas = emrDoc.getNodesByCode(null, 'area')
|
|
|
+ console.log(areas)
|
|
|
+ } else {
|
|
|
+ // 如果创建人是空的就说明是第一次创建
|
|
|
+ if (createId === null) {
|
|
|
+ return currentEmr.value.callMethod('setEditorMode', 'free');
|
|
|
+ }
|
|
|
+ if (createId == userData.code) {
|
|
|
+ return currentEmr.value.callMethod('setEditorMode', 'free');
|
|
|
+ }
|
|
|
+ // 创建人不是自己就只能看
|
|
|
+ if (doctorLevel === 1 && createId !== userData.code) {
|
|
|
currentEmr.value.callMethod('setEditorMode', 'readonly');
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ if (doctorLevel === 2) {
|
|
|
+ // 不能修改三级医生写的病历
|
|
|
+ if (createId === extractFields('主任医生编码')) {
|
|
|
+ currentEmr.value.callMethod('setEditorMode', 'readonly');
|
|
|
+ } else {
|
|
|
+ currentEmr.value.callMethod('setEditorMode', 'free');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 医生等级 3 没有限制
|
|
|
+ if (doctorLevel === 3) {
|
|
|
currentEmr.value.callMethod('setEditorMode', 'free');
|
|
|
}
|
|
|
+ // 如果创建人不是自己就要开启审阅
|
|
|
+ openTheTraceByUser(createId)
|
|
|
}
|
|
|
- // 医生等级 3 没有限制
|
|
|
- if (doctorLevel === 3) {
|
|
|
- currentEmr.value.callMethod('setEditorMode', 'free');
|
|
|
- }
|
|
|
- // 如果创建人不是自己就要开启审阅
|
|
|
- openTheTraceByUser(createId)
|
|
|
}
|
|
|
} else {
|
|
|
currentEmr.value.callMethod('setEditorMode', 'readonly')
|