|
@@ -348,7 +348,7 @@ import ChooseToFillInData
|
|
import emrStore from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-func/useEmrStore";
|
|
import emrStore from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-func/useEmrStore";
|
|
import HuanZheXinXi from "@/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue";
|
|
import HuanZheXinXi from "@/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue";
|
|
import CyFlex from "@/components/cy/flex/src/CyFlex.vue";
|
|
import CyFlex from "@/components/cy/flex/src/CyFlex.vue";
|
|
-
|
|
|
|
|
|
+import {magicApi} from "@/utils/database/magic-api-request";
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
maxHeight: {
|
|
maxHeight: {
|
|
@@ -765,7 +765,6 @@ const clickSaveData = async () => {
|
|
emrSaveRulesRef.value.close()
|
|
emrSaveRulesRef.value.close()
|
|
const validator = editor.getValidator();
|
|
const validator = editor.getValidator();
|
|
const valid = validator.valid(true);
|
|
const valid = validator.valid(true);
|
|
-
|
|
|
|
if (valid) {
|
|
if (valid) {
|
|
emrSaveRulesRef.value.validData(valid)
|
|
emrSaveRulesRef.value.validData(valid)
|
|
return
|
|
return
|
|
@@ -776,7 +775,9 @@ const clickSaveData = async () => {
|
|
await handleCrb()
|
|
await handleCrb()
|
|
|
|
|
|
// 解析 id
|
|
// 解析 id
|
|
- let id = await analysisIframeSrcSearch()
|
|
|
|
|
|
+ let id = await analysisIframeSrcSearch();
|
|
|
|
+
|
|
|
|
+ // @ts-ignore
|
|
let data: saveType = {
|
|
let data: saveType = {
|
|
name: '',
|
|
name: '',
|
|
emrDocumentId: id,
|
|
emrDocumentId: id,
|
|
@@ -792,6 +793,22 @@ const clickSaveData = async () => {
|
|
|
|
|
|
data.emrDataElement = editor.getDataElements('business', false, true)
|
|
data.emrDataElement = editor.getDataElements('business', false, true)
|
|
|
|
|
|
|
|
+ const saveErrorMsg = await magicApi({
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: '/intergration/cyEmr/save',
|
|
|
|
+ data: {
|
|
|
|
+ patientInfo: patientInfo.value,
|
|
|
|
+ dataElement: data.emrDataElement,
|
|
|
|
+ categoryCode: categoryCode.value
|
|
|
|
+ }
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ return []
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ if (XEUtils.isArray(saveErrorMsg) && saveErrorMsg.length > 0) {
|
|
|
|
+ emrSaveRulesRef.value.validData(saveErrorMsg)
|
|
|
|
+ }
|
|
|
|
+
|
|
objectValuesCannotBeNull(data);
|
|
objectValuesCannotBeNull(data);
|
|
if (categoryCode.value === emrCodeEnum.courseRecord) {
|
|
if (categoryCode.value === emrCodeEnum.courseRecord) {
|
|
templateName.value = '病程记录'
|
|
templateName.value = '病程记录'
|