|
@@ -517,26 +517,24 @@ const emrEvent = {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (stringIsBlank(createId) || createId === userInfoStore.value.code) {
|
|
|
- editor.setApplicationContext({
|
|
|
- endpoints: {
|
|
|
- app: "/bdp/dataservice/api",
|
|
|
- his: import.meta.env.VITE_BASE_URL,
|
|
|
- },
|
|
|
- input: {
|
|
|
- user: userInfoStore.value.code,
|
|
|
+ editor.setApplicationContext({
|
|
|
+ endpoints: {
|
|
|
+ app: "/bdp/dataservice/api",
|
|
|
+ his: import.meta.env.VITE_BASE_URL,
|
|
|
+ },
|
|
|
+ input: {
|
|
|
+ user: userInfoStore.value.code,
|
|
|
+ name: userInfoStore.value.name
|
|
|
+ },
|
|
|
+ login: {
|
|
|
+ token: userInfoStore.value.token,
|
|
|
+ user: {
|
|
|
+ id: userInfoStore.value.code,
|
|
|
name: userInfoStore.value.name
|
|
|
- },
|
|
|
- login: {
|
|
|
- token: userInfoStore.value.token,
|
|
|
- user: {
|
|
|
- id: userInfoStore.value.code,
|
|
|
- name: userInfoStore.value.name
|
|
|
- }
|
|
|
- },
|
|
|
- data: patientData.value
|
|
|
- }, true)
|
|
|
- }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data: (stringIsBlank(createId) || createId === userInfoStore.value.code) ? patientData.value : {}
|
|
|
+ }, true)
|
|
|
},
|
|
|
'contentchange': (e, op) => {
|
|
|
if (op.batch.type === 'persist') return
|
|
@@ -1269,7 +1267,6 @@ const reQueryPatientInformation = () => {
|
|
|
if (readonlyPattern()) return;
|
|
|
// 如果病历是空的 且创建人不是自己不触发
|
|
|
if (stringIsBlank(createId) || createId !== userInfoStore.value.code) return;
|
|
|
-
|
|
|
// 如果没有文档 id 就说明是新建的,extractData如果是空就不用调用,不然他会使用 getAppContext 里面的数据
|
|
|
if (getId() && extractData.value) {
|
|
|
editor.setValues(extractData.value, true, true)
|
|
@@ -1753,7 +1750,6 @@ const hisSaveEmrInit = () => {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
let hisSaveEmr: UseEmrInitReturn = {}
|
|
|
|
|
|
onMounted(async () => {
|