|
@@ -296,7 +296,6 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import {getEmrInpatientData} from "@/api/dictionary/emr-data-maintenance-api";
|
|
|
import EmrSidebar from "@/components/zhu-yuan-yi-sheng/emr/emr-template/EmrSidebar.vue";
|
|
|
import {
|
|
|
copyEnum,
|
|
@@ -369,7 +368,6 @@ import EmrRecycleBin
|
|
|
from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/EmrRecycleBin.vue";
|
|
|
import {deletePatientEmrByDocumentId, insertEmrData} from "@/api/zhu-yuan-yi-sheng/emr-patient";
|
|
|
import {
|
|
|
- LoadParams,
|
|
|
useEmrInit,
|
|
|
UseEmrInitReturn
|
|
|
} from "@/utils/emr/emr-init-v2";
|
|
@@ -377,6 +375,16 @@ import moment from "moment";
|
|
|
import {formatDateToStr} from "@/utils/moment-utils";
|
|
|
import EmrOutline
|
|
|
from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/EmrOutline.vue";
|
|
|
+import {getEmrPatientData} from "@/api/base-data/report-center";
|
|
|
+import {
|
|
|
+ infectiousDiseasesAreRequired,
|
|
|
+} from "@/api/zhu-yuan-yi-sheng/infectious-diseasest";
|
|
|
+import type {
|
|
|
+ PatientDiagnosisIsCrb
|
|
|
+} from "@/api/zhu-yuan-yi-sheng/infectious-diseasest";
|
|
|
+import setDialogToJs from "@/components/js-dialog-comp/useDialogToJs";
|
|
|
+import ReportOfInfectiousDiseases
|
|
|
+ from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/report-of-infectious-diseases/ReportOfInfectiousDiseases.vue";
|
|
|
|
|
|
const props = defineProps({
|
|
|
maxHeight: {
|
|
@@ -827,6 +835,8 @@ const clickSaveData = async () => {
|
|
|
} catch {
|
|
|
}
|
|
|
|
|
|
+ await handleCrb()
|
|
|
+
|
|
|
// 解析 id
|
|
|
let id = await analysisIframeSrcSearch()
|
|
|
let data: saveType = {
|
|
@@ -1296,10 +1306,7 @@ const clickToSubmitTheMedicalRecord = async () => {
|
|
|
* @returns {Promise<void>}
|
|
|
*/
|
|
|
const queryingBasicPatientInformation = async () => {
|
|
|
- patientData.value = await getEmrInpatientData({
|
|
|
- patNo: patientInfo.value.inpatientNo,
|
|
|
- times: patientInfo.value.admissTimes
|
|
|
- })
|
|
|
+ patientData.value = await getEmrPatientData(patientInfo.value.inpatientNo, patientInfo.value.admissTimes)
|
|
|
getCurrentPersonnelInformation()
|
|
|
}
|
|
|
|
|
@@ -1922,6 +1929,44 @@ function changeFragmentOrOutline(val) {
|
|
|
fragmentOrOutline.value = val
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 处理传染病
|
|
|
+ */
|
|
|
+async function handleCrb() {
|
|
|
+ if (categoryCode.value !== 入院病历) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const data = editor.getElementsData()
|
|
|
+ let diagList: any[] = []
|
|
|
+ if (XEUtils.has(data['入院诊断'], 'value')) {
|
|
|
+ (data['入院诊断'].value as { code: string }[]).forEach(item => {
|
|
|
+ diagList.push(item.code)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ const temp: PatientDiagnosisIsCrb = {
|
|
|
+ patNo: patientInfo.value.inpatientNo,
|
|
|
+ times: patientInfo.value.admissTimes,
|
|
|
+ diagList
|
|
|
+ }
|
|
|
+ const res = await infectiousDiseasesAreRequired(temp).catch(() => {
|
|
|
+ return {
|
|
|
+ fillOut: false,
|
|
|
+ list: []
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ if (res.fillOut) {
|
|
|
+ setDialogToJs(ReportOfInfectiousDiseases, {
|
|
|
+ patNo: temp.patNo,
|
|
|
+ times: temp.times,
|
|
|
+ prompt: res.list.join(",")
|
|
|
+ }).then(_r => {
|
|
|
+
|
|
|
+ })
|
|
|
+ BizException(ExceptionEnum.MESSAGE_ERROR, "诊断包含传染病,请填写后保存数据。");
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
defineExpose({
|
|
|
closeBothSides,
|
|
|
closeWebSocket,
|